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