Skip to content

fix: offer promote-local-to-const in macro call and proc macro#22589

Open
eihqnh wants to merge 1 commit into
rust-lang:masterfrom
eihqnh:fix-pltc
Open

fix: offer promote-local-to-const in macro call and proc macro#22589
eihqnh wants to merge 1 commit into
rust-lang:masterfrom
eihqnh:fix-pltc

Conversation

@eihqnh

@eihqnh eihqnh commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

change

  1. support promote local to const inside macro expansions
  2. add record field shorthand macro boundary guard
  3. add two new tests
  4. change some code style

example

 #[tokio::main]
 async fn main() {
//ide-assist promote local to const is not working
    let x$0 = 0; 
    let _ = x;
}

//after
const X: i32 = 0;
let _ = X; 

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 14, 2026
@eihqnh eihqnh force-pushed the fix-pltc branch 3 times, most recently from 206956e to 7d3c29b Compare June 15, 2026 00:26
@rustbot

This comment has been minimized.

@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

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.

2 participants