Skip to content

Commit 5f0747e

Browse files
committed
fix ui tests
1 parent 21af38c commit 5f0747e

6 files changed

Lines changed: 16 additions & 11 deletions

tests/ui/colon_instead_of_arrow.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ error[E0308]: mismatched types
1313
= note: expected struct `Bar`
1414
found opaque type `impl pinned_init::PinInit<Bar>`
1515
note: function defined here
16-
--> $RUSTC_SRC/library/core/src/ptr/mod.rs:1360:21
16+
--> $RUSTC_SRC/library/core/src/ptr/mod.rs:1484:21
1717
|
18-
1360 | pub const unsafe fn write<T>(dst: *mut T, src: T) {
18+
1484 | pub const unsafe fn write<T>(dst: *mut T, src: T) {
1919
| ^^^^^
2020
= 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)
2121

22-
error: aborting due to previous error
22+
error: aborting due to 1 previous error
2323

2424
For more information about this error, try `rustc --explain E0308`.

tests/ui/missing_pin_data.stderr

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ error[E0599]: no associated item named `__pin_data` found for struct `Foo` in th
1111
= note: the following trait defines an item `__pin_data`, perhaps you need to implement it:
1212
candidate #1: `HasPinData`
1313
= 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)
14+
help: there is an associated function `__init_data` with a similar name
15+
--> $SRC_DIR/src/lib.rs:697:39
16+
|
17+
697| $t$(::<$($generics),*>)?::__init_data()
18+
| ~~~~~~~~~~~
1419

15-
error: aborting due to previous error
20+
error: aborting due to 1 previous error
1621

1722
For more information about this error, try `rustc --explain E0599`.

tests/ui/no_error_coercion.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error[E0277]: `?` couldn't convert the error to `std::alloc::AllocError`
55
18 | | a: Box::new(42),
66
19 | | bar <- init!(Bar { b: 42 }),
77
20 | | })
8-
| |__________^ the trait `From<Infallible>` is not implemented for `std::alloc::AllocError`
8+
| |__________^ the trait `From<Infallible>` is not implemented for `std::alloc::AllocError`, which is required by `Result<Foo::new::__InitOk, std::alloc::AllocError>: FromResidual<Result<Infallible, Infallible>>`
99
|
1010
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
1111
= help: the following other types implement trait `FromResidual<R>`:
@@ -14,6 +14,6 @@ error[E0277]: `?` couldn't convert the error to `std::alloc::AllocError`
1414
= note: required for `Result<Foo::new::__InitOk, std::alloc::AllocError>` to implement `FromResidual<Result<Infallible, Infallible>>`
1515
= 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)
1616

17-
error: aborting due to previous error
17+
error: aborting due to 1 previous error
1818

1919
For more information about this error, try `rustc --explain E0277`.

tests/ui/no_pin_data_but_pinned_drop.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ error[E0277]: the trait bound `Foo: HasPinData` is not satisfied
55
| ^^^ the trait `HasPinData` is not implemented for `Foo`
66
|
77
note: required by a bound in `PinnedDrop`
8-
--> $SRC_DIR/src/lib.rs:1432:30
8+
--> $SRC_DIR/src/lib.rs:1428:30
99
|
10-
1432 | pub unsafe trait PinnedDrop: __internal::HasPinData {
10+
1428 | pub unsafe trait PinnedDrop: __internal::HasPinData {
1111
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PinnedDrop`
1212

13-
error: aborting due to previous error
13+
error: aborting due to 1 previous error
1414

1515
For more information about this error, try `rustc --explain E0277`.

tests/ui/pin_data_but_drop.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ error[E0119]: conflicting implementations of trait `MustNotImplDrop` for type `F
99
|
1010
= 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)
1111

12-
error: aborting due to previous error
12+
error: aborting due to 1 previous error
1313

1414
For more information about this error, try `rustc --explain E0119`.

tests/ui/useless_pinned_drop.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ error[E0119]: conflicting implementations of trait `UselessPinnedDropImpl_you_ne
99
|
1010
= 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)
1111

12-
error: aborting due to previous error
12+
error: aborting due to 1 previous error
1313

1414
For more information about this error, try `rustc --explain E0119`.

0 commit comments

Comments
 (0)