forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#129782 - matthiaskrgr:c, r=jieyouxu
couple more crash tests r? `@jieyouxu`
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)]) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//@ known-bug: rust-lang/rust#129503 | ||
|
||
use std::arch::asm; | ||
|
||
unsafe fn f6() { | ||
asm!(concat!(r#"lJ�.�"#, "r} {}")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} |