]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_data_structures/src/flock/unsupported.rs
Rollup merge of #100823 - WaffleLapkin:less_offsets, r=scottmcm
[rust.git] / compiler / rustc_data_structures / src / flock / unsupported.rs
1 use std::io;
2 use std::path::Path;
3
4 #[derive(Debug)]
5 pub struct Lock(());
6
7 impl Lock {
8     pub fn new(_p: &Path, _wait: bool, _create: bool, _exclusive: bool) -> io::Result<Lock> {
9         let msg = "file locks not supported on this platform";
10         Err(io::Error::new(io::ErrorKind::Other, msg))
11     }
12
13     pub fn error_unsupported(_err: &io::Error) -> bool {
14         true
15     }
16 }