Fix macro expansion expression parenthesis wrapping

This commit is contained in:
Lukas Wirth 2023-12-02 13:03:46 +01:00
parent efa67294ed
commit d2a31acda1
18 changed files with 218 additions and 64 deletions

View file

@ -390,6 +390,7 @@ impl InferenceContext<'_> {
}
}
#[derive(Debug)]
enum ValuePathResolution {
// It's awkward to wrap a single ID in two enums, but we need both and this saves fallible
// conversion between them + `unwrap()`.

View file

@ -407,11 +407,7 @@ impl<'a> TyLoweringContext<'a> {
drop(expander);
let ty = self.lower_ty(&type_ref);
self.expander
.borrow_mut()
.as_mut()
.unwrap()
.exit(self.db.upcast(), mark);
self.expander.borrow_mut().as_mut().unwrap().exit(mark);
Some(ty)
}
_ => {

View file

@ -128,7 +128,6 @@ fn check_impl(ra_fixture: &str, allow_none: bool, only_types: bool, display_sour
None => continue,
};
let def_map = module.def_map(&db);
dbg!(def_map.dump(&db));
visit_module(&db, &def_map, module.local_id, &mut |it| defs.push(it));
}
defs.sort_by_key(|def| match def {