about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-01-23 11:34:57 -0800
committerEsteban Küber <esteban@kuber.com.ar>2018-01-23 11:34:57 -0800
commit482f7f19785455242dc3dfe36858847dd6f280cf (patch)
tree17995b6991c13f3de36e3b8b1b4f7eca1b2fd375 /src
parent3dac0f5a9ce8864a06916d3e8017a9b2c5262ae7 (diff)
Rename `-Z explain` to `-Z teach`
Diffstat (limited to 'src')
-rw-r--r--src/librustc/session/config.rs2
-rw-r--r--src/librustc/session/mod.rs4
-rw-r--r--src/librustc_typeck/structured_errors.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 759e32abd60..ac9c6ee9190 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1122,7 +1122,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
           "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)"),
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
index 995aef51cad..4eff090b83e 100644
--- a/src/librustc/session/mod.rs
+++ b/src/librustc/session/mod.rs
@@ -832,8 +832,8 @@ impl Session {
         }
     }
 
-    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)
     }
 }
 
diff --git a/src/librustc_typeck/structured_errors.rs b/src/librustc_typeck/structured_errors.rs
index e9b96ed2d64..afcdc7575a3 100644
--- a/src/librustc_typeck/structured_errors.rs
+++ b/src/librustc_typeck/structured_errors.rs
@@ -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)