]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/unnecessary_safety_comment.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / unnecessary_safety_comment.stderr
1 error: constant item has unnecessary safety comment
2 --> $DIR/unnecessary_safety_comment.rs:6:5
3 |
4 LL | const CONST: u32 = 0;
5 | ^^^^^^^^^^^^^^^^^^^^^
6 |
7 help: consider removing the safety comment
8 --> $DIR/unnecessary_safety_comment.rs:5:5
9 |
10 LL | // SAFETY:
11 | ^^^^^^^^^^
12 = note: `-D clippy::unnecessary-safety-comment` implied by `-D warnings`
13 = help: to override `-D warnings` add `#[allow(clippy::unnecessary_safety_comment)]`
14
15 error: static item has unnecessary safety comment
16 --> $DIR/unnecessary_safety_comment.rs:9:5
17 |
18 LL | static STATIC: u32 = 0;
19 | ^^^^^^^^^^^^^^^^^^^^^^^
20 |
21 help: consider removing the safety comment
22 --> $DIR/unnecessary_safety_comment.rs:8:5
23 |
24 LL | // SAFETY:
25 | ^^^^^^^^^^
26
27 error: struct has unnecessary safety comment
28 --> $DIR/unnecessary_safety_comment.rs:12:5
29 |
30 LL | struct Struct;
31 | ^^^^^^^^^^^^^^
32 |
33 help: consider removing the safety comment
34 --> $DIR/unnecessary_safety_comment.rs:11:5
35 |
36 LL | // SAFETY:
37 | ^^^^^^^^^^
38
39 error: enum has unnecessary safety comment
40 --> $DIR/unnecessary_safety_comment.rs:15:5
41 |
42 LL | enum Enum {}
43 | ^^^^^^^^^^^^
44 |
45 help: consider removing the safety comment
46 --> $DIR/unnecessary_safety_comment.rs:14:5
47 |
48 LL | // SAFETY:
49 | ^^^^^^^^^^
50
51 error: module has unnecessary safety comment
52 --> $DIR/unnecessary_safety_comment.rs:18:5
53 |
54 LL | mod module {}
55 | ^^^^^^^^^^^^^
56 |
57 help: consider removing the safety comment
58 --> $DIR/unnecessary_safety_comment.rs:17:5
59 |
60 LL | // SAFETY:
61 | ^^^^^^^^^^
62
63 error: impl has unnecessary safety comment
64 --> $DIR/unnecessary_safety_comment.rs:38:13
65 |
66 LL | impl T for $t {}
67 | ^^^^^^^^^^^^^^^^
68 ...
69 LL | with_safety_comment!(i32);
70 | ------------------------- in this macro invocation
71 |
72 help: consider removing the safety comment
73 --> $DIR/unnecessary_safety_comment.rs:37:13
74 |
75 LL | // Safety: unnecessary
76 | ^^^^^^^^^^^^^^^^^^^^^^
77 = note: this error originates in the macro `with_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
78
79 error: expression has unnecessary safety comment
80 --> $DIR/unnecessary_safety_comment.rs:55:5
81 |
82 LL | 24
83 | ^^
84 |
85 help: consider removing the safety comment
86 --> $DIR/unnecessary_safety_comment.rs:54:5
87 |
88 LL | // SAFETY: unnecessary
89 | ^^^^^^^^^^^^^^^^^^^^^^
90
91 error: statement has unnecessary safety comment
92 --> $DIR/unnecessary_safety_comment.rs:47:5
93 |
94 LL | let num = 42;
95 | ^^^^^^^^^^^^^
96 |
97 help: consider removing the safety comment
98 --> $DIR/unnecessary_safety_comment.rs:46:5
99 |
100 LL | // SAFETY: unnecessary
101 | ^^^^^^^^^^^^^^^^^^^^^^
102
103 error: statement has unnecessary safety comment
104 --> $DIR/unnecessary_safety_comment.rs:51:5
105 |
106 LL | if num > 24 {}
107 | ^^^^^^^^^^^^^^
108 |
109 help: consider removing the safety comment
110 --> $DIR/unnecessary_safety_comment.rs:50:5
111 |
112 LL | // SAFETY: unnecessary
113 | ^^^^^^^^^^^^^^^^^^^^^^
114
115 error: aborting due to 9 previous errors
116