mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
remove fixed crashes, add fixed crashes to tests, add new cashed found in the meantime
This commit is contained in:
parent
e5d100363a
commit
bae945201f
@ -1,16 +0,0 @@
|
|||||||
//@ known-bug: rust-lang/rust#125370
|
|
||||||
|
|
||||||
type Field3 = i64;
|
|
||||||
|
|
||||||
#[repr(C)]
|
|
||||||
union DummyUnion {
|
|
||||||
field3: Field3,
|
|
||||||
}
|
|
||||||
|
|
||||||
const UNION: DummyUnion = loop {};
|
|
||||||
|
|
||||||
const fn read_field2() -> Field2 {
|
|
||||||
const FIELD2: Field2 = loop {
|
|
||||||
UNION.field3
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
//@ known-bug: rust-lang/rust#125432
|
|
||||||
|
|
||||||
fn separate_arms() {
|
|
||||||
// Here both arms perform assignments, but only one is illegal.
|
|
||||||
|
|
||||||
let mut x = None;
|
|
||||||
match x {
|
|
||||||
None => {
|
|
||||||
// It is ok to reassign x here, because there is in
|
|
||||||
// fact no outstanding loan of x!
|
|
||||||
x = Some(0);
|
|
||||||
}
|
|
||||||
Some(right) => consume(right),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {}
|
|
@ -1,3 +1,4 @@
|
|||||||
//@ known-bug: rust-lang/rust#125476
|
//@ known-bug: rust-lang/rust#125476
|
||||||
|
//@ only-x86_64
|
||||||
pub struct Data([u8; usize::MAX >> 16]);
|
pub struct Data([u8; usize::MAX >> 16]);
|
||||||
const _: &'static [Data] = &[];
|
const _: &'static [Data] = &[];
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
//@ known-bug: #125520
|
|
||||||
#![feature(generic_const_exprs)]
|
|
||||||
|
|
||||||
struct Outer<const A: i64, const B: i64>();
|
|
||||||
impl<const A: usize, const B: usize> Outer<A, B>
|
|
||||||
where
|
|
||||||
[(); A + (B * 2)]:,
|
|
||||||
{
|
|
||||||
fn i() -> Self {
|
|
||||||
Self
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
Outer::<1, 1>::o();
|
|
||||||
}
|
|
15
tests/crashes/125553.rs
Normal file
15
tests/crashes/125553.rs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
//@ known-bug: rust-lang/rust#125553
|
||||||
|
//@ edition:2021
|
||||||
|
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
|
struct Foo((u32, u32));
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
type T = impl Copy(Copy, Clone)
|
||||||
|
let foo: T = Foo((1u32, 1u32));
|
||||||
|
let x = move || {
|
||||||
|
let derive = move || {
|
||||||
|
let Foo((a, b)) = foo;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
14
tests/crashes/125556.rs
Normal file
14
tests/crashes/125556.rs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//@ known-bug: rust-lang/rust#125556
|
||||||
|
//@ compile-flags: -Znext-solver=coherence
|
||||||
|
|
||||||
|
#![feature(generic_const_exprs)]
|
||||||
|
|
||||||
|
pub struct A<const z: [usize; x]> {}
|
||||||
|
|
||||||
|
impl A<2> {
|
||||||
|
pub const fn B() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl A<2> {
|
||||||
|
pub const fn B() {}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
// issue: rust-lang/rust#125520
|
||||||
|
#![feature(generic_const_exprs)]
|
||||||
|
//~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||||
|
|
||||||
|
struct Outer<const A: i64, const B: i64>();
|
||||||
|
impl<const A: usize, const B: usize> Outer<A, B>
|
||||||
|
//~^ ERROR the constant `A` is not of type `i64`
|
||||||
|
//~| ERROR the constant `B` is not of type `i64`
|
||||||
|
//~| ERROR mismatched types
|
||||||
|
//~| ERROR mismatched types
|
||||||
|
where
|
||||||
|
[(); A + (B * 2)]:,
|
||||||
|
{
|
||||||
|
fn i() -> Self {
|
||||||
|
//~^ ERROR the constant `A` is not of type `i64`
|
||||||
|
//~| ERROR the constant `B` is not of type `i64`
|
||||||
|
Self
|
||||||
|
//~^ ERROR mismatched types
|
||||||
|
//~| ERROR the constant `A` is not of type `i64`
|
||||||
|
//~| ERROR the constant `B` is not of type `i64`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
Outer::<1, 1>::o();
|
||||||
|
//~^ ERROR no function or associated item named `o` found for struct `Outer` in the current scope
|
||||||
|
}
|
@ -0,0 +1,125 @@
|
|||||||
|
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:2:12
|
||||||
|
|
|
||||||
|
LL | #![feature(generic_const_exprs)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
||||||
|
= note: `#[warn(incomplete_features)]` on by default
|
||||||
|
|
||||||
|
error: the constant `A` is not of type `i64`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:6:38
|
||||||
|
|
|
||||||
|
LL | impl<const A: usize, const B: usize> Outer<A, B>
|
||||||
|
| ^^^^^^^^^^^ expected `i64`, found `usize`
|
||||||
|
|
|
||||||
|
note: required by a bound in `Outer`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:5:14
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ^^^^^^^^^^^^ required by this bound in `Outer`
|
||||||
|
|
||||||
|
error: the constant `B` is not of type `i64`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:6:38
|
||||||
|
|
|
||||||
|
LL | impl<const A: usize, const B: usize> Outer<A, B>
|
||||||
|
| ^^^^^^^^^^^ expected `i64`, found `usize`
|
||||||
|
|
|
||||||
|
note: required by a bound in `Outer`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:5:28
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ^^^^^^^^^^^^ required by this bound in `Outer`
|
||||||
|
|
||||||
|
error: the constant `A` is not of type `i64`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:14:15
|
||||||
|
|
|
||||||
|
LL | fn i() -> Self {
|
||||||
|
| ^^^^ expected `i64`, found `usize`
|
||||||
|
|
|
||||||
|
note: required by a bound in `Outer`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:5:14
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ^^^^^^^^^^^^ required by this bound in `Outer`
|
||||||
|
|
||||||
|
error: the constant `B` is not of type `i64`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:14:15
|
||||||
|
|
|
||||||
|
LL | fn i() -> Self {
|
||||||
|
| ^^^^ expected `i64`, found `usize`
|
||||||
|
|
|
||||||
|
note: required by a bound in `Outer`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:5:28
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ^^^^^^^^^^^^ required by this bound in `Outer`
|
||||||
|
|
||||||
|
error[E0308]: mismatched types
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:17:9
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ---------------------------------------- `Outer` defines a struct constructor here, which should be called
|
||||||
|
...
|
||||||
|
LL | fn i() -> Self {
|
||||||
|
| ---- expected `Outer<A, B>` because of return type
|
||||||
|
...
|
||||||
|
LL | Self
|
||||||
|
| ^^^^ expected `Outer<A, B>`, found struct constructor
|
||||||
|
|
|
||||||
|
= note: expected struct `Outer<A, B>`
|
||||||
|
found struct constructor `fn() -> Outer<A, B> {Outer::<A, B>}`
|
||||||
|
help: use parentheses to construct this tuple struct
|
||||||
|
|
|
||||||
|
LL | Self()
|
||||||
|
| ++
|
||||||
|
|
||||||
|
error: the constant `A` is not of type `i64`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:17:9
|
||||||
|
|
|
||||||
|
LL | Self
|
||||||
|
| ^^^^ expected `i64`, found `usize`
|
||||||
|
|
|
||||||
|
note: required by a bound in `Outer`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:5:14
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ^^^^^^^^^^^^ required by this bound in `Outer`
|
||||||
|
|
||||||
|
error: the constant `B` is not of type `i64`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:17:9
|
||||||
|
|
|
||||||
|
LL | Self
|
||||||
|
| ^^^^ expected `i64`, found `usize`
|
||||||
|
|
|
||||||
|
note: required by a bound in `Outer`
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:5:28
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ^^^^^^^^^^^^ required by this bound in `Outer`
|
||||||
|
|
||||||
|
error[E0599]: no function or associated item named `o` found for struct `Outer` in the current scope
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:25:20
|
||||||
|
|
|
||||||
|
LL | struct Outer<const A: i64, const B: i64>();
|
||||||
|
| ---------------------------------------- function or associated item `o` not found for this struct
|
||||||
|
...
|
||||||
|
LL | Outer::<1, 1>::o();
|
||||||
|
| ^ function or associated item not found in `Outer<1, 1>`
|
||||||
|
|
||||||
|
error[E0308]: mismatched types
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:6:44
|
||||||
|
|
|
||||||
|
LL | impl<const A: usize, const B: usize> Outer<A, B>
|
||||||
|
| ^ expected `i64`, found `usize`
|
||||||
|
|
||||||
|
error[E0308]: mismatched types
|
||||||
|
--> $DIR/ice-125520-layout-mismatch-mulwithoverflow.rs:6:47
|
||||||
|
|
|
||||||
|
LL | impl<const A: usize, const B: usize> Outer<A, B>
|
||||||
|
| ^ expected `i64`, found `usize`
|
||||||
|
|
||||||
|
error: aborting due to 10 previous errors; 1 warning emitted
|
||||||
|
|
||||||
|
Some errors have detailed explanations: E0308, E0599.
|
||||||
|
For more information about an error, try `rustc --explain E0308`.
|
@ -1,5 +1,5 @@
|
|||||||
//@ failure-status: 101
|
//@ failure-status: 101
|
||||||
//@ known-bug: unknown
|
//@ known-bug: rust-lang/rust#125451
|
||||||
//@ normalize-stderr-test "note: .*\n\n" -> ""
|
//@ normalize-stderr-test "note: .*\n\n" -> ""
|
||||||
//@ normalize-stderr-test "thread 'rustc' panicked.*\n.*\n" -> ""
|
//@ normalize-stderr-test "thread 'rustc' panicked.*\n.*\n" -> ""
|
||||||
//@ normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
|
//@ normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
|
||||||
|
Loading…
Reference in New Issue
Block a user