Skip to content

Commit fc35de4

Browse files
committed
Auto merge of #96015 - Dylan-DPC:rollup-vhdprid, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #93217 (Improve Rustdoc UI for scraped examples with multiline arguments, fix overflow in line numbers) - #95885 (Improve error message in case of missing checksum) - #95962 (Document that DirEntry holds the directory open) - #95991 (fix: wrong trait import suggestion for T:) - #96005 (Add missing article to fix "few" to "a few".) - #96006 (Add a missing article) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents b183e97 + 8402b1c commit fc35de4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

core/src/convert/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ pub const fn identity<T>(x: T) -> T {
108108
/// If you need to do a costly conversion it is better to implement [`From`] with type
109109
/// `&T` or write a custom function.
110110
///
111-
/// `AsRef` has the same signature as [`Borrow`], but [`Borrow`] is different in few aspects:
111+
/// `AsRef` has the same signature as [`Borrow`], but [`Borrow`] is different in a few aspects:
112112
///
113113
/// - Unlike `AsRef`, [`Borrow`] has a blanket impl for any `T`, and can be used to accept either
114114
/// a reference or a value.
115-
/// - [`Borrow`] also requires that [`Hash`], [`Eq`] and [`Ord`] for borrowed value are
115+
/// - [`Borrow`] also requires that [`Hash`], [`Eq`] and [`Ord`] for a borrowed value are
116116
/// equivalent to those of the owned value. For this reason, if you want to
117117
/// borrow only a single field of a struct you can implement `AsRef`, but not [`Borrow`].
118118
///

std/src/fs.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,16 @@ pub struct ReadDir(fs_imp::ReadDir);
132132
/// An instance of `DirEntry` represents an entry inside of a directory on the
133133
/// filesystem. Each entry can be inspected via methods to learn about the full
134134
/// path or possibly other metadata through per-platform extension traits.
135+
///
136+
/// # Platform-specific behavior
137+
///
138+
/// On Unix, the `DirEntry` struct contains an internal reference to the open
139+
/// directory. Holding `DirEntry` objects will consume a file handle even
140+
/// after the `ReadDir` iterator is dropped.
141+
///
142+
/// Note that this [may change in the future][changes].
143+
///
144+
/// [changes]: io#platform-specific-behavior
135145
#[stable(feature = "rust1", since = "1.0.0")]
136146
pub struct DirEntry(fs_imp::DirEntry);
137147

0 commit comments

Comments
 (0)