mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 05:26:47 +00:00
Address the new odd backticks tidy lint in compiler/
This commit is contained in:
parent
7a686bf41d
commit
7f4cc178f0
compiler
rustc_builtin_macros/src/deriving/generic
rustc_codegen_llvm/src/debuginfo/metadata/enums
rustc_error_codes/src/error_codes
rustc_infer/src/infer/error_reporting/nice_region_error
rustc_middle/src/mir
rustc_mir_build/src/build/matches
rustc_trait_selection/src/traits/error_reporting
rustc_type_ir/src
@ -1052,6 +1052,7 @@ impl<'a> MethodDef<'a> {
|
||||
/// ::core::hash::Hash::hash(&{ self.y }, state)
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
fn expand_struct_method_body<'b>(
|
||||
&self,
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
@ -438,6 +438,7 @@ fn build_enum_variant_member_di_node<'ll, 'tcx>(
|
||||
/// DW_TAG_structure_type (type of variant 1)
|
||||
/// DW_TAG_structure_type (type of variant 2)
|
||||
/// DW_TAG_structure_type (type of variant 3)
|
||||
/// ```
|
||||
struct VariantMemberInfo<'a, 'll> {
|
||||
variant_index: VariantIdx,
|
||||
variant_name: Cow<'a, str>,
|
||||
|
@ -41,7 +41,7 @@ impl Add for Foo {
|
||||
|
||||
fn main() {
|
||||
let mut x: Foo = Foo(5);
|
||||
x += Foo(7); // error, `+= cannot be applied to the type `Foo`
|
||||
x += Foo(7); // error, `+=` cannot be applied to the type `Foo`
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -3,14 +3,14 @@ An unknown tool name was found in a scoped lint.
|
||||
Erroneous code examples:
|
||||
|
||||
```compile_fail,E0710
|
||||
#[allow(clipp::filter_map)] // error!`
|
||||
#[allow(clipp::filter_map)] // error!
|
||||
fn main() {
|
||||
// business logic
|
||||
}
|
||||
```
|
||||
|
||||
```compile_fail,E0710
|
||||
#[warn(clipp::filter_map)] // error!`
|
||||
#[warn(clipp::filter_map)] // error!
|
||||
fn main() {
|
||||
// business logic
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
let (mention_influencer, influencer_point) =
|
||||
if sup_origin.span().overlaps(param.param_ty_span) {
|
||||
// Account for `async fn` like in `async-await/issues/issue-62097.rs`.
|
||||
// The desugaring of `async `fn`s causes `sup_origin` and `param` to point at the same
|
||||
// The desugaring of `async fn`s causes `sup_origin` and `param` to point at the same
|
||||
// place (but with different `ctxt`, hence `overlaps` instead of `==` above).
|
||||
//
|
||||
// This avoids the following:
|
||||
|
@ -123,6 +123,7 @@ fn dump_matched_mir_node<'tcx, F>(
|
||||
// see notes on #41697 above
|
||||
let def_path =
|
||||
ty::print::with_forced_impl_filename_line!(tcx.def_path_str(body.source.def_id()));
|
||||
// ignore-tidy-odd-backticks the literal below is fine
|
||||
write!(file, "// MIR for `{}", def_path)?;
|
||||
match body.source.promoted {
|
||||
None => write!(file, "`")?,
|
||||
|
@ -1886,6 +1886,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
// let place = Foo::new();
|
||||
// match place { Foo { .. } if { let tmp1 = &place; inspect(*tmp1) }
|
||||
// => { let tmp2 = place; feed(tmp2) }, ... }
|
||||
// ```
|
||||
//
|
||||
// And an input like:
|
||||
//
|
||||
|
@ -2220,7 +2220,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||
// - `BuiltinDerivedObligation` with a generator witness (A)
|
||||
// - `BuiltinDerivedObligation` with a generator (A)
|
||||
// - `BuiltinDerivedObligation` with `impl std::future::Future` (A)
|
||||
// - `BindingObligation` with `impl_send (Send requirement)
|
||||
// - `BindingObligation` with `impl_send` (Send requirement)
|
||||
//
|
||||
// The first obligation in the chain is the most useful and has the generator that captured
|
||||
// the type. The last generator (`outer_generator` below) has information about where the
|
||||
|
@ -18,7 +18,7 @@
|
||||
//! It defines a "skeleton" of how they should be folded.
|
||||
//! - `TypeSuperFoldable`. This is implemented only for each type of interest,
|
||||
//! and defines the folding "skeleton" for these types.
|
||||
//! - `TypeFolder`/`FallibleTypeFolder. One of these is implemented for each
|
||||
//! - `TypeFolder`/`FallibleTypeFolder`. One of these is implemented for each
|
||||
//! folder. This defines how types of interest are folded.
|
||||
//!
|
||||
//! This means each fold is a mixture of (a) generic folding operations, and (b)
|
||||
|
Loading…
Reference in New Issue
Block a user