From 7ba2d8b6df0e04291467f38f8949284c17a81176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 3 Jul 2022 14:26:17 +0200 Subject: [PATCH] add 3 ices https://github.com/rust-lang/rust/issues/98813 https://github.com/rust-lang/rust/issues/98821 https://github.com/rust-lang/rust/issues/98842 --- ices/98813.rs | 10 ++++++++++ ices/98821.sh | 16 ++++++++++++++++ ices/98842.sh | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100644 ices/98813.rs create mode 100755 ices/98821.sh create mode 100644 ices/98842.sh diff --git a/ices/98813.rs b/ices/98813.rs new file mode 100644 index 00000000..daba4652 --- /dev/null +++ b/ices/98813.rs @@ -0,0 +1,10 @@ +#![feature(adt_const_params)] + +const ZERO: f64 = 0.0; + +pub struct Foo {} + +fn main() { + let _ = Foo::<0.0> {}; // fails + let _ = Foo:: {}; // passes +} diff --git a/ices/98821.sh b/ices/98821.sh new file mode 100755 index 00000000..268db48a --- /dev/null +++ b/ices/98821.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +rustc -Zmir-opt-level=3 - <<'EOF' + +#![feature(unboxed_closures)] + +extern "rust-call" fn foo(_: T) {} + +fn main() { + foo(()); + foo((1, 2)); +} + + +EOF + diff --git a/ices/98842.sh b/ices/98842.sh new file mode 100644 index 00000000..59f0bfc1 --- /dev/null +++ b/ices/98842.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +rustc --crate-type lib --edition=2021 - <<'EOF' + +struct Foo(<&'static Foo as ::core::ops::Deref>::Target); +const _: *const Foo = 0 as _; + +EOF +