From da3dd0a921bd030d41742c01f9318c2e18c37c8b Mon Sep 17 00:00:00 2001 From: johannesd3 Date: Sat, 8 May 2021 11:48:18 +0200 Subject: [PATCH] Add 85031 Issue: rust-lang/rust#85031 --- ices/85031-1.sh | 16 ++++++++++++++++ ices/85031-2.sh | 25 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ices/85031-1.sh create mode 100644 ices/85031-2.sh diff --git a/ices/85031-1.sh b/ices/85031-1.sh new file mode 100644 index 00000000..e5e6aee5 --- /dev/null +++ b/ices/85031-1.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +rustc --edition 2018 -C incremental=foo --crate-type lib - <<'EOF' +#![allow(incomplete_features)] +#![feature(const_generics, const_evaluatable_checked)] + +pub struct Ref<'a>(&'a i32); + +impl<'a> Ref<'a> { + pub fn foo() -> [(); A - 0] { + Self::foo() + } +} + +EOF + diff --git a/ices/85031-2.sh b/ices/85031-2.sh new file mode 100644 index 00000000..2107e07d --- /dev/null +++ b/ices/85031-2.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +rustc --edition 2018 -C incremental=foo --crate-type lib - <<'EOF' +#![allow(incomplete_features)] +#![feature(const_generics, const_evaluatable_checked)] + +pub struct Ref<'a>(&'a i32); + +impl Ref<'_> { + pub fn foo() + where + ([(); A - 0], ()): Sized, + { + Self::bar::() + } + + fn bar() + where + ([(); A - 0], ()): Sized, + { + } +} + +EOF +