Skip to content

Commit f6fb931

Browse files
authored
Rollup merge of #71303 - tshepang:master, r=Mark-Simulacrum
remove build warnings Code blocks that are not annotated are assumed to be Rust
2 parents dfdfc76 + fcbefae commit f6fb931

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

src/librustc_mir/borrow_check/diagnostics/region_name.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
148148
///
149149
/// This function would create a label like this:
150150
///
151-
/// ```
151+
/// ```text
152152
/// | fn foo(x: &u32) { .. }
153153
/// ------- fully elaborated type of `x` is `&'1 u32`
154154
/// ```
@@ -300,7 +300,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
300300
/// elaborated type, returning something like `'1`. Result looks
301301
/// like:
302302
///
303-
/// ```
303+
/// ```text
304304
/// | fn foo(x: &u32) { .. }
305305
/// ------- fully elaborated type of `x` is `&'1 u32`
306306
/// ```
@@ -347,7 +347,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
347347
/// that has no type annotation.
348348
/// For example, we might produce an annotation like this:
349349
///
350-
/// ```
350+
/// ```text
351351
/// | foo(|a, b| b)
352352
/// | - -
353353
/// | | |
@@ -396,7 +396,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
396396
/// that contains the anonymous reference we want to give a name
397397
/// to. For example, we might produce an annotation like this:
398398
///
399-
/// ```
399+
/// ```text
400400
/// | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item = &T>> {
401401
/// | - let's call the lifetime of this reference `'1`
402402
/// ```
@@ -600,7 +600,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
600600
/// fully elaborated type, returning something like `'1`. Result
601601
/// looks like:
602602
///
603-
/// ```
603+
/// ```text
604604
/// | let x = Some(&22);
605605
/// - fully elaborated type of `x` is `Option<&'1 u32>`
606606
/// ```

src/librustc_parse/parser/diagnostics.rs

+2
Original file line numberDiff line numberDiff line change
@@ -579,11 +579,13 @@ impl<'a> Parser<'a> {
579579
/// Keep in mind that given that `outer_op.is_comparison()` holds and comparison ops are left
580580
/// associative we can infer that we have:
581581
///
582+
/// ```text
582583
/// outer_op
583584
/// / \
584585
/// inner_op r2
585586
/// / \
586587
/// l1 r1
588+
/// ```
587589
pub(super) fn check_no_chained_comparison(
588590
&mut self,
589591
inner_op: &Expr,

src/librustc_parse/parser/generics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_span::symbol::{kw, sym};
88
impl<'a> Parser<'a> {
99
/// Parses bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
1010
///
11-
/// ```
11+
/// ```text
1212
/// BOUND = LT_BOUND (e.g., `'a`)
1313
/// ```
1414
fn parse_lt_param_bounds(&mut self) -> GenericBounds {

src/librustc_parse/parser/item.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ impl<'a> Parser<'a> {
743743

744744
/// Parses a `UseTree`.
745745
///
746-
/// ```
746+
/// ```text
747747
/// USE_TREE = [`::`] `*` |
748748
/// [`::`] `{` USE_TREE_LIST `}` |
749749
/// PATH `::` `*` |
@@ -792,7 +792,7 @@ impl<'a> Parser<'a> {
792792

793793
/// Parses a `UseTreeKind::Nested(list)`.
794794
///
795-
/// ```
795+
/// ```text
796796
/// USE_TREE_LIST = Ø | (USE_TREE `,`)* USE_TREE [`,`]
797797
/// ```
798798
fn parse_use_tree_list(&mut self) -> PResult<'a, Vec<(UseTree, ast::NodeId)>> {

src/librustc_resolve/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
10311031

10321032
/// Suggest a missing `self::` if that resolves to an correct module.
10331033
///
1034-
/// ```
1034+
/// ```text
10351035
/// |
10361036
/// LL | use foo::Bar;
10371037
/// | ^^^ did you mean `self::foo`?
@@ -1083,7 +1083,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
10831083

10841084
/// Suggests a missing `super::` if that resolves to an correct module.
10851085
///
1086-
/// ```
1086+
/// ```text
10871087
/// |
10881088
/// LL | use foo::Bar;
10891089
/// | ^^^ did you mean `super::foo`?
@@ -1103,7 +1103,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
11031103

11041104
/// Suggests a missing external crate name if that resolves to an correct module.
11051105
///
1106-
/// ```
1106+
/// ```text
11071107
/// |
11081108
/// LL | use foobar::Baz;
11091109
/// | ^^^^^^ did you mean `baz::foobar`?

src/librustc_trait_selection/traits/error_reporting/suggestions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
10451045
/// Adds an async-await specific note to the diagnostic when the future does not implement
10461046
/// an auto trait because of a captured type.
10471047
///
1048-
/// ```ignore (diagnostic)
1048+
/// ```text
10491049
/// note: future does not implement `Qux` as this value is used across an await
10501050
/// --> $DIR/issue-64130-3-other.rs:17:5
10511051
/// |
@@ -1060,7 +1060,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
10601060
/// When the diagnostic does not implement `Send` or `Sync` specifically, then the diagnostic
10611061
/// is "replaced" with a different message and a more specific error.
10621062
///
1063-
/// ```ignore (diagnostic)
1063+
/// ```text
10641064
/// error: future cannot be sent between threads safely
10651065
/// --> $DIR/issue-64130-2-send.rs:21:5
10661066
/// |

src/librustc_typeck/astconv.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12501250
/// This helper takes a *converted* parameter type (`param_ty`)
12511251
/// and an *unconverted* list of bounds:
12521252
///
1253-
/// ```
1253+
/// ```text
12541254
/// fn foo<T: Debug>
12551255
/// ^ ^^^^^ `ast_bounds` parameter, in HIR form
12561256
/// |
@@ -2992,7 +2992,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
29922992
/// representations). These lists of bounds occur in many places in
29932993
/// Rust's syntax:
29942994
///
2995-
/// ```
2995+
/// ```text
29962996
/// trait Foo: Bar + Baz { }
29972997
/// ^^^^^^^^^ supertrait list bounding the `Self` type parameter
29982998
///

0 commit comments

Comments
 (0)