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