]> git.proxmox.com Git - rustc.git/blame - src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / entry-point / imported_main_const_fn_item_type_forbidden.stderr
CommitLineData
cdc7bbd5
XL
1error[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 |
4LL | / #![feature(imported_main)]
136023e0 5LL | | #![feature(min_type_alias_impl_trait)]
cdc7bbd5
XL
6LL | | #![allow(incomplete_features)]
7LL | |
8... |
9LL | |
10LL | | 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
136023e0
XL
15error[E0308]: mismatched types
16 --> $DIR/imported_main_const_fn_item_type_forbidden.rs:10:29
17 |
18LL | type MainFn = impl Fn();
19 | --------- the expected opaque type
20...
21LL | 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
27error: could not find defining uses
28 --> $DIR/imported_main_const_fn_item_type_forbidden.rs:6:19
29 |
30LL | type MainFn = impl Fn();
31 | ^^^^^^^^^
32
33error: aborting due to 3 previous errors
cdc7bbd5 34
136023e0
XL
35Some errors have detailed explanations: E0308, E0601.
36For more information about an error, try `rustc --explain E0308`.