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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
14
src/test/ui/const-generics/issue-61522-array-len-succ.rs
Normal file
14
src/test/ui/const-generics/issue-61522-array-len-succ.rs
Normal file
@@ -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() {}
|
||||
26
src/test/ui/const-generics/issue-61522-array-len-succ.stderr
Normal file
26
src/test/ui/const-generics/issue-61522-array-len-succ.stderr
Normal file
@@ -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
|
||||
|
||||
@@ -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 = ();
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Submodule src/tools/cargo updated: 6e07d2dfb7...390e8f245e
Submodule src/tools/clippy updated: 7907abea27...d342cee787
Submodule src/tools/miri updated: 147ea8f400...325682ad56
Reference in New Issue
Block a user