Expand weak alias types before collecting constrained/referenced late bound regions + refactorings by fmease · Pull Request #121344 · rust-lang/rust
added
S-waiting-on-review
labels
Feb 20, 2024
fmease
changed the title
Expand weak alias types before collecting constrained and referenced late bound regions + refactorings
Expand weak alias types before collecting constrained & referenced late bound regions + refactorings
fmease
changed the title
Expand weak alias types before collecting constrained & referenced late bound regions + refactorings
Expand weak alias types before collecting constrained/referenced late bound regions + refactorings
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Feb 20, 2024
bors
added
S-waiting-on-author
and removed S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.labels
Feb 20, 2024
bors
removed
the
S-waiting-on-author
label
Feb 20, 2024
bors
added
the
S-waiting-on-bors
label
Feb 20, 2024bors added a commit to rust-lang-ci/rust that referenced this pull request
Feb 20, 2024…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#119203 (Correct the simd_masked_{load,store} intrinsic docs) - rust-lang#121277 (Refactor trait implementations in `core::convert::num`.) - rust-lang#121322 (Don't ICE when hitting overflow limit in fulfillment loop in next solver) - rust-lang#121323 (Don't use raw parameter types in `find_builder_fn`) - rust-lang#121344 (Expand weak alias types before collecting constrained/referenced late bound regions + refactorings) - rust-lang#121350 (Fix stray trait mismatch in `resolve_associated_item` for `AsyncFn`) - rust-lang#121352 (docs: add missing "the" to `str::strip_prefix` doc) Failed merges: - rust-lang#121340 (bootstrap: apply most of clippy's suggestions) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Feb 21, 2024Rollup merge of rust-lang#121344 - fmease:lta-constr-by-input, r=oli-obk Expand weak alias types before collecting constrained/referenced late bound regions + refactorings Fixes rust-lang#114220. Follow-up to rust-lang#120780. r? `@oli-obk`
fmease
deleted the
lta-constr-by-input
branch
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
May 15, 2024…cts, r=compiler-errors Also expand weak alias tys inside consts inside `expand_weak_alias_tys` Ever since rust-lang#121344 has been merged, I couldn't let go of the fear that I might've slipped a tiny bug into rustc (:P). Checking the type flags of the `Const` is strictly more correct than only checking the ones of the `Const`'s `Ty`. I don't think it's possible to trigger an ICE rn (i.e., one of the two `bug!("unexpected weak alias type")` I added in branches where `expand_weak_alias_tys` should've expanded *all* weak alias tys) because presently const exprs aren't allowed to capture late-bound vars. To be future-proof however, we should iron this out. A possible reproducer would be the following if I'm not mistaken (currently fails to compile due to the aforementioned restriction): ```rs #![feature(lazy_type_alias, adt_const_params, generic_const_exprs)] type F = for<'a> fn(A<{ S::<Weak<'a>>(loop {}) }>) -> &'a (); type A<const N: S<Weak<'static>>> = (); #[derive(PartialEq, Eq, std::marker::ConstParamTy)] struct S<T>(T); type Weak<'a> = &'a (); ``` Whether a late-bound region should actually be considered constrained by a const expr is a separate question — one which we don't need to answer until / unless we actually allow them in such contexts (probable answer: only inside the return exprs of a block but not inside the stmts). r? oli-obk (he's not available rn but that's fine) or types or compiler
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
May 15, 2024Rollup merge of rust-lang#124990 - fmease:expand-weak-aliases-within-cts, r=compiler-errors Also expand weak alias tys inside consts inside `expand_weak_alias_tys` Ever since rust-lang#121344 has been merged, I couldn't let go of the fear that I might've slipped a tiny bug into rustc (:P). Checking the type flags of the `Const` is strictly more correct than only checking the ones of the `Const`'s `Ty`. I don't think it's possible to trigger an ICE rn (i.e., one of the two `bug!("unexpected weak alias type")` I added in branches where `expand_weak_alias_tys` should've expanded *all* weak alias tys) because presently const exprs aren't allowed to capture late-bound vars. To be future-proof however, we should iron this out. A possible reproducer would be the following if I'm not mistaken (currently fails to compile due to the aforementioned restriction): ```rs #![feature(lazy_type_alias, adt_const_params, generic_const_exprs)] type F = for<'a> fn(A<{ S::<Weak<'a>>(loop {}) }>) -> &'a (); type A<const N: S<Weak<'static>>> = (); #[derive(PartialEq, Eq, std::marker::ConstParamTy)] struct S<T>(T); type Weak<'a> = &'a (); ``` Whether a late-bound region should actually be considered constrained by a const expr is a separate question — one which we don't need to answer until / unless we actually allow them in such contexts (probable answer: only inside the return exprs of a block but not inside the stmts). r? oli-obk (he's not available rn but that's fine) or types or compiler
fmease
added
the
T-compiler
label
Oct 9, 2025This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters