From 94a0819fe3a0d679c3042a77bfe6a2afc505daea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:28 +0200 Subject: Adding upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- .../rfc-2632-const-trait-impl/trait-where-clause.rs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs') diff --git a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs index d37ed3bb8..85ca5fc90 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs +++ b/src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs @@ -1,5 +1,6 @@ #![feature(const_trait_impl)] +#[const_trait] trait Bar {} trait Foo { @@ -8,7 +9,7 @@ trait Foo { fn c(); } -const fn test1() { +fn test1() { T::a(); T::b(); //~^ ERROR the trait bound @@ -16,21 +17,7 @@ const fn test1() { //~^ ERROR the trait bound } -const fn test2() { - T::a(); - T::b(); - T::c::(); -} - -fn test3() { - T::a(); - T::b(); - //~^ ERROR the trait bound - T::c::(); - //~^ ERROR the trait bound -} - -fn test4() { +fn test2() { T::a(); T::b(); T::c::(); -- cgit v1.2.3