This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
compiler/rustc_builtin_macros/src
src/tools/rustfmt/src/parse/macros Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ use rustc_index::bit_set::GrowableBitSet;
1010use rustc_parse:: parser:: Parser ;
1111use rustc_parse_format as parse;
1212use rustc_session:: lint;
13- use rustc_session:: parse:: ParseSess ;
1413use rustc_span:: symbol:: Ident ;
1514use rustc_span:: symbol:: { kw, sym, Symbol } ;
1615use rustc_span:: { ErrorGuaranteed , InnerSpan , Span } ;
@@ -36,19 +35,17 @@ fn parse_args<'a>(
3635 is_global_asm : bool ,
3736) -> PResult < ' a , AsmArgs > {
3837 let mut p = ecx. new_parser_from_tts ( tts) ;
39- let sess = & ecx. sess . parse_sess ;
40- parse_asm_args ( & mut p, sess, sp, is_global_asm)
38+ parse_asm_args ( & mut p, sp, is_global_asm)
4139}
4240
4341// Primarily public for rustfmt consumption.
4442// Internal consumers should continue to leverage `expand_asm`/`expand__global_asm`
4543pub fn parse_asm_args < ' a > (
4644 p : & mut Parser < ' a > ,
47- sess : & ' a ParseSess ,
4845 sp : Span ,
4946 is_global_asm : bool ,
5047) -> PResult < ' a , AsmArgs > {
51- let dcx = & sess. dcx ;
48+ let dcx = & p . sess . dcx ;
5249
5350 if p. token == token:: Eof {
5451 return Err ( dcx. create_err ( errors:: AsmRequiresTemplate { span : sp } ) ) ;
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ use crate::rewrite::RewriteContext;
77pub ( crate ) fn parse_asm ( context : & RewriteContext < ' _ > , mac : & ast:: MacCall ) -> Option < AsmArgs > {
88 let ts = mac. args . tokens . clone ( ) ;
99 let mut parser = super :: build_parser ( context, ts) ;
10- parse_asm_args ( & mut parser, context . parse_sess . inner ( ) , mac. span ( ) , false ) . ok ( )
10+ parse_asm_args ( & mut parser, mac. span ( ) , false ) . ok ( )
1111}
You can’t perform that action at this time.
0 commit comments