Properly gate safe
keyword in pre-expansion
This commit is contained in:
parent
1aaab8b9f8
commit
108b3f214a
4 changed files with 27 additions and 1 deletions
|
@ -562,6 +562,10 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
|
|||
gate_all!(precise_capturing, "precise captures on `impl Trait` are experimental");
|
||||
gate_all!(global_registration, "global registration is experimental");
|
||||
gate_all!(unsafe_attributes, "`#[unsafe()]` markers for attributes are experimental");
|
||||
gate_all!(
|
||||
unsafe_extern_blocks,
|
||||
"`unsafe extern {}` blocks and `safe` keyword are experimental"
|
||||
);
|
||||
|
||||
if !visitor.features.never_patterns {
|
||||
if let Some(spans) = spans.get(&sym::never_patterns) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue