Reject leading unsafe in cfg!(...)
and --check-cfg
.
This commit is contained in:
parent
2da3cb9cab
commit
9cb540a13c
6 changed files with 33 additions and 5 deletions
|
@ -43,7 +43,7 @@ fn parse_cfg<'a>(cx: &ExtCtxt<'a>, span: Span, tts: TokenStream) -> PResult<'a,
|
|||
return Err(cx.dcx().create_err(errors::RequiresCfgPattern { span }));
|
||||
}
|
||||
|
||||
let cfg = p.parse_meta_item(AllowLeadingUnsafe::Yes)?;
|
||||
let cfg = p.parse_meta_item(AllowLeadingUnsafe::No)?;
|
||||
|
||||
let _ = p.eat(&token::Comma);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue