]> git.lizzy.rs Git - rust.git/commitdiff
Reorder `StrLit` fields.
authorNicholas Nethercote <n.nethercote@gmail.com>
Tue, 29 Nov 2022 02:46:28 +0000 (13:46 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Fri, 2 Dec 2022 02:50:00 +0000 (13:50 +1100)
To better match `MetaItemLit`.

compiler/rustc_ast/src/ast.rs

index c1795be229098bb55d1b66b3720bf3303c70b91c..fc70b68e27fd2aa76652223ca3bbef057487dfad 100644 (file)
@@ -1746,13 +1746,14 @@ pub struct MetaItemLit {
 /// Similar to `MetaItemLit`, but restricted to string literals.
 #[derive(Clone, Copy, Encodable, Decodable, Debug)]
 pub struct StrLit {
-    /// The original literal token as written in source code.
-    pub style: StrStyle,
+    /// The original literal as written in source code.
     pub symbol: Symbol,
+    /// The original suffix as written in source code.
     pub suffix: Option<Symbol>,
-    pub span: Span,
-    /// The unescaped "semantic" representation of the literal lowered from the original token.
+    /// The semantic (unescaped) representation of the literal.
     pub symbol_unescaped: Symbol,
+    pub style: StrStyle,
+    pub span: Span,
 }
 
 impl StrLit {