We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2ae9e5 commit a4b966aCopy full SHA for a4b966a
src/tools/miri/tests/pass/provenance.rs
@@ -10,6 +10,7 @@ fn main() {
10
bytewise_ptr_methods();
11
bytewise_custom_memcpy();
12
bytewise_custom_memcpy_chunked();
13
+ int_load_strip_provenance();
14
}
15
16
/// Some basic smoke tests for provenance.
@@ -137,3 +138,9 @@ fn bytewise_custom_memcpy_chunked() {
137
138
assert_eq!(*ptr, 42);
139
140
141
+
142
+fn int_load_strip_provenance() {
143
+ let ptrs = [&42];
144
+ let ints: [usize; 1] = unsafe { mem::transmute(ptrs) };
145
+ assert_eq!(ptrs[0] as *const _ as usize, ints[0]);
146
+}
0 commit comments