diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-10-27 06:21:24 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-10-27 07:41:52 +0100 |
| commit | 442f39582d2aec5026c8d75079a75f58579059e4 (patch) | |
| tree | 53a1e7f582cb9c6a9048527d40413a5e99650835 /compiler/rustc_error_codes/src | |
| parent | 6faf0bd3e561f1a0c81f3eafe0ce0e688385d70e (diff) | |
Move an impl-Trait check from AST validation to AST lowering
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0667.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0667.md b/compiler/rustc_error_codes/src/error_codes/E0667.md index 0709a24c433..339bc068610 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0667.md +++ b/compiler/rustc_error_codes/src/error_codes/E0667.md @@ -1,8 +1,10 @@ +#### Note: this error code is no longer emitted by the compiler. + `impl Trait` is not allowed in path parameters. Erroneous code example: -```compile_fail,E0667 +```ignore (removed error code) fn some_fn(mut x: impl Iterator) -> <impl Iterator>::Item { // error! x.next().unwrap() } @@ -11,7 +13,7 @@ fn some_fn(mut x: impl Iterator) -> <impl Iterator>::Item { // error! You cannot use `impl Trait` in path parameters. If you want something equivalent, you can do this instead: -``` +```ignore (removed error code) fn some_fn<T: Iterator>(mut x: T) -> T::Item { // ok! x.next().unwrap() } |
