about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-10-10 10:23:05 +0900
committerGitHub <noreply@github.com>2022-10-10 10:23:05 +0900
commite435a051dd9c0f3d0334fb261c48af9fae0021f2 (patch)
treef6f2c99297bcb0eab32053f22e42df5909929a4e
parenta4e55772625722721d50414f1dcc3388463dbcb6 (diff)
parent550f579816834642522310b2e4e54027b1d72972 (diff)
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``
-rw-r--r--compiler/rustc_span/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index f8df4169715..91eef647713 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -298,7 +298,11 @@ impl From<PathBuf> for FileName {
 
 #[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
 pub enum FileNameDisplayPreference {
+    /// Display the path after the application of rewrite rules provided via `--remap-path-prefix`.
+    /// This is appropriate for paths that get embedded into files produced by the compiler.
     Remapped,
+    /// Display the path before the application of rewrite rules provided via `--remap-path-prefix`.
+    /// This is appropriate for use in user-facing output (such as diagnostics).
     Local,
 }