From 750808680add716394e94b4abb2a711b01400fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Thu, 25 Apr 2019 11:36:16 -0700 Subject: [PATCH] Don't ICE when relating const type args --- src/test/ui/const-generics/issue-60263.rs | 9 +++++++++ src/test/ui/const-generics/issue-60263.stderr | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/test/ui/const-generics/issue-60263.rs create mode 100644 src/test/ui/const-generics/issue-60263.stderr diff --git a/src/test/ui/const-generics/issue-60263.rs b/src/test/ui/const-generics/issue-60263.rs new file mode 100644 index 0000000000000..70cbc242c41a5 --- /dev/null +++ b/src/test/ui/const-generics/issue-60263.rs @@ -0,0 +1,9 @@ +struct B; //~ ERROR const generics are unstable + +impl B<0> { + fn bug() -> Self { + panic!() + } +} + +fn main() {} diff --git a/src/test/ui/const-generics/issue-60263.stderr b/src/test/ui/const-generics/issue-60263.stderr new file mode 100644 index 0000000000000..ab1b9e4a7cd86 --- /dev/null +++ b/src/test/ui/const-generics/issue-60263.stderr @@ -0,0 +1,12 @@ +error[E0658]: const generics are unstable + --> $DIR/issue-60263.rs:1:16 + | +LL | struct B; + | ^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/44580 + = help: add #![feature(const_generics)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`.