Skip to content

Commit faa23b5

Browse files
committed
syntax: Warn on deprecated ~ exprs. rust-lang#11779
1 parent a5be12c commit faa23b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libsyntax/parse/parser.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,8 @@ impl<'a> Parser<'a> {
22622262
}
22632263
_ => self.mk_unary(UnUniq, e)
22642264
};
2265+
2266+
self.span_warn(e.span, "deprecated `~` expression. Use `box` instead.");
22652267
}
22662268
token::IDENT(_, _) if self.is_keyword(keywords::Box) => {
22672269
self.bump();

0 commit comments

Comments
 (0)