Skip to content

implement formatting for super let#6952

Merged
ytmimi merged 1 commit into
rust-lang:mainfrom
bend-n:implement_formatting_4_super_let_items
Jun 26, 2026
Merged

implement formatting for super let#6952
ytmimi merged 1 commit into
rust-lang:mainfrom
bend-n:implement_formatting_4_super_let_items

Conversation

@bend-n

@bend-n bend-n commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

hi, i was just hoping to have my super lets format. hope this looks good!

@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Jun 25, 2026
@ytmimi

ytmimi commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Honestly, I didn't know super let was a thing. Is it stable?

@bend-n

bend-n commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

no, its unstable

@ytmimi

ytmimi commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Can you link me to the tracking issue?

@bend-n

bend-n commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

rust-lang/rust#139076

Comment thread src/items.rs
Comment on lines +68 to +69
let super_ = self.super_.is_some();
let let_ = if super_ { "super let " } else { "let " };

@ytmimi ytmimi Jun 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not something we need to resolve now, but if the user wrote super /* comment */ let, then this reformatting would completely remove the comment. Might be worth adding a FIXME comment for the potential comment loss.

View changes since the review

Comment thread tests/source/super_let.rs

@ytmimi ytmimi Jun 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's add a #![feature(super_let)] annotation here so that it's easier for us to tell that this is for an unstable feature.

View changes since the review

@ytmimi

ytmimi commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Jun 26, 2026
@rustbot

rustbot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@bend-n bend-n force-pushed the implement_formatting_4_super_let_items branch from a6fad3d to a42a04e Compare June 26, 2026 17:41
@bend-n bend-n force-pushed the implement_formatting_4_super_let_items branch from a42a04e to 61217c5 Compare June 26, 2026 17:42
@bend-n

bend-n commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: awaiting some action (such as code changes or more information) from the author. labels Jun 26, 2026
@ytmimi ytmimi merged commit a4b7687 into rust-lang:main Jun 26, 2026
26 checks passed
@rustbot rustbot added release-notes Needs an associated changelog entry and removed S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Jun 26, 2026
@bend-n bend-n deleted the implement_formatting_4_super_let_items branch June 27, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes Needs an associated changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants