Skip to content

Commit e168f91

Browse files
committed
inline parse session getter functions for proc-macro-server performance
1 parent 1b12d01 commit e168f91

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler/rustc_expand/src/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ impl<'a> ExtCtxt<'a> {
10111011
pub fn source_map(&self) -> &'a SourceMap {
10121012
self.sess.parse_sess.source_map()
10131013
}
1014+
#[inline]
10141015
pub fn parse_sess(&self) -> &'a ParseSess {
10151016
&self.sess.parse_sess
10161017
}

compiler/rustc_expand/src/proc_macro_server.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ impl<'a, 'b> Rustc<'a, 'b> {
377377
}
378378
}
379379

380+
#[inline]
380381
fn sess(&self) -> &ParseSess {
381382
self.ecx.parse_sess()
382383
}

0 commit comments

Comments
 (0)