Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
src
/
tools
/
clippy
/
tests
/
ui
/
open_options_fixable.fixed
blob: 90a129a9bdffd792ea8cbacc2fe5e231dba46033 [
file
] [
log
] [
blame
]
use
std
::
fs
::
OpenOptions
;
#[allow(unused_must_use)]
#[warn(clippy::suspicious_open_options)]
fn main
()
{
OpenOptions
::
new
().
create
(
true
).
truncate
(
true
).
open
(
"foo.txt"
);
//~^ ERROR: file opened with `create`, but `truncate` behavior not defined
}