Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 8c90296

Browse files
fanninpmJohnTitor
andauthored
Add some ICEs (#823)
Co-authored-by: Yuki Okushi <[email protected]>
1 parent b48896d commit 8c90296

File tree

10 files changed

+67
-0
lines changed

10 files changed

+67
-0
lines changed

ices/85350.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
impl FnMut(&Context) for 'tcx {
2+
fn print () -> Self :: Output{ }
3+
}

ices/85447.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#![crate_type="lib"]
2+
use std::{collections::HashMap, hash::Hash};
3+
4+
struct C;
5+
6+
trait Ctx {
7+
type BindGroupId;
8+
}
9+
10+
impl Ctx for C {
11+
type BindGroupId = u32;
12+
}
13+
14+
pub struct BindGroup {
15+
_id: <C as Ctx>::BindGroupId,
16+
}
17+
18+
pub fn insert(map: &mut HashMap<*const BindGroup, u32>, bind_group: *const BindGroup) {
19+
map.insert(bind_group, 1);
20+
}

ices/86053.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
trait H<T> {}
2+
3+
unsafe extern "C" fn ordering4<'a, F: H<&'static &'a ()>>(_: (), ...) {}
4+
5+
fn main() {}

ices/86082.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
option_env!("\0")
3+
}

ices/86085.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main ( ) {
2+
format ! ( concat ! ( r#"lJ𐏿Æ�.𐏿�"# , "r} {}" ) ) ;
3+
}

ices/86086.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trait Tr : Sized { async extern r###"��áÖ@"### fn union < > ( # [ ']' '[' 'default' 'async' '&raw' ] & '?ဪൈ self , ... , ... , ... , ... , ... , ... , ... , ... , ... , ) -> && '_ mut ( ) ;
2+
}

ices/86132.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![crate_type = "staticlib"]
2+
use std::mem;
3+
trait Trait {}
4+
const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
5+
unsafe { mem::transmute((&92u8, &[0b_______001_11i128; 128])) };

ices/86188.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
[(); return || {
3+
let tx;
4+
}]
5+
}

ices/86193.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![crate_type = "lib"]
2+
#[repr(transparent)]
3+
struct W<T>(T);
4+
5+
// The drop fn is checked before size/align are, so get ourselves a "sufficiently valid" drop fn
6+
fn drop_me(_: *mut usize) {}
7+
8+
const INVALID_VTABLE_SIZE: W<&dyn Send> =
9+
unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), usize::MAX, 1usize))) };

ices/86201.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#![feature(unboxed_closures)]
2+
#![feature(min_type_alias_impl_trait)]
3+
#![feature(impl_trait_in_bindings)]
4+
5+
type FunType = impl Fn<()>;
6+
static STATIC_FN: FunType = some_fn;
7+
8+
fn some_fn() {}
9+
10+
fn main() {
11+
let _: <FunType as FnOnce<()>>::Output = STATIC_FN();
12+
}

0 commit comments

Comments
 (0)