Skip to content

Commit 8841ede

Browse files
committed
bless suggestion on spell out
1 parent 633e4aa commit 8841ede

File tree

6 files changed

+13
-16
lines changed

6 files changed

+13
-16
lines changed

src/librustc_error_codes/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ E0750: include_str!("./error_codes/E0750.md"),
435435
E0751: include_str!("./error_codes/E0751.md"),
436436
E0752: include_str!("./error_codes/E0752.md"),
437437
E0753: include_str!("./error_codes/E0753.md"),
438-
E0754: include_str!("./error_codes/E0754.md"),
438+
E0755: include_str!("./error_codes/E0755.md"),
439439
;
440440
// E0006, // merged with E0005
441441
// E0008, // cannot bind by-move into a pattern guard

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
`async fn`/`impl trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope.
1+
`async fn`/`impl trait` return type cannot contain a projection
2+
or `Self` that references lifetimes from a parent scope.
23

34
Erroneous code example:
45

@@ -24,6 +25,8 @@ impl<'a> S<'a> {
2425
}
2526
```
2627

27-
This will be allowed at some point in the future, but the implementation is not yet complete. See the [issue-61949] for this limitation.
28+
This will be allowed at some point in the future,
29+
but the implementation is not yet complete.
30+
See the [issue-61949] for this limitation.
2831

2932
[issue-61949]: https://github.com/rust-lang/rust/issues/61949

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,7 @@ fn check_opaque_for_inheriting_lifetimes(tcx: TyCtxt<'tcx>, def_id: LocalDefId,
17011701
let mut err = struct_span_err!(
17021702
tcx.sess,
17031703
span,
1704-
E0754,
1704+
E0755,
17051705
"`{}` return type cannot contain a projection or `Self` that references lifetimes from \
17061706
a parent scope",
17071707
if is_async { "async fn" } else { "impl Trait" },
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
1+
error[E0755]: `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 {
5-
| ^^^^
5+
| ^^^^ 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 E0754`.

src/test/ui/async-await/issue-69276.stderr

-8
This file was deleted.

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

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

23-
error: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
23+
error[E0755]: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
2424
--> $DIR/bound-normalization-fail.rs:43:41
2525
|
2626
LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
@@ -42,4 +42,5 @@ LL | fn foo2_fail<'a, T: Trait<'a, Assoc = ()>>() -> impl FooLike<Output=T::
4242

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

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

0 commit comments

Comments
 (0)