Auto merge of #129199 - RalfJung:writes_through_immutable_pointer, r=… · rust-lang/rust@2c70eb4 (original) (raw)

1

``

`-

error: writing through a pointer that was derived from a shared (immutable) reference

`

2

``

`-

--> $DIR/ub-write-through-immutable.rs:12:5

`

``

1

`+

error[E0080]: evaluation of constant value failed

`

``

2

`+

--> $DIR/ub-write-through-immutable.rs:11:5

`

3

3

` |

`

4

4

`LL | *ptr = 0;

`

5

``

`-

| ^^^^^^^^

`

6

``

`-

|

`

7

``

`-

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

`

8

``

`-

= note: for more information, see issue #X https://github.com/rust-lang/rust/issues/X

`

9

``

`-

note: the lint level is defined here

`

10

``

`-

--> $DIR/ub-write-through-immutable.rs:3:9

`

11

``

`-

|

`

12

``

`-

LL | #![deny(writes_through_immutable_pointer)]

`

13

``

`-

| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

`

``

5

`+

| ^^^^^^^^ writing through a pointer that was derived from a shared (immutable) reference

`

14

6

``

15

``

`-

error: writing through a pointer that was derived from a shared (immutable) reference

`

16

``

`-

--> $DIR/ub-write-through-immutable.rs:19:5

`

``

7

`+

error[E0080]: evaluation of constant value failed

`

``

8

`+

--> $DIR/ub-write-through-immutable.rs🔞5

`

17

9

` |

`

18

10

`LL | *ptr = 0;

`

19

``

`-

| ^^^^^^^^

`

20

``

`-

|

`

21

``

`-

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

`

22

``

`-

= note: for more information, see issue #X https://github.com/rust-lang/rust/issues/X

`

``

11

`+

| ^^^^^^^^ writing through a pointer that was derived from a shared (immutable) reference

`

23

12

``

24

13

`error: aborting due to 2 previous errors

`

25

14

``

26

``

`-

Future incompatibility report: Future breakage diagnostic:

`

27

``

`-

error: writing through a pointer that was derived from a shared (immutable) reference

`

28

``

`-

--> $DIR/ub-write-through-immutable.rs:12:5

`

29

``

`-

|

`

30

``

`-

LL | *ptr = 0;

`

31

``

`-

| ^^^^^^^^

`

32

``

`-

|

`

33

``

`-

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

`

34

``

`-

= note: for more information, see issue #X https://github.com/rust-lang/rust/issues/X

`

35

``

`-

note: the lint level is defined here

`

36

``

`-

--> $DIR/ub-write-through-immutable.rs:3:9

`

37

``

`-

|

`

38

``

`-

LL | #![deny(writes_through_immutable_pointer)]

`

39

``

`-

| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

`

40

``

-

41

``

`-

Future breakage diagnostic:

`

42

``

`-

error: writing through a pointer that was derived from a shared (immutable) reference

`

43

``

`-

--> $DIR/ub-write-through-immutable.rs:19:5

`

44

``

`-

|

`

45

``

`-

LL | *ptr = 0;

`

46

``

`-

| ^^^^^^^^

`

47

``

`-

|

`

48

``

`-

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

`

49

``

`-

= note: for more information, see issue #X https://github.com/rust-lang/rust/issues/X

`

50

``

`-

note: the lint level is defined here

`

51

``

`-

--> $DIR/ub-write-through-immutable.rs:3:9

`

52

``

`-

|

`

53

``

`-

LL | #![deny(writes_through_immutable_pointer)]

`

54

``

`-

| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

`

55

``

-

``

15

`` +

For more information about this error, try rustc --explain E0080.

``