Skip to content

Commit 02a7ec4

Browse files
committed
Update tests to adopt #107295
1 parent 77a1a64 commit 02a7ec4

37 files changed

+345
-0
lines changed

tests/ui/associated-types/issue-26262.stderr

+16
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,28 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T: Tr> S<T::Assoc> {
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter T, or make use of it, for example
8+
|
9+
LL - impl<T: Tr> S<T::Assoc> {
10+
LL + impl S<T::Assoc> {
11+
|
12+
LL | impl<T: Tr> S<T::Assoc, T> {
13+
| +++
614

715
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
816
--> $DIR/issue-26262.rs:17:6
917
|
1018
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
1119
| ^^ unconstrained lifetime parameter
20+
|
21+
help: either remove the type parameter 'a, or make use of it, for example
22+
|
23+
LL - impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
24+
LL + impl<T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
25+
|
26+
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T<'a> {
27+
| ++++
1228

1329
error: aborting due to 2 previous errors
1430

tests/ui/async-await/in-trait/unconstrained-impl-region.stderr

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
33
|
44
LL | impl<'a> Actor for () {
55
| ^^ unconstrained lifetime parameter
6+
|
7+
help: either remove the type parameter 'a, or make use of it, for example
8+
|
9+
LL - impl<'a> Actor for () {
10+
LL + impl Actor for () {
11+
|
612

713
error: aborting due to 1 previous error
814

tests/ui/async-await/issues/issue-78654.full.stderr

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ LL | impl<const H: feature> Foo {
1212
|
1313
= note: expressions using a const parameter must map each value to a distinct output value
1414
= note: proving the result of expressions other than the parameter are unique is not supported
15+
help: either remove the type parameter H, or make use of it, for example
16+
|
17+
LL - impl<const H: feature> Foo {
18+
LL + impl Foo {
19+
|
20+
LL | impl<const H: feature> Foo<H> {
21+
| +++
1522

1623
error: aborting due to 2 previous errors
1724

tests/ui/async-await/issues/issue-78654.min.stderr

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ LL | impl<const H: feature> Foo {
1212
|
1313
= note: expressions using a const parameter must map each value to a distinct output value
1414
= note: proving the result of expressions other than the parameter are unique is not supported
15+
help: either remove the type parameter H, or make use of it, for example
16+
|
17+
LL - impl<const H: feature> Foo {
18+
LL + impl Foo {
19+
|
20+
LL | impl<const H: feature> Foo<H> {
21+
| +++
1522

1623
error: aborting due to 2 previous errors
1724

tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ LL | impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
2525
|
2626
= note: expressions using a const parameter must map each value to a distinct output value
2727
= note: proving the result of expressions other than the parameter are unique is not supported
28+
help: either remove the type parameter NUM, or make use of it, for example
29+
|
30+
LL - impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
31+
LL + impl<'a> std::ops::Add<&'a Foo> for Foo
32+
|
33+
LL | impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo<NUM>
34+
| +++++
2835

2936
error[E0284]: type annotations needed
3037
--> $DIR/post-analysis-user-facing-param-env.rs:11:40

tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr

+7
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ LL | impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
5454
|
5555
= note: expressions using a const parameter must map each value to a distinct output value
5656
= note: proving the result of expressions other than the parameter are unique is not supported
57+
help: either remove the type parameter N, or make use of it, for example
58+
|
59+
LL - impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
60+
LL + impl<'a, T> Iterator for ConstChunksExact<'a, T, {}> {
61+
|
62+
LL | impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}, N> {
63+
| +++
5764

5865
error[E0308]: mismatched types
5966
--> $DIR/ice-unexpected-inference-var-122549.rs:15:66

tests/ui/const-generics/issues/issue-68366.full.stderr

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ LL | impl <const N: usize> Collatz<{Some(N)}> {}
1818
|
1919
= note: expressions using a const parameter must map each value to a distinct output value
2020
= note: proving the result of expressions other than the parameter are unique is not supported
21+
help: either remove the type parameter N, or make use of it, for example
22+
|
23+
LL - impl <const N: usize> Collatz<{Some(N)}> {}
24+
LL + impl Collatz<{Some(N)}> {}
25+
|
26+
LL | impl <const N: usize> Collatz<{Some(N)}, N> {}
27+
| +++
2128

2229
error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
2330
--> $DIR/issue-68366.rs:19:6
@@ -27,6 +34,13 @@ LL | impl<const N: usize> Foo {}
2734
|
2835
= note: expressions using a const parameter must map each value to a distinct output value
2936
= note: proving the result of expressions other than the parameter are unique is not supported
37+
help: either remove the type parameter N, or make use of it, for example
38+
|
39+
LL - impl<const N: usize> Foo {}
40+
LL + impl Foo {}
41+
|
42+
LL | impl<const N: usize> Foo<N> {}
43+
| +++
3044

3145
error: overly complex generic constant
3246
--> $DIR/issue-68366.rs:12:31

tests/ui/const-generics/issues/issue-68366.min.stderr

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ LL | impl <const N: usize> Collatz<{Some(N)}> {}
2727
|
2828
= note: expressions using a const parameter must map each value to a distinct output value
2929
= note: proving the result of expressions other than the parameter are unique is not supported
30+
help: either remove the type parameter N, or make use of it, for example
31+
|
32+
LL - impl <const N: usize> Collatz<{Some(N)}> {}
33+
LL + impl Collatz<{Some(N)}> {}
34+
|
35+
LL | impl <const N: usize> Collatz<{Some(N)}, N> {}
36+
| +++
3037

3138
error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
3239
--> $DIR/issue-68366.rs:19:6
@@ -36,6 +43,13 @@ LL | impl<const N: usize> Foo {}
3643
|
3744
= note: expressions using a const parameter must map each value to a distinct output value
3845
= note: proving the result of expressions other than the parameter are unique is not supported
46+
help: either remove the type parameter N, or make use of it, for example
47+
|
48+
LL - impl<const N: usize> Foo {}
49+
LL + impl Foo {}
50+
|
51+
LL | impl<const N: usize> Foo<N> {}
52+
| +++
3953

4054
error: aborting due to 4 previous errors
4155

tests/ui/dropck/unconstrained_const_param_on_drop.stderr

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ LL | impl<const UNUSED: usize> Drop for Foo {}
1818
|
1919
= note: expressions using a const parameter must map each value to a distinct output value
2020
= note: proving the result of expressions other than the parameter are unique is not supported
21+
help: either remove the type parameter UNUSED, or make use of it, for example
22+
|
23+
LL - impl<const UNUSED: usize> Drop for Foo {}
24+
LL + impl Drop for Foo {}
25+
|
26+
LL | impl<const UNUSED: usize> Drop for Foo<UNUSED> {}
27+
| ++++++++
2128

2229
error: aborting due to 2 previous errors
2330

tests/ui/error-codes/E0207.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T: Default> Foo {
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter T, or make use of it, for example
8+
|
9+
LL - impl<T: Default> Foo {
10+
LL + impl Foo {
11+
|
12+
LL | impl<T: Default> Foo<T> {
13+
| +++
614

715
error: aborting due to 1 previous error
816

tests/ui/generic-associated-types/bugs/issue-87735.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ error[E0207]: the type parameter `U` is not constrained by the impl trait, self
33
|
44
LL | impl<'b, T, U> AsRef2 for Foo<T>
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter U, or make use of it, for example
8+
|
9+
LL - impl<'b, T, U> AsRef2 for Foo<T>
10+
LL + impl<'b, T> AsRef2 for Foo<T>
11+
|
12+
LL | impl<'b, T, U> AsRef2 for Foo<T, U>
13+
| +++
614

715
error[E0309]: the parameter type `U` may not live long enough
816
--> $DIR/issue-87735.rs:34:21

tests/ui/generic-associated-types/bugs/issue-88526.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ error[E0207]: the type parameter `I` is not constrained by the impl trait, self
33
|
44
LL | impl<'q, Q, I, F> A for TestB<Q, F>
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter I, or make use of it, for example
8+
|
9+
LL - impl<'q, Q, I, F> A for TestB<Q, F>
10+
LL + impl<'q, Q, F> A for TestB<Q, F>
11+
|
12+
LL | impl<'q, Q, I, F> A for TestB<Q, F, I>
13+
| +++
614

715
error[E0309]: the parameter type `F` may not live long enough
816
--> $DIR/issue-88526.rs:16:18

tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ error[E0207]: the type parameter `T1` is not constrained by the impl trait, self
1818
|
1919
LL | impl <T, T1> Foo for T {
2020
| ^^ unconstrained type parameter
21+
|
22+
help: either remove the type parameter T1, or make use of it, for example
23+
|
24+
LL - impl <T, T1> Foo for T {
25+
LL + impl <T> Foo for T {
26+
|
27+
LL | impl <T, T1> Foo for T<T1> {
28+
| ++++
2129

2230
error: aborting due to 3 previous errors
2331

tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T: ?Sized> Mirror for () {
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter T, or make use of it, for example
8+
|
9+
LL - impl<T: ?Sized> Mirror for () {
10+
LL + impl Mirror for () {
11+
|
612

713
error[E0282]: type annotations needed
814
--> $DIR/refine-resolution-errors.rs:15:5

tests/ui/impl-trait/in-trait/unconstrained-lt.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
33
|
44
LL | impl<'a, T> Foo for T {
55
| ^^ unconstrained lifetime parameter
6+
|
7+
help: either remove the type parameter 'a, or make use of it, for example
8+
|
9+
LL - impl<'a, T> Foo for T {
10+
LL + impl<T> Foo for T {
11+
|
12+
LL | impl<'a, T> Foo for T<'a> {
13+
| ++++
614

715
error: aborting due to 1 previous error
816

tests/ui/impl-trait/issues/issue-87340.stderr

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T> X for () {
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter T, or make use of it, for example
8+
|
9+
LL - impl<T> X for () {
10+
LL + impl X for () {
11+
|
612

713
error[E0282]: type annotations needed
814
--> $DIR/issue-87340.rs:11:23

tests/ui/impl-unused-rps-in-assoc-type.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
33
|
44
LL | impl<'a> Fun for Holder {
55
| ^^ unconstrained lifetime parameter
6+
|
7+
help: either remove the type parameter 'a, or make use of it, for example
8+
|
9+
LL - impl<'a> Fun for Holder {
10+
LL + impl Fun for Holder {
11+
|
12+
LL | impl<'a> Fun for Holder<'a> {
13+
| ++++
614

715
error: aborting due to 1 previous error
816

tests/ui/impl-unused-tps-inherent.stderr

+16
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,28 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T> MyType {
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter T, or make use of it, for example
8+
|
9+
LL - impl<T> MyType {
10+
LL + impl MyType {
11+
|
12+
LL | impl<T> MyType<T> {
13+
| +++
614

715
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
816
--> $DIR/impl-unused-tps-inherent.rs:17:8
917
|
1018
LL | impl<T,U> MyType1<T> {
1119
| ^ unconstrained type parameter
20+
|
21+
help: either remove the type parameter U, or make use of it, for example
22+
|
23+
LL - impl<T,U> MyType1<T> {
24+
LL + impl<T> MyType1<T> {
25+
|
26+
LL | impl<T,U> MyType1<T, U> {
27+
| +++
1228

1329
error: aborting due to 2 previous errors
1430

tests/ui/impl-unused-tps.stderr

+40
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,70 @@ error[E0207]: the type parameter `U` is not constrained by the impl trait, self
4545
|
4646
LL | impl<T, U> Foo<T> for [isize; 1] {
4747
| ^ unconstrained type parameter
48+
|
49+
help: either remove the type parameter U, or make use of it, for example
50+
|
51+
LL - impl<T, U> Foo<T> for [isize; 1] {
52+
LL + impl<T> Foo<T> for [isize; 1] {
53+
|
54+
LL | impl<T, U> Foo<T> for [isize<U>; 1] {
55+
| +++
4856

4957
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
5058
--> $DIR/impl-unused-tps.rs:32:9
5159
|
5260
LL | impl<T, U> Bar for T {
5361
| ^ unconstrained type parameter
62+
|
63+
help: either remove the type parameter U, or make use of it, for example
64+
|
65+
LL - impl<T, U> Bar for T {
66+
LL + impl<T> Bar for T {
67+
|
68+
LL | impl<T, U> Bar for T<U> {
69+
| +++
5470

5571
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
5672
--> $DIR/impl-unused-tps.rs:40:9
5773
|
5874
LL | impl<T, U> Bar for T
5975
| ^ unconstrained type parameter
76+
|
77+
help: either remove the type parameter U, or make use of it, for example
78+
|
79+
LL - impl<T, U> Bar for T
80+
LL + impl<T> Bar for T
81+
|
82+
LL | impl<T, U> Bar for T<U>
83+
| +++
6084

6185
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
6286
--> $DIR/impl-unused-tps.rs:49:9
6387
|
6488
LL | impl<T, U, V> Foo<T> for T
6589
| ^ unconstrained type parameter
90+
|
91+
help: either remove the type parameter U, or make use of it, for example
92+
|
93+
LL - impl<T, U, V> Foo<T> for T
94+
LL + impl<T, V> Foo<T> for T
95+
|
96+
LL | impl<T, U, V> Foo<T> for T<U>
97+
| +++
6698

6799
error[E0207]: the type parameter `V` is not constrained by the impl trait, self type, or predicates
68100
--> $DIR/impl-unused-tps.rs:49:12
69101
|
70102
LL | impl<T, U, V> Foo<T> for T
71103
| ^ unconstrained type parameter
104+
|
105+
help: either remove the type parameter V, or make use of it, for example
106+
|
107+
LL - impl<T, U, V> Foo<T> for T
108+
LL + impl<T, U> Foo<T> for T
109+
|
110+
LL | impl<T, U, V> Foo<T> for T<V>
111+
| +++
72112

73113
error: aborting due to 9 previous errors
74114

tests/ui/issues/issue-16562.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T, M: MatrixShape> Collection for Col<M, usize> {
55
| ^ unconstrained type parameter
6+
|
7+
help: either remove the type parameter T, or make use of it, for example
8+
|
9+
LL - impl<T, M: MatrixShape> Collection for Col<M, usize> {
10+
LL + impl<M: MatrixShape> Collection for Col<M, usize> {
11+
|
12+
LL | impl<T, M: MatrixShape> Collection for Col<M, usize, T> {
13+
| +++
614

715
error: aborting due to 1 previous error
816

0 commit comments

Comments
 (0)