Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler/rustc_ast_passes/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ pub(crate) struct ImplFnConst {

#[derive(Diagnostic)]
#[diag("`feature(generic_const_exprs)` is not supported with the next-generation trait solver")]
#[note("`-Znext-solver=globally` is currently enabled by default for testing")]
#[note("`-Znext-solver=globally` has recently been enabled by default")]
#[note("reverted the setting to `-Znext-solver=coherence` for this crate")]
#[note("the currently stable trait solver will be used for this crate")]
#[note("the old trait solver will be used for this crate")]
#[note("see issues #160895 <https://github.com/rust-lang/rust/issues/160895> for more information")]
pub(crate) struct NextSolverDisabledForGenericConstExprs {
#[primary_span]
Expand All @@ -52,9 +52,9 @@ pub(crate) struct NextSolverDisabledForGenericConstExprs {
#[derive(Diagnostic)]
#[diag("`-Zhigher-ranked-assumptions` is not supported with the next-generation trait solver")]
#[note("the feature flag will be superseded by `-Zassumptions-on-binders`")]
#[note("`-Znext-solver=globally` is currently enabled by default for testing")]
#[note("`-Znext-solver=globally` has recently been enabled by default")]
#[note("reverted the setting to `-Znext-solver=coherence` for this crate")]
#[note("the currently stable trait solver will be used for this crate")]
#[note("the old trait solver will be used for this crate")]
#[note("see issues #160895 <https://github.com/rust-lang/rust/issues/160895> for more information")]
pub(crate) struct NextSolverDisabledForHigherRankedAssumptions;

Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_interface/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,13 +855,7 @@ fn test_unstable_options_tracking_hash() {
tracked!(mir_opt_level, Some(4));
tracked!(mir_preserve_ub, true);
tracked!(move_size_limit, Some(4096));

// tidy-alphabetical-end
// FIXME(#160895): We don't test this when the next-solver is enabled by default.
if option_env!("CFG_DEFAULT_NEXT_SOLVER_GLOBALLY").is_none() {
tracked!(next_solver, NextSolverConfig::Globally);
}
// tidy-alphabetical-start
tracked!(next_solver, NextSolverConfig::Coherence);
tracked!(no_generate_arange_section, true);
tracked!(no_link, true);
tracked!(no_profiler_runtime, true);
Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,15 +1046,9 @@ pub enum NextSolverConfig {
Globally,
}

// FIXME(#160895): Using -Znext-solver as default on nightly
// See https://github.com/rust-lang/compiler-team/issues/1014
impl Default for NextSolverConfig {
fn default() -> Self {
if option_env!("CFG_DEFAULT_NEXT_SOLVER_GLOBALLY").is_some() {
Self::Globally
} else {
Self::Coherence
}
Self::Globally
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1371,9 +1371,8 @@ fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelec

let nightly = builder.config.channel == "nightly" || builder.config.channel == "dev";
if nightly {
// We want to enable Polonius Alpha and Next Trait Solver by default on nighty
// We want to enable Polonius Alpha by default on nighty
cargo.env("CFG_DEFAULT_POLONIUS_NEXT", "1");
cargo.env("CFG_DEFAULT_NEXT_SOLVER_GLOBALLY", "1");
}

// These conditionals represent a tension between three forces:
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3390,7 +3390,7 @@ fn markdown_test(builder: &Builder<'_>, compiler: Compiler, markdown: &Path) ->
builder.do_if_verbose(|| println!("doc tests for: {}", markdown.display()));
let mut cmd = builder.rustdoc_cmd(compiler);
builder.add_rust_test_threads(&mut cmd);
// FIXME(#160895): While the new solver is enabled by default on nightly,
// FIXME(#160895): While the new solver is already enabled by default,
// we don't want to use it in our tests for now.
cmd.arg("-Znext-solver=coherence");
// allow for unstable options such as new editions
Expand Down Expand Up @@ -3479,7 +3479,7 @@ fn run_cargo_test<'a>(
_ => compiler.stage + 1,
};

// FIXME(#160895): While the new solver is enabled by default on nightly,
// FIXME(#160895): While the new solver is already enabled by default,
// we don't want to use it in our tests for now.
cargo.rustdocflag("-Znext-solver=coherence");

Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl TestContext {
"-Ainternal_features",
"-Zui-testing",
"-Zdeduplicate-diagnostics=no",
// FIXME(#160895): While the new solver is enabled by default on nightly,
// FIXME(#160895): While the new solver is already enabled by default,
// we don't want to use it in our tests for now.
"-Znext-solver=coherence",
"-Dwarnings",
Expand Down Expand Up @@ -343,7 +343,7 @@ fn run_ui_cargo(cx: &TestContext) {
config.program.out_dir_flag = CommandBuilder::cargo().out_dir_flag;
config.program.args = vec!["clippy".into(), "--color".into(), "never".into(), "--quiet".into()];
config.program.envs.extend([
// FIXME(#160895): While the new solver is enabled by default on nightly,
// FIXME(#160895): While the new solver is already enabled by default,
// we don't want to use it in our tests for now.
("RUSTFLAGS".into(), Some("-Dwarnings -Znext-solver=coherence".into())),
("CARGO_INCREMENTAL".into(), Some("0".into())),
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ impl<'test> TestCx<'test> {
.arg(file_to_doc)
.arg("-A")
.arg("internal_features")
// FIXME(#160895): While the new solver is enabled by default on nightly,
// FIXME(#160895): While the new solver is already enabled by default,
// we don't want to use it in our tests for now.
.arg("-Znext-solver=coherence")
.args(&self.props.compile_flags)
Expand Down Expand Up @@ -1932,7 +1932,7 @@ impl<'test> TestCx<'test> {
},
}

// FIXME(#160895): While the new solver is enabled by default on nightly,
// FIXME(#160895): While the new solver is already enabled by default,
// we don't want to use it in our tests for now.
compiler.args(["-Znext-solver=coherence"]);

Expand Down
2 changes: 1 addition & 1 deletion src/tools/lint-docs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ impl<'a> LintExtractor<'a> {
cmd.arg(format!("--edition={edition}"));
// Just in case this is an unstable edition.
cmd.arg("-Zunstable-options");
// FIXME(#160895): While the new solver is enabled by default on nightly,
// FIXME(#160895): While the new solver is already enabled by default,
// we don't want to use it in our tests for now.
cmd.arg("-Znext-solver=coherence");
cmd.arg("--error-format=json");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
warning: `-Zhigher-ranked-assumptions` is not supported with the next-generation trait solver
|
= note: the feature flag will be superseded by `-Zassumptions-on-binders`
= note: `-Znext-solver=globally` is currently enabled by default for testing
= note: `-Znext-solver=globally` has recently been enabled by default
= note: reverted the setting to `-Znext-solver=coherence` for this crate
= note: the currently stable trait solver will be used for this crate
= note: the old trait solver will be used for this crate
= note: see issues #160895 <https://github.com/rust-lang/rust/issues/160895> for more information

warning: 1 warning emitted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ warning: `feature(generic_const_exprs)` is not supported with the next-generatio
LL | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-Znext-solver=globally` is currently enabled by default for testing
= note: `-Znext-solver=globally` has recently been enabled by default
= note: reverted the setting to `-Znext-solver=coherence` for this crate
= note: the currently stable trait solver will be used for this crate
= note: the old trait solver will be used for this crate
= note: see issues #160895 <https://github.com/rust-lang/rust/issues/160895> for more information

warning: union `AsBytes` is never used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ warning: `feature(generic_const_exprs)` is not supported with the next-generatio
LL | #![feature(const_trait_impl, generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-Znext-solver=globally` is currently enabled by default for testing
= note: `-Znext-solver=globally` has recently been enabled by default
= note: reverted the setting to `-Znext-solver=coherence` for this crate
= note: the currently stable trait solver will be used for this crate
= note: the old trait solver will be used for this crate
= note: see issues #160895 <https://github.com/rust-lang/rust/issues/160895> for more information

error[E0277]: the trait bound `T: const Trait` is not satisfied
Expand Down
Loading