Auto merge of #56462 - Zoxc:query-macro, r=oli-obk
Define queries using a proc macro cc @rust-lang/compiler
This commit is contained in:
commit
3bf064beaa
@ -423,7 +423,7 @@ impl DefId {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
define_dep_nodes!( <'tcx>
|
rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
|
||||||
// We use this for most things when incr. comp. is turned off.
|
// We use this for most things when incr. comp. is turned off.
|
||||||
[] Null,
|
[] Null,
|
||||||
|
|
||||||
@ -492,9 +492,6 @@ define_dep_nodes!( <'tcx>
|
|||||||
// table in the tcx (or elsewhere) maps to one of these
|
// table in the tcx (or elsewhere) maps to one of these
|
||||||
// nodes.
|
// nodes.
|
||||||
[] AssociatedItems(DefId),
|
[] AssociatedItems(DefId),
|
||||||
[] TypeOfItem(DefId),
|
|
||||||
[] GenericsOfItem(DefId),
|
|
||||||
[] PredicatesOfItem(DefId),
|
|
||||||
[] ExplicitPredicatesOfItem(DefId),
|
[] ExplicitPredicatesOfItem(DefId),
|
||||||
[] PredicatesDefinedOnItem(DefId),
|
[] PredicatesDefinedOnItem(DefId),
|
||||||
[] InferredOutlivesOf(DefId),
|
[] InferredOutlivesOf(DefId),
|
||||||
@ -570,7 +567,6 @@ define_dep_nodes!( <'tcx>
|
|||||||
[] FnArgNames(DefId),
|
[] FnArgNames(DefId),
|
||||||
[] RenderedConst(DefId),
|
[] RenderedConst(DefId),
|
||||||
[] DylibDepFormats(CrateNum),
|
[] DylibDepFormats(CrateNum),
|
||||||
[] IsPanicRuntime(CrateNum),
|
|
||||||
[] IsCompilerBuiltins(CrateNum),
|
[] IsCompilerBuiltins(CrateNum),
|
||||||
[] HasGlobalAllocator(CrateNum),
|
[] HasGlobalAllocator(CrateNum),
|
||||||
[] HasPanicHandler(CrateNum),
|
[] HasPanicHandler(CrateNum),
|
||||||
@ -588,7 +584,6 @@ define_dep_nodes!( <'tcx>
|
|||||||
[] CheckTraitItemWellFormed(DefId),
|
[] CheckTraitItemWellFormed(DefId),
|
||||||
[] CheckImplItemWellFormed(DefId),
|
[] CheckImplItemWellFormed(DefId),
|
||||||
[] ReachableNonGenerics(CrateNum),
|
[] ReachableNonGenerics(CrateNum),
|
||||||
[] NativeLibraries(CrateNum),
|
|
||||||
[] EntryFn(CrateNum),
|
[] EntryFn(CrateNum),
|
||||||
[] PluginRegistrarFn(CrateNum),
|
[] PluginRegistrarFn(CrateNum),
|
||||||
[] ProcMacroDeclsStatic(CrateNum),
|
[] ProcMacroDeclsStatic(CrateNum),
|
||||||
@ -679,7 +674,23 @@ define_dep_nodes!( <'tcx>
|
|||||||
|
|
||||||
[] UpstreamMonomorphizations(CrateNum),
|
[] UpstreamMonomorphizations(CrateNum),
|
||||||
[] UpstreamMonomorphizationsFor(DefId),
|
[] UpstreamMonomorphizationsFor(DefId),
|
||||||
);
|
]);
|
||||||
|
|
||||||
|
pub trait RecoverKey<'tcx>: Sized {
|
||||||
|
fn recover(tcx: TyCtxt<'_, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self>;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RecoverKey<'tcx> for CrateNum {
|
||||||
|
fn recover(tcx: TyCtxt<'_, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
|
||||||
|
dep_node.extract_def_id(tcx).map(|id| id.krate)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RecoverKey<'tcx> for DefId {
|
||||||
|
fn recover(tcx: TyCtxt<'_, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
|
||||||
|
dep_node.extract_def_id(tcx)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
trait DepNodeParams<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> : fmt::Debug {
|
trait DepNodeParams<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> : fmt::Debug {
|
||||||
const CAN_RECONSTRUCT_QUERY_KEY: bool;
|
const CAN_RECONSTRUCT_QUERY_KEY: bool;
|
||||||
|
@ -9,7 +9,7 @@ mod serialized;
|
|||||||
pub mod cgu_reuse_tracker;
|
pub mod cgu_reuse_tracker;
|
||||||
|
|
||||||
pub use self::dep_tracking_map::{DepTrackingMap, DepTrackingMapConfig};
|
pub use self::dep_tracking_map::{DepTrackingMap, DepTrackingMapConfig};
|
||||||
pub use self::dep_node::{DepNode, DepKind, DepConstructor, WorkProductId, label_strs};
|
pub use self::dep_node::{DepNode, DepKind, DepConstructor, WorkProductId, RecoverKey, label_strs};
|
||||||
pub use self::graph::{DepGraph, WorkProduct, DepNodeIndex, DepNodeColor, TaskDeps, hash_result};
|
pub use self::graph::{DepGraph, WorkProduct, DepNodeIndex, DepNodeColor, TaskDeps, hash_result};
|
||||||
pub use self::graph::WorkProductFileKind;
|
pub use self::graph::WorkProductFileKind;
|
||||||
pub use self::prev::PreviousDepGraph;
|
pub use self::prev::PreviousDepGraph;
|
||||||
|
@ -60,6 +60,8 @@
|
|||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
|
#![feature(proc_macro_hygiene)]
|
||||||
|
#![feature(log_syntax)]
|
||||||
|
|
||||||
#![recursion_limit="512"]
|
#![recursion_limit="512"]
|
||||||
|
|
||||||
@ -69,6 +71,7 @@ extern crate getopts;
|
|||||||
#[macro_use] extern crate scoped_tls;
|
#[macro_use] extern crate scoped_tls;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
#[macro_use] extern crate rustc_macros;
|
||||||
#[macro_use] extern crate rustc_data_structures;
|
#[macro_use] extern crate rustc_data_structures;
|
||||||
|
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
@ -96,6 +99,9 @@ mod macros;
|
|||||||
// registered before they are used.
|
// registered before they are used.
|
||||||
pub mod diagnostics;
|
pub mod diagnostics;
|
||||||
|
|
||||||
|
#[macro_use]
|
||||||
|
pub mod query;
|
||||||
|
|
||||||
pub mod cfg;
|
pub mod cfg;
|
||||||
pub mod dep_graph;
|
pub mod dep_graph;
|
||||||
pub mod hir;
|
pub mod hir;
|
||||||
|
66
src/librustc/query/mod.rs
Normal file
66
src/librustc/query/mod.rs
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
// Each of these queries corresponds to a function pointer field in the
|
||||||
|
// `Providers` struct for requesting a value of that type, and a method
|
||||||
|
// on `tcx: TyCtxt` (and `tcx.at(span)`) for doing that request in a way
|
||||||
|
// which memoizes and does dep-graph tracking, wrapping around the actual
|
||||||
|
// `Providers` that the driver creates (using several `rustc_*` crates).
|
||||||
|
//
|
||||||
|
// The result type of each query must implement `Clone`, and additionally
|
||||||
|
// `ty::query::values::Value`, which produces an appropriate placeholder
|
||||||
|
// (error) value if the query resulted in a query cycle.
|
||||||
|
// Queries marked with `fatal_cycle` do not need the latter implementation,
|
||||||
|
// as they will raise an fatal error on query cycles instead.
|
||||||
|
rustc_queries! {
|
||||||
|
Other {
|
||||||
|
/// Records the type of every item.
|
||||||
|
query type_of(key: DefId) -> Ty<'tcx> {
|
||||||
|
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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Codegen {
|
||||||
|
query is_panic_runtime(_: CrateNum) -> bool {
|
||||||
|
fatal_cycle
|
||||||
|
desc { "checking if the crate is_panic_runtime" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -34,7 +34,7 @@ pub trait QueryConfig<'tcx> {
|
|||||||
type Value: Clone;
|
type Value: Clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) trait QueryAccessors<'tcx>: QueryConfig<'tcx> {
|
pub(crate) trait QueryAccessors<'tcx>: QueryConfig<'tcx> {
|
||||||
fn query(key: Self::Key) -> Query<'tcx>;
|
fn query(key: Self::Key) -> Query<'tcx>;
|
||||||
|
|
||||||
// Don't use this method to access query results, instead use the methods on TyCtxt
|
// Don't use this method to access query results, instead use the methods on TyCtxt
|
||||||
@ -53,7 +53,7 @@ pub(super) trait QueryAccessors<'tcx>: QueryConfig<'tcx> {
|
|||||||
fn handle_cycle_error(tcx: TyCtxt<'_, 'tcx, '_>, error: CycleError<'tcx>) -> Self::Value;
|
fn handle_cycle_error(tcx: TyCtxt<'_, 'tcx, '_>, error: CycleError<'tcx>) -> Self::Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) trait QueryDescription<'tcx>: QueryAccessors<'tcx> {
|
pub(crate) trait QueryDescription<'tcx>: QueryAccessors<'tcx> {
|
||||||
fn describe(tcx: TyCtxt<'_, '_, '_>, key: Self::Key) -> Cow<'static, str>;
|
fn describe(tcx: TyCtxt<'_, '_, '_>, key: Self::Key) -> Cow<'static, str>;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -587,12 +587,6 @@ impl<'tcx> QueryDescription<'tcx> for queries::dylib_dependency_formats<'tcx> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> QueryDescription<'tcx> for queries::is_panic_runtime<'tcx> {
|
|
||||||
fn describe(_: TyCtxt<'_, '_, '_>, _: CrateNum) -> Cow<'static, str> {
|
|
||||||
"checking if the crate is_panic_runtime".into()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'tcx> QueryDescription<'tcx> for queries::is_compiler_builtins<'tcx> {
|
impl<'tcx> QueryDescription<'tcx> for queries::is_compiler_builtins<'tcx> {
|
||||||
fn describe(_: TyCtxt<'_, '_, '_>, _: CrateNum) -> Cow<'static, str> {
|
fn describe(_: TyCtxt<'_, '_, '_>, _: CrateNum) -> Cow<'static, str> {
|
||||||
"checking if the crate is_compiler_builtins".into()
|
"checking if the crate is_compiler_builtins".into()
|
||||||
@ -671,12 +665,6 @@ impl<'tcx> QueryDescription<'tcx> for queries::reachable_non_generics<'tcx> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> QueryDescription<'tcx> for queries::native_libraries<'tcx> {
|
|
||||||
fn describe(_tcx: TyCtxt<'_, '_, '_>, _: CrateNum) -> Cow<'static, str> {
|
|
||||||
"looking up the native libraries of a linked crate".into()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'tcx> QueryDescription<'tcx> for queries::foreign_modules<'tcx> {
|
impl<'tcx> QueryDescription<'tcx> for queries::foreign_modules<'tcx> {
|
||||||
fn describe(_tcx: TyCtxt<'_, '_, '_>, _: CrateNum) -> Cow<'static, str> {
|
fn describe(_tcx: TyCtxt<'_, '_, '_>, _: CrateNum) -> Cow<'static, str> {
|
||||||
"looking up the foreign modules of a linked crate".into()
|
"looking up the foreign modules of a linked crate".into()
|
||||||
@ -949,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> {
|
impl<'tcx> QueryDescription<'tcx> for queries::program_clauses_for<'tcx> {
|
||||||
fn describe(_tcx: TyCtxt<'_, '_, '_>, _: DefId) -> Cow<'static, str> {
|
fn describe(_tcx: TyCtxt<'_, '_, '_>, _: DefId) -> Cow<'static, str> {
|
||||||
"generating chalk-style clauses".into()
|
"generating chalk-style clauses".into()
|
||||||
@ -1027,7 +1000,6 @@ impl_disk_cacheable_query!(borrowck, |_, def_id| def_id.is_local());
|
|||||||
impl_disk_cacheable_query!(mir_const_qualif, |_, def_id| def_id.is_local());
|
impl_disk_cacheable_query!(mir_const_qualif, |_, def_id| def_id.is_local());
|
||||||
impl_disk_cacheable_query!(check_match, |_, def_id| def_id.is_local());
|
impl_disk_cacheable_query!(check_match, |_, def_id| def_id.is_local());
|
||||||
impl_disk_cacheable_query!(def_symbol_name, |_, _| true);
|
impl_disk_cacheable_query!(def_symbol_name, |_, _| true);
|
||||||
impl_disk_cacheable_query!(type_of, |_, def_id| def_id.is_local());
|
|
||||||
impl_disk_cacheable_query!(predicates_of, |_, def_id| def_id.is_local());
|
impl_disk_cacheable_query!(predicates_of, |_, def_id| def_id.is_local());
|
||||||
impl_disk_cacheable_query!(used_trait_imports, |_, def_id| def_id.is_local());
|
impl_disk_cacheable_query!(used_trait_imports, |_, def_id| def_id.is_local());
|
||||||
impl_disk_cacheable_query!(codegen_fn_attrs, |_, _| true);
|
impl_disk_cacheable_query!(codegen_fn_attrs, |_, _| true);
|
||||||
|
@ -80,13 +80,14 @@ mod values;
|
|||||||
use self::values::Value;
|
use self::values::Value;
|
||||||
|
|
||||||
mod config;
|
mod config;
|
||||||
|
pub(crate) use self::config::QueryDescription;
|
||||||
pub use self::config::QueryConfig;
|
pub use self::config::QueryConfig;
|
||||||
use self::config::{QueryAccessors, QueryDescription};
|
use self::config::QueryAccessors;
|
||||||
|
|
||||||
mod on_disk_cache;
|
mod on_disk_cache;
|
||||||
pub use self::on_disk_cache::OnDiskCache;
|
pub use self::on_disk_cache::OnDiskCache;
|
||||||
|
|
||||||
// Each of these quries corresponds to a function pointer field in the
|
// Each of these queries corresponds to a function pointer field in the
|
||||||
// `Providers` struct for requesting a value of that type, and a method
|
// `Providers` struct for requesting a value of that type, and a method
|
||||||
// on `tcx: TyCtxt` (and `tcx.at(span)`) for doing that request in a way
|
// on `tcx: TyCtxt` (and `tcx.at(span)`) for doing that request in a way
|
||||||
// which memoizes and does dep-graph tracking, wrapping around the actual
|
// which memoizes and does dep-graph tracking, wrapping around the actual
|
||||||
@ -97,35 +98,12 @@ pub use self::on_disk_cache::OnDiskCache;
|
|||||||
// (error) value if the query resulted in a query cycle.
|
// (error) value if the query resulted in a query cycle.
|
||||||
// Queries marked with `fatal_cycle` do not need the latter implementation,
|
// Queries marked with `fatal_cycle` do not need the latter implementation,
|
||||||
// as they will raise an fatal error on query cycles instead.
|
// as they will raise an fatal error on query cycles instead.
|
||||||
define_queries! { <'tcx>
|
|
||||||
|
rustc_query_append! { [define_queries!][ <'tcx>
|
||||||
Other {
|
Other {
|
||||||
/// Run analysis passes on the crate
|
/// Run analysis passes on the crate
|
||||||
[] fn analysis: Analysis(CrateNum) -> Result<(), ErrorReported>,
|
[] fn analysis: Analysis(CrateNum) -> Result<(), ErrorReported>,
|
||||||
|
|
||||||
/// Records the type of every item.
|
|
||||||
[] fn type_of: TypeOfItem(DefId) -> Ty<'tcx>,
|
|
||||||
|
|
||||||
/// 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
|
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to the
|
||||||
/// predicates (where-clauses) directly defined on it. This is
|
/// predicates (where-clauses) directly defined on it. This is
|
||||||
/// equal to the `explicit_predicates_of` predicates plus the
|
/// equal to the `explicit_predicates_of` predicates plus the
|
||||||
@ -446,7 +424,6 @@ define_queries! { <'tcx>
|
|||||||
},
|
},
|
||||||
|
|
||||||
Codegen {
|
Codegen {
|
||||||
[fatal_cycle] fn is_panic_runtime: IsPanicRuntime(CrateNum) -> bool,
|
|
||||||
[fatal_cycle] fn is_compiler_builtins: IsCompilerBuiltins(CrateNum) -> bool,
|
[fatal_cycle] fn is_compiler_builtins: IsCompilerBuiltins(CrateNum) -> bool,
|
||||||
[fatal_cycle] fn has_global_allocator: HasGlobalAllocator(CrateNum) -> bool,
|
[fatal_cycle] fn has_global_allocator: HasGlobalAllocator(CrateNum) -> bool,
|
||||||
[fatal_cycle] fn has_panic_handler: HasPanicHandler(CrateNum) -> bool,
|
[fatal_cycle] fn has_panic_handler: HasPanicHandler(CrateNum) -> bool,
|
||||||
@ -504,8 +481,6 @@ define_queries! { <'tcx>
|
|||||||
},
|
},
|
||||||
|
|
||||||
Other {
|
Other {
|
||||||
[] fn native_libraries: NativeLibraries(CrateNum) -> Lrc<Vec<NativeLibrary>>,
|
|
||||||
|
|
||||||
[] fn foreign_modules: ForeignModules(CrateNum) -> Lrc<Vec<ForeignModule>>,
|
[] fn foreign_modules: ForeignModules(CrateNum) -> Lrc<Vec<ForeignModule>>,
|
||||||
|
|
||||||
/// Identifies the entry-point (e.g., the `main` function) for a given
|
/// Identifies the entry-point (e.g., the `main` function) for a given
|
||||||
@ -752,7 +727,7 @@ define_queries! { <'tcx>
|
|||||||
[] fn wasm_import_module_map: WasmImportModuleMap(CrateNum)
|
[] fn wasm_import_module_map: WasmImportModuleMap(CrateNum)
|
||||||
-> Lrc<FxHashMap<DefId, String>>,
|
-> Lrc<FxHashMap<DefId, String>>,
|
||||||
},
|
},
|
||||||
}
|
]}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// These functions are little shims used to find the dep-node for a
|
// These functions are little shims used to find the dep-node for a
|
||||||
|
@ -1131,10 +1131,12 @@ macro_rules! define_provider_struct {
|
|||||||
/// then `force_from_dep_node()` should not fail for it. Otherwise, you can just
|
/// then `force_from_dep_node()` should not fail for it. Otherwise, you can just
|
||||||
/// add it to the "We don't have enough information to reconstruct..." group in
|
/// add it to the "We don't have enough information to reconstruct..." group in
|
||||||
/// the match below.
|
/// the match below.
|
||||||
pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
pub fn force_from_dep_node<'tcx>(
|
||||||
dep_node: &DepNode)
|
tcx: TyCtxt<'_, 'tcx, 'tcx>,
|
||||||
-> bool {
|
dep_node: &DepNode
|
||||||
|
) -> bool {
|
||||||
use crate::hir::def_id::LOCAL_CRATE;
|
use crate::hir::def_id::LOCAL_CRATE;
|
||||||
|
use crate::dep_graph::RecoverKey;
|
||||||
|
|
||||||
// We must avoid ever having to call force_from_dep_node() for a
|
// We must avoid ever having to call force_from_dep_node() for a
|
||||||
// DepNode::CodegenUnit:
|
// DepNode::CodegenUnit:
|
||||||
@ -1171,17 +1173,26 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
|||||||
() => { (def_id!()).krate }
|
() => { (def_id!()).krate }
|
||||||
};
|
};
|
||||||
|
|
||||||
macro_rules! force {
|
macro_rules! force_ex {
|
||||||
($query:ident, $key:expr) => {
|
($tcx:expr, $query:ident, $key:expr) => {
|
||||||
{
|
{
|
||||||
tcx.force_query::<crate::ty::query::queries::$query<'_>>($key, DUMMY_SP, *dep_node);
|
$tcx.force_query::<crate::ty::query::queries::$query<'_>>(
|
||||||
|
$key,
|
||||||
|
DUMMY_SP,
|
||||||
|
*dep_node
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
macro_rules! force {
|
||||||
|
($query:ident, $key:expr) => { force_ex!(tcx, $query, $key) }
|
||||||
|
};
|
||||||
|
|
||||||
// FIXME(#45015): We should try move this boilerplate code into a macro
|
// FIXME(#45015): We should try move this boilerplate code into a macro
|
||||||
// somehow.
|
// somehow.
|
||||||
match dep_node.kind {
|
|
||||||
|
rustc_dep_node_force!([dep_node, tcx]
|
||||||
// These are inputs that are expected to be pre-allocated and that
|
// These are inputs that are expected to be pre-allocated and that
|
||||||
// should therefore always be red or green already
|
// should therefore always be red or green already
|
||||||
DepKind::AllLocalTraitImpls |
|
DepKind::AllLocalTraitImpls |
|
||||||
@ -1274,9 +1285,6 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
|||||||
DepKind::MirKeys => { force!(mir_keys, LOCAL_CRATE); }
|
DepKind::MirKeys => { force!(mir_keys, LOCAL_CRATE); }
|
||||||
DepKind::CrateVariances => { force!(crate_variances, LOCAL_CRATE); }
|
DepKind::CrateVariances => { force!(crate_variances, LOCAL_CRATE); }
|
||||||
DepKind::AssociatedItems => { force!(associated_item, def_id!()); }
|
DepKind::AssociatedItems => { force!(associated_item, def_id!()); }
|
||||||
DepKind::TypeOfItem => { force!(type_of, 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::PredicatesDefinedOnItem => { force!(predicates_defined_on, def_id!()); }
|
||||||
DepKind::ExplicitPredicatesOfItem => { force!(explicit_predicates_of, def_id!()); }
|
DepKind::ExplicitPredicatesOfItem => { force!(explicit_predicates_of, def_id!()); }
|
||||||
DepKind::InferredOutlivesOf => { force!(inferred_outlives_of, def_id!()); }
|
DepKind::InferredOutlivesOf => { force!(inferred_outlives_of, def_id!()); }
|
||||||
@ -1332,7 +1340,6 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
|||||||
DepKind::FnArgNames => { force!(fn_arg_names, def_id!()); }
|
DepKind::FnArgNames => { force!(fn_arg_names, def_id!()); }
|
||||||
DepKind::RenderedConst => { force!(rendered_const, def_id!()); }
|
DepKind::RenderedConst => { force!(rendered_const, def_id!()); }
|
||||||
DepKind::DylibDepFormats => { force!(dylib_dependency_formats, krate!()); }
|
DepKind::DylibDepFormats => { force!(dylib_dependency_formats, krate!()); }
|
||||||
DepKind::IsPanicRuntime => { force!(is_panic_runtime, krate!()); }
|
|
||||||
DepKind::IsCompilerBuiltins => { force!(is_compiler_builtins, krate!()); }
|
DepKind::IsCompilerBuiltins => { force!(is_compiler_builtins, krate!()); }
|
||||||
DepKind::HasGlobalAllocator => { force!(has_global_allocator, krate!()); }
|
DepKind::HasGlobalAllocator => { force!(has_global_allocator, krate!()); }
|
||||||
DepKind::HasPanicHandler => { force!(has_panic_handler, krate!()); }
|
DepKind::HasPanicHandler => { force!(has_panic_handler, krate!()); }
|
||||||
@ -1349,7 +1356,6 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
|||||||
DepKind::CheckTraitItemWellFormed => { force!(check_trait_item_well_formed, def_id!()); }
|
DepKind::CheckTraitItemWellFormed => { force!(check_trait_item_well_formed, def_id!()); }
|
||||||
DepKind::CheckImplItemWellFormed => { force!(check_impl_item_well_formed, def_id!()); }
|
DepKind::CheckImplItemWellFormed => { force!(check_impl_item_well_formed, def_id!()); }
|
||||||
DepKind::ReachableNonGenerics => { force!(reachable_non_generics, krate!()); }
|
DepKind::ReachableNonGenerics => { force!(reachable_non_generics, krate!()); }
|
||||||
DepKind::NativeLibraries => { force!(native_libraries, krate!()); }
|
|
||||||
DepKind::EntryFn => { force!(entry_fn, krate!()); }
|
DepKind::EntryFn => { force!(entry_fn, krate!()); }
|
||||||
DepKind::PluginRegistrarFn => { force!(plugin_registrar_fn, krate!()); }
|
DepKind::PluginRegistrarFn => { force!(plugin_registrar_fn, krate!()); }
|
||||||
DepKind::ProcMacroDeclsStatic => { force!(proc_macro_decls_static, krate!()); }
|
DepKind::ProcMacroDeclsStatic => { force!(proc_macro_decls_static, krate!()); }
|
||||||
@ -1432,7 +1438,7 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
|||||||
DepKind::BackendOptimizationLevel => {
|
DepKind::BackendOptimizationLevel => {
|
||||||
force!(backend_optimization_level, krate!());
|
force!(backend_optimization_level, krate!());
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
@ -1493,9 +1499,9 @@ impl_load_from_cache!(
|
|||||||
SymbolName => def_symbol_name,
|
SymbolName => def_symbol_name,
|
||||||
ConstIsRvaluePromotableToStatic => const_is_rvalue_promotable_to_static,
|
ConstIsRvaluePromotableToStatic => const_is_rvalue_promotable_to_static,
|
||||||
CheckMatch => check_match,
|
CheckMatch => check_match,
|
||||||
TypeOfItem => type_of,
|
type_of => type_of,
|
||||||
GenericsOfItem => generics_of,
|
generics_of => generics_of,
|
||||||
PredicatesOfItem => predicates_of,
|
predicates_of => predicates_of,
|
||||||
UsedTraitImports => used_trait_imports,
|
UsedTraitImports => used_trait_imports,
|
||||||
CodegenFnAttrs => codegen_fn_attrs,
|
CodegenFnAttrs => codegen_fn_attrs,
|
||||||
SpecializationGraph => specialization_graph_of,
|
SpecializationGraph => specialization_graph_of,
|
||||||
|
@ -36,16 +36,16 @@ const CFG: &str = "cfg";
|
|||||||
|
|
||||||
/// For typedef, constants, and statics
|
/// For typedef, constants, and statics
|
||||||
const BASE_CONST: &[&str] = &[
|
const BASE_CONST: &[&str] = &[
|
||||||
label_strs::TypeOfItem,
|
label_strs::type_of,
|
||||||
];
|
];
|
||||||
|
|
||||||
/// DepNodes for functions + methods
|
/// DepNodes for functions + methods
|
||||||
const BASE_FN: &[&str] = &[
|
const BASE_FN: &[&str] = &[
|
||||||
// Callers will depend on the signature of these items, so we better test
|
// Callers will depend on the signature of these items, so we better test
|
||||||
label_strs::FnSignature,
|
label_strs::FnSignature,
|
||||||
label_strs::GenericsOfItem,
|
label_strs::generics_of,
|
||||||
label_strs::PredicatesOfItem,
|
label_strs::predicates_of,
|
||||||
label_strs::TypeOfItem,
|
label_strs::type_of,
|
||||||
|
|
||||||
// And a big part of compilation (that we eventually want to cache) is type inference
|
// And a big part of compilation (that we eventually want to cache) is type inference
|
||||||
// information:
|
// information:
|
||||||
@ -62,7 +62,7 @@ const BASE_HIR: &[&str] = &[
|
|||||||
/// `impl` implementation of struct/trait
|
/// `impl` implementation of struct/trait
|
||||||
const BASE_IMPL: &[&str] = &[
|
const BASE_IMPL: &[&str] = &[
|
||||||
label_strs::AssociatedItemDefIds,
|
label_strs::AssociatedItemDefIds,
|
||||||
label_strs::GenericsOfItem,
|
label_strs::generics_of,
|
||||||
label_strs::ImplTraitRef,
|
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
|
/// 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.
|
/// adding/removing fields or changing a fields name or visibility does.
|
||||||
const BASE_STRUCT: &[&str] = &[
|
const BASE_STRUCT: &[&str] = &[
|
||||||
label_strs::GenericsOfItem,
|
label_strs::generics_of,
|
||||||
label_strs::PredicatesOfItem,
|
label_strs::predicates_of,
|
||||||
label_strs::TypeOfItem,
|
label_strs::type_of,
|
||||||
];
|
];
|
||||||
|
|
||||||
/// Trait definition `DepNode`s.
|
/// Trait definition `DepNode`s.
|
||||||
const BASE_TRAIT_DEF: &[&str] = &[
|
const BASE_TRAIT_DEF: &[&str] = &[
|
||||||
label_strs::AssociatedItemDefIds,
|
label_strs::AssociatedItemDefIds,
|
||||||
label_strs::GenericsOfItem,
|
label_strs::generics_of,
|
||||||
label_strs::ObjectSafety,
|
label_strs::ObjectSafety,
|
||||||
label_strs::PredicatesOfItem,
|
label_strs::predicates_of,
|
||||||
label_strs::SpecializationGraph,
|
label_strs::SpecializationGraph,
|
||||||
label_strs::TraitDefOfItem,
|
label_strs::TraitDefOfItem,
|
||||||
label_strs::TraitImpls,
|
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
|
// Fields are kind of separate from their containers, as they can change independently from
|
||||||
// them. We should at least check
|
// them. We should at least check
|
||||||
//
|
//
|
||||||
// TypeOfItem for these.
|
// type_of for these.
|
||||||
|
|
||||||
type Labels = FxHashSet<String>;
|
type Labels = FxHashSet<String>;
|
||||||
|
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
#![feature(proc_macro_hygiene)]
|
#![feature(proc_macro_hygiene)]
|
||||||
#![deny(rust_2018_idioms)]
|
#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
|
extern crate proc_macro;
|
||||||
|
|
||||||
use synstructure::decl_derive;
|
use synstructure::decl_derive;
|
||||||
|
|
||||||
|
use proc_macro::TokenStream;
|
||||||
|
|
||||||
mod hash_stable;
|
mod hash_stable;
|
||||||
|
mod query;
|
||||||
|
|
||||||
|
#[proc_macro]
|
||||||
|
pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
||||||
|
query::rustc_queries(input)
|
||||||
|
}
|
||||||
|
|
||||||
decl_derive!([HashStable, attributes(stable_hasher)] => hash_stable::hash_stable_derive);
|
decl_derive!([HashStable, attributes(stable_hasher)] => hash_stable::hash_stable_derive);
|
||||||
|
394
src/librustc_macros/src/query.rs
Normal file
394
src/librustc_macros/src/query.rs
Normal file
@ -0,0 +1,394 @@
|
|||||||
|
use proc_macro::TokenStream;
|
||||||
|
use syn::{
|
||||||
|
Token, Ident, Type, Attribute, ReturnType, Expr, Block, Error,
|
||||||
|
braced, parenthesized, parse_macro_input,
|
||||||
|
};
|
||||||
|
use syn::spanned::Spanned;
|
||||||
|
use syn::parse::{Result, Parse, ParseStream};
|
||||||
|
use syn::punctuated::Punctuated;
|
||||||
|
use syn;
|
||||||
|
use quote::quote;
|
||||||
|
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
mod kw {
|
||||||
|
syn::custom_keyword!(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Ident or a wildcard `_`.
|
||||||
|
struct IdentOrWild(Ident);
|
||||||
|
|
||||||
|
impl Parse for IdentOrWild {
|
||||||
|
fn parse(input: ParseStream<'_>) -> Result<Self> {
|
||||||
|
Ok(if input.peek(Token![_]) {
|
||||||
|
let underscore = input.parse::<Token![_]>()?;
|
||||||
|
IdentOrWild(Ident::new("_", underscore.span()))
|
||||||
|
} else {
|
||||||
|
IdentOrWild(input.parse()?)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A modifier for a query
|
||||||
|
enum QueryModifier {
|
||||||
|
/// The description of the query.
|
||||||
|
Desc(Option<Ident>, Punctuated<Expr, Token![,]>),
|
||||||
|
|
||||||
|
/// Cache the query to disk if the `Expr` returns true.
|
||||||
|
Cache(Option<Ident>, Expr),
|
||||||
|
|
||||||
|
/// Custom code to load the query from disk.
|
||||||
|
LoadCached(Ident, Ident, Block),
|
||||||
|
|
||||||
|
/// A cycle error for this query aborting the compilation with a fatal error.
|
||||||
|
FatalCycle,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Parse for QueryModifier {
|
||||||
|
fn parse(input: ParseStream<'_>) -> Result<Self> {
|
||||||
|
let modifier: Ident = input.parse()?;
|
||||||
|
if modifier == "desc" {
|
||||||
|
// Parse a description modifier like:
|
||||||
|
// `desc { |tcx| "foo {}", tcx.item_path(key) }`
|
||||||
|
let attr_content;
|
||||||
|
braced!(attr_content in input);
|
||||||
|
let tcx = if attr_content.peek(Token![|]) {
|
||||||
|
attr_content.parse::<Token![|]>()?;
|
||||||
|
let tcx = attr_content.parse()?;
|
||||||
|
attr_content.parse::<Token![|]>()?;
|
||||||
|
Some(tcx)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
let desc = attr_content.parse_terminated(Expr::parse)?;
|
||||||
|
Ok(QueryModifier::Desc(tcx, desc))
|
||||||
|
} else if modifier == "cache" {
|
||||||
|
// Parse a cache modifier like:
|
||||||
|
// `cache { |tcx| key.is_local() }`
|
||||||
|
let attr_content;
|
||||||
|
braced!(attr_content in input);
|
||||||
|
let tcx = if attr_content.peek(Token![|]) {
|
||||||
|
attr_content.parse::<Token![|]>()?;
|
||||||
|
let tcx = attr_content.parse()?;
|
||||||
|
attr_content.parse::<Token![|]>()?;
|
||||||
|
Some(tcx)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
let expr = attr_content.parse()?;
|
||||||
|
Ok(QueryModifier::Cache(tcx, expr))
|
||||||
|
} else if modifier == "load_cached" {
|
||||||
|
// Parse a load_cached modifier like:
|
||||||
|
// `load_cached(tcx, id) { tcx.queries.on_disk_cache.try_load_query_result(tcx, id) }`
|
||||||
|
let args;
|
||||||
|
parenthesized!(args in input);
|
||||||
|
let tcx = args.parse()?;
|
||||||
|
args.parse::<Token![,]>()?;
|
||||||
|
let id = args.parse()?;
|
||||||
|
let block = input.parse()?;
|
||||||
|
Ok(QueryModifier::LoadCached(tcx, id, block))
|
||||||
|
} else if modifier == "fatal_cycle" {
|
||||||
|
Ok(QueryModifier::FatalCycle)
|
||||||
|
} else {
|
||||||
|
Err(Error::new(modifier.span(), "unknown query modifier"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Ensures only doc comment attributes are used
|
||||||
|
fn check_attributes(attrs: Vec<Attribute>) -> Result<()> {
|
||||||
|
for attr in attrs {
|
||||||
|
if !attr.path.is_ident("doc") {
|
||||||
|
return Err(Error::new(attr.span(), "attributes not supported on queries"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A compiler query. `query ... { ... }`
|
||||||
|
struct Query {
|
||||||
|
modifiers: List<QueryModifier>,
|
||||||
|
name: Ident,
|
||||||
|
key: IdentOrWild,
|
||||||
|
arg: Type,
|
||||||
|
result: ReturnType,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Parse for Query {
|
||||||
|
fn parse(input: ParseStream<'_>) -> Result<Self> {
|
||||||
|
check_attributes(input.call(Attribute::parse_outer)?)?;
|
||||||
|
|
||||||
|
// Parse the query declaration. Like `query type_of(key: DefId) -> Ty<'tcx>`
|
||||||
|
input.parse::<kw::query>()?;
|
||||||
|
let name: Ident = input.parse()?;
|
||||||
|
let arg_content;
|
||||||
|
parenthesized!(arg_content in input);
|
||||||
|
let key = arg_content.parse()?;
|
||||||
|
arg_content.parse::<Token![:]>()?;
|
||||||
|
let arg = arg_content.parse()?;
|
||||||
|
let result = input.parse()?;
|
||||||
|
|
||||||
|
// Parse the query modifiers
|
||||||
|
let content;
|
||||||
|
braced!(content in input);
|
||||||
|
let modifiers = content.parse()?;
|
||||||
|
|
||||||
|
Ok(Query {
|
||||||
|
modifiers,
|
||||||
|
name,
|
||||||
|
key,
|
||||||
|
arg,
|
||||||
|
result,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A type used to greedily parse another type until the input is empty.
|
||||||
|
struct List<T>(Vec<T>);
|
||||||
|
|
||||||
|
impl<T: Parse> Parse for List<T> {
|
||||||
|
fn parse(input: ParseStream<'_>) -> Result<Self> {
|
||||||
|
let mut list = Vec::new();
|
||||||
|
while !input.is_empty() {
|
||||||
|
list.push(input.parse()?);
|
||||||
|
}
|
||||||
|
Ok(List(list))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A named group containing queries.
|
||||||
|
struct Group {
|
||||||
|
name: Ident,
|
||||||
|
queries: List<Query>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Parse for Group {
|
||||||
|
fn parse(input: ParseStream<'_>) -> Result<Self> {
|
||||||
|
let name: Ident = input.parse()?;
|
||||||
|
let content;
|
||||||
|
braced!(content in input);
|
||||||
|
Ok(Group {
|
||||||
|
name,
|
||||||
|
queries: content.parse()?,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct QueryModifiers {
|
||||||
|
/// The description of the query.
|
||||||
|
desc: Option<(Option<Ident>, Punctuated<Expr, Token![,]>)>,
|
||||||
|
|
||||||
|
/// Cache the query to disk if the `Expr` returns true.
|
||||||
|
cache: Option<(Option<Ident>, Expr)>,
|
||||||
|
|
||||||
|
/// Custom code to load the query from disk.
|
||||||
|
load_cached: Option<(Ident, Ident, Block)>,
|
||||||
|
|
||||||
|
/// A cycle error for this query aborting the compilation with a fatal error.
|
||||||
|
fatal_cycle: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Process query modifiers into a struct, erroring on duplicates
|
||||||
|
fn process_modifiers(query: &mut Query) -> QueryModifiers {
|
||||||
|
let mut load_cached = None;
|
||||||
|
let mut cache = None;
|
||||||
|
let mut desc = None;
|
||||||
|
let mut fatal_cycle = false;
|
||||||
|
for modifier in query.modifiers.0.drain(..) {
|
||||||
|
match modifier {
|
||||||
|
QueryModifier::LoadCached(tcx, id, block) => {
|
||||||
|
if load_cached.is_some() {
|
||||||
|
panic!("duplicate modifier `load_cached` for query `{}`", query.name);
|
||||||
|
}
|
||||||
|
load_cached = Some((tcx, id, block));
|
||||||
|
}
|
||||||
|
QueryModifier::Cache(tcx, expr) => {
|
||||||
|
if cache.is_some() {
|
||||||
|
panic!("duplicate modifier `cache` for query `{}`", query.name);
|
||||||
|
}
|
||||||
|
cache = Some((tcx, expr));
|
||||||
|
}
|
||||||
|
QueryModifier::Desc(tcx, list) => {
|
||||||
|
if desc.is_some() {
|
||||||
|
panic!("duplicate modifier `desc` for query `{}`", query.name);
|
||||||
|
}
|
||||||
|
desc = Some((tcx, list));
|
||||||
|
}
|
||||||
|
QueryModifier::FatalCycle => {
|
||||||
|
if fatal_cycle {
|
||||||
|
panic!("duplicate modifier `fatal_cycle` for query `{}`", query.name);
|
||||||
|
}
|
||||||
|
fatal_cycle = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QueryModifiers {
|
||||||
|
load_cached,
|
||||||
|
cache,
|
||||||
|
desc,
|
||||||
|
fatal_cycle,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Add the impl of QueryDescription for the query to `impls` if one is requested
|
||||||
|
fn add_query_description_impl(
|
||||||
|
query: &Query,
|
||||||
|
modifiers: QueryModifiers,
|
||||||
|
impls: &mut proc_macro2::TokenStream
|
||||||
|
) {
|
||||||
|
let name = &query.name;
|
||||||
|
let arg = &query.arg;
|
||||||
|
let key = &query.key.0;
|
||||||
|
|
||||||
|
// Find out if we should cache the query on disk
|
||||||
|
let cache = modifiers.cache.as_ref().map(|(tcx, expr)| {
|
||||||
|
let try_load_from_disk = if let Some((tcx, id, block)) = modifiers.load_cached.as_ref() {
|
||||||
|
// Use custom code to load the query from disk
|
||||||
|
quote! {
|
||||||
|
#[inline]
|
||||||
|
fn try_load_from_disk(
|
||||||
|
#tcx: TyCtxt<'_, 'tcx, 'tcx>,
|
||||||
|
#id: SerializedDepNodeIndex
|
||||||
|
) -> Option<Self::Value> {
|
||||||
|
#block
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Use the default code to load the query from disk
|
||||||
|
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]
|
||||||
|
fn cache_on_disk(#tcx: TyCtxt<'_, 'tcx, 'tcx>, #key: Self::Key) -> bool {
|
||||||
|
#expr
|
||||||
|
}
|
||||||
|
|
||||||
|
#try_load_from_disk
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if cache.is_none() && modifiers.load_cached.is_some() {
|
||||||
|
panic!("load_cached modifier on query `{}` without a cache modifier", name);
|
||||||
|
}
|
||||||
|
|
||||||
|
let desc = modifiers.desc.as_ref().map(|(tcx, desc)| {
|
||||||
|
let tcx = tcx.as_ref().map(|t| quote! { #t }).unwrap_or(quote! { _ });
|
||||||
|
quote! {
|
||||||
|
fn describe(
|
||||||
|
#tcx: TyCtxt<'_, '_, '_>,
|
||||||
|
#key: #arg,
|
||||||
|
) -> Cow<'static, str> {
|
||||||
|
format!(#desc).into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if desc.is_some() || cache.is_some() {
|
||||||
|
let cache = cache.unwrap_or(quote! {});
|
||||||
|
let desc = desc.unwrap_or(quote! {});
|
||||||
|
|
||||||
|
impls.extend(quote! {
|
||||||
|
impl<'tcx> QueryDescription<'tcx> for queries::#name<'tcx> {
|
||||||
|
#desc
|
||||||
|
#cache
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
||||||
|
let groups = parse_macro_input!(input as List<Group>);
|
||||||
|
|
||||||
|
let mut query_stream = quote! {};
|
||||||
|
let mut query_description_stream = quote! {};
|
||||||
|
let mut dep_node_def_stream = quote! {};
|
||||||
|
let mut dep_node_force_stream = quote! {};
|
||||||
|
|
||||||
|
for group in groups.0 {
|
||||||
|
let mut group_stream = quote! {};
|
||||||
|
for mut query in group.queries.0 {
|
||||||
|
let modifiers = process_modifiers(&mut query);
|
||||||
|
let name = &query.name;
|
||||||
|
let arg = &query.arg;
|
||||||
|
let result_full = &query.result;
|
||||||
|
let result = match query.result {
|
||||||
|
ReturnType::Default => quote! { -> () },
|
||||||
|
_ => quote! { #result_full },
|
||||||
|
};
|
||||||
|
|
||||||
|
// Pass on the fatal_cycle modifier
|
||||||
|
let fatal_cycle = if modifiers.fatal_cycle {
|
||||||
|
quote! { fatal_cycle }
|
||||||
|
} else {
|
||||||
|
quote! {}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add the query to the group
|
||||||
|
group_stream.extend(quote! {
|
||||||
|
[#fatal_cycle] fn #name: #name(#arg) #result,
|
||||||
|
});
|
||||||
|
|
||||||
|
add_query_description_impl(&query, modifiers, &mut query_description_stream);
|
||||||
|
|
||||||
|
// Create a dep node for the query
|
||||||
|
dep_node_def_stream.extend(quote! {
|
||||||
|
[] #name(#arg),
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add a match arm to force the query given the dep node
|
||||||
|
dep_node_force_stream.extend(quote! {
|
||||||
|
DepKind::#name => {
|
||||||
|
if let Some(key) = RecoverKey::recover($tcx, $dep_node) {
|
||||||
|
force_ex!($tcx, #name, key);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
let name = &group.name;
|
||||||
|
query_stream.extend(quote! {
|
||||||
|
#name { #group_stream },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
TokenStream::from(quote! {
|
||||||
|
macro_rules! rustc_query_append {
|
||||||
|
([$($macro:tt)*][$($other:tt)*]) => {
|
||||||
|
$($macro)* {
|
||||||
|
$($other)*
|
||||||
|
|
||||||
|
#query_stream
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
macro_rules! rustc_dep_node_append {
|
||||||
|
([$($macro:tt)*][$($other:tt)*]) => {
|
||||||
|
$($macro)*(
|
||||||
|
$($other)*
|
||||||
|
|
||||||
|
#dep_node_def_stream
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
macro_rules! rustc_dep_node_force {
|
||||||
|
([$dep_node:expr, $tcx:expr] $($other:tt)*) => {
|
||||||
|
match $dep_node.kind {
|
||||||
|
$($other)*
|
||||||
|
|
||||||
|
#dep_node_force_stream
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#query_description_stream
|
||||||
|
})
|
||||||
|
}
|
@ -29,7 +29,7 @@ pub const CONST_VISIBILITY: u8 = 0;
|
|||||||
const CONST_CHANGE_TYPE_1: i32 = 0;
|
const CONST_CHANGE_TYPE_1: i32 = 0;
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
const CONST_CHANGE_TYPE_1: u32 = 0;
|
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;
|
const CONST_CHANGE_TYPE_2: Option<u32> = None;
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
const CONST_CHANGE_TYPE_2: Option<u64> = None;
|
const CONST_CHANGE_TYPE_2: Option<u64> = None;
|
||||||
|
|
||||||
@ -99,11 +99,11 @@ mod const_change_type_indirectly {
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
use super::ReferencedType2 as Type;
|
use super::ReferencedType2 as Type;
|
||||||
|
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
const CONST_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
|
const CONST_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
|
||||||
|
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
const CONST_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
|
const CONST_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ enum EnumChangeNameCStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumChangeNameCStyleVariant {
|
enum EnumChangeNameCStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -59,7 +59,7 @@ enum EnumChangeNameTupleStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumChangeNameTupleStyleVariant {
|
enum EnumChangeNameTupleStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -76,7 +76,7 @@ enum EnumChangeNameStructStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumChangeNameStructStyleVariant {
|
enum EnumChangeNameStructStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -109,7 +109,7 @@ enum EnumChangeValueCStyleVariant1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumChangeValueCStyleVariant1 {
|
enum EnumChangeValueCStyleVariant1 {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -125,7 +125,7 @@ enum EnumAddCStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddCStyleVariant {
|
enum EnumAddCStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -142,7 +142,7 @@ enum EnumRemoveCStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumRemoveCStyleVariant {
|
enum EnumRemoveCStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -157,7 +157,7 @@ enum EnumAddTupleStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddTupleStyleVariant {
|
enum EnumAddTupleStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -174,7 +174,7 @@ enum EnumRemoveTupleStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumRemoveTupleStyleVariant {
|
enum EnumRemoveTupleStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -189,7 +189,7 @@ enum EnumAddStructStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddStructStyleVariant {
|
enum EnumAddStructStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -206,7 +206,7 @@ enum EnumRemoveStructStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumRemoveStructStyleVariant {
|
enum EnumRemoveStructStyleVariant {
|
||||||
Variant1,
|
Variant1,
|
||||||
@ -257,7 +257,7 @@ enum EnumChangeFieldNameStructStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumChangeFieldNameStructStyleVariant {
|
enum EnumChangeFieldNameStructStyleVariant {
|
||||||
Variant1 { a: u32, c: u32 },
|
Variant1 { a: u32, c: u32 },
|
||||||
@ -289,7 +289,7 @@ enum EnumChangeFieldOrderStructStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumChangeFieldOrderStructStyleVariant {
|
enum EnumChangeFieldOrderStructStyleVariant {
|
||||||
Variant1 { b: f32, a: u32 },
|
Variant1 { b: f32, a: u32 },
|
||||||
@ -304,7 +304,7 @@ enum EnumAddFieldTupleStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddFieldTupleStyleVariant {
|
enum EnumAddFieldTupleStyleVariant {
|
||||||
Variant1(u32, u32, u32),
|
Variant1(u32, u32, u32),
|
||||||
@ -319,7 +319,7 @@ enum EnumAddFieldStructStyleVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddFieldStructStyleVariant {
|
enum EnumAddFieldStructStyleVariant {
|
||||||
Variant1 { a: u32, b: u32, c: u32 },
|
Variant1 { a: u32, b: u32, c: u32 },
|
||||||
@ -353,7 +353,7 @@ enum EnumAddReprC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
enum EnumAddReprC {
|
enum EnumAddReprC {
|
||||||
@ -402,7 +402,7 @@ enum EnumChangeNameOfLifetimeParameter<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(cfg="cfail2", except="PredicatesOfItem")]
|
#[rustc_dirty(cfg="cfail2", except="predicates_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumChangeNameOfLifetimeParameter<'b> {
|
enum EnumChangeNameOfLifetimeParameter<'b> {
|
||||||
Variant1(&'b u32),
|
Variant1(&'b u32),
|
||||||
@ -418,7 +418,7 @@ enum EnumAddLifetimeParameter<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(cfg="cfail2", except="PredicatesOfItem")]
|
#[rustc_dirty(cfg="cfail2", except="predicates_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddLifetimeParameter<'a, 'b> {
|
enum EnumAddLifetimeParameter<'a, 'b> {
|
||||||
Variant1(&'a u32),
|
Variant1(&'a u32),
|
||||||
@ -435,7 +435,7 @@ enum EnumAddLifetimeParameterBound<'a, 'b> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(cfg="cfail2", except="GenericsOfItem,TypeOfItem")]
|
#[rustc_dirty(cfg="cfail2", except="generics_of,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddLifetimeParameterBound<'a, 'b: 'a> {
|
enum EnumAddLifetimeParameterBound<'a, 'b: 'a> {
|
||||||
Variant1(&'a u32),
|
Variant1(&'a u32),
|
||||||
@ -450,7 +450,7 @@ enum EnumAddLifetimeBoundToParameter<'a, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(cfg="cfail2", except="TypeOfItem")]
|
#[rustc_dirty(cfg="cfail2", except="type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
|
enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
|
||||||
Variant1(T),
|
Variant1(T),
|
||||||
@ -482,7 +482,7 @@ enum EnumAddLifetimeParameterBoundWhere<'a, 'b> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(cfg="cfail2", except="GenericsOfItem,TypeOfItem")]
|
#[rustc_dirty(cfg="cfail2", except="generics_of,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
|
enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
|
||||||
Variant1(&'a u32),
|
Variant1(&'a u32),
|
||||||
@ -499,7 +499,7 @@ enum EnumAddLifetimeBoundToParameterWhere<'a, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(cfg="cfail2", except="TypeOfItem")]
|
#[rustc_dirty(cfg="cfail2", except="type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
|
enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
|
||||||
Variant1(T),
|
Variant1(T),
|
||||||
@ -618,7 +618,7 @@ mod change_trait_bound_indirectly {
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
use super::ReferencedTrait2 as Trait;
|
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")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum Enum<T: Trait> {
|
enum Enum<T: Trait> {
|
||||||
Variant1(T)
|
Variant1(T)
|
||||||
@ -634,7 +634,7 @@ mod change_trait_bound_indirectly_where {
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
use super::ReferencedTrait2 as Trait;
|
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")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
enum Enum<T> where T: Trait {
|
enum Enum<T> where T: Trait {
|
||||||
Variant1(T)
|
Variant1(T)
|
||||||
|
@ -117,7 +117,7 @@ pub fn type_parameter() {}
|
|||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2",
|
#[rustc_clean(cfg = "cfail2",
|
||||||
except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
|
except = "Hir, HirBody, generics_of, type_of, predicates_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn type_parameter<T>() {}
|
pub fn type_parameter<T>() {}
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ pub fn type_parameter<T>() {}
|
|||||||
pub fn lifetime_parameter() {}
|
pub fn lifetime_parameter() {}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, GenericsOfItem")]
|
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, generics_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn lifetime_parameter<'a>() {}
|
pub fn lifetime_parameter<'a>() {}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ pub fn lifetime_parameter<'a>() {}
|
|||||||
pub fn trait_bound<T>() {}
|
pub fn trait_bound<T>() {}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn trait_bound<T: Eq>() {}
|
pub fn trait_bound<T: Eq>() {}
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ pub fn trait_bound<T: Eq>() {}
|
|||||||
pub fn builtin_bound<T>() {}
|
pub fn builtin_bound<T>() {}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn builtin_bound<T: Send>() {}
|
pub fn builtin_bound<T: Send>() {}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ pub fn lifetime_bound<'a, T>() {}
|
|||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2",
|
#[rustc_clean(cfg = "cfail2",
|
||||||
except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
|
except = "Hir, HirBody, generics_of, type_of, predicates_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn lifetime_bound<'a, T: 'a>() {}
|
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>() {}
|
pub fn second_trait_bound<T: Eq>() {}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn second_trait_bound<T: Eq + Clone>() {}
|
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>() {}
|
pub fn second_builtin_bound<T: Send>() {}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")]
|
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, predicates_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn second_builtin_bound<T: Send + Sized>() {}
|
pub fn second_builtin_bound<T: Send + Sized>() {}
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ pub fn second_lifetime_bound<'a, 'b, T: 'a>() {}
|
|||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg = "cfail2",
|
#[rustc_clean(cfg = "cfail2",
|
||||||
except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")]
|
except = "Hir, HirBody, generics_of, type_of, predicates_of")]
|
||||||
#[rustc_clean(cfg = "cfail3")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {}
|
pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {}
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ pub mod change_trait_bound_indirectly {
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
use super::ReferencedTrait2 as Trait;
|
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")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn indirect_trait_bound<T: Trait>(p: T) {}
|
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))]
|
#[cfg(not(cfail1))]
|
||||||
use super::ReferencedTrait2 as Trait;
|
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")]
|
#[rustc_clean(cfg = "cfail3")]
|
||||||
pub fn indirect_trait_bound_where<T>(p: T)
|
pub fn indirect_trait_bound_where<T>(p: T)
|
||||||
where
|
where
|
||||||
|
@ -97,7 +97,7 @@ impl Foo {
|
|||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
impl Foo {
|
impl Foo {
|
||||||
#[rustc_dirty(cfg="cfail2", except="TypeOfItem,PredicatesOfItem")]
|
#[rustc_dirty(cfg="cfail2", except="type_of,predicates_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
pub fn method_selfness(&self) { }
|
pub fn method_selfness(&self) { }
|
||||||
}
|
}
|
||||||
@ -334,7 +334,7 @@ impl Foo {
|
|||||||
// appear dirty, that might be the cause. -nmatsakis
|
// appear dirty, that might be the cause. -nmatsakis
|
||||||
#[rustc_clean(
|
#[rustc_clean(
|
||||||
cfg="cfail2",
|
cfg="cfail2",
|
||||||
except="Hir,HirBody,GenericsOfItem,PredicatesOfItem,TypeOfItem",
|
except="Hir,HirBody,generics_of,predicates_of,type_of",
|
||||||
)]
|
)]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
pub fn add_type_parameter_to_method<T>(&self) { }
|
pub fn add_type_parameter_to_method<T>(&self) { }
|
||||||
@ -354,7 +354,7 @@ impl Foo {
|
|||||||
impl Foo {
|
impl Foo {
|
||||||
#[rustc_clean(
|
#[rustc_clean(
|
||||||
cfg="cfail2",
|
cfg="cfail2",
|
||||||
except="Hir,HirBody,GenericsOfItem,PredicatesOfItem,TypeOfItem,TypeckTables"
|
except="Hir,HirBody,generics_of,predicates_of,type_of,TypeckTables"
|
||||||
)]
|
)]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b: 'a>(&self) { }
|
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
|
// generics before the body, then the `HirId` for things in the
|
||||||
// body will be affected. So if you start to see `TypeckTables`
|
// body will be affected. So if you start to see `TypeckTables`
|
||||||
// appear dirty, that might be the cause. -nmatsakis
|
// appear dirty, that might be the cause. -nmatsakis
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,GenericsOfItem,PredicatesOfItem,\
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,generics_of,predicates_of,\
|
||||||
TypeOfItem")]
|
type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
pub fn add_lifetime_bound_to_type_param_of_method<'a, T: 'a>(&self) { }
|
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
|
// generics before the body, then the `HirId` for things in the
|
||||||
// body will be affected. So if you start to see `TypeckTables`
|
// body will be affected. So if you start to see `TypeckTables`
|
||||||
// appear dirty, that might be the cause. -nmatsakis
|
// 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")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
pub fn add_trait_bound_to_type_param_of_method<T: Clone>(&self) { }
|
pub fn add_trait_bound_to_type_param_of_method<T: Clone>(&self) { }
|
||||||
}
|
}
|
||||||
@ -442,12 +442,12 @@ impl Bar<u32> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,GenericsOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,generics_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
impl<T> Bar<T> {
|
impl<T> Bar<T> {
|
||||||
#[rustc_clean(
|
#[rustc_clean(
|
||||||
cfg="cfail2",
|
cfg="cfail2",
|
||||||
except="GenericsOfItem,FnSignature,TypeckTables,TypeOfItem,MirOptimized,MirBuilt"
|
except="generics_of,FnSignature,TypeckTables,type_of,MirOptimized,MirBuilt"
|
||||||
)]
|
)]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
pub fn add_type_parameter_to_impl(&self) { }
|
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;
|
static STATIC_CHANGE_TYPE_1: i16 = 0;
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
static STATIC_CHANGE_TYPE_1: u64 = 0;
|
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;
|
static STATIC_CHANGE_TYPE_2: Option<i8> = None;
|
||||||
|
|
||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
static STATIC_CHANGE_TYPE_2: Option<u16> = None;
|
static STATIC_CHANGE_TYPE_2: Option<u16> = None;
|
||||||
|
|
||||||
@ -144,11 +144,11 @@ mod static_change_type_indirectly {
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
use super::ReferencedType2 as Type;
|
use super::ReferencedType2 as Type;
|
||||||
|
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
static STATIC_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
|
static STATIC_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
|
||||||
|
|
||||||
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
|
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
static STATIC_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
|
static STATIC_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
|
||||||
}
|
}
|
||||||
|
@ -26,14 +26,14 @@ pub struct LayoutPacked;
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
#[repr(packed)]
|
#[repr(packed)]
|
||||||
pub struct LayoutPacked;
|
pub struct LayoutPacked;
|
||||||
|
|
||||||
@ -43,14 +43,14 @@ struct LayoutC;
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
struct LayoutC;
|
struct LayoutC;
|
||||||
|
|
||||||
@ -63,14 +63,14 @@ struct TupleStructFieldType(i32);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", 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
|
// 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.
|
// adding/removing fields or changing a fields name or visibility does.
|
||||||
struct TupleStructFieldType(
|
struct TupleStructFieldType(
|
||||||
@ -86,14 +86,14 @@ struct TupleStructAddField(i32);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct TupleStructAddField(
|
struct TupleStructAddField(
|
||||||
i32,
|
i32,
|
||||||
u32
|
u32
|
||||||
@ -108,14 +108,14 @@ struct TupleStructFieldVisibility(char);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct TupleStructFieldVisibility(pub char);
|
struct TupleStructFieldVisibility(pub char);
|
||||||
|
|
||||||
|
|
||||||
@ -127,14 +127,14 @@ struct RecordStructFieldType { x: f32 }
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", 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
|
// 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.
|
// adding/removing fields or changing a fields name or visibility does.
|
||||||
struct RecordStructFieldType {
|
struct RecordStructFieldType {
|
||||||
@ -150,14 +150,14 @@ struct RecordStructFieldName { x: f32 }
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct RecordStructFieldName { y: f32 }
|
struct RecordStructFieldName { y: f32 }
|
||||||
|
|
||||||
|
|
||||||
@ -169,14 +169,14 @@ struct RecordStructAddField { x: f32 }
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct RecordStructAddField {
|
struct RecordStructAddField {
|
||||||
x: f32,
|
x: f32,
|
||||||
y: () }
|
y: () }
|
||||||
@ -190,14 +190,14 @@ struct RecordStructFieldVisibility { x: f32 }
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct RecordStructFieldVisibility {
|
struct RecordStructFieldVisibility {
|
||||||
pub x: f32
|
pub x: f32
|
||||||
}
|
}
|
||||||
@ -211,14 +211,14 @@ struct AddLifetimeParameter<'a>(&'a f32, &'a f64);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct AddLifetimeParameter<'a, 'b>(&'a f32, &'b f64);
|
struct AddLifetimeParameter<'a, 'b>(&'a f32, &'b f64);
|
||||||
|
|
||||||
|
|
||||||
@ -230,14 +230,14 @@ struct AddLifetimeParameterBound<'a, 'b>(&'a f32, &'b f64);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct AddLifetimeParameterBound<'a, 'b: 'a>(
|
struct AddLifetimeParameterBound<'a, 'b: 'a>(
|
||||||
&'a f32,
|
&'a f32,
|
||||||
&'b f64
|
&'b f64
|
||||||
@ -249,14 +249,14 @@ struct AddLifetimeParameterBoundWhereClause<'a, 'b>(&'a f32, &'b f64);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
|
struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
|
||||||
&'a f32,
|
&'a f32,
|
||||||
&'b f64)
|
&'b f64)
|
||||||
@ -271,14 +271,14 @@ struct AddTypeParameter<T1>(T1, T1);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct AddTypeParameter<T1, T2>(
|
struct AddTypeParameter<T1, T2>(
|
||||||
// The field contains the parent's Generics, so it's dirty even though its
|
// The field contains the parent's Generics, so it's dirty even though its
|
||||||
// type hasn't changed.
|
// type hasn't changed.
|
||||||
@ -295,14 +295,14 @@ struct AddTypeParameterBound<T>(T);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct AddTypeParameterBound<T: Send>(
|
struct AddTypeParameterBound<T: Send>(
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
@ -314,14 +314,14 @@ struct AddTypeParameterBoundWhereClause<T>(T);
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct AddTypeParameterBoundWhereClause<T>(
|
struct AddTypeParameterBoundWhereClause<T>(
|
||||||
T
|
T
|
||||||
) where T: Sync;
|
) where T: Sync;
|
||||||
@ -334,14 +334,14 @@ struct AddTypeParameterBoundWhereClause<T>(
|
|||||||
// Note: there is no #[cfg(...)], so this is ALWAYS compiled
|
// Note: there is no #[cfg(...)], so this is ALWAYS compiled
|
||||||
#[rustc_clean(label="Hir", cfg="cfail2")]
|
#[rustc_clean(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail2")]
|
#[rustc_clean(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
pub struct EmptyStruct;
|
pub struct EmptyStruct;
|
||||||
|
|
||||||
|
|
||||||
@ -353,14 +353,14 @@ struct Visibility;
|
|||||||
#[cfg(not(cfail1))]
|
#[cfg(not(cfail1))]
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
pub struct Visibility;
|
pub struct Visibility;
|
||||||
|
|
||||||
struct ReferencedType1;
|
struct ReferencedType1;
|
||||||
@ -375,14 +375,14 @@ mod tuple_struct_change_field_type_indirectly {
|
|||||||
|
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct TupleStruct(
|
struct TupleStruct(
|
||||||
FieldType
|
FieldType
|
||||||
);
|
);
|
||||||
@ -398,14 +398,14 @@ mod record_struct_change_field_type_indirectly {
|
|||||||
|
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_clean(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct RecordStruct {
|
struct RecordStruct {
|
||||||
_x: FieldType
|
_x: FieldType
|
||||||
}
|
}
|
||||||
@ -426,14 +426,14 @@ mod change_trait_bound_indirectly {
|
|||||||
|
|
||||||
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
#[rustc_dirty(label="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct Struct<T: Trait>(T);
|
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="Hir", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
#[rustc_dirty(label="HirBody", cfg="cfail2")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
|
#[rustc_clean(label="type_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
|
#[rustc_clean(label="generics_of", cfg="cfail2")]
|
||||||
#[rustc_dirty(label="PredicatesOfItem", cfg="cfail2")]
|
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
|
||||||
#[rustc_clean(label="Hir", cfg="cfail3")]
|
#[rustc_clean(label="Hir", cfg="cfail3")]
|
||||||
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
#[rustc_clean(label="HirBody", cfg="cfail3")]
|
||||||
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
|
#[rustc_clean(label="type_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
|
#[rustc_clean(label="generics_of", cfg="cfail3")]
|
||||||
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
|
#[rustc_clean(label="predicates_of", cfg="cfail3")]
|
||||||
struct Struct<T>(T) where T : Trait;
|
struct Struct<T>(T) where T : Trait;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ struct WontChange {
|
|||||||
mod signatures {
|
mod signatures {
|
||||||
use WillChange;
|
use WillChange;
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ 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(AssociatedItems)] //~ ERROR no path
|
||||||
#[rustc_then_this_would_need(TraitDefOfItem)] //~ ERROR no path
|
#[rustc_then_this_would_need(TraitDefOfItem)] //~ ERROR no path
|
||||||
trait Bar {
|
trait Bar {
|
||||||
@ -42,14 +42,14 @@ mod signatures {
|
|||||||
WillChange { x: x, y: y }
|
WillChange { x: x, y: y }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
|
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||||
impl WillChange {
|
impl WillChange {
|
||||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||||
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
||||||
fn new(x: u32, y: u32) -> WillChange { loop { } }
|
fn new(x: u32, y: u32) -> WillChange { loop { } }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
|
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||||
impl WillChange {
|
impl WillChange {
|
||||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||||
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
||||||
@ -57,21 +57,21 @@ mod signatures {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct WillChanges {
|
struct WillChanges {
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
|
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||||
x: WillChange,
|
x: WillChange,
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
|
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||||
y: WillChange
|
y: WillChange
|
||||||
}
|
}
|
||||||
|
|
||||||
// The fields change, not the type itself.
|
// The fields change, not the type itself.
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
|
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||||
fn indirect(x: WillChanges) { }
|
fn indirect(x: WillChanges) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
mod invalid_signatures {
|
mod invalid_signatures {
|
||||||
use WontChange;
|
use WontChange;
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
|
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||||
trait A {
|
trait A {
|
||||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR no path
|
#[rustc_then_this_would_need(FnSignature)] //~ ERROR no path
|
||||||
fn do_something_else_twice(x: WontChange);
|
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
|
--> $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`
|
error: no path from `WillChange` to `AssociatedItems`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:28:5
|
--> $DIR/dep-graph-struct-signature.rs:28:5
|
||||||
@ -43,38 +43,38 @@ LL | #[rustc_then_this_would_need(TypeckTables)]
|
|||||||
error: OK
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:45:5
|
--> $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
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:52:5
|
--> $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
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:60:9
|
--> $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
|
error: OK
|
||||||
--> $DIR/dep-graph-struct-signature.rs:62:9
|
--> $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
|
--> $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
|
--> $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`
|
error: no path from `WillChange` to `FnSignature`
|
||||||
--> $DIR/dep-graph-struct-signature.rs:80:5
|
--> $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,
|
// The type alias directly affects the type of the field,
|
||||||
// not the enclosing struct:
|
// not the enclosing struct:
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
|
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||||
struct Struct {
|
struct Struct {
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
|
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||||
x: TypeAlias,
|
x: TypeAlias,
|
||||||
y: u32
|
y: u32
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
|
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||||
enum Enum {
|
enum Enum {
|
||||||
Variant1 {
|
Variant1 {
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
|
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||||
t: TypeAlias
|
t: TypeAlias
|
||||||
},
|
},
|
||||||
Variant2(i32)
|
Variant2(i32)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
|
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||||
trait Trait {
|
trait Trait {
|
||||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||||
fn method(&self, _: TypeAlias);
|
fn method(&self, _: TypeAlias);
|
||||||
@ -38,14 +38,14 @@ trait Trait {
|
|||||||
|
|
||||||
struct SomeType;
|
struct SomeType;
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
|
#[rustc_then_this_would_need(type_of)] //~ ERROR no path
|
||||||
impl SomeType {
|
impl SomeType {
|
||||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
||||||
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
|
||||||
fn method(&self, _: TypeAlias) {}
|
fn method(&self, _: TypeAlias) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
|
#[rustc_then_this_would_need(type_of)] //~ ERROR OK
|
||||||
type TypeAlias2 = TypeAlias;
|
type TypeAlias2 = TypeAlias;
|
||||||
|
|
||||||
#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
|
#[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
|
--> $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
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:19:5
|
--> $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
|
--> $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
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:27:9
|
--> $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
|
--> $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
|
--> $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
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:48:1
|
--> $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
|
error: OK
|
||||||
--> $DIR/dep-graph-type-alias.rs:51:1
|
--> $DIR/dep-graph-type-alias.rs:51:1
|
||||||
|
Loading…
Reference in New Issue
Block a user