Skip to content

Commit 9e7f02b

Browse files
Update some UI tests
1 parent 7d76dc9 commit 9e7f02b

7 files changed

+10
-10
lines changed

src/test/ui/impl-trait/trait_type.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fm
1616
LL | fn fmt(&self) -> () { }
1717
| ^^^^^ expected 2 parameters, found 1
1818
|
19-
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> Result<(), std::fmt::Error>`
19+
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::fmt::Result`
2020

2121
error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl
2222
--> $DIR/trait_type.rs:17:4
2323
|
2424
LL | fn fmt() -> () { }
2525
| ^^^^^^^^^^^^^^ expected `&self` in impl
2626
|
27-
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> Result<(), std::fmt::Error>`
27+
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::fmt::Result`
2828

2929
error[E0046]: not all trait items implemented, missing: `fmt`
3030
--> $DIR/trait_type.rs:21:1
3131
|
3232
LL | impl std::fmt::Display for MyType4 {}
3333
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
3434
|
35-
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
35+
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> std::fmt::Result { todo!() }`
3636

3737
error: aborting due to 4 previous errors
3838

src/test/ui/nll/type-alias-free-regions.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: lifetime may not live long enough
44
LL | impl<'a> FromBox<'a> for C<'a> {
55
| -- lifetime `'a` defined here
66
LL | fn from_box(b: Box<B>) -> Self {
7-
| - has type `Box<Box<&'1 isize>>`
7+
| - has type `Box<B<'1>>`
88
LL | C { f: b }
99
| ^^^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
1010

@@ -14,7 +14,7 @@ error: lifetime may not live long enough
1414
LL | impl<'a> FromTuple<'a> for C<'a> {
1515
| -- lifetime `'a` defined here
1616
LL | fn from_tuple(b: (B,)) -> Self {
17-
| - has type `(Box<&'1 isize>,)`
17+
| - has type `(B<'1>,)`
1818
LL | C { f: Box::new(b.0) }
1919
| ^^^^^^^^^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
2020

src/test/ui/privacy/private-in-public-warn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ mod aliases_priv {
247247
//~^ ERROR private trait `PrivTr1` in public interface
248248
//~| WARNING hard error
249249
pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
250-
//~^ ERROR private trait `PrivTr1<Priv2>` in public interface
250+
//~^ ERROR private trait `PrivTr1<aliases_priv::PrivAlias>` in public interface
251251
//~| WARNING hard error
252252
//~| ERROR private type `Priv2` in public interface
253253
//~| WARNING hard error

src/test/ui/privacy/private-in-public-warn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ LL | pub trait Tr1: PrivUseAliasTr {}
291291
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
292292
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
293293

294-
error: private trait `PrivTr1<Priv2>` in public interface (error E0445)
294+
error: private trait `PrivTr1<aliases_priv::PrivAlias>` in public interface (error E0445)
295295
--> $DIR/private-in-public-warn.rs:249:5
296296
|
297297
LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}

src/test/ui/regions/regions-infer-paramd-indirect.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | impl<'a> SetF<'a> for C<'a> {
55
| -- lifetime `'a` defined here
66
...
77
LL | fn set_f_bad(&mut self, b: Box<B>) {
8-
| - has type `Box<Box<&'1 isize>>`
8+
| - has type `Box<B<'1>>`
99
LL | self.f = b;
1010
| ^^^^^^ assignment requires that `'1` must outlive `'a`
1111

src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ error: lifetime may not live long enough
3030
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:15:58
3131
|
3232
LL | fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
33-
| -- ---- has type `Pin<&'1 Foo>` ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
33+
| -- ---- has type `Alias<&'1 Foo>` ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
3434
| |
3535
| lifetime `'a` defined here
3636

src/test/ui/span/impl-wrong-item-for-trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ error[E0046]: not all trait items implemented, missing: `fmt`
5858
LL | impl Debug for FooTypeForMethod {}
5959
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
6060
|
61-
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
61+
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> std::fmt::Result { todo!() }`
6262

6363
error: aborting due to 7 previous errors
6464

0 commit comments

Comments
 (0)