Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- fn f<T: 'static + Sized>(v: V) -> &'static str { unsafe { std::intrinsics::type_name::<T>() } } f(1)
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0465]: multiple rlib candidates for `debug_unreachable` found
- |
- = note: candidate #1: /playground/target/debug/deps/libdebug_unreachable-fa055998ad9039b1.rlib
- = note: candidate #2: /playground/target/debug/deps/libdebug_unreachable-bd2d2a032b9a50fd.rlib
- error[E0412]: cannot find type `V` in this scope
- --> src/main.rs:6:38
- |
- 6 | fn f<T: 'static + Sized>(v: V) -> &'static str { unsafe { std::intrinsics::type_name::<T>() } } f(1)
- | ^ help: a type parameter with a similar name exists: `T`
- error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
- --> src/main.rs:6:68
- |
- 6 | fn f<T: 'static + Sized>(v: V) -> &'static str { unsafe { std::intrinsics::type_name::<T>() } } f(1)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- error: aborting due to 3 previous errors
- Some errors occurred: E0412, E0465, E0658.
- For more information about an error, try `rustc --explain E0412`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement