rust/tests/ui/unnecessary_safety_comment.stderr

116 lines
3.0 KiB
Plaintext
Raw Normal View History

2022-11-24 02:47:50 -06:00
error: constant item has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:6:5
|
LL | const CONST: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:5:5
|
LL | // SAFETY:
| ^^^^^^^^^^
= note: `-D clippy::unnecessary-safety-comment` implied by `-D warnings`
error: static item has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:9:5
2022-11-24 02:47:50 -06:00
|
LL | static STATIC: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:8:5
2022-11-24 02:47:50 -06:00
|
LL | // SAFETY:
| ^^^^^^^^^^
error: struct has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:12:5
2022-11-24 02:47:50 -06:00
|
LL | struct Struct;
| ^^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:11:5
2022-11-24 02:47:50 -06:00
|
LL | // SAFETY:
| ^^^^^^^^^^
error: enum has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:15:5
2022-11-24 02:47:50 -06:00
|
LL | enum Enum {}
| ^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:14:5
2022-11-24 02:47:50 -06:00
|
LL | // SAFETY:
| ^^^^^^^^^^
error: module has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:18:5
2022-11-24 02:47:50 -06:00
|
LL | mod module {}
| ^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:17:5
2022-11-24 02:47:50 -06:00
|
LL | // SAFETY:
| ^^^^^^^^^^
error: impl has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:38:13
2022-11-24 02:47:50 -06:00
|
LL | impl T for $t {}
| ^^^^^^^^^^^^^^^^
...
LL | with_safety_comment!(i32);
| ------------------------- in this macro invocation
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:37:13
2022-11-24 02:47:50 -06:00
|
LL | // Safety: unnecessary
| ^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `with_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expression has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:55:5
2022-11-24 02:47:50 -06:00
|
LL | 24
| ^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:54:5
2022-11-24 02:47:50 -06:00
|
LL | // SAFETY: unnecessary
| ^^^^^^^^^^^^^^^^^^^^^^
error: statement has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:47:5
2022-11-24 02:47:50 -06:00
|
LL | let num = 42;
| ^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:46:5
2022-11-24 02:47:50 -06:00
|
LL | // SAFETY: unnecessary
| ^^^^^^^^^^^^^^^^^^^^^^
error: statement has unnecessary safety comment
--> $DIR/unnecessary_safety_comment.rs:51:5
2022-11-24 02:47:50 -06:00
|
LL | if num > 24 {}
| ^^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/unnecessary_safety_comment.rs:50:5
2022-11-24 02:47:50 -06:00
|
LL | // SAFETY: unnecessary
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 9 previous errors