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:
@@ -951,7 +951,7 @@ pub fn print_possibly_embedded_block_(s: @ps,
|
||||
attrs: &[ast::Attribute],
|
||||
close_box: bool) {
|
||||
match blk.rules {
|
||||
ast::UnsafeBlock => word_space(s, "unsafe"),
|
||||
ast::UnsafeBlock(*) => word_space(s, "unsafe"),
|
||||
ast::DefaultBlock => ()
|
||||
}
|
||||
maybe_print_comment(s, blk.span.lo);
|
||||
|
||||
Reference in New Issue
Block a user