diff options
| author | Josh Matthews <josh@joshmatthews.net> | 2011-06-08 03:58:52 -0400 |
|---|---|---|
| committer | Josh Matthews <josh@joshmatthews.net> | 2011-06-08 04:02:55 -0400 |
| commit | 2235fb73ef990d3c19b2888feed69ddb462ab686 (patch) | |
| tree | 93a49f2adb8b5c53a08cc4c2c7ad33baecc1e4e9 /src/comp/pretty | |
| parent | b5c73605ead0dc27eb09e5f5860326b2cf2c5cd1 (diff) | |
| download | rust-2235fb73ef990d3c19b2888feed69ddb462ab686.tar.gz rust-2235fb73ef990d3c19b2888feed69ddb462ab686.zip | |
Add optional message to fail.
Diffstat (limited to 'src/comp/pretty')
| -rw-r--r-- | src/comp/pretty/pprust.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index 2c7e65dcb22..db6d62bdbc8 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -825,8 +825,13 @@ fn print_expr(&ps s, &@ast::expr expr) { case (ast::expr_path(?path,_)) { print_path(s, path); } - case (ast::expr_fail(_)) { + case (ast::expr_fail(_, ?str)) { word(s.s, "fail"); + alt (str) { + case (some(?msg)) { + word(s.s, #fmt("\"%s\"", msg)); + } + } } case (ast::expr_break(_)) { word(s.s, "break"); |
