diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/entry-point | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
6 files changed, 19 insertions, 4 deletions
diff --git a/tests/ui/entry-point/imported_main_conflict.stderr b/tests/ui/entry-point/imported_main_conflict.stderr index 8fadd0e19..783e9345a 100644 --- a/tests/ui/entry-point/imported_main_conflict.stderr +++ b/tests/ui/entry-point/imported_main_conflict.stderr @@ -14,6 +14,6 @@ LL | use m2::*; | ^^^^^ = help: consider adding an explicit import of `main` to disambiguate -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0659`. diff --git a/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr b/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr index fabb6ffb0..1e7d82a73 100644 --- a/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr +++ b/tests/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr @@ -6,6 +6,6 @@ LL | use foo::BAR as main; | | | non-function item at `crate::main` is found -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0601`. diff --git a/tests/ui/entry-point/imported_main_const_forbidden.stderr b/tests/ui/entry-point/imported_main_const_forbidden.stderr index 9d8b40dc3..6f34015a2 100644 --- a/tests/ui/entry-point/imported_main_const_forbidden.stderr +++ b/tests/ui/entry-point/imported_main_const_forbidden.stderr @@ -6,6 +6,6 @@ LL | use foo::BAR as main; | | | non-function item at `crate::main` is found -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0601`. diff --git a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr index 3c6893310..ce4a94670 100644 --- a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr +++ b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.stderr @@ -7,6 +7,6 @@ LL | pub fn boilerplate(x: u8) {} = note: expected signature `fn()` found signature `fn(u8)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0580`. diff --git a/tests/ui/entry-point/issue-118772.rs b/tests/ui/entry-point/issue-118772.rs new file mode 100644 index 000000000..1a4173e12 --- /dev/null +++ b/tests/ui/entry-point/issue-118772.rs @@ -0,0 +1,3 @@ +fn main(_: &i32) { //~ ERROR `main` function has wrong type + println!("Hello, world!"); +} diff --git a/tests/ui/entry-point/issue-118772.stderr b/tests/ui/entry-point/issue-118772.stderr new file mode 100644 index 000000000..cc33427f5 --- /dev/null +++ b/tests/ui/entry-point/issue-118772.stderr @@ -0,0 +1,12 @@ +error[E0580]: `main` function has wrong type + --> $DIR/issue-118772.rs:1:1 + | +LL | fn main(_: &i32) { + | ^^^^^^^^^^^^^^^^ incorrect number of function parameters + | + = note: expected signature `fn()` + found signature `for<'a> fn(&'a i32)` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0580`. |