diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-08-28 23:47:26 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-09-11 00:13:22 -0700 |
| commit | 19a6fabad8e43a81617182eba24fb80e33da8e52 (patch) | |
| tree | 25ff3085a8f251bc1298aecca1d3bb9c247d8237 /src/libsyntax/parse | |
| parent | ba9fa89bfb4aae53db93e9ecac31807af96356fc (diff) | |
| download | rust-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')
| -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 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(); |
