Skip to content

Commit 437083a

Browse files
committed
Bless existing UI tests
1 parent c86ecbe commit 437083a

File tree

40 files changed

+93
-0
lines changed

40 files changed

+93
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ 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+
= note: to constrain `T`, use it in the self type, or in an equality with an associated type
68

79
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
810
--> $DIR/issue-26262.rs:17:6
911
|
1012
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
1113
| ^^ unconstrained lifetime parameter
14+
|
15+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
1216

1317
error: aborting due to 2 previous errors
1418

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
1919
|
2020
LL | impl<'a> Actor for () {
2121
| ^^ unconstrained lifetime parameter
22+
|
23+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
2224

2325
error: aborting due to 2 previous errors
2426

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ error[E0207]: the const parameter `H` is not constrained by the impl trait, self
1010
LL | impl<const H: feature> Foo {
1111
| ^^^^^^^^^^^^^^^^ unconstrained const parameter
1212
|
13+
= note: to constrain `H`, use it in the self type, or in an equality with an associated type
1314
= note: expressions using a const parameter must map each value to a distinct output value
1415
= note: proving the result of expressions other than the parameter are unique is not supported
1516

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ error[E0207]: the const parameter `H` is not constrained by the impl trait, self
1010
LL | impl<const H: feature> Foo {
1111
| ^^^^^^^^^^^^^^^^ unconstrained const parameter
1212
|
13+
= note: to constrain `H`, use it in the self type, or in an equality with an associated type
1314
= note: expressions using a const parameter must map each value to a distinct output value
1415
= note: proving the result of expressions other than the parameter are unique is not supported
1516

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ error[E0207]: the const parameter `N` is not constrained by the impl trait, self
5252
LL | impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
5353
| ^^^^^^^^^^^^^^ unconstrained const parameter
5454
|
55+
= note: to constrain `N`, use it in the implemented trait, in the self type, or in an equality with an associated type
5556
= note: expressions using a const parameter must map each value to a distinct output value
5657
= note: proving the result of expressions other than the parameter are unique is not supported
5758

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ error[E0207]: the const parameter `N` is not constrained by the impl trait, self
1616
LL | impl <const N: usize> Collatz<{Some(N)}> {}
1717
| ^^^^^^^^^^^^^^ unconstrained const parameter
1818
|
19+
= note: to constrain `N`, use it in the self type, or in an equality with an associated type
1920
= note: expressions using a const parameter must map each value to a distinct output value
2021
= note: proving the result of expressions other than the parameter are unique is not supported
2122

@@ -25,6 +26,7 @@ error[E0207]: the const parameter `N` is not constrained by the impl trait, self
2526
LL | impl<const N: usize> Foo {}
2627
| ^^^^^^^^^^^^^^ unconstrained const parameter
2728
|
29+
= note: to constrain `N`, use it in the self type, or in an equality with an associated type
2830
= note: expressions using a const parameter must map each value to a distinct output value
2931
= note: proving the result of expressions other than the parameter are unique is not supported
3032

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ error[E0207]: the const parameter `N` is not constrained by the impl trait, self
2525
LL | impl <const N: usize> Collatz<{Some(N)}> {}
2626
| ^^^^^^^^^^^^^^ unconstrained const parameter
2727
|
28+
= note: to constrain `N`, use it in the self type, or in an equality with an associated type
2829
= note: expressions using a const parameter must map each value to a distinct output value
2930
= note: proving the result of expressions other than the parameter are unique is not supported
3031

@@ -34,6 +35,7 @@ error[E0207]: the const parameter `N` is not constrained by the impl trait, self
3435
LL | impl<const N: usize> Foo {}
3536
| ^^^^^^^^^^^^^^ unconstrained const parameter
3637
|
38+
= note: to constrain `N`, use it in the self type, or in an equality with an associated type
3739
= note: expressions using a const parameter must map each value to a distinct output value
3840
= note: proving the result of expressions other than the parameter are unique is not supported
3941

tests/ui/consts/rustc-impl-const-stability.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
1313
LL | impl const Default for Data {
1414
| ^^^^^ unconstrained const parameter
1515
|
16+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
1617
= note: expressions using a const parameter must map each value to a distinct output value
1718
= note: proving the result of expressions other than the parameter are unique is not supported
1819

tests/ui/error-codes/E0207.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ 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+
= note: to constrain `T`, use it in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ 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+
= note: to constrain `U`, use it in the implemented trait, in the self type, or in an equality with an associated type
8+
= note: `U` is bound to an associated type, but the reference to the associated type itself uses unconstrained generic parameters
69

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ 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+
= note: to constrain `I`, use it in the implemented trait, in the self type, or in an equality with an associated type
8+
= note: `I` is bound to an associated type, but the reference to the associated type itself uses unconstrained generic parameters
69

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ 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+
= note: to constrain `T1`, use it in the implemented trait, in the self type, or in an equality with an associated type
2123

2224
error: aborting due to 3 previous errors
2325

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ 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+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ 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+
= note: to constrain `T`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ 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+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ 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+
= note: to constrain `T`, use it in the self type, or in an equality with an associated type
68

79
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
810
--> $DIR/impl-unused-tps-inherent.rs:17:8
911
|
1012
LL | impl<T,U> MyType1<T> {
1113
| ^ unconstrained type parameter
14+
|
15+
= note: to constrain `U`, use it in the self type, or in an equality with an associated type
1216

1317
error: aborting due to 2 previous errors
1418

tests/ui/impl-unused-tps.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,42 @@ error[E0207]: the type parameter `U` is not constrained by the impl trait, self
2525
|
2626
LL | impl<T,U> Foo<T> for [isize;1] {
2727
| ^ unconstrained type parameter
28+
|
29+
= note: to constrain `U`, use it in the implemented trait, in the self type, or in an equality with an associated type
2830

2931
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
3032
--> $DIR/impl-unused-tps.rs:31:8
3133
|
3234
LL | impl<T,U> Bar for T {
3335
| ^ unconstrained type parameter
36+
|
37+
= note: to constrain `U`, use it in the implemented trait, in the self type, or in an equality with an associated type
3438

3539
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
3640
--> $DIR/impl-unused-tps.rs:39:8
3741
|
3842
LL | impl<T,U> Bar for T
3943
| ^ unconstrained type parameter
44+
|
45+
= note: to constrain `U`, use it in the implemented trait, in the self type, or in an equality with an associated type
46+
= note: `U` is bound to an associated type, but the associated type is circularly defined in this impl
4047

4148
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
4249
--> $DIR/impl-unused-tps.rs:47:8
4350
|
4451
LL | impl<T,U,V> Foo<T> for T
4552
| ^ unconstrained type parameter
53+
|
54+
= note: to constrain `U`, use it in the implemented trait, in the self type, or in an equality with an associated type
4655

4756
error[E0207]: the type parameter `V` is not constrained by the impl trait, self type, or predicates
4857
--> $DIR/impl-unused-tps.rs:47:10
4958
|
5059
LL | impl<T,U,V> Foo<T> for T
5160
| ^ unconstrained type parameter
61+
|
62+
= note: to constrain `V`, use it in the implemented trait, in the self type, or in an equality with an associated type
63+
= note: `V` is bound to an associated type, but the reference to the associated type itself uses unconstrained generic parameters
5264

5365
error: aborting due to 7 previous errors
5466

tests/ui/issues/issue-16562.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ 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+
= note: to constrain `T`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

tests/ui/issues/issue-22886.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
33
|
44
LL | impl<'a> Iterator for Newtype {
55
| ^^ unconstrained lifetime parameter
6+
|
7+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

tests/ui/issues/issue-29861.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
33
|
44
LL | impl<'a, T: 'a> MakeRef2 for T {
55
| ^^ unconstrained lifetime parameter
6+
|
7+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error[E0716]: temporary value dropped while borrowed
810
--> $DIR/issue-29861.rs:16:43

tests/ui/issues/issue-35139.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
33
|
44
LL | impl<'a> MethodType for MTFn {
55
| ^^ unconstrained lifetime parameter
6+
|
7+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

tests/ui/lazy-type-alias/unconstrained-params-in-impl-due-to-overflow.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T> Loop<T> {}
55
| ^ unconstrained type parameter
6+
|
7+
= note: to constrain `T`, use it in the self type, or in an equality with an associated type
68

79
error[E0275]: overflow normalizing the type alias `Loop<T>`
810
--> $DIR/unconstrained-params-in-impl-due-to-overflow.rs:6:16

tests/ui/lazy-type-alias/unconstrained-params-in-impl.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T> NotInjective<T> {}
55
| ^ unconstrained type parameter
6+
|
7+
= note: to constrain `T`, use it in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
1616
LL | impl const A for () {}
1717
| ^^^^^ unconstrained const parameter
1818
|
19+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
1920
= note: expressions using a const parameter must map each value to a distinct output value
2021
= note: proving the result of expressions other than the parameter are unique is not supported
2122

tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ LL | #[derive_const(Default)]
1010

1111
error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
1212
|
13+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
1314
= note: expressions using a const parameter must map each value to a distinct output value
1415
= note: proving the result of expressions other than the parameter are unique is not supported
1516

tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
1919
LL | impl const Default for A {
2020
| ^^^^^ unconstrained const parameter
2121
|
22+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
2223
= note: expressions using a const parameter must map each value to a distinct output value
2324
= note: proving the result of expressions other than the parameter are unique is not supported
2425

@@ -34,6 +35,7 @@ LL | #[derive_const(Default, PartialEq)]
3435

3536
error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
3637
|
38+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
3739
= note: expressions using a const parameter must map each value to a distinct output value
3840
= note: proving the result of expressions other than the parameter are unique is not supported
3941

tests/ui/rfcs/rfc-2632-const-trait-impl/effects/span-bug-issue-121418.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
1414
LL | impl const dyn T {
1515
| ^^^^^ unconstrained const parameter
1616
|
17+
= note: to constrain `host`, use it in the self type, or in an equality with an associated type
1718
= note: expressions using a const parameter must map each value to a distinct output value
1819
= note: proving the result of expressions other than the parameter are unique is not supported
1920

tests/ui/rfcs/rfc-2632-const-trait-impl/effects/spec-effectvar-ice.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
3434
LL | impl<T> const Foo for T {}
3535
| ^^^^^ unconstrained const parameter
3636
|
37+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
3738
= note: expressions using a const parameter must map each value to a distinct output value
3839
= note: proving the result of expressions other than the parameter are unique is not supported
3940

@@ -43,6 +44,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
4344
LL | impl<T> const Foo for T where T: const Specialize {}
4445
| ^^^^^ unconstrained const parameter
4546
|
47+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
4648
= note: expressions using a const parameter must map each value to a distinct output value
4749
= note: proving the result of expressions other than the parameter are unique is not supported
4850

tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
2222
LL | impl const Try for T {
2323
| ^^^^^ unconstrained const parameter
2424
|
25+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
2526
= note: expressions using a const parameter must map each value to a distinct output value
2627
= note: proving the result of expressions other than the parameter are unique is not supported
2728

@@ -31,6 +32,7 @@ error[E0207]: the const parameter `host` is not constrained by the impl trait, s
3132
LL | impl const FromResidual for T {
3233
| ^^^^^ unconstrained const parameter
3334
|
35+
= note: to constrain `host`, use it in the implemented trait, in the self type, or in an equality with an associated type
3436
= note: expressions using a const parameter must map each value to a distinct output value
3537
= note: proving the result of expressions other than the parameter are unique is not supported
3638

tests/ui/specialization/min_specialization/ice-const-not-fully-resolved-113045.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the type parameter `Unconstrained` is not constrained by the impl
33
|
44
LL | impl<'a, Unconstrained> X for [(); 0] {}
55
| ^^^^^^^^^^^^^ unconstrained type parameter
6+
|
7+
= note: to constrain `Unconstrained`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error: specialization impl does not specialize any associated items
810
--> $DIR/ice-const-not-fully-resolved-113045.rs:11:1

tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the type parameter `S` is not constrained by the impl trait, self
33
|
44
LL | impl<T, S> Trait<T> for i32 {
55
| ^ unconstrained type parameter
6+
|
7+
= note: to constrain `S`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
810
--> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:15:12

tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait,
33
|
44
LL | impl<'a, I> UnwrapItemsExt for I {
55
| ^^ unconstrained lifetime parameter
6+
|
7+
= note: to constrain `'a`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error[E0792]: expected generic lifetime parameter, found `'_`
810
--> $DIR/assoc-type-lifetime-unconstrained.rs:22:9

tests/ui/type-alias-impl-trait/ice-failed-to-resolve-instance-for-110696.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
33
|
44
LL | impl<T: MyFrom<Phantom2<DummyT<U>>>, U> MyIndex<DummyT<T>> for Scope<U> {
55
| ^ unconstrained type parameter
6+
|
7+
= note: to constrain `T`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error: aborting due to 1 previous error
810

tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ 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+
= note: to constrain `T`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error[E0282]: type annotations needed
810
--> $DIR/impl-with-unconstrained-param.rs:14:23

tests/ui/type-alias-impl-trait/issue-74244.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ 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+
= note: to constrain `T`, use it in the implemented trait, in the self type, or in an equality with an associated type
68

79
error[E0282]: type annotations needed
810
--> $DIR/issue-74244.rs:16:13

0 commit comments

Comments
 (0)