diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index a29e389953e..cb217be6654 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -227,7 +227,7 @@ pub fn to_opt_reason(&self) -> Option { } /// Collects stability info from `stable`/`unstable`/`rustc_allowed_through_unstable_modules` -/// attributes in `attrs`. Returns `None` if no stability attributes are found. +/// attributes in `attrs`. Returns `None` if no stability attributes are found. pub fn find_stability( sess: &Session, attrs: &[Attribute], @@ -281,7 +281,7 @@ pub fn find_stability( } /// Collects stability info from `rustc_const_stable`/`rustc_const_unstable`/`rustc_promotable` -/// attributes in `attrs`. Returns `None` if no stability attributes are found. +/// attributes in `attrs`. Returns `None` if no stability attributes are found. pub fn find_const_stability( sess: &Session, attrs: &[Attribute], diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index dd117681950..69bb00f804d 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1621,7 +1621,7 @@ fn export_symbols(&mut self, tmpdir: &Path, _crate_type: CrateType, symbols: &[S let path = tmpdir.join("list.exp"); let res: io::Result<()> = try { let mut f = BufWriter::new(File::create(&path)?); - // TODO: use llvm-nm to generate export list. + // FIXME: use llvm-nm to generate export list. for symbol in symbols { debug!(" _{}", symbol); writeln!(f, " {}", symbol)?; diff --git a/compiler/rustc_error_codes/src/error_codes/E0080.md b/compiler/rustc_error_codes/src/error_codes/E0080.md index 71d6c6fe2ef..c05324a5a2c 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0080.md +++ b/compiler/rustc_error_codes/src/error_codes/E0080.md @@ -16,7 +16,8 @@ or causing an integer overflow are two ways to induce this error. Ensure that the expressions given can be evaluated as the desired integer type. See the [Discriminants] section of the Reference for more information about -setting custom integer types on enums using the [`repr` attribute][repr-attribute]. +setting custom integer types on enums using the +[`repr` attribute][repr-attribute]. [discriminants]: https://doc.rust-lang.org/reference/items/enumerations.html#discriminants [repr-attribute]: https://doc.rust-lang.org/reference/type-layout.html#representations diff --git a/compiler/rustc_error_codes/src/error_codes/E0794.md b/compiler/rustc_error_codes/src/error_codes/E0794.md index 4377a292473..c8f73de95a2 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0794.md +++ b/compiler/rustc_error_codes/src/error_codes/E0794.md @@ -59,6 +59,6 @@ In the definition of `bar`, the lifetime parameter `'a` is late-bound, while where `'a` is universally quantified and `'b` is substituted by a specific lifetime. It is not allowed to explicitly specify early-bound lifetime arguments when late-bound lifetime parameters are present (as for `bar_fn2`, -see [issue #42868](https://github.com/rust-lang/rust/issues/42868)), although the -types that are constrained by early-bound parameters can be specified (as for -`bar_fn3`). +see [issue #42868](https://github.com/rust-lang/rust/issues/42868)), although +the types that are constrained by early-bound parameters can be specified (as +for `bar_fn3`). diff --git a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs index 3b775f590a4..7fff801b169 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs @@ -568,7 +568,7 @@ pub(crate) fn build_binary_op( BinOp::Shl | BinOp::Shr if self.check_overflow && ty.is_integral() => { // For an unsigned RHS, the shift is in-range for `rhs < bits`. // For a signed RHS, `IntToInt` cast to the equivalent unsigned - // type and do that same comparison. Because the type is the + // type and do that same comparison. Because the type is the // same size, there's no negative shift amount that ends up // overlapping with valid ones, thus it catches negatives too. let (lhs_size, _) = ty.int_size_and_signed(self.tcx); diff --git a/src/doc/unstable-book/src/compiler-flags/sanitizer.md b/src/doc/unstable-book/src/compiler-flags/sanitizer.md index f71aceff455..b55348b7889 100644 --- a/src/doc/unstable-book/src/compiler-flags/sanitizer.md +++ b/src/doc/unstable-book/src/compiler-flags/sanitizer.md @@ -213,7 +213,7 @@ See the [Clang ControlFlowIntegrity documentation][clang-cfi] for more details. ## Example -```rust,ignore +```rust,ignore (making doc tests pass cross-platform is hard) #![feature(naked_functions)] use std::arch::asm; diff --git a/tests/rustdoc/issue-108925.rs b/tests/rustdoc/issue-108925.rs index 88aeb3c7f75..9c36d0d71c4 100644 --- a/tests/rustdoc/issue-108925.rs +++ b/tests/rustdoc/issue-108925.rs @@ -8,4 +8,3 @@ pub enum MyThing { #[doc(hidden)] NotShown, } - diff --git a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs index 64317b9d39a..85345d65c4a 100644 --- a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs +++ b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs @@ -17,7 +17,7 @@ const fn to_usize() -> usize { match TypeId::of::() { WHAT_A_TYPE => 0, _ => 1000, - } + } } impl AssocCt for T { const ASSOC: usize = to_usize::();