about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/ast.rs
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-03-11 12:08:45 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-06-26 13:46:45 +0000
commiteb7245a864613f290c5668f4f4e8376edd065dc6 (patch)
treec31fc679f821ab1d469de7324a71d91f72787cbb /compiler/rustc_ast/src/ast.rs
parent18f4cb11108bbb3119d4ba2a7eb06c80adf6a438 (diff)
downloadrust-eb7245a864613f290c5668f4f4e8376edd065dc6.tar.gz
rust-eb7245a864613f290c5668f4f4e8376edd065dc6.zip
Change const trait bound syntax from ~const to [const]
Diffstat (limited to 'compiler/rustc_ast/src/ast.rs')
-rw-r--r--compiler/rustc_ast/src/ast.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 11afd359e5a..87fe54dc31d 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -323,7 +323,7 @@ impl ParenthesizedArgs {
 
 pub use crate::node_id::{CRATE_NODE_ID, DUMMY_NODE_ID, NodeId};
 
-/// Modifiers on a trait bound like `~const`, `?` and `!`.
+/// Modifiers on a trait bound like `[const]`, `?` and `!`.
 #[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug)]
 pub struct TraitBoundModifiers {
     pub constness: BoundConstness,
@@ -3111,7 +3111,7 @@ pub enum BoundConstness {
     Never,
     /// `Type: const Trait`
     Always(Span),
-    /// `Type: ~const Trait`
+    /// `Type: [const] Trait`
     Maybe(Span),
 }
 
@@ -3120,7 +3120,7 @@ impl BoundConstness {
         match self {
             Self::Never => "",
             Self::Always(_) => "const",
-            Self::Maybe(_) => "~const",
+            Self::Maybe(_) => "[const]",
         }
     }
 }