rust/tests/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
2018-12-25 15:56:47 +00:00
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:21:1
|
2023-01-01 17:48:14 +00:00
LL | impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt<A, B> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Drop` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword
help: add `unsafe` to this trait implementation
|
LL | unsafe impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt<A, B> {
| ++++++
error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
2018-12-25 15:56:47 +00:00
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:27:1
|
2023-01-01 17:48:14 +00:00
LL | impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Drop` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword
help: add `unsafe` to this trait implementation
|
LL | unsafe impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> {
| ++++++
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`.