diff options
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/asm.rs | 13 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 4 |
3 files changed, 8 insertions, 13 deletions
diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index a5986f2bba5..3742cf9d881 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -48,7 +48,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { ); if !is_stable && !self.tcx.features().asm_experimental_arch { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::asm_experimental_arch, sp, "inline assembly is not stable yet on this architecture", @@ -63,13 +63,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { self.dcx().emit_err(AttSyntaxOnlyX86 { span: sp }); } if asm.options.contains(InlineAsmOptions::MAY_UNWIND) && !self.tcx.features().asm_unwind { - feature_err( - &self.tcx.sess.parse_sess, - sym::asm_unwind, - sp, - "the `may_unwind` option is unstable", - ) - .emit(); + feature_err(&self.tcx.sess, sym::asm_unwind, sp, "the `may_unwind` option is unstable") + .emit(); } let mut clobber_abis = FxIndexMap::default(); @@ -183,7 +178,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { InlineAsmOperand::Const { anon_const } => { if !self.tcx.features().asm_const { feature_err( - &sess.parse_sess, + sess, sym::asm_const, *op_sp, "const operands for inline assembly are unstable", diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 69704de105c..e0b1a10c82e 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -1512,7 +1512,7 @@ impl<'hir> LoweringContext<'_, 'hir> { Some(hir::CoroutineKind::Coroutine(_)) => { if !self.tcx.features().coroutines { rustc_session::parse::feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::coroutines, span, "yield syntax is experimental", @@ -1524,7 +1524,7 @@ impl<'hir> LoweringContext<'_, 'hir> { None => { if !self.tcx.features().coroutines { rustc_session::parse::feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::coroutines, span, "yield syntax is experimental", diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index d2d42a15808..5387880b6e6 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -1043,7 +1043,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { { add_feature_diagnostics( &mut err, - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::return_type_notation, ); } @@ -2310,7 +2310,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { hir::ArrayLen::Infer(self.lower_node_id(c.id), self.lower_span(c.value.span)) } else { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::generic_arg_infer, c.value.span, "using `_` for array lengths is unstable", |
