2016-10-17 11:02:23 -05:00
|
|
|
error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
|
|
|
|
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:32:1
|
|
|
|
|
|
2016-10-23 19:22:06 -05:00
|
|
|
32 | impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt<A, B> {
|
|
|
|
| _^ starting here...
|
|
|
|
33 | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
|
|
|
|
34 | |
|
|
|
|
35 | | // (unsafe to access self.1 due to #[may_dangle] on A)
|
|
|
|
36 | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); }
|
|
|
|
37 | | }
|
2016-11-23 01:32:16 -06:00
|
|
|
| |_^ ...ending here
|
2016-10-17 11:02:23 -05:00
|
|
|
|
|
|
|
error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
|
|
|
|
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:38:1
|
|
|
|
|
|
2016-10-23 19:22:06 -05:00
|
|
|
38 | impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> {
|
|
|
|
| _^ starting here...
|
|
|
|
39 | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
|
|
|
|
40 | |
|
|
|
|
41 | | // (unsafe to access self.1 due to #[may_dangle] on 'a)
|
|
|
|
42 | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); }
|
|
|
|
43 | | }
|
2016-11-23 01:32:16 -06:00
|
|
|
| |_^ ...ending here
|
2016-10-17 11:02:23 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|