Skip to content

Commit ce67768

Browse files
committed
crashes: increment the number of tracked ones
1 parent 21e6de7 commit ce67768

13 files changed

+171
-0
lines changed

tests/crashes/123255.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ known-bug: rust-lang/rust#123255
2+
//@ edition:2021
3+
#![crate_type = "lib"]
4+
5+
pub fn a() {}
6+
7+
mod handlers {
8+
pub struct C(&());
9+
pub fn c() -> impl Fn() -> C {
10+
let a1 = ();
11+
|| C((crate::a(), a1).into())
12+
}
13+
}

tests/crashes/123276.rs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//@ known-bug: rust-lang/rust#123276
2+
//@ edition:2021
3+
4+
async fn create_task() {
5+
_ = Some(async { bind(documentation_filter()) });
6+
}
7+
8+
async fn bind<Fut, F: Filter<Future = Fut>>(_: F) {}
9+
10+
fn documentation_filter() -> impl Filter {
11+
AndThen
12+
}
13+
14+
trait Filter {
15+
type Future;
16+
}
17+
18+
struct AndThen;
19+
20+
impl Filter for AndThen
21+
where
22+
Foo: Filter,
23+
{
24+
type Future = ();
25+
}

tests/crashes/123887.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ known-bug: rust-lang/rust#123887
2+
//@ compile-flags: -Clink-dead-code
3+
4+
#![feature(extern_types)]
5+
#![feature(unsized_fn_params)]
6+
7+
extern "C" {
8+
pub type ExternType;
9+
}
10+
11+
impl ExternType {
12+
pub fn f(self) {}
13+
}
14+
15+
pub fn main() {}

tests/crashes/125013-1.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@ known-bug: rust-lang/rust#125013
2+
//@ edition:2021
3+
use io::{self as std};
4+
use std::ops::Deref::{self as io};
5+
pub fn main() {}

tests/crashes/125013-2.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ known-bug: rust-lang/rust#125013
2+
//@ edition:2021
3+
mod a {
4+
pub mod b {
5+
pub mod c {
6+
pub trait D {}
7+
}
8+
}
9+
}
10+
11+
use a::*;
12+
13+
use e as b;
14+
use b::c::D as e;
15+
16+
fn main() { }

tests/crashes/125014.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//@ known-bug: rust-lang/rust#125014
2+
//@ compile-flags: -Znext-solver=coherence
3+
#![feature(specialization)]
4+
5+
trait Foo {}
6+
7+
impl Foo for <u16 as Assoc>::Output {}
8+
9+
impl Foo for u32 {}
10+
11+
trait Assoc {
12+
type Output;
13+
}
14+
impl Output for u32 {}
15+
impl Assoc for <u16 as Assoc>::Output {
16+
default type Output = bool;
17+
}

tests/crashes/125059.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ known-bug: rust-lang/rust#125059
2+
#![feature(deref_patterns)]
3+
#![allow(incomplete_features)]
4+
5+
fn simple_vec(vec: Vec<u32>) -> u32 {
6+
(|| match Vec::<u32>::new() {
7+
deref!([]) => 100,
8+
_ => 2000,
9+
})()
10+
}
11+
12+
fn main() {}

tests/crashes/125323.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ known-bug: rust-lang/rust#125323
2+
fn main() {
3+
for _ in 0..0 {
4+
[(); loop {}];
5+
}
6+
}

tests/crashes/125370.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ known-bug: rust-lang/rust#125370
2+
3+
type Field3 = i64;
4+
5+
#[repr(C)]
6+
union DummyUnion {
7+
field3: Field3,
8+
}
9+
10+
const UNION: DummyUnion = loop {};
11+
12+
const fn read_field2() -> Field2 {
13+
const FIELD2: Field2 = loop {
14+
UNION.field3
15+
};
16+
}

tests/crashes/125432.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//@ known-bug: rust-lang/rust#125432
2+
3+
fn separate_arms() {
4+
// Here both arms perform assignments, but only one is illegal.
5+
6+
let mut x = None;
7+
match x {
8+
None => {
9+
// It is ok to reassign x here, because there is in
10+
// fact no outstanding loan of x!
11+
x = Some(0);
12+
}
13+
Some(right) => consume(right),
14+
}
15+
}
16+
17+
fn main() {}

tests/crashes/125476.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//@ known-bug: rust-lang/rust#125476
2+
pub struct Data([u8; usize::MAX >> 16]);
3+
const _: &'static [Data] = &[];

tests/crashes/125512.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ known-bug: rust-lang/rust#125512
2+
//@ edition:2021
3+
#![feature(object_safe_for_dispatch)]
4+
trait B {
5+
fn f(a: A) -> A;
6+
}
7+
trait A {
8+
fn concrete(b: B) -> B;
9+
}
10+
fn main() {}

tests/crashes/125520.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ known-bug: #125520
2+
#![feature(generic_const_exprs)]
3+
4+
struct Outer<const A: i64, const B: i64>();
5+
impl<const A: usize, const B: usize> Outer<A, B>
6+
where
7+
[(); A + (B * 2)]:,
8+
{
9+
fn i() -> Self {
10+
Self
11+
}
12+
}
13+
14+
fn main() {
15+
Outer::<1, 1>::o();
16+
}

0 commit comments

Comments
 (0)