1 error[E0601]: `main` function not found in crate `imported_main_const_fn_item_type_forbidden`
2 --> $DIR/imported_main_const_fn_item_type_forbidden.rs:1:1
4 LL | / #![feature(imported_main)]
5 LL | | #![feature(type_alias_impl_trait)]
6 LL | | #![allow(incomplete_features)]
10 LL | | use foo::BAR as main;
11 | |_____----------------^ consider adding a `main` function to `$DIR/imported_main_const_fn_item_type_forbidden.rs`
13 | non-function item at `crate::main` is found
15 error[E0308]: mismatched types
16 --> $DIR/imported_main_const_fn_item_type_forbidden.rs:10:29
18 LL | type MainFn = impl Fn();
19 | --------- the expected opaque type
21 LL | pub const BAR: MainFn = bar;
22 | ^^^ expected opaque type, found fn item
24 = note: expected opaque type `impl Fn()`
25 found fn item `fn() {bar}`
27 error: could not find defining uses
28 --> $DIR/imported_main_const_fn_item_type_forbidden.rs:6:19
30 LL | type MainFn = impl Fn();
33 error: aborting due to 3 previous errors
35 Some errors have detailed explanations: E0308, E0601.
36 For more information about an error, try `rustc --explain E0308`.