2024-11-20 03:00:58 +00:00
|
|
|
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
|
2024-05-03 13:49:10 +00:00
|
|
|
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:9:9
|
2023-10-19 06:36:24 +00:00
|
|
|
|
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const C: *const u8 = &0;
|
|
|
|
| ------------------ constant defined here
|
|
|
|
...
|
2023-10-19 06:36:24 +00:00
|
|
|
LL | C => {}
|
2024-11-20 03:00:58 +00:00
|
|
|
| ^ can't be used in patterns
|
|
|
|
|
|
|
|
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
|
2023-10-19 06:36:24 +00:00
|
|
|
|
2024-11-20 03:00:58 +00:00
|
|
|
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
|
2024-05-03 13:49:10 +00:00
|
|
|
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:16:9
|
2023-10-20 06:35:36 +00:00
|
|
|
|
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const C_INNER: (*const u8, u8) = (C, 0);
|
|
|
|
| ------------------------------ constant defined here
|
|
|
|
...
|
2023-10-20 06:35:36 +00:00
|
|
|
LL | C_INNER => {}
|
2024-11-20 03:00:58 +00:00
|
|
|
| ^^^^^^^ can't be used in patterns
|
|
|
|
|
|
|
|
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
|
2023-10-20 06:35:36 +00:00
|
|
|
|
2024-11-20 03:00:58 +00:00
|
|
|
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
|
2024-05-03 13:49:10 +00:00
|
|
|
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:27:9
|
2023-10-19 06:36:24 +00:00
|
|
|
|
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const D: *const [u8; 4] = b"abcd";
|
|
|
|
| ----------------------- constant defined here
|
|
|
|
...
|
2023-10-19 06:36:24 +00:00
|
|
|
LL | D => {}
|
2024-11-20 03:00:58 +00:00
|
|
|
| ^ can't be used in patterns
|
|
|
|
|
|
|
|
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
|
2023-10-19 06:36:24 +00:00
|
|
|
|
2024-11-20 03:00:58 +00:00
|
|
|
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
|
2024-05-03 13:49:10 +00:00
|
|
|
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:32:9
|
2023-11-11 10:12:09 +00:00
|
|
|
|
|
2024-11-20 02:15:21 +00:00
|
|
|
LL | const STR: *const str = "abcd";
|
|
|
|
| --------------------- constant defined here
|
|
|
|
...
|
2023-11-11 10:12:09 +00:00
|
|
|
LL | STR => {}
|
2024-11-20 03:00:58 +00:00
|
|
|
| ^^^ can't be used in patterns
|
|
|
|
|
|
|
|
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
|
2023-11-11 10:12:09 +00:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2023-10-19 06:36:24 +00:00
|
|
|
|