diff options
| author | Eduardo Sánchez Muñoz <eduardosm-dev@e64.io> | 2023-09-19 21:15:58 +0200 |
|---|---|---|
| committer | Eduardo Sánchez Muñoz <eduardosm-dev@e64.io> | 2023-09-19 21:15:58 +0200 |
| commit | 85d61b01aea90d9201c35c4bd61a508c72807c92 (patch) | |
| tree | 42aa6d4d278e7545f9d084e0fa6241da8ddad4bd /tests | |
| parent | c599761140ed1e3824a10d556395f178617e076a (diff) | |
| download | rust-85d61b01aea90d9201c35c4bd61a508c72807c92.tar.gz rust-85d61b01aea90d9201c35c4bd61a508c72807c92.zip | |
wrap fn sig binders in fn ptr
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/panic-handler/panic-handler-bad-signature-2.stderr | 12 | ||||
| -rw-r--r-- | tests/ui/panic-handler/panic-handler-bad-signature-5.stderr | 12 |
2 files changed, 6 insertions, 18 deletions
diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr b/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr index 37c737d974d..06e32d5fb84 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr +++ b/tests/ui/panic-handler/panic-handler-bad-signature-2.stderr @@ -2,16 +2,10 @@ error[E0308]: `#[panic_handler]` function has wrong type --> $DIR/panic-handler-bad-signature-2.rs:9:1 | LL | fn panic(info: &'static PanicInfo) -> ! - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | - = note: expected signature `fn(&PanicInfo<'_>) -> _` - found signature `fn(&'static PanicInfo<'_>) -> _` -note: the anonymous lifetime as defined here... - --> $DIR/panic-handler-bad-signature-2.rs:9:1 - | -LL | fn panic(info: &'static PanicInfo) -> ! - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: ...does not necessarily outlive the static lifetime + = note: expected fn pointer `for<'a, 'b> fn(&'a PanicInfo<'b>) -> _` + found fn pointer `for<'a> fn(&'static PanicInfo<'a>) -> _` error: aborting due to previous error diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr b/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr index 2745c05834c..22b8d5ca811 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr +++ b/tests/ui/panic-handler/panic-handler-bad-signature-5.stderr @@ -2,16 +2,10 @@ error[E0308]: `#[panic_handler]` function has wrong type --> $DIR/panic-handler-bad-signature-5.rs:9:1 | LL | fn panic(info: &PanicInfo<'static>) -> ! - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | - = note: expected signature `fn(&PanicInfo<'_>) -> _` - found signature `fn(&PanicInfo<'static>) -> _` -note: the anonymous lifetime as defined here... - --> $DIR/panic-handler-bad-signature-5.rs:9:1 - | -LL | fn panic(info: &PanicInfo<'static>) -> ! - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: ...does not necessarily outlive the static lifetime + = note: expected fn pointer `for<'a, 'b> fn(&'a PanicInfo<'b>) -> _` + found fn pointer `for<'a> fn(&'a PanicInfo<'static>) -> _` error: aborting due to previous error |
