Rename lazy_type_alias feature gate to checked_type_aliases #158758
Conversation
| #![feature(checked_free_type_aliases)] | ||
|
|
There was a problem hiding this comment.
for these, the directory is tests/ui/lazy-type-alias/... but I wasn't sure if I should rename this TBH
There was a problem hiding this comment.
Ideally, yes, since I named this directory after the feature name. It currently exercises both the "checkedness" and the "laziness" ("retainedness") of LTA.
lazy_type_alias to checked_free_type_aliases lazy_type_alias feature gate to checked_free_type_aliases
|
HIR ty lowering was modified cc @fmease
cc @rust-lang/rust-analyzer This PR changes a file inside |
| 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) { |
There was a problem hiding this comment.
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 🤔
| } | ||
| self.check_type_no_bounds(bounds, "this context"); | ||
|
|
||
| if self.features.lazy_type_alias() { |
There was a problem hiding this comment.
(Personally speaking, I'm voting for checked_type_aliases, cc #t-types/lazy-type-alias > name bikeshed @ 💬)
There was a problem hiding this comment.
There was a problem hiding this comment.
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
| #![feature(checked_free_type_aliases)] | ||
|
|
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Please do not change this file. It is auto-generated.
There was a problem hiding this comment.
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 😄
|
Reminder, once the PR becomes ready for a review, use |
06051f4 to
e47a599
Compare
This comment has been minimized.
This comment has been minimized.
e47a599 to
d6a0757
Compare
This comment has been minimized.
This comment has been minimized.
d6a0757 to
c3cbfbe
Compare
This comment has been minimized.
This comment has been minimized.
c3cbfbe to
583deec
Compare
This comment has been minimized.
This comment has been minimized.
lazy_type_alias feature gate to checked_free_type_aliases lazy_type_alias feature gate to checked_type_aliases
6e62d29 to
a8d4284
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
|
|
||
| ## `tests/ui/checked-type-alias/` | ||
|
|
||
| Tests for `#![feature(checked_type_aliases)]`. See [Tracking issue for lazy type aliases #112792](https://github.com/rust-lang/rust/issues/112792). |
There was a problem hiding this comment.
| Tests for `#![feature(checked_type_aliases)]`. See [Tracking issue for lazy type aliases #112792](https://github.com/rust-lang/rust/issues/112792). | |
| Tests for `#![feature(checked_type_aliases)]`. See [Tracking issue for checked type aliases](https://github.com/rust-lang/rust/issues/112792). |
|
also needs a rebase |
47b5554 to
7cf1cba
Compare
|
This PR was rebased onto a different main 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. |
Co-authored-by: lcnr <rust@lcnr.de>
7cf1cba to
526787d
Compare
|
@bors r=lcnr |
|
@josetorrs: 🔑 Insufficient privileges: not in review users |
@lcnr ah I don't have bors privileges. (though tbh not too familiar with bors) |
|
@bors r+ rollup=iffy (touches lots of files) |
…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
…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
…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)
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