rust/src/test/ui/issues/issue-41139.stderr

15 lines
654 B
Plaintext
Raw Normal View History

error[E0618]: expected function, found `&dyn std::ops::Fn() -> (dyn Trait + 'static)`
--> $DIR/issue-41139.rs:8:27
2018-07-15 16:11:54 -05:00
|
LL | fn get_function<'a>() -> &'a dyn Fn() -> dyn Trait { panic!("") }
| ----------------------------------------------------------------- `get_function` defined here returns `&dyn std::ops::Fn() -> (dyn Trait + 'static)`
...
2019-05-28 13:46:13 -05:00
LL | let t : &dyn Trait = &get_function()();
| ^^^^^^^^^^^^^^--
| |
| call expression requires function
2018-07-15 16:11:54 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0618`.