about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/emitter.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-02-27 21:09:45 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-03-07 17:55:08 +0000
commitd975bd3a67e4f18c02f57d8d66a9d32daa295a47 (patch)
treec6b830817863cc5afa18dd7afad27c9881e72e69 /compiler/rustc_errors/src/emitter.rs
parent03eb45452305f2d52348279d0caa5fc1f12c438d (diff)
downloadrust-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.
Diffstat (limited to 'compiler/rustc_errors/src/emitter.rs')
-rw-r--r--compiler/rustc_errors/src/emitter.rs11
1 files changed, 0 insertions, 11 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,
-                    );
-                }
                 _ => {}
             }
         }