aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-3045-2.rs
blob: 177707fb4750e77d598abf06991f097282e35953 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![feature(dropck_eyepatch)]
#[allow(dead_code)]

#[lang = "sized"]
trait Sized {}


trait Action {}

struct Inspector<'a>(&'a u8);
struct Inspector2<'a>(&'a u8);

impl<#[may_dangle] 'a> Action for Inspector<'a> {} // { dg-error "use of 'may_dangle' is unsafe and requires unsafe impl" "" { target *-*-* } 0 }

unsafe impl<#[may_dangle] 'a> Action for Inspector2<'a> {}


fn main() {

}