diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-30 20:51:47 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-30 20:51:47 +0000 |
commit | 28fdb8d03caf1ab8b40ed0fcbe8e47451fe030d9 (patch) | |
tree | a795362bb8cd25edb87e8da3f9786d68e029c22b /crates/ra_syntax/src/ast | |
parent | db17e06c2eec892ab807fd191bc11b15d8da42e2 (diff) | |
parent | 13cb4a1b370038dee51ae739a42d6b98acaef385 (diff) |
Merge #701
701: Minor type inference tweaks r=flodiebold a=marcusklaas
Pass down expectation for reference expressions and type the guard in match expressions.
I wasn't able to add a test for the former addition because the type variable previously introduced would always resolve to the right type in the things I tried!
Co-authored-by: Marcus Klaas de Vries <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 3ace6533c..4f5a96014 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -1981,7 +1981,11 @@ impl ToOwned for MatchGuard { | |||
1981 | } | 1981 | } |
1982 | 1982 | ||
1983 | 1983 | ||
1984 | impl MatchGuard {} | 1984 | impl MatchGuard { |
1985 | pub fn expr(&self) -> Option<&Expr> { | ||
1986 | super::child_opt(self) | ||
1987 | } | ||
1988 | } | ||
1985 | 1989 | ||
1986 | // MethodCallExpr | 1990 | // MethodCallExpr |
1987 | #[derive(Debug, PartialEq, Eq, Hash)] | 1991 | #[derive(Debug, PartialEq, Eq, Hash)] |