use rustc::ty::{self, DefIdTree};
use rustc::util::nodemap::FxHashSet;
use syntax::ast::{self, Ident, Path};
-use syntax::ext::base::MacroKind;
+use syntax_expand::base::MacroKind;
use syntax::feature_gate::BUILTIN_ATTRIBUTES;
use syntax::source_map::SourceMap;
use syntax::struct_span_err;
names: &mut Vec<TypoSuggestion>,
filter_fn: &impl Fn(Res) -> bool,
) {
- for (&(ident, _), resolution) in self.resolutions(module).borrow().iter() {
+ for (key, resolution) in self.resolutions(module).borrow().iter() {
if let Some(binding) = resolution.borrow().binding {
let res = binding.res();
if filter_fn(res) {
- names.push(TypoSuggestion::from_res(ident.name, res));
+ names.push(TypoSuggestion::from_res(key.ident.name, res));
}
}
}
span, "`Self` in type parameter default".to_string());
err
}
- ResolutionError::ConstParamDependentOnTypeParam => {
- let mut err = struct_span_err!(
- self.session,
- span,
- E0671,
- "const parameters cannot depend on type parameters"
- );
- err.span_label(span, format!("const parameter depends on type parameter"));
- err
- }
}
}
}
let resolutions = self.r.resolutions(crate_module).borrow();
- let resolution = resolutions.get(&(ident, MacroNS))?;
+ let resolution = resolutions.get(&self.r.new_key(ident, MacroNS))?;
let binding = resolution.borrow().binding()?;
if let Res::Def(DefKind::Macro(MacroKind::Bang), _) = binding.res() {
let module_name = crate_module.kind.name().unwrap();