Skip to content

Commit 94d3463

Browse files
committed
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
2 parents 93dc97a + 2c3147f commit 94d3463

10 files changed

+73
-3
lines changed

src/liballoc/tests/string.rs

+2
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ fn test_reserve_exact() {
555555

556556
#[test]
557557
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
558+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
558559
fn test_try_reserve() {
559560
// These are the interesting cases:
560561
// * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM)
@@ -644,6 +645,7 @@ fn test_try_reserve() {
644645

645646
#[test]
646647
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
648+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
647649
fn test_try_reserve_exact() {
648650
// This is exactly the same as test_try_reserve with the method changed.
649651
// See that test for comments.

src/liballoc/tests/vec.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,7 @@ fn test_reserve_exact() {
11371137

11381138
#[test]
11391139
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1140+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
11401141
fn test_try_reserve() {
11411142
// These are the interesting cases:
11421143
// * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM)
@@ -1254,6 +1255,7 @@ fn test_try_reserve() {
12541255

12551256
#[test]
12561257
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1258+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
12571259
fn test_try_reserve_exact() {
12581260
// This is exactly the same as test_try_reserve with the method changed.
12591261
// See that test for comments.

src/liballoc/tests/vec_deque.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,7 @@ fn test_reserve_exact_2() {
11341134

11351135
#[test]
11361136
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1137+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
11371138
fn test_try_reserve() {
11381139
// These are the interesting cases:
11391140
// * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM)
@@ -1248,6 +1249,7 @@ fn test_try_reserve() {
12481249

12491250
#[test]
12501251
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1252+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
12511253
fn test_try_reserve_exact() {
12521254
// This is exactly the same as test_try_reserve with the method changed.
12531255
// See that test for comments.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![feature(const_generics)]
2+
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
3+
4+
pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
5+
//~^ ERROR constant expression depends on a generic parameter
6+
7+
impl<const COUNT: usize> MyArray<COUNT> {
8+
fn inner(&self) -> &[u8; COUNT + 1] {
9+
//~^ ERROR constant expression depends on a generic parameter
10+
&self.0
11+
}
12+
}
13+
14+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/issue-61522-array-len-succ.rs:1:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
9+
error: constant expression depends on a generic parameter
10+
--> $DIR/issue-61522-array-len-succ.rs:4:40
11+
|
12+
LL | pub struct MyArray<const COUNT: usize>([u8; COUNT + 1]);
13+
| ^^^^^^^^^^^^^^^
14+
|
15+
= note: this may fail depending on what value the parameter takes
16+
17+
error: constant expression depends on a generic parameter
18+
--> $DIR/issue-61522-array-len-succ.rs:8:24
19+
|
20+
LL | fn inner(&self) -> &[u8; COUNT + 1] {
21+
| ^^^^^^^^^^^^^^^^
22+
|
23+
= note: this may fail depending on what value the parameter takes
24+
25+
error: aborting due to 2 previous errors
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// check-pass
2+
3+
#![feature(const_generics)]
4+
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
5+
6+
trait Trait<const NAME: &'static str> {
7+
type Assoc;
8+
}
9+
10+
impl Trait<"0"> for () {
11+
type Assoc = ();
12+
}
13+
14+
fn main() {
15+
let _: <() as Trait<"0">>::Assoc = ();
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/issue-66596-impl-trait-for-str-const-arg.rs:3:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+

0 commit comments

Comments
 (0)