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 --- .../ui/associated-consts/assoc-const-eq-missing.rs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/ui/associated-consts/assoc-const-eq-missing.rs (limited to 'tests/ui/associated-consts/assoc-const-eq-missing.rs') diff --git a/tests/ui/associated-consts/assoc-const-eq-missing.rs b/tests/ui/associated-consts/assoc-const-eq-missing.rs new file mode 100644 index 000000000..5e029a12d --- /dev/null +++ b/tests/ui/associated-consts/assoc-const-eq-missing.rs @@ -0,0 +1,26 @@ +#![feature(associated_const_equality)] +#![allow(unused)] + +pub trait Foo { + const N: usize; +} + +pub struct Bar; + +impl Foo for Bar { + const N: usize = 3; +} + + +fn foo1>() {} +//~^ ERROR associated type +fn foo2>() {} +//~^ ERROR associated type +fn foo3>() {} +//~^ ERROR associated type + +fn main() { + foo1::(); + foo2::(); + foo3::(); +} -- cgit v1.2.3