Skip to content

Commit 8b0f43b

Browse files
Rename stock solver to classic
1 parent 1e81f9a commit 8b0f43b

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

compiler/rustc_session/src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ pub enum PrintRequest {
556556

557557
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
558558
pub enum TraitSolver {
559-
/// Stock trait solver in `rustc_trait_selection::traits::select`
560-
Stock,
559+
/// Classic trait solver in `rustc_trait_selection::traits::select`
560+
Classic,
561561
/// Chalk trait solver
562562
Chalk,
563563
/// Experimental trait solver in `rustc_trait_selection::solve`

compiler/rustc_session/src/options.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ mod desc {
383383
pub const parse_unpretty: &str = "`string` or `string=string`";
384384
pub const parse_treat_err_as_bug: &str = "either no value or a number bigger than 0";
385385
pub const parse_trait_solver: &str =
386-
"one of the supported solver modes (`stock`, `chalk`, or `next`)";
386+
"one of the supported solver modes (`classic`, `chalk`, or `next`)";
387387
pub const parse_lto: &str =
388388
"either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted";
389389
pub const parse_linker_plugin_lto: &str =
@@ -884,9 +884,11 @@ mod parse {
884884

885885
pub(crate) fn parse_trait_solver(slot: &mut TraitSolver, v: Option<&str>) -> bool {
886886
match v {
887-
Some("stock") => *slot = TraitSolver::Stock,
887+
Some("classic") => *slot = TraitSolver::Classic,
888888
Some("chalk") => *slot = TraitSolver::Chalk,
889889
Some("next") => *slot = TraitSolver::Next,
890+
// default trait solver is subject to change..
891+
Some("default") => *slot = TraitSolver::Classic,
890892
_ => return false,
891893
}
892894
true
@@ -1619,8 +1621,8 @@ options! {
16191621
"for every macro invocation, print its name and arguments (default: no)"),
16201622
track_diagnostics: bool = (false, parse_bool, [UNTRACKED],
16211623
"tracks where in rustc a diagnostic was emitted"),
1622-
trait_solver: TraitSolver = (TraitSolver::Stock, parse_trait_solver, [TRACKED],
1623-
"specify the trait solver mode used by rustc (default: stock)"),
1624+
trait_solver: TraitSolver = (TraitSolver::Classic, parse_trait_solver, [TRACKED],
1625+
"specify the trait solver mode used by rustc (default: classic)"),
16241626
// Diagnostics are considered side-effects of a query (see `QuerySideEffects`) and are saved
16251627
// alongside query results and changes to translation options can affect diagnostics - so
16261628
// translation options should be tracked.

compiler/rustc_trait_selection/src/traits/engine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ pub trait TraitEngineExt<'tcx> {
3232
impl<'tcx> TraitEngineExt<'tcx> for dyn TraitEngine<'tcx> {
3333
fn new(tcx: TyCtxt<'tcx>) -> Box<Self> {
3434
match tcx.sess.opts.unstable_opts.trait_solver {
35-
TraitSolver::Stock => Box::new(FulfillmentContext::new()),
35+
TraitSolver::Classic => Box::new(FulfillmentContext::new()),
3636
TraitSolver::Chalk => Box::new(ChalkFulfillmentContext::new()),
3737
TraitSolver::Next => Box::new(NextFulfillmentCtxt::new()),
3838
}
3939
}
4040

4141
fn new_in_snapshot(tcx: TyCtxt<'tcx>) -> Box<Self> {
4242
match tcx.sess.opts.unstable_opts.trait_solver {
43-
TraitSolver::Stock => Box::new(FulfillmentContext::new_in_snapshot()),
43+
TraitSolver::Classic => Box::new(FulfillmentContext::new_in_snapshot()),
4444
TraitSolver::Chalk => Box::new(ChalkFulfillmentContext::new_in_snapshot()),
4545
TraitSolver::Next => Box::new(NextFulfillmentCtxt::new()),
4646
}

src/test/rustdoc-ui/z-help.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
-Z tls-model=val -- choose the TLS model to use (`rustc --print tls-models` for details)
175175
-Z trace-macros=val -- for every macro invocation, print its name and arguments (default: no)
176176
-Z track-diagnostics=val -- tracks where in rustc a diagnostic was emitted
177-
-Z trait-solver=val -- specify the trait solver mode used by rustc (default: stock)
177+
-Z trait-solver=val -- specify the trait solver mode used by rustc (default: classic)
178178
-Z translate-additional-ftl=val -- additional fluent translation to preferentially use (for testing translation)
179179
-Z translate-directionality-markers=val -- emit directionality isolation markers in translated diagnostics
180180
-Z translate-lang=val -- language identifier for diagnostic output

0 commit comments

Comments
 (0)