Skip to content

Commit c40ec11

Browse files
committed
update 1 test and fix typo
Signed-off-by: Zhi Qi <[email protected]>
1 parent 0be2da3 commit c40ec11

4 files changed

+16
-10
lines changed

tests/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr renamed to tests/ui/generic-associated-types/method-unsatisfied-assoc-type-predicate.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0599]: the method `f` exists for struct `S`, but its trait bounds were not satisfied
2-
--> $DIR/method-unsatified-assoc-type-predicate.rs:28:7
2+
--> $DIR/method-unsatisfied-assoc-type-predicate.rs:28:7
33
|
44
LL | struct S;
55
| --------
@@ -12,7 +12,7 @@ LL | a.f();
1212
| ^ method cannot be called on `S` due to unsatisfied trait bounds
1313
|
1414
note: trait bound `<S as X>::Y<i32> = i32` was not satisfied
15-
--> $DIR/method-unsatified-assoc-type-predicate.rs:12:11
15+
--> $DIR/method-unsatisfied-assoc-type-predicate.rs:12:11
1616
|
1717
LL | impl<T: X<Y<i32> = i32>> M for T {}
1818
| ^^^^^^^^^^^^ - -

tests/ui/generic-associated-types/unsatified-item-lifetime-bound.rs renamed to tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(unused_lifetimes)]
2+
13
pub trait X {
24
type Y<'a: 'static>;
35
//~^ WARNING unnecessary lifetime parameter

tests/ui/generic-associated-types/unsatified-item-lifetime-bound.stderr renamed to tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,50 @@
11
warning: unnecessary lifetime parameter `'a`
2-
--> $DIR/unsatified-item-lifetime-bound.rs:2:12
2+
--> $DIR/unsatisfied-item-lifetime-bound.rs:4:12
33
|
44
LL | type Y<'a: 'static>;
55
| ^^
66
|
7-
= note: `#[warn(named_static_lifetimes)]` on by default
87
= help: you can use the `'static` lifetime directly, in place of `'a`
8+
note: the lint level is defined here
9+
--> $DIR/unsatisfied-item-lifetime-bound.rs:1:9
10+
|
11+
LL | #![warn(unused_lifetimes)]
12+
| ^^^^^^^^^^^^^^^^
913

1014
error[E0478]: lifetime bound not satisfied
11-
--> $DIR/unsatified-item-lifetime-bound.rs:11:8
15+
--> $DIR/unsatisfied-item-lifetime-bound.rs:13:8
1216
|
1317
LL | f: <T as X>::Y<'a>,
1418
| ^^^^^^^^^^^^^^^
1519
|
1620
note: lifetime parameter instantiated with the lifetime `'a` as defined here
17-
--> $DIR/unsatified-item-lifetime-bound.rs:10:10
21+
--> $DIR/unsatisfied-item-lifetime-bound.rs:12:10
1822
|
1923
LL | struct B<'a, T: for<'r> X<Y<'r> = &'r ()>> {
2024
| ^^
2125
= note: but lifetime parameter must outlive the static lifetime
2226

2327
error[E0478]: lifetime bound not satisfied
24-
--> $DIR/unsatified-item-lifetime-bound.rs:16:8
28+
--> $DIR/unsatisfied-item-lifetime-bound.rs:18:8
2529
|
2630
LL | f: <T as X>::Y<'a>,
2731
| ^^^^^^^^^^^^^^^
2832
|
2933
note: lifetime parameter instantiated with the lifetime `'a` as defined here
30-
--> $DIR/unsatified-item-lifetime-bound.rs:15:10
34+
--> $DIR/unsatisfied-item-lifetime-bound.rs:17:10
3135
|
3236
LL | struct C<'a, T: X> {
3337
| ^^
3438
= note: but lifetime parameter must outlive the static lifetime
3539

3640
error[E0478]: lifetime bound not satisfied
37-
--> $DIR/unsatified-item-lifetime-bound.rs:21:8
41+
--> $DIR/unsatisfied-item-lifetime-bound.rs:23:8
3842
|
3943
LL | f: <() as X>::Y<'a>,
4044
| ^^^^^^^^^^^^^^^^
4145
|
4246
note: lifetime parameter instantiated with the lifetime `'a` as defined here
43-
--> $DIR/unsatified-item-lifetime-bound.rs:20:10
47+
--> $DIR/unsatisfied-item-lifetime-bound.rs:22:10
4448
|
4549
LL | struct D<'a> {
4650
| ^^

0 commit comments

Comments
 (0)