File tree 2 files changed +3
-6
lines changed
compiler/rustc_builtin_macros/src
src/tools/rustfmt/src/parse/macros
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;
10
10
use rustc_parse:: parser:: Parser ;
11
11
use rustc_parse_format as parse;
12
12
use rustc_session:: lint;
13
- use rustc_session:: parse:: ParseSess ;
14
13
use rustc_span:: symbol:: Ident ;
15
14
use rustc_span:: symbol:: { kw, sym, Symbol } ;
16
15
use rustc_span:: { ErrorGuaranteed , InnerSpan , Span } ;
@@ -36,19 +35,17 @@ fn parse_args<'a>(
36
35
is_global_asm : bool ,
37
36
) -> PResult < ' a , AsmArgs > {
38
37
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)
41
39
}
42
40
43
41
// Primarily public for rustfmt consumption.
44
42
// Internal consumers should continue to leverage `expand_asm`/`expand__global_asm`
45
43
pub fn parse_asm_args < ' a > (
46
44
p : & mut Parser < ' a > ,
47
- sess : & ' a ParseSess ,
48
45
sp : Span ,
49
46
is_global_asm : bool ,
50
47
) -> PResult < ' a , AsmArgs > {
51
- let dcx = & sess. dcx ;
48
+ let dcx = & p . sess . dcx ;
52
49
53
50
if p. token == token:: Eof {
54
51
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;
7
7
pub ( crate ) fn parse_asm ( context : & RewriteContext < ' _ > , mac : & ast:: MacCall ) -> Option < AsmArgs > {
8
8
let ts = mac. args . tokens . clone ( ) ;
9
9
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 ( )
11
11
}
You can’t perform that action at this time.
0 commit comments