Rollup merge of #108726 - est31:backticks_matchmaking_tidy, r=Nilstrieb
tidy: enforce comment blocks to have an even number of backticks After PR #108694, most unmatched backticks in `compiler/` comments have been eliminated. This PR adds a tidy lint to ensure no new unmatched backticks are added, and either addresses the lint in the remaining instances it found, or allows it. Very often, backtick containing sections wrap around lines, for example: ```Rust // This function takes a tuple `(Vec<String>, // Box<[u8]>)` and transforms it into `Vec<u8>`. ``` The lint is implemented to work on top of blocks, counting each line with a `//` into a block, and counting if there are an odd or even number of backticks in the entire block, instead of looking at just a single line.
This commit is contained in:
commit
9668ae5eb8
12 changed files with 69 additions and 21 deletions
|
@ -248,7 +248,8 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
|||
///
|
||||
/// To deal with this, we first try to normalize the self type and add the candidates for the normalized
|
||||
/// self type to the list of candidates in case that succeeds. Note that we can't just eagerly return in
|
||||
/// this case as projections as self types add `
|
||||
/// this case as projections as self types add
|
||||
// FIXME complete the unfinished sentence above
|
||||
fn assemble_candidates_after_normalizing_self_ty<G: GoalKind<'tcx>>(
|
||||
&mut self,
|
||||
goal: Goal<'tcx, G>,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue