Skip to content

Rollup of 10 pull requests #121995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d0873c7
constify a couple thread_local statics
matthiaskrgr Feb 12, 2024
e478111
Improve assert_matches! documentation
Voultapher Feb 28, 2024
d2495fa
Drop link to matches macro and link matches macro to assert_matches.
Voultapher Feb 29, 2024
d6438f5
Apply review comments
Voultapher Mar 2, 2024
fb2b918
Small enhancement to description of From trait
jonaspleyer Mar 3, 2024
c45f0a9
Apply suggestions from code review
Voultapher Mar 3, 2024
aa38c26
Tweak `parse_asm_args`.
nnethercote Dec 20, 2023
3996447
Remove `file_path_mapping` param from `ParseSess::new`.
nnethercote Mar 4, 2024
0d4ebe1
Move `sess` function and use it more.
nnethercote Mar 4, 2024
4260f7e
Rename a misnamed `Session` parameter.
nnethercote Mar 4, 2024
4146136
Extract an arguments struct for `Builder::then_else_break`
Zalathar Feb 27, 2024
9eb927e
Don't run test_get_os_named_thread on win7
roblabla Mar 4, 2024
287fcde
Rename all `ParseSess` variables/fields/lifetimes as `psess`.
nnethercote Mar 4, 2024
e463060
include feedback from workingjubilee
jonaspleyer Mar 4, 2024
ede25ad
Fix LVI tests after making frame pointers easily enableable
raoulstrackx Feb 27, 2024
05e68fa
Fix comment in Atomic{Ptr,Bool}::as_ptr.
Lee-Janggun Mar 4, 2024
1eedca8
Allow a way to add constructors for rustc_type_ir types
compiler-errors Feb 27, 2024
748da32
Update platform-support.md with supported musl version
wesleywiser Mar 4, 2024
c981d0c
Rollup merge of #120976 - matthiaskrgr:constify_TL_statics, r=lcnr
matthiaskrgr Mar 4, 2024
3f7eced
Rollup merge of #121683 - fortanix:raoul/lvi_fixes, r=cuviper
matthiaskrgr Mar 4, 2024
edb71a6
Rollup merge of #121703 - compiler-errors:new, r=lcnr
matthiaskrgr Mar 4, 2024
448ea9b
Rollup merge of #121732 - Voultapher:improve-assert_matches-documenta…
matthiaskrgr Mar 4, 2024
1a53b42
Rollup merge of #121928 - Zalathar:then-else-args, r=Nadrieril
matthiaskrgr Mar 4, 2024
a6bf9f6
Rollup merge of #121939 - jonaspleyer:patch-typo-core-From-descr, r=w…
matthiaskrgr Mar 4, 2024
a6f5eed
Rollup merge of #121968 - roblabla:fix-win7, r=jhpratt
matthiaskrgr Mar 4, 2024
99c4935
Rollup merge of #121969 - nnethercote:ParseSess-cleanups, r=wesleywiser
matthiaskrgr Mar 4, 2024
b742c8d
Rollup merge of #121977 - Lee-Janggun:master, r=WaffleLapkin
matthiaskrgr Mar 4, 2024
679600d
Rollup merge of #121994 - wesleywiser:update_musl_version_docs, r=ehuss
matthiaskrgr Mar 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweak parse_asm_args.
It doesn't need a `Parser` and a `ParseSess`, because the former
contains the latter.
  • Loading branch information
nnethercote committed Mar 4, 2024
commit aa38c26bbf84aa36e280cc120736c47a36cb467d
7 changes: 2 additions & 5 deletions compiler/rustc_builtin_macros/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use rustc_index::bit_set::GrowableBitSet;
use rustc_parse::parser::Parser;
use rustc_parse_format as parse;
use rustc_session::lint;
use rustc_session::parse::ParseSess;
use rustc_span::symbol::Ident;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::{ErrorGuaranteed, InnerSpan, Span};
Expand All @@ -36,19 +35,17 @@ fn parse_args<'a>(
is_global_asm: bool,
) -> PResult<'a, AsmArgs> {
let mut p = ecx.new_parser_from_tts(tts);
let sess = &ecx.sess.parse_sess;
parse_asm_args(&mut p, sess, sp, is_global_asm)
parse_asm_args(&mut p, sp, is_global_asm)
}

// Primarily public for rustfmt consumption.
// Internal consumers should continue to leverage `expand_asm`/`expand__global_asm`
pub fn parse_asm_args<'a>(
p: &mut Parser<'a>,
sess: &'a ParseSess,
sp: Span,
is_global_asm: bool,
) -> PResult<'a, AsmArgs> {
let dcx = &sess.dcx;
let dcx = &p.sess.dcx;

if p.token == token::Eof {
return Err(dcx.create_err(errors::AsmRequiresTemplate { span: sp }));
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rustfmt/src/parse/macros/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ use crate::rewrite::RewriteContext;
pub(crate) fn parse_asm(context: &RewriteContext<'_>, mac: &ast::MacCall) -> Option<AsmArgs> {
let ts = mac.args.tokens.clone();
let mut parser = super::build_parser(context, ts);
parse_asm_args(&mut parser, context.parse_sess.inner(), mac.span(), false).ok()
parse_asm_args(&mut parser, mac.span(), false).ok()
}