Add load_cached query modifier and keep dep node names consistent with query names
This commit is contained in:
parent
7d90547532
commit
9e9d03fd66
17 changed files with 315 additions and 308 deletions
|
@ -492,8 +492,6 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
|
|||
// table in the tcx (or elsewhere) maps to one of these
|
||||
// nodes.
|
||||
[] AssociatedItems(DefId),
|
||||
[] GenericsOfItem(DefId),
|
||||
[] PredicatesOfItem(DefId),
|
||||
[] ExplicitPredicatesOfItem(DefId),
|
||||
[] PredicatesDefinedOnItem(DefId),
|
||||
[] InferredOutlivesOf(DefId),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use crate::ty::query::QueryDescription;
|
||||
use crate::ty::query::queries;
|
||||
use crate::ty::TyCtxt;
|
||||
use crate::ty;
|
||||
use crate::hir::def_id::CrateNum;
|
||||
use crate::dep_graph::SerializedDepNodeIndex;
|
||||
use std::borrow::Cow;
|
||||
|
@ -23,6 +24,34 @@ rustc_queries! {
|
|||
cache { key.is_local() }
|
||||
}
|
||||
|
||||
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to its
|
||||
/// associated generics.
|
||||
query generics_of(key: DefId) -> &'tcx ty::Generics {
|
||||
cache { key.is_local() }
|
||||
load_cached(tcx, id) {
|
||||
let generics: Option<ty::Generics> = tcx.queries.on_disk_cache
|
||||
.try_load_query_result(tcx, id);
|
||||
generics.map(|x| tcx.alloc_generics(x))
|
||||
}
|
||||
}
|
||||
|
||||
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to the
|
||||
/// predicates (where-clauses) that must be proven true in order
|
||||
/// to reference it. This is almost always the "predicates query"
|
||||
/// that you want.
|
||||
///
|
||||
/// `predicates_of` builds on `predicates_defined_on` -- in fact,
|
||||
/// it is almost always the same as that query, except for the
|
||||
/// case of traits. For traits, `predicates_of` contains
|
||||
/// an additional `Self: Trait<...>` predicate that users don't
|
||||
/// actually write. This reflects the fact that to invoke the
|
||||
/// trait (e.g., via `Default::default`) you must supply types
|
||||
/// that actually implement the trait. (However, this extra
|
||||
/// predicate gets in the way of some checks, which are intended
|
||||
/// to operate over only the actual where-clauses written by the
|
||||
/// user.)
|
||||
query predicates_of(_: DefId) -> Lrc<ty::GenericPredicates<'tcx>> {}
|
||||
|
||||
query native_libraries(_: CrateNum) -> Lrc<Vec<NativeLibrary>> {
|
||||
desc { "looking up the native libraries of a linked crate" }
|
||||
}
|
||||
|
|
|
@ -937,21 +937,6 @@ impl<'tcx> QueryDescription<'tcx> for queries::instance_def_size_estimate<'tcx>
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx> QueryDescription<'tcx> for queries::generics_of<'tcx> {
|
||||
#[inline]
|
||||
fn cache_on_disk(_: TyCtxt<'_, 'tcx, 'tcx>, def_id: Self::Key) -> bool {
|
||||
def_id.is_local()
|
||||
}
|
||||
|
||||
fn try_load_from_disk<'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
id: SerializedDepNodeIndex)
|
||||
-> Option<Self::Value> {
|
||||
let generics: Option<ty::Generics> = tcx.queries.on_disk_cache
|
||||
.try_load_query_result(tcx, id);
|
||||
generics.map(|x| tcx.alloc_generics(x))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> QueryDescription<'tcx> for queries::program_clauses_for<'tcx> {
|
||||
fn describe(_tcx: TyCtxt<'_, '_, '_>, _: DefId) -> Cow<'static, str> {
|
||||
"generating chalk-style clauses".into()
|
||||
|
|
|
@ -104,27 +104,6 @@ rustc_query_append! { [define_queries!][ <'tcx>
|
|||
/// Run analysis passes on the crate
|
||||
[] fn analysis: Analysis(CrateNum) -> Result<(), ErrorReported>,
|
||||
|
||||
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to its
|
||||
/// associated generics.
|
||||
[] fn generics_of: GenericsOfItem(DefId) -> &'tcx ty::Generics,
|
||||
|
||||
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to the
|
||||
/// predicates (where-clauses) that must be proven true in order
|
||||
/// to reference it. This is almost always the "predicates query"
|
||||
/// that you want.
|
||||
///
|
||||
/// `predicates_of` builds on `predicates_defined_on` -- in fact,
|
||||
/// it is almost always the same as that query, except for the
|
||||
/// case of traits. For traits, `predicates_of` contains
|
||||
/// an additional `Self: Trait<...>` predicate that users don't
|
||||
/// actually write. This reflects the fact that to invoke the
|
||||
/// trait (e.g., via `Default::default`) you must supply types
|
||||
/// that actually implement the trait. (However, this extra
|
||||
/// predicate gets in the way of some checks, which are intended
|
||||
/// to operate over only the actual where-clauses written by the
|
||||
/// user.)
|
||||
[] fn predicates_of: PredicatesOfItem(DefId) -> Lrc<ty::GenericPredicates<'tcx>>,
|
||||
|
||||
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to the
|
||||
/// predicates (where-clauses) directly defined on it. This is
|
||||
/// equal to the `explicit_predicates_of` predicates plus the
|
||||
|
|
|
@ -1285,8 +1285,6 @@ pub fn force_from_dep_node<'tcx>(
|
|||
DepKind::MirKeys => { force!(mir_keys, LOCAL_CRATE); }
|
||||
DepKind::CrateVariances => { force!(crate_variances, LOCAL_CRATE); }
|
||||
DepKind::AssociatedItems => { force!(associated_item, def_id!()); }
|
||||
DepKind::GenericsOfItem => { force!(generics_of, def_id!()); }
|
||||
DepKind::PredicatesOfItem => { force!(predicates_of, def_id!()); }
|
||||
DepKind::PredicatesDefinedOnItem => { force!(predicates_defined_on, def_id!()); }
|
||||
DepKind::ExplicitPredicatesOfItem => { force!(explicit_predicates_of, def_id!()); }
|
||||
DepKind::InferredOutlivesOf => { force!(inferred_outlives_of, def_id!()); }
|
||||
|
@ -1501,9 +1499,9 @@ impl_load_from_cache!(
|
|||
SymbolName => def_symbol_name,
|
||||
ConstIsRvaluePromotableToStatic => const_is_rvalue_promotable_to_static,
|
||||
CheckMatch => check_match,
|
||||
TypeOf => type_of,
|
||||
GenericsOfItem => generics_of,
|
||||
PredicatesOfItem => predicates_of,
|
||||
type_of => type_of,
|
||||
generics_of => generics_of,
|
||||
predicates_of => predicates_of,
|
||||
UsedTraitImports => used_trait_imports,
|
||||
CodegenFnAttrs => codegen_fn_attrs,
|
||||
SpecializationGraph => specialization_graph_of,
|
||||
|
|
|
@ -36,16 +36,16 @@ const CFG: &str = "cfg";
|
|||
|
||||
/// For typedef, constants, and statics
|
||||
const BASE_CONST: &[&str] = &[
|
||||
label_strs::TypeOf,
|
||||
label_strs::type_of,
|
||||
];
|
||||
|
||||
/// DepNodes for functions + methods
|
||||
const BASE_FN: &[&str] = &[
|
||||
// Callers will depend on the signature of these items, so we better test
|
||||
label_strs::FnSignature,
|
||||
label_strs::GenericsOfItem,
|
||||
label_strs::PredicatesOfItem,
|
||||
label_strs::TypeOf,
|
||||
label_strs::generics_of,
|
||||
label_strs::predicates_of,
|
||||
label_strs::type_of,
|
||||
|
||||
// And a big part of compilation (that we eventually want to cache) is type inference
|
||||
// information:
|
||||
|
@ -62,7 +62,7 @@ const BASE_HIR: &[&str] = &[
|
|||
/// `impl` implementation of struct/trait
|
||||
const BASE_IMPL: &[&str] = &[
|
||||
label_strs::AssociatedItemDefIds,
|
||||
label_strs::GenericsOfItem,
|
||||
label_strs::generics_of,
|
||||
label_strs::ImplTraitRef,
|
||||
];
|
||||
|
||||
|
@ -78,17 +78,17 @@ const BASE_MIR: &[&str] = &[
|
|||
/// Note that changing the type of a field does not change the type of the struct or enum, but
|
||||
/// adding/removing fields or changing a fields name or visibility does.
|
||||
const BASE_STRUCT: &[&str] = &[
|
||||
label_strs::GenericsOfItem,
|
||||
label_strs::PredicatesOfItem,
|
||||
label_strs::TypeOf,
|
||||
label_strs::generics_of,
|
||||
label_strs::predicates_of,
|
||||
label_strs::type_of,
|
||||
];
|
||||
|
||||
/// Trait definition `DepNode`s.
|
||||
const BASE_TRAIT_DEF: &[&str] = &[
|
||||
label_strs::AssociatedItemDefIds,
|
||||
label_strs::GenericsOfItem,
|
||||
label_strs::generics_of,
|
||||
label_strs::ObjectSafety,
|
||||
label_strs::PredicatesOfItem,
|
||||
label_strs::predicates_of,
|
||||
label_strs::SpecializationGraph,
|
||||
label_strs::TraitDefOfItem,
|
||||
label_strs::TraitImpls,
|
||||
|
@ -179,7 +179,7 @@ const LABELS_TRAIT: &[&[&str]] = &[
|
|||
// Fields are kind of separate from their containers, as they can change independently from
|
||||
// them. We should at least check
|
||||
//
|
||||
// TypeOf for these.
|
||||
// type_of for these.
|
||||
|
||||
type Labels = FxHashSet<String>;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use proc_macro::TokenStream;
|
||||
use proc_macro2::Span;
|
||||
use syn::{
|
||||
Token, Ident, Type, Attribute, ReturnType, Expr,
|
||||
Token, Ident, Type, Attribute, ReturnType, Expr, Block,
|
||||
braced, parenthesized, parse_macro_input,
|
||||
};
|
||||
use syn::parse::{Result, Parse, ParseStream};
|
||||
|
@ -25,6 +25,7 @@ impl Parse for IdentOrWild {
|
|||
enum QueryAttribute {
|
||||
Desc(Option<Ident>, Punctuated<Expr, Token![,]>),
|
||||
Cache(Option<Ident>, Expr),
|
||||
LoadCached(Ident, Ident, Block),
|
||||
FatalCycle,
|
||||
}
|
||||
|
||||
|
@ -63,6 +64,17 @@ impl Parse for QueryAttribute {
|
|||
panic!("unexpected tokens in block");
|
||||
};
|
||||
Ok(QueryAttribute::Cache(tcx, expr))
|
||||
} else if attr == "load_cached" {
|
||||
let args;
|
||||
parenthesized!(args in input);
|
||||
let tcx = args.parse()?;
|
||||
args.parse::<Token![,]>()?;
|
||||
let id = args.parse()?;
|
||||
if !args.is_empty() {
|
||||
panic!("unexpected tokens in arguments");
|
||||
};
|
||||
let block = input.parse()?;
|
||||
Ok(QueryAttribute::LoadCached(tcx, id, block))
|
||||
} else if attr == "fatal_cycle" {
|
||||
Ok(QueryAttribute::FatalCycle)
|
||||
} else {
|
||||
|
@ -153,22 +165,6 @@ impl Parse for Group {
|
|||
}
|
||||
}
|
||||
|
||||
fn camel_case(string: &str) -> String {
|
||||
let mut pos = vec![0];
|
||||
for (i, c) in string.chars().enumerate() {
|
||||
if c == '_' {
|
||||
pos.push(i + 1);
|
||||
}
|
||||
}
|
||||
string.chars().enumerate().filter(|c| c.1 != '_').flat_map(|(i, c)| {
|
||||
if pos.contains(&i) {
|
||||
c.to_uppercase().collect::<Vec<char>>()
|
||||
} else {
|
||||
vec![c]
|
||||
}
|
||||
}).collect()
|
||||
}
|
||||
|
||||
pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
||||
let groups = parse_macro_input!(input as List<Group>);
|
||||
|
||||
|
@ -181,9 +177,6 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
|||
let mut group_stream = quote! {};
|
||||
for query in &group.queries.0 {
|
||||
let name = &query.name;
|
||||
let dep_node_name = Ident::new(
|
||||
&camel_case(&name.to_string()),
|
||||
name.span());
|
||||
let arg = &query.arg;
|
||||
let key = &query.key.0;
|
||||
let result_full = &query.result;
|
||||
|
@ -192,11 +185,38 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
|||
_ => quote! { #result_full },
|
||||
};
|
||||
|
||||
let load_cached = query.attrs.0.iter().find_map(|attr| match attr {
|
||||
QueryAttribute::LoadCached(tcx, id, block) => Some((tcx, id, block)),
|
||||
_ => None,
|
||||
});
|
||||
|
||||
// Find out if we should cache the query on disk
|
||||
let cache = query.attrs.0.iter().find_map(|attr| match attr {
|
||||
QueryAttribute::Cache(tcx, expr) => Some((tcx, expr)),
|
||||
_ => None,
|
||||
}).map(|(tcx, expr)| {
|
||||
let try_load_from_disk = if let Some((tcx, id, block)) = load_cached {
|
||||
quote! {
|
||||
#[inline]
|
||||
fn try_load_from_disk(
|
||||
#tcx: TyCtxt<'_, 'tcx, 'tcx>,
|
||||
#id: SerializedDepNodeIndex
|
||||
) -> Option<Self::Value> {
|
||||
#block
|
||||
}
|
||||
}
|
||||
} else {
|
||||
quote! {
|
||||
#[inline]
|
||||
fn try_load_from_disk(
|
||||
tcx: TyCtxt<'_, 'tcx, 'tcx>,
|
||||
id: SerializedDepNodeIndex
|
||||
) -> Option<Self::Value> {
|
||||
tcx.queries.on_disk_cache.try_load_query_result(tcx, id)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let tcx = tcx.as_ref().map(|t| quote! { #t }).unwrap_or(quote! { _ });
|
||||
quote! {
|
||||
#[inline]
|
||||
|
@ -204,23 +224,21 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
|||
#expr
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn try_load_from_disk(
|
||||
tcx: TyCtxt<'_, 'tcx, 'tcx>,
|
||||
id: SerializedDepNodeIndex
|
||||
) -> Option<Self::Value> {
|
||||
tcx.queries.on_disk_cache.try_load_query_result(tcx, id)
|
||||
}
|
||||
#try_load_from_disk
|
||||
}
|
||||
});
|
||||
|
||||
if cache.is_none() && load_cached.is_some() {
|
||||
panic!("load_cached modifier on query `{}` without a cache modifier", name);
|
||||
}
|
||||
|
||||
let fatal_cycle = query.attrs.0.iter().find_map(|attr| match attr {
|
||||
QueryAttribute::FatalCycle => Some(()),
|
||||
_ => None,
|
||||
}).map(|_| quote! { fatal_cycle }).unwrap_or(quote! {});
|
||||
|
||||
group_stream.extend(quote! {
|
||||
[#fatal_cycle] fn #name: #dep_node_name(#arg) #result,
|
||||
[#fatal_cycle] fn #name: #name(#arg) #result,
|
||||
});
|
||||
|
||||
let desc = query.attrs.0.iter().find_map(|attr| match attr {
|
||||
|
@ -251,10 +269,10 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
|||
}
|
||||
|
||||
dep_node_def_stream.extend(quote! {
|
||||
[] #dep_node_name(#arg),
|
||||
[] #name(#arg),
|
||||
});
|
||||
dep_node_force_stream.extend(quote! {
|
||||
DepKind::#dep_node_name => {
|
||||
DepKind::#name => {
|
||||
if let Some(key) = RecoverKey::recover($tcx, $dep_node) {
|
||||
force_ex!($tcx, #name, key);
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,7 @@ pub const CONST_VISIBILITY: u8 = 0;
|
|||
const CONST_CHANGE_TYPE_1: i32 = 0;
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
const CONST_CHANGE_TYPE_1: u32 = 0;
|
||||
|
||||
|
@ -39,7 +39,7 @@ const CONST_CHANGE_TYPE_1: u32 = 0;
|
|||
const CONST_CHANGE_TYPE_2: Option<u32> = None;
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
const CONST_CHANGE_TYPE_2: Option<u64> = None;
|
||||
|
||||
|
@ -99,11 +99,11 @@ mod const_change_type_indirectly {
|
|||
#[cfg(not(cfail1))]
|
||||
use super::ReferencedType2 as Type;
|
||||
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
const CONST_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
|
||||
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
const CONST_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ enum EnumChangeNameCStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumChangeNameCStyleVariant {
|
||||
Variant1,
|
||||
|
@ -59,7 +59,7 @@ enum EnumChangeNameTupleStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumChangeNameTupleStyleVariant {
|
||||
Variant1,
|
||||
|
@ -76,7 +76,7 @@ enum EnumChangeNameStructStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumChangeNameStructStyleVariant {
|
||||
Variant1,
|
||||
|
@ -109,7 +109,7 @@ enum EnumChangeValueCStyleVariant1 {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumChangeValueCStyleVariant1 {
|
||||
Variant1,
|
||||
|
@ -125,7 +125,7 @@ enum EnumAddCStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddCStyleVariant {
|
||||
Variant1,
|
||||
|
@ -142,7 +142,7 @@ enum EnumRemoveCStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumRemoveCStyleVariant {
|
||||
Variant1,
|
||||
|
@ -157,7 +157,7 @@ enum EnumAddTupleStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddTupleStyleVariant {
|
||||
Variant1,
|
||||
|
@ -174,7 +174,7 @@ enum EnumRemoveTupleStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumRemoveTupleStyleVariant {
|
||||
Variant1,
|
||||
|
@ -189,7 +189,7 @@ enum EnumAddStructStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddStructStyleVariant {
|
||||
Variant1,
|
||||
|
@ -206,7 +206,7 @@ enum EnumRemoveStructStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumRemoveStructStyleVariant {
|
||||
Variant1,
|
||||
|
@ -257,7 +257,7 @@ enum EnumChangeFieldNameStructStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumChangeFieldNameStructStyleVariant {
|
||||
Variant1 { a: u32, c: u32 },
|
||||
|
@ -289,7 +289,7 @@ enum EnumChangeFieldOrderStructStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumChangeFieldOrderStructStyleVariant {
|
||||
Variant1 { b: f32, a: u32 },
|
||||
|
@ -304,7 +304,7 @@ enum EnumAddFieldTupleStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddFieldTupleStyleVariant {
|
||||
Variant1(u32, u32, u32),
|
||||
|
@ -319,7 +319,7 @@ enum EnumAddFieldStructStyleVariant {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddFieldStructStyleVariant {
|
||||
Variant1 { a: u32, b: u32, c: u32 },
|
||||
|
@ -353,7 +353,7 @@ enum EnumAddReprC {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[repr(C)]
|
||||
enum EnumAddReprC {
|
||||
|
@ -402,7 +402,7 @@ enum EnumChangeNameOfLifetimeParameter<'a> {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(cfg="cfail2", except="PredicatesOfItem")]
|
||||
#[rustc_dirty(cfg="cfail2", except="predicates_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumChangeNameOfLifetimeParameter<'b> {
|
||||
Variant1(&'b u32),
|
||||
|
@ -418,7 +418,7 @@ enum EnumAddLifetimeParameter<'a> {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(cfg="cfail2", except="PredicatesOfItem")]
|
||||
#[rustc_dirty(cfg="cfail2", except="predicates_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddLifetimeParameter<'a, 'b> {
|
||||
Variant1(&'a u32),
|
||||
|
@ -435,7 +435,7 @@ enum EnumAddLifetimeParameterBound<'a, 'b> {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(cfg="cfail2", except="GenericsOfItem,TypeOf")]
|
||||
#[rustc_dirty(cfg="cfail2", except="generics_of,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddLifetimeParameterBound<'a, 'b: 'a> {
|
||||
Variant1(&'a u32),
|
||||
|
@ -450,7 +450,7 @@ enum EnumAddLifetimeBoundToParameter<'a, T> {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(cfg="cfail2", except="TypeOf")]
|
||||
#[rustc_dirty(cfg="cfail2", except="type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
|
||||
Variant1(T),
|
||||
|
@ -482,7 +482,7 @@ enum EnumAddLifetimeParameterBoundWhere<'a, 'b> {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(cfg="cfail2", except="GenericsOfItem,TypeOf")]
|
||||
#[rustc_dirty(cfg="cfail2", except="generics_of,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
|
||||
Variant1(&'a u32),
|
||||
|
@ -499,7 +499,7 @@ enum EnumAddLifetimeBoundToParameterWhere<'a, T> {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(cfg="cfail2", except="TypeOf")]
|
||||
#[rustc_dirty(cfg="cfail2", except="type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
|
||||
Variant1(T),
|
||||
|
@ -618,7 +618,7 @@ mod change_trait_bound_indirectly {
|
|||
#[cfg(not(cfail1))]
|
||||
use super::ReferencedTrait2 as Trait;
|
||||
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,PredicatesOfItem")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,predicates_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum Enum<T: Trait> {
|
||||
Variant1(T)
|
||||
|
@ -634,7 +634,7 @@ mod change_trait_bound_indirectly_where {
|
|||
#[cfg(not(cfail1))]
|
||||
use super::ReferencedTrait2 as Trait;
|
||||
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,PredicatesOfItem")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,predicates_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
enum Enum<T> where T: Trait {
|
||||
Variant1(T)
|
||||
|
|
|
@ -117,7 +117,7 @@ pub fn type_parameter() {}
|
|||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2",
|
||||
except = "Hir, HirBody, GenericsOfItem, TypeOf, PredicatesOfItem")]
|
||||
except = "Hir, HirBody, generics_of, type_of, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn type_parameter<T>() {}
|
||||
|
||||
|
@ -128,7 +128,7 @@ pub fn type_parameter<T>() {}
|
|||
pub fn lifetime_parameter() {}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, GenericsOfItem")]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, generics_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn lifetime_parameter<'a>() {}
|
||||
|
||||
|
@ -139,7 +139,7 @@ pub fn lifetime_parameter<'a>() {}
|
|||
pub fn trait_bound<T>() {}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn trait_bound<T: Eq>() {}
|
||||
|
||||
|
@ -150,7 +150,7 @@ pub fn trait_bound<T: Eq>() {}
|
|||
pub fn builtin_bound<T>() {}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn builtin_bound<T: Send>() {}
|
||||
|
||||
|
@ -162,7 +162,7 @@ pub fn lifetime_bound<'a, T>() {}
|
|||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2",
|
||||
except = "Hir, HirBody, GenericsOfItem, TypeOf, PredicatesOfItem")]
|
||||
except = "Hir, HirBody, generics_of, type_of, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn lifetime_bound<'a, T: 'a>() {}
|
||||
|
||||
|
@ -173,7 +173,7 @@ pub fn lifetime_bound<'a, T: 'a>() {}
|
|||
pub fn second_trait_bound<T: Eq>() {}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn second_trait_bound<T: Eq + Clone>() {}
|
||||
|
||||
|
@ -184,7 +184,7 @@ pub fn second_trait_bound<T: Eq + Clone>() {}
|
|||
pub fn second_builtin_bound<T: Send>() {}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn second_builtin_bound<T: Send + Sized>() {}
|
||||
|
||||
|
@ -196,7 +196,7 @@ pub fn second_lifetime_bound<'a, 'b, T: 'a>() {}
|
|||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg = "cfail2",
|
||||
except = "Hir, HirBody, GenericsOfItem, TypeOf, PredicatesOfItem")]
|
||||
except = "Hir, HirBody, generics_of, type_of, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {}
|
||||
|
||||
|
@ -326,7 +326,7 @@ pub mod change_trait_bound_indirectly {
|
|||
#[cfg(not(cfail1))]
|
||||
use super::ReferencedTrait2 as Trait;
|
||||
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn indirect_trait_bound<T: Trait>(p: T) {}
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ pub mod change_trait_bound_indirectly_in_where_clause {
|
|||
#[cfg(not(cfail1))]
|
||||
use super::ReferencedTrait2 as Trait;
|
||||
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||
#[rustc_clean(cfg = "cfail3")]
|
||||
pub fn indirect_trait_bound_where<T>(p: T)
|
||||
where
|
||||
|
|
|
@ -97,7 +97,7 @@ impl Foo {
|
|||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
impl Foo {
|
||||
#[rustc_dirty(cfg="cfail2", except="TypeOf,PredicatesOfItem")]
|
||||
#[rustc_dirty(cfg="cfail2", except="type_of,predicates_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
pub fn method_selfness(&self) { }
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ impl Foo {
|
|||
// appear dirty, that might be the cause. -nmatsakis
|
||||
#[rustc_clean(
|
||||
cfg="cfail2",
|
||||
except="Hir,HirBody,GenericsOfItem,PredicatesOfItem,TypeOf",
|
||||
except="Hir,HirBody,generics_of,predicates_of,type_of",
|
||||
)]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
pub fn add_type_parameter_to_method<T>(&self) { }
|
||||
|
@ -354,7 +354,7 @@ impl Foo {
|
|||
impl Foo {
|
||||
#[rustc_clean(
|
||||
cfg="cfail2",
|
||||
except="Hir,HirBody,GenericsOfItem,PredicatesOfItem,TypeOf,TypeckTables"
|
||||
except="Hir,HirBody,generics_of,predicates_of,type_of,TypeckTables"
|
||||
)]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b: 'a>(&self) { }
|
||||
|
@ -381,8 +381,8 @@ impl Foo {
|
|||
// generics before the body, then the `HirId` for things in the
|
||||
// body will be affected. So if you start to see `TypeckTables`
|
||||
// appear dirty, that might be the cause. -nmatsakis
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,GenericsOfItem,PredicatesOfItem,\
|
||||
TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,generics_of,predicates_of,\
|
||||
type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
pub fn add_lifetime_bound_to_type_param_of_method<'a, T: 'a>(&self) { }
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ impl Foo {
|
|||
// generics before the body, then the `HirId` for things in the
|
||||
// body will be affected. So if you start to see `TypeckTables`
|
||||
// appear dirty, that might be the cause. -nmatsakis
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,PredicatesOfItem")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,predicates_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
pub fn add_trait_bound_to_type_param_of_method<T: Clone>(&self) { }
|
||||
}
|
||||
|
@ -442,12 +442,12 @@ impl Bar<u32> {
|
|||
}
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,GenericsOfItem")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,generics_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
impl<T> Bar<T> {
|
||||
#[rustc_clean(
|
||||
cfg="cfail2",
|
||||
except="GenericsOfItem,FnSignature,TypeckTables,TypeOf,MirOptimized,MirBuilt"
|
||||
except="generics_of,FnSignature,TypeckTables,type_of,MirOptimized,MirBuilt"
|
||||
)]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
pub fn add_type_parameter_to_impl(&self) { }
|
||||
|
|
|
@ -74,7 +74,7 @@ static STATIC_THREAD_LOCAL: u8 = 0;
|
|||
static STATIC_CHANGE_TYPE_1: i16 = 0;
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
static STATIC_CHANGE_TYPE_1: u64 = 0;
|
||||
|
||||
|
@ -84,7 +84,7 @@ static STATIC_CHANGE_TYPE_1: u64 = 0;
|
|||
static STATIC_CHANGE_TYPE_2: Option<i8> = None;
|
||||
|
||||
#[cfg(not(cfail1))]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
static STATIC_CHANGE_TYPE_2: Option<u16> = None;
|
||||
|
||||
|
@ -144,11 +144,11 @@ mod static_change_type_indirectly {
|
|||
#[cfg(not(cfail1))]
|
||||
use super::ReferencedType2 as Type;
|
||||
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
static STATIC_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
|
||||
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOf")]
|
||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
static STATIC_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
|
||||
}
|
||||
|
|
|
@ -26,14 +26,14 @@ pub struct LayoutPacked;
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
#[repr(packed)]
|
||||
pub struct LayoutPacked;
|
||||
|
||||
|
@ -43,14 +43,14 @@ struct LayoutC;
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
#[repr(C)]
|
||||
struct LayoutC;
|
||||
|
||||
|
@ -63,14 +63,14 @@ struct TupleStructFieldType(i32);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
// Note that changing the type of a field does not change the type of the struct or enum, but
|
||||
// adding/removing fields or changing a fields name or visibility does.
|
||||
struct TupleStructFieldType(
|
||||
|
@ -86,14 +86,14 @@ struct TupleStructAddField(i32);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct TupleStructAddField(
|
||||
i32,
|
||||
u32
|
||||
|
@ -108,14 +108,14 @@ struct TupleStructFieldVisibility(char);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct TupleStructFieldVisibility(pub char);
|
||||
|
||||
|
||||
|
@ -127,14 +127,14 @@ struct RecordStructFieldType { x: f32 }
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
// Note that changing the type of a field does not change the type of the struct or enum, but
|
||||
// adding/removing fields or changing a fields name or visibility does.
|
||||
struct RecordStructFieldType {
|
||||
|
@ -150,14 +150,14 @@ struct RecordStructFieldName { x: f32 }
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct RecordStructFieldName { y: f32 }
|
||||
|
||||
|
||||
|
@ -169,14 +169,14 @@ struct RecordStructAddField { x: f32 }
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct RecordStructAddField {
|
||||
x: f32,
|
||||
y: () }
|
||||
|
@ -190,14 +190,14 @@ struct RecordStructFieldVisibility { x: f32 }
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct RecordStructFieldVisibility {
|
||||
pub x: f32
|
||||
}
|
||||
|
@ -211,14 +211,14 @@ struct AddLifetimeParameter<'a>(&'a f32, &'a f64);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_dirty(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct AddLifetimeParameter<'a, 'b>(&'a f32, &'b f64);
|
||||
|
||||
|
||||
|
@ -230,14 +230,14 @@ struct AddLifetimeParameterBound<'a, 'b>(&'a f32, &'b f64);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct AddLifetimeParameterBound<'a, 'b: 'a>(
|
||||
&'a f32,
|
||||
&'b f64
|
||||
|
@ -249,14 +249,14 @@ struct AddLifetimeParameterBoundWhereClause<'a, 'b>(&'a f32, &'b f64);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
|
||||
&'a f32,
|
||||
&'b f64)
|
||||
|
@ -271,14 +271,14 @@ struct AddTypeParameter<T1>(T1, T1);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_dirty(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_dirty(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct AddTypeParameter<T1, T2>(
|
||||
// The field contains the parent's Generics, so it's dirty even though its
|
||||
// type hasn't changed.
|
||||
|
@ -295,14 +295,14 @@ struct AddTypeParameterBound<T>(T);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct AddTypeParameterBound<T: Send>(
|
||||
T
|
||||
);
|
||||
|
@ -314,14 +314,14 @@ struct AddTypeParameterBoundWhereClause<T>(T);
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct AddTypeParameterBoundWhereClause<T>(
|
||||
T
|
||||
) where T: Sync;
|
||||
|
@ -334,14 +334,14 @@ struct AddTypeParameterBoundWhereClause<T>(
|
|||
// Note: there is no #[cfg(...)], so this is ALWAYS compiled
|
||||
#[rustc_clean(label="Hir", cfg="cfail2")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
pub struct EmptyStruct;
|
||||
|
||||
|
||||
|
@ -353,14 +353,14 @@ struct Visibility;
|
|||
#[cfg(not(cfail1))]
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
pub struct Visibility;
|
||||
|
||||
struct ReferencedType1;
|
||||
|
@ -375,14 +375,14 @@ mod tuple_struct_change_field_type_indirectly {
|
|||
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct TupleStruct(
|
||||
FieldType
|
||||
);
|
||||
|
@ -398,14 +398,14 @@ mod record_struct_change_field_type_indirectly {
|
|||
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct RecordStruct {
|
||||
_x: FieldType
|
||||
}
|
||||
|
@ -426,14 +426,14 @@ mod change_trait_bound_indirectly {
|
|||
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct Struct<T: Trait>(T);
|
||||
}
|
||||
|
||||
|
@ -446,13 +446,13 @@ mod change_trait_bound_indirectly_in_where_clause {
|
|||
|
||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail2")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||
#[rustc_clean(label="TypeOf", cfg="cfail3")]
|
||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
||||
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||
struct Struct<T>(T) where T : Trait;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ struct WontChange {
|
|||
mod signatures {
|
||||
use WillChange;
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(AssociatedItems)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(TraitDefOfItem)] //~ ERROR no path
|
||||
trait Bar {
|
||||
|
@ -42,14 +42,14 @@ mod signatures {
|
|||
WillChange { x: x, y: y }
|
||||
}
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||
impl WillChange {
|
||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
||||
fn new(x: u32, y: u32) -> WillChange { loop { } }
|
||||
}
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||
impl WillChange {
|
||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
||||
|
@ -57,21 +57,21 @@ mod signatures {
|
|||
}
|
||||
|
||||
struct WillChanges {
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||
x: WillChange,
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||
y: WillChange
|
||||
}
|
||||
|
||||
// The fields change, not the type itself.
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||
fn indirect(x: WillChanges) { }
|
||||
}
|
||||
|
||||
mod invalid_signatures {
|
||||
use WontChange;
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||
trait A {
|
||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR no path
|
||||
fn do_something_else_twice(x: WontChange);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error: no path from `WillChange` to `TypeOfItem`
|
||||
error: no path from `WillChange` to `type_of`
|
||||
--> $DIR/dep-graph-struct-signature.rs:27:5
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no path from `WillChange` to `AssociatedItems`
|
||||
--> $DIR/dep-graph-struct-signature.rs:28:5
|
||||
|
@ -43,38 +43,38 @@ LL | #[rustc_then_this_would_need(TypeckTables)]
|
|||
error: OK
|
||||
--> $DIR/dep-graph-struct-signature.rs:45:5
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: OK
|
||||
--> $DIR/dep-graph-struct-signature.rs:52:5
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: OK
|
||||
--> $DIR/dep-graph-struct-signature.rs:60:9
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: OK
|
||||
--> $DIR/dep-graph-struct-signature.rs:62:9
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no path from `WillChange` to `TypeOfItem`
|
||||
error: no path from `WillChange` to `type_of`
|
||||
--> $DIR/dep-graph-struct-signature.rs:67:5
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no path from `WillChange` to `TypeOfItem`
|
||||
error: no path from `WillChange` to `type_of`
|
||||
--> $DIR/dep-graph-struct-signature.rs:74:5
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no path from `WillChange` to `FnSignature`
|
||||
--> $DIR/dep-graph-struct-signature.rs:80:5
|
||||
|
|
|
@ -14,23 +14,23 @@ type TypeAlias = u32;
|
|||
|
||||
// The type alias directly affects the type of the field,
|
||||
// not the enclosing struct:
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||
struct Struct {
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||
x: TypeAlias,
|
||||
y: u32
|
||||
}
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||
enum Enum {
|
||||
Variant1 {
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||
t: TypeAlias
|
||||
},
|
||||
Variant2(i32)
|
||||
}
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||
trait Trait {
|
||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||
fn method(&self, _: TypeAlias);
|
||||
|
@ -38,14 +38,14 @@ trait Trait {
|
|||
|
||||
struct SomeType;
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR no path
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||
impl SomeType {
|
||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
||||
fn method(&self, _: TypeAlias) {}
|
||||
}
|
||||
|
||||
#[rustc_then_this_would_need(TypeOf)] //~ ERROR OK
|
||||
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||
type TypeAlias2 = TypeAlias;
|
||||
|
||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
error: no path from `TypeAlias` to `TypeOfItem`
|
||||
error: no path from `TypeAlias` to `type_of`
|
||||
--> $DIR/dep-graph-type-alias.rs:17:1
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: OK
|
||||
--> $DIR/dep-graph-type-alias.rs:19:5
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no path from `TypeAlias` to `TypeOfItem`
|
||||
error: no path from `TypeAlias` to `type_of`
|
||||
--> $DIR/dep-graph-type-alias.rs:24:1
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: OK
|
||||
--> $DIR/dep-graph-type-alias.rs:27:9
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no path from `TypeAlias` to `TypeOfItem`
|
||||
error: no path from `TypeAlias` to `type_of`
|
||||
--> $DIR/dep-graph-type-alias.rs:33:1
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no path from `TypeAlias` to `TypeOfItem`
|
||||
error: no path from `TypeAlias` to `type_of`
|
||||
--> $DIR/dep-graph-type-alias.rs:41:1
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: OK
|
||||
--> $DIR/dep-graph-type-alias.rs:48:1
|
||||
|
|
||||
LL | #[rustc_then_this_would_need(TypeOfItem)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[rustc_then_this_would_need(type_of)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: OK
|
||||
--> $DIR/dep-graph-type-alias.rs:51:1
|
||||
|
|
Loading…
Add table
Reference in a new issue