Merge #8450
8450: Don't ignore unnamed consts when looking for definitions r=Veykril a=Veykril Fixes #8448 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
343b14f7e0
@ -80,6 +80,10 @@ impl ChildBySource for ModuleId {
|
||||
impl ChildBySource for ItemScope {
|
||||
fn child_by_source_to(&self, db: &dyn DefDatabase, res: &mut DynMap) {
|
||||
self.declarations().for_each(|item| add_module_def(db, res, item));
|
||||
self.unnamed_consts().for_each(|konst| {
|
||||
let src = konst.lookup(db).source(db);
|
||||
res[keys::CONST].insert(src, konst);
|
||||
});
|
||||
self.impls().for_each(|imp| add_impl(db, res, imp));
|
||||
|
||||
fn add_module_def(db: &dyn DefDatabase, map: &mut DynMap, item: ModuleDefId) {
|
||||
|
@ -30,7 +30,7 @@ pub(crate) fn remove_dbg(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
|
||||
if new_contents.is_empty() {
|
||||
match_ast! {
|
||||
match it {
|
||||
ast::BlockExpr(it) => {
|
||||
ast::BlockExpr(_it) => {
|
||||
macro_call.syntax()
|
||||
.prev_sibling_or_token()
|
||||
.and_then(whitespace_start)
|
||||
|
Loading…
x
Reference in New Issue
Block a user