|
1 | | -error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
2 | | - --> $DIR/may_dangle.rs:8:13 |
3 | | - | |
4 | | -LL | unsafe impl<#[may_dangle] 'a, T, const N: usize> NotDrop for Implee1<'a, T, N> {} |
5 | | - | ^^^^^^^^^^^^^ |
6 | | - |
7 | | -error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
8 | | - --> $DIR/may_dangle.rs:11:17 |
9 | | - | |
10 | | -LL | unsafe impl<'a, #[may_dangle] T, const N: usize> NotDrop for Implee2<'a, T, N> {} |
11 | | - | ^^^^^^^^^^^^^ |
12 | | - |
13 | | -error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
| 1 | +error: `#[may_dangle]` attribute cannot be used on const parameters |
14 | 2 | --> $DIR/may_dangle.rs:14:20 |
15 | 3 | | |
16 | 4 | LL | unsafe impl<'a, T, #[may_dangle] const N: usize> Drop for Implee1<'a, T, N> { |
17 | 5 | | ^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = help: `#[may_dangle]` can be applied to lifetime parameters and type parameters |
18 | 8 |
|
19 | | -error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
| 9 | +error: `#[may_dangle]` attribute cannot be used on structs |
20 | 10 | --> $DIR/may_dangle.rs:42:1 |
21 | 11 | | |
22 | 12 | LL | #[may_dangle] |
23 | 13 | | ^^^^^^^^^^^^^ |
| 14 | + | |
| 15 | + = help: `#[may_dangle]` can be applied to lifetime parameters and type parameters |
24 | 16 |
|
25 | | -error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
| 17 | +error: `#[may_dangle]` attribute cannot be used on trait impl blocks |
26 | 18 | --> $DIR/may_dangle.rs:45:1 |
27 | 19 | | |
28 | 20 | LL | #[may_dangle] |
29 | 21 | | ^^^^^^^^^^^^^ |
| 22 | + | |
| 23 | + = help: `#[may_dangle]` can be applied to lifetime parameters and type parameters |
30 | 24 |
|
31 | | -error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
| 25 | +error: `#[may_dangle]` attribute cannot be used on functions |
32 | 26 | --> $DIR/may_dangle.rs:49:1 |
33 | 27 | | |
34 | 28 | LL | #[may_dangle] |
35 | 29 | | ^^^^^^^^^^^^^ |
| 30 | + | |
| 31 | + = help: `#[may_dangle]` can be applied to lifetime parameters and type parameters |
36 | 32 |
|
37 | | -error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
| 33 | +error: `#[may_dangle]` attribute cannot be used on statements |
38 | 34 | --> $DIR/may_dangle.rs:51:5 |
39 | 35 | | |
40 | 36 | LL | #[may_dangle] |
41 | 37 | | ^^^^^^^^^^^^^ |
| 38 | + | |
| 39 | + = help: `#[may_dangle]` can be applied to lifetime parameters and type parameters |
| 40 | + |
| 41 | +error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
| 42 | + --> $DIR/may_dangle.rs:8:13 |
| 43 | + | |
| 44 | +LL | unsafe impl<#[may_dangle] 'a, T, const N: usize> NotDrop for Implee1<'a, T, N> {} |
| 45 | + | ^^^^^^^^^^^^^ |
| 46 | + |
| 47 | +error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
| 48 | + --> $DIR/may_dangle.rs:11:17 |
| 49 | + | |
| 50 | +LL | unsafe impl<'a, #[may_dangle] T, const N: usize> NotDrop for Implee2<'a, T, N> {} |
| 51 | + | ^^^^^^^^^^^^^ |
42 | 52 |
|
43 | 53 | error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl |
44 | 54 | --> $DIR/may_dangle.rs:36:17 |
|
0 commit comments