Skip to content

Commit

Permalink
Copy pasted from somewhere let's see it it fixes the vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
VulnBandit committed Oct 4, 2024
1 parent ea22586 commit 4481349
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
// Check if the impl trait that we are considering is an impl of a local trait.
self.maybe_suggest_blanket_trait_impl(self_ty, &mut diag);
self.maybe_suggest_assoc_ty_bound(self_ty, &mut diag);
if let Some(mut sugg) =
self.tcx.dcx().steal_diagnostic(self_ty.span, StashKey::AssociatedTypeSuggestion)
&& let Ok(ref mut s1) = err.suggestions
&& let Ok(ref mut s2) = sugg.suggestions
{
s1.append(s2);
sugg.cancel();
}
diag.stash(self_ty.span, StashKey::TraitMissingMethod)
} else {
tcx.node_span_lint(BARE_TRAIT_OBJECTS, self_ty.hir_id, self_ty.span, |lint| {
Expand Down

0 comments on commit 4481349

Please sign in to comment.