about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-15 17:34:25 -0400
committerMichael Goulet <michael@errs.io>2024-09-16 10:56:22 -0400
commitae8b4607c6c92164dce2e92f9496de189a43bc44 (patch)
tree48e337f4cf001bdf9e0de0a28b24942972b36fe7 /compiler/rustc_resolve/src
parent26bdfefae121061187a8206bc0d6702c968a62c0 (diff)
Introduce distinct error codes for precise capturing
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index 148f55986ba..4bf2cc287da 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -557,9 +557,8 @@ impl<'a> PathSource<'a> {
         match (self, has_unexpected_resolution) {
             (PathSource::Trait(_), true) => E0404,
             (PathSource::Trait(_), false) => E0405,
-            // TODO:
-            (PathSource::Type | PathSource::PreciseCapturingArg(..), true) => E0573,
-            (PathSource::Type | PathSource::PreciseCapturingArg(..), false) => E0412,
+            (PathSource::Type, true) => E0573,
+            (PathSource::Type, false) => E0412,
             (PathSource::Struct, true) => E0574,
             (PathSource::Struct, false) => E0422,
             (PathSource::Expr(..), true) | (PathSource::Delegation, true) => E0423,
@@ -568,6 +567,8 @@ impl<'a> PathSource<'a> {
             (PathSource::Pat | PathSource::TupleStruct(..), false) => E0531,
             (PathSource::TraitItem(..), true) => E0575,
             (PathSource::TraitItem(..), false) => E0576,
+            (PathSource::PreciseCapturingArg(..), true) => E0799,
+            (PathSource::PreciseCapturingArg(..), false) => E0800,
         }
     }
 }