Skip to content

Commit

Permalink
inline parse session getter functions for proc-macro-server performance
Browse files Browse the repository at this point in the history
  • Loading branch information
mystor committed Nov 17, 2021
1 parent 1b12d01 commit e168f91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_expand/src/base.rs
Expand Up @@ -1011,6 +1011,7 @@ impl<'a> ExtCtxt<'a> {
pub fn source_map(&self) -> &'a SourceMap {
self.sess.parse_sess.source_map()
}
#[inline]
pub fn parse_sess(&self) -> &'a ParseSess {
&self.sess.parse_sess
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_expand/src/proc_macro_server.rs
Expand Up @@ -377,6 +377,7 @@ impl<'a, 'b> Rustc<'a, 'b> {
}
}

#[inline]
fn sess(&self) -> &ParseSess {
self.ecx.parse_sess()
}
Expand Down

0 comments on commit e168f91

Please sign in to comment.