diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-02-01 10:42:20 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-02-02 08:17:13 +0000 |
| commit | 9fe8ae792e4efd59ea37116a44391b4abdd2d7be (patch) | |
| tree | 87560481d759c311965f35b2c9e1cbd6cd70fcf1 /compiler/rustc_parse/src | |
| parent | 131f0c6df6777800aa884963bdba0739299cd31f (diff) | |
| download | rust-9fe8ae792e4efd59ea37116a44391b4abdd2d7be.tar.gz rust-9fe8ae792e4efd59ea37116a44391b4abdd2d7be.zip | |
Rename `rust_2015` => `is_rust_2015`
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/ty.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 81fd084ccb3..628e9d88cf1 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -2247,7 +2247,7 @@ impl<'a> Parser<'a> { let ext = self.parse_extern(case); if let Async::Yes { span, .. } = asyncness { - if span.rust_2015() { + if span.is_rust_2015() { self.sess.emit_err(AsyncFnIn2015 { span, help: HelpUseLatestEdition::new() }); } } diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index 306cbcff149..ba16be29f4e 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -673,7 +673,7 @@ impl<'a> Parser<'a> { /// Is a `dyn B0 + ... + Bn` type allowed here? fn is_explicit_dyn_type(&mut self) -> bool { self.check_keyword(kw::Dyn) - && (!self.token.uninterpolated_span().rust_2015() + && (!self.token.uninterpolated_span().is_rust_2015() || self.look_ahead(1, |t| { (t.can_begin_bound() || t.kind == TokenKind::BinOp(token::Star)) && !can_continue_type_after_non_fn_ident(t) |
