1
Fork 0

Rollup merge of #134660 - dtolnay:markdowncode, r=lqd

Fix spacing of markdown code block fences in compiler rustdoc

Two place have misaligned open and close ```` ``` ````.

I noticed these because one of them disrupted syntax highlighting in my editor for the rest of the file as I was working on a different change.

<p align="center"><img src="https://github.com/user-attachments/assets/5de21d08-c30c-4e9c-8587-e83b988b9db5" width="500"></p>
This commit is contained in:
Matthias Krüger 2024-12-22 21:59:28 +01:00 committed by GitHub
commit d05edbe652
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 7 deletions

View file

@ -2720,12 +2720,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// Check field access expressions, this works for both structs and tuples. /// Check field access expressions, this works for both structs and tuples.
/// Returns the Ty of the field. /// Returns the Ty of the field.
/// ///
/// ```not_rust /// ```ignore (illustrative)
/// base.field /// base.field
/// ^^^^^^^^^^ expr /// ^^^^^^^^^^ expr
/// ^^^^ base /// ^^^^ base
/// ^^^^^ field /// ^^^^^ field
/// ``` /// ```
fn check_expr_field( fn check_expr_field(
&self, &self,
expr: &'tcx hir::Expr<'tcx>, expr: &'tcx hir::Expr<'tcx>,

View file

@ -193,8 +193,10 @@ enum ImplTraitContext {
} }
/// Used for tracking import use types which will be used for redundant import checking. /// Used for tracking import use types which will be used for redundant import checking.
///
/// ### Used::Scope Example /// ### Used::Scope Example
/// ```rust,compile_fail ///
/// ```rust,compile_fail
/// #![deny(redundant_imports)] /// #![deny(redundant_imports)]
/// use std::mem::drop; /// use std::mem::drop;
/// fn main() { /// fn main() {
@ -202,6 +204,7 @@ enum ImplTraitContext {
/// drop(s); /// drop(s);
/// } /// }
/// ``` /// ```
///
/// Used::Other is for other situations like module-relative uses. /// Used::Other is for other situations like module-relative uses.
#[derive(Clone, Copy, PartialEq, PartialOrd, Debug)] #[derive(Clone, Copy, PartialEq, PartialOrd, Debug)]
enum Used { enum Used {