Skip to content

Commit 0a096a0

Browse files
bless tests
1 parent 067945f commit 0a096a0

File tree

8 files changed

+38
-37
lines changed

8 files changed

+38
-37
lines changed

Diff for: src/test/ui/associated-types/issue-59324.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ pub trait ThriftService<Bug: NotFoo>:
1515
{
1616
fn get_service(
1717
//~^ ERROR the trait bound `Bug: Foo` is not satisfied
18+
//~| ERROR the trait bound `Bug: Foo` is not satisfied
1819
&self,
1920
) -> Self::AssocType;
20-
//~^ the trait bound `Bug: Foo` is not satisfied
2121
}
2222

2323
fn with_factory<H>(factory: dyn ThriftService<()>) {}

Diff for: src/test/ui/associated-types/issue-59324.stderr

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | |
66
LL | |
77
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
88
... |
9-
LL | |
9+
LL | | ) -> Self::AssocType;
1010
LL | | }
1111
| |_^ the trait `Foo` is not implemented for `Bug`
1212
|
@@ -23,7 +23,7 @@ LL | |
2323
LL | |
2424
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
2525
... |
26-
LL | |
26+
LL | | ) -> Self::AssocType;
2727
LL | | }
2828
| |_^ the trait `Foo` is not implemented for `Bug`
2929
|
@@ -37,6 +37,7 @@ error[E0277]: the trait bound `Bug: Foo` is not satisfied
3737
|
3838
LL | / fn get_service(
3939
LL | |
40+
LL | |
4041
LL | | &self,
4142
LL | | ) -> Self::AssocType;
4243
| |_________________________^ the trait `Foo` is not implemented for `Bug`
@@ -47,10 +48,10 @@ LL | pub trait ThriftService<Bug: NotFoo + Foo>:
4748
| +++++
4849

4950
error[E0277]: the trait bound `Bug: Foo` is not satisfied
50-
--> $DIR/issue-59324.rs:19:10
51+
--> $DIR/issue-59324.rs:16:8
5152
|
52-
LL | ) -> Self::AssocType;
53-
| ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bug`
53+
LL | fn get_service(
54+
| ^^^^^^^^^^^ the trait `Foo` is not implemented for `Bug`
5455
|
5556
help: consider further restricting this bound
5657
|

Diff for: src/test/ui/generic-associated-types/issue-91139.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
// revisions: migrate nll
2-
//[nll]compile-flags: -Z borrowck=mir
3-
4-
// Since we are testing nll (and migration) explicitly as a separate
5-
// revisions, don't worry about the --compare-mode=nll on this test.
6-
7-
// ignore-compare-mode-nll
8-
9-
//[nll] check-pass
10-
//[migrate] check-fail
1+
// check-pass
112

123
#![feature(generic_associated_types)]
134

@@ -25,7 +16,6 @@ impl<T> Foo<T> for () {
2516

2617
fn foo<T>() {
2718
let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
28-
//[migrate]~^ the parameter type `T` may not live long enough
2919
}
3020

3121
pub fn main() {}

Diff for: src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-85455.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ trait SomeTrait<'a> {
77
fn give_me_ice<T>() {
88
callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
99
//~^ ERROR the trait bound `T: SomeTrait<'_>` is not satisfied [E0277]
10-
//~| ERROR the trait bound `T: SomeTrait<'_>` is not satisfied [E0277]
1110
}
1211

1312
fn callee<T: Fn<(&'static (),)>>() {

Diff for: src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-85455.stderr

+1-12
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@ help: consider restricting type parameter `T`
99
LL | fn give_me_ice<T: SomeTrait<'_>>() {
1010
| +++++++++++++++
1111

12-
error[E0277]: the trait bound `T: SomeTrait<'_>` is not satisfied
13-
--> $DIR/issue-85455.rs:8:14
14-
|
15-
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SomeTrait<'_>` is not implemented for `T`
17-
|
18-
help: consider restricting type parameter `T`
19-
|
20-
LL | fn give_me_ice<T: SomeTrait<'_>>() {
21-
| +++++++++++++++
22-
23-
error: aborting due to 2 previous errors
12+
error: aborting due to previous error
2413

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

Diff for: src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ note: previous use here
1010
LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

13-
error[E0277]: the trait bound `A: Foo` is not satisfied
13+
error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
1414
--> $DIR/generic_duplicate_param_use9.rs:7:18
1515
|
1616
LL | type Two<A, B> = impl Debug;
17-
| ^^^^^^^^^^ the trait `Foo` is not implemented for `A`
17+
| ^^^^^^^^^^ within `(A, B, <A as Foo>::Bar)`, the trait `Foo` is not implemented for `A`
1818
|
19+
= note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
1920
help: consider restricting type parameter `A`
2021
|
2122
LL | type Two<A: Foo, B> = impl Debug;
@@ -27,7 +28,7 @@ error[E0277]: `A` doesn't implement `Debug`
2728
LL | type Two<A, B> = impl Debug;
2829
| ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug`
2930
|
30-
= note: required because of the requirements on the impl of `Debug` for `(A, B, _)`
31+
= note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
3132
help: consider restricting type parameter `A`
3233
|
3334
LL | type Two<A: std::fmt::Debug, B> = impl Debug;
@@ -39,7 +40,7 @@ error[E0277]: `B` doesn't implement `Debug`
3940
LL | type Two<A, B> = impl Debug;
4041
| ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug`
4142
|
42-
= note: required because of the requirements on the impl of `Debug` for `(A, B, _)`
43+
= note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
4344
help: consider restricting type parameter `B`
4445
|
4546
LL | type Two<A, B: std::fmt::Debug> = impl Debug;

Diff for: src/test/ui/type-alias-impl-trait/issue-89686.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
use std::future::Future;
66

77
type G<'a, T> = impl Future<Output = ()>;
8-
//~^ ERROR: the trait bound `T: Trait` is not satisfied
8+
//~^ ERROR <impl Future<Output = [async output]> as Future>::Output == ()
9+
//~| ERROR the trait bound `T: Trait` is not satisfied
910

1011
trait Trait {
1112
type F: Future<Output = ()>;

Diff for: src/test/ui/type-alias-impl-trait/issue-89686.stderr

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
error[E0271]: type mismatch resolving `<impl Future<Output = [async output]> as Future>::Output == ()`
2+
--> $DIR/issue-89686.rs:7:17
3+
|
4+
LL | type G<'a, T> = impl Future<Output = ()>;
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
6+
...
7+
LL | async move { self.f().await }
8+
| ------------------ the found `async` block
9+
|
10+
::: $SRC_DIR/core/src/future/mod.rs:LL:COL
11+
|
12+
LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
13+
| ------------------------------- the found opaque type
14+
|
15+
= note: expected unit type `()`
16+
found associated type `<impl Future<Output = [async output]> as Future>::Output`
17+
= help: consider constraining the associated type `<impl Future<Output = [async output]> as Future>::Output` to `()`
18+
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
19+
120
error[E0277]: the trait bound `T: Trait` is not satisfied
221
--> $DIR/issue-89686.rs:7:17
322
|
@@ -9,6 +28,7 @@ help: consider restricting type parameter `T`
928
LL | type G<'a, T: Trait> = impl Future<Output = ()>;
1029
| +++++++
1130

12-
error: aborting due to previous error
31+
error: aborting due to 2 previous errors
1332

14-
For more information about this error, try `rustc --explain E0277`.
33+
Some errors have detailed explanations: E0271, E0277.
34+
For more information about an error, try `rustc --explain E0271`.

0 commit comments

Comments
 (0)