Skip to content

Commit 009f80b

Browse files
committed
Modify comment syntax error
1 parent 7eef946 commit 009f80b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_macros/src/diagnostics/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub(crate) fn invalid_attr(attr: &Attribute, meta: &Meta) -> Diagnostic {
8484
}
8585
}
8686

87-
/// Emit a error diagnostic for an invalid attribute (optionally performing additional decoration
87+
/// Emit an error diagnostic for an invalid attribute (optionally performing additional decoration
8888
/// using the `FnOnce` passed in `diag`) and return `Err(ErrorHandled)`.
8989
///
9090
/// For methods that return a `Result<_, DiagnosticDeriveError>`:
@@ -126,7 +126,7 @@ pub(crate) fn invalid_nested_attr(attr: &Attribute, nested: &NestedMeta) -> Diag
126126
}
127127
}
128128

129-
/// Emit a error diagnostic for an invalid nested attribute (optionally performing additional
129+
/// Emit an error diagnostic for an invalid nested attribute (optionally performing additional
130130
/// decoration using the `FnOnce` passed in `diag`) and return `Err(ErrorHandled)`.
131131
///
132132
/// For methods that return a `Result<_, DiagnosticDeriveError>`:

library/alloc/src/collections/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl Display for TryReserveError {
139139
" because the computed capacity exceeded the collection's maximum"
140140
}
141141
TryReserveErrorKind::AllocError { .. } => {
142-
" because the memory allocator returned a error"
142+
" because the memory allocator returned an error"
143143
}
144144
};
145145
fmt.write_str(reason)

src/test/ui/conditional-compilation/cfg_accessible-not_sure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const C: bool = true;
4646
trait Trait {}
4747
impl dyn Trait { fn existing() {} }
4848

49-
// FIXME: Should be a error for edition > 2015
49+
// FIXME: Should be an error for edition > 2015
5050
#[cfg_accessible(Trait::existing)] //~ ERROR not sure
5151
const A: bool = true;
5252
#[cfg_accessible(Trait::unresolved)] //~ ERROR not sure

0 commit comments

Comments
 (0)