Set expectation for no-semi expression statements to unit

This commit is contained in:
Lukas Wirth 2023-03-04 12:48:57 +01:00
parent 73e2505cfa
commit 24ba1bed04
5 changed files with 82 additions and 47 deletions

View file

@ -294,8 +294,8 @@ impl Resolver {
}
}
if let res @ Some(_) = self.module_scope.resolve_path_in_value_ns(db, path) {
return res;
if let Some(res) = self.module_scope.resolve_path_in_value_ns(db, path) {
return Some(res);
}
// If a path of the shape `u16::from_le_bytes` failed to resolve at all, then we fall back