diff --git a/crates/ide/src/rename.rs b/crates/ide/src/rename.rs index b40a3f472019..9c5c7e3635b0 100644 --- a/crates/ide/src/rename.rs +++ b/crates/ide/src/rename.rs @@ -2703,7 +2703,8 @@ use qux as frob; //- /lib.rs crate:lib new_source_root:library pub struct S; //- /main.rs crate:main deps:lib new_source_root:local -use lib::S$0; +use lib::S; +fn main() { let _: S$0; } "#, "error: Cannot rename a non-local definition as the config for it is disabled", false, @@ -2715,9 +2716,13 @@ use lib::S$0; //- /lib.rs crate:lib new_source_root:library pub struct S; //- /main.rs crate:main deps:lib new_source_root:local -use lib::S$0; +use lib::S; +fn main() { let _: S$0; } +"#, + r#" +use lib::Baz; +fn main() { let _: Baz; } "#, - "use lib::Baz;\n", ); }