Skip to content

Commit 482f7f1

Browse files
committed
Rename -Z explain to -Z teach
1 parent 3dac0f5 commit 482f7f1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: src/librustc/session/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
11221122
"treat all errors that occur as bugs"),
11231123
external_macro_backtrace: bool = (false, parse_bool, [UNTRACKED],
11241124
"show macro backtraces even for non-local macros"),
1125-
explain: bool = (false, parse_bool, [TRACKED],
1125+
teach: bool = (false, parse_bool, [TRACKED],
11261126
"show extended diagnostic help"),
11271127
continue_parse_after_error: bool = (false, parse_bool, [TRACKED],
11281128
"attempt to recover from parse errors (experimental)"),

Diff for: src/librustc/session/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,8 @@ impl Session {
832832
}
833833
}
834834

835-
pub fn explain(&self, code: &DiagnosticId) -> bool {
836-
self.opts.debugging_opts.explain && !self.parse_sess.span_diagnostic.code_emitted(code)
835+
pub fn teach(&self, code: &DiagnosticId) -> bool {
836+
self.opts.debugging_opts.teach && !self.parse_sess.span_diagnostic.code_emitted(code)
837837
}
838838
}
839839

Diff for: src/librustc_typeck/structured_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub trait StructuredDiagnostic<'tcx> {
2222

2323
fn diagnostic(&self) -> DiagnosticBuilder<'tcx> {
2424
let err = self.common();
25-
if self.session().explain(&self.code()) {
25+
if self.session().teach(&self.code()) {
2626
self.extended(err)
2727
} else {
2828
self.regular(err)

0 commit comments

Comments
 (0)