Skip to content

Commit c4ba60a

Browse files
committed
update tests
1 parent 18fa778 commit c4ba60a

File tree

449 files changed

+658
-950
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+658
-950
lines changed

src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// check-pass
22
// edition:2018
3-
#![feature(min_const_generics)]
43
trait ValidTrait {}
54

65
/// This has docs

src/test/rustdoc/async-fn.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// ignore-tidy-linelength
22
// edition:2018
3-
#![feature(min_const_generics)]
4-
53
// @has async_fn/fn.foo.html '//pre[@class="rust fn"]' 'pub async fn foo() -> Option<Foo>'
64
pub async fn foo() -> Option<Foo> {
75
None

src/test/rustdoc/const-generics/auxiliary/extern_crate.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// edition:2018
2-
#![feature(min_const_generics)]
3-
42
pub fn extern_fn<const N: usize>() -> impl Iterator<Item = [u8; N]> {
53
[[0; N]; N].iter().copied()
64
}

src/test/rustdoc/const-generics/const-generics-docs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// edition:2018
22
// aux-build: extern_crate.rs
3-
#![feature(min_const_generics)]
43
#![crate_name = "foo"]
54

65
extern crate extern_crate;

src/test/rustdoc/const-generics/type-alias.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// ignore-tidy-linelength
2-
#![feature(min_const_generics)]
32
#![crate_name = "foo"]
43

54
// @has foo/type.CellIndex.html '//pre[@class="rust typedef"]' 'type CellIndex<const D: usize> = [i64; D];'

src/test/ui/array-slice-vec/match_arr_unknown_len.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ LL | #![feature(const_generics)]
66
|
77
= note: `#[warn(incomplete_features)]` on by default
88
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
9-
= help: consider using `min_const_generics` instead, which is more stable and complete
109

1110
error[E0308]: mismatched types
1211
--> $DIR/match_arr_unknown_len.rs:6:9

src/test/ui/associated-consts/associated-const-type-parameter-arrays.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ impl Foo for Def {
1414

1515
pub fn test<A: Foo, B: Foo>() {
1616
let _array: [u32; <A as Foo>::Y];
17-
//~^ ERROR the trait bound `A: Foo` is not satisfied [E0277]
17+
//~^ ERROR generic parameters may not be used
1818
}
1919

20-
fn main() {
21-
}
20+
fn main() {}
Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
error[E0277]: the trait bound `A: Foo` is not satisfied
2-
--> $DIR/associated-const-type-parameter-arrays.rs:16:23
1+
error: generic parameters may not be used in const operations
2+
--> $DIR/associated-const-type-parameter-arrays.rs:16:24
33
|
4-
LL | const Y: usize;
5-
| --------------- required by `Foo::Y`
6-
...
74
LL | let _array: [u32; <A as Foo>::Y];
8-
| ^^^^^^^^^^^^^ the trait `Foo` is not implemented for `A`
5+
| ^ cannot perform const operation using `A`
96
|
10-
help: consider further restricting this bound
11-
|
12-
LL | pub fn test<A: Foo + Foo, B: Foo>() {
13-
| ^^^^^
7+
= note: type parameters may not be used in const expressions
8+
= help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
149

1510
error: aborting due to previous error
1611

17-
For more information about this error, try `rustc --explain E0277`.

src/test/ui/associated-item/associated-item-duplicate-bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ trait Adapter {
55
struct Foo<A: Adapter> {
66
adapter: A,
77
links: [u32; A::LINKS], // Shouldn't suggest bounds already there.
8-
//~^ ERROR: no associated item named `LINKS` found
8+
//~^ ERROR generic parameters may not be used in const operations
99
}
1010

1111
fn main() {}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
error[E0599]: no associated item named `LINKS` found for type parameter `A` in the current scope
2-
--> $DIR/associated-item-duplicate-bounds.rs:7:21
1+
error: generic parameters may not be used in const operations
2+
--> $DIR/associated-item-duplicate-bounds.rs:7:18
33
|
44
LL | links: [u32; A::LINKS], // Shouldn't suggest bounds already there.
5-
| ^^^^^ associated item not found in `A`
5+
| ^^^^^^^^ cannot perform const operation using `A`
66
|
7-
= help: items from traits can only be used if the type parameter is bounded by the trait
7+
= note: type parameters may not be used in const expressions
8+
= help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
89

910
error: aborting due to previous error
1011

11-
For more information about this error, try `rustc --explain E0599`.

0 commit comments

Comments
 (0)