]> git.lizzy.rs Git - rust.git/blob - src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr
Tweak move error
[rust.git] / src / test / ui / entry-point / imported_main_const_fn_item_type_forbidden.stderr
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
3    |
4 LL | / #![feature(imported_main)]
5 LL | | #![feature(type_alias_impl_trait)]
6 LL | | #![allow(incomplete_features)]
7 LL | |
8 ...  |
9 LL | |
10 LL | | use foo::BAR as main;
11    | |_____----------------^ consider adding a `main` function to `$DIR/imported_main_const_fn_item_type_forbidden.rs`
12    |       |
13    |       non-function item at `crate::main` is found
14
15 error[E0308]: mismatched types
16   --> $DIR/imported_main_const_fn_item_type_forbidden.rs:10:29
17    |
18 LL |     type MainFn = impl Fn();
19    |                   --------- the expected opaque type
20 ...
21 LL |     pub const BAR: MainFn = bar;
22    |                             ^^^ expected opaque type, found fn item
23    |
24    = note: expected opaque type `impl Fn()`
25                   found fn item `fn() {bar}`
26
27 error: could not find defining uses
28   --> $DIR/imported_main_const_fn_item_type_forbidden.rs:6:19
29    |
30 LL |     type MainFn = impl Fn();
31    |                   ^^^^^^^^^
32
33 error: aborting due to 3 previous errors
34
35 Some errors have detailed explanations: E0308, E0601.
36 For more information about an error, try `rustc --explain E0308`.