From 7fe89acef10660a68f85559c1e96c02e4add9938 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 5 Jul 2020 04:54:31 +0900 Subject: [PATCH 1/2] Add 5 ICEs --- ices/73860.sh | 8 ++++++++ ices/73980.rs | 10 ++++++++++ ices/73993.rs | 7 +++++++ ices/74018.rs | 11 +++++++++++ ices/74047.rs | 14 ++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 ices/73860.sh create mode 100644 ices/73980.rs create mode 100644 ices/73993.rs create mode 100644 ices/74018.rs create mode 100644 ices/74047.rs diff --git a/ices/73860.sh b/ices/73860.sh new file mode 100644 index 00000000..aab941c9 --- /dev/null +++ b/ices/73860.sh @@ -0,0 +1,8 @@ +#/bin/bash + +rustc -Zvalidate-mir - << EOF +fn main() { + for _ in &[0] {} +} + +EOF diff --git a/ices/73980.rs b/ices/73980.rs new file mode 100644 index 00000000..8cf866c3 --- /dev/null +++ b/ices/73980.rs @@ -0,0 +1,10 @@ +struct X(P,Q); +struct L(T); + +impl L{ + const S: usize=1; +} + +impl X::S]> {} + +fn main() {} diff --git a/ices/73993.rs b/ices/73993.rs new file mode 100644 index 00000000..1877c966 --- /dev/null +++ b/ices/73993.rs @@ -0,0 +1,7 @@ +#![crate_type = "lib"] + +pub struct Fixed64(i64); + +pub fn div(f: Fixed64) { + f.0 / 0; +} diff --git a/ices/74018.rs b/ices/74018.rs new file mode 100644 index 00000000..110079ad --- /dev/null +++ b/ices/74018.rs @@ -0,0 +1,11 @@ +trait Trait { + type Associated; + fn into(self) -> Self::Associated; +} + +impl<'a, I: Iterator> Trait for (i32, I) { + type Associated = (i32, impl Iterator); + fn into(self) -> Self::Associated { (0_i32, &[0_i32].iter()) } +} + +fn main() {} diff --git a/ices/74047.rs b/ices/74047.rs new file mode 100644 index 00000000..943d21b1 --- /dev/null +++ b/ices/74047.rs @@ -0,0 +1,14 @@ +use std::convert::{TryFrom, TryInto}; +use std::io; + +pub struct MyStream; +pub struct OtherStream; + +pub async fn connect() -> io::Result { + let stream: MyStream = OtherStream.try_into()?; + Ok(stream) +} + +impl TryFrom for MyStream {} + +fn main() {} From e0035059f4d7ff489822ba2389862fa9beeca9b2 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 6 Jul 2020 14:47:59 +0900 Subject: [PATCH 2/2] Fix shebangs --- fixed/73109.sh | 2 +- ices/73021.sh | 2 +- ices/73260.sh | 2 +- ices/73626.sh | 2 +- ices/73860.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fixed/73109.sh b/fixed/73109.sh index 5c89a37f..0385326b 100644 --- a/fixed/73109.sh +++ b/fixed/73109.sh @@ -1,4 +1,4 @@ -#/bin/bash +#!/bin/bash rustc -Z validate-mir - <