Fix tests on traits.

This commit is contained in:
Camille GILLOT 2021-05-15 14:38:32 +02:00
parent da093d713a
commit 175345b864
3 changed files with 107 additions and 99 deletions

View File

@ -100,6 +100,12 @@ const LABELS_FN_IN_TRAIT: &[&[&str]] =
/// For generic cases like inline-assembly, modules, etc.
const LABELS_HIR_ONLY: &[&[&str]] = &[BASE_HIR];
/// Impl `DepNode`s.
const LABELS_TRAIT: &[&[&str]] = &[
BASE_HIR,
&[label_strs::associated_item_def_ids, label_strs::predicates_of, label_strs::generics_of],
];
/// Impl `DepNode`s.
const LABELS_IMPL: &[&[&str]] = &[BASE_HIR, BASE_IMPL];
@ -259,20 +265,7 @@ impl DirtyCleanVisitor<'tcx> {
HirItem::Union(..) => ("ItemUnion", LABELS_ADT),
// Represents a Trait Declaration
// FIXME(michaelwoerister): trait declaration is buggy because sometimes some of
// the depnodes don't exist (because they legitimately didn't need to be
// calculated)
//
// michaelwoerister and vitiral came up with a possible solution,
// to just do this before every query
// ```
// ::rustc_middle::ty::query::plumbing::force_from_dep_node(tcx, dep_node)
// ```
//
// However, this did not seem to work effectively and more bugs were hit.
// Nebie @vitiral gave up :)
//
//HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT),
HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT),
// An implementation, eg `impl<A> Trait for Foo { .. }`
HirItem::Impl { .. } => ("ItemKind::Impl", LABELS_IMPL),

View File

@ -48,7 +48,7 @@ trait TraitAddMethod {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub trait TraitAddMethod {
fn method();
@ -63,7 +63,7 @@ trait TraitChangeMethodName {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodName {
fn methodChanged();
@ -81,7 +81,7 @@ trait TraitAddReturnType {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddReturnType {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method() -> u32;
}
@ -98,7 +98,7 @@ trait TraitChangeReturnType {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeReturnType {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method() -> u64;
}
@ -115,7 +115,7 @@ trait TraitAddParameterToMethod {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddParameterToMethod {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(a: u32);
}
@ -138,7 +138,7 @@ trait TraitChangeMethodParameterName {
#[rustc_clean(cfg="cfail3")]
fn method(b: u32);
#[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn with_default(y: i32) {}
}
@ -155,7 +155,7 @@ trait TraitChangeMethodParameterType {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodParameterType {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(a: i64);
}
@ -172,7 +172,7 @@ trait TraitChangeMethodParameterTypeRef {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodParameterTypeRef {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(a: &mut i32);
}
@ -189,7 +189,7 @@ trait TraitChangeMethodParametersOrder {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodParametersOrder {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(b: i64, a: i32);
}
@ -206,7 +206,7 @@ trait TraitAddMethodAutoImplementation {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddMethodAutoImplementation {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method() { }
}
@ -221,7 +221,7 @@ trait TraitChangeOrderOfMethods {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeOrderOfMethods {
fn method1();
@ -240,7 +240,7 @@ trait TraitChangeModeSelfRefToMut {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeModeSelfRefToMut {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(&mut self);
}
@ -256,7 +256,7 @@ trait TraitChangeModeSelfOwnToMut: Sized {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeModeSelfOwnToMut: Sized {
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(mut self) {}
}
@ -272,7 +272,7 @@ trait TraitChangeModeSelfOwnToRef {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeModeSelfOwnToRef {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(&self);
}
@ -289,7 +289,7 @@ trait TraitAddUnsafeModifier {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddUnsafeModifier {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
unsafe fn method();
}
@ -306,7 +306,7 @@ trait TraitAddExternModifier {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddExternModifier {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
extern "C" fn method();
}
@ -323,7 +323,7 @@ trait TraitChangeExternCToRustIntrinsic {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeExternCToRustIntrinsic {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
extern "stdcall" fn method();
}
@ -340,7 +340,7 @@ trait TraitAddTypeParameterToMethod {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddTypeParameterToMethod {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,generics_of,predicates_of,type_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<T>();
}
@ -357,7 +357,7 @@ trait TraitAddLifetimeParameterToMethod {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeParameterToMethod {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<'a>();
}
@ -378,7 +378,7 @@ trait TraitAddTraitBoundToMethodTypeParameter {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddTraitBoundToMethodTypeParameter {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<T: ReferencedTrait0>();
}
@ -395,7 +395,7 @@ trait TraitAddBuiltinBoundToMethodTypeParameter {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundToMethodTypeParameter {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<T: Sized>();
}
@ -412,7 +412,10 @@ trait TraitAddLifetimeBoundToMethodLifetimeParameter {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToMethodLifetimeParameter {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(
except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method<'a, 'b: 'a>(a: &'a u32, b: &'b u32);
}
@ -429,7 +432,7 @@ trait TraitAddSecondTraitBoundToMethodTypeParameter {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTraitBoundToMethodTypeParameter {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<T: ReferencedTrait0 + ReferencedTrait1>();
}
@ -446,7 +449,7 @@ trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<T: Sized + Sync>();
}
@ -463,7 +466,10 @@ trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(
except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method<'a, 'b, 'c: 'a + 'b>(a: &'a u32, b: &'b u32, c: &'c u32);
}
@ -480,7 +486,7 @@ trait TraitAddAssociatedType {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddAssociatedType {
type Associated;
@ -547,7 +553,7 @@ trait TraitAddDefaultToAssociatedType {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddDefaultToAssociatedType {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
type Associated = ReferenceType0;
@ -563,7 +569,7 @@ trait TraitAddAssociatedConstant {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddAssociatedConstant {
const Value: u32;
@ -585,7 +591,7 @@ trait TraitAddInitializerToAssociatedConstant {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddInitializerToAssociatedConstant {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
const Value: u32 = 1;
@ -608,7 +614,7 @@ trait TraitChangeTypeOfAssociatedConstant {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeTypeOfAssociatedConstant {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,type_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
const Value: f64;
@ -624,7 +630,7 @@ trait TraitChangeTypeOfAssociatedConstant {
trait TraitAddSuperTrait { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSuperTrait : ReferencedTrait0 { }
@ -635,7 +641,7 @@ trait TraitAddSuperTrait : ReferencedTrait0 { }
trait TraitAddBuiltiBound { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltiBound : Send { }
@ -646,7 +652,7 @@ trait TraitAddBuiltiBound : Send { }
trait TraitAddStaticLifetimeBound { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddStaticLifetimeBound : 'static { }
@ -657,7 +663,7 @@ trait TraitAddStaticLifetimeBound : 'static { }
trait TraitAddTraitAsSecondBound : ReferencedTrait0 { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddTraitAsSecondBound : ReferencedTrait0 + ReferencedTrait1 { }
@ -665,7 +671,7 @@ trait TraitAddTraitAsSecondBound : ReferencedTrait0 + ReferencedTrait1 { }
trait TraitAddTraitAsSecondBoundFromBuiltin : Send { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { }
@ -676,7 +682,7 @@ trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { }
trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 + Send { }
@ -684,7 +690,7 @@ trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 + Send { }
trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin : Send { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { }
@ -695,7 +701,7 @@ trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { }
trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 + 'static { }
@ -703,7 +709,7 @@ trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 + 'static { }
trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { }
@ -714,7 +720,7 @@ trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { }
trait TraitAddTypeParameterToTrait { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddTypeParameterToTrait<T> { }
@ -725,7 +731,7 @@ trait TraitAddTypeParameterToTrait<T> { }
trait TraitAddLifetimeParameterToTrait { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeParameterToTrait<'a> { }
@ -736,7 +742,7 @@ trait TraitAddLifetimeParameterToTrait<'a> { }
trait TraitAddTraitBoundToTypeParameterOfTrait<T> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
@ -747,7 +753,7 @@ trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { }
@ -758,7 +764,7 @@ trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { }
trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a, 'b> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { }
@ -769,7 +775,7 @@ trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { }
trait TraitAddBuiltinBoundToTypeParameterOfTrait<T> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { }
@ -780,7 +786,7 @@ trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { }
trait TraitAddSecondTypeParameterToTrait<T> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTypeParameterToTrait<T, S> { }
@ -791,7 +797,7 @@ trait TraitAddSecondTypeParameterToTrait<T, S> { }
trait TraitAddSecondLifetimeParameterToTrait<'a> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { }
@ -802,7 +808,7 @@ trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { }
trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + ReferencedTrait1> { }
@ -813,7 +819,7 @@ trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + Refer
trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { }
@ -824,7 +830,7 @@ trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { }
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b, 'c> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c> { }
@ -835,7 +841,7 @@ trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c>
trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send + Sync> { }
@ -851,7 +857,7 @@ struct ReferenceType1 {}
trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
@ -862,7 +868,7 @@ trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0
trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { }
@ -873,7 +879,7 @@ trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { }
trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b { }
@ -884,7 +890,7 @@ trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b
trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
@ -895,7 +901,7 @@ trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T>
where T: ReferencedTrait0 + ReferencedTrait1 { }
@ -907,7 +913,7 @@ trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T>
trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a + 'b { }
@ -918,7 +924,7 @@ trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T:
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b + 'c { }
@ -929,7 +935,7 @@ trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> whe
trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send + Sync { }
@ -944,7 +950,7 @@ mod change_return_type_of_method_indirectly_use {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeReturnType {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method() -> ReturnType;
}
@ -962,7 +968,7 @@ mod change_method_parameter_type_indirectly_by_use {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeArgType {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method(a: ArgType);
}
@ -980,7 +986,7 @@ mod change_method_parameter_type_bound_indirectly_by_use {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeBoundOfMethodTypeParameter {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<T: Bound>(a: T);
}
@ -999,7 +1005,7 @@ mod change_method_parameter_type_bound_indirectly_by_use_where {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeBoundOfMethodTypeParameterWhere {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method<T>(a: T) where T: Bound;
}
@ -1014,7 +1020,7 @@ mod change_method_type_parameter_bound_indirectly {
#[cfg(not(cfail1))]
use super::ReferencedTrait1 as Bound;
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeTraitBound<T: Bound> {
fn method(a: T);
@ -1031,7 +1037,7 @@ mod change_method_type_parameter_bound_indirectly_where {
#[cfg(not(cfail1))]
use super::ReferencedTrait1 as Bound;
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
trait TraitChangeTraitBoundWhere<T> where T: Bound {
fn method(a: T);

View File

@ -30,7 +30,7 @@ impl ChangeMethodNameTrait for Foo {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub trait ChangeMethodNameTrait {
#[rustc_clean(cfg="cfail3")]
@ -38,7 +38,7 @@ pub trait ChangeMethodNameTrait {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeMethodNameTrait for Foo {
#[rustc_clean(cfg="cfail3")]
@ -62,7 +62,7 @@ impl ChangeMethodBodyTrait for Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeMethodBodyTrait for Foo {
#[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(except="hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method_name() {
()
@ -87,7 +87,7 @@ impl ChangeMethodBodyTraitInlined for Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeMethodBodyTraitInlined for Foo {
#[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(except="hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
#[inline]
fn method_name() {
@ -116,7 +116,10 @@ pub trait ChangeMethodSelfnessTrait {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeMethodSelfnessTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(
except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method_name(&self) {
()
@ -144,7 +147,10 @@ pub trait RemoveMethodSelfnessTrait {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl RemoveMethodSelfnessTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(
except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method_name() {}
}
@ -170,7 +176,7 @@ pub trait ChangeMethodSelfmutnessTrait {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeMethodSelfmutnessTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method_name(&mut self) {}
}
@ -193,7 +199,7 @@ pub trait ChangeItemKindTrait {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeItemKindTrait for Foo {
type name = ();
@ -219,7 +225,7 @@ pub trait RemoveItemTrait {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl RemoveItemTrait for Foo {
type TypeName = ();
@ -244,7 +250,7 @@ pub trait AddItemTrait {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl AddItemTrait for Foo {
type TypeName = ();
@ -267,7 +273,7 @@ impl ChangeHasValueTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub trait ChangeHasValueTrait {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method_name() { }
}
@ -294,7 +300,7 @@ impl AddDefaultTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl AddDefaultTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
default fn method_name() { }
}
@ -320,7 +326,7 @@ pub trait AddArgumentTrait {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl AddArgumentTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method_name(&self, _x: u32) { }
}
@ -346,7 +352,7 @@ pub trait ChangeArgumentTypeTrait {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeArgumentTypeTrait for Foo {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn method_name(&self, _x: char) { }
}
@ -366,10 +372,13 @@ impl AddTypeParameterToImpl<u32> for Bar<u32> {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,generics_of,impl_trait_ref", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl<T> AddTypeParameterToImpl<T> for Bar<T> {
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(
except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn id(t: T) -> T { t }
}
@ -387,10 +396,10 @@ impl ChangeSelfTypeOfImpl for u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,impl_trait_ref", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl ChangeSelfTypeOfImpl for u64 {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
fn id(self) -> Self { self }
}
@ -408,7 +417,7 @@ impl<T> AddLifetimeBoundToImplParameter for T {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl<T: 'static> AddLifetimeBoundToImplParameter for T {
#[rustc_clean(cfg="cfail2")]
@ -429,7 +438,7 @@ impl<T> AddTraitBoundToImplParameter for T {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl<T: Clone> AddTraitBoundToImplParameter for T {
#[rustc_clean(cfg="cfail2")]