We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffcbd2d commit 46bd5d3Copy full SHA for 46bd5d3
src/librustc_resolve/lib.rs
@@ -1810,6 +1810,8 @@ impl<'a> Resolver<'a> {
1810
if let Def::Trait(_) = path_res.base_def {
1811
debug!("(resolving trait) found trait def: {:?}", path_res);
1812
Ok(path_res)
1813
+ } else if path_res.base_def == Def::Err {
1814
+ Err(true)
1815
} else {
1816
let mut err =
1817
resolve_struct_error(self,
src/test/compile-fail/issue-5035.rs
@@ -13,4 +13,8 @@ type K = I;
13
//~^ NOTE: aliases cannot be used for traits
14
impl K for isize {} //~ ERROR: `K` is not a trait
15
//~| is not a trait
16
+
17
+use ImportError; //~ ERROR unresolved
18
+impl ImportError for () {} // check that this is not an additional error (c.f. #35142)
19
20
fn main() {}
0 commit comments