Auto merge of #103426 - matthiaskrgr:rollup-n6dqdy8, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #103123 (Introduce `subst_iter` and `subst_iter_copied` on `EarlyBinder` ) - #103328 (Do not suggest trivially false const predicates) - #103354 (Escape string literals when fixing overlong char literal) - #103355 (Handle return-position `impl Trait` in traits properly in `register_hidden_type`) - #103368 (Delay ambiguity span bug in normalize query iff not rustdoc) - #103388 (rustdoc: remove unused CSS class `.result-description`) - #103399 (Change `unknown_lint` applicability to `MaybeIncorrect`) - #103401 (Use functions for headings rustdoc GUI test) - #103412 (Fix typo in docs of `String::leak`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
faab68eb29
45 changed files with 467 additions and 248 deletions
|
@ -960,7 +960,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
|||
sp,
|
||||
"did you mean",
|
||||
suggestion,
|
||||
Applicability::MachineApplicable,
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
}
|
||||
lint
|
||||
|
|
|
@ -91,14 +91,12 @@ impl<'tcx> LateLintPass<'tcx> for OpaqueHiddenInferredBound {
|
|||
// For example, in `impl Trait<Assoc = impl Send>`, for all of the bounds on `Assoc`,
|
||||
// e.g. `type Assoc: OtherTrait`, replace `<impl Trait as Trait>::Assoc: OtherTrait`
|
||||
// with `impl Send: OtherTrait`.
|
||||
for assoc_pred_and_span in
|
||||
cx.tcx.bound_explicit_item_bounds(proj.projection_ty.item_def_id).transpose_iter()
|
||||
for (assoc_pred, assoc_pred_span) in cx
|
||||
.tcx
|
||||
.bound_explicit_item_bounds(proj.projection_ty.item_def_id)
|
||||
.subst_iter_copied(cx.tcx, &proj.projection_ty.substs)
|
||||
{
|
||||
let assoc_pred_span = assoc_pred_and_span.0.1;
|
||||
let assoc_pred = assoc_pred_and_span
|
||||
.map_bound(|(pred, _)| *pred)
|
||||
.subst(cx.tcx, &proj.projection_ty.substs)
|
||||
.fold_with(proj_replacer);
|
||||
let assoc_pred = assoc_pred.fold_with(proj_replacer);
|
||||
let Ok(assoc_pred) = traits::fully_normalize(infcx, traits::ObligationCause::dummy(), cx.param_env, assoc_pred) else {
|
||||
continue;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue