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.
Auto merge of rust-lang#122997 - matthiaskrgr:compiletest_ices, r=oli…
…-obk compiletest ice tracking see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/where.20to.20mass-add.20known.20ices.20.2F.20merging.20glacier.20into.20rust/near/429082963 This will allow us to sunset most of https://github.com/rust-lang/glacier The rustc ices will be tracked directly inside the rust testsuite There are a couple of .sh tests remaining that I have not ported over yet. This adds `tests/crashes`, a file inside this directory MUST ice, otherwise it is considered test-fail. This will be used to track ICEs from glacier and the bugtracker. When someones pr accidentally fixes one of these ICEs, they can move the test from `crashes` into `ui` for example. I also added a new tidy lint that warns when a test inside `tests/crashes` does not have a `//@ known-bug: ` line the env var `COMPILETEST_VERBOSE_CRASHES` can be set to get exit code, stderr and stdout of a crash-test to aid debugging/adding tests.
- Loading branch information
Showing
172 changed files
with
3,362 additions
and
7 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
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
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
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
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
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
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
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 @@ | ||
//! Tidy check to ensure that tests inside 'tests/crashes' have a '@known-bug' directive. | ||
use crate::walk::*; | ||
use std::path::Path; | ||
|
||
pub fn check(filepath: &Path, bad: &mut bool) { | ||
walk(filepath, |path, _is_dir| filter_not_rust(path), &mut |entry, contents| { | ||
let file = entry.path(); | ||
if !contents.lines().any(|line| line.starts_with("//@ known-bug: ")) { | ||
tidy_error!( | ||
bad, | ||
"{} crash/ice test does not have a \"//@ known-bug: \" directive", | ||
file.display() | ||
); | ||
} | ||
}); | ||
} |
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
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
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: #100041 | ||
|
||
pub trait WellUnformed { | ||
type RequestNormalize; | ||
} | ||
|
||
impl<T: ?Sized> WellUnformed for T { | ||
type RequestNormalize = (); | ||
} | ||
|
||
pub fn latent(_: &[<[[()]] as WellUnformed>::RequestNormalize; 0]) {} | ||
|
||
pub fn bang() { | ||
latent(&[]); | ||
} | ||
|
||
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,14 @@ | ||
//@ known-bug: #101036 | ||
#![feature(generic_const_exprs)] | ||
|
||
const fn t<const N: usize>() -> u8 { | ||
N as u8 | ||
} | ||
|
||
#[repr(u8)] | ||
enum T<const N: u8 = { T::<0>::A as u8 + T::<0>::B as u8 }> | ||
where | ||
[(); N as usize]: | ||
{ | ||
A = t::<N>() as u8, B | ||
} |
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,42 @@ | ||
//@ known-bug: #101557 | ||
//@ compile-flags: -Copt-level=0 | ||
#![feature(generic_const_exprs)] | ||
use std::marker::PhantomData; | ||
|
||
trait Trait { | ||
const CONST: usize; | ||
} | ||
|
||
struct A<T: Trait> { | ||
_marker: PhantomData<T>, | ||
} | ||
|
||
impl<const N: usize> Trait for [i8; N] { | ||
const CONST: usize = N; | ||
} | ||
|
||
impl<const N: usize> From<usize> for A<[i8; N]> { | ||
fn from(_: usize) -> Self { | ||
todo!() | ||
} | ||
} | ||
|
||
impl<T: Trait> From<A<[i8; T::CONST]>> for A<T> { | ||
fn from(_: A<[i8; T::CONST]>) -> Self { | ||
todo!() | ||
} | ||
} | ||
|
||
fn f<T: Trait>() -> A<T> | ||
where | ||
[(); T::CONST]:, | ||
{ | ||
// Usage of `0` is arbitrary | ||
let a = A::<[i8; T::CONST]>::from(0); | ||
A::<T>::from(a) | ||
} | ||
|
||
fn main() { | ||
// Usage of `1` is arbitrary | ||
f::<[i8; 1]>(); | ||
} |
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: #101962 | ||
|
||
#![feature(core_intrinsics)] | ||
|
||
pub fn wrapping<T: Copy>(a: T, b: T) { | ||
let _z = core::intrinsics::wrapping_mul(a, b); | ||
} | ||
|
||
fn main() { | ||
wrapping(1,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,45 @@ | ||
//@ known-bug: #102047 | ||
|
||
struct Ty1; | ||
struct Ty2; | ||
|
||
pub trait Trait<T> {} | ||
|
||
pub trait WithAssoc1<'a> { | ||
type Assoc; | ||
} | ||
pub trait WithAssoc2<'a> { | ||
type Assoc; | ||
} | ||
|
||
impl<T, U> Trait<for<'a> fn(<T as WithAssoc1<'a>>::Assoc, <U as WithAssoc2<'a>>::Assoc)> for (T, U) | ||
where | ||
T: for<'a> WithAssoc1<'a> + for<'a> WithAssoc2<'a, Assoc = i32>, | ||
U: for<'a> WithAssoc2<'a>, | ||
{ | ||
} | ||
|
||
impl WithAssoc1<'_> for Ty1 { | ||
type Assoc = (); | ||
} | ||
impl WithAssoc2<'_> for Ty1 { | ||
type Assoc = i32; | ||
} | ||
impl WithAssoc1<'_> for Ty2 { | ||
type Assoc = (); | ||
} | ||
impl WithAssoc2<'_> for Ty2 { | ||
type Assoc = u32; | ||
} | ||
|
||
fn foo<T, U, V>() | ||
where | ||
T: for<'a> WithAssoc1<'a>, | ||
U: for<'a> WithAssoc2<'a>, | ||
(T, U): Trait<V>, | ||
{ | ||
} | ||
|
||
fn main() { | ||
foo::<Ty1, Ty2, _>(); | ||
} |
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: #102252 | ||
|
||
#![feature(min_specialization, rustc_attrs)] | ||
|
||
#[rustc_specialization_trait] | ||
pub trait Trait {} | ||
|
||
struct Struct | ||
where | ||
Self: Iterator<Item = <Self as Iterator>::Item>, {} | ||
|
||
impl Trait for Struct {} | ||
|
||
fn main() {} |
Oops, something went wrong.