about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2022-05-25 20:08:27 +0200
committerUrgau <urgau@numericable.fr>2022-06-03 11:31:11 +0200
commitb76d1125d4f1596e4c4481064fa6342990f1a985 (patch)
tree511407df881b6878dc53fdf014c9f98c6f170274 /compiler/rustc_resolve/src
parenta4d03c6c94b7c46a2d53a9412c447932d69316a4 (diff)
downloadrust-b76d1125d4f1596e4c4481064fa6342990f1a985.tar.gz
rust-b76d1125d4f1596e4c4481064fa6342990f1a985.zip
Conservatively report "not sure" in cfg_accessible
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/macros.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs
index 31d7bda5989..2e2d3674560 100644
--- a/compiler/rustc_resolve/src/macros.rs
+++ b/compiler/rustc_resolve/src/macros.rs
@@ -443,7 +443,9 @@ impl<'a> ResolverExpand for Resolver<'a> {
                 PathResult::NonModule(partial_res) if partial_res.unresolved_segments() == 0 => {
                     return Ok(true);
                 }
-                PathResult::NonModule(..) => {
+                PathResult::NonModule(..) |
+                // HACK(Urgau): This shouldn't be necessary
+                PathResult::Failed { is_error_from_last_segment: false, .. } => {
                     self.session
                         .struct_span_err(span, "not sure whether the path is accessible or not")
                         .note("the type may have associated items, but we are currently not checking them")