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.
This commit is contained in:
Ali Bektas 2023-06-17 21:27:52 +02:00
parent 19a9de72f6
commit 4ed1197662

View File

@ -294,7 +294,7 @@ fn generate_impl(
}; };
let target = ctx.sema.scope(strukt.strukt.syntax()).unwrap(); let target = ctx.sema.scope(strukt.strukt.syntax()).unwrap();
let source = ctx.sema.scope_for_def(delegee.0); let source = ctx.sema.scope(source.syntax()).unwrap();
let transform = let transform =
PathTransform::trait_impl(&target, &source, delegee.0, delegate.clone()); PathTransform::trait_impl(&target, &source, delegee.0, delegate.clone());
@ -342,7 +342,7 @@ fn generate_impl(
}); });
let target = ctx.sema.scope(strukt.strukt.syntax()).unwrap(); let target = ctx.sema.scope(strukt.strukt.syntax()).unwrap();
let source = ctx.sema.scope_for_def(delegee.0); let source = ctx.sema.scope(source.syntax()).unwrap();
let transform = let transform =
PathTransform::trait_impl(&target, &source, delegee.0, delegate.clone()); PathTransform::trait_impl(&target, &source, delegee.0, delegate.clone());