Skip to content

Commit 46c1da2

Browse files
committed
Auto merge of rust-lang#83582 - jyn514:might-not, r=joshtriplett
may not -> might not may not -> might not "may not" has two possible meanings: 1. A command: "You may not stay up past your bedtime." 2. A fact that's only sometimes true: "Some cities may not have bike lanes." In some cases, the meaning is ambiguous: "Some cars may not have snow tires." (do the cars *happen* to not have snow tires, or is it physically impossible for them to have snow tires?) This changes places where the standard library uses the "description of fact" meaning to say "might not" instead. This is just `std::vec` for now - if you think this is a good idea I can convert the rest of the standard library.
2 parents 81d7c23 + 8ae8ea8 commit 46c1da2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

alloc/src/vec/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@ mod spec_extend;
267267
/// unspecified, and you should use the appropriate methods to modify these.
268268
/// The pointer will never be null, so this type is null-pointer-optimized.
269269
///
270-
/// However, the pointer may not actually point to allocated memory. In particular,
270+
/// However, the pointer might not actually point to allocated memory. In particular,
271271
/// if you construct a `Vec` with capacity 0 via [`Vec::new`], [`vec![]`][`vec!`],
272272
/// [`Vec::with_capacity(0)`][`Vec::with_capacity`], or by calling [`shrink_to_fit`]
273273
/// on an empty Vec, it will not allocate memory. Similarly, if you store zero-sized
274274
/// types inside a `Vec`, it will not allocate space for them. *Note that in this case
275-
/// the `Vec` may not report a [`capacity`] of 0*. `Vec` will allocate if and only
275+
/// the `Vec` might not report a [`capacity`] of 0*. `Vec` will allocate if and only
276276
/// if [`mem::size_of::<T>`]`() * capacity() > 0`. In general, `Vec`'s allocation
277277
/// details are very subtle &mdash; if you intend to allocate memory using a `Vec`
278278
/// and use it for something else (either to pass to unsafe code, or to build your
@@ -347,7 +347,7 @@ mod spec_extend;
347347
/// whatever is most efficient or otherwise easy to implement. Do not rely on
348348
/// removed data to be erased for security purposes. Even if you drop a `Vec`, its
349349
/// buffer may simply be reused by another `Vec`. Even if you zero a `Vec`'s memory
350-
/// first, that may not actually happen because the optimizer does not consider
350+
/// first, that might not actually happen because the optimizer does not consider
351351
/// this a side-effect that must be preserved. There is one case which we will
352352
/// not break, however: using `unsafe` code to write to the excess capacity,
353353
/// and then increasing the length to match, is always valid.

0 commit comments

Comments
 (0)