diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-01-16 12:20:59 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-01-16 12:20:59 -0800 |
| commit | afa392a8407bd7e514f023bca467f35e62339ea8 (patch) | |
| tree | 7355ee8a181b72728053efd6ca37a7a65f07b0e2 /src/libstd | |
| parent | 9434e7c6cb658367d91eb8aae5fac6a5c8b5f769 (diff) | |
| download | rust-afa392a8407bd7e514f023bca467f35e62339ea8.tar.gz rust-afa392a8407bd7e514f023bca467f35e62339ea8.zip | |
Forbid coercing unsafe functions to closures
Closes #9582
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/path/windows.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |
