Skip to content

Commit

Permalink
test: fix disallow_renaming_for_non_local_definition to follow PR c…
Browse files Browse the repository at this point in the history
…hanges.
  • Loading branch information
UserIsntAvailable committed Feb 5, 2024
1 parent 911f76e commit 2c2a7a1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions crates/ide/src/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
);
}

Expand Down

0 comments on commit 2c2a7a1

Please sign in to comment.