Skip to content

Commit 9be6353

Browse files
committed
resolve error code e0760
1 parent 2f311b0 commit 9be6353

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/librustc_error_codes/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ E0751: include_str!("./error_codes/E0751.md"),
437437
E0752: include_str!("./error_codes/E0752.md"),
438438
E0753: include_str!("./error_codes/E0753.md"),
439439
E0754: include_str!("./error_codes/E0754.md"),
440-
E0755: include_str!("./error_codes/E0755.md"),
440+
E0760: include_str!("./error_codes/E0760.md"),
441441
;
442442
// E0006, // merged with E0005
443443
// E0008, // cannot bind by-move into a pattern guard

src/librustc_error_codes/error_codes/E0755.md renamed to src/librustc_error_codes/error_codes/E0760.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ or `Self` that references lifetimes from a parent scope.
33

44
Erroneous code example:
55

6-
```compile_fail,E0755,edition2018
6+
```compile_fail,E0760,edition2018
77
struct S<'a>(&'a i32);
88
99
impl<'a> S<'a> {

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ fn check_opaque_for_inheriting_lifetimes(tcx: TyCtxt<'tcx>, def_id: LocalDefId,
16901690
let mut err = struct_span_err!(
16911691
tcx.sess,
16921692
span,
1693-
E0755,
1693+
E0760,
16941694
"`{}` return type cannot contain a projection or `Self` that references lifetimes from \
16951695
a parent scope",
16961696
if is_async { "async fn" } else { "impl Trait" },
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error[E0755]: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
1+
error[E0760]: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
22
--> $DIR/issue-61949-self-return-type.rs:11:40
33
|
44
LL | pub async fn new(_bar: &'a i32) -> Self {
55
| ^^^^ help: consider spelling out the type instead: `Foo<'a>`
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0755`.
9+
For more information about this error, try `rustc --explain E0760`.

src/test/ui/impl-trait/bound-normalization-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ help: consider constraining the associated type `<T as impl_trait::Trait>::Assoc
2121
LL | fn foo_fail<T: Trait<Assoc = ()>>() -> impl FooLike<Output=T::Assoc> {
2222
| ^^^^^^^^^^^^
2323

24-
error[E0755]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
24+
error[E0760]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
2525
--> $DIR/bound-normalization-fail.rs:43:41
2626
|
2727
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::
4343

4444
error: aborting due to 3 previous errors; 1 warning emitted
4545

46-
Some errors have detailed explanations: E0271, E0755.
46+
Some errors have detailed explanations: E0271, E0760.
4747
For more information about an error, try `rustc --explain E0271`.

0 commit comments

Comments
 (0)