forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#134236 - matthiaskrgr:tests12122024, r=compiler-errors crashes: more tests v2 try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-gnu
- Loading branch information
Showing
11 changed files
with
122 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,12 @@ | ||
//@ known-bug: #133426 | ||
|
||
fn a( | ||
_: impl Iterator< | ||
Item = [(); { | ||
match *todo!() { ! }; | ||
}], | ||
>, | ||
) { | ||
} | ||
|
||
fn b(_: impl Iterator<Item = { match 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,11 @@ | ||
//@ known-bug: #133597 | ||
|
||
pub trait Foo2 { | ||
fn boxed<'a: 'a>() -> impl Sized + FnOnce<()>; | ||
} | ||
|
||
impl Foo2 for () {} | ||
|
||
|
||
fn f() -> impl FnOnce<()> { || () } | ||
fn main() { () = f(); } |
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,33 @@ | ||
//@ known-bug: #133639 | ||
|
||
#![feature(with_negative_coherence)] | ||
#![feature(min_specialization)] | ||
#![feature(generic_const_exprs)] | ||
|
||
#![crate_type = "lib"] | ||
use std::str::FromStr; | ||
|
||
struct a<const b: bool>; | ||
|
||
trait c {} | ||
|
||
impl<const d: u32> FromStr for e<d> | ||
where | ||
a<{ d <= 2 }>: c, | ||
{ | ||
type Err = (); | ||
fn from_str(f: &str) -> Result<Self, Self::Err> { | ||
unimplemented!() | ||
} | ||
} | ||
struct e<const d: u32>; | ||
|
||
impl<const d: u32> FromStr for e<d> | ||
where | ||
a<{ d <= 2 }>: c, | ||
{ | ||
type Err = (); | ||
fn from_str(f: &str) -> Result<Self, Self::Err> { | ||
unimplemented!() | ||
} | ||
} |
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: #133808 | ||
|
||
#![feature(generic_const_exprs, transmutability)] | ||
|
||
mod assert { | ||
use std::mem::TransmuteFrom; | ||
|
||
pub fn is_transmutable<Src, Dst>() | ||
where | ||
Dst: TransmuteFrom<Src>, | ||
{ | ||
} | ||
} | ||
|
||
pub fn main() {} |
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,13 @@ | ||
//@ known-bug: #133868 | ||
|
||
trait Foo { | ||
type Assoc; | ||
} | ||
|
||
trait Bar { | ||
fn method() -> impl Sized; | ||
} | ||
impl<T> Bar for T where <T as Foo>::Assoc: Sized | ||
{ | ||
fn method() {} | ||
} |
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,9 @@ | ||
//@ known-bug: #133965 | ||
//@ needs-rustc-debug-assertions | ||
|
||
struct NonGeneric {} | ||
|
||
#[derive(Default)] | ||
struct NonGeneric<'a, const N: usize> {} | ||
|
||
pub fn main() {} |
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,3 @@ | ||
//@ known-bug: #133966 | ||
pub struct Data([[&'static str]; 5_i32]); | ||
const _: &'static Data = unsafe { &*(&[] as *const Data) }; |
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: #134005 | ||
|
||
fn main() { | ||
let _ = [std::ops::Add::add, std::ops::Mul::mul, main as fn(_, &_)]; | ||
} |
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,4 @@ | ||
//@ known-bug: #134061 | ||
//@ needs-rustc-debug-assertions | ||
|
||
const x: () = |&'a |
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,8 @@ | ||
//@ known-bug: #134162 | ||
|
||
fn main() { | ||
struct X; | ||
|
||
let xs = [X, X, X]; | ||
let eq = xs == [panic!("panic evaluated"); 2]; | ||
} |
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,9 @@ | ||
//@ known-bug: #134217 | ||
|
||
impl<A> std::ops::CoerceUnsized<A> for A {} | ||
|
||
fn main() { | ||
if let _ = true | ||
&& true | ||
{} | ||
} |