Skip to content

Commit 6999ef2

Browse files
committed
Auto merge of #97538 - compiler-errors:rollup-zp3ukke, r=compiler-errors
Rollup of 4 pull requests Successful merges: - #97493 (Use `type_is_copy_modulo_regions` check in intrisicck) - #97518 (Fix order of closing HTML elements in rustdoc output) - #97530 (Add more eslint checks) - #97536 (Remove unused lifetimes from expand_macro) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 28b8919 + f20bbc1 commit 6999ef2

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

compiler/rustc_expand/src/mbe/macro_rules.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,16 @@ fn trace_macros_note(cx_expansions: &mut FxHashMap<Span, Vec<String>>, sp: Span,
204204

205205
/// Expands the rules based macro defined by `lhses` and `rhses` for a given
206206
/// input `arg`.
207-
fn expand_macro<'cx, 'tt>(
207+
fn expand_macro<'cx>(
208208
cx: &'cx mut ExtCtxt<'_>,
209209
sp: Span,
210210
def_span: Span,
211211
node_id: NodeId,
212212
name: Ident,
213213
transparency: Transparency,
214214
arg: TokenStream,
215-
lhses: &'tt [Vec<MatcherLoc>],
216-
rhses: &'tt [mbe::TokenTree],
215+
lhses: &[Vec<MatcherLoc>],
216+
rhses: &[mbe::TokenTree],
217217
) -> Box<dyn MacResult + 'cx> {
218218
let sess = &cx.sess.parse_sess;
219219
// Macros defined in the current crate have a real node id,

compiler/rustc_typeck/src/check/intrinsicck.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use rustc_session::lint;
99
use rustc_span::{Span, Symbol, DUMMY_SP};
1010
use rustc_target::abi::{Pointer, VariantIdx};
1111
use rustc_target::asm::{InlineAsmReg, InlineAsmRegClass, InlineAsmRegOrRegClass, InlineAsmType};
12+
use rustc_trait_selection::infer::InferCtxtExt;
1213

1314
use super::FnCtxt;
1415

@@ -210,7 +211,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
210211

211212
// Check that the type implements Copy. The only case where this can
212213
// possibly fail is for SIMD types which don't #[derive(Copy)].
213-
if !ty.is_copy_modulo_regions(self.tcx.at(DUMMY_SP), self.param_env) {
214+
if !self.infcx.type_is_copy_modulo_regions(self.param_env, ty, DUMMY_SP) {
214215
let msg = "arguments for inline assembly must be copyable";
215216
let mut err = self.tcx.sess.struct_span_err(expr.span, msg);
216217
err.note(&format!("`{ty}` does not implement the Copy trait"));

src/librustdoc/html/render/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) {
17641764
write!(buffer, "<li class=\"version\">Version {}</li>", Escape(version));
17651765
}
17661766
write!(buffer, "<li><a id=\"all-types\" href=\"all.html\">All Items</a></li>");
1767-
buffer.write_str("</div></ul>");
1767+
buffer.write_str("</ul></div>");
17681768
}
17691769

17701770
match *it.kind {

src/librustdoc/html/static/.eslintrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,12 @@ module.exports = {
6363
}
6464
],
6565
"eqeqeq": "error",
66+
"no-const-assign": "error",
67+
"no-debugger": "error",
68+
"no-dupe-args": "error",
69+
"no-dupe-else-if": "error",
70+
"no-dupe-keys": "error",
71+
"no-duplicate-case": "error",
72+
"no-ex-assign": "error",
6673
}
6774
};

src/test/ui/asm/issue-97490.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// check-pass
2+
// only-x86_64
3+
// needs-asm-support
4+
5+
pub type Yes = extern "sysv64" fn(&'static u8) -> !;
6+
7+
fn main() {
8+
unsafe {
9+
let yes = &6 as *const _ as *const Yes;
10+
core::arch::asm!("call {}", in(reg) yes, options(noreturn));
11+
}
12+
}

0 commit comments

Comments
 (0)