Skip to content

Commit 1efb747

Browse files
committed
Remove some annotations that just specify the default
1 parent e4622e0 commit 1efb747

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Regression test for #97099.
22
// This was an ICE because `impl Sized` captures the lifetime 'a.
33

4-
// check-fail
5-
64
trait Trait<E> {
75
type Assoc;
86
}

tests/ui/rfcs/impl-trait/higher-ranked-regions-diag.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
2-
--> $DIR/higher-ranked-regions-diag.rs:21:5
2+
--> $DIR/higher-ranked-regions-diag.rs:19:5
33
|
44
LL | fn bar() -> impl for<'a> Trait<&'a (), Assoc = impl Sized> {
55
| -- ---------- opaque type defined here

tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Basic tests for opaque type inference under for<_> binders.
22

3-
// check-fail
4-
53
#![feature(type_alias_impl_trait)]
64

75
trait Trait<'a> {

tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0792]: expected generic lifetime parameter, found `'a`
2-
--> $DIR/higher-ranked-regions-basic.rs:17:55
2+
--> $DIR/higher-ranked-regions-basic.rs:15:55
33
|
44
LL | type Opq<'a> = impl Sized + 'a;
55
| -- this generic parameter must be used with a generic lifetime parameter
66
LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq<'a>> {}
77
| ^^
88

99
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
10-
--> $DIR/higher-ranked-regions-basic.rs:23:58
10+
--> $DIR/higher-ranked-regions-basic.rs:21:58
1111
|
1212
LL | fn test() -> impl for<'a> Trait<'a, Ty = impl Sized> {}
1313
| -- ---------- ^^
@@ -16,7 +16,7 @@ LL | fn test() -> impl for<'a> Trait<'a, Ty = impl Sized> {}
1616
| hidden type `&'a ()` captures the lifetime `'a` as defined here
1717

1818
error[E0700]: hidden type for `capture_tait::Opq0` captures lifetime that does not appear in bounds
19-
--> $DIR/higher-ranked-regions-basic.rs:32:23
19+
--> $DIR/higher-ranked-regions-basic.rs:30:23
2020
|
2121
LL | type Opq0 = impl Sized;
2222
| ---------- opaque type defined here
@@ -27,7 +27,7 @@ LL | fn test() -> Opq2 {}
2727
| ^^
2828

2929
error[E0792]: expected generic lifetime parameter, found `'a`
30-
--> $DIR/higher-ranked-regions-basic.rs:41:23
30+
--> $DIR/higher-ranked-regions-basic.rs:39:23
3131
|
3232
LL | type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'b>>; // <- Note 'b
3333
| -- this generic parameter must be used with a generic lifetime parameter
@@ -36,7 +36,7 @@ LL | fn test() -> Opq2 {}
3636
| ^^
3737

3838
error[E0700]: hidden type for `capture_tait_complex_fail::Opq0<'a>` captures lifetime that does not appear in bounds
39-
--> $DIR/higher-ranked-regions-basic.rs:51:23
39+
--> $DIR/higher-ranked-regions-basic.rs:49:23
4040
|
4141
LL | type Opq0<'a> = impl Sized;
4242
| ---------- opaque type defined here
@@ -47,47 +47,47 @@ LL | fn test() -> Opq2 {}
4747
| ^^
4848

4949
error[E0792]: non-defining opaque type use in defining scope
50-
--> $DIR/higher-ranked-regions-basic.rs:59:41
50+
--> $DIR/higher-ranked-regions-basic.rs:57:41
5151
|
5252
LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'static>> {}
5353
| ^^^^^^^^^^^^^^^^^^^^^^ argument `'static` is not a generic parameter
5454
|
5555
note: for this opaque type
56-
--> $DIR/higher-ranked-regions-basic.rs:58:25
56+
--> $DIR/higher-ranked-regions-basic.rs:56:25
5757
|
5858
LL | type Opq0<'a, 'b> = impl Sized;
5959
| ^^^^^^^^^^
6060

6161
error[E0792]: expected generic lifetime parameter, found `'a`
62-
--> $DIR/higher-ranked-regions-basic.rs:59:65
62+
--> $DIR/higher-ranked-regions-basic.rs:57:65
6363
|
6464
LL | type Opq0<'a, 'b> = impl Sized;
6565
| -- this generic parameter must be used with a generic lifetime parameter
6666
LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'static>> {}
6767
| ^^
6868

6969
error: non-defining opaque type use in defining scope
70-
--> $DIR/higher-ranked-regions-basic.rs:68:41
70+
--> $DIR/higher-ranked-regions-basic.rs:66:41
7171
|
7272
LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'a>> {}
7373
| ^^^^^^^^^^^^^^^^^ generic argument `'a` used twice
7474
|
7575
note: for this opaque type
76-
--> $DIR/higher-ranked-regions-basic.rs:67:25
76+
--> $DIR/higher-ranked-regions-basic.rs:65:25
7777
|
7878
LL | type Opq0<'a, 'b> = impl Sized;
7979
| ^^^^^^^^^^
8080

8181
error[E0792]: expected generic lifetime parameter, found `'a`
82-
--> $DIR/higher-ranked-regions-basic.rs:68:60
82+
--> $DIR/higher-ranked-regions-basic.rs:66:60
8383
|
8484
LL | type Opq0<'a, 'b> = impl Sized;
8585
| -- this generic parameter must be used with a generic lifetime parameter
8686
LL | fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'a>> {}
8787
| ^^
8888

8989
error[E0792]: expected generic lifetime parameter, found `'a`
90-
--> $DIR/higher-ranked-regions-basic.rs:78:23
90+
--> $DIR/higher-ranked-regions-basic.rs:76:23
9191
|
9292
LL | type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'a, 'b>>;
9393
| -- this generic parameter must be used with a generic lifetime parameter

0 commit comments

Comments
 (0)