From afa392a8407bd7e514f023bca467f35e62339ea8 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 16 Jan 2014 12:20:59 -0800 Subject: Forbid coercing unsafe functions to closures Closes #9582 --- src/libstd/path/windows.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index f8d80599151..29e2e41d718 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -392,13 +392,13 @@ impl GenericPath for Path { #[inline] fn filestem_str<'a>(&'a self) -> Option<&'a str> { // filestem() returns a byte vector that's guaranteed valid UTF-8 - self.filestem().map(cast::transmute) + self.filestem().map(|t| unsafe { cast::transmute(t) }) } #[inline] fn extension_str<'a>(&'a self) -> Option<&'a str> { // extension() returns a byte vector that's guaranteed valid UTF-8 - self.extension().map(cast::transmute) + self.extension().map(|t| unsafe { cast::transmute(t) }) } fn dir_path(&self) -> Path { -- cgit 1.4.1-3-g733a5