Make hir::TyKind::TraitObject use tagged ptr
This commit is contained in:
parent
de12d28ce8
commit
5c4e9401dc
5 changed files with 5 additions and 5 deletions
|
|
@ -433,7 +433,7 @@ impl<'tcx> Visitor<'tcx> for RefVisitor<'_, 'tcx> {
|
|||
sub_visitor.visit_fn_decl(decl);
|
||||
self.nested_elision_site_lts.append(&mut sub_visitor.all_lts());
|
||||
},
|
||||
TyKind::TraitObject(bounds, lt, _) => {
|
||||
TyKind::TraitObject(bounds, lt) => {
|
||||
if !lt.is_elided() {
|
||||
self.unelided_trait_object_lifetime = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, lt: &Lifetime, m
|
|||
// Originally reported as the issue #3128.
|
||||
let inner_snippet = snippet(cx, inner.span, "..");
|
||||
let suggestion = match &inner.kind {
|
||||
TyKind::TraitObject(bounds, lt_bound, _) if bounds.len() > 1 || !lt_bound.is_elided() => {
|
||||
TyKind::TraitObject(bounds, lt_bound) if bounds.len() > 1 || !lt_bound.is_elided() => {
|
||||
format!("&{ltopt}({inner_snippet})")
|
||||
},
|
||||
TyKind::Path(qpath)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ impl<'tcx> Visitor<'tcx> for TypeComplexityVisitor {
|
|||
// function types bring a lot of overhead
|
||||
TyKind::BareFn(bare) if bare.abi == Abi::Rust => (50 * self.nest, 1),
|
||||
|
||||
TyKind::TraitObject(param_bounds, _, _) => {
|
||||
TyKind::TraitObject(param_bounds, _) => {
|
||||
let has_lifetime_parameters = param_bounds.iter().any(|bound| {
|
||||
bound
|
||||
.bound_generic_params
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue