Skip to content

implement #![feature(gca_adts)] - #163427

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
khyperia:gca-adts
Sep 29, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
khyperia:gca-adts

Conversation

@khyperia

@khyperia khyperia commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

View all comments

Tracking issue: #163420

r? @BoxyUwU

@rustbot

rustbot commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

HIR ty lowering was modified

cc @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 28, 2026
@rustbot

rustbot commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

@khyperia khyperia mentioned this pull request Sep 28, 2026
8 tasks

@bit-aloo bit-aloo left a comment •

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.

LGTM 🚀 . Few nits and question.

View changes since this review

Comment thread compiler/rustc_feature/src/unstable.rs Outdated
Comment thread src/doc/unstable-book/src/language-features/gca-adts.md Outdated
Comment thread compiler/rustc_ast_lowering/src/lib.rs Outdated
Comment thread compiler/rustc_ast_lowering/src/lib.rs Outdated
@rustbot

rustbot commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

changes to the core type system

cc @lcnr

Some changes occurred in const_evaluatable.rs

cc @BoxyUwU

Comment thread compiler/rustc_ast_lowering/src/lib.rs Outdated
const GCA_MIN_CONST_ITEMS: DirectConstArgContext = DirectConstArgContext::PATH_ANY;

/// These are allowed under `#![feature(gca_adts)]`
const GCA_ADTS: DirectConstArgContext = DirectConstArgContext::TUPLE_CALL

@BoxyUwU BoxyUwU Sep 28, 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.

I wonder if we want a PATH_CONST_CTOR to support e.g. gca!(None) without gca_const_items even though None is a const item. Probably

View changes since the review

@BoxyUwU BoxyUwU Sep 28, 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.

#![feature(
    gca_adts,
    adt_const_params,
    const_param_ty_unchecked,
    generic_const_parameter_types,
)]

use core::gca;

fn foo<T, const N: Option<T>>() {}
fn bar<T>() {
    foo::<T, gca!(None::<T>)>();
}

does this compile? it ought to but I don't think it will?

@khyperia khyperia Sep 28, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it does compile with PATH_CONST_CTOR! (it did not compile before I added support just now)

but see in the test I added, e.g. gca!(<MyOption>::MyNone) does not compile.

///
/// under `feature(gca_min_const_items)`, these may be inline consts as well, and should be
/// treated the same as anon consts.
/// under the generic const arg family of features, these may be inline consts as well, and

@BoxyUwU BoxyUwU Sep 28, 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.

is this even true anymore, we merged the defkinds right so there's no meaningful difference anymore

View changes since the review

@BoxyUwU

BoxyUwU commented Sep 28, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9e8ca58 has been tentatively approved by BoxyUwU

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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 Sep 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 28, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 28, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #158936 (Add `std::fs::{Home|Media}Dirs`)
 - #129036 (Additional NonZero conversions)
 - #158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - #161015 (Stabilize `funnel_shifts` (including `const`))
 - #161712 (Stabilize `Result::into_{ok,err}`)
 - #162493 (Add support for -Zsanitizer-cfi-minimal-runtime)
 - #162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - #162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - #163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - #163331 (Move `Arc` and `Rc` into `rcs` mod)
 - #163427 (implement #![feature(gca_adts)])
 - #163428 (do not complain about unstable target features on nightly)
 - #163444 (Add `stable_rustc` helper in `run-make-support`)
 - #163447 (Allow using different index types when reading and writing to tables)
 - #163450 (Force the correct type variable to never for method resolution on an adjusted never type)
tgross35 added a commit to tgross35/rust that referenced this pull request Sep 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
Rollup of 9 pull requests

Successful merges:

 - #161015 (Stabilize `funnel_shifts` (including `const`))
 - #161712 (Stabilize `Result::into_{ok,err}`)
 - #162493 (Add support for -Zsanitizer-cfi-minimal-runtime)
 - #163427 (implement #![feature(gca_adts)])
 - #163390 (add `automatically_derived` attribute documentation)
 - #163428 (do not complain about unstable target features on nightly)
 - #163444 (Add `stable_rustc` helper in `run-make-support`)
 - #163447 (Allow using different index types when reading and writing to tables)
 - #163459 (Stabilize vec_try_remove)
@rust-bors
rust-bors Bot merged commit e7ac0de into rust-lang:main Sep 29, 2026
13 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Sep 29, 2026
@khyperia
khyperia deleted the gca-adts branch September 29, 2026 07:24
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 30, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#161015 (Stabilize `funnel_shifts` (including `const`))
 - rust-lang/rust#161712 (Stabilize `Result::into_{ok,err}`)
 - rust-lang/rust#162493 (Add support for -Zsanitizer-cfi-minimal-runtime)
 - rust-lang/rust#163427 (implement #![feature(gca_adts)])
 - rust-lang/rust#163390 (add `automatically_derived` attribute documentation)
 - rust-lang/rust#163428 (do not complain about unstable target features on nightly)
 - rust-lang/rust#163444 (Add `stable_rustc` helper in `run-make-support`)
 - rust-lang/rust#163447 (Allow using different index types when reading and writing to tables)
 - rust-lang/rust#163459 (Stabilize vec_try_remove)
pull Bot pushed a commit to xtqqczze/rust-lang-rustc-dev-guide that referenced this pull request Sep 30, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#161015 (Stabilize `funnel_shifts` (including `const`))
 - rust-lang/rust#161712 (Stabilize `Result::into_{ok,err}`)
 - rust-lang/rust#162493 (Add support for -Zsanitizer-cfi-minimal-runtime)
 - rust-lang/rust#163427 (implement #![feature(gca_adts)])
 - rust-lang/rust#163390 (add `automatically_derived` attribute documentation)
 - rust-lang/rust#163428 (do not complain about unstable target features on nightly)
 - rust-lang/rust#163444 (Add `stable_rustc` helper in `run-make-support`)
 - rust-lang/rust#163447 (Allow using different index types when reading and writing to tables)
 - rust-lang/rust#163459 (Stabilize vec_try_remove)
clarfonthey pushed a commit to clarfonthey/stdarch that referenced this pull request Sep 30, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#161015 (Stabilize `funnel_shifts` (including `const`))
 - rust-lang/rust#161712 (Stabilize `Result::into_{ok,err}`)
 - rust-lang/rust#162493 (Add support for -Zsanitizer-cfi-minimal-runtime)
 - rust-lang/rust#163427 (implement #![feature(gca_adts)])
 - rust-lang/rust#163390 (add `automatically_derived` attribute documentation)
 - rust-lang/rust#163428 (do not complain about unstable target features on nightly)
 - rust-lang/rust#163444 (Add `stable_rustc` helper in `run-make-support`)
 - rust-lang/rust#163447 (Allow using different index types when reading and writing to tables)
 - rust-lang/rust#163459 (Stabilize vec_try_remove)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants