about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-04 21:54:59 +0200
committerGitHub <noreply@github.com>2025-04-04 21:54:59 +0200
commitfa7d66eaaa39491d9b99c3873fd157eac1edc4f3 (patch)
tree2004b69538d9bcf45d7a077fa454a0e7aa4fca67
parente3c73c7a2f520c04b7e9fde94e34d7875a4ff530 (diff)
parent0f12a2c4ad6ebc7f74e682be819f0d61d8d27c57 (diff)
downloadrust-fa7d66eaaa39491d9b99c3873fd157eac1edc4f3.tar.gz
rust-fa7d66eaaa39491d9b99c3873fd157eac1edc4f3.zip
Rollup merge of #139366 - RalfJung:ToSocketAddrs, r=jieyouxu
ToSocketAddrs: fix typo

It's "a function", never "an function".

I noticed the same typo somewhere in the compiler sources so figured I'd fix it there as well.
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs2
-rw-r--r--library/std/src/net/socket_addr.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
index fddddf404db..56cc4327585 100644
--- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
@@ -969,7 +969,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
             }
         };
 
-        // If we can detect the expression to be an function or method call where the closure was
+        // If we can detect the expression to be a function or method call where the closure was
         // an argument, we point at the function or method definition argument...
         if let Some((callee_def_id, call_span, call_args)) = get_call_details() {
             let arg_pos = call_args
diff --git a/library/std/src/net/socket_addr.rs b/library/std/src/net/socket_addr.rs
index 4c8905c0d46..41e623e79ce 100644
--- a/library/std/src/net/socket_addr.rs
+++ b/library/std/src/net/socket_addr.rs
@@ -101,7 +101,7 @@ use crate::{io, iter, option, slice, vec};
 /// assert_eq!(err.kind(), io::ErrorKind::InvalidInput);
 /// ```
 ///
-/// [`TcpStream::connect`] is an example of an function that utilizes
+/// [`TcpStream::connect`] is an example of a function that utilizes
 /// `ToSocketAddrs` as a trait bound on its parameter in order to accept
 /// different types:
 ///