diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:43 +0000 |
commit | 3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245 (patch) | |
tree | daf049b282ab10e8c3d03e409b3cd84ff3f7690c /tests/ui/c-variadic | |
parent | Adding debian version 1.68.2+dfsg1-1. (diff) | |
download | rustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.tar.xz rustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.zip |
Merging upstream version 1.69.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/variadic-ffi-1.stderr | 2 | ||||
-rw-r--r-- | tests/ui/c-variadic/variadic-ffi-4.stderr | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/c-variadic/variadic-ffi-1.stderr b/tests/ui/c-variadic/variadic-ffi-1.stderr index 4beea83d8..c78993381 100644 --- a/tests/ui/c-variadic/variadic-ffi-1.stderr +++ b/tests/ui/c-variadic/variadic-ffi-1.stderr @@ -46,6 +46,7 @@ LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; | = note: expected fn pointer `unsafe extern "C" fn(_, _)` found fn item `unsafe extern "C" fn(_, _, ...) {foo}` + = note: when the arguments and return types match, functions can be coerced to function pointers error[E0308]: mismatched types --> $DIR/variadic-ffi-1.rs:26:54 @@ -57,6 +58,7 @@ LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; | = note: expected fn pointer `extern "C" fn(_, _, ...)` found fn item `extern "C" fn(_, _) {bar}` + = note: when the arguments and return types match, functions can be coerced to function pointers error[E0617]: can't pass `f32` to variadic function --> $DIR/variadic-ffi-1.rs:28:19 diff --git a/tests/ui/c-variadic/variadic-ffi-4.stderr b/tests/ui/c-variadic/variadic-ffi-4.stderr index 6f8e53298..c9d90d73d 100644 --- a/tests/ui/c-variadic/variadic-ffi-4.stderr +++ b/tests/ui/c-variadic/variadic-ffi-4.stderr @@ -107,7 +107,9 @@ error[E0597]: `ap1` does not live long enough --> $DIR/variadic-ffi-4.rs:28:11 | LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { - | - let's call the lifetime of this reference `'3` + | - ------- binding `ap1` declared here + | | + | let's call the lifetime of this reference `'3` LL | ap0 = &mut ap1; | ------^^^^^^^^ | | | |