From 90dd798cf53320b3478119d06d2d8c47880c9247 Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Sun, 13 Sep 2020 23:02:43 +0200 Subject: [PATCH] bless tests --- .../ui/const-generics/issues/issue-62504.min.stderr | 10 +++++++--- src/test/ui/const-generics/issues/issue-62504.rs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/test/ui/const-generics/issues/issue-62504.min.stderr b/src/test/ui/const-generics/issues/issue-62504.min.stderr index 752df17aad6..8f794312834 100644 --- a/src/test/ui/const-generics/issues/issue-62504.min.stderr +++ b/src/test/ui/const-generics/issues/issue-62504.min.stderr @@ -1,10 +1,14 @@ -error: generic parameters must not be used inside of non trivial constant values +error: generic `Self` types are currently not permitted in anonymous constants --> $DIR/issue-62504.rs:19:25 | LL | ArrayHolder([0; Self::SIZE]) - | ^^^^^^^^^^ non-trivial anonymous constants must not depend on the parameter `Self` + | ^^^^^^^^^^ | - = help: it is currently only allowed to use either `Self` or `{ Self }` as generic constants +note: not a concrete type + --> $DIR/issue-62504.rs:17:22 + | +LL | impl ArrayHolder { + | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/const-generics/issues/issue-62504.rs b/src/test/ui/const-generics/issues/issue-62504.rs index b520dbe4e80..015f170f00d 100644 --- a/src/test/ui/const-generics/issues/issue-62504.rs +++ b/src/test/ui/const-generics/issues/issue-62504.rs @@ -18,7 +18,7 @@ impl ArrayHolder { pub const fn new() -> Self { ArrayHolder([0; Self::SIZE]) //[full]~^ ERROR constant expression depends on a generic parameter - //[min]~^^ ERROR generic parameters must not be used inside of non trivial constant values + //[min]~^^ ERROR generic `Self` types are currently } }