-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #129228 - matthiaskrgr:oopsie, r=jieyouxu
crashes: more tests r? `@jieyouxu`
- Loading branch information
Showing
7 changed files
with
98 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,7 @@ | ||
//@ known-bug: rust-lang/rust#129150 | ||
//@ only-x86_64 | ||
use std::arch::x86_64::_mm_blend_ps; | ||
|
||
pub fn main() { | ||
_mm_blend_ps(1, 2, &const {} ); | ||
} |
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#129166 | ||
|
||
fn main() { | ||
#[cfg_eval] | ||
#[cfg] | ||
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,5 @@ | ||
//@ known-bug: rust-lang/rust#129205 | ||
|
||
fn x<T: Copy>() { | ||
T::try_from(); | ||
} |
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,11 @@ | ||
//@ known-bug: rust-lang/rust#129209 | ||
|
||
impl< | ||
const N: usize = { | ||
static || { | ||
Foo([0; X]); | ||
} | ||
}, | ||
> PartialEq for True | ||
{ | ||
} |
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,30 @@ | ||
//@ known-bug: rust-lang/rust#129214 | ||
//@ compile-flags: -Zvalidate-mir -Copt-level=3 --crate-type=lib | ||
|
||
trait to_str {} | ||
|
||
trait map<T> { | ||
fn map<U, F>(&self, f: F) -> Vec<U> | ||
where | ||
F: FnMut(&Box<usize>) -> U; | ||
} | ||
impl<T> map<T> for Vec<T> { | ||
fn map<U, F>(&self, mut f: F) -> Vec<U> | ||
where | ||
F: FnMut(&T) -> U, | ||
{ | ||
let mut r = Vec::new(); | ||
for i in self { | ||
r.push(f(i)); | ||
} | ||
r | ||
} | ||
} | ||
|
||
fn foo<U, T: map<U>>(x: T) -> Vec<String> { | ||
x.map(|_e| "hi".to_string()) | ||
} | ||
|
||
pub fn main() { | ||
assert_eq!(foo(vec![1]), ["hi".to_string()]); | ||
} |
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,12 @@ | ||
//@ known-bug: rust-lang/rust#129216 | ||
//@ only-linux | ||
|
||
trait Mirror { | ||
type Assoc; | ||
} | ||
|
||
struct Foo; | ||
|
||
fn main() { | ||
<Foo as Mirror>::Assoc::new(); | ||
} |
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#129219 | ||
//@ compile-flags: -Zmir-opt-level=5 -Zvalidate-mir --edition=2018 | ||
|
||
use core::marker::Unsize; | ||
|
||
pub trait CastTo<T: ?Sized>: Unsize<T> {} | ||
|
||
impl<T: ?Sized, U: ?Sized> CastTo<T> for U {} | ||
|
||
impl<T: ?Sized> Cast for T {} | ||
pub trait Cast { | ||
fn cast<T: ?Sized>(&self) -> &T | ||
where | ||
Self: CastTo<T>, | ||
{ | ||
self | ||
} | ||
} | ||
|
||
pub trait Foo {} | ||
impl Foo for [i32; 0] {} | ||
|
||
fn main() { | ||
let x: &dyn Foo = &[]; | ||
let x = x.cast::<[i32]>(); | ||
} |