diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-22 21:59:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-22 21:59:28 +0100 |
| commit | d05edbe652172b84a884496599f95201bd05c997 (patch) | |
| tree | 43925b582191f10e04bac5e568b914ded30712cc | |
| parent | c16f00cff667533ea279ab03d2067d63cb1e9eab (diff) | |
| parent | 34b33a6763663d9a9874af88bcea43a0280be491 (diff) | |
| download | rust-d05edbe652172b84a884496599f95201bd05c997.tar.gz rust-d05edbe652172b84a884496599f95201bd05c997.zip | |
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>
| -rw-r--r-- | compiler/rustc_hir_typeck/src/expr.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 5 |
2 files changed, 10 insertions, 7 deletions
diff --git a/compiler/rustc_hir_typeck/src/expr.rs b/compiler/rustc_hir_typeck/src/expr.rs index caea53d9200..2303d777ddb 100644 --- a/compiler/rustc_hir_typeck/src/expr.rs +++ b/compiler/rustc_hir_typeck/src/expr.rs @@ -2720,12 +2720,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// Check field access expressions, this works for both structs and tuples. /// Returns the Ty of the field. /// - /// ```not_rust - /// base.field - /// ^^^^^^^^^^ expr - /// ^^^^ base - /// ^^^^^ field - /// ``` + /// ```ignore (illustrative) + /// base.field + /// ^^^^^^^^^^ expr + /// ^^^^ base + /// ^^^^^ field + /// ``` fn check_expr_field( &self, expr: &'tcx hir::Expr<'tcx>, diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 7b950b97d30..cc9ed566eda 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -193,8 +193,10 @@ enum ImplTraitContext { } /// Used for tracking import use types which will be used for redundant import checking. +/// /// ### Used::Scope Example -/// ```rust,compile_fail +/// +/// ```rust,compile_fail /// #![deny(redundant_imports)] /// use std::mem::drop; /// fn main() { @@ -202,6 +204,7 @@ enum ImplTraitContext { /// drop(s); /// } /// ``` +/// /// Used::Other is for other situations like module-relative uses. #[derive(Clone, Copy, PartialEq, PartialOrd, Debug)] enum Used { |
