Skip to content

properly deny combining GCE and GCA - #161525

Open
cyrgani wants to merge 1 commit into
rust-lang:mainfrom
cyrgani:no-gce
Open

cyrgani wants to merge 1 commit into
rust-lang:mainfrom
cyrgani:no-gce

Conversation

@cyrgani

@cyrgani cyrgani commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Previously, enabling generic_const_exprs disabled the next solver, but also enabling generic_const_args was not rejected even though it required the next solver.

Fixes #161523.

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

rustbot commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 21 candidates

@fee1-dead fee1-dead 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.

It would be nice to include the original ICE in the test suite also.

View changes since this review


#![feature(min_generic_const_args)]
#![feature(generic_const_args)]
//~^ ERROR:`generic_const_args` requires -Znext-solver=globally to be enabled

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.

Suggested change
//~^ ERROR:`generic_const_args` requires -Znext-solver=globally to be enabled
//~^ ERROR: `generic_const_args` requires -Znext-solver=globally to be enabled


fn check_features_requiring_new_solver(sess: &Session, features: &Features) {
if sess.opts.unstable_opts.next_solver.globally {
if sess.opts.unstable_opts.next_solver.globally && !features.generic_const_exprs() {

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.

Are we sure this is the right way to do it? Shouldn't we really just emit an error when GCE and next_solver are both enabled instead of a warning? Downgrading next solver to coherence only appears the wrong approach.

What if we removed GCE as a feature?

@rustbot rustbot 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 Aug 26, 2026
@rustbot

rustbot commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

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

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: cannot call const_of_item on a non-type_const

3 participants