Skip to content

Commit 7f4cc17

Browse files
committed
Address the new odd backticks tidy lint in compiler/
1 parent 7a686bf commit 7f4cc17

File tree

9 files changed

+10
-6
lines changed

9 files changed

+10
-6
lines changed

compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ impl<'a> MethodDef<'a> {
10521052
/// ::core::hash::Hash::hash(&{ self.y }, state)
10531053
/// }
10541054
/// }
1055+
/// ```
10551056
fn expand_struct_method_body<'b>(
10561057
&self,
10571058
cx: &mut ExtCtxt<'_>,

compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs

+1
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ fn build_enum_variant_member_di_node<'ll, 'tcx>(
438438
/// DW_TAG_structure_type (type of variant 1)
439439
/// DW_TAG_structure_type (type of variant 2)
440440
/// DW_TAG_structure_type (type of variant 3)
441+
/// ```
441442
struct VariantMemberInfo<'a, 'll> {
442443
variant_index: VariantIdx,
443444
variant_name: Cow<'a, str>,

compiler/rustc_error_codes/src/error_codes/E0368.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl Add for Foo {
4141
4242
fn main() {
4343
let mut x: Foo = Foo(5);
44-
x += Foo(7); // error, `+= cannot be applied to the type `Foo`
44+
x += Foo(7); // error, `+=` cannot be applied to the type `Foo`
4545
}
4646
```
4747

compiler/rustc_error_codes/src/error_codes/E0710.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ An unknown tool name was found in a scoped lint.
33
Erroneous code examples:
44

55
```compile_fail,E0710
6-
#[allow(clipp::filter_map)] // error!`
6+
#[allow(clipp::filter_map)] // error!
77
fn main() {
88
// business logic
99
}
1010
```
1111

1212
```compile_fail,E0710
13-
#[warn(clipp::filter_map)] // error!`
13+
#[warn(clipp::filter_map)] // error!
1414
fn main() {
1515
// business logic
1616
}

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
104104
let (mention_influencer, influencer_point) =
105105
if sup_origin.span().overlaps(param.param_ty_span) {
106106
// Account for `async fn` like in `async-await/issues/issue-62097.rs`.
107-
// The desugaring of `async `fn`s causes `sup_origin` and `param` to point at the same
107+
// The desugaring of `async fn`s causes `sup_origin` and `param` to point at the same
108108
// place (but with different `ctxt`, hence `overlaps` instead of `==` above).
109109
//
110110
// This avoids the following:

compiler/rustc_middle/src/mir/pretty.rs

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ fn dump_matched_mir_node<'tcx, F>(
123123
// see notes on #41697 above
124124
let def_path =
125125
ty::print::with_forced_impl_filename_line!(tcx.def_path_str(body.source.def_id()));
126+
// ignore-tidy-odd-backticks the literal below is fine
126127
write!(file, "// MIR for `{}", def_path)?;
127128
match body.source.promoted {
128129
None => write!(file, "`")?,

compiler/rustc_mir_build/src/build/matches/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
18861886
// let place = Foo::new();
18871887
// match place { Foo { .. } if { let tmp1 = &place; inspect(*tmp1) }
18881888
// => { let tmp2 = place; feed(tmp2) }, ... }
1889+
// ```
18891890
//
18901891
// And an input like:
18911892
//

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2220,7 +2220,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
22202220
// - `BuiltinDerivedObligation` with a generator witness (A)
22212221
// - `BuiltinDerivedObligation` with a generator (A)
22222222
// - `BuiltinDerivedObligation` with `impl std::future::Future` (A)
2223-
// - `BindingObligation` with `impl_send (Send requirement)
2223+
// - `BindingObligation` with `impl_send` (Send requirement)
22242224
//
22252225
// The first obligation in the chain is the most useful and has the generator that captured
22262226
// the type. The last generator (`outer_generator` below) has information about where the

compiler/rustc_type_ir/src/fold.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! It defines a "skeleton" of how they should be folded.
1919
//! - `TypeSuperFoldable`. This is implemented only for each type of interest,
2020
//! and defines the folding "skeleton" for these types.
21-
//! - `TypeFolder`/`FallibleTypeFolder. One of these is implemented for each
21+
//! - `TypeFolder`/`FallibleTypeFolder`. One of these is implemented for each
2222
//! folder. This defines how types of interest are folded.
2323
//!
2424
//! This means each fold is a mixture of (a) generic folding operations, and (b)

0 commit comments

Comments
 (0)