forked from dbp/sublime-rust
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 105
Closed as not planned
Description
Sublime Text Version
Build 4155
Rust Enhanced Version
2.25.0
Operating system
Arch Linux
Steps to reproduce
- Add this code:
#[cfg(unix)]
use std::os::unix::fs;
fn main() {
    let _ = stdout();
    #[cfg(unix)]
    {
        // Using unix specific stuff here.
        let _function = fs::chroot::<&str>;
    }
}- Save the file.
- Click on the suggestion to import the function.
- Arrive at this code:
#[cfg(unix)]
use std::io::stdout;
use std::os::unix::fs;
fn main() {
...- Code should now be incompatible with non-unix platforms, because cfg(unix)is not on top of thestd::os::uniximport.
Should this be thrown to upstream as a compiler diagnostic issue? Or does it belong here, considering that rust-enhanced assumes rustc tips are trustworthy?
Metadata
Metadata
Assignees
Labels
No labels