diff options
| author | wanghaha-dev <mail65656@163.com> | 2022-11-07 14:33:33 +0800 |
|---|---|---|
| committer | wanghaha-dev <mail65656@163.com> | 2022-11-07 14:33:33 +0800 |
| commit | 009f80b987214aaae42c94d2fc8a33aaf689ab69 (patch) | |
| tree | 0d0a498148514c2ebce4c194681f4985889d3579 | |
| parent | 7eef946fc0e0eff40e588eab77b09b287accbec3 (diff) | |
| download | rust-009f80b987214aaae42c94d2fc8a33aaf689ab69.tar.gz rust-009f80b987214aaae42c94d2fc8a33aaf689ab69.zip | |
Modify comment syntax error
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/error.rs | 4 | ||||
| -rw-r--r-- | library/alloc/src/collections/mod.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/conditional-compilation/cfg_accessible-not_sure.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/error.rs b/compiler/rustc_macros/src/diagnostics/error.rs index 0b1ededa775..4612f54e4b1 100644 --- a/compiler/rustc_macros/src/diagnostics/error.rs +++ b/compiler/rustc_macros/src/diagnostics/error.rs @@ -84,7 +84,7 @@ pub(crate) fn invalid_attr(attr: &Attribute, meta: &Meta) -> Diagnostic { } } -/// Emit a error diagnostic for an invalid attribute (optionally performing additional decoration +/// Emit an error diagnostic for an invalid attribute (optionally performing additional decoration /// using the `FnOnce` passed in `diag`) and return `Err(ErrorHandled)`. /// /// For methods that return a `Result<_, DiagnosticDeriveError>`: @@ -126,7 +126,7 @@ pub(crate) fn invalid_nested_attr(attr: &Attribute, nested: &NestedMeta) -> Diag } } -/// Emit a error diagnostic for an invalid nested attribute (optionally performing additional +/// Emit an error diagnostic for an invalid nested attribute (optionally performing additional /// decoration using the `FnOnce` passed in `diag`) and return `Err(ErrorHandled)`. /// /// For methods that return a `Result<_, DiagnosticDeriveError>`: diff --git a/library/alloc/src/collections/mod.rs b/library/alloc/src/collections/mod.rs index 161a375736c..3e0b0f73550 100644 --- a/library/alloc/src/collections/mod.rs +++ b/library/alloc/src/collections/mod.rs @@ -139,7 +139,7 @@ impl Display for TryReserveError { " because the computed capacity exceeded the collection's maximum" } TryReserveErrorKind::AllocError { .. } => { - " because the memory allocator returned a error" + " because the memory allocator returned an error" } }; fmt.write_str(reason) diff --git a/src/test/ui/conditional-compilation/cfg_accessible-not_sure.rs b/src/test/ui/conditional-compilation/cfg_accessible-not_sure.rs index d68acd2451f..99a7949db17 100644 --- a/src/test/ui/conditional-compilation/cfg_accessible-not_sure.rs +++ b/src/test/ui/conditional-compilation/cfg_accessible-not_sure.rs @@ -46,7 +46,7 @@ const C: bool = true; trait Trait {} impl dyn Trait { fn existing() {} } -// FIXME: Should be a error for edition > 2015 +// FIXME: Should be an error for edition > 2015 #[cfg_accessible(Trait::existing)] //~ ERROR not sure const A: bool = true; #[cfg_accessible(Trait::unresolved)] //~ ERROR not sure |
