Apply path remapping to imported source files and update tests#151741
Apply path remapping to imported source files and update tests#151741paradoxicalguy wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@wesleywiser Currently the sysroot paths are now correctly remapped and i wanted to ask, should i update the failing test expectations as per the errors of this new behavior or would you suggest a different approach? eg scoping the fix to only sysroot files by checking for |
|
☔ The latest upstream changes (presumably #151778) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes issue #74786
this fix ensures that
new_imported_source_filerespects the--remap-path-prefixconfiguration.fix:
Changed
compiler/rustc_span/src/source_map.rsfile to interpret the filename beforeSourceFileis created.Now it:
RemapPathScopeComponents::DIAGNOSTICS.to_real_filename, ensuring consistent behavior.tests i ran:
./x.py test tests/ui --test-args remapwith--blessafter building compiler with std lib in WSL ubuntu.tests/ui/errors/*.stderrto reflect the correct remapped paths.tests/ui/errors/remap-path-prefix-reverse.rsto remove an error pattern check that relied on the bug.