File tree 3 files changed +21
-4
lines changed
3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,21 @@ LL | let _: u8 = *p;
15
15
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
16
16
17
17
error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
18
- --> $DIR/unsafe-fn-deref-ptr.rs:7:12
18
+ --> $DIR/unsafe-fn-deref-ptr.rs:7:9
19
+ |
20
+ LL | _ = *p;
21
+ | ^^ dereference of raw pointer
22
+ |
23
+ = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
24
+
25
+ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
26
+ --> $DIR/unsafe-fn-deref-ptr.rs:8:12
19
27
|
20
28
LL | return *p;
21
29
| ^^ dereference of raw pointer
22
30
|
23
31
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
24
32
25
- error: aborting due to 3 previous errors
33
+ error: aborting due to 4 previous errors
26
34
27
35
For more information about this error, try `rustc --explain E0133`.
Original file line number Diff line number Diff line change 4
4
fn f ( p : * const u8 ) -> u8 {
5
5
let _ = * p; //~ ERROR dereference of raw pointer is unsafe
6
6
let _: u8 = * p; //~ ERROR dereference of raw pointer is unsafe
7
+ _ = * p; //~ ERROR dereference of raw pointer is unsafe
7
8
return * p; //~ ERROR dereference of raw pointer is unsafe
8
9
}
9
10
Original file line number Diff line number Diff line change @@ -15,13 +15,21 @@ LL | let _: u8 = *p;
15
15
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
16
16
17
17
error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
18
- --> $DIR/unsafe-fn-deref-ptr.rs:7:12
18
+ --> $DIR/unsafe-fn-deref-ptr.rs:7:9
19
+ |
20
+ LL | _ = *p;
21
+ | ^^ dereference of raw pointer
22
+ |
23
+ = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
24
+
25
+ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
26
+ --> $DIR/unsafe-fn-deref-ptr.rs:8:12
19
27
|
20
28
LL | return *p;
21
29
| ^^ dereference of raw pointer
22
30
|
23
31
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
24
32
25
- error: aborting due to 3 previous errors
33
+ error: aborting due to 4 previous errors
26
34
27
35
For more information about this error, try `rustc --explain E0133`.
You can’t perform that action at this time.
0 commit comments