From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/c-variadic/issue-32201.stderr | 2 +- tests/ui/c-variadic/issue-86053-2.stderr | 2 +- tests/ui/c-variadic/variadic-ffi-2.stderr | 2 +- tests/ui/c-variadic/variadic-ffi-6.stderr | 13 +++++++++++-- tests/ui/c-variadic/variadic-ffi-no-fixed-args.stderr | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) (limited to 'tests/ui/c-variadic') 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 -- cgit v1.2.3