You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/ui/coherence/coherence-default-trait-impl.stderr
+12
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,24 @@ error[E0199]: implementing the trait `MySafeTrait` is not unsafe
3
3
|
4
4
LL | unsafe impl MySafeTrait for Foo {}
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+
|
7
+
help: remove `unsafe` from this trait implementation
8
+
|
9
+
LL - unsafe impl MySafeTrait for Foo {}
10
+
LL + impl MySafeTrait for Foo {}
11
+
|
6
12
7
13
error[E0200]: the trait `MyUnsafeTrait` requires an `unsafe impl` declaration
8
14
--> $DIR/coherence-default-trait-impl.rs:13:1
9
15
|
10
16
LL | impl MyUnsafeTrait for Foo {}
11
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
+
|
19
+
= note: the trait `MyUnsafeTrait` 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
= 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
13
+
help: add `unsafe` to this trait implementation
14
+
|
15
+
LL | unsafe impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt<A, B> {
16
+
| ++++++
11
17
12
18
error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute
= 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
30
+
help: add `unsafe` to this trait implementation
31
+
|
32
+
LL | unsafe impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> {
Copy file name to clipboardExpand all lines: src/test/ui/error-codes/E0200.stderr
+6
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,12 @@ error[E0200]: the trait `Bar` requires an `unsafe impl` declaration
3
3
|
4
4
LL | impl Bar for Foo { }
5
5
| ^^^^^^^^^^^^^^^^^^^^
6
+
|
7
+
= note: the trait `Bar` 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
Copy file name to clipboardExpand all lines: src/test/ui/traits/safety-trait-impl-cc.stderr
+6
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,12 @@ LL | | panic!();
7
7
LL | | }
8
8
LL | | }
9
9
| |_^
10
+
|
11
+
= note: the trait `Foo` 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
Copy file name to clipboardExpand all lines: src/test/ui/traits/safety-trait-impl.stderr
+12
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,24 @@ error[E0200]: the trait `UnsafeTrait` requires an `unsafe impl` declaration
3
3
|
4
4
LL | impl UnsafeTrait for u16 { }
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+
|
7
+
= note: the trait `UnsafeTrait` 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
8
+
help: add `unsafe` to this trait implementation
9
+
|
10
+
LL | unsafe impl UnsafeTrait for u16 { }
11
+
| ++++++
6
12
7
13
error[E0199]: implementing the trait `SafeTrait` is not unsafe
8
14
--> $DIR/safety-trait-impl.rs:16:1
9
15
|
10
16
LL | unsafe impl SafeTrait for u32 { }
11
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
+
|
19
+
help: remove `unsafe` from this trait implementation
0 commit comments