mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 02:43:45 +00:00
Rename stock solver to classic
This commit is contained in:
parent
1e81f9a47f
commit
8b0f43b19d
@ -556,8 +556,8 @@ pub enum PrintRequest {
|
||||
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub enum TraitSolver {
|
||||
/// Stock trait solver in `rustc_trait_selection::traits::select`
|
||||
Stock,
|
||||
/// Classic trait solver in `rustc_trait_selection::traits::select`
|
||||
Classic,
|
||||
/// Chalk trait solver
|
||||
Chalk,
|
||||
/// Experimental trait solver in `rustc_trait_selection::solve`
|
||||
|
@ -383,7 +383,7 @@ mod desc {
|
||||
pub const parse_unpretty: &str = "`string` or `string=string`";
|
||||
pub const parse_treat_err_as_bug: &str = "either no value or a number bigger than 0";
|
||||
pub const parse_trait_solver: &str =
|
||||
"one of the supported solver modes (`stock`, `chalk`, or `next`)";
|
||||
"one of the supported solver modes (`classic`, `chalk`, or `next`)";
|
||||
pub const parse_lto: &str =
|
||||
"either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted";
|
||||
pub const parse_linker_plugin_lto: &str =
|
||||
@ -884,9 +884,11 @@ mod parse {
|
||||
|
||||
pub(crate) fn parse_trait_solver(slot: &mut TraitSolver, v: Option<&str>) -> bool {
|
||||
match v {
|
||||
Some("stock") => *slot = TraitSolver::Stock,
|
||||
Some("classic") => *slot = TraitSolver::Classic,
|
||||
Some("chalk") => *slot = TraitSolver::Chalk,
|
||||
Some("next") => *slot = TraitSolver::Next,
|
||||
// default trait solver is subject to change..
|
||||
Some("default") => *slot = TraitSolver::Classic,
|
||||
_ => return false,
|
||||
}
|
||||
true
|
||||
@ -1619,8 +1621,8 @@ options! {
|
||||
"for every macro invocation, print its name and arguments (default: no)"),
|
||||
track_diagnostics: bool = (false, parse_bool, [UNTRACKED],
|
||||
"tracks where in rustc a diagnostic was emitted"),
|
||||
trait_solver: TraitSolver = (TraitSolver::Stock, parse_trait_solver, [TRACKED],
|
||||
"specify the trait solver mode used by rustc (default: stock)"),
|
||||
trait_solver: TraitSolver = (TraitSolver::Classic, parse_trait_solver, [TRACKED],
|
||||
"specify the trait solver mode used by rustc (default: classic)"),
|
||||
// Diagnostics are considered side-effects of a query (see `QuerySideEffects`) and are saved
|
||||
// alongside query results and changes to translation options can affect diagnostics - so
|
||||
// translation options should be tracked.
|
||||
|
@ -32,7 +32,7 @@ pub trait TraitEngineExt<'tcx> {
|
||||
impl<'tcx> TraitEngineExt<'tcx> for dyn TraitEngine<'tcx> {
|
||||
fn new(tcx: TyCtxt<'tcx>) -> Box<Self> {
|
||||
match tcx.sess.opts.unstable_opts.trait_solver {
|
||||
TraitSolver::Stock => Box::new(FulfillmentContext::new()),
|
||||
TraitSolver::Classic => Box::new(FulfillmentContext::new()),
|
||||
TraitSolver::Chalk => Box::new(ChalkFulfillmentContext::new()),
|
||||
TraitSolver::Next => Box::new(NextFulfillmentCtxt::new()),
|
||||
}
|
||||
@ -40,7 +40,7 @@ impl<'tcx> TraitEngineExt<'tcx> for dyn TraitEngine<'tcx> {
|
||||
|
||||
fn new_in_snapshot(tcx: TyCtxt<'tcx>) -> Box<Self> {
|
||||
match tcx.sess.opts.unstable_opts.trait_solver {
|
||||
TraitSolver::Stock => Box::new(FulfillmentContext::new_in_snapshot()),
|
||||
TraitSolver::Classic => Box::new(FulfillmentContext::new_in_snapshot()),
|
||||
TraitSolver::Chalk => Box::new(ChalkFulfillmentContext::new_in_snapshot()),
|
||||
TraitSolver::Next => Box::new(NextFulfillmentCtxt::new()),
|
||||
}
|
||||
|
@ -174,7 +174,7 @@
|
||||
-Z tls-model=val -- choose the TLS model to use (`rustc --print tls-models` for details)
|
||||
-Z trace-macros=val -- for every macro invocation, print its name and arguments (default: no)
|
||||
-Z track-diagnostics=val -- tracks where in rustc a diagnostic was emitted
|
||||
-Z trait-solver=val -- specify the trait solver mode used by rustc (default: stock)
|
||||
-Z trait-solver=val -- specify the trait solver mode used by rustc (default: classic)
|
||||
-Z translate-additional-ftl=val -- additional fluent translation to preferentially use (for testing translation)
|
||||
-Z translate-directionality-markers=val -- emit directionality isolation markers in translated diagnostics
|
||||
-Z translate-lang=val -- language identifier for diagnostic output
|
||||
|
Loading…
Reference in New Issue
Block a user