]> git.lizzy.rs Git - rust.git/blob - src/test/ui/reify-intrinsic.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / reify-intrinsic.stderr
1 error[E0308]: cannot coerce intrinsics to function pointers
2   --> $DIR/reify-intrinsic.rs:6:64
3    |
4 LL |     let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::transmute;
5    |            -------------------------------------------------   ^^^^^^^^^^^^^^^^^^^ cannot coerce intrinsics to function pointers
6    |            |
7    |            expected due to this
8    |
9    = note: expected fn pointer `unsafe extern "rust-intrinsic" fn(isize) -> usize`
10                  found fn item `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}`
11 help: use parentheses to call this function
12    |
13 LL |     let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::transmute(...);
14    |                                                                                   ^^^^^
15
16 error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}` as `unsafe extern "rust-intrinsic" fn(isize) -> usize` is invalid
17   --> $DIR/reify-intrinsic.rs:11:13
18    |
19 LL |     let _ = std::mem::transmute as unsafe extern "rust-intrinsic" fn(isize) -> usize;
20    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
22 error: aborting due to 2 previous errors
23
24 Some errors have detailed explanations: E0308, E0606.
25 For more information about an error, try `rustc --explain E0308`.