Skip to content

Commit 9961e94

Browse files
committed
Update tests to adopt #107295
1 parent 84f4c7f commit 9961e94

File tree

43 files changed

+393
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+393
-0
lines changed

tests/rustdoc-ui/not-wf-ambiguous-normalization.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> Allocator for DefaultAllocator {
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> Allocator for DefaultAllocator {
10+
LL + impl Allocator for DefaultAllocator {
11+
|
12+
LL | impl<T> Allocator for DefaultAllocator<T> {
13+
| +++
614

715
error: aborting due to 1 previous error
816

tests/rustdoc-ui/synthetic-auto-trait-impls/unconstrained-param-in-impl-ambiguity.stderr

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

715
error: aborting due to 1 previous error
816

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: aborting due to 1 previous error
814

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: aborting due to 1 previous error
814

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

0 commit comments

Comments
 (0)