From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/const-generics/issues/issue-73260.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/ui/const-generics/issues/issue-73260.rs (limited to 'tests/ui/const-generics/issues/issue-73260.rs') diff --git a/tests/ui/const-generics/issues/issue-73260.rs b/tests/ui/const-generics/issues/issue-73260.rs new file mode 100644 index 000000000..d762f9c8b --- /dev/null +++ b/tests/ui/const-generics/issues/issue-73260.rs @@ -0,0 +1,19 @@ +// compile-flags: -Zsave-analysis +#![feature(generic_const_exprs)] +#![allow(incomplete_features)] +struct Arr +where + Assert::<{N < usize::MAX / 2}>: IsTrue, +{} + +enum Assert {} + +trait IsTrue {} + +impl IsTrue for Assert {} + +fn main() { + let x: Arr<{usize::MAX}> = Arr {}; + //~^ ERROR mismatched types + //~| ERROR mismatched types +} -- cgit v1.2.3