From d48d5b8b6ca59b462b3a84dad9868daff2eddb6d Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Thu, 17 Jan 2019 13:08:18 +0100 Subject: Add initial (flawed) implementation of binding annotations --- crates/ra_syntax/src/ast/generated.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 251d53bdf..ead0f1293 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -180,7 +180,11 @@ impl AstNode for BindPat { impl ast::NameOwner for BindPat {} -impl BindPat {} +impl BindPat { + pub fn pat(&self) -> Option<&Pat> { + super::child_opt(self) + } +} // Block #[derive(Debug, PartialEq, Eq, Hash)] -- cgit v1.2.3