File tree 7 files changed +14
-11
lines changed
rfcs/rfc-1937-termination-trait
7 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,9 @@ impl DefPathData {
420
420
pub fn name ( & self ) -> DefPathDataName {
421
421
use self :: DefPathData :: * ;
422
422
match * self {
423
- TypeNs ( name) if name == kw:: Empty => DefPathDataName :: Anon { namespace : sym:: opaque } ,
423
+ TypeNs ( name) if name == kw:: Empty => {
424
+ DefPathDataName :: Anon { namespace : sym:: synthetic }
425
+ }
424
426
TypeNs ( name) | ValueNs ( name) | MacroNs ( name) | LifetimeNs ( name) => {
425
427
DefPathDataName :: Named ( name)
426
428
}
Original file line number Diff line number Diff line change @@ -1690,6 +1690,7 @@ symbols! {
1690
1690
suggestion,
1691
1691
sym,
1692
1692
sync,
1693
+ synthetic,
1693
1694
t32,
1694
1695
target,
1695
1696
target_abi,
Original file line number Diff line number Diff line change 1
- error[E0310]: the associated type `<Self as MyTrait>::{opaque #0}` may not live long enough
1
+ error[E0310]: the associated type `<Self as MyTrait>::{synthetic #0}` may not live long enough
2
2
--> $DIR/async-and-ret-ref.rs:7:5
3
3
|
4
4
LL | async fn foo() -> &'static impl T;
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
| |
7
- | the associated type `<Self as MyTrait>::{opaque #0}` must be valid for the static lifetime...
7
+ | the associated type `<Self as MyTrait>::{synthetic #0}` must be valid for the static lifetime...
8
8
| ...so that the reference type `&'static impl T` does not outlive the data it points at
9
9
10
10
error: aborting due to 1 previous error
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ LL | fn bar() -> () {}
6
6
|
7
7
= help: the trait `std::fmt::Display` is not implemented for `()`
8
8
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
9
- note: required by a bound in `Foo::{opaque #0}`
9
+ note: required by a bound in `Foo::{synthetic #0}`
10
10
--> $DIR/doesnt-satisfy.rs:2:22
11
11
|
12
12
LL | fn bar() -> impl std::fmt::Display;
13
- | ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque #0}`
13
+ | ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{synthetic #0}`
14
14
15
15
error: aborting due to 1 previous error
16
16
Original file line number Diff line number Diff line change 1
- error[E0310]: the associated type `<T as Original>::{opaque #0}` may not live long enough
1
+ error[E0310]: the associated type `<T as Original>::{synthetic #0}` may not live long enough
2
2
--> $DIR/missing-static-bound-from-impl.rs:11:9
3
3
|
4
4
LL | Box::new(<T as Original>::f())
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
| |
7
- | the associated type `<T as Original>::{opaque #0}` must be valid for the static lifetime...
7
+ | the associated type `<T as Original>::{synthetic #0}` must be valid for the static lifetime...
8
8
| ...so that the type `impl Fn()` will meet its required lifetime bounds
9
9
10
10
error: aborting due to 1 previous error
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ LL | fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
5
5
| ^^^^^^^^^^^^ the trait `Foo<char>` is not implemented for `impl Foo<u8>`
6
6
|
7
7
= help: the trait `Foo<char>` is implemented for `Bar`
8
- note: required by a bound in `Foo::{opaque #0}`
8
+ note: required by a bound in `Foo::{synthetic #0}`
9
9
--> $DIR/return-dont-satisfy-bounds.rs:2:30
10
10
|
11
11
LL | fn foo<F2>(self) -> impl Foo<T>;
12
- | ^^^^^^ required by this bound in `Foo::{opaque #0}`
12
+ | ^^^^^^ required by this bound in `Foo::{synthetic #0}`
13
13
14
14
error[E0276]: impl has stricter requirements than trait
15
15
--> $DIR/return-dont-satisfy-bounds.rs:8:16
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ error[E0277]: the trait bound `Something: Termination` is not satisfied
4
4
LL | fn main() -> Something {
5
5
| ^^^^^^^^^ the trait `Termination` is not implemented for `Something`
6
6
|
7
- note: required by a bound in `Main::{opaque #0}`
7
+ note: required by a bound in `Main::{synthetic #0}`
8
8
--> $DIR/issue-103052-2.rs:5:27
9
9
|
10
10
LL | fn main() -> impl std::process::Termination;
11
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::{opaque #0}`
11
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::{synthetic #0}`
12
12
13
13
error: aborting due to 1 previous error
14
14
You can’t perform that action at this time.
0 commit comments