about summary refs log tree commit diff
path: root/src/libstd/path/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/path/mod.rs')
-rw-r--r--src/libstd/path/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs
index 38d04324fe4..50441cb534d 100644
--- a/src/libstd/path/mod.rs
+++ b/src/libstd/path/mod.rs
@@ -846,7 +846,10 @@ impl<'a, P: GenericPath> Display<'a, P> {
     pub fn as_maybe_owned(&self) -> MaybeOwned<'a> {
         String::from_utf8_lossy(if self.filename {
             match self.path.filename() {
-                None => &[],
+                None => {
+                    let result: &[u8] = &[];
+                    result
+                }
                 Some(v) => v
             }
         } else {