diff options
author | Florian Diebold <[email protected]> | 2018-12-23 16:13:11 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2018-12-23 16:13:11 +0000 |
commit | ef67581104eb00a0c199f0b2a3b558da8a6f90a2 (patch) | |
tree | b6cf180b26152fa06ec4b2d02e22221fb7ba7fad /crates/ra_syntax | |
parent | 93ffbf80c632a7d38fc8bbdf6357bfd26a96a35a (diff) |
Resolve paths to defs (functions currently) during type inference
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 6 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index b15c4ef6f..c73533861 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -3083,7 +3083,11 @@ impl<R: TreeRoot<RaTypes>> RetTypeNode<R> { | |||
3083 | } | 3083 | } |
3084 | 3084 | ||
3085 | 3085 | ||
3086 | impl<'a> RetType<'a> {} | 3086 | impl<'a> RetType<'a> { |
3087 | pub fn type_ref(self) -> Option<TypeRef<'a>> { | ||
3088 | super::child_opt(self) | ||
3089 | } | ||
3090 | } | ||
3087 | 3091 | ||
3088 | // ReturnExpr | 3092 | // ReturnExpr |
3089 | #[derive(Debug, Clone, Copy,)] | 3093 | #[derive(Debug, Clone, Copy,)] |
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 8dca493ee..e3b9032a0 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -254,7 +254,7 @@ Grammar( | |||
254 | ], | 254 | ], |
255 | options: [ "ParamList", ["body", "Block"], "RetType" ], | 255 | options: [ "ParamList", ["body", "Block"], "RetType" ], |
256 | ), | 256 | ), |
257 | "RetType": (), | 257 | "RetType": (options: ["TypeRef"]), |
258 | "StructDef": ( | 258 | "StructDef": ( |
259 | traits: [ | 259 | traits: [ |
260 | "NameOwner", | 260 | "NameOwner", |