From 19a6fabad8e43a81617182eba24fb80e33da8e52 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 28 Aug 2013 23:47:26 -0700 Subject: 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. --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse') 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(); -- cgit 1.4.1-3-g733a5