From 0f8b2f39e31685906c5f54f88c6df0e6979f5250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 24 Jul 2022 10:37:16 +0200 Subject: [PATCH] add 4 ices https://github.com/rust-lang/rust/issues/99641 https://github.com/rust-lang/rust/issues/99642 https://github.com/rust-lang/rust/issues/99647 https://github.com/rust-lang/rust/issues/99662 --- ices/99641.sh | 23 +++++++++++++++++++++++ ices/99642.rs | 5 +++++ ices/99647.sh | 16 ++++++++++++++++ ices/99662.sh | 19 +++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100755 ices/99641.sh create mode 100644 ices/99642.rs create mode 100755 ices/99647.sh create mode 100755 ices/99662.sh diff --git a/ices/99641.sh b/ices/99641.sh new file mode 100755 index 00000000..0614ffb4 --- /dev/null +++ b/ices/99641.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +rustc -Cdebuginfo=1 - <<'EOF' + +#![feature(adt_const_params)] + +fn main() { + pub struct Color; + + impl Color { + /// Construct a new color + pub fn new() -> Self { + Color:: + } + } + + pub const D65: (fn(),) = (|| {},); + + Color::::new(); +} + +EOF + diff --git a/ices/99642.rs b/ices/99642.rs new file mode 100644 index 00000000..c8f52168 --- /dev/null +++ b/ices/99642.rs @@ -0,0 +1,5 @@ +fn test() -> impl Iterator { + Box::new(0..) as Box> +} + +pub fn main() {} diff --git a/ices/99647.sh b/ices/99647.sh new file mode 100755 index 00000000..0e030948 --- /dev/null +++ b/ices/99647.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +rustc --edition=2018 -Zcrate-attr="feature(generic_const_exprs)" - <<'EOF' + +#[allow(unused)] +async fn foo<'a>() { + let _data = &mut [0u8; { 1 + 4 }]; + bar().await +} + +async fn bar() {} + +fn main() {} + +EOF + diff --git a/ices/99662.sh b/ices/99662.sh new file mode 100755 index 00000000..3b5edd9a --- /dev/null +++ b/ices/99662.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +rustc "-Zcrate-attr=feature(with_negative_coherence)" - <<'EOF' + +#![feature(negative_impls)] + +// FIXME: this should compile + +trait MyPredicate<'a> {} +impl<'a, T> !MyPredicate<'a> for &T where T: 'a {} +trait MyTrait<'a> {} +impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {} +impl<'a, T> MyTrait<'a> for &'a T {} +//~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_` + +fn main() {} + +EOF +