Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4ed1197

Browse files
committed
Version 3
Remove scope_for_def calls as the definition have been removed entirely. As a result of this change the problem with false path resolutions has been solved.
1 parent 19a9de7 commit 4ed1197

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ide-assists/src/handlers/generate_delegate_trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ fn generate_impl(
294294
};
295295

296296
let target = ctx.sema.scope(strukt.strukt.syntax()).unwrap();
297-
let source = ctx.sema.scope_for_def(delegee.0);
297+
let source = ctx.sema.scope(source.syntax()).unwrap();
298298

299299
let transform =
300300
PathTransform::trait_impl(&target, &source, delegee.0, delegate.clone());
@@ -342,7 +342,7 @@ fn generate_impl(
342342
});
343343

344344
let target = ctx.sema.scope(strukt.strukt.syntax()).unwrap();
345-
let source = ctx.sema.scope_for_def(delegee.0);
345+
let source = ctx.sema.scope(source.syntax()).unwrap();
346346

347347
let transform =
348348
PathTransform::trait_impl(&target, &source, delegee.0, delegate.clone());

0 commit comments

Comments
 (0)