@@ -123,7 +123,7 @@ fn try_resolve_module_resolution_settings(
123123
124124 let SearchPathSettings {
125125 extra_paths,
126- workspace_root ,
126+ src_root ,
127127 custom_typeshed,
128128 site_packages,
129129 } = program. search_paths ( db. upcast ( ) ) ;
@@ -146,7 +146,7 @@ fn try_resolve_module_resolution_settings(
146146 static_search_paths. push ( SearchPath :: extra ( system, path. clone ( ) ) ?) ;
147147 }
148148
149- static_search_paths. push ( SearchPath :: first_party ( system, workspace_root . clone ( ) ) ?) ;
149+ static_search_paths. push ( SearchPath :: first_party ( system, src_root . clone ( ) ) ?) ;
150150
151151 static_search_paths. push ( if let Some ( custom_typeshed) = custom_typeshed. as_ref ( ) {
152152 files. try_add_root (
@@ -459,7 +459,7 @@ fn resolve_name(db: &dyn Db, name: &ModuleName) -> Option<(SearchPath, File, Mod
459459 for search_path in resolver_settings. search_paths ( db) {
460460 // When a builtin module is imported, standard module resolution is bypassed:
461461 // the module name always resolves to the stdlib module,
462- // even if there's a module of the same name in the workspace root
462+ // even if there's a module of the same name in the first-party root
463463 // (which would normally result in the stdlib module being overridden).
464464 if is_builtin_module && !search_path. is_standard_library ( ) {
465465 continue ;
@@ -1160,7 +1160,7 @@ mod tests {
11601160
11611161 let search_paths = SearchPathSettings {
11621162 extra_paths : vec ! [ ] ,
1163- workspace_root : src. clone ( ) ,
1163+ src_root : src. clone ( ) ,
11641164 custom_typeshed : Some ( custom_typeshed. clone ( ) ) ,
11651165 site_packages : vec ! [ site_packages] ,
11661166 } ;
@@ -1664,7 +1664,7 @@ not_a_directory
16641664 TargetVersion :: default ( ) ,
16651665 SearchPathSettings {
16661666 extra_paths : vec ! [ ] ,
1667- workspace_root : SystemPathBuf :: from ( "/src" ) ,
1667+ src_root : SystemPathBuf :: from ( "/src" ) ,
16681668 custom_typeshed : None ,
16691669 site_packages : vec ! [ venv_site_packages, system_site_packages] ,
16701670 } ,
0 commit comments