diff options
| author | bors <bors@rust-lang.org> | 2020-04-09 20:03:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-09 20:03:54 +0000 |
| commit | 94d346360da50f159e0dc777dc9bc3c5b6b51a00 (patch) | |
| tree | dab641f94d87557dba0291edc8c852c85f8e6543 /src | |
| parent | 93dc97a85381cc52eb872d27e50e4d518926a27c (diff) | |
| parent | 2c3147f018d8b6c05940b66e9f6098737277c882 (diff) | |
| download | rust-94d346360da50f159e0dc777dc9bc3c5b6b51a00.tar.gz rust-94d346360da50f159e0dc777dc9bc3c5b6b51a00.zip | |
Auto merge of #70960 - Centril:rollup-9vmokvw, r=Centril
Rollup of 5 pull requests Successful merges: - #70897 (bump Miri) - #70900 (Update cargo) - #70902 (Update Clippy) - #70939 (Add two const generics regression tests) - #70958 (Disable try_reserve tests on Android) Failed merges: r? @ghost
Diffstat (limited to 'src')
| -rw-r--r-- | src/liballoc/tests/string.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/tests/vec.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/tests/vec_deque.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/const-generics/issue-61522-array-len-succ.rs | 14 | ||||
| -rw-r--r-- | src/test/ui/const-generics/issue-61522-array-len-succ.stderr | 26 | ||||
| -rw-r--r-- | src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs | 16 | ||||
| -rw-r--r-- | src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.stderr | 8 | ||||
| m--------- | src/tools/cargo | 0 | ||||
| m--------- | src/tools/clippy | 36 | ||||
| m--------- | src/tools/miri | 17 |
10 files changed, 102 insertions, 21 deletions
diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs index 6e2a5abe90d..9ea020d2d19 100644 --- a/src/liballoc/tests/string.rs +++ b/src/liballoc/tests/string.rs @@ -555,6 +555,7 @@ fn test_reserve_exact() { #[test] #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM +#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc fn test_try_reserve() { // These are the interesting cases: // * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM) @@ -644,6 +645,7 @@ fn test_try_reserve() { #[test] #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM +#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc fn test_try_reserve_exact() { // This is exactly the same as test_try_reserve with the method changed. // See that test for comments. diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs index b63d81796f9..3d76324f7e8 100644 --- a/src/liballoc/tests/vec.rs +++ b/src/liballoc/tests/vec.rs @@ -1137,6 +1137,7 @@ fn test_reserve_exact() { #[test] #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM +#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc fn test_try_reserve() { // These are the interesting cases: // * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM) @@ -1254,6 +1255,7 @@ fn test_try_reserve() { #[test] #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM +#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc fn test_try_reserve_exact() { // This is exactly the same as test_try_reserve with the method changed. // See that test for comments. diff --git a/src/liballoc/tests/vec_deque.rs b/src/liballoc/tests/vec_deque.rs index c287d56fa53..c4b6a36bb05 100644 --- a/src/liballoc/tests/vec_deque.rs +++ b/src/liballoc/tests/vec_deque.rs @@ -1134,6 +1134,7 @@ fn test_reserve_exact_2() { #[test] #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM +#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc fn test_try_reserve() { // These are the interesting cases: // * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM) @@ -1248,6 +1249,7 @@ fn test_try_reserve() { #[test] #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM +#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc fn test_try_reserve_exact() { // This is exactly the same as test_try_reserve with the method changed. // See that test for comments. diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.rs b/src/test/ui/const-generics/issue-61522-array-len-succ.rs new file mode 100644 index 00000000000..3b627a5e530 --- /dev/null +++ b/src/test/ui/const-generics/issue-61522-array-len-succ.rs @@ -0,0 +1,14 @@ +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]); +//~^ ERROR constant expression depends on a generic parameter + +impl<const COUNT: usize> MyArray<COUNT> { + fn inner(&self) -> &[u8; COUNT + 1] { + //~^ ERROR constant expression depends on a generic parameter + &self.0 + } +} + +fn main() {} diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.stderr b/src/test/ui/const-generics/issue-61522-array-len-succ.stderr new file mode 100644 index 00000000000..0c4bd4afce4 --- /dev/null +++ b/src/test/ui/const-generics/issue-61522-array-len-succ.stderr @@ -0,0 +1,26 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/issue-61522-array-len-succ.rs:1:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + +error: constant expression depends on a generic parameter + --> $DIR/issue-61522-array-len-succ.rs:4:40 + | +LL | pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]); + | ^^^^^^^^^^^^^^^ + | + = note: this may fail depending on what value the parameter takes + +error: constant expression depends on a generic parameter + --> $DIR/issue-61522-array-len-succ.rs:8:24 + | +LL | fn inner(&self) -> &[u8; COUNT + 1] { + | ^^^^^^^^^^^^^^^^ + | + = note: this may fail depending on what value the parameter takes + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs new file mode 100644 index 00000000000..b677dcc4af4 --- /dev/null +++ b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs @@ -0,0 +1,16 @@ +// check-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +trait Trait<const NAME: &'static str> { + type Assoc; +} + +impl Trait<"0"> for () { + type Assoc = (); +} + +fn main() { + let _: <() as Trait<"0">>::Assoc = (); +} diff --git a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.stderr b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.stderr new file mode 100644 index 00000000000..8ab28cc2a85 --- /dev/null +++ b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.stderr @@ -0,0 +1,8 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/issue-66596-impl-trait-for-str-const-arg.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + diff --git a/src/tools/cargo b/src/tools/cargo -Subproject 6e07d2dfb7fc87b1c9489de41da4dafa239daf0 +Subproject 390e8f245ef2cd7ac698b8a76abf029f9abcab0 diff --git a/src/tools/clippy b/src/tools/clippy -Subproject 7907abea272bbf97812683ce03a1ab9c22f0557 +Subproject d342cee78703c46d9df09088f9fb99ba85d021a diff --git a/src/tools/miri b/src/tools/miri -Subproject 147ea8f400de3ca529abcb5eb7b65f84a4896ae +Subproject 325682ad56d23369059ea93d5a8d44e5782e41c |
