rust/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr

26 lines
1 KiB
Plaintext
Raw Normal View History

error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:31:1
|
2018-02-23 00:42:32 +00:00
LL | / impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt<A, B> {
LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
LL | |
LL | | // (unsafe to access self.1 due to #[may_dangle] on A)
2018-02-24 23:01:39 +00:00
LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); }
2018-02-23 00:42:32 +00:00
LL | | }
| |_^
error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:37:1
|
2018-02-23 00:42:32 +00:00
LL | / impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> {
LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
LL | |
LL | | // (unsafe to access self.1 due to #[may_dangle] on 'a)
2018-02-24 23:01:39 +00:00
LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); }
2018-02-23 00:42:32 +00:00
LL | | }
| |_^
error: aborting due to 2 previous errors
2018-03-03 14:59:40 +00:00
For more information about this error, try `rustc --explain E0569`.