diff options
| author | bors <bors@rust-lang.org> | 2021-07-30 04:34:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-07-30 04:34:13 +0000 |
| commit | fe1c942eee3489743d655d81ca89166217db0547 (patch) | |
| tree | 093f237e01769880448c5220665ea3d192d56e78 /library/std/src | |
| parent | e66a8c260c0bcc4e7a8943f01d75d70ff640fb38 (diff) | |
| parent | ffcf8a0d7681bb5038dc00479d824d9e20f5f989 (diff) | |
| download | rust-fe1c942eee3489743d655d81ca89166217db0547.tar.gz rust-fe1c942eee3489743d655d81ca89166217db0547.zip | |
Auto merge of #87445 - amalik18:issue-83584-fix, r=kennytm
Fix may not to appropriate might not or must not I went through and changed occurrences of `may not` to be more explicit with `might not` and `must not`.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/backtrace.rs | 6 | ||||
| -rw-r--r-- | library/std/src/env.rs | 8 | ||||
| -rw-r--r-- | library/std/src/f32.rs | 2 | ||||
| -rw-r--r-- | library/std/src/f64.rs | 2 | ||||
| -rw-r--r-- | library/std/src/fs.rs | 8 | ||||
| -rw-r--r-- | library/std/src/fs/tests.rs | 2 | ||||
| -rw-r--r-- | library/std/src/io/mod.rs | 4 | ||||
| -rw-r--r-- | library/std/src/net/addr.rs | 2 | ||||
| -rw-r--r-- | library/std/src/net/udp.rs | 6 | ||||
| -rw-r--r-- | library/std/src/os/unix/net/addr.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/unix/process.rs | 2 | ||||
| -rw-r--r-- | library/std/src/panic.rs | 4 | ||||
| -rw-r--r-- | library/std/src/primitive_docs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sync/condvar.rs | 6 | ||||
| -rw-r--r-- | library/std/src/sync/mpsc/mpsc_queue.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sync/mpsc/stream.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sync/once.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sync/poison.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/mutex.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/stdio.rs | 2 | ||||
| -rw-r--r-- | library/std/src/thread/mod.rs | 4 | ||||
| -rw-r--r-- | library/std/src/time.rs | 4 |
22 files changed, 39 insertions, 39 deletions
diff --git a/library/std/src/backtrace.rs b/library/std/src/backtrace.rs index f8884523cf4..9ace3e1b600 100644 --- a/library/std/src/backtrace.rs +++ b/library/std/src/backtrace.rs @@ -35,13 +35,13 @@ //! `BacktraceStatus` enum as a result of `Backtrace::status`. //! //! Like above with accuracy platform support is done on a best effort basis. -//! Sometimes libraries may not be available at runtime or something may go +//! Sometimes libraries might not be available at runtime or something may go //! wrong which would cause a backtrace to not be captured. Please feel free to //! report issues with platforms where a backtrace cannot be captured though! //! //! ## Environment Variables //! -//! The `Backtrace::capture` function may not actually capture a backtrace by +//! The `Backtrace::capture` function might not actually capture a backtrace by //! default. Its behavior is governed by two environment variables: //! //! * `RUST_LIB_BACKTRACE` - if this is set to `0` then `Backtrace::capture` @@ -61,7 +61,7 @@ //! Note that the `Backtrace::force_capture` function can be used to ignore //! these environment variables. Also note that the state of environment //! variables is cached once the first backtrace is created, so altering -//! `RUST_LIB_BACKTRACE` or `RUST_BACKTRACE` at runtime may not actually change +//! `RUST_LIB_BACKTRACE` or `RUST_BACKTRACE` at runtime might not actually change //! how backtraces are captured. #![unstable(feature = "backtrace", issue = "53487")] diff --git a/library/std/src/env.rs b/library/std/src/env.rs index 5709d97d643..79b7e2e57a3 100644 --- a/library/std/src/env.rs +++ b/library/std/src/env.rs @@ -682,7 +682,7 @@ pub fn current_exe() -> io::Result<PathBuf> { /// for more. /// /// The first element is traditionally the path of the executable, but it can be -/// set to arbitrary text, and may not even exist. This means this property +/// set to arbitrary text, and might not even exist. This means this property /// should not be relied upon for security purposes. /// /// [`env::args()`]: args @@ -698,7 +698,7 @@ pub struct Args { /// for more. /// /// The first element is traditionally the path of the executable, but it can be -/// set to arbitrary text, and may not even exist. This means this property +/// set to arbitrary text, and might not even exist. This means this property /// should not be relied upon for security purposes. /// /// [`env::args_os()`]: args_os @@ -711,7 +711,7 @@ pub struct ArgsOs { /// via the command line). /// /// The first element is traditionally the path of the executable, but it can be -/// set to arbitrary text, and may not even exist. This means this property should +/// set to arbitrary text, and might not even exist. This means this property should /// not be relied upon for security purposes. /// /// On Unix systems the shell usually expands unquoted arguments with glob patterns @@ -748,7 +748,7 @@ pub fn args() -> Args { /// via the command line). /// /// The first element is traditionally the path of the executable, but it can be -/// set to arbitrary text, and may not even exist. This means this property should +/// set to arbitrary text, and might not even exist. This means this property should /// not be relied upon for security purposes. /// /// On Unix systems the shell usually expands unquoted arguments with glob patterns diff --git a/library/std/src/f32.rs b/library/std/src/f32.rs index e0cc6ad1d42..0b392897f9d 100644 --- a/library/std/src/f32.rs +++ b/library/std/src/f32.rs @@ -409,7 +409,7 @@ impl f32 { /// Returns the logarithm of the number with respect to an arbitrary base. /// - /// The result may not be correctly rounded owing to implementation details; + /// The result might not be correctly rounded owing to implementation details; /// `self.log2()` can produce more accurate results for base 2, and /// `self.log10()` can produce more accurate results for base 10. /// diff --git a/library/std/src/f64.rs b/library/std/src/f64.rs index 7ed65b7dafe..602cceb5d1a 100644 --- a/library/std/src/f64.rs +++ b/library/std/src/f64.rs @@ -409,7 +409,7 @@ impl f64 { /// Returns the logarithm of the number with respect to an arbitrary base. /// - /// The result may not be correctly rounded owing to implementation details; + /// The result might not be correctly rounded owing to implementation details; /// `self.log2()` can produce more accurate results for base 2, and /// `self.log10()` can produce more accurate results for base 10. /// diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index f72f88bb05c..e1ad46961c0 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -419,7 +419,7 @@ impl File { self.inner.fsync() } - /// This function is similar to [`sync_all`], except that it may not + /// This function is similar to [`sync_all`], except that it might not /// synchronize file metadata to the filesystem. /// /// This is intended for use cases that must synchronize content, but don't @@ -1081,7 +1081,7 @@ impl Metadata { /// /// # Errors /// - /// This field may not be available on all platforms, and will return an + /// This field might not be available on all platforms, and will return an /// `Err` on platforms where it is not available. /// /// # Examples @@ -1116,7 +1116,7 @@ impl Metadata { /// /// # Errors /// - /// This field may not be available on all platforms, and will return an + /// This field might not be available on all platforms, and will return an /// `Err` on platforms where it is not available. /// /// # Examples @@ -1148,7 +1148,7 @@ impl Metadata { /// /// # Errors /// - /// This field may not be available on all platforms, and will return an + /// This field might not be available on all platforms, and will return an /// `Err` on platforms or filesystems where it is not available. /// /// # Examples diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 080b4b5d87f..13dbae3b7b5 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -824,7 +824,7 @@ fn symlink_noexist() { }; // Use a relative path for testing. Symlinks get normalized by Windows, - // so we may not get the same path back for absolute paths + // so we might not get the same path back for absolute paths check!(symlink_file(&"foo", &tmpdir.join("bar"))); assert_eq!(check!(fs::read_link(&tmpdir.join("bar"))).to_str().unwrap(), "foo"); } diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index c58abf2a737..b336b65ad7d 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -555,7 +555,7 @@ pub trait Read { /// contents of `buf` being true. It is recommended that *implementations* /// only write data to `buf` instead of reading its contents. /// - /// Correspondingly, however, *callers* of this method may not assume any guarantees + /// Correspondingly, however, *callers* of this method must not assume any guarantees /// about how the implementation uses `buf`. The trait is safe to implement, /// so it is possible that the code that's supposed to write to the buffer might also read /// from it. It is your responsibility to make sure that `buf` is initialized @@ -1369,7 +1369,7 @@ pub trait Write { /// Write a buffer into this writer, returning how many bytes were written. /// /// This function will attempt to write the entire contents of `buf`, but - /// the entire write may not succeed, or the write may also generate an + /// the entire write might not succeed, or the write may also generate an /// error. A call to `write` represents *at most one* attempt to write to /// any wrapped object. /// diff --git a/library/std/src/net/addr.rs b/library/std/src/net/addr.rs index 70376d5e065..d3569710c2b 100644 --- a/library/std/src/net/addr.rs +++ b/library/std/src/net/addr.rs @@ -874,7 +874,7 @@ pub trait ToSocketAddrs { /// Converts this object to an iterator of resolved `SocketAddr`s. /// - /// The returned iterator may not actually yield any values depending on the + /// The returned iterator might not actually yield any values depending on the /// outcome of any resolution performed. /// /// Note that this function may block the current thread while resolution is diff --git a/library/std/src/net/udp.rs b/library/std/src/net/udp.rs index 18297139b7b..d2088a12b2c 100644 --- a/library/std/src/net/udp.rs +++ b/library/std/src/net/udp.rs @@ -408,7 +408,7 @@ impl UdpSocket { /// Sets the value of the `IP_MULTICAST_LOOP` option for this socket. /// /// If enabled, multicast packets will be looped back to the local socket. - /// Note that this may not have any effect on IPv6 sockets. + /// Note that this might not have any effect on IPv6 sockets. /// /// # Examples /// @@ -447,7 +447,7 @@ impl UdpSocket { /// this socket. The default value is 1 which means that multicast packets /// don't leave the local network unless explicitly requested. /// - /// Note that this may not have any effect on IPv6 sockets. + /// Note that this might not have any effect on IPv6 sockets. /// /// # Examples /// @@ -483,7 +483,7 @@ impl UdpSocket { /// Sets the value of the `IPV6_MULTICAST_LOOP` option for this socket. /// /// Controls whether this socket sees the multicast packets it sends itself. - /// Note that this may not have any affect on IPv4 sockets. + /// Note that this might not have any affect on IPv4 sockets. /// /// # Examples /// diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs index 459f3590e64..62bfde8bfd4 100644 --- a/library/std/src/os/unix/net/addr.rs +++ b/library/std/src/os/unix/net/addr.rs @@ -31,7 +31,7 @@ pub(super) unsafe fn sockaddr_un(path: &Path) -> io::Result<(libc::sockaddr_un, if bytes.contains(&0) { return Err(io::Error::new_const( io::ErrorKind::InvalidInput, - &"paths may not contain interior null bytes", + &"paths must not contain interior null bytes", )); } diff --git a/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs index f3b5227df86..615290d2703 100644 --- a/library/std/src/os/unix/process.rs +++ b/library/std/src/os/unix/process.rs @@ -83,7 +83,7 @@ pub trait CommandExt: Sealed { /// /// When this closure is run, aspects such as the stdio file descriptors and /// working directory have successfully been changed, so output to these - /// locations may not appear where intended. + /// locations might not appear where intended. /// /// [POSIX fork() specification]: /// https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index 3b3996e437c..9c597e17bb5 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -163,7 +163,7 @@ pub auto trait RefUnwindSafe {} /// When using [`catch_unwind`] it may be the case that some of the closed over /// variables are not unwind safe. For example if `&mut T` is captured the /// compiler will generate a warning indicating that it is not unwind safe. It -/// may not be the case, however, that this is actually a problem due to the +/// might not be the case, however, that this is actually a problem due to the /// specific usage of [`catch_unwind`] if unwind safety is specifically taken into /// account. This wrapper struct is useful for a quick and lightweight /// annotation that a variable is indeed unwind safe. @@ -406,7 +406,7 @@ impl<S: Stream> Stream for AssertUnwindSafe<S> { /// /// # Notes /// -/// Note that this function **may not catch all panics** in Rust. A panic in +/// Note that this function **might not catch all panics** in Rust. A panic in /// Rust is not always implemented via unwinding, but can be implemented by /// aborting the process as well. This function *only* catches unwinding panics, /// not those that abort the process. diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs index 7bc1f5e918e..dc4572cd936 100644 --- a/library/std/src/primitive_docs.rs +++ b/library/std/src/primitive_docs.rs @@ -303,7 +303,7 @@ mod prim_never {} /// /// [`String`]: string/struct.String.html /// -/// As always, remember that a human intuition for 'character' may not map to +/// As always, remember that a human intuition for 'character' might not map to /// Unicode's definitions. For example, despite looking similar, the 'é' /// character is one Unicode code point while 'é' is two Unicode code points: /// diff --git a/library/std/src/sync/condvar.rs b/library/std/src/sync/condvar.rs index 2f0b32c90d0..00a4afc5705 100644 --- a/library/std/src/sync/condvar.rs +++ b/library/std/src/sync/condvar.rs @@ -254,7 +254,7 @@ impl Condvar { /// except that the thread will be blocked for roughly no longer /// than `ms` milliseconds. This method should not be used for /// precise timing due to anomalies such as preemption or platform - /// differences that may not cause the maximum amount of time + /// differences that might not cause the maximum amount of time /// waited to be precisely `ms`. /// /// Note that the best effort is made to ensure that the time waited is @@ -317,7 +317,7 @@ impl Condvar { /// The semantics of this function are equivalent to [`wait`] except that /// the thread will be blocked for roughly no longer than `dur`. This /// method should not be used for precise timing due to anomalies such as - /// preemption or platform differences that may not cause the maximum + /// preemption or platform differences that might not cause the maximum /// amount of time waited to be precisely `dur`. /// /// Note that the best effort is made to ensure that the time waited is @@ -392,7 +392,7 @@ impl Condvar { /// The semantics of this function are equivalent to [`wait_while`] except /// that the thread will be blocked for roughly no longer than `dur`. This /// method should not be used for precise timing due to anomalies such as - /// preemption or platform differences that may not cause the maximum + /// preemption or platform differences that might not cause the maximum /// amount of time waited to be precisely `dur`. /// /// Note that the best effort is made to ensure that the time waited is diff --git a/library/std/src/sync/mpsc/mpsc_queue.rs b/library/std/src/sync/mpsc/mpsc_queue.rs index b93eb056da4..cdd64a5def5 100644 --- a/library/std/src/sync/mpsc/mpsc_queue.rs +++ b/library/std/src/sync/mpsc/mpsc_queue.rs @@ -6,7 +6,7 @@ //! //! Note that the current implementation of this queue has a caveat of the `pop` //! method, and see the method for more information about it. Due to this -//! caveat, this queue may not be appropriate for all use-cases. +//! caveat, this queue might not be appropriate for all use-cases. // https://www.1024cores.net/home/lock-free-algorithms // /queues/non-intrusive-mpsc-node-based-queue diff --git a/library/std/src/sync/mpsc/stream.rs b/library/std/src/sync/mpsc/stream.rs index a652f24c58a..2a1d3f8967e 100644 --- a/library/std/src/sync/mpsc/stream.rs +++ b/library/std/src/sync/mpsc/stream.rs @@ -339,7 +339,7 @@ impl<T> Packet<T> { // At this point in time, we have gated all future senders from sending, // and we have flagged the channel as being disconnected. The senders - // still have some responsibility, however, because some sends may not + // still have some responsibility, however, because some sends might not // complete until after we flag the disconnection. There are more // details in the sending methods that see DISCONNECTED } @@ -370,7 +370,7 @@ impl<T> Packet<T> { // at all. // // Hence, because of these invariants, we immediately return `Ok(true)`. - // Note that the data may not actually be sent on the channel just yet. + // Note that the data might not actually be sent on the channel just yet. // The other end could have flagged the upgrade but not sent data to // this end. This is fine because we know it's a small bounded windows // of time until the data is actually sent. diff --git a/library/std/src/sync/once.rs b/library/std/src/sync/once.rs index 6da6c18e477..a2e935a0ceb 100644 --- a/library/std/src/sync/once.rs +++ b/library/std/src/sync/once.rs @@ -198,7 +198,7 @@ impl Once { /// routine is currently running. /// /// When this function returns, it is guaranteed that some initialization - /// has run and completed (it may not be the closure specified). It is also + /// has run and completed (it might not be the closure specified). It is also /// guaranteed that any memory writes performed by the executed closure can /// be reliably observed by other threads at this point (there is a /// happens-before relation between the closure and code executing after the diff --git a/library/std/src/sync/poison.rs b/library/std/src/sync/poison.rs index 05e1833c3e5..fa950331e64 100644 --- a/library/std/src/sync/poison.rs +++ b/library/std/src/sync/poison.rs @@ -120,7 +120,7 @@ pub type LockResult<Guard> = Result<Guard, PoisonError<Guard>>; /// A type alias for the result of a nonblocking locking method. /// /// For more information, see [`LockResult`]. A `TryLockResult` doesn't -/// necessarily hold the associated guard in the [`Err`] type as the lock may not +/// necessarily hold the associated guard in the [`Err`] type as the lock might not /// have been acquired for other reasons. #[stable(feature = "rust1", since = "1.0.0")] pub type TryLockResult<Guard> = Result<Guard, TryLockError<Guard>>; diff --git a/library/std/src/sys/windows/mutex.rs b/library/std/src/sys/windows/mutex.rs index 12c5ea741f9..56f91ebe582 100644 --- a/library/std/src/sys/windows/mutex.rs +++ b/library/std/src/sys/windows/mutex.rs @@ -1,6 +1,6 @@ //! System Mutexes //! -//! The Windows implementation of mutexes is a little odd and it may not be +//! The Windows implementation of mutexes is a little odd and it might not be //! immediately obvious what's going on. The primary oddness is that SRWLock is //! used instead of CriticalSection, and this is done because: //! diff --git a/library/std/src/sys/windows/stdio.rs b/library/std/src/sys/windows/stdio.rs index be3141e46a1..2973951fe90 100644 --- a/library/std/src/sys/windows/stdio.rs +++ b/library/std/src/sys/windows/stdio.rs @@ -169,7 +169,7 @@ impl io::Read for Stdin { // We assume that if the last `u16` is an unpaired surrogate they got sliced apart by our // buffer size, and keep it around for the next read hoping to put them together. -// This is a best effort, and may not work if we are not the only reader on Stdin. +// This is a best effort, and might not work if we are not the only reader on Stdin. fn read_u16s_fixup_surrogates( handle: c::HANDLE, buf: &mut [u16], diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 9f7e6b95dfb..36e1d502019 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -906,7 +906,7 @@ pub fn park() { /// The semantics of this function are equivalent to [`park`] except /// that the thread will be blocked for roughly no longer than `dur`. This /// method should not be used for precise timing due to anomalies such as -/// preemption or platform differences that may not cause the maximum +/// preemption or platform differences that might not cause the maximum /// amount of time waited to be precisely `ms` long. /// /// See the [park documentation][`park`] for more detail. @@ -922,7 +922,7 @@ pub fn park_timeout_ms(ms: u32) { /// The semantics of this function are equivalent to [`park`][park] except /// that the thread will be blocked for roughly no longer than `dur`. This /// method should not be used for precise timing due to anomalies such as -/// preemption or platform differences that may not cause the maximum +/// preemption or platform differences that might not cause the maximum /// amount of time waited to be precisely `dur` long. /// /// See the [park documentation][park] for more details. diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 003069b338e..6d70c7270d3 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -34,7 +34,7 @@ pub use core::time::Duration; /// benchmarks or timing how long an operation takes. /// /// Note, however, that instants are not guaranteed to be **steady**. In other -/// words, each tick of the underlying clock may not be the same length (e.g. +/// words, each tick of the underlying clock might not be the same length (e.g. /// some seconds may be longer than others). An instant may jump forwards or /// experience time dilation (slow down or speed up), but it will never go /// backwards. @@ -485,7 +485,7 @@ impl SystemTime { /// /// This function may fail as the underlying system clock is susceptible to /// drift and updates (e.g., the system clock could go backwards), so this - /// function may not always succeed. If successful, [`Ok`]`(`[`Duration`]`)` is + /// function might not always succeed. If successful, [`Ok`]`(`[`Duration`]`)` is /// returned where the duration represents the amount of time elapsed from /// this time measurement to the current time. /// |
