Skip to content

Commit e2bba07

Browse files
committed
Fix list length
1 parent 883b93c commit e2bba07

28 files changed

+225
-1
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
@@ -1813,7 +1813,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
18131813
}
18141814

18151815
let len = impl_candidates.len();
1816-
let end = if impl_candidates.len() <= 5 { impl_candidates.len() } else { 4 };
1816+
let end = if impl_candidates.len() <= 9 { impl_candidates.len() } else { 8 };
18171817

18181818
let normalize = |candidate| {
18191819
self.tcx.infer_ctxt().enter(|ref infcx| {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ 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>>
1317
and 49 others
1418

1519
error: aborting due to previous error

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ 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>
2428
and 68 others
2529
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
2630

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ 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>>
1317
and 568 others
1418

1519
error[E0277]: no implementation for `{integer} >> &str`
@@ -24,6 +28,10 @@ LL | 22 >> p.str;
2428
<&'a i128 as Shr<i16>>
2529
<&'a i128 as Shr<i32>>
2630
<&'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>>
2735
and 568 others
2836

2937
error[E0277]: no implementation for `{integer} >> &Panolpy`
@@ -38,6 +46,10 @@ LL | 22 >> p;
3846
<&'a i128 as Shr<i16>>
3947
<&'a i128 as Shr<i32>>
4048
<&'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>>
4153
and 568 others
4254

4355
error[E0308]: mismatched types

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ 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>>
1216
and 248 others
1317

1418
error: aborting due to previous error

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ 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>>
1923
and 48 others
2024

2125
error: aborting due to 2 previous errors

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ 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>>
1923
and 48 others
2024

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

src/test/ui/consts/too_generic_eval_ice.stderr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ 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]>>
2933
and 3 others
3034

3135
error: aborting due to 3 previous errors

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ 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>>
1214

1315
error: aborting due to previous error
1416

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ 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>>
1419

1520
error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied
1621
--> $DIR/issue-39802-show-5-trait-impls.rs:25:21
@@ -25,6 +30,11 @@ LL | Foo::<i32>::bar(&1u8);
2530
<u8 as Foo<u16>>
2631
<u8 as Foo<u32>>
2732
<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>>
2838

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

4355
error: aborting due to 3 previous errors
4456

0 commit comments

Comments
 (0)