Skip to content

Conversation

profetia
Copy link
Contributor

@profetia profetia commented Jun 20, 2025

Closes #15061

changelog: [let_unit_value] fix wrong suggestions for format macros

@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2025

r? @y21

rustbot has assigned @y21.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 20, 2025
@profetia
Copy link
Contributor Author

profetia commented Jul 4, 2025

r? clippy

@rustbot rustbot assigned Centri3 and unassigned y21 Jul 4, 2025
@profetia
Copy link
Contributor Author

r? clippy

@rustbot rustbot assigned llogiq and unassigned Centri3 Jul 14, 2025
let res = return_unit();
//~^ let_unit_value
do_something(res);
println!("{res:?}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to include a (non-machine-applicable) suggestion to remove this res as well? Then we could get rid of let res = entirely

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this PR as is. Further improvements can have their own PRs, as a treat.

@llogiq
Copy link
Contributor

llogiq commented Jul 27, 2025

Thank you!

@llogiq llogiq added this pull request to the merge queue Jul 27, 2025
Merged via the queue into rust-lang:master with commit 887b500 Jul 27, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The suggestion of let_unit_value is invalid when the value is used in formatted in print
6 participants