summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_data_structures/src/flock/unsupported.rs
blob: 9245fca373dfc4de7c0fda7dc50ff3dd97d96f3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::io;
use std::path::Path;

#[derive(Debug)]
pub struct Lock(());

impl Lock {
    pub fn new(_p: &Path, _wait: bool, _create: bool, _exclusive: bool) -> io::Result<Lock> {
        let msg = "file locks not supported on this platform";
        Err(io::Error::new(io::ErrorKind::Other, msg))
    }

    pub fn error_unsupported(_err: &io::Error) -> bool {
        true
    }
}