From 431040fe59e2b76f1901ca2bac1b04550ffafde4 Mon Sep 17 00:00:00 2001 From: Ali Bektas Date: Thu, 18 Jan 2024 22:29:36 +0100 Subject: [PATCH 1/3] Update bail message referencing config Even though we changed the name of the config I forgot to update the warning message that referenced it. --- crates/ide-db/src/rename.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide-db/src/rename.rs b/crates/ide-db/src/rename.rs index a6058b57f1..10fcef49a0 100644 --- a/crates/ide-db/src/rename.rs +++ b/crates/ide-db/src/rename.rs @@ -81,7 +81,7 @@ impl Definition { // Can we not rename non-local items? // Then bail if non-local if !rename_external && !krate.origin(sema.db).is_local() { - bail!("Cannot rename a non-local definition. Set `renameExternalItems` to `true` to allow renaming for this item.") + bail!("Cannot rename a non-local definition. Set `rename_allowExternalItems` to `true` to allow renaming for this item.") } } From 0becb6c8194d341d58784276f2ede926c1c198c3 Mon Sep 17 00:00:00 2001 From: Ali Bektas Date: Fri, 19 Jan 2024 14:33:40 +0100 Subject: [PATCH 2/3] Update crates/ide-db/src/rename.rs Co-authored-by: Lukas Wirth --- crates/ide-db/src/rename.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide-db/src/rename.rs b/crates/ide-db/src/rename.rs index 10fcef49a0..051dba0ec0 100644 --- a/crates/ide-db/src/rename.rs +++ b/crates/ide-db/src/rename.rs @@ -81,7 +81,7 @@ impl Definition { // Can we not rename non-local items? // Then bail if non-local if !rename_external && !krate.origin(sema.db).is_local() { - bail!("Cannot rename a non-local definition. Set `rename_allowExternalItems` to `true` to allow renaming for this item.") + bail!("Cannot rename a non-local definition as the config for it is disabled") } } From 0347f8124476d232537fff85c33ad065dcda8d76 Mon Sep 17 00:00:00 2001 From: Ali Bektas Date: Fri, 19 Jan 2024 15:01:46 +0100 Subject: [PATCH 3/3] Update tests --- crates/ide/src/rename.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ide/src/rename.rs b/crates/ide/src/rename.rs index 0446b4a4b6..9fce4bb0f8 100644 --- a/crates/ide/src/rename.rs +++ b/crates/ide/src/rename.rs @@ -2636,7 +2636,7 @@ pub struct S; //- /main.rs crate:main deps:lib new_source_root:local use lib::S$0; "#, - "error: Cannot rename a non-local definition. Set `renameExternalItems` to `true` to allow renaming for this item.", + "error: Cannot rename a non-local definition as the config for it is disabled", false, ); @@ -2663,7 +2663,7 @@ use core::hash::Hash; #[derive(H$0ash)] struct A; "#, - "error: Cannot rename a non-local definition. Set `renameExternalItems` to `true` to allow renaming for this item.", + "error: Cannot rename a non-local definition as the config for it is disabled", false, ); }