diff options
| author | bors <bors@rust-lang.org> | 2020-11-21 22:46:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-21 22:46:50 +0000 |
| commit | a1a13b2bc4fa6370b9501135d97c5fe0bc401894 (patch) | |
| tree | 6b0b0279e069cf0d343040eeb9c917637dd2bd93 /src/test/ui | |
| parent | da384694807172f0ca40eca2e49a11688aba6e93 (diff) | |
| parent | a600410f4f005151b34aca5d3371144943104a5f (diff) | |
| download | rust-a1a13b2bc4fa6370b9501135d97c5fe0bc401894.tar.gz rust-a1a13b2bc4fa6370b9501135d97c5fe0bc401894.zip | |
Auto merge of #78461 - TimDiekmann:vec-alloc, r=Amanieu
Add support for custom allocators in `Vec` This follows the [roadmap](https://github.com/rust-lang/wg-allocators/issues/7) of the allocator WG to add custom allocators to collections. r? `@Amanieu` This pull request requires a crater run. ### Prior work: - #71873: Crater-test to solve rust-lang/wg-allocators#1 - [`alloc-wg`](https://github.com/TimDiekmann/alloc-wg)-crate
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/associated-types/defaults-wf.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/bad/bad-sized.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/const-generics/invalid-constant-in-args.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/const-generics/invalid-constant-in-args.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-20433.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/type/ascription/issue-34255-1.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/type/ascription/issue-34255-1.stderr | 4 |
7 files changed, 12 insertions, 10 deletions
diff --git a/src/test/ui/associated-types/defaults-wf.stderr b/src/test/ui/associated-types/defaults-wf.stderr index f9044c2ea1b..26c85260194 100644 --- a/src/test/ui/associated-types/defaults-wf.stderr +++ b/src/test/ui/associated-types/defaults-wf.stderr @@ -6,7 +6,7 @@ LL | type Ty = Vec<[u8]>; | ::: $SRC_DIR/alloc/src/vec.rs:LL:COL | -LL | pub struct Vec<T> { +LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: AllocRef = Global> { | - required by this bound in `Vec` | = help: the trait `Sized` is not implemented for `[u8]` diff --git a/src/test/ui/bad/bad-sized.stderr b/src/test/ui/bad/bad-sized.stderr index b9bce7fb5f4..10d12a09b25 100644 --- a/src/test/ui/bad/bad-sized.stderr +++ b/src/test/ui/bad/bad-sized.stderr @@ -17,7 +17,7 @@ LL | let x: Vec<dyn Trait + Sized> = Vec::new(); | ::: $SRC_DIR/alloc/src/vec.rs:LL:COL | -LL | pub struct Vec<T> { +LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: AllocRef = Global> { | - required by this bound in `Vec` | = help: the trait `Sized` is not implemented for `dyn Trait` diff --git a/src/test/ui/const-generics/invalid-constant-in-args.rs b/src/test/ui/const-generics/invalid-constant-in-args.rs index 38ad510e5d7..0bd9cbf4f47 100644 --- a/src/test/ui/const-generics/invalid-constant-in-args.rs +++ b/src/test/ui/const-generics/invalid-constant-in-args.rs @@ -1,4 +1,6 @@ +use std::cell::Cell; + fn main() { - let _: Vec<&str, "a"> = Vec::new(); + let _: Cell<&str, "a"> = Cell::new(""); //~^ ERROR wrong number of generic arguments } diff --git a/src/test/ui/const-generics/invalid-constant-in-args.stderr b/src/test/ui/const-generics/invalid-constant-in-args.stderr index 5111815e002..9b8a5d1ae4f 100644 --- a/src/test/ui/const-generics/invalid-constant-in-args.stderr +++ b/src/test/ui/const-generics/invalid-constant-in-args.stderr @@ -1,8 +1,8 @@ error[E0107]: wrong number of generic arguments: expected 1, found 2 - --> $DIR/invalid-constant-in-args.rs:2:22 + --> $DIR/invalid-constant-in-args.rs:4:23 | -LL | let _: Vec<&str, "a"> = Vec::new(); - | ^^^ unexpected const argument +LL | let _: Cell<&str, "a"> = Cell::new(""); + | ^^^ unexpected const argument error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20433.stderr b/src/test/ui/issues/issue-20433.stderr index 3c14226b734..d40946ae03f 100644 --- a/src/test/ui/issues/issue-20433.stderr +++ b/src/test/ui/issues/issue-20433.stderr @@ -6,7 +6,7 @@ LL | fn iceman(c: Vec<[i32]>) {} | ::: $SRC_DIR/alloc/src/vec.rs:LL:COL | -LL | pub struct Vec<T> { +LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: AllocRef = Global> { | - required by this bound in `Vec` | = help: the trait `Sized` is not implemented for `[i32]` diff --git a/src/test/ui/type/ascription/issue-34255-1.rs b/src/test/ui/type/ascription/issue-34255-1.rs index c0d39c59014..3aad085f089 100644 --- a/src/test/ui/type/ascription/issue-34255-1.rs +++ b/src/test/ui/type/ascription/issue-34255-1.rs @@ -7,7 +7,7 @@ impl Reactor { input_cells: Vec::new() //~^ ERROR cannot find value `input_cells` in this scope //~| ERROR parenthesized type parameters may only be used with a `Fn` trait - //~| ERROR wrong number of type arguments: expected 1, found 0 + //~| ERROR wrong number of type arguments: expected at least 1, found 0 } } diff --git a/src/test/ui/type/ascription/issue-34255-1.stderr b/src/test/ui/type/ascription/issue-34255-1.stderr index 7895cf77fc0..402e54d2a95 100644 --- a/src/test/ui/type/ascription/issue-34255-1.stderr +++ b/src/test/ui/type/ascription/issue-34255-1.stderr @@ -10,11 +10,11 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait LL | input_cells: Vec::new() | ^^^^^ only `Fn` traits may use parentheses -error[E0107]: wrong number of type arguments: expected 1, found 0 +error[E0107]: wrong number of type arguments: expected at least 1, found 0 --> $DIR/issue-34255-1.rs:7:22 | LL | input_cells: Vec::new() - | ^^^^^^^^^^ expected 1 type argument + | ^^^^^^^^^^ expected at least 1 type argument error: aborting due to 3 previous errors |
