aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/rustc_attr1.rs
blob: 4bc7d5e355317c3ddadf1017e2092174854d2e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-additional-options "-w" }

#![feature(rustc_attrs)]

pub struct NotI8(i8);

impl NotI8 {
    #[inline]
    #[rustc_inherit_overflow_checks]
    pub fn add(self, other: NotI8) -> NotI8 {
        NotI8(self.0 + other.0)
    }
}