Skip to content

Commit e435a05

Browse files
authored
Rollup merge of #102860 - GuillaumeGomez:missing-docs-FileNameDisplayPreference, r=nagisa
Add missing documentation for FileNameDisplayPreference variants Took me a while to find the information when I needed it so hopefully it should save some time for the next ones. r? ``@thomcc``
2 parents a4e5577 + 550f579 commit e435a05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_span/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ impl From<PathBuf> for FileName {
298298

299299
#[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
300300
pub enum FileNameDisplayPreference {
301+
/// Display the path after the application of rewrite rules provided via `--remap-path-prefix`.
302+
/// This is appropriate for paths that get embedded into files produced by the compiler.
301303
Remapped,
304+
/// Display the path before the application of rewrite rules provided via `--remap-path-prefix`.
305+
/// This is appropriate for use in user-facing output (such as diagnostics).
302306
Local,
303307
}
304308

0 commit comments

Comments
 (0)