about summary refs log tree commit diff
path: root/crates/syntax/src
diff options
context:
space:
mode:
authorhkalbasi <hamidrezakalbasi@protonmail.com>2023-03-17 14:02:55 +0330
committerhkalbasi <hamidrezakalbasi@protonmail.com>2023-03-17 14:02:55 +0330
commiteb4939e217960ee77d79ec436a39f3cead646de4 (patch)
tree72253f0fbc607185a676b03dbf72118f9a3a33f0 /crates/syntax/src
parent9564773d5e6dff6d430594028383315ca2e202ef (diff)
downloadrust-eb4939e217960ee77d79ec436a39f3cead646de4.tar.gz
rust-eb4939e217960ee77d79ec436a39f3cead646de4.zip
Support overloaded deref MIR lowering
Diffstat (limited to 'crates/syntax/src')
-rw-r--r--crates/syntax/src/ast/generated/nodes.rs2
-rw-r--r--crates/syntax/src/tests/sourcegen_ast.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs
index a2124f3ac16..0e84aca5c7d 100644
--- a/crates/syntax/src/ast/generated/nodes.rs
+++ b/crates/syntax/src/ast/generated/nodes.rs
@@ -1375,8 +1375,8 @@ pub struct LiteralPat {
     pub(crate) syntax: SyntaxNode,
 }
 impl LiteralPat {
-    pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
     pub fn minus_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![-]) }
+    pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
 }
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
diff --git a/crates/syntax/src/tests/sourcegen_ast.rs b/crates/syntax/src/tests/sourcegen_ast.rs
index e954b58251f..77a8363a185 100644
--- a/crates/syntax/src/tests/sourcegen_ast.rs
+++ b/crates/syntax/src/tests/sourcegen_ast.rs
@@ -535,6 +535,7 @@ impl Field {
                     "!" => "excl",
                     "*" => "star",
                     "&" => "amp",
+                    "-" => "minus",
                     "_" => "underscore",
                     "." => "dot",
                     ".." => "dotdot",