aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/feature_rust_attri1.rs
blob: ec4e7d5be543bdd79ef153e34bb3da7358772154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

pub struct NotI8(i8);

impl NotI8 {
    #[rustc_inherit_overflow_checks] //{ dg-error "internal implementation detail" "" { target *-*-* }  }
    pub fn add(self, other: NotI8) -> NotI8 {
        NotI8(self.0 + other.0)
    }
}

fn main() -> i32 {
    0
}