Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 5 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f48a5dc
Document std::fs::File close behavior ignoring errors
czipperz Mar 27, 2019
d8a6b63
update stdsimd
RalfJung Mar 30, 2019
25e4447
renamed `inner_deref` feature's `deref*()` methods `as_deref*()` as p…
Xandkeeper Apr 1, 2019
b6ebe1b
Document using `sync_all`
czipperz Apr 2, 2019
e1fb2b7
added `deref_mut_*` versions of `inner_deref` methods as per discussi…
Xandkeeper Apr 1, 2019
e71e71b
fixed breaking changes
Xandkeeper Apr 2, 2019
76e82d6
Link to sync_all
czipperz Apr 3, 2019
5e3b1fc
update miri
RalfJung Mar 30, 2019
087999e
try to fix rand feature flags
RalfJung Mar 31, 2019
c75a5a2
update miri
RalfJung Apr 3, 2019
c2e0d7f
Never return uninhabited values at all
cuviper Apr 3, 2019
a969d40
File: Add documentation about dropping to sync_all
czipperz Apr 4, 2019
4c9c2cf
Add description for -Os and -Oz in rustc.1
tesuji Apr 4, 2019
42d652e
Disable stack probing for gnux32.
crlf0710 Apr 4, 2019
bfb7f34
Rollup merge of #59470 - czipperz:document-fs-file-close, r=dtolnay
Centril Apr 4, 2019
1eec471
Rollup merge of #59555 - RalfJung:miri, r=oli-obk
Centril Apr 4, 2019
5fb8949
Rollup merge of #59556 - RalfJung:stdsimd, r=gnzlbg
Centril Apr 4, 2019
06aa86a
Rollup merge of #59628 - U007D:master, r=Kimundi
Centril Apr 4, 2019
4380fde
Rollup merge of #59639 - cuviper:ignore-uninhabited, r=eddyb
Centril Apr 4, 2019
1f65027
Rollup merge of #59685 - lzutao:patch-1, r=GuillaumeGomez
Centril Apr 4, 2019
03a6ae6
Rollup merge of #59686 - crlf0710:disable_gnux32_stackprobe, r=luqmana
Centril Apr 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ use crate::time::SystemTime;
/// it was opened with. Files also implement [`Seek`] to alter the logical cursor
/// that the file contains internally.
///
/// Files are automatically closed when they go out of scope.
/// Files are automatically closed when they go out of scope. Errors detected
/// on closing are ignored by the implementation of `Drop`. Use the method
/// [`sync_all`] if these errors must be manually handled.
///
/// # Examples
///
Expand Down Expand Up @@ -84,6 +86,7 @@ use crate::time::SystemTime;
/// [`Read`]: ../io/trait.Read.html
/// [`Write`]: ../io/trait.Write.html
/// [`BufReader<R>`]: ../io/struct.BufReader.html
/// [`sync_all`]: struct.File.html#method.sync_all
#[stable(feature = "rust1", since = "1.0.0")]
pub struct File {
inner: fs_imp::File,
Expand Down Expand Up @@ -391,9 +394,13 @@ impl File {

/// Attempts to sync all OS-internal metadata to disk.
///
/// This function will attempt to ensure that all in-core data reaches the
/// This function will attempt to ensure that all in-memory data reaches the
/// filesystem before returning.
///
/// This can be used to handle errors that would otherwise only be caught
/// when the `File` is closed. Dropping a file will ignore errors in
/// synchronizing this in-memory data.
///
/// # Examples
///
/// ```no_run
Expand Down