From 0210854178e41f16db3409459a9ebc9f0656be3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Tue, 28 Jun 2022 17:29:12 +0200 Subject: [PATCH] add 3 ices https://github.com/rust-lang/rust/issues/98594 https://github.com/rust-lang/rust/issues/98598 https://github.com/rust-lang/rust/issues/98604 --- ices/98594.sh | 26 ++++++++++++++++++++++++++ ices/98598.rs | 19 +++++++++++++++++++ ices/98604.sh | 17 +++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100755 ices/98594.sh create mode 100644 ices/98598.rs create mode 100755 ices/98604.sh diff --git a/ices/98594.sh b/ices/98594.sh new file mode 100755 index 00000000..ca754967 --- /dev/null +++ b/ices/98594.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +rustc -Zverbose - <<'EOF' + + +#![allow(unused_parens)] +trait Foo { + type Assoc; +} + +fn called() +where + for<'b> fn(&'b ()): Foo, +{ +} + +fn caller() +where + (for<'a> fn(&'a ())): Foo, +{ + called() +} + +fn main() {} +EOF + diff --git a/ices/98598.rs b/ices/98598.rs new file mode 100644 index 00000000..e0a474aa --- /dev/null +++ b/ices/98598.rs @@ -0,0 +1,19 @@ +pub trait Foo { + type Output: Foo; + + fn baz() -> Self::Output; +} + +pub struct Bar; + +impl Foo for &Bar { + type Output = Bar; + + fn baz() -> Self::Output { + Foo::baz(); + + Self::Output {} + } +} + +pub fn main() {} diff --git a/ices/98604.sh b/ices/98604.sh new file mode 100755 index 00000000..e6a8f41b --- /dev/null +++ b/ices/98604.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +rustc --edition=2021 - <<'EOF' + +type AsyncFnPtr = Box< + dyn Fn() -> std::pin::Pin>>, +>; + +async fn test() {} + +#[allow(unused_must_use)] +fn main() { + Box::new(test) as AsyncFnPtr; +} + +EOF +