diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-02-27 21:09:45 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-03-07 17:55:08 +0000 |
| commit | d975bd3a67e4f18c02f57d8d66a9d32daa295a47 (patch) | |
| tree | c6b830817863cc5afa18dd7afad27c9881e72e69 | |
| parent | 03eb45452305f2d52348279d0caa5fc1f12c438d (diff) | |
| download | rust-d975bd3a67e4f18c02f57d8d66a9d32daa295a47.tar.gz rust-d975bd3a67e4f18c02f57d8d66a9d32daa295a47.zip | |
Remove highlighting of spans on `-Zteach`
`-Zteach` is perma-unstable, barely used, the highlighting logic buggy and the flag being passed around is tech-debt. We should likely remove `-Zteach` in its entirely.
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 1 | ||||
| -rw-r--r-- | src/librustdoc/core.rs | 1 |
3 files changed, 0 insertions, 13 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index f7f84239308..18846a6dbe1 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -616,7 +616,6 @@ pub struct HumanEmitter { #[setters(skip)] fallback_bundle: LazyFallbackBundle, short_message: bool, - teach: bool, ui_testing: bool, ignored_directories_in_source_blocks: Vec<String>, diagnostic_width: Option<usize>, @@ -642,7 +641,6 @@ impl HumanEmitter { fluent_bundle: None, fallback_bundle, short_message: false, - teach: false, ui_testing: false, ignored_directories_in_source_blocks: Vec::new(), diagnostic_width: None, @@ -1044,15 +1042,6 @@ impl HumanEmitter { underline.style, ); } - _ if self.teach => { - buffer.set_style_range( - line_offset, - (code_offset + annotation.start_col.display).saturating_sub(left), - (code_offset + annotation.end_col.display).saturating_sub(left), - underline.style, - annotation.is_primary, - ); - } _ => {} } } diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index aa1e9762f39..bcd9a73d9d3 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -930,7 +930,6 @@ fn default_emitter( .fluent_bundle(bundle) .sm(source_map) .short_message(short) - .teach(sopts.unstable_opts.teach) .diagnostic_width(sopts.diagnostic_width) .macro_backtrace(macro_backtrace) .track_diagnostics(track_diagnostics) diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index f95ae380fa8..719f1f978fe 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -160,7 +160,6 @@ pub(crate) fn new_dcx( HumanEmitter::new(stderr_destination(color_config), fallback_bundle) .sm(source_map.map(|sm| sm as _)) .short_message(short) - .teach(unstable_opts.teach) .diagnostic_width(diagnostic_width) .track_diagnostics(unstable_opts.track_diagnostics) .theme(if let HumanReadableErrorType::Unicode = kind { |
