diff options
Diffstat (limited to 'tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs')
| -rw-r--r-- | tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs index 2dac1970835..ece87529c3e 100644 --- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs +++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs @@ -7,12 +7,12 @@ trait Trait {} fn main() { let _: &dyn const Trait; //~ ERROR const trait bounds are not allowed in trait object types - let _: &dyn ~const Trait; //~ ERROR `~const` is not allowed here + let _: &dyn [const] Trait; //~ ERROR `[const]` is not allowed here } // Regression test for issue #119525. trait NonConst {} const fn handle(_: &dyn const NonConst) {} //~^ ERROR const trait bounds are not allowed in trait object types -const fn take(_: &dyn ~const NonConst) {} -//~^ ERROR `~const` is not allowed here +const fn take(_: &dyn [const] NonConst) {} +//~^ ERROR `[const]` is not allowed here |
