1
Fork 0

Conservatively report "not sure" in cfg_accessible

This commit is contained in:
Urgau 2022-05-25 20:08:27 +02:00
parent a4d03c6c94
commit b76d1125d4
6 changed files with 59 additions and 33 deletions

View file

@ -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")