Skip to content

Rename lazy_type_alias feature gate to checked_type_aliases - #158758

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
josetorrs:rename-lazy-type-alias
Jul 16, 2026
Merged

Rename lazy_type_alias feature gate to checked_type_aliases#158758
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
josetorrs:rename-lazy-type-alias

Conversation

@josetorrs

@josetorrsjosetorrs commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

View all comments

there's not an open issue for it, though happy to create one if desired, but this is the zulip thread. basically just did a cmd+shift+F on VSCode

r? @lcnr

cc: @BoxyUwU

@rustbotrustbot added A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 4, 2026
Comment on lines 1 to 2
#![feature(checked_free_type_aliases)]

@josetorrsjosetorrsJul 4, 2026

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

for these, the directory is tests/ui/lazy-type-alias/... but I wasn't sure if I should rename this TBH

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ideally, yes, since I named this directory after the feature name. It currently exercises both the "checkedness" and the "laziness" ("retainedness") of LTA.

@josetorrsjosetorrs changed the title Rename lazy_type_alias to checked_free_type_aliasesRename lazy_type_alias feature gate to checked_free_type_aliasesJul 4, 2026
@josetorrs
josetorrs marked this pull request as ready for review July 4, 2026 03:13
@rustbot

Copy link
Copy Markdown
Collaborator

HIR ty lowering was modified

cc @fmease

rustc-dev-guide is developed in its own repository. If possible, consider making this change to rust-lang/rustc-dev-guide instead.

cc @BoxyUwU, @tshepang

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 4, 2026
let ty = tcx.type_of(def_id).instantiate_identity();
let span = tcx.def_span(def_id);
if tcx.type_alias_is_lazy(def_id) {
if tcx.type_alias_is_free(def_id) {

@fmeasefmeaseJul 4, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All type aliases are free, that's their very nature. This function is returning (1) whether to check the type alias for well-formedness (2) whether to lower its use sites to an alias type instead of eagerly expanding them to the aliased type during HIR ty lowering.

This should probably say type_alias_is_checked.

If I split this feature into unchecked & checked in the future I guess I need to come up with a new way of expressing eager vs. lazy, maybe unretained vs. retained 🤔

View changes since the review

}
self.check_type_no_bounds(bounds, "this context");

if self.features.lazy_type_alias() {

@fmeasefmeaseJul 4, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(Personally speaking, I'm voting for checked_type_aliases, cc #t-types/lazy-type-alias > name bikeshed @ 💬)

View changes since the review

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.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

the poll is unanimous with renaming to checked_type_alias. I think I should be good with changing it along with renaming the test directory per #158758 (comment) to tests/ui/checked-type-alias/... (?) and this rename

I didn't vote in the poll as I didn't want to pretend I 100% fully understood everything haha

Comment on lines 1 to 2
#![feature(checked_free_type_aliases)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ideally, yes, since I named this directory after the feature name. It currently exercises both the "checkedness" and the "laziness" ("retainedness") of LTA.

deny_since: None,
},
Lint {
label: "lazy_type_alias",

@ChayimFriedman2ChayimFriedman2Jul 4, 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.

Please do not change this file. It is auto-generated.

View changes since the review

@ShoyuVanillaShoyuVanillaJul 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please remove the changes to this file completely, e.g., by interactive rebase-editing the commit 49c4377 or squashing commits rather than adding another commit undoing it?
We do sync this repository with rust-lang/rust-analyzer bidirectionally and the cleaner history helps it being done automatically without hassle 😄

@rustbotrustbot added S-waiting-on-author Status: This is 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 Jul 4, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

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

@josetorrs
josetorrsforce-pushed the rename-lazy-type-alias branch from 06051f4 to e47a599CompareJuly 7, 2026 02:04
@rustbot

This comment has been minimized.

@josetorrs
josetorrsforce-pushed the rename-lazy-type-alias branch from e47a599 to d6a0757CompareJuly 7, 2026 02:09
@rust-log-analyzer

This comment has been minimized.

@josetorrs
josetorrsforce-pushed the rename-lazy-type-alias branch from d6a0757 to c3cbfbeCompareJuly 7, 2026 12:18
@rust-bors

This comment has been minimized.

@josetorrs
josetorrsforce-pushed the rename-lazy-type-alias branch from c3cbfbe to 583deecCompareJuly 13, 2026 14:19
@rustbot

This comment has been minimized.

@josetorrsjosetorrs changed the title Rename lazy_type_alias feature gate to checked_free_type_aliasesRename lazy_type_alias feature gate to checked_type_aliasesJul 13, 2026
@josetorrs
josetorrsforce-pushed the rename-lazy-type-alias branch from 7cf1cba to 526787dCompareJuly 15, 2026 15:52
@josetorrs

Copy link
Copy Markdown
ContributorAuthor

@bors r=lcnr

@rust-bors

rust-borsBot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@josetorrs: 🔑 Insufficient privileges: not in review users

@josetorrs

josetorrs commented Jul 15, 2026

Copy link
Copy Markdown
ContributorAuthor

r=me after minor issue

@lcnr ah I don't have bors privileges. (though tbh not too familiar with bors)

@lcnr

lcnr commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup=iffy (touches lots of files)

@rust-bors

rust-borsBot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 526787d has been approved by lcnr

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 Jul 16, 2026
jdonszelmann added a commit to jdonszelmann/rust that referenced this pull request Jul 16, 2026
…r=lcnr
Rename `lazy_type_alias` feature gate to `checked_type_aliases`
there's not an open issue for it, though happy to create one if desired, but [this](https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/ask.20for.20help.3A.20rename.20.60lazy_type_alias.60.20feature/near/608089932) is the zulip thread. basically just did a cmd+shift+F on VSCode
r? @lcnr
cc: @BoxyUwU
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 16, 2026
…r=lcnr
Rename `lazy_type_alias` feature gate to `checked_type_aliases`
there's not an open issue for it, though happy to create one if desired, but [this](https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/ask.20for.20help.3A.20rename.20.60lazy_type_alias.60.20feature/near/608089932) is the zulip thread. basically just did a cmd+shift+F on VSCode
r? @lcnr
cc: @BoxyUwU
This was referenced Jul 16, 2026
rust-borsBot pushed a commit that referenced this pull request Jul 16, 2026
…uwer
Rollup of 18 pull requests
Successful merges:
- #150679 (dirfd file operations (2/4))
- #158758 (Rename `lazy_type_alias` feature gate to `checked_type_aliases` )
- #159177 (Explicitly materialize debuginfo tests for all debuggers)
- #159392 (Update Rust crate rand to v0.9.3 [SECURITY])
- #159393 (Update Rust crate rkyv to v0.8.16 [SECURITY])
- #159394 (Update Rust crate tar to v0.4.46 [SECURITY])
- #159395 (Update Rust crate tracing-subscriber [SECURITY])
- #159193 (Port compiletest's CLI to clap)
- #158992 (Shorten types more when only interesting part is lifetimes)
- #159226 (Track extra_lifetime_params_map per-owner)
- #159273 (tidy: document u64 limit for numeric sort keys)
- #159322 (Fix safety doc in intrinsics::simd)
- #159329 (Fix the stale metrics directory warning)
- #159357 (Add regression tests for two fixed issues)
- #159360 (Remove FIXMEs referencing #44232)
- #159375 (make a couple codegen-llvm tests compatible with 2021 edition)
- #159381 (emit `(lldb)` prefix to make commands more distinct)
- #159396 (Update actions/checkout action to v7)
@rust-bors
rust-borsBot merged commit d55ab96 into rust-lang:mainJul 16, 2026
13 checks passed
github-actionsBot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jul 20, 2026
…uwer
Rollup of 18 pull requests
Successful merges:
- rust-lang/rust#150679 (dirfd file operations (2/4))
- rust-lang/rust#158758 (Rename `lazy_type_alias` feature gate to `checked_type_aliases` )
- rust-lang/rust#159177 (Explicitly materialize debuginfo tests for all debuggers)
- rust-lang/rust#159392 (Update Rust crate rand to v0.9.3 [SECURITY])
- rust-lang/rust#159393 (Update Rust crate rkyv to v0.8.16 [SECURITY])
- rust-lang/rust#159394 (Update Rust crate tar to v0.4.46 [SECURITY])
- rust-lang/rust#159395 (Update Rust crate tracing-subscriber [SECURITY])
- rust-lang/rust#159193 (Port compiletest's CLI to clap)
- rust-lang/rust#158992 (Shorten types more when only interesting part is lifetimes)
- rust-lang/rust#159226 (Track extra_lifetime_params_map per-owner)
- rust-lang/rust#159273 (tidy: document u64 limit for numeric sort keys)
- rust-lang/rust#159322 (Fix safety doc in intrinsics::simd)
- rust-lang/rust#159329 (Fix the stale metrics directory warning)
- rust-lang/rust#159357 (Add regression tests for two fixed issues)
- rust-lang/rust#159360 (Remove FIXMEs referencing rust-lang/rust#44232)
- rust-lang/rust#159375 (make a couple codegen-llvm tests compatible with 2021 edition)
- rust-lang/rust#159381 (emit `(lldb)` prefix to make commands more distinct)
- rust-lang/rust#159396 (Update actions/checkout action to v7)
@cuvipercuviper added this to the 1.99.0 milestone Jul 20, 2026
annejan added a commit to annejan/bevy_gaussian_splatting that referenced this pull request Jul 31, 2026
rust-lang/rust#158758 renamed the `lazy_type_alias` nightly feature gate to
`checked_type_aliases`; nightlies from ≈2026-07-19 on reject the old name
with E0557, which breaks `nightly_generic_alias` builds on any current
nightly. One-word change in the lib.rs cfg_attr.
Requires a post-rename nightly (older ones don't know the new name, E0635) —
martin's rust-toolchain.toml pin moves in lockstep (nightly-2026-07-30).
Upstream will need the same fix.
annejan added a commit to annejan/martin that referenced this pull request Jul 31, 2026
The 3-month-old pin was due; done deliberately + fully re-verified per the
rust-toolchain.toml policy, well before the Evoke deadline.
Two things the newer nightly forced, both small:
- rust-lang/rust#158758 RENAMED the `lazy_type_alias` feature gate to
`checked_type_aliases`, so bevy_gaussian_splatting's
`nightly_generic_alias` feature failed E0557 on any post-rename nightly.
Fixed in the fork (martin-tightcut §11, one word in lib.rs); the git rev
pin moves 608c7d1 → f94855a. Upstream will need the same fix.
- New clippy lint `chunks_exact_to_as_chunks`: 4 sites (stereo→mono
averaging in audio/analyze.rs, triangle-index walks in mesh.rs +
scene/gl_dissolve.rs) now use `as_chunks::<N>()` — same shape, and the
compiler gets constant-size chunks.
Docs: DESIGN.md / Cargo.toml fork comments §1–10 → §1–11,
OPTIMIZATION-BACKLOG.md pinned-rev note.
Verified on nightly-2026-07-30: build --release (sh0 AND sh3),
fmt --check, clippy -D warnings, 176 tests, reuse lint,
`martin --validate`.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
mosure pushed a commit to mosure/bevy_gaussian_splatting that referenced this pull request Aug 1, 2026
* fix: rename feature gate lazy_type_alias -> checked_type_aliases
rust-lang/rust#158758 renamed the `lazy_type_alias` nightly feature gate
to `checked_type_aliases`; nightlies from ~2026-07-19 on reject the old
name with E0557 ("feature has been removed ... renamed"), which breaks
every build with the `nightly_generic_alias` feature (on by default).
Note this flips the nightly floor: the new name is unknown to pre-rename
nightlies (E0635), so `nightly_generic_alias` now requires a nightly from
~2026-07-19 or later. Verified with `cargo check` on nightly-2026-07-30.
* ci: bump RUST_TOOLCHAIN to nightly-2026-07-30 + fix new clippy lints
The gate rename requires a post-2026-07-19 nightly, so move the CI pin
from nightly-2026-06-20 to nightly-2026-07-30 (build/clippy/test/
deploy-pages workflows).
That nightly's clippy adds `chunks_exact_to_as_chunks`; -D warnings hits
four sites (raycast triangle walk, thumbnail-tool pixel loops, the
visibility-render test) — converted to `as_chunks::<N>()`, same shape.
Verified locally on nightly-2026-07-30:
- cargo clippy --all-features --all-targets -- -D warnings
- cargo fmt --all --check
- cargo test (default) and --no-default-features --features "web io_ply tooling"
- cargo check --no-default-features --features web --target wasm32-unknown-unknown
deniallugo-ml added a commit to matter-labs/zksync-airbender that referenced this pull request Aug 20, 2026
Bumps the pinned toolchain from nightly-2026-02-10 to nightly-2026-08-09
(rustc 1.99.0-nightly, 771916f90) and fixes the resulting breakage.
`u32::widening_mul` now returns the full u64 product instead of a
(low, high) tuple, so the `.1` in both mulhu implementations no longer
compiles. mulhu wants the high half, which is now an explicit shift.
Verified against a reference `((a as u64 * b as u64) >> 32) as u32` over
edge cases including u32::MAX * u32::MAX and 0x8000_0000 * 2.
`lazy_type_alias` was removed and renamed to `checked_type_aliases`
(rust-lang/rust#158758). The gate is still needed, so it is just renamed.
Also updates the toolchain hardcoded in .github/workflows/{ci.yml,
test-gpu.yaml} and tools/reproduce/Dockerfile. Those take precedence over
the rust-toolchain file, so without this CI would keep building with
nightly-2026-02-10 and the pin bump would have no effect.
Verified:
cargo check --workspace --lib --bins --exclude fuzzing
cargo check --workspace --all-targets --exclude gpu_prover --exclude fuzzing
both 0 errors, and cargo fmt --all --check is clean with no changes.
Exclusions are local-environment limits (no cmake, no CUDA toolkit),
both of which CI covers.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
deniallugo-ml added a commit to matter-labs/zksync-airbender that referenced this pull request Aug 21, 2026
Bumps the pinned toolchain from nightly-2026-02-10 to nightly-2026-08-09
(rustc 1.99.0-nightly, 771916f90) in rust-toolchain.toml,
tools/verifier/rust-toolchain.toml, both workflows and tools/reproduce's
Dockerfile. The workflow and Dockerfile values take precedence over the
rust-toolchain file, so they have to move together.
Source changes the newer compiler requires:
* `u32::widening_mul` now returns the full u64 product instead of a
(low, high) tuple, so `.1` no longer compiles in either mulhu. mulhu wants
the high half, which is now an explicit shift; verified against a reference
`((a as u64 * b as u64) >> 32) as u32` over edge cases including
u32::MAX * u32::MAX and 0x8000_0000 * 2. The method also has its own
`widening_mul` gate again rather than `bigint_helper_methods`.
* `lazy_type_alias` was removed and renamed to `checked_type_aliases`
(rust-lang/rust#158758). The gate is still needed, so it is just renamed.
* `riscv_transpiler` asked for `serial_test = "*"`, which resolves to 4.0.1
and requires rustc 1.93.1. Narrowed to "3", matching every other crate.
Cargo.lock is gitignored here, so the constraint has to live in Cargo.toml.
* The miri job now clears rustflags, like the six other jobs in this workflow
already do. Otherwise the action defaults to -Dwarnings and, under miri's
cfg, target-gated features in `field` and elsewhere read as unused, turning
`unused_features` into a hard error.
Verified with ZKSYNC_USE_CUDA_STUBS=1:
cargo check --workspace --all-targets --exclude gpu_prover --exclude fuzzing
0 errors; cargo fmt --all --check clean; `cargo miri test -p riscv_transpiler
-- miri_` passes. `fuzzing` needs cmake and gpu_prover's benches need a real
CUDA toolkit, both of which CI provides.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fmeasefmease added the F-checked_type_aliases `#![feature(checked_type_aliases)]` (formerly: `lazy_type_alias`) label Aug 22, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guideArea: rustc-dev-guideF-checked_type_aliases`#![feature(checked_type_aliases)]` (formerly: `lazy_type_alias`)S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rust-analyzerRelevant to the rust-analyzer team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants

@josetorrs@rustbot@rust-log-analyzer@lcnr@ShoyuVanilla@fmease@ChayimFriedman2@cuviper