Skip to content

Commit 3b15424

Browse files
CoAlloc: tests
1 parent 4d65d80 commit 3b15424

File tree

9 files changed

+32
-20
lines changed

9 files changed

+32
-20
lines changed

tests/ui/const-generics/occurs-check/unused-substs-3.stderr

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ error[E0308]: mismatched types
22
--> $DIR/unused-substs-3.rs:16:9
33
|
44
LL | t = foo;
5-
| ^^^- help: try using a conversion method: `.to_vec()`
6-
| |
7-
| cyclic type of infinite size
5+
| ^^^ cyclic type of infinite size
6+
|
7+
help: try using a conversion method
8+
|
9+
LL | t = foo.to_vec();
10+
| +++++++++
11+
LL | t = foo.to_vec_co();
12+
| ++++++++++++
813

914
error: aborting due to previous error
1015

tests/ui/const-generics/occurs-check/unused-substs-5.stderr

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ error[E0308]: mismatched types
22
--> $DIR/unused-substs-5.rs:15:9
33
|
44
LL | x = q::<_, N>(x);
5-
| ^^^^^^^^^^^^- help: try using a conversion method: `.to_vec()`
6-
| |
7-
| cyclic type of infinite size
5+
| ^^^^^^^^^^^^ cyclic type of infinite size
6+
|
7+
help: try using a conversion method
8+
|
9+
LL | x = q::<_, N>(x).to_vec();
10+
| +++++++++
11+
LL | x = q::<_, N>(x).to_vec_co();
12+
| ++++++++++++
813

914
error: aborting due to previous error
1015

tests/ui/consts/too_generic_eval_ice.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ LL | [5; Self::HOST_SIZE] == [6; 0]
2323
= help: the trait `PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; Self::HOST_SIZE]`
2424
= help: the following other types implement trait `PartialEq<Rhs>`:
2525
<&[B] as PartialEq<[A; N]>>
26-
<&[T] as PartialEq<Vec<U, A>>>
26+
<&[T] as PartialEq<Vec<U, A, CO_ALLOC_PREF>>>
2727
<&mut [B] as PartialEq<[A; N]>>
28-
<&mut [T] as PartialEq<Vec<U, A>>>
28+
<&mut [T] as PartialEq<Vec<U, A, CO_ALLOC_PREF>>>
2929
<[A; N] as PartialEq<&[B]>>
3030
<[A; N] as PartialEq<&mut [B]>>
3131
<[A; N] as PartialEq<[B; N]>>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
thread 'main' panicked at 'capacity overflow', library/alloc/src/raw_vec.rs:525:5
1+
thread 'main' panicked at 'capacity overflow', library/alloc/src/raw_vec.rs:600:5
22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
let vec = Vec::new();
33
Vec::contains(&vec, &0);
4-
//~^ ERROR no function or associated item named `contains` found for struct `Vec<_, _>` in the current scope
4+
//~^ ERROR no function or associated item named `contains` found for struct `Vec<_, _, _>` in the current scope
55
//~| HELP the function `contains` is implemented on `[_]`
66
}

tests/ui/suggestions/deref-path-method.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0599]: no function or associated item named `contains` found for struct `Vec<_, _>` in the current scope
1+
error[E0599]: no function or associated item named `contains` found for struct `Vec<_, _, _>` in the current scope
22
--> $DIR/deref-path-method.rs:3:10
33
|
44
LL | Vec::contains(&vec, &0);
5-
| ^^^^^^^^ function or associated item not found in `Vec<_, _>`
5+
| ^^^^^^^^ function or associated item not found in `Vec<_, _, _>`
66
|
77
help: the function `contains` is implemented on `[_]`
88
|

tests/ui/type/type-check/point-at-inference-2.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ LL | bar(v);
66
| |
77
| arguments to this function are incorrect
88
|
9-
= note: expected struct `Vec<i32>`
10-
found struct `Vec<&{integer}>`
9+
= note: expected struct `Vec<i32, _>`
10+
found struct `Vec<&{integer}, _>`
1111
note: function defined here
1212
--> $DIR/point-at-inference-2.rs:1:4
1313
|
@@ -25,8 +25,8 @@ LL | bar(v);
2525
| |
2626
| arguments to this function are incorrect
2727
|
28-
= note: expected struct `Vec<i32>`
29-
found struct `Vec<&i32>`
28+
= note: expected struct `Vec<i32, _>`
29+
found struct `Vec<&i32, _>`
3030
note: function defined here
3131
--> $DIR/point-at-inference-2.rs:1:4
3232
|
@@ -43,8 +43,8 @@ LL | bar(v);
4343
| |
4444
| arguments to this function are incorrect
4545
|
46-
= note: expected struct `Vec<i32>`
47-
found struct `Vec<&i32>`
46+
= note: expected struct `Vec<i32, _>`
47+
found struct `Vec<&i32, _>`
4848
note: function defined here
4949
--> $DIR/point-at-inference-2.rs:1:4
5050
|

tests/ui/type/type-check/point-at-inference.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ LL | bar(foo);
99
| |
1010
| arguments to this function are incorrect
1111
|
12-
= note: expected struct `Vec<i32>`
13-
found struct `Vec<&{integer}>`
12+
= note: expected struct `Vec<i32, _>`
13+
found struct `Vec<&{integer}, _>`
1414
note: function defined here
1515
--> $DIR/point-at-inference.rs:2:4
1616
|

tests/ui/typeck/conversion-methods.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ help: try using a conversion method
3939
|
4040
LL | let _prove_piercing_earnest: Vec<usize> = (&[1, 2, 3]).to_vec();
4141
| + ++++++++++
42+
LL | let _prove_piercing_earnest: Vec<usize> = (&[1, 2, 3]).to_vec_co();
43+
| + +++++++++++++
4244

4345
error: aborting due to 4 previous errors
4446

0 commit comments

Comments
 (0)