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() -> Foo { foo } trait Tr { fn baz(&self) { } } impl Tr for Foo { } Tr::baz(&foo);
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0277]: the trait bound `fn() {main::foo}: main::Tr` is not satisfied
- --> src/main.rs:6:121
- |
- 6 | fn foo() { } existential type Foo:; fn bar() -> Foo { foo } trait Tr { fn baz(&self) { } } impl Tr for Foo { } Tr::baz(&foo);
- | ^^^^^^^ the trait `main::Tr` is not implemented for `fn() {main::foo}`
- |
- note: required by `main::Tr::baz`
- --> src/main.rs:6:81
- |
- 6 | fn foo() { } existential type Foo:; fn bar() -> Foo { foo } trait Tr { fn baz(&self) { } } impl Tr for Foo { } Tr::baz(&foo);
- | ^^^^^^^^^^^^^
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0277`.
- 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