parent
cb2effd44e
commit
9889e44470
@ -1801,7 +1801,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
|||||||
crate_lint: CrateLint,
|
crate_lint: CrateLint,
|
||||||
) -> PartialRes {
|
) -> PartialRes {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
"smart_resolve_path_fragment(id={:?},qself={:?},path={:?}",
|
"smart_resolve_path_fragment(id={:?}, qself={:?}, path={:?})",
|
||||||
id,
|
id,
|
||||||
qself,
|
qself,
|
||||||
path
|
path
|
||||||
@ -1841,11 +1841,10 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
|||||||
|
|
||||||
// Before we start looking for candidates, we have to get our hands
|
// Before we start looking for candidates, we have to get our hands
|
||||||
// on the type user is trying to perform invocation on; basically:
|
// on the type user is trying to perform invocation on; basically:
|
||||||
// we're transforming `HashMap::new` into just `HashMap`
|
// we're transforming `HashMap::new` into just `HashMap`.
|
||||||
let path = if let Some((_, path)) = path.split_last() {
|
let path = match path.split_last() {
|
||||||
path
|
Some((_, path)) if !path.is_empty() => path,
|
||||||
} else {
|
_ => return Some(parent_err),
|
||||||
return Some(parent_err);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let (mut err, candidates) =
|
let (mut err, candidates) =
|
||||||
|
3
src/test/ui/resolve/issue-82156.rs
Normal file
3
src/test/ui/resolve/issue-82156.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
super(); //~ ERROR failed to resolve: there are too many leading `super` keywords
|
||||||
|
}
|
9
src/test/ui/resolve/issue-82156.stderr
Normal file
9
src/test/ui/resolve/issue-82156.stderr
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
error[E0433]: failed to resolve: there are too many leading `super` keywords
|
||||||
|
--> $DIR/issue-82156.rs:2:5
|
||||||
|
|
|
||||||
|
LL | super();
|
||||||
|
| ^^^^^ there are too many leading `super` keywords
|
||||||
|
|
||||||
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
For more information about this error, try `rustc --explain E0433`.
|
Loading…
x
Reference in New Issue
Block a user