From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/const-generics/issues/issue-68366.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/ui/const-generics/issues/issue-68366.rs (limited to 'tests/ui/const-generics/issues/issue-68366.rs') diff --git a/tests/ui/const-generics/issues/issue-68366.rs b/tests/ui/const-generics/issues/issue-68366.rs new file mode 100644 index 000000000..4c2741ab4 --- /dev/null +++ b/tests/ui/const-generics/issues/issue-68366.rs @@ -0,0 +1,20 @@ +// Checks that const expressions have a useful note explaining why they can't be evaluated. +// The note should relate to the fact that it cannot be shown forall N that it maps 1-1 to a new +// type. + +// revisions: full min +#![cfg_attr(full, feature(generic_const_exprs))] +#![cfg_attr(full, allow(incomplete_features))] + +struct Collatz>; + +impl Collatz<{Some(N)}> {} +//~^ ERROR the const parameter +//[min]~^^ generic parameters may not be used in const operations + +struct Foo; + +impl Foo {} +//~^ ERROR the const parameter + +fn main() {} -- cgit v1.2.3