diff options
| author | bors <bors@rust-lang.org> | 2018-04-12 05:38:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-12 05:38:49 +0000 |
| commit | 252a459d373f40512ed9137d59e4b6bea5d6aaee (patch) | |
| tree | 2148fc7dbd4b8564861b4c8df9e1e097b32d35dc /src/libsyntax_pos | |
| parent | 47778811d9752d9db0d1d4621bbc225317ad216b (diff) | |
| parent | 311ff5b441c25c545c3b7928bb9f947b8e47be6f (diff) | |
| download | rust-252a459d373f40512ed9137d59e4b6bea5d6aaee.tar.gz rust-252a459d373f40512ed9137d59e4b6bea5d6aaee.zip | |
Auto merge of #49371 - scottmcm:catch-wrapping, r=nikomatsakis
Add ok-wrapping to catch blocks, per RFC
Updates the `catch{}` lowering to wrap the result in `Try::from_ok`.
r? @nikomatsakis
Fixes #41414
Fixes #43818
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/hygiene.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index c180563450f..8cb5776fdeb 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -432,6 +432,7 @@ pub enum ExpnFormat { pub enum CompilerDesugaringKind { DotFill, QuestionMark, + Catch, } impl CompilerDesugaringKind { @@ -440,6 +441,7 @@ impl CompilerDesugaringKind { let s = match *self { DotFill => "...", QuestionMark => "?", + Catch => "do catch", }; Symbol::intern(s) } |
