You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that the interned symbols are only scoped per thread for the duration of the Globals object. It looks like rustfmt re-initializes the globals for each input it processes. If the first input triggers the CFG_IF lazy static, it will initialize the Symbol in the first Globals. Then during the next input, there is a fresh Globals, but the CFG_IF lazy static still has a value from the first one.
In rustfmt, we define
rustc_span::Symbol
like the following:Recently we found out that the value of
CFG_IF
may change to other value (cc rust-lang/rustfmt#4266 (comment)).I was assuming that the value defined inside
Symbol::intern
is immutable within the same process. Is this assumption incorrect?The text was updated successfully, but these errors were encountered: