Rework SESSION_GLOBALS API to prevent overwriting it
This commit is contained in:
parent
33acc960f7
commit
abf449ffa6
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ impl<'b, T: Write + 'b> Session<'b, T> {
|
|||
return Err(ErrorKind::VersionMismatch);
|
||||
}
|
||||
|
||||
rustc_span::with_session_globals(self.config.edition().into(), || {
|
||||
rustc_span::create_session_if_not_set_then(self.config.edition().into(), |_| {
|
||||
if self.config.disable_all_formatting() {
|
||||
// When the input is from stdin, echo back the input.
|
||||
if let Input::Text(ref buf) = input {
|
||||
|
|
Loading…
Reference in a new issue