fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
4.0 KiB112 linesraw
1error: call to unsafe function is unsafe and requires unsafe block (error E0133)
2  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:12:5
3   |
4LL |     unsf();
5   |     ^^^^^^ call to unsafe function
6   |
7   = note: consult the function's documentation for information on how to avoid undefined behavior
8note: an unsafe function restricts its caller, but its body is safe by default
9  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11:1
10   |
11LL | unsafe fn deny_level() {
12   | ^^^^^^^^^^^^^^^^^^^^^^
13note: the lint level is defined here
14  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:4:9
15   |
16LL | #![deny(unsafe_op_in_unsafe_fn)]
17   |         ^^^^^^^^^^^^^^^^^^^^^^
18
19error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
20  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:15:5
21   |
22LL |     *PTR;
23   |     ^^^^ dereference of raw pointer
24   |
25   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
26
27error: use of mutable static is unsafe and requires unsafe block (error E0133)
28  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:17:5
29   |
30LL |     VOID = ();
31   |     ^^^^^^^^^ use of mutable static
32   |
33   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
34
35error: unnecessary `unsafe` block
36  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:20:5
37   |
38LL |     unsafe {}
39   |     ^^^^^^ unnecessary `unsafe` block
40   |
41note: the lint level is defined here
42  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:5:9
43   |
44LL | #![deny(unused_unsafe)]
45   |         ^^^^^^^^^^^^^
46
47error: call to unsafe function is unsafe and requires unsafe block (error E0133)
48  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28:5
49   |
50LL |     unsf();
51   |     ^^^^^^ call to unsafe function
52   |
53   = note: consult the function's documentation for information on how to avoid undefined behavior
54note: an unsafe function restricts its caller, but its body is safe by default
55  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:27:1
56   |
57LL | unsafe fn warning_level() {
58   | ^^^^^^^^^^^^^^^^^^^^^^^^^
59note: the lint level is defined here
60  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:8
61   |
62LL | #[deny(warnings)]
63   |        ^^^^^^^^
64   = note: `#[deny(unsafe_op_in_unsafe_fn)]` implied by `#[deny(warnings)]`
65
66error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
67  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:31:5
68   |
69LL |     *PTR;
70   |     ^^^^ dereference of raw pointer
71   |
72   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
73
74error: use of mutable static is unsafe and requires unsafe block (error E0133)
75  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:33:5
76   |
77LL |     VOID = ();
78   |     ^^^^^^^^^ use of mutable static
79   |
80   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
81
82error: unnecessary `unsafe` block
83  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:35:5
84   |
85LL |     unsafe {}
86   |     ^^^^^^ unnecessary `unsafe` block
87
88error: unnecessary `unsafe` block
89  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:49:5
90   |
91LL |     unsafe { unsafe { unsf() } }
92   |     ^^^^^^ unnecessary `unsafe` block
93
94error[E0133]: call to unsafe function is unsafe and requires unsafe block
95  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:76:5
96   |
97LL |     unsf();
98   |     ^^^^^^ call to unsafe function
99   |
100   = note: consult the function's documentation for information on how to avoid undefined behavior
101
102error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
103  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:81:9
104   |
105LL |         unsf();
106   |         ^^^^^^ call to unsafe function
107   |
108   = note: consult the function's documentation for information on how to avoid undefined behavior
109
110error: aborting due to 11 previous errors
111
112For more information about this error, try `rustc --explain E0133`.