Stabilize unsafe_attributes
This commit is contained in:
parent
2f3dc46465
commit
de9b5c3ea2
37 changed files with 64 additions and 134 deletions
|
@ -4,7 +4,7 @@ use rustc_ast::token::{self, Delimiter};
|
|||
use rustc_errors::codes::*;
|
||||
use rustc_errors::{Diag, PResult};
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::{sym, BytePos, Span};
|
||||
use rustc_span::{BytePos, Span};
|
||||
use thin_vec::ThinVec;
|
||||
use tracing::debug;
|
||||
|
||||
|
@ -261,7 +261,6 @@ impl<'a> Parser<'a> {
|
|||
let is_unsafe = this.eat_keyword(kw::Unsafe);
|
||||
let unsafety = if is_unsafe {
|
||||
let unsafe_span = this.prev_token.span;
|
||||
this.psess.gated_spans.gate(sym::unsafe_attributes, unsafe_span);
|
||||
this.expect(&token::OpenDelim(Delimiter::Parenthesis))?;
|
||||
ast::Safety::Unsafe(unsafe_span)
|
||||
} else {
|
||||
|
@ -400,7 +399,6 @@ impl<'a> Parser<'a> {
|
|||
};
|
||||
let unsafety = if is_unsafe {
|
||||
let unsafe_span = self.prev_token.span;
|
||||
self.psess.gated_spans.gate(sym::unsafe_attributes, unsafe_span);
|
||||
self.expect(&token::OpenDelim(Delimiter::Parenthesis))?;
|
||||
|
||||
ast::Safety::Unsafe(unsafe_span)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue