Skip to content

Use field init shorthand where possible#134443

Merged
bors merged 1 commit into
rust-lang:masterfrom
joshtriplett:use-field-init-shorthand
Dec 18, 2024
Merged

Use field init shorthand where possible#134443
bors merged 1 commit into
rust-lang:masterfrom
joshtriplett:use-field-init-shorthand

Conversation

@joshtriplett

@joshtriplett joshtriplett commented Dec 17, 2024

Copy link
Copy Markdown
Member

Field init shorthand allows writing initializers like tcx: tcx as
tcx. The compiler already uses it extensively. Fix the last few places
where it isn't yet used.

EDIT: this PR also updates rustfmt.toml to set
use_field_init_shorthand = true.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself CI-spurious-fail-msvc CI spurious failure: target env msvc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.