]> git.lizzy.rs Git - rust.git/commitdiff
Rename `-Z explain` to `-Z teach`
authorEsteban Küber <esteban@kuber.com.ar>
Tue, 23 Jan 2018 19:34:57 +0000 (11:34 -0800)
committerEsteban Küber <esteban@kuber.com.ar>
Tue, 23 Jan 2018 19:34:57 +0000 (11:34 -0800)
src/librustc/session/config.rs
src/librustc/session/mod.rs
src/librustc_typeck/structured_errors.rs

index 759e32abd60c42e229f102fecb9cdace649e2858..ac9c6ee91906ceea46f8318297d35a1d87d73953 100644 (file)
@@ -1122,7 +1122,7 @@ fn parse_optimization_fuel(slot: &mut Option<(String, u64)>, v: Option<&str>) ->
           "treat all errors that occur as bugs"),
     external_macro_backtrace: bool = (false, parse_bool, [UNTRACKED],
           "show macro backtraces even for non-local macros"),
-    explain: bool = (false, parse_bool, [TRACKED],
+    teach: bool = (false, parse_bool, [TRACKED],
           "show extended diagnostic help"),
     continue_parse_after_error: bool = (false, parse_bool, [TRACKED],
           "attempt to recover from parse errors (experimental)"),
index 995aef51cade7c890ea3fdc7606aa8c0e09b0907..4eff090b83ea60de743b41d3d13b68ddceeeca66 100644 (file)
@@ -832,8 +832,8 @@ pub fn thinlto(&self) -> bool {
         }
     }
 
-    pub fn explain(&self, code: &DiagnosticId) -> bool {
-        self.opts.debugging_opts.explain && !self.parse_sess.span_diagnostic.code_emitted(code)
+    pub fn teach(&self, code: &DiagnosticId) -> bool {
+        self.opts.debugging_opts.teach && !self.parse_sess.span_diagnostic.code_emitted(code)
     }
 }
 
index e9b96ed2d6439bdc63af4b7f30052009204b9010..afcdc7575a3cbe1c36cfc3528aea4481db0d2369 100644 (file)
@@ -22,7 +22,7 @@ pub trait StructuredDiagnostic<'tcx> {
 
     fn diagnostic(&self) -> DiagnosticBuilder<'tcx> {
         let err = self.common();
-        if self.session().explain(&self.code()) {
+        if self.session().teach(&self.code()) {
             self.extended(err)
         } else {
             self.regular(err)