Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a new config to allow renaming of non-local defs #16391

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

alibektas
Copy link
Member

With #15656 we started disallowing renaming of non-local items. Although this makes sense there are some false positives that impacted users' workflows. So this config aims to mitigate this by giving users the liberty to disable this feature.

The reason why this is a draft is that I saw one of the tests fail and I am not sure if the "got" result even syntactically makes sense

Test case is :

check(
            "Baz",
            r#"
//- /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::Baz;"
);
Left:
use lib::Baz;

Right:
use lib::Baz;Baz

Diff:
use lib::Baz;Baz

With rust-lang#15656 we started disallowing renaming of non-local items.
Although this makes sense there are some false positives that
impacted users' workflows. So this config aims to mitigate this
by giving users the liberty to disable this feature.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 17, 2024
@alibektas alibektas changed the title Add a new config to allow renaming of non-local items Add a new config to allow renaming of non-local defs Jan 17, 2024
@Veykril
Copy link
Member

Veykril commented Jan 18, 2024

The test runner was not aware of renames affecting multiple files so it just concatenated the changes. I fixed that and pushed it to your branch.

@alibektas alibektas marked this pull request as ready for review January 18, 2024 12:51
@Veykril
Copy link
Member

Veykril commented Jan 18, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 18, 2024

📌 Commit 2102091 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 18, 2024

⌛ Testing commit 2102091 with merge a5b89ff...

@bors
Copy link
Contributor

bors commented Jan 18, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing a5b89ff to master...

@bors bors merged commit a5b89ff into rust-lang:master Jan 18, 2024
10 checks passed
@lnicola lnicola changed the title Add a new config to allow renaming of non-local defs feat: Add a new config to allow renaming of non-local defs Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants