Created
June 13, 2013 14:27
-
-
Save pnkfelix/5774094 to your computer and use it in GitHub Desktop.
why is lint saying this `unsafe` is unnecessary? There is a deref of a *ptr ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/pipes.rs:106:21: 106:69 warning: unnecessary `unsafe` block [-W unused-unsafe (default)] | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/pipes.rs:106 { $x:expr } => ( unsafe { let y = *ptr::to_unsafe_ptr(&($x)); y } ) | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/pipes.rs:105:0: 107:1 note: in expansion of move_it! | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/pipes.rs:321:24: 321:46 note: expansion site | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/os.rs:962:12: 968:13 warning: unnecessary `unsafe` block [-W unused-unsafe (default)] | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/os.rs:962 unsafe { | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/os.rs:963 if do str::as_c_str(to.to_str()) |to_buf| { | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/os.rs:964 libc::chmod(to_buf, from_mode as mode_t) | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/os.rs:965 } != 0 { | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/os.rs:966 return false; // should be a condition... | |
| /Users/fklock/Dev/Mozilla/rust.git/src/libstd/os.rs:967 } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment