Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- #![feature(existential_type)]
- fn main() {
- println!("{:?}", {
- fn foo() { } existential type Foo:; fn bar() { let _: Foo = foo; }
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0308]: mismatched types
- --> src/main.rs:6:70
- |
- 6 | fn foo() { } existential type Foo:; fn bar() { let _: Foo = foo; }
- | ^^^ expected opaque type, found fn item
- |
- = note: expected type `Foo`
- found type `fn() {main::foo}`
- error: could not find defining uses
- --> src/main.rs:6:23
- |
- 6 | fn foo() { } existential type Foo:; fn bar() { let _: Foo = foo; }
- | ^^^^^^^^^^^^^^^^^^^^^^
- error: aborting due to 2 previous errors
- For more information about this error, try `rustc --explain E0308`.
- 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