]> git.lizzy.rs Git - rust.git/commitdiff
Add back MAX_SUGGESTION_HIGHLIGHT_LINES so clippy is happy & buildable
authorMaybe Waffle <waffle.lapkin@gmail.com>
Mon, 13 Jun 2022 14:28:31 +0000 (18:28 +0400)
committerMaybe Waffle <waffle.lapkin@gmail.com>
Thu, 16 Jun 2022 13:08:26 +0000 (17:08 +0400)
compiler/rustc_errors/src/emitter.rs

index 690ba14e699752f48e2d75db52a0bb63c0312477..1329e3a0b959d9e7e4f89124ce626fe2cd336590 100644 (file)
@@ -656,6 +656,11 @@ fn emit_diagnostic(&mut self, d: &Diagnostic) {
     }
 }
 
+/// Maximum number of lines we will print for a multiline suggestion; arbitrary.
+///
+/// This should be replaced with a more involved mechanism to output multiline suggestions that
+/// more closely mimics the regular diagnostic output, where irrelevant code lines are elided.
+pub const MAX_SUGGESTION_HIGHLIGHT_LINES: usize = 6;
 /// Maximum number of suggestions to be shown
 ///
 /// Arbitrary, but taken from trait import suggestion limit