From 16709f032cfaa0b37a83bc798f0dd4a30d2b2c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sat, 25 Jan 2020 12:26:33 -0800 Subject: [PATCH] Revert suggestion window size change --- src/librustc_errors/emitter.rs | 2 +- src/test/ui/issues/issue-22644.stderr | 3 +-- .../unboxed-closure-sugar-lifetime-elision.stderr | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index b62e4223fea10..7218730538a4b 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -462,7 +462,7 @@ pub const MAX_HIGHLIGHT_LINES: usize = 6; /// /// 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 elided. -pub const MAX_SUGGESTION_HIGHLIGHT_LINES: usize = 20; +pub const MAX_SUGGESTION_HIGHLIGHT_LINES: usize = 6; /// Maximum number of suggestions to be shown /// /// Arbitrary, but taken from trait import suggestion limit diff --git a/src/test/ui/issues/issue-22644.stderr b/src/test/ui/issues/issue-22644.stderr index 105cf73652586..2bddcc2ba56ce 100644 --- a/src/test/ui/issues/issue-22644.stderr +++ b/src/test/ui/issues/issue-22644.stderr @@ -74,8 +74,7 @@ LL | LL | as LL | LL | -LL | usize) - | + ... error: `<` is interpreted as a start of generic arguments for `usize`, not a shift --> $DIR/issue-22644.rs:32:31 diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr index 469425ea44ded..0a028e44919a6 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr @@ -13,8 +13,7 @@ LL | dyn Foo(&isize) -> &isize >(); 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