From 1a65627c20686c2c1cbe622554ab38b61718caf9 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 17 Feb 2020 05:14:12 +0900 Subject: [PATCH] Add or revive ICEs --- fixed/62879.rs | 11 ----------- ices/62879.rs | 9 +++++++++ ices/69204.rs | 15 +++++++++++++++ 3 files changed, 24 insertions(+), 11 deletions(-) delete mode 100644 fixed/62879.rs create mode 100644 ices/62879.rs create mode 100644 ices/69204.rs diff --git a/fixed/62879.rs b/fixed/62879.rs deleted file mode 100644 index cb9cea84..00000000 --- a/fixed/62879.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![feature(const_generics)] -trait Foo {} - -impl Foo for [(); N] -where - Self:FooImpl<{N==0}> -{} - -trait FooImpl{} - -fn main() {} diff --git a/ices/62879.rs b/ices/62879.rs new file mode 100644 index 00000000..442c00ae --- /dev/null +++ b/ices/62879.rs @@ -0,0 +1,9 @@ +#![feature(const_generics)] + +fn foo() {} + +fn bar() { + foo::<1, {[1]}>(); +} + +fn main() {} diff --git a/ices/69204.rs b/ices/69204.rs new file mode 100644 index 00000000..97a1d79d --- /dev/null +++ b/ices/69204.rs @@ -0,0 +1,15 @@ +trait IAmATrait { + type Item; + fn function(&self) -> Self::Item; +} + +struct IAmAnObject(usize); + +impl IAmATrait for IAmAnObject { + type Item = _; + fn function(&self) -> Self::Item { + self.0 + } +} + +fn main() {}