couple more crash tests
This commit is contained in:
parent
0d634185df
commit
355d7c9ecd
6
tests/crashes/129425.rs
Normal file
6
tests/crashes/129425.rs
Normal file
@ -0,0 +1,6 @@
|
||||
//@ known-bug: rust-lang/rust#129425
|
||||
|
||||
//@compile-flags: --crate-type=lib
|
||||
|
||||
#![feature(generic_const_exprs)]
|
||||
fn foo<'a, T: 'a>(_: [(); std::mem::offset_of!((T,), 0)]) {}
|
15
tests/crashes/129444.rs
Normal file
15
tests/crashes/129444.rs
Normal file
@ -0,0 +1,15 @@
|
||||
//@ known-bug: rust-lang/rust#129444
|
||||
|
||||
//@ compile-flags: -Znext-solver=coherence
|
||||
|
||||
trait Trait {
|
||||
type Assoc;
|
||||
}
|
||||
|
||||
struct W<T: Trait>(*mut T);
|
||||
impl<T: ?Trait> Trait for W<W<W<T>>> {}
|
||||
|
||||
trait NoOverlap {}
|
||||
impl<T: Trait<W<T>>> NoOverlap for T {}
|
||||
|
||||
impl<T: Trait<Assoc = u32>> NoOverlap for W<T> {}
|
7
tests/crashes/129503.rs
Normal file
7
tests/crashes/129503.rs
Normal file
@ -0,0 +1,7 @@
|
||||
//@ known-bug: rust-lang/rust#129503
|
||||
|
||||
use std::arch::asm;
|
||||
|
||||
unsafe fn f6() {
|
||||
asm!(concat!(r#"lJÆ<F0908FBF>.<>"#, "r} {}"));
|
||||
}
|
26
tests/crashes/129556.rs
Normal file
26
tests/crashes/129556.rs
Normal file
@ -0,0 +1,26 @@
|
||||
//@ known-bug: rust-lang/rust#129556
|
||||
|
||||
#![feature(adt_const_params)]
|
||||
#![feature(generic_const_exprs)]
|
||||
|
||||
use core::marker::ConstParamTy;
|
||||
|
||||
// #[derive(ConstParamTy, PartialEq, Eq)]
|
||||
// struct StructOrEnum;
|
||||
|
||||
#[derive(ConstParamTy, PartialEq, Eq)]
|
||||
enum StructOrEnum {
|
||||
A,
|
||||
}
|
||||
|
||||
trait TraitParent<const SMTH: StructOrEnum = { StructOrEnum::A }> {}
|
||||
|
||||
trait TraitChild<const SMTH: StructOrEnum = { StructOrEnum::A }>: TraitParent<SMTH> {}
|
||||
|
||||
impl TraitParent for StructOrEnum {}
|
||||
|
||||
// ICE occurs
|
||||
impl TraitChild for StructOrEnum {}
|
||||
|
||||
// ICE does not occur
|
||||
// impl TraitChild<{ StructOrEnum::A }> for StructOrEnum {}
|
Loading…
Reference in New Issue
Block a user