diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index b16fa7111c5..b86304ba6b1 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -204,7 +204,7 @@ fn trace_macros_note(cx_expansions: &mut FxHashMap>, sp: Span, /// Expands the rules based macro defined by `lhses` and `rhses` for a given /// input `arg`. -fn expand_macro<'cx, 'tt>( +fn expand_macro<'cx>( cx: &'cx mut ExtCtxt<'_>, sp: Span, def_span: Span, @@ -212,8 +212,8 @@ fn expand_macro<'cx, 'tt>( name: Ident, transparency: Transparency, arg: TokenStream, - lhses: &'tt [Vec], - rhses: &'tt [mbe::TokenTree], + lhses: &[Vec], + rhses: &[mbe::TokenTree], ) -> Box { let sess = &cx.sess.parse_sess; // Macros defined in the current crate have a real node id, diff --git a/compiler/rustc_typeck/src/check/intrinsicck.rs b/compiler/rustc_typeck/src/check/intrinsicck.rs index 9cb57759b86..469e6118575 100644 --- a/compiler/rustc_typeck/src/check/intrinsicck.rs +++ b/compiler/rustc_typeck/src/check/intrinsicck.rs @@ -9,6 +9,7 @@ use rustc_session::lint; use rustc_span::{Span, Symbol, DUMMY_SP}; use rustc_target::abi::{Pointer, VariantIdx}; use rustc_target::asm::{InlineAsmReg, InlineAsmRegClass, InlineAsmRegOrRegClass, InlineAsmType}; +use rustc_trait_selection::infer::InferCtxtExt; use super::FnCtxt; @@ -210,7 +211,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // Check that the type implements Copy. The only case where this can // possibly fail is for SIMD types which don't #[derive(Copy)]. - if !ty.is_copy_modulo_regions(self.tcx.at(DUMMY_SP), self.param_env) { + if !self.infcx.type_is_copy_modulo_regions(self.param_env, ty, DUMMY_SP) { let msg = "arguments for inline assembly must be copyable"; let mut err = self.tcx.sess.struct_span_err(expr.span, msg); err.note(&format!("`{ty}` does not implement the Copy trait")); diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index eefb2c2358f..b8d6b340b14 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1764,7 +1764,7 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) { write!(buffer, "
  • Version {}
  • ", Escape(version)); } write!(buffer, "
  • All Items
  • "); - buffer.write_str(""); + buffer.write_str(""); } match *it.kind { diff --git a/src/librustdoc/html/static/.eslintrc.js b/src/librustdoc/html/static/.eslintrc.js index 997def1657f..f66ecbf78af 100644 --- a/src/librustdoc/html/static/.eslintrc.js +++ b/src/librustdoc/html/static/.eslintrc.js @@ -63,5 +63,12 @@ module.exports = { } ], "eqeqeq": "error", + "no-const-assign": "error", + "no-debugger": "error", + "no-dupe-args": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-ex-assign": "error", } }; diff --git a/src/test/ui/asm/issue-97490.rs b/src/test/ui/asm/issue-97490.rs new file mode 100644 index 00000000000..37862cf349c --- /dev/null +++ b/src/test/ui/asm/issue-97490.rs @@ -0,0 +1,12 @@ +// check-pass +// only-x86_64 +// needs-asm-support + +pub type Yes = extern "sysv64" fn(&'static u8) -> !; + +fn main() { + unsafe { + let yes = &6 as *const _ as *const Yes; + core::arch::asm!("call {}", in(reg) yes, options(noreturn)); + } +}