Skip to content

Commit 746c9b4

Browse files
committed
Revert "Fix list length"
This reverts commit e2bba07.
1 parent 5a93f38 commit 746c9b4

28 files changed

+1
-225
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
18191819
}
18201820

18211821
let len = impl_candidates.len();
1822-
let end = if impl_candidates.len() <= 9 { impl_candidates.len() } else { 8 };
1822+
let end = if impl_candidates.len() <= 5 { impl_candidates.len() } else { 4 };
18231823

18241824
let normalize = |candidate| {
18251825
self.tcx.infer_ctxt().enter(|ref infcx| {

src/test/ui/binop/binop-mul-i32-f32.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ LL | x * y
1010
<&i32 as Mul<&i32>>
1111
<i32 as Mul<&i32>>
1212
<i32 as Mul>
13-
<&'a f32 as Mul<f32>>
14-
<&'a f64 as Mul<f64>>
15-
<&'a i128 as Mul<i128>>
16-
<&'a i16 as Mul<i16>>
1713
and 49 others
1814

1915
error: aborting due to previous error

src/test/ui/binop/issue-77910-1.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ LL | assert_eq!(foo, y);
2121
<extern "C" fn(A) -> Ret as Debug>
2222
<extern "C" fn(A, ...) -> Ret as Debug>
2323
<extern "C" fn(A, B) -> Ret as Debug>
24-
<extern "C" fn(A, B, ...) -> Ret as Debug>
25-
<extern "C" fn(A, B, C) -> Ret as Debug>
26-
<extern "C" fn(A, B, C, ...) -> Ret as Debug>
27-
<extern "C" fn(A, B, C, D) -> Ret as Debug>
2824
and 68 others
2925
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
3026

src/test/ui/binop/shift-various-bad-types.stderr

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ LL | 22 >> p.char;
1010
<&'a i128 as Shr<i16>>
1111
<&'a i128 as Shr<i32>>
1212
<&'a i128 as Shr<i64>>
13-
<&'a i128 as Shr<i8>>
14-
<&'a i128 as Shr<isize>>
15-
<&'a i128 as Shr<u128>>
16-
<&'a i128 as Shr<u16>>
1713
and 568 others
1814

1915
error[E0277]: no implementation for `{integer} >> &str`
@@ -28,10 +24,6 @@ LL | 22 >> p.str;
2824
<&'a i128 as Shr<i16>>
2925
<&'a i128 as Shr<i32>>
3026
<&'a i128 as Shr<i64>>
31-
<&'a i128 as Shr<i8>>
32-
<&'a i128 as Shr<isize>>
33-
<&'a i128 as Shr<u128>>
34-
<&'a i128 as Shr<u16>>
3527
and 568 others
3628

3729
error[E0277]: no implementation for `{integer} >> &Panolpy`
@@ -46,10 +38,6 @@ LL | 22 >> p;
4638
<&'a i128 as Shr<i16>>
4739
<&'a i128 as Shr<i32>>
4840
<&'a i128 as Shr<i64>>
49-
<&'a i128 as Shr<i8>>
50-
<&'a i128 as Shr<isize>>
51-
<&'a i128 as Shr<u128>>
52-
<&'a i128 as Shr<u16>>
5341
and 568 others
5442

5543
error[E0308]: mismatched types

src/test/ui/const-generics/exhaustive-value.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ LL | <() as Foo<N>>::test()
99
<() as Foo<100_u8>>
1010
<() as Foo<101_u8>>
1111
<() as Foo<102_u8>>
12-
<() as Foo<103_u8>>
13-
<() as Foo<104_u8>>
14-
<() as Foo<105_u8>>
15-
<() as Foo<106_u8>>
1612
and 248 others
1713

1814
error: aborting due to previous error

src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ LL | = [0; (i8::MAX + 1u8) as usize];
1616
<&i8 as Add<&i8>>
1717
<i8 as Add<&i8>>
1818
<i8 as Add>
19-
<&'a f32 as Add<f32>>
20-
<&'a f64 as Add<f64>>
21-
<&'a i128 as Add<i128>>
22-
<&'a i16 as Add<i16>>
2319
and 48 others
2420

2521
error: aborting due to 2 previous errors

src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ LL | : [u32; (i8::MAX as i8 + 1u8) as usize]
1616
<&i8 as Add<&i8>>
1717
<i8 as Add<&i8>>
1818
<i8 as Add>
19-
<&'a f32 as Add<f32>>
20-
<&'a f64 as Add<f64>>
21-
<&'a i128 as Add<i128>>
22-
<&'a i16 as Add<i16>>
2319
and 48 others
2420

2521
error[E0604]: only `u8` can be cast as `char`, not `i8`

src/test/ui/consts/too_generic_eval_ice.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ LL | [5; Self::HOST_SIZE] == [6; 0]
2626
<&[T] as PartialEq<Vec<U, A>>>
2727
<&mut [B] as PartialEq<[A; N]>>
2828
<&mut [T] as PartialEq<Vec<U, A>>>
29-
<[A; N] as PartialEq<&[B]>>
30-
<[A; N] as PartialEq<&mut [B]>>
31-
<[A; N] as PartialEq<[B; N]>>
32-
<[A; N] as PartialEq<[B]>>
3329
and 3 others
3430

3531
error: aborting due to 3 previous errors

src/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ LL | f1.foo(1usize);
99
<Bar as Foo<i32>>
1010
<Bar as Foo<i8>>
1111
<Bar as Foo<u16>>
12-
<Bar as Foo<u32>>
13-
<Bar as Foo<u8>>
1412

1513
error: aborting due to previous error
1614

src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ LL | Foo::<i32>::bar(&1i8);
1111
<i8 as Foo<u16>>
1212
<i8 as Foo<u32>>
1313
<i8 as Foo<u64>>
14-
<i8 as Foo<u8>>
15-
<u8 as Foo<bool>>
16-
<u8 as Foo<u16>>
17-
<u8 as Foo<u32>>
18-
<u8 as Foo<u64>>
1914

2015
error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied
2116
--> $DIR/issue-39802-show-5-trait-impls.rs:25:21
@@ -30,11 +25,6 @@ LL | Foo::<i32>::bar(&1u8);
3025
<u8 as Foo<u16>>
3126
<u8 as Foo<u32>>
3227
<u8 as Foo<u64>>
33-
<i8 as Foo<bool>>
34-
<i8 as Foo<u16>>
35-
<i8 as Foo<u32>>
36-
<i8 as Foo<u64>>
37-
<i8 as Foo<u8>>
3828

3929
error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied
4030
--> $DIR/issue-39802-show-5-trait-impls.rs:26:21
@@ -49,8 +39,6 @@ LL | Foo::<i32>::bar(&true);
4939
<bool as Foo<i8>>
5040
<bool as Foo<u16>>
5141
<bool as Foo<u32>>
52-
<bool as Foo<u64>>
53-
<bool as Foo<u8>>
5442

5543
error: aborting due to 3 previous errors
5644

src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ LL | const UNIVERSAL_GRAVITATIONAL_CONSTANT: f64 = 6.674e−11; // m³⋅kg⁻¹
2727
<&'a f64 as Sub<f64>>
2828
<&'a i128 as Sub<i128>>
2929
<&'a i16 as Sub<i16>>
30-
<&'a i32 as Sub<i32>>
31-
<&'a i64 as Sub<i64>>
32-
<&'a i8 as Sub<i8>>
33-
<&'a isize as Sub<isize>>
3430
and 48 others
3531

3632
error: aborting due to 3 previous errors

src/test/ui/impl-trait/equality.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ LL | n + sum_to(n - 1)
2929
<&u32 as Add<&u32>>
3030
<u32 as Add<&u32>>
3131
<u32 as Add>
32-
<&'a f32 as Add<f32>>
33-
<&'a f64 as Add<f64>>
34-
<&'a i128 as Add<i128>>
35-
<&'a i16 as Add<i16>>
3632
and 48 others
3733

3834
error: aborting due to 2 previous errors; 1 warning emitted

src/test/ui/issues/issue-11771.stderr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ LL | 1 +
1010
<&'a f64 as Add<f64>>
1111
<&'a i128 as Add<i128>>
1212
<&'a i16 as Add<i16>>
13-
<&'a i32 as Add<i32>>
14-
<&'a i64 as Add<i64>>
15-
<&'a i8 as Add<i8>>
16-
<&'a isize as Add<isize>>
1713
and 48 others
1814

1915
error[E0277]: cannot add `()` to `{integer}`
@@ -28,10 +24,6 @@ LL | 1 +
2824
<&'a f64 as Add<f64>>
2925
<&'a i128 as Add<i128>>
3026
<&'a i16 as Add<i16>>
31-
<&'a i32 as Add<i32>>
32-
<&'a i64 as Add<i64>>
33-
<&'a i8 as Add<i8>>
34-
<&'a isize as Add<isize>>
3527
and 48 others
3628

3729
error: aborting due to 2 previous errors

src/test/ui/issues/issue-24352.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ LL | 1.0f64 - 1
1010
<&f64 as Sub<&f64>>
1111
<f64 as Sub<&f64>>
1212
<f64 as Sub>
13-
<&'a f32 as Sub<f32>>
14-
<&'a i128 as Sub<i128>>
15-
<&'a i16 as Sub<i16>>
16-
<&'a i32 as Sub<i32>>
1713
and 48 others
1814
help: consider using a floating-point literal by writing it with `.0`
1915
|

src/test/ui/issues/issue-50582.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ LL | Vec::<[(); 1 + for x in 0..1 {}]>::new();
1919
<&'a f64 as Add<f64>>
2020
<&'a i128 as Add<i128>>
2121
<&'a i16 as Add<i16>>
22-
<&'a i32 as Add<i32>>
23-
<&'a i64 as Add<i64>>
24-
<&'a i8 as Add<i8>>
25-
<&'a isize as Add<isize>>
2622
and 48 others
2723

2824
error: aborting due to 2 previous errors

src/test/ui/issues/issue-59488.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ LL | assert_eq!(Foo::Bar, i);
9999
<extern "C" fn(A) -> Ret as Debug>
100100
<extern "C" fn(A, ...) -> Ret as Debug>
101101
<extern "C" fn(A, B) -> Ret as Debug>
102-
<extern "C" fn(A, B, ...) -> Ret as Debug>
103-
<extern "C" fn(A, B, C) -> Ret as Debug>
104-
<extern "C" fn(A, B, C, ...) -> Ret as Debug>
105-
<extern "C" fn(A, B, C, D) -> Ret as Debug>
106102
and 68 others
107103
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
108104

src/test/ui/kindck/kindck-copy.stderr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ LL | assert_copy::<&'static mut isize>();
99
<f32 as Copy>
1010
<f64 as Copy>
1111
<i128 as Copy>
12-
<i16 as Copy>
13-
<i32 as Copy>
14-
<i64 as Copy>
15-
<i8 as Copy>
1612
and 6 others
1713
note: required by a bound in `assert_copy`
1814
--> $DIR/kindck-copy.rs:5:18
@@ -31,10 +27,6 @@ LL | assert_copy::<&'a mut isize>();
3127
<f32 as Copy>
3228
<f64 as Copy>
3329
<i128 as Copy>
34-
<i16 as Copy>
35-
<i32 as Copy>
36-
<i64 as Copy>
37-
<i8 as Copy>
3830
and 6 others
3931
note: required by a bound in `assert_copy`
4032
--> $DIR/kindck-copy.rs:5:18

src/test/ui/lexer/lex-bad-char-literals-6.stderr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ LL | if x == y {}
4343
<&'a str as PartialEq<String>>
4444
<&'b str as PartialEq<Cow<'a, str>>>
4545
<str as PartialEq<Cow<'a, str>>>
46-
<str as PartialEq<OsStr>>
47-
<str as PartialEq<OsString>>
48-
<str as PartialEq<String>>
49-
<str as PartialEq>
5046
and 4 others
5147

5248
error[E0308]: mismatched types
@@ -69,10 +65,6 @@ LL | if x == z {}
6965
<&'a str as PartialEq<String>>
7066
<&'b str as PartialEq<Cow<'a, str>>>
7167
<str as PartialEq<Cow<'a, str>>>
72-
<str as PartialEq<OsStr>>
73-
<str as PartialEq<OsString>>
74-
<str as PartialEq<String>>
75-
<str as PartialEq>
7668
and 4 others
7769

7870
error: aborting due to 6 previous errors

src/test/ui/mismatched_types/binops.stderr

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ LL | 1 + Some(1);
1010
<&'a f64 as Add<f64>>
1111
<&'a i128 as Add<i128>>
1212
<&'a i16 as Add<i16>>
13-
<&'a i32 as Add<i32>>
14-
<&'a i64 as Add<i64>>
15-
<&'a i8 as Add<i8>>
16-
<&'a isize as Add<isize>>
1713
and 48 others
1814

1915
error[E0277]: cannot subtract `Option<{integer}>` from `usize`
@@ -28,10 +24,6 @@ LL | 2 as usize - Some(1);
2824
<&usize as Sub<&usize>>
2925
<usize as Sub<&usize>>
3026
<usize as Sub>
31-
<&'a f32 as Sub<f32>>
32-
<&'a f64 as Sub<f64>>
33-
<&'a i128 as Sub<i128>>
34-
<&'a i16 as Sub<i16>>
3527
and 48 others
3628

3729
error[E0277]: cannot multiply `{integer}` by `()`
@@ -46,10 +38,6 @@ LL | 3 * ();
4638
<&'a f64 as Mul<f64>>
4739
<&'a i128 as Mul<i128>>
4840
<&'a i16 as Mul<i16>>
49-
<&'a i32 as Mul<i32>>
50-
<&'a i64 as Mul<i64>>
51-
<&'a i8 as Mul<i8>>
52-
<&'a isize as Mul<isize>>
5341
and 49 others
5442

5543
error[E0277]: cannot divide `{integer}` by `&str`
@@ -64,10 +52,6 @@ LL | 4 / "";
6452
<&'a f64 as Div<f64>>
6553
<&'a i128 as Div<i128>>
6654
<&'a i16 as Div<i16>>
67-
<&'a i32 as Div<i32>>
68-
<&'a i64 as Div<i64>>
69-
<&'a i8 as Div<i8>>
70-
<&'a isize as Div<isize>>
7155
and 54 others
7256

7357
error[E0277]: can't compare `{integer}` with `String`
@@ -82,10 +66,6 @@ LL | 5 < String::new();
8266
<f64 as PartialOrd>
8367
<i128 as PartialOrd>
8468
<i16 as PartialOrd>
85-
<i32 as PartialOrd>
86-
<i64 as PartialOrd>
87-
<i8 as PartialOrd>
88-
<isize as PartialOrd>
8969
and 6 others
9070

9171
error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
@@ -100,10 +80,6 @@ LL | 6 == Ok(1);
10080
<f64 as PartialEq>
10181
<i128 as PartialEq>
10282
<i16 as PartialEq>
103-
<i32 as PartialEq>
104-
<i64 as PartialEq>
105-
<i8 as PartialEq>
106-
<isize as PartialEq>
10783
and 6 others
10884

10985
error: aborting due to 6 previous errors

src/test/ui/never_type/issue-13352.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ LL | 2_usize + (loop {});
1010
<&usize as Add<&usize>>
1111
<usize as Add<&usize>>
1212
<usize as Add>
13-
<&'a f32 as Add<f32>>
14-
<&'a f64 as Add<f64>>
15-
<&'a i128 as Add<i128>>
16-
<&'a i16 as Add<i16>>
1713
and 48 others
1814

1915
error: aborting due to previous error

0 commit comments

Comments
 (0)