diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/lang-items/fn-fn_mut-call-ill-formed.rs (renamed from src/test/ui/lang-items/fn-fn_mut-call-ill-formed.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/fn-fn_mut-call-ill-formed.stderr (renamed from src/test/ui/lang-items/fn-fn_mut-call-ill-formed.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-19660.rs (renamed from src/test/ui/lang-items/issue-19660.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-19660.stderr (renamed from src/test/ui/lang-items/issue-19660.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-31076.rs (renamed from src/test/ui/lang-items/issue-31076.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-31076.stderr (renamed from src/test/ui/lang-items/issue-31076.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-83471.rs (renamed from src/test/ui/lang-items/issue-83471.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-83471.stderr (renamed from src/test/ui/lang-items/issue-83471.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-86238.rs (renamed from src/test/ui/lang-items/issue-86238.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-86238.stderr (renamed from src/test/ui/lang-items/issue-86238.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-87573.rs (renamed from src/test/ui/lang-items/issue-87573.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/issue-87573.stderr (renamed from src/test/ui/lang-items/issue-87573.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/lang-item-generic-requirements.rs (renamed from src/test/ui/lang-items/lang-item-generic-requirements.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/lang-item-generic-requirements.stderr (renamed from src/test/ui/lang-items/lang-item-generic-requirements.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/lang-item-missing-generator.rs (renamed from src/test/ui/lang-items/lang-item-missing-generator.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/lang-item-missing-generator.stderr (renamed from src/test/ui/lang-items/lang-item-missing-generator.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/lang-item-missing.rs (renamed from src/test/ui/lang-items/lang-item-missing.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/lang-item-missing.stderr (renamed from src/test/ui/lang-items/lang-item-missing.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/missing-clone-for-suggestion.rs (renamed from src/test/ui/lang-items/missing-clone-for-suggestion.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/missing-clone-for-suggestion.stderr (renamed from src/test/ui/lang-items/missing-clone-for-suggestion.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/no_owned_box_lang_item.rs (renamed from src/test/ui/lang-items/no_owned_box_lang_item.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/no_owned_box_lang_item.stderr (renamed from src/test/ui/lang-items/no_owned_box_lang_item.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/required-lang-item.rs (renamed from src/test/ui/lang-items/required-lang-item.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/required-lang-item.stderr (renamed from src/test/ui/lang-items/required-lang-item.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.argc.stderr | 8 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.argv.stderr | 8 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr | 13 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.main_args.stderr | 13 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.main_ret.stderr | 13 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.main_ty.stderr | 8 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr | 11 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.missing_ret.stderr | 8 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr | 11 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.rs | 101 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.sigpipe.stderr | 8 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.start_ret.stderr | 8 | ||||
-rw-r--r-- | tests/ui/lang-items/start_lang_item_args.too_many_args.stderr | 17 |
37 files changed, 227 insertions, 0 deletions
diff --git a/src/test/ui/lang-items/fn-fn_mut-call-ill-formed.rs b/tests/ui/lang-items/fn-fn_mut-call-ill-formed.rs index 52bd8136d..52bd8136d 100644 --- a/src/test/ui/lang-items/fn-fn_mut-call-ill-formed.rs +++ b/tests/ui/lang-items/fn-fn_mut-call-ill-formed.rs diff --git a/src/test/ui/lang-items/fn-fn_mut-call-ill-formed.stderr b/tests/ui/lang-items/fn-fn_mut-call-ill-formed.stderr index 82bdae270..82bdae270 100644 --- a/src/test/ui/lang-items/fn-fn_mut-call-ill-formed.stderr +++ b/tests/ui/lang-items/fn-fn_mut-call-ill-formed.stderr diff --git a/src/test/ui/lang-items/issue-19660.rs b/tests/ui/lang-items/issue-19660.rs index 400ac310b..400ac310b 100644 --- a/src/test/ui/lang-items/issue-19660.rs +++ b/tests/ui/lang-items/issue-19660.rs diff --git a/src/test/ui/lang-items/issue-19660.stderr b/tests/ui/lang-items/issue-19660.stderr index f5d903f38..f5d903f38 100644 --- a/src/test/ui/lang-items/issue-19660.stderr +++ b/tests/ui/lang-items/issue-19660.stderr diff --git a/src/test/ui/lang-items/issue-31076.rs b/tests/ui/lang-items/issue-31076.rs index cdb196d4f..cdb196d4f 100644 --- a/src/test/ui/lang-items/issue-31076.rs +++ b/tests/ui/lang-items/issue-31076.rs diff --git a/src/test/ui/lang-items/issue-31076.stderr b/tests/ui/lang-items/issue-31076.stderr index ac0d9dc75..ac0d9dc75 100644 --- a/src/test/ui/lang-items/issue-31076.stderr +++ b/tests/ui/lang-items/issue-31076.stderr diff --git a/src/test/ui/lang-items/issue-83471.rs b/tests/ui/lang-items/issue-83471.rs index b32aa0341..b32aa0341 100644 --- a/src/test/ui/lang-items/issue-83471.rs +++ b/tests/ui/lang-items/issue-83471.rs diff --git a/src/test/ui/lang-items/issue-83471.stderr b/tests/ui/lang-items/issue-83471.stderr index b315df179..b315df179 100644 --- a/src/test/ui/lang-items/issue-83471.stderr +++ b/tests/ui/lang-items/issue-83471.stderr diff --git a/src/test/ui/lang-items/issue-86238.rs b/tests/ui/lang-items/issue-86238.rs index 509f94f38..509f94f38 100644 --- a/src/test/ui/lang-items/issue-86238.rs +++ b/tests/ui/lang-items/issue-86238.rs diff --git a/src/test/ui/lang-items/issue-86238.stderr b/tests/ui/lang-items/issue-86238.stderr index 767e6de22..767e6de22 100644 --- a/src/test/ui/lang-items/issue-86238.stderr +++ b/tests/ui/lang-items/issue-86238.stderr diff --git a/src/test/ui/lang-items/issue-87573.rs b/tests/ui/lang-items/issue-87573.rs index aeb0c245a..aeb0c245a 100644 --- a/src/test/ui/lang-items/issue-87573.rs +++ b/tests/ui/lang-items/issue-87573.rs diff --git a/src/test/ui/lang-items/issue-87573.stderr b/tests/ui/lang-items/issue-87573.stderr index 25560cfa0..25560cfa0 100644 --- a/src/test/ui/lang-items/issue-87573.stderr +++ b/tests/ui/lang-items/issue-87573.stderr diff --git a/src/test/ui/lang-items/lang-item-generic-requirements.rs b/tests/ui/lang-items/lang-item-generic-requirements.rs index 3d33adf68..3d33adf68 100644 --- a/src/test/ui/lang-items/lang-item-generic-requirements.rs +++ b/tests/ui/lang-items/lang-item-generic-requirements.rs diff --git a/src/test/ui/lang-items/lang-item-generic-requirements.stderr b/tests/ui/lang-items/lang-item-generic-requirements.stderr index 4d349a25f..4d349a25f 100644 --- a/src/test/ui/lang-items/lang-item-generic-requirements.stderr +++ b/tests/ui/lang-items/lang-item-generic-requirements.stderr diff --git a/src/test/ui/lang-items/lang-item-missing-generator.rs b/tests/ui/lang-items/lang-item-missing-generator.rs index 9b9aff38e..9b9aff38e 100644 --- a/src/test/ui/lang-items/lang-item-missing-generator.rs +++ b/tests/ui/lang-items/lang-item-missing-generator.rs diff --git a/src/test/ui/lang-items/lang-item-missing-generator.stderr b/tests/ui/lang-items/lang-item-missing-generator.stderr index a24fdb5fb..a24fdb5fb 100644 --- a/src/test/ui/lang-items/lang-item-missing-generator.stderr +++ b/tests/ui/lang-items/lang-item-missing-generator.stderr diff --git a/src/test/ui/lang-items/lang-item-missing.rs b/tests/ui/lang-items/lang-item-missing.rs index 4e2634324..4e2634324 100644 --- a/src/test/ui/lang-items/lang-item-missing.rs +++ b/tests/ui/lang-items/lang-item-missing.rs diff --git a/src/test/ui/lang-items/lang-item-missing.stderr b/tests/ui/lang-items/lang-item-missing.stderr index f7516c7d3..f7516c7d3 100644 --- a/src/test/ui/lang-items/lang-item-missing.stderr +++ b/tests/ui/lang-items/lang-item-missing.stderr diff --git a/src/test/ui/lang-items/missing-clone-for-suggestion.rs b/tests/ui/lang-items/missing-clone-for-suggestion.rs index e8290c009..e8290c009 100644 --- a/src/test/ui/lang-items/missing-clone-for-suggestion.rs +++ b/tests/ui/lang-items/missing-clone-for-suggestion.rs diff --git a/src/test/ui/lang-items/missing-clone-for-suggestion.stderr b/tests/ui/lang-items/missing-clone-for-suggestion.stderr index 35783a1be..35783a1be 100644 --- a/src/test/ui/lang-items/missing-clone-for-suggestion.stderr +++ b/tests/ui/lang-items/missing-clone-for-suggestion.stderr diff --git a/src/test/ui/lang-items/no_owned_box_lang_item.rs b/tests/ui/lang-items/no_owned_box_lang_item.rs index c22b44ffc..c22b44ffc 100644 --- a/src/test/ui/lang-items/no_owned_box_lang_item.rs +++ b/tests/ui/lang-items/no_owned_box_lang_item.rs diff --git a/src/test/ui/lang-items/no_owned_box_lang_item.stderr b/tests/ui/lang-items/no_owned_box_lang_item.stderr index c55c246b5..c55c246b5 100644 --- a/src/test/ui/lang-items/no_owned_box_lang_item.stderr +++ b/tests/ui/lang-items/no_owned_box_lang_item.stderr diff --git a/src/test/ui/lang-items/required-lang-item.rs b/tests/ui/lang-items/required-lang-item.rs index 3b17c5b72..3b17c5b72 100644 --- a/src/test/ui/lang-items/required-lang-item.rs +++ b/tests/ui/lang-items/required-lang-item.rs diff --git a/src/test/ui/lang-items/required-lang-item.stderr b/tests/ui/lang-items/required-lang-item.stderr index 83764a91a..83764a91a 100644 --- a/src/test/ui/lang-items/required-lang-item.stderr +++ b/tests/ui/lang-items/required-lang-item.stderr diff --git a/tests/ui/lang-items/start_lang_item_args.argc.stderr b/tests/ui/lang-items/start_lang_item_args.argc.stderr new file mode 100644 index 000000000..65c99a93c --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.argc.stderr @@ -0,0 +1,8 @@ +error: parameter 2 of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:75:38 + | +LL | fn start<T>(_main: fn() -> T, _argc: i8, _argv: *const *const u8, _sigpipe: u8) -> isize { + | ^^ help: change the type from `i8` to `isize` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.argv.stderr b/tests/ui/lang-items/start_lang_item_args.argv.stderr new file mode 100644 index 000000000..f0947a9b3 --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.argv.stderr @@ -0,0 +1,8 @@ +error: parameter 3 of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:89:52 + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: u8, _sigpipe: u8) -> isize { + | ^^ help: change the type from `u8` to `*const *const u8` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr b/tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr new file mode 100644 index 000000000..08efd5088 --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.argv_inner_ptr.stderr @@ -0,0 +1,13 @@ +error: parameter 3 of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:82:52 + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const usize, _sigpipe: u8) -> isize { + | ^^^^^^^^^^^^^^^^^^^ + | +help: change the type from `*const *const usize` to `*const *const u8` + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + | ~~~~~~~~~~~~~~~~ + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.main_args.stderr b/tests/ui/lang-items/start_lang_item_args.main_args.stderr new file mode 100644 index 000000000..c20a74466 --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.main_args.stderr @@ -0,0 +1,13 @@ +error: parameter 1 of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:61:20 + | +LL | fn start<T>(_main: fn(i32) -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + | ^^^^^^^^^^^^ + | +help: change the type from `fn(i32) -> T` to `fn() -> T` + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + | ~~~~~~~~~ + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.main_ret.stderr b/tests/ui/lang-items/start_lang_item_args.main_ret.stderr new file mode 100644 index 000000000..8f967252f --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.main_ret.stderr @@ -0,0 +1,13 @@ +error: parameter 1 of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:68:20 + | +LL | fn start<T>(_main: fn() -> u16, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + | ^^^^^^^^^^^ + | +help: change the type from `fn() -> u16` to `fn() -> T` + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + | ~~~~~~~~~ + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.main_ty.stderr b/tests/ui/lang-items/start_lang_item_args.main_ty.stderr new file mode 100644 index 000000000..deb37b868 --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.main_ty.stderr @@ -0,0 +1,8 @@ +error: parameter 1 of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:54:20 + | +LL | fn start<T>(_main: u64, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + | ^^^ help: change the type from `u64` to `fn() -> T` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr b/tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr new file mode 100644 index 000000000..004c2a67f --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.missing_all_args.stderr @@ -0,0 +1,11 @@ +error: incorrect number of parameters for the `start` lang item + --> $DIR/start_lang_item_args.rs:15:1 + | +LL | fn start<T>() -> isize { + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the `start` lang item should have four parameters, but found 0 + = note: the `start` lang item should have the signature `fn(fn() -> T, isize, *const *const u8, u8) -> isize` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.missing_ret.stderr b/tests/ui/lang-items/start_lang_item_args.missing_ret.stderr new file mode 100644 index 000000000..1d8285b59 --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.missing_ret.stderr @@ -0,0 +1,8 @@ +error: the return type of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:29:84 + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) {} + | ^ help: change the type from `()` to `isize` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr b/tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr new file mode 100644 index 000000000..e545a750f --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.missing_sigpipe_arg.stderr @@ -0,0 +1,11 @@ +error: incorrect number of parameters for the `start` lang item + --> $DIR/start_lang_item_args.rs:22:1 + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the `start` lang item should have four parameters, but found 3 + = note: the `start` lang item should have the signature `fn(fn() -> T, isize, *const *const u8, u8) -> isize` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.rs b/tests/ui/lang-items/start_lang_item_args.rs new file mode 100644 index 000000000..0dbfba39c --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.rs @@ -0,0 +1,101 @@ +// check-fail +// revisions: missing_all_args missing_sigpipe_arg missing_ret start_ret too_many_args +// revisions: main_ty main_args main_ret argc argv_inner_ptr argv sigpipe + +#![feature(lang_items, no_core)] +#![no_core] + +#[lang = "copy"] +pub trait Copy {} +#[lang = "sized"] +pub trait Sized {} + +#[cfg(missing_all_args)] +#[lang = "start"] +fn start<T>() -> isize { + //[missing_all_args]~^ ERROR incorrect number of parameters + 100 +} + +#[cfg(missing_sigpipe_arg)] +#[lang = "start"] +fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize { + //[missing_sigpipe_arg]~^ ERROR incorrect number of parameters + 100 +} + +#[cfg(missing_ret)] +#[lang = "start"] +fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) {} +//[missing_ret]~^ ERROR the return type of the `start` lang item is incorrect + +#[cfg(start_ret)] +#[lang = "start"] +fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> u8 { + //[start_ret]~^ ERROR the return type of the `start` lang item is incorrect + 100 +} + +#[cfg(too_many_args)] +#[lang = "start"] +fn start<T>( + //[too_many_args]~^ ERROR incorrect number of parameters + _main: fn() -> T, + _argc: isize, + _argv: *const *const u8, + _sigpipe: u8, + _extra_arg: (), +) -> isize { + 100 +} + +#[cfg(main_ty)] +#[lang = "start"] +fn start<T>(_main: u64, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + //[main_ty]~^ ERROR parameter 1 of the `start` lang item is incorrect + 100 +} + +#[cfg(main_args)] +#[lang = "start"] +fn start<T>(_main: fn(i32) -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + //[main_args]~^ ERROR parameter 1 of the `start` lang item is incorrect + 100 +} + +#[cfg(main_ret)] +#[lang = "start"] +fn start<T>(_main: fn() -> u16, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { + //[main_ret]~^ ERROR parameter 1 of the `start` lang item is incorrect + 100 +} + +#[cfg(argc)] +#[lang = "start"] +fn start<T>(_main: fn() -> T, _argc: i8, _argv: *const *const u8, _sigpipe: u8) -> isize { + //[argc]~^ ERROR parameter 2 of the `start` lang item is incorrect + 100 +} + +#[cfg(argv_inner_ptr)] +#[lang = "start"] +fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const usize, _sigpipe: u8) -> isize { + //[argv_inner_ptr]~^ ERROR parameter 3 of the `start` lang item is incorrect + 100 +} + +#[cfg(argv)] +#[lang = "start"] +fn start<T>(_main: fn() -> T, _argc: isize, _argv: u8, _sigpipe: u8) -> isize { + //[argv]~^ ERROR parameter 3 of the `start` lang item is incorrect + 100 +} + +#[cfg(sigpipe)] +#[lang = "start"] +fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: i64) -> isize { + //[sigpipe]~^ ERROR parameter 4 of the `start` lang item is incorrect + 100 +} + +fn main() {} diff --git a/tests/ui/lang-items/start_lang_item_args.sigpipe.stderr b/tests/ui/lang-items/start_lang_item_args.sigpipe.stderr new file mode 100644 index 000000000..b20ae3128 --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.sigpipe.stderr @@ -0,0 +1,8 @@ +error: parameter 4 of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:96:80 + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: i64) -> isize { + | ^^^ help: change the type from `i64` to `u8` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.start_ret.stderr b/tests/ui/lang-items/start_lang_item_args.start_ret.stderr new file mode 100644 index 000000000..935d5f3c8 --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.start_ret.stderr @@ -0,0 +1,8 @@ +error: the return type of the `start` lang item is incorrect + --> $DIR/start_lang_item_args.rs:34:87 + | +LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> u8 { + | ^^ help: change the type from `u8` to `isize` + +error: aborting due to previous error + diff --git a/tests/ui/lang-items/start_lang_item_args.too_many_args.stderr b/tests/ui/lang-items/start_lang_item_args.too_many_args.stderr new file mode 100644 index 000000000..30a7ed18a --- /dev/null +++ b/tests/ui/lang-items/start_lang_item_args.too_many_args.stderr @@ -0,0 +1,17 @@ +error: incorrect number of parameters for the `start` lang item + --> $DIR/start_lang_item_args.rs:41:1 + | +LL | / fn start<T>( +LL | | +LL | | _main: fn() -> T, +LL | | _argc: isize, +... | +LL | | _extra_arg: (), +LL | | ) -> isize { + | |__________^ + | + = note: the `start` lang item should have four parameters, but found 5 + = note: the `start` lang item should have the signature `fn(fn() -> T, isize, *const *const u8, u8) -> isize` + +error: aborting due to previous error + |