From 5f0747e2d3248569788dfbf40d325aaf3f4e5885 Mon Sep 17 00:00:00 2001 From: y86-dev Date: Tue, 9 Apr 2024 09:29:10 +0200 Subject: [PATCH] fix ui tests --- tests/ui/colon_instead_of_arrow.stderr | 6 +++--- tests/ui/missing_pin_data.stderr | 7 ++++++- tests/ui/no_error_coercion.stderr | 4 ++-- tests/ui/no_pin_data_but_pinned_drop.stderr | 6 +++--- tests/ui/pin_data_but_drop.stderr | 2 +- tests/ui/useless_pinned_drop.stderr | 2 +- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/ui/colon_instead_of_arrow.stderr b/tests/ui/colon_instead_of_arrow.stderr index 197fb33..180cb34 100644 --- a/tests/ui/colon_instead_of_arrow.stderr +++ b/tests/ui/colon_instead_of_arrow.stderr @@ -13,12 +13,12 @@ error[E0308]: mismatched types = note: expected struct `Bar` found opaque type `impl pinned_init::PinInit` note: function defined here - --> $RUSTC_SRC/library/core/src/ptr/mod.rs:1360:21 + --> $RUSTC_SRC/library/core/src/ptr/mod.rs:1484:21 | -1360 | pub const unsafe fn write(dst: *mut T, src: T) { +1484 | pub const unsafe fn write(dst: *mut T, src: T) { | ^^^^^ = note: this error originates in the macro `$crate::try_pin_init` which comes from the expansion of the macro `pin_init` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/missing_pin_data.stderr b/tests/ui/missing_pin_data.stderr index fa285db..e287b66 100644 --- a/tests/ui/missing_pin_data.stderr +++ b/tests/ui/missing_pin_data.stderr @@ -11,7 +11,12 @@ error[E0599]: no associated item named `__pin_data` found for struct `Foo` in th = note: the following trait defines an item `__pin_data`, perhaps you need to implement it: candidate #1: `HasPinData` = note: this error originates in the macro `$crate::try_pin_init` which comes from the expansion of the macro `pin_init` (in Nightly builds, run with -Z macro-backtrace for more info) +help: there is an associated function `__init_data` with a similar name + --> $SRC_DIR/src/lib.rs:697:39 + | +697| $t$(::<$($generics),*>)?::__init_data() + | ~~~~~~~~~~~ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui/no_error_coercion.stderr b/tests/ui/no_error_coercion.stderr index 5fdcc23..1117174 100644 --- a/tests/ui/no_error_coercion.stderr +++ b/tests/ui/no_error_coercion.stderr @@ -5,7 +5,7 @@ error[E0277]: `?` couldn't convert the error to `std::alloc::AllocError` 18 | | a: Box::new(42), 19 | | bar <- init!(Bar { b: 42 }), 20 | | }) - | |__________^ the trait `From` is not implemented for `std::alloc::AllocError` + | |__________^ the trait `From` is not implemented for `std::alloc::AllocError`, which is required by `Result: FromResidual>` | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait = help: the following other types implement trait `FromResidual`: @@ -14,6 +14,6 @@ error[E0277]: `?` couldn't convert the error to `std::alloc::AllocError` = note: required for `Result` to implement `FromResidual>` = note: this error originates in the macro `$crate::try_init` which comes from the expansion of the macro `try_init` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/no_pin_data_but_pinned_drop.stderr b/tests/ui/no_pin_data_but_pinned_drop.stderr index 5875a12..115409d 100644 --- a/tests/ui/no_pin_data_but_pinned_drop.stderr +++ b/tests/ui/no_pin_data_but_pinned_drop.stderr @@ -5,11 +5,11 @@ error[E0277]: the trait bound `Foo: HasPinData` is not satisfied | ^^^ the trait `HasPinData` is not implemented for `Foo` | note: required by a bound in `PinnedDrop` - --> $SRC_DIR/src/lib.rs:1432:30 + --> $SRC_DIR/src/lib.rs:1428:30 | -1432 | pub unsafe trait PinnedDrop: __internal::HasPinData { +1428 | pub unsafe trait PinnedDrop: __internal::HasPinData { | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PinnedDrop` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/pin_data_but_drop.stderr b/tests/ui/pin_data_but_drop.stderr index 4c07f3e..d2b6014 100644 --- a/tests/ui/pin_data_but_drop.stderr +++ b/tests/ui/pin_data_but_drop.stderr @@ -9,6 +9,6 @@ error[E0119]: conflicting implementations of trait `MustNotImplDrop` for type `F | = note: this error originates in the macro `$crate::__pin_data` which comes from the expansion of the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/useless_pinned_drop.stderr b/tests/ui/useless_pinned_drop.stderr index 6c3bc57..2af6994 100644 --- a/tests/ui/useless_pinned_drop.stderr +++ b/tests/ui/useless_pinned_drop.stderr @@ -9,6 +9,6 @@ error[E0119]: conflicting implementations of trait `UselessPinnedDropImpl_you_ne | = note: this error originates in the macro `$crate::__pin_data` which comes from the expansion of the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`.