Skip to content

Conversation

@yotamofek
Copy link
Contributor

@yotamofek yotamofek commented Nov 1, 2025

cc #142312

@rustbot
Copy link
Collaborator

rustbot commented Nov 1, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
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 A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 1, 2025
Comment on lines 2608 to 2615
let (span, text) = match path.segments.first() {
Some(seg) if let Some(name) = seg.ident.as_str().strip_prefix("let") => {
// a special case for #117894
let name = name.strip_prefix('_').unwrap_or(name);
(ident_span, format!("let {name}"))
}
_ => (ident_span.shrink_to_lo(), "let ".to_string()),
let (span, text) = if let Some(seg) = path.segments.first()
&& let Some(name) = seg.ident.as_str().strip_prefix("let")
{
// a special case for #117894
let name = name.trim_prefix('_');
(ident_span, format!("let {name}"))
} else {
(ident_span.shrink_to_lo(), "let ".to_string())
};
Copy link
Member

Choose a reason for hiding this comment

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

I feel like match is better here in term of readability

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm a bit surprised, seemed like a clear win to me, but matter of style and taste obviously. It was a drive-by clean up so reverted it :)

@yotamofek yotamofek force-pushed the pr/dogfood-trim-prefix-suffix branch from eca96ee to d28dcc7 Compare November 2, 2025 14:55
@rustbot
Copy link
Collaborator

rustbot commented Nov 2, 2025

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.

@fee1-dead
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 4, 2025

📌 Commit d28dcc7 has been approved by fee1-dead

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 4, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 4, 2025
…uffix, r=fee1-dead

Dogfood `trim_{suffix|prefix}` in compiler

cc rust-lang#142312
bors added a commit that referenced this pull request Nov 4, 2025
Rollup of 5 pull requests

Successful merges:

 - #145314 (Tweak output of missing lifetime on associated type)
 - #147803 (Add -Zannotate-moves for profiler visibility of move/copy operations (codegen))
 - #147925 (Fix tests for big-endian)
 - #148341 (compiler: Fix a couple issues around cargo feature unification)
 - #148371 (Dogfood `trim_{suffix|prefix}` in compiler)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants