From 2c2a7a186655f316c90739ba122321e36ad49066 Mon Sep 17 00:00:00 2001 From: UserIsntAvailable Date: Mon, 5 Feb 2024 13:26:47 -0500 Subject: [PATCH] test: fix `disallow_renaming_for_non_local_definition` to follow PR changes. --- crates/ide/src/rename.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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", ); }