about summary refs log tree commit diff
path: root/src/libstd/path/windows.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/path/windows.rs')
-rw-r--r--src/libstd/path/windows.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs
index 9e4a66e0e5e..4b8fb7fad6a 100644
--- a/src/libstd/path/windows.rs
+++ b/src/libstd/path/windows.rs
@@ -655,7 +655,8 @@ impl Path {
             None if repr.as_bytes()[0] == SEP_BYTE => repr.slice_from(1),
             None => repr
         };
-        let ret = s.split_terminator(SEP).map(Some);
+        let some: fn(&'a str) -> Option<&'a str> = Some; // coerce to fn ptr
+        let ret = s.split_terminator(SEP).map(some);
         ret
     }
 
@@ -666,6 +667,7 @@ impl Path {
             #![inline]
             x.unwrap().as_bytes()
         }
+        let convert: for<'b> fn(Option<&'b str>) -> &'b [u8] = convert; // coerce to fn ptr
         self.str_components().map(convert)
     }