summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/ub-write-through-immutable.stderr
blob: 27eb2d2c0d152d217564a02f7490bea959112000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
error: writing through a pointer that was derived from a shared (immutable) reference
  --> $DIR/ub-write-through-immutable.rs:12:5
   |
LL |     *ptr = 0;
   |     ^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
note: the lint level is defined here
  --> $DIR/ub-write-through-immutable.rs:3:9
   |
LL | #![deny(writes_through_immutable_pointer)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: writing through a pointer that was derived from a shared (immutable) reference
  --> $DIR/ub-write-through-immutable.rs:19:5
   |
LL |     *ptr = 0;
   |     ^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>

error: aborting due to 2 previous errors

Future incompatibility report: Future breakage diagnostic:
error: writing through a pointer that was derived from a shared (immutable) reference
  --> $DIR/ub-write-through-immutable.rs:12:5
   |
LL |     *ptr = 0;
   |     ^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
note: the lint level is defined here
  --> $DIR/ub-write-through-immutable.rs:3:9
   |
LL | #![deny(writes_through_immutable_pointer)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: writing through a pointer that was derived from a shared (immutable) reference
  --> $DIR/ub-write-through-immutable.rs:19:5
   |
LL |     *ptr = 0;
   |     ^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
note: the lint level is defined here
  --> $DIR/ub-write-through-immutable.rs:3:9
   |
LL | #![deny(writes_through_immutable_pointer)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^