Replace two create_default_session_if_not_set_then
uses.
With `create_default_session_globals_then`, which is preferable when it is appropriate.
This commit is contained in:
parent
edb357f912
commit
9893b75e0d
2 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@ use crate::definitions::{DefKey, DefPathData, DisambiguatedDefPathData};
|
|||
use rustc_data_structures::stable_hasher::Hash64;
|
||||
use rustc_span::def_id::{DefPathHash, StableCrateId};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::{create_session_if_not_set_then, Symbol};
|
||||
use rustc_span::{create_session_globals_then, Symbol};
|
||||
|
||||
#[test]
|
||||
fn def_path_hash_depends_on_crate_id() {
|
||||
|
@ -14,7 +14,7 @@ fn def_path_hash_depends_on_crate_id() {
|
|||
// the crate by changing the crate disambiguator (e.g. via bumping the
|
||||
// crate's version number).
|
||||
|
||||
create_session_if_not_set_then(Edition::Edition2024, |_| {
|
||||
create_session_globals_then(Edition::Edition2024, || {
|
||||
let id0 = StableCrateId::new(Symbol::intern("foo"), false, vec!["1".to_string()], "");
|
||||
let id1 = StableCrateId::new(Symbol::intern("foo"), false, vec!["2".to_string()], "");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue