Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- #![feature(core_intrinsics)]
- 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[E0412]: cannot find type `V` in this scope
- --> src/main.rs:6:39
- |
- 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: aborting due to previous error
- For more information about this 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