blob: 5f560003a2238be2ba9a310db2c8bfdf8a646cb5 [file]
error: the `may_dangle` attribute cannot be used on const parameters
--> $DIR/may_dangle.rs:14:22
|
LL | unsafe impl<'a, T, #[may_dangle] const N: usize> Drop for Implee1<'a, T, N> {
| ^^^^^^^^^^
|
= help: the `may_dangle` attribute can be applied to lifetime parameters and type parameters
error: the `may_dangle` attribute cannot be used on structs
--> $DIR/may_dangle.rs:42:3
|
LL | #[may_dangle]
| ^^^^^^^^^^
|
= help: the `may_dangle` attribute can be applied to lifetime parameters and type parameters
error: the `may_dangle` attribute cannot be used on trait impl blocks
--> $DIR/may_dangle.rs:45:3
|
LL | #[may_dangle]
| ^^^^^^^^^^
|
= help: the `may_dangle` attribute can be applied to lifetime parameters and type parameters
error: the `may_dangle` attribute cannot be used on functions
--> $DIR/may_dangle.rs:49:3
|
LL | #[may_dangle]
| ^^^^^^^^^^
|
= help: the `may_dangle` attribute can be applied to lifetime parameters and type parameters
error: the `may_dangle` attribute cannot be used on statements
--> $DIR/may_dangle.rs:51:7
|
LL | #[may_dangle]
| ^^^^^^^^^^
|
= help: the `may_dangle` attribute can be applied to lifetime parameters and type parameters
error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl
--> $DIR/may_dangle.rs:8:13
|
LL | unsafe impl<#[may_dangle] 'a, T, const N: usize> NotDrop for Implee1<'a, T, N> {}
| ^^^^^^^^^^^^^
error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl
--> $DIR/may_dangle.rs:11:17
|
LL | unsafe impl<'a, #[may_dangle] T, const N: usize> NotDrop for Implee2<'a, T, N> {}
| ^^^^^^^^^^^^^
error: `#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl
--> $DIR/may_dangle.rs:36:17
|
LL | unsafe impl<#[may_dangle] T> Drop for Implee<T> {
| ^^^^^^^^^^^^^
error: aborting due to 8 previous errors