Fix two grammatical errors in the Rust coding guidelines document.
Signed-off-by: Joel Fernandes <joelagnelf at nvidia.com>
---
Documentation/rust/coding-guidelines.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/rust/coding-guidelines.rst
b/Documentation/rust/coding-guidelines.rst
index 6ff9e754755d..d556f0db042b 100644
--- a/Documentation/rust/coding-guidelines.rst
+++ b/Documentation/rust/coding-guidelines.rst
@@ -97,7 +97,7 @@ should still be used. For instance:
// TODO: ...
fn f() {}
-One special kind of comments are the ``// SAFETY:`` comments. These must appear
+One special kind of comment is the ``// SAFETY:`` comment. These must appear
before every ``unsafe`` block, and they explain why the code inside the block
is
correct/sound, i.e. why it cannot trigger undefined behavior in any case, e.g.:
@@ -166,7 +166,7 @@ in the kernel:
- While not shown here, if a function may panic, the conditions under which
that happens must be described under a ``# Panics`` section.
- Please note that panicking should be very rare and used only with a good
+ Please note that panicking should be very rare and used only for a good
reason. In almost all cases, a fallible approach should be used, typically
returning a ``Result``.
--
2.34.1
On 10/20/25 11:55 AM, Joel Fernandes wrote:> Fix two grammatical errors in the Rust coding guidelines document. > > Signed-off-by: Joel Fernandes <joelagnelf at nvidia.com> > --- > Documentation/rust/coding-guidelines.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >Reviewed-by: John Hubbard <jhubbard at nvidia.com> thanks, -- John Hubbard> diff --git a/Documentation/rust/coding-guidelines.rst b/Documentation/rust/coding-guidelines.rst > index 6ff9e754755d..d556f0db042b 100644 > --- a/Documentation/rust/coding-guidelines.rst > +++ b/Documentation/rust/coding-guidelines.rst > @@ -97,7 +97,7 @@ should still be used. For instance: > // TODO: ... > fn f() {} > > -One special kind of comments are the ``// SAFETY:`` comments. These must appear > +One special kind of comment is the ``// SAFETY:`` comment. These must appear > before every ``unsafe`` block, and they explain why the code inside the block is > correct/sound, i.e. why it cannot trigger undefined behavior in any case, e.g.: > > @@ -166,7 +166,7 @@ in the kernel: > - While not shown here, if a function may panic, the conditions under which > that happens must be described under a ``# Panics`` section. > > - Please note that panicking should be very rare and used only with a good > + Please note that panicking should be very rare and used only for a good > reason. In almost all cases, a fallible approach should be used, typically > returning a ``Result``. >
On Mon, Oct 20, 2025 at 8:55?PM Joel Fernandes <joelagnelf at nvidia.com> wrote:> > Fix two grammatical errors in the Rust coding guidelines document. > > Signed-off-by: Joel Fernandes <joelagnelf at nvidia.com>In general, please submit independent patches like this one independently, e.g. this should go through the Rust tree. Thanks! Cheers, Miguel
On 10/20/2025 5:33 PM, Miguel Ojeda wrote:> On Mon, Oct 20, 2025 at 8:55?PM Joel Fernandes <joelagnelf at nvidia.com> wrote: >> >> Fix two grammatical errors in the Rust coding guidelines document. >> >> Signed-off-by: Joel Fernandes <joelagnelf at nvidia.com> > > In general, please submit independent patches like this one > independently, e.g. this should go through the Rust tree.Ack, I will do that. Thanks.