about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-06-26 10:25:24 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-06-26 13:46:45 +0000
commit512ff9520666a952850d0a360a4310c5995f6991 (patch)
tree902a12a0e0ee9e596dc7496659a656ad2c82afa5
parenteb7245a864613f290c5668f4f4e8376edd065dc6 (diff)
downloadrust-512ff9520666a952850d0a360a4310c5995f6991.tar.gz
rust-512ff9520666a952850d0a360a4310c5995f6991.zip
Rename `tilde const` test files to `conditionally const`
-rw-r--r--src/tools/tidy/src/issues.txt1
-rw-r--r--tests/ui/traits/const-traits/call-const-in-conditionally-const.rs (renamed from tests/ui/traits/const-traits/call-const-in-tilde-const.rs)0
-rw-r--r--tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr (renamed from tests/ui/traits/const-traits/call-const-in-tilde-const.stderr)2
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-and-const-params.rs (renamed from tests/ui/traits/const-traits/tilde-const-and-const-params.rs)0
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr (renamed from tests/ui/traits/const-traits/tilde-const-and-const-params.stderr)12
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs (renamed from tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs)0
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs (renamed from tests/ui/traits/const-traits/tilde-const-in-struct-args.rs)0
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs (renamed from tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs)0
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-invalid-places.rs (renamed from tests/ui/traits/const-traits/tilde-const-invalid-places.rs)0
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr (renamed from tests/ui/traits/const-traits/tilde-const-invalid-places.stderr)86
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs (renamed from tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs)0
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs (renamed from tests/ui/traits/const-traits/tilde-const-syntax.rs)0
-rw-r--r--tests/ui/traits/const-traits/duplicate-constness.rs (renamed from tests/ui/traits/const-traits/tilde-twice.rs)0
-rw-r--r--tests/ui/traits/const-traits/duplicate-constness.stderr (renamed from tests/ui/traits/const-traits/tilde-twice.stderr)2
-rw-r--r--tests/ui/traits/const-traits/impl-conditionally-const-trait.rs12
-rw-r--r--tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr (renamed from tests/ui/traits/const-traits/impl-tilde-const-trait.stderr)2
-rw-r--r--tests/ui/traits/const-traits/impl-tilde-const-trait.rs9
-rw-r--r--tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs (renamed from tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs)1
18 files changed, 65 insertions, 62 deletions
diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt
index b3517b2e9da..bad943441b3 100644
--- a/src/tools/tidy/src/issues.txt
+++ b/src/tools/tidy/src/issues.txt
@@ -3921,7 +3921,6 @@ ui/traits/const-traits/issue-79450.rs
 ui/traits/const-traits/issue-88155.rs
 ui/traits/const-traits/issue-92111.rs
 ui/traits/const-traits/issue-92230-wf-super-trait-env.rs
-ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs
 ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs
 ui/traits/issue-103563.rs
 ui/traits/issue-104322.rs
diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs b/tests/ui/traits/const-traits/call-const-in-conditionally-const.rs
index 4e8c2cd171e..4e8c2cd171e 100644
--- a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs
+++ b/tests/ui/traits/const-traits/call-const-in-conditionally-const.rs
diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr b/tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr
index b9dabceb5de..f14b640ca31 100644
--- a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr
+++ b/tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `T: const Foo` is not satisfied
-  --> $DIR/call-const-in-tilde-const.rs:9:13
+  --> $DIR/call-const-in-conditionally-const.rs:9:13
    |
 LL |     const { T::foo() }
    |             ^
diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs b/tests/ui/traits/const-traits/conditionally-const-and-const-params.rs
index 29553884b21..29553884b21 100644
--- a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-and-const-params.rs
diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr b/tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr
index f33ad02e9a4..f450bc6c9ab 100644
--- a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr
+++ b/tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr
@@ -1,35 +1,35 @@
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-and-const-params.rs:8:13
+  --> $DIR/conditionally-const-and-const-params.rs:8:13
    |
 LL |     fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
    |             ^^^^^^^^^
    |
 note: this function is not `const`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-and-const-params.rs:8:8
+  --> $DIR/conditionally-const-and-const-params.rs:8:8
    |
 LL |     fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
    |        ^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-and-const-params.rs:26:9
+  --> $DIR/conditionally-const-and-const-params.rs:26:9
    |
 LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
    |         ^^^^^^^^^
    |
 note: this function is not `const`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-and-const-params.rs:26:4
+  --> $DIR/conditionally-const-and-const-params.rs:26:4
    |
 LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
    |    ^^^
 
 error[E0277]: the trait bound `A: const Add42` is not satisfied
-  --> $DIR/tilde-const-and-const-params.rs:26:62
+  --> $DIR/conditionally-const-and-const-params.rs:26:62
    |
 LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
    |                                                              ^
 
 error[E0277]: the trait bound `A: const Add42` is not satisfied
-  --> $DIR/tilde-const-and-const-params.rs:8:45
+  --> $DIR/conditionally-const-and-const-params.rs:8:45
    |
 LL |     fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
    |                                             ^
diff --git a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs
index 7f01c0b7a5c..7f01c0b7a5c 100644
--- a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs
diff --git a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
index 0c644694585..0c644694585 100644
--- a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
diff --git a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs
index 56478a6674b..56478a6674b 100644
--- a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs
diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.rs b/tests/ui/traits/const-traits/conditionally-const-invalid-places.rs
index 52627004fb2..52627004fb2 100644
--- a/tests/ui/traits/const-traits/tilde-const-invalid-places.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-invalid-places.rs
diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
index bc991811895..62319689861 100644
--- a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr
+++ b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
@@ -1,17 +1,17 @@
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:7:24
+  --> $DIR/conditionally-const-invalid-places.rs:7:24
    |
 LL | fn non_const_function<T: [const] Trait>() {}
    |                        ^^^^^^^^^
    |
 note: this function is not `const`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:7:4
+  --> $DIR/conditionally-const-invalid-places.rs:7:4
    |
 LL | fn non_const_function<T: [const] Trait>() {}
    |    ^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:9:16
+  --> $DIR/conditionally-const-invalid-places.rs:9:16
    |
 LL | struct Struct<T: [const] Trait> { field: T }
    |                ^^^^^^^^^
@@ -19,7 +19,7 @@ LL | struct Struct<T: [const] Trait> { field: T }
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:10:21
+  --> $DIR/conditionally-const-invalid-places.rs:10:21
    |
 LL | struct TupleStruct<T: [const] Trait>(T);
    |                     ^^^^^^^^^
@@ -27,7 +27,7 @@ LL | struct TupleStruct<T: [const] Trait>(T);
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:11:20
+  --> $DIR/conditionally-const-invalid-places.rs:11:20
    |
 LL | struct UnitStruct<T: [const] Trait>;
    |                    ^^^^^^^^^
@@ -35,7 +35,7 @@ LL | struct UnitStruct<T: [const] Trait>;
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:14:12
+  --> $DIR/conditionally-const-invalid-places.rs:14:12
    |
 LL | enum Enum<T: [const] Trait> { Variant(T) }
    |            ^^^^^^^^^
@@ -43,7 +43,7 @@ LL | enum Enum<T: [const] Trait> { Variant(T) }
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:16:14
+  --> $DIR/conditionally-const-invalid-places.rs:16:14
    |
 LL | union Union<T: [const] Trait> { field: T }
    |              ^^^^^^^^^
@@ -51,7 +51,7 @@ LL | union Union<T: [const] Trait> { field: T }
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:19:12
+  --> $DIR/conditionally-const-invalid-places.rs:19:12
    |
 LL | type Type<T: [const] Trait> = T;
    |            ^^^^^^^^^
@@ -59,7 +59,7 @@ LL | type Type<T: [const] Trait> = T;
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:21:17
+  --> $DIR/conditionally-const-invalid-places.rs:21:17
    |
 LL | const CONSTANT<T: [const] Trait>: () = ();
    |                 ^^^^^^^^^
@@ -67,43 +67,43 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:25:16
+  --> $DIR/conditionally-const-invalid-places.rs:25:16
    |
 LL |     type Type<T: [const] Trait>: [const] Trait;
    |                ^^^^^^^^^
    |
 note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:25:5
+  --> $DIR/conditionally-const-invalid-places.rs:25:5
    |
 LL |     type Type<T: [const] Trait>: [const] Trait;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:25:32
+  --> $DIR/conditionally-const-invalid-places.rs:25:32
    |
 LL |     type Type<T: [const] Trait>: [const] Trait;
    |                                ^^^^^^^^^
    |
 note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:25:5
+  --> $DIR/conditionally-const-invalid-places.rs:25:5
    |
 LL |     type Type<T: [const] Trait>: [const] Trait;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:28:28
+  --> $DIR/conditionally-const-invalid-places.rs:28:28
    |
 LL |     fn non_const_function<T: [const] Trait>();
    |                            ^^^^^^^^^
    |
 note: this function is not `const`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:28:8
+  --> $DIR/conditionally-const-invalid-places.rs:28:8
    |
 LL |     fn non_const_function<T: [const] Trait>();
    |        ^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:29:21
+  --> $DIR/conditionally-const-invalid-places.rs:29:21
    |
 LL |     const CONSTANT<T: [const] Trait>: ();
    |                     ^^^^^^^^^
@@ -111,31 +111,31 @@ LL |     const CONSTANT<T: [const] Trait>: ();
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:34:16
+  --> $DIR/conditionally-const-invalid-places.rs:34:16
    |
 LL |     type Type<T: [const] Trait> = ();
    |                ^^^^^^^^^
    |
 note: associated types in non-const impls cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:34:5
+  --> $DIR/conditionally-const-invalid-places.rs:34:5
    |
 LL |     type Type<T: [const] Trait> = ();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:36:28
+  --> $DIR/conditionally-const-invalid-places.rs:36:28
    |
 LL |     fn non_const_function<T: [const] Trait>() {}
    |                            ^^^^^^^^^
    |
 note: this function is not `const`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:36:8
+  --> $DIR/conditionally-const-invalid-places.rs:36:8
    |
 LL |     fn non_const_function<T: [const] Trait>() {}
    |        ^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:37:21
+  --> $DIR/conditionally-const-invalid-places.rs:37:21
    |
 LL |     const CONSTANT<T: [const] Trait>: () = ();
    |                     ^^^^^^^^^
@@ -143,31 +143,31 @@ LL |     const CONSTANT<T: [const] Trait>: () = ();
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:44:16
+  --> $DIR/conditionally-const-invalid-places.rs:44:16
    |
 LL |     type Type<T: [const] Trait> = ();
    |                ^^^^^^^^^
    |
 note: inherent associated types cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:44:5
+  --> $DIR/conditionally-const-invalid-places.rs:44:5
    |
 LL |     type Type<T: [const] Trait> = ();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:46:28
+  --> $DIR/conditionally-const-invalid-places.rs:46:28
    |
 LL |     fn non_const_function<T: [const] Trait>() {}
    |                            ^^^^^^^^^
    |
 note: this function is not `const`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:46:8
+  --> $DIR/conditionally-const-invalid-places.rs:46:8
    |
 LL |     fn non_const_function<T: [const] Trait>() {}
    |        ^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:47:21
+  --> $DIR/conditionally-const-invalid-places.rs:47:21
    |
 LL |     const CONSTANT<T: [const] Trait>: () = ();
    |                     ^^^^^^^^^
@@ -175,55 +175,55 @@ LL |     const CONSTANT<T: [const] Trait>: () = ();
    = note: this item cannot have `[const]` trait bounds
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:52:13
+  --> $DIR/conditionally-const-invalid-places.rs:52:13
    |
 LL | trait Child0: [const] Trait {}
    |             ^^^^^^^^^
    |
 note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:52:1
+  --> $DIR/conditionally-const-invalid-places.rs:52:1
    |
 LL | trait Child0: [const] Trait {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:53:24
+  --> $DIR/conditionally-const-invalid-places.rs:53:24
    |
 LL | trait Child1 where Self: [const] Trait {}
    |                        ^^^^^^^^^
    |
 note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:53:1
+  --> $DIR/conditionally-const-invalid-places.rs:53:1
    |
 LL | trait Child1 where Self: [const] Trait {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:56:7
+  --> $DIR/conditionally-const-invalid-places.rs:56:7
    |
 LL | impl<T: [const] Trait> Trait for T {}
    |       ^^^^^^^^^
    |
 note: this impl is not `const`, so it cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:56:1
+  --> $DIR/conditionally-const-invalid-places.rs:56:1
    |
 LL | impl<T: [const] Trait> Trait for T {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:59:7
+  --> $DIR/conditionally-const-invalid-places.rs:59:7
    |
 LL | impl<T: [const] Trait> Struct<T> {}
    |       ^^^^^^^^^
    |
 note: inherent impls cannot have `[const]` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:59:1
+  --> $DIR/conditionally-const-invalid-places.rs:59:1
    |
 LL | impl<T: [const] Trait> Struct<T> {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:21:15
+  --> $DIR/conditionally-const-invalid-places.rs:21:15
    |
 LL | const CONSTANT<T: [const] Trait>: () = ();
    |               ^^^^^^^^^^^^^^^^^^
@@ -233,7 +233,7 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:29:19
+  --> $DIR/conditionally-const-invalid-places.rs:29:19
    |
 LL |     const CONSTANT<T: [const] Trait>: ();
    |                   ^^^^^^^^^^^^^^^^^^
@@ -243,7 +243,7 @@ LL |     const CONSTANT<T: [const] Trait>: ();
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:37:19
+  --> $DIR/conditionally-const-invalid-places.rs:37:19
    |
 LL |     const CONSTANT<T: [const] Trait>: () = ();
    |                   ^^^^^^^^^^^^^^^^^^
@@ -253,7 +253,7 @@ LL |     const CONSTANT<T: [const] Trait>: () = ();
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:47:19
+  --> $DIR/conditionally-const-invalid-places.rs:47:19
    |
 LL |     const CONSTANT<T: [const] Trait>: () = ();
    |                   ^^^^^^^^^^^^^^^^^^
@@ -263,7 +263,7 @@ LL |     const CONSTANT<T: [const] Trait>: () = ();
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0392]: type parameter `T` is never used
-  --> $DIR/tilde-const-invalid-places.rs:11:19
+  --> $DIR/conditionally-const-invalid-places.rs:11:19
    |
 LL | struct UnitStruct<T: [const] Trait>;
    |                   ^ unused type parameter
@@ -271,7 +271,7 @@ LL | struct UnitStruct<T: [const] Trait>;
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
 
 error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/tilde-const-invalid-places.rs:16:33
+  --> $DIR/conditionally-const-invalid-places.rs:16:33
    |
 LL | union Union<T: [const] Trait> { field: T }
    |                                 ^^^^^^^^
@@ -283,19 +283,19 @@ LL | union Union<T: [const] Trait> { field: std::mem::ManuallyDrop<T> }
    |                                        +++++++++++++++++++++++ +
 
 error[E0275]: overflow evaluating the requirement `(): Trait`
-  --> $DIR/tilde-const-invalid-places.rs:34:35
+  --> $DIR/conditionally-const-invalid-places.rs:34:35
    |
 LL |     type Type<T: [const] Trait> = ();
    |                                   ^^
    |
 note: required by a bound in `NonConstTrait::Type`
-  --> $DIR/tilde-const-invalid-places.rs:25:34
+  --> $DIR/conditionally-const-invalid-places.rs:25:34
    |
 LL |     type Type<T: [const] Trait>: [const] Trait;
    |                                  ^^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type`
 
 error[E0658]: inherent associated types are unstable
-  --> $DIR/tilde-const-invalid-places.rs:44:5
+  --> $DIR/conditionally-const-invalid-places.rs:44:5
    |
 LL |     type Type<T: [const] Trait> = ();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs b/tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs
index b0bd8466f66..b0bd8466f66 100644
--- a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs
diff --git a/tests/ui/traits/const-traits/tilde-const-syntax.rs b/tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs
index 89950c65ef6..89950c65ef6 100644
--- a/tests/ui/traits/const-traits/tilde-const-syntax.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs
diff --git a/tests/ui/traits/const-traits/tilde-twice.rs b/tests/ui/traits/const-traits/duplicate-constness.rs
index 4b13abe3cf2..4b13abe3cf2 100644
--- a/tests/ui/traits/const-traits/tilde-twice.rs
+++ b/tests/ui/traits/const-traits/duplicate-constness.rs
diff --git a/tests/ui/traits/const-traits/tilde-twice.stderr b/tests/ui/traits/const-traits/duplicate-constness.stderr
index adfda4c3437..27f69cd2386 100644
--- a/tests/ui/traits/const-traits/tilde-twice.stderr
+++ b/tests/ui/traits/const-traits/duplicate-constness.stderr
@@ -1,5 +1,5 @@
 error: expected identifier, found `]`
-  --> $DIR/tilde-twice.rs:5:27
+  --> $DIR/duplicate-constness.rs:5:27
    |
 LL | struct S<T: [const] [const] Tr>;
    |                           ^ expected identifier
diff --git a/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs b/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs
new file mode 100644
index 00000000000..f3783c9e69b
--- /dev/null
+++ b/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs
@@ -0,0 +1,12 @@
+//! This test ensures that we can only implement `const Trait` for a type
+//! and not have the conditionally const syntax in that position.
+
+#![feature(const_trait_impl)]
+
+struct S;
+trait T {}
+
+impl [const] T for S {}
+//~^ ERROR expected identifier, found `]`
+
+fn main() {}
diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr b/tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr
index 98e34a7d9ff..fc8db61b940 100644
--- a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr
+++ b/tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr
@@ -1,5 +1,5 @@
 error: expected identifier, found `]`
-  --> $DIR/impl-tilde-const-trait.rs:6:12
+  --> $DIR/impl-conditionally-const-trait.rs:9:12
    |
 LL | impl [const] T for S {}
    |            ^ expected identifier
diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs b/tests/ui/traits/const-traits/impl-tilde-const-trait.rs
deleted file mode 100644
index cf387ac56fc..00000000000
--- a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(const_trait_impl)]
-
-struct S;
-trait T {}
-
-impl [const] T for S {}
-//~^ ERROR expected identifier, found `]`
-
-fn main() {}
diff --git a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs
index b4f3b46c00f..0106bb13875 100644
--- a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs
+++ b/tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs
@@ -1,4 +1,5 @@
 // Tests that `[const]` trait bounds can be used to specialize const trait impls.
+// cc #95186
 
 //@ check-pass