resolve error code e0760

This commit is contained in:
csmoe 2020-05-22 12:14:53 +08:00
parent 2f311b07c8
commit 9be635306c
5 changed files with 7 additions and 7 deletions

View file

@ -1,4 +1,4 @@
error[E0755]: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
error[E0760]: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
--> $DIR/issue-61949-self-return-type.rs:11:40
|
LL | pub async fn new(_bar: &'a i32) -> Self {
@ -6,4 +6,4 @@ LL | pub async fn new(_bar: &'a i32) -> Self {
error: aborting due to previous error
For more information about this error, try `rustc --explain E0755`.
For more information about this error, try `rustc --explain E0760`.

View file

@ -21,7 +21,7 @@ help: consider constraining the associated type `<T as impl_trait::Trait>::Assoc
LL | fn foo_fail<T: Trait<Assoc = ()>>() -> impl FooLike<Output=T::Assoc> {
| ^^^^^^^^^^^^
error[E0755]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
error[E0760]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
--> $DIR/bound-normalization-fail.rs:43:41
|
LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
@ -43,5 +43,5 @@ LL | fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike<Output=T::
error: aborting due to 3 previous errors; 1 warning emitted
Some errors have detailed explanations: E0271, E0755.
Some errors have detailed explanations: E0271, E0760.
For more information about an error, try `rustc --explain E0271`.