Skip to content

Commit e4f9084

Browse files
authored
Rollup merge of #134236 - matthiaskrgr:tests12122024, r=compiler-errors
crashes: more tests v2 try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-gnu
2 parents 5b95be6 + 7880aba commit e4f9084

File tree

11 files changed

+122
-0
lines changed

11 files changed

+122
-0
lines changed

Diff for: tests/crashes/133426.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: #133426
2+
3+
fn a(
4+
_: impl Iterator<
5+
Item = [(); {
6+
match *todo!() { ! };
7+
}],
8+
>,
9+
) {
10+
}
11+
12+
fn b(_: impl Iterator<Item = { match 0 { ! } }>) {}

Diff for: tests/crashes/133597.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ known-bug: #133597
2+
3+
pub trait Foo2 {
4+
fn boxed<'a: 'a>() -> impl Sized + FnOnce<()>;
5+
}
6+
7+
impl Foo2 for () {}
8+
9+
10+
fn f() -> impl FnOnce<()> { || () }
11+
fn main() { () = f(); }

Diff for: tests/crashes/133639.rs

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//@ known-bug: #133639
2+
3+
#![feature(with_negative_coherence)]
4+
#![feature(min_specialization)]
5+
#![feature(generic_const_exprs)]
6+
7+
#![crate_type = "lib"]
8+
use std::str::FromStr;
9+
10+
struct a<const b: bool>;
11+
12+
trait c {}
13+
14+
impl<const d: u32> FromStr for e<d>
15+
where
16+
a<{ d <= 2 }>: c,
17+
{
18+
type Err = ();
19+
fn from_str(f: &str) -> Result<Self, Self::Err> {
20+
unimplemented!()
21+
}
22+
}
23+
struct e<const d: u32>;
24+
25+
impl<const d: u32> FromStr for e<d>
26+
where
27+
a<{ d <= 2 }>: c,
28+
{
29+
type Err = ();
30+
fn from_str(f: &str) -> Result<Self, Self::Err> {
31+
unimplemented!()
32+
}
33+
}

Diff for: tests/crashes/133808.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ known-bug: #133808
2+
3+
#![feature(generic_const_exprs, transmutability)]
4+
5+
mod assert {
6+
use std::mem::TransmuteFrom;
7+
8+
pub fn is_transmutable<Src, Dst>()
9+
where
10+
Dst: TransmuteFrom<Src>,
11+
{
12+
}
13+
}
14+
15+
pub fn main() {}

Diff for: tests/crashes/133868.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: #133868
2+
3+
trait Foo {
4+
type Assoc;
5+
}
6+
7+
trait Bar {
8+
fn method() -> impl Sized;
9+
}
10+
impl<T> Bar for T where <T as Foo>::Assoc: Sized
11+
{
12+
fn method() {}
13+
}

Diff for: tests/crashes/133965.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: #133965
2+
//@ needs-rustc-debug-assertions
3+
4+
struct NonGeneric {}
5+
6+
#[derive(Default)]
7+
struct NonGeneric<'a, const N: usize> {}
8+
9+
pub fn main() {}

Diff for: tests/crashes/133966.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//@ known-bug: #133966
2+
pub struct Data([[&'static str]; 5_i32]);
3+
const _: &'static Data = unsafe { &*(&[] as *const Data) };

Diff for: tests/crashes/134005.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@ known-bug: #134005
2+
3+
fn main() {
4+
let _ = [std::ops::Add::add, std::ops::Mul::mul, main as fn(_, &_)];
5+
}

Diff for: tests/crashes/134061.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@ known-bug: #134061
2+
//@ needs-rustc-debug-assertions
3+
4+
const x: () = |&'a

Diff for: tests/crashes/134162.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@ known-bug: #134162
2+
3+
fn main() {
4+
struct X;
5+
6+
let xs = [X, X, X];
7+
let eq = xs == [panic!("panic evaluated"); 2];
8+
}

Diff for: tests/crashes/134217.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ known-bug: #134217
2+
3+
impl<A> std::ops::CoerceUnsized<A> for A {}
4+
5+
fn main() {
6+
if let _ = true
7+
&& true
8+
{}
9+
}

0 commit comments

Comments
 (0)