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/c-variadic | |
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 'tests/ui/c-variadic')
-rw-r--r-- | tests/ui/c-variadic/issue-32201.stderr | 2 | ||||
-rw-r--r-- | tests/ui/c-variadic/issue-86053-2.stderr | 2 | ||||
-rw-r--r-- | tests/ui/c-variadic/variadic-ffi-2.stderr | 2 | ||||
-rw-r--r-- | tests/ui/c-variadic/variadic-ffi-6.stderr | 13 | ||||
-rw-r--r-- | tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr | 2 |
5 files changed, 15 insertions, 6 deletions
diff --git a/tests/ui/c-variadic/issue-32201.stderr b/tests/ui/c-variadic/issue-32201.stderr index cedb58784..352db9f62 100644 --- a/tests/ui/c-variadic/issue-32201.stderr +++ b/tests/ui/c-variadic/issue-32201.stderr @@ -4,6 +4,6 @@ error[E0617]: can't pass `fn(*const u8) {bar}` to variadic function LL | foo(0, bar); | ^^^ help: cast the value to `fn(*const u8)`: `bar as fn(*const u8)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0617`. diff --git a/tests/ui/c-variadic/issue-86053-2.stderr b/tests/ui/c-variadic/issue-86053-2.stderr index 815b06e77..2c4be2522 100644 --- a/tests/ui/c-variadic/issue-86053-2.stderr +++ b/tests/ui/c-variadic/issue-86053-2.stderr @@ -11,6 +11,6 @@ note: but the referenced data is only valid for the lifetime `'a` as defined her LL | unsafe extern "C" fn ordering4<'a, F: H<&'static &'a ()>>(_: (), ...) {} | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0491`. diff --git a/tests/ui/c-variadic/variadic-ffi-2.stderr b/tests/ui/c-variadic/variadic-ffi-2.stderr index 8884fc6fb..d0ca7034b 100644 --- a/tests/ui/c-variadic/variadic-ffi-2.stderr +++ b/tests/ui/c-variadic/variadic-ffi-2.stderr @@ -4,6 +4,6 @@ error[E0045]: C-variadic function must have a compatible calling convention, lik LL | fn baz(f: extern "stdcall" fn(usize, ...)) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0045`. diff --git a/tests/ui/c-variadic/variadic-ffi-6.stderr b/tests/ui/c-variadic/variadic-ffi-6.stderr index 4c7792d96..344bfed4b 100644 --- a/tests/ui/c-variadic/variadic-ffi-6.stderr +++ b/tests/ui/c-variadic/variadic-ffi-6.stderr @@ -5,11 +5,20 @@ LL | ) -> &usize { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from -help: consider using the `'static` lifetime +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | ) -> &'static usize { | +++++++ +help: instead, you are more likely to want to change one of the arguments to be borrowed... + | +LL | x: &usize, + | + +help: ...or alternatively, you might want to return an owned value + | +LL - ) -> &usize { +LL + ) -> usize { + | -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0106`. diff --git a/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr b/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr index e11ba43ca..e268ef3fa 100644 --- a/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr +++ b/tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr @@ -4,5 +4,5 @@ error: C-variadic function must be declared with at least one named argument LL | fn foo(...); | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error |