about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorcsmoe <csmoe@msn.com>2020-05-22 12:14:53 +0800
committercsmoe <csmoe@msn.com>2020-06-04 09:37:32 +0800
commit9be635306cdf06dde62e2c1ebaadcdc33f44f45c (patch)
tree55038b4e6a93879678a95202c62ec26e73065d65 /src
parent2f311b07c8d95b1192e585e983535de89bcbdfaa (diff)
downloadrust-9be635306cdf06dde62e2c1ebaadcdc33f44f45c.tar.gz
rust-9be635306cdf06dde62e2c1ebaadcdc33f44f45c.zip
resolve error code e0760
Diffstat (limited to 'src')
-rw-r--r--src/librustc_error_codes/error_codes.rs2
-rw-r--r--src/librustc_error_codes/error_codes/E0760.md (renamed from src/librustc_error_codes/error_codes/E0755.md)2
-rw-r--r--src/librustc_typeck/check/mod.rs2
-rw-r--r--src/test/ui/async-await/issue-61949-self-return-type.stderr4
-rw-r--r--src/test/ui/impl-trait/bound-normalization-fail.stderr4
5 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs
index c0b16c22e4d..97f0c16b4cf 100644
--- a/src/librustc_error_codes/error_codes.rs
+++ b/src/librustc_error_codes/error_codes.rs
@@ -437,7 +437,7 @@ E0751: include_str!("./error_codes/E0751.md"),
 E0752: include_str!("./error_codes/E0752.md"),
 E0753: include_str!("./error_codes/E0753.md"),
 E0754: include_str!("./error_codes/E0754.md"),
-E0755: include_str!("./error_codes/E0755.md"),
+E0760: include_str!("./error_codes/E0760.md"),
 ;
 //  E0006, // merged with E0005
 //  E0008, // cannot bind by-move into a pattern guard
diff --git a/src/librustc_error_codes/error_codes/E0755.md b/src/librustc_error_codes/error_codes/E0760.md
index 0c289146176..e1dcfefebcd 100644
--- a/src/librustc_error_codes/error_codes/E0755.md
+++ b/src/librustc_error_codes/error_codes/E0760.md
@@ -3,7 +3,7 @@ or `Self` that references lifetimes from a parent scope.
 
 Erroneous code example:
 
-```compile_fail,E0755,edition2018
+```compile_fail,E0760,edition2018
 struct S<'a>(&'a i32);
 
 impl<'a> S<'a> {
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 200263728d9..4646e703496 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -1690,7 +1690,7 @@ fn check_opaque_for_inheriting_lifetimes(tcx: TyCtxt<'tcx>, def_id: LocalDefId,
             let mut err = struct_span_err!(
                 tcx.sess,
                 span,
-                E0755,
+                E0760,
                 "`{}` return type cannot contain a projection or `Self` that references lifetimes from \
              a parent scope",
                 if is_async { "async fn" } else { "impl Trait" },
diff --git a/src/test/ui/async-await/issue-61949-self-return-type.stderr b/src/test/ui/async-await/issue-61949-self-return-type.stderr
index f57e097c125..4eeef871c5b 100644
--- a/src/test/ui/async-await/issue-61949-self-return-type.stderr
+++ b/src/test/ui/async-await/issue-61949-self-return-type.stderr
@@ -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`.
diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr
index c78d4c4a8fd..03aba10cc79 100644
--- a/src/test/ui/impl-trait/bound-normalization-fail.stderr
+++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr
@@ -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`.