about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-08-28 23:47:26 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-11 00:13:22 -0700
commit19a6fabad8e43a81617182eba24fb80e33da8e52 (patch)
tree25ff3085a8f251bc1298aecca1d3bb9c247d8237 /src/libsyntax/parse/parser.rs
parentba9fa89bfb4aae53db93e9ecac31807af96356fc (diff)
downloadrust-19a6fabad8e43a81617182eba24fb80e33da8e52.tar.gz
rust-19a6fabad8e43a81617182eba24fb80e33da8e52.zip
Implement the notion of a "generated unsafe block"
This way syntax extensions can generate unsafe blocks without worrying about
them generating unnecessary unsafe warnings. Perhaps a special keyword could be
added to be used in macros, but I don't think that's the best solution.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 4adc34d75a7..b0bcc91f962 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1792,7 +1792,7 @@ impl Parser {
         } else if self.eat_keyword(keywords::Match) {
             return self.parse_match_expr();
         } else if self.eat_keyword(keywords::Unsafe) {
-            return self.parse_block_expr(lo, UnsafeBlock);
+            return self.parse_block_expr(lo, UnsafeBlock(false));
         } else if *self.token == token::LBRACKET {
             self.bump();
             let mutbl = self.parse_mutability();