summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_parse/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_parse/src/lib.rs')
-rw-r--r--compiler/rustc_parse/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs
index 25de78085..892be36aa 100644
--- a/compiler/rustc_parse/src/lib.rs
+++ b/compiler/rustc_parse/src/lib.rs
@@ -8,6 +8,7 @@
#![feature(never_type)]
#![feature(rustc_attrs)]
#![recursion_limit = "256"]
+#![cfg_attr(not(bootstrap), allow(internal_features))]
#[macro_use]
extern crate tracing;
@@ -205,7 +206,7 @@ pub fn stream_to_parser<'a>(
stream: TokenStream,
subparser_name: Option<&'static str>,
) -> Parser<'a> {
- Parser::new(sess, stream, false, subparser_name)
+ Parser::new(sess, stream, subparser_name)
}
/// Runs the given subparser `f` on the tokens of the given `attr`'s item.
@@ -215,7 +216,7 @@ pub fn parse_in<'a, T>(
name: &'static str,
mut f: impl FnMut(&mut Parser<'a>) -> PResult<'a, T>,
) -> PResult<'a, T> {
- let mut parser = Parser::new(sess, tts, false, Some(name));
+ let mut parser = Parser::new(sess, tts, Some(name));
let result = f(&mut parser)?;
if parser.token != token::Eof {
parser.unexpected()?;
@@ -247,7 +248,7 @@ pub fn parse_cfg_attr(
match parse_in(parse_sess, tokens.clone(), "`cfg_attr` input", |p| p.parse_cfg_attr()) {
Ok(r) => return Some(r),
Err(mut e) => {
- e.help(format!("the valid syntax is `{}`", CFG_ATTR_GRAMMAR_HELP))
+ e.help(format!("the valid syntax is `{CFG_ATTR_GRAMMAR_HELP}`"))
.note(CFG_ATTR_NOTE_REF)
.emit();
}