diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c7089a295fc..9c47589a0bd 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3228,7 +3228,7 @@ impl<'a> Parser<'a> { })); let expr_str = self.sess.source_map().span_to_snippet(expr.span) - .unwrap_or(pprust::expr_to_string(&expr)); + .unwrap_or_else(|_| pprust::expr_to_string(&expr)); err.span_suggestion_with_applicability( expr.span, &format!("try {} the cast value", op_verb), |
