-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #124775 - matthiaskrgr:boom, r=jieyouxu
crashes: add lastest batch of crash tests
- Loading branch information
Showing
9 changed files
with
148 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#124436 | ||
//@ compile-flags: -Zdump-mir=all -Zpolymorphize=on | ||
|
||
pub trait TraitCat {} | ||
pub trait TraitDog {} | ||
|
||
pub fn gamma<T: TraitCat + TraitDog>(t: [TraitDog; 32]) {} |
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,23 @@ | ||
//@ known-bug: rust-lang/rust#124440 | ||
|
||
#![allow(warnings)] | ||
|
||
trait Foo {} | ||
|
||
impl<F> Foo for F where F: FnMut(&()) {} | ||
|
||
struct Bar<F> { | ||
f: F, | ||
} | ||
|
||
impl<F> Foo for Bar<F> where F: Foo {} | ||
|
||
fn assert_foo<F>(_: F) | ||
where | ||
Bar<F>: Foo, | ||
{ | ||
} | ||
|
||
fn main() { | ||
assert_foo(|_| ()); | ||
} |
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,17 @@ | ||
//@ known-bug: rust-lang/rust #124464 | ||
enum TestOption<T> { | ||
TestSome(T), | ||
TestSome(T), | ||
} | ||
|
||
pub struct Request { | ||
bar: TestOption<u64>, | ||
bar: u8, | ||
} | ||
|
||
fn default_instance() -> &'static Request { | ||
static instance: Request = Request { bar: 17 }; | ||
&instance | ||
} | ||
|
||
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,16 @@ | ||
//@ known-bug: rust-lang/rust#124490 | ||
use io::{self as std}; | ||
use std::collections::{self as io}; | ||
|
||
mod a { | ||
pub mod b { | ||
pub mod c {} | ||
} | ||
} | ||
|
||
use a::*; | ||
|
||
use b::c; | ||
use c as b; | ||
|
||
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,12 @@ | ||
//@ known-bug: rust-lang/rust#124552 | ||
|
||
struct B; | ||
|
||
struct Foo { | ||
b: u32, | ||
b: B, | ||
} | ||
|
||
static BAR: Foo = Foo { b: B }; | ||
|
||
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,46 @@ | ||
//@ known-bug: rust-lang/rust#124563 | ||
|
||
use std::marker::PhantomData; | ||
|
||
pub trait Trait {} | ||
|
||
pub trait Foo { | ||
type Trait: Trait; | ||
type Bar: Bar; | ||
fn foo(&mut self); | ||
} | ||
|
||
pub struct FooImpl<'a, 'b, A: Trait>(PhantomData<&'a &'b A>); | ||
|
||
impl<'a, 'b, T> Foo for FooImpl<'a, 'b, T> | ||
where | ||
T: Trait, | ||
{ | ||
type Trait = T; | ||
type Bar = BarImpl<'a, 'b, T>; | ||
|
||
fn foo(&mut self) { | ||
self.enter_scope(|ctx| { | ||
BarImpl(ctx); | ||
}); | ||
} | ||
} | ||
|
||
impl<'a, 'b, T> FooImpl<'a, 'b, T> | ||
where | ||
T: Trait, | ||
{ | ||
fn enter_scope(&mut self, _scope: impl FnOnce(&mut Self)) {} | ||
} | ||
pub trait Bar { | ||
type Foo: Foo; | ||
} | ||
|
||
pub struct BarImpl<'a, 'b, T: Trait>(&'b mut FooImpl<'a, 'b, T>); | ||
|
||
impl<'a, 'b, T> Bar for BarImpl<'a, 'b, T> | ||
where | ||
T: Trait, | ||
{ | ||
type Foo = FooImpl<'a, 'b, 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,5 @@ | ||
//@ known-bug: rust-lang/rust#124583 | ||
|
||
fn main() { | ||
let _ = -(-0.0f16); | ||
} |
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,14 @@ | ||
//@ known-bug: rust-lang/rust#124702 | ||
//@ compile-flags: -Znext-solver=coherence | ||
trait X {} | ||
|
||
trait Z { | ||
type Assoc: Y; | ||
} | ||
struct A<T>(T); | ||
|
||
impl<T: X> Z for A<T> { | ||
type Assoc = T; | ||
} | ||
|
||
impl<T> From<<A<A<T>> as Z>::Assoc> for 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,8 @@ | ||
//@ known-bug: rust-lang/rust#124751 | ||
//@ compile-flags: -Zunstable-options --edition=2024 | ||
|
||
#![feature(gen_blocks)] | ||
|
||
fn main() { | ||
let _ = async gen || {}; | ||
} |