You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #143736 - oli-obk:uninspectable-type-id, r=RalfJung
Give all bytes of TypeId provenance
This makes all bytes of TypeId uninspectable at compile-time.
For context see #77125 (comment)
r? ``@RalfJung``
Copy file name to clipboardExpand all lines: tests/ui/consts/const_transmute_type_id3.stderr
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
error[E0080]: type_id_eq: one of the TypeId arguments is invalid, the hash does not match the type it represents
2
-
--> $DIR/const_transmute_type_id3.rs:12:13
1
+
error[E0080]: pointer not dereferenceable: pointer must point to some allocation, but got 0x3e7[noalloc] which is a dangling pointer (it has no provenance)
2
+
--> $DIR/const_transmute_type_id3.rs:15:13
3
3
|
4
4
LL | assert!(a == b);
5
5
| ^^^^^^ evaluation of `_` failed inside this call
error[E0080]: type_id_eq: one of the TypeId arguments is invalid, chunk 1 of the hash does not match the type it represents
2
+
--> $DIR/const_transmute_type_id5.rs:17:13
3
+
|
4
+
LL | assert!(a == b);
5
+
| ^^^^^^ evaluation of `_` failed inside this call
6
+
|
7
+
note: inside `<TypeId as PartialEq>::eq`
8
+
--> $SRC_DIR/core/src/any.rs:LL:COL
9
+
note: inside `<TypeId as PartialEq>::eq::compiletime`
10
+
--> $SRC_DIR/core/src/any.rs:LL:COL
11
+
= note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `crate::intrinsics::const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info)
12
+
13
+
error: aborting due to 1 previous error
14
+
15
+
For more information about this error, try `rustc --explain E0080`.
0 commit comments