fn emit_diagnostic(&mut self, _: &Diagnostic) {}
}
-/// maximum number of lines we will print for each error; arbitrary.
+/// Maximum number of lines we will print for each error; arbitrary.
pub const MAX_HIGHLIGHT_LINES: usize = 6;
-/// maximum number of suggestions to be shown
+/// 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 mimmics the regular diagnostic output, where irrelevant code lines are ellided.
+pub const MAX_SUGGESTION_HIGHLIGHT_LINES: usize = 20;
+/// Maximum number of suggestions to be shown
///
/// Arbitrary, but taken from trait import suggestion limit
pub const MAX_SUGGESTIONS: usize = 4;
draw_col_separator_no_space(&mut buffer, 1, max_line_num_len + 1);
let mut line_pos = 0;
let mut lines = complete.lines();
- for line in lines.by_ref().take(MAX_HIGHLIGHT_LINES) {
+ for line in lines.by_ref().take(MAX_SUGGESTION_HIGHLIGHT_LINES) {
// Print the span column to avoid confusion
buffer.puts(
row_num,
LL | eq::< dyn for<'a> Foo<(&'a isize,), Output=(&'a isize, &'a isize)>,
LL | dyn Foo(&isize) -> (&isize, &isize) >();
LL |
- ...
+LL | let _: dyn Foo(&isize, &usize) -> &'lifetime usize;
+ |
error: aborting due to previous error