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.
This commit is contained in:
Alex Crichton
2013-08-28 23:47:26 -07:00
parent ba9fa89bfb
commit 19a6fabad8
6 changed files with 11 additions and 7 deletions

View File

@@ -479,7 +479,7 @@ pub struct Field {
#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
pub enum BlockCheckMode {
DefaultBlock,
UnsafeBlock,
UnsafeBlock(/* generated internally */ bool),
}
#[deriving(Clone, Eq, Encodable, Decodable,IterBytes)]