fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
890 B25 linesraw
1error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
2  --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:21:1
3   |
4LL | / impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt<A, B> {
5LL | |
6LL | |
7LL | |     // (unsafe to access self.1  due to #[may_dangle] on A)
8LL | |     fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); }
9LL | | }
10   | |_^
11
12error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
13  --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:27:1
14   |
15LL | / impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> {
16LL | |
17LL | |
18LL | |     // (unsafe to access self.1 due to #[may_dangle] on 'a)
19LL | |     fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); }
20LL | | }
21   | |_^
22
23error: aborting due to 2 previous errors
24
25For more information about this error, try `rustc --explain E0569`.