Add no_hash to query macro and move some queries over

This commit is contained in:
John Kåre Alsaker 2019-03-20 16:06:09 +01:00
parent 0c8700b9d5
commit 72f8d4e222
28 changed files with 241 additions and 235 deletions

View File

@ -2811,6 +2811,7 @@ dependencies = [
name = "rustc_macros"
version = "0.1.0"
dependencies = [
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -461,11 +461,6 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
// Represents the MIR for a fn; also used as the task node for
// things read/modify that MIR.
[] MirConstQualif(DefId),
[] MirBuilt(DefId),
[] MirConst(DefId),
[] MirValidated(DefId),
[] MirOptimized(DefId),
[] MirShim { instance_def: InstanceDef<'tcx> },
[] BorrowCheckKrate,
@ -485,7 +480,6 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
[] CollectModItemTypes(DefId),
[] Reachability,
[] MirKeys,
[eval_always] CrateVariances,
// Nodes representing bits of computed IR in the tcx. Each shared

View File

@ -63,4 +63,47 @@ rustc_queries! {
desc { "checking if the crate is_panic_runtime" }
}
}
Codegen {
/// Set of all the `DefId`s in this crate that have MIR associated with
/// them. This includes all the body owners, but also things like struct
/// constructors.
query mir_keys(_: CrateNum) -> Lrc<DefIdSet> {
desc { "getting a list of all mir_keys" }
}
/// Maps DefId's that have an associated Mir to the result
/// of the MIR qualify_consts pass. The actual meaning of
/// the value isn't known except to the pass itself.
query mir_const_qualif(key: DefId) -> (u8, Lrc<BitSet<mir::Local>>) {
cache { key.is_local() }
}
/// Fetch the MIR for a given `DefId` right after it's built - this includes
/// unreachable code.
query mir_built(_: DefId) -> &'tcx Steal<mir::Mir<'tcx>> {}
/// Fetch the MIR for a given `DefId` up till the point where it is
/// ready for const evaluation.
///
/// See the README for the `mir` module for details.
query mir_const(_: DefId) -> &'tcx Steal<mir::Mir<'tcx>> {
no_hash
}
query mir_validated(_: DefId) -> &'tcx Steal<mir::Mir<'tcx>> {
no_hash
}
/// MIR after our optimization passes have run. This is MIR that is ready
/// for codegen. This is also the only query that can fetch non-local MIR, at present.
query optimized_mir(key: DefId) -> &'tcx mir::Mir<'tcx> {
cache { key.is_local() }
load_cached(tcx, id) {
let mir: Option<crate::mir::Mir<'tcx>> = tcx.queries.on_disk_cache
.try_load_query_result(tcx, id);
mir.map(|x| tcx.alloc_mir(x))
}
}
}
}

View File

@ -431,12 +431,6 @@ impl<'tcx> QueryDescription<'tcx> for queries::const_eval_raw<'tcx> {
}
}
impl<'tcx> QueryDescription<'tcx> for queries::mir_keys<'tcx> {
fn describe(_: TyCtxt<'_, '_, '_>, _: CrateNum) -> Cow<'static, str> {
"getting a list of all mir_keys".into()
}
}
impl<'tcx> QueryDescription<'tcx> for queries::symbol_name<'tcx> {
fn describe(_tcx: TyCtxt<'_, '_, '_>, instance: ty::Instance<'tcx>) -> Cow<'static, str> {
format!("computing the symbol for `{}`", instance).into()
@ -898,21 +892,6 @@ impl<'tcx> QueryDescription<'tcx> for queries::typeck_tables_of<'tcx> {
}
}
impl<'tcx> QueryDescription<'tcx> for queries::optimized_mir<'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 mir: Option<crate::mir::Mir<'tcx>> = tcx.queries.on_disk_cache
.try_load_query_result(tcx, id);
mir.map(|x| tcx.alloc_mir(x))
}
}
impl<'tcx> QueryDescription<'tcx> for queries::substitute_normalize_and_test_predicates<'tcx> {
fn describe(tcx: TyCtxt<'_, '_, '_>, key: (DefId, SubstsRef<'tcx>)) -> Cow<'static, str> {
format!("testing substituted normalized predicates:`{}`", tcx.def_path_str(key.0)).into()
@ -997,7 +976,6 @@ impl_disk_cacheable_query!(mir_borrowck, |tcx, def_id| {
impl_disk_cacheable_query!(unsafety_check_result, |_, def_id| def_id.is_local());
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!(check_match, |_, def_id| def_id.is_local());
impl_disk_cacheable_query!(def_symbol_name, |_, _| true);
impl_disk_cacheable_query!(predicates_of, |_, def_id| def_id.is_local());

View File

@ -205,34 +205,6 @@ rustc_query_append! { [define_queries!][ <'tcx>
[] fn inherent_impls: InherentImpls(DefId) -> Lrc<Vec<DefId>>,
},
Codegen {
/// Set of all the `DefId`s in this crate that have MIR associated with
/// them. This includes all the body owners, but also things like struct
/// constructors.
[] fn mir_keys: mir_keys(CrateNum) -> Lrc<DefIdSet>,
/// Maps DefId's that have an associated Mir to the result
/// of the MIR qualify_consts pass. The actual meaning of
/// the value isn't known except to the pass itself.
[] fn mir_const_qualif: MirConstQualif(DefId) -> (u8, Lrc<BitSet<mir::Local>>),
/// Fetch the MIR for a given `DefId` right after it's built - this includes
/// unreachable code.
[] fn mir_built: MirBuilt(DefId) -> &'tcx Steal<mir::Mir<'tcx>>,
/// Fetch the MIR for a given `DefId` up till the point where it is
/// ready for const evaluation.
///
/// See the README for the `mir` module for details.
[no_hash] fn mir_const: MirConst(DefId) -> &'tcx Steal<mir::Mir<'tcx>>,
[no_hash] fn mir_validated: MirValidated(DefId) -> &'tcx Steal<mir::Mir<'tcx>>,
/// MIR after our optimization passes have run. This is MIR that is ready
/// for codegen. This is also the only query that can fetch non-local MIR, at present.
[] fn optimized_mir: MirOptimized(DefId) -> &'tcx mir::Mir<'tcx>,
},
TypeChecking {
/// The result of unsafety-checking this `DefId`.
[] fn unsafety_check_result: UnsafetyCheckResult(DefId) -> mir::UnsafetyCheckResult,
@ -796,10 +768,6 @@ fn const_eval_raw_dep_node<'tcx>(param_env: ty::ParamEnvAnd<'tcx, GlobalId<'tcx>
DepConstructor::ConstEvalRaw { param_env }
}
fn mir_keys<'tcx>(_: CrateNum) -> DepConstructor<'tcx> {
DepConstructor::MirKeys
}
fn crate_variances<'tcx>(_: CrateNum) -> DepConstructor<'tcx> {
DepConstructor::CrateVariances
}

View File

@ -1262,11 +1262,6 @@ pub fn force_from_dep_node<'tcx>(
},
DepKind::PrivacyAccessLevels => { force!(privacy_access_levels, LOCAL_CRATE); }
DepKind::CheckPrivateInPublic => { force!(check_private_in_public, LOCAL_CRATE); }
DepKind::MirBuilt => { force!(mir_built, def_id!()); }
DepKind::MirConstQualif => { force!(mir_const_qualif, def_id!()); }
DepKind::MirConst => { force!(mir_const, def_id!()); }
DepKind::MirValidated => { force!(mir_validated, def_id!()); }
DepKind::MirOptimized => { force!(optimized_mir, def_id!()); }
DepKind::BorrowCheck => { force!(borrowck, def_id!()); }
DepKind::MirBorrowCheck => { force!(mir_borrowck, def_id!()); }
@ -1282,7 +1277,6 @@ pub fn force_from_dep_node<'tcx>(
DepKind::CheckModImplWf => { force!(check_mod_impl_wf, def_id!()); }
DepKind::CollectModItemTypes => { force!(collect_mod_item_types, def_id!()); }
DepKind::Reachability => { force!(reachable_set, LOCAL_CRATE); }
DepKind::MirKeys => { force!(mir_keys, LOCAL_CRATE); }
DepKind::CrateVariances => { force!(crate_variances, LOCAL_CRATE); }
DepKind::AssociatedItems => { force!(associated_item, def_id!()); }
DepKind::PredicatesDefinedOnItem => { force!(predicates_defined_on, def_id!()); }
@ -1491,11 +1485,11 @@ macro_rules! impl_load_from_cache {
impl_load_from_cache!(
TypeckTables => typeck_tables_of,
MirOptimized => optimized_mir,
optimized_mir => optimized_mir,
UnsafetyCheckResult => unsafety_check_result,
BorrowCheck => borrowck,
MirBorrowCheck => mir_borrowck,
MirConstQualif => mir_const_qualif,
mir_const_qualif => mir_const_qualif,
SymbolName => def_symbol_name,
ConstIsRvaluePromotableToStatic => const_is_rvalue_promotable_to_static,
CheckMatch => check_match,

View File

@ -66,11 +66,11 @@ const BASE_IMPL: &[&str] = &[
label_strs::ImplTraitRef,
];
/// DepNodes for MirBuilt/Optimized, which is relevant in "executable"
/// DepNodes for mir_built/Optimized, which is relevant in "executable"
/// code, i.e., functions+methods
const BASE_MIR: &[&str] = &[
label_strs::MirOptimized,
label_strs::MirBuilt,
label_strs::optimized_mir,
label_strs::mir_built,
];
/// Struct, Enum and Union DepNodes

View File

@ -12,3 +12,4 @@ synstructure = "0.10.1"
syn = { version = "0.15.22", features = ["full"] }
proc-macro2 = "0.4.24"
quote = "0.6.10"
itertools = "0.8"

View File

@ -8,6 +8,7 @@ use syn::parse::{Result, Parse, ParseStream};
use syn::punctuated::Punctuated;
use syn;
use quote::quote;
use itertools::Itertools;
#[allow(non_camel_case_types)]
mod kw {
@ -41,6 +42,9 @@ enum QueryModifier {
/// A cycle error for this query aborting the compilation with a fatal error.
FatalCycle,
/// Don't hash the result, instead just mark a query red if it runs
NoHash,
}
impl Parse for QueryModifier {
@ -88,6 +92,8 @@ impl Parse for QueryModifier {
Ok(QueryModifier::LoadCached(tcx, id, block))
} else if modifier == "fatal_cycle" {
Ok(QueryModifier::FatalCycle)
} else if modifier == "no_hash" {
Ok(QueryModifier::NoHash)
} else {
Err(Error::new(modifier.span(), "unknown query modifier"))
}
@ -185,6 +191,9 @@ struct QueryModifiers {
/// A cycle error for this query aborting the compilation with a fatal error.
fatal_cycle: bool,
/// Don't hash the result, instead just mark a query red if it runs
no_hash: bool,
}
/// Process query modifiers into a struct, erroring on duplicates
@ -193,6 +202,7 @@ fn process_modifiers(query: &mut Query) -> QueryModifiers {
let mut cache = None;
let mut desc = None;
let mut fatal_cycle = false;
let mut no_hash = false;
for modifier in query.modifiers.0.drain(..) {
match modifier {
QueryModifier::LoadCached(tcx, id, block) => {
@ -219,6 +229,12 @@ fn process_modifiers(query: &mut Query) -> QueryModifiers {
}
fatal_cycle = true;
}
QueryModifier::NoHash => {
if no_hash {
panic!("duplicate modifier `no_hash` for query `{}`", query.name);
}
no_hash = true;
}
}
}
QueryModifiers {
@ -226,6 +242,7 @@ fn process_modifiers(query: &mut Query) -> QueryModifiers {
cache,
desc,
fatal_cycle,
no_hash,
}
}
@ -325,16 +342,26 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
_ => quote! { #result_full },
};
let mut attributes = Vec::new();
// Pass on the fatal_cycle modifier
let fatal_cycle = if modifiers.fatal_cycle {
quote! { fatal_cycle }
} else {
quote! {}
if modifiers.fatal_cycle {
attributes.push(quote! { fatal_cycle });
};
// Pass on the no_hash modifier
if modifiers.no_hash {
attributes.push(quote! { no_hash });
};
let mut attribute_stream = quote! {};
for e in attributes.into_iter().intersperse(quote! {,}) {
attribute_stream.extend(e);
}
// Add the query to the group
group_stream.extend(quote! {
[#fatal_cycle] fn #name: #name(#arg) #result,
[#attribute_stream] fn #name: #name(#arg) #result,
});
add_query_description_impl(&query, modifiers, &mut query_description_stream);

View File

@ -25,7 +25,7 @@ pub fn change_callee_function() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_callee_function() {
callee2(1, 2)
@ -40,7 +40,7 @@ pub fn change_argument_function() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_argument_function() {
callee1(1, 3)
@ -81,7 +81,7 @@ pub fn change_callee_method() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_callee_method() {
let s = Struct;
@ -98,7 +98,7 @@ pub fn change_argument_method() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_argument_method() {
let s = Struct;
@ -115,7 +115,7 @@ pub fn change_ufcs_callee_method() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_ufcs_callee_method() {
let s = Struct;
@ -132,7 +132,7 @@ pub fn change_argument_method_ufcs() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_argument_method_ufcs() {
let s = Struct;
@ -149,7 +149,7 @@ pub fn change_to_ufcs() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
// One might think this would be expanded in the HirBody/Mir, but it actually
// results in slightly different Hir/Mir.
@ -171,7 +171,7 @@ pub mod change_ufcs_callee_indirectly {
#[cfg(not(cfail1))]
use super::Struct2 as Struct;
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]

View File

@ -37,7 +37,7 @@ pub fn add_parameter() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_parameter() {
let x = 0u32;
@ -53,7 +53,7 @@ pub fn change_parameter_pattern() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_parameter_pattern() {
let _ = |&x: &u32| x;
@ -84,7 +84,7 @@ pub fn add_type_ascription_to_parameter() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_type_ascription_to_parameter() {
let closure = |x: u32| x + 1u32;
@ -101,7 +101,7 @@ pub fn change_parameter_type() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_parameter_type() {
let closure = |x: u16| (x as u64) + 1;

View File

@ -34,7 +34,7 @@ pub fn change_field_value_struct_like() -> Enum {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_field_value_struct_like() -> Enum {
Enum::Struct {
@ -96,7 +96,7 @@ pub fn change_constructor_path_struct_like() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_struct_like() {
let _ = Enum2::Struct {
@ -119,7 +119,7 @@ pub fn change_constructor_variant_struct_like() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_variant_struct_like() {
let _ = Enum2::Struct2 {
@ -139,7 +139,7 @@ pub mod change_constructor_path_indirectly_struct_like {
#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,\
except="FnSignature,Hir,HirBody,optimized_mir,mir_built,\
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
@ -161,7 +161,7 @@ pub mod change_constructor_variant_indirectly_struct_like {
#[cfg(not(cfail1))]
use super::Enum2::Struct2 as Variant;
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Enum2 {
Variant {
@ -180,7 +180,7 @@ pub fn change_field_value_tuple_like() -> Enum {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_field_value_tuple_like() -> Enum {
Enum::Tuple(0, 1, 3)
@ -197,7 +197,7 @@ pub fn change_constructor_path_tuple_like() {
#[cfg(not(cfail1))]
#[rustc_clean(
cfg="cfail2",
except="HirBody,MirOptimized,MirBuilt,TypeckTables"
except="HirBody,optimized_mir,mir_built,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_tuple_like() {
@ -215,7 +215,7 @@ pub fn change_constructor_variant_tuple_like() {
#[cfg(not(cfail1))]
#[rustc_clean(
cfg="cfail2",
except="HirBody,MirOptimized,MirBuilt,TypeckTables"
except="HirBody,optimized_mir,mir_built,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_variant_tuple_like() {
@ -232,7 +232,7 @@ pub mod change_constructor_path_indirectly_tuple_like {
#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,\
except="FnSignature,Hir,HirBody,optimized_mir,mir_built,\
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
@ -251,7 +251,7 @@ pub mod change_constructor_variant_indirectly_tuple_like {
#[cfg(not(cfail1))]
use super::Enum2::Tuple2 as Variant;
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Enum2 {
Variant(0, 1, 2)
@ -278,7 +278,7 @@ pub fn change_constructor_path_c_like() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_c_like() {
let _ = Clike2::B;
@ -293,7 +293,7 @@ pub fn change_constructor_variant_c_like() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_variant_c_like() {
let _ = Clike::C;
@ -309,7 +309,7 @@ pub mod change_constructor_path_indirectly_c_like {
#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,\
except="FnSignature,Hir,HirBody,optimized_mir,mir_built,\
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
@ -328,7 +328,7 @@ pub mod change_constructor_variant_indirectly_c_like {
#[cfg(not(cfail1))]
use super::Clike::B as Variant;
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Clike {
Variant

View File

@ -16,7 +16,7 @@ pub fn body_not_exported_to_metadata() -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn body_not_exported_to_metadata() -> u32 {
2
@ -35,7 +35,7 @@ pub fn body_exported_to_metadata_because_of_inline() -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[inline]
pub fn body_exported_to_metadata_because_of_inline() -> u32 {
@ -55,7 +55,7 @@ pub fn body_exported_to_metadata_because_of_generic() -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[inline]
pub fn body_exported_to_metadata_because_of_generic() -> u32 {

View File

@ -25,7 +25,7 @@ pub fn change_loop_body() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_loop_body() {
let mut _x = 0;
@ -48,7 +48,7 @@ pub fn change_iteration_variable_name() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_iteration_variable_name() {
let mut _x = 0;
@ -71,7 +71,7 @@ pub fn change_iteration_variable_pattern() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_iteration_variable_pattern() {
let mut _x = 0;
@ -94,7 +94,7 @@ pub fn change_iterable() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_iterable() {
let mut _x = 0;
@ -116,7 +116,7 @@ pub fn add_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_break() {
let mut _x = 0;
@ -187,7 +187,7 @@ pub fn change_break_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_break_label() {
let mut _x = 0;
@ -237,7 +237,7 @@ pub fn change_continue_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_label() {
let mut _x = 0;
@ -262,7 +262,7 @@ pub fn change_continue_to_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_to_break() {
let mut _x = 0;

View File

@ -24,7 +24,7 @@ pub fn add_parameter() {}
#[cfg(not(cfail1))]
#[rustc_clean(cfg = "cfail2",
except = "Hir, HirBody, MirBuilt, MirOptimized, TypeckTables, FnSignature")]
except = "Hir, HirBody, mir_built, optimized_mir, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub fn add_parameter(p: i32) {}
@ -47,7 +47,7 @@ pub fn type_of_parameter(p: i32) {}
#[cfg(not(cfail1))]
#[rustc_clean(cfg = "cfail2",
except = "Hir, HirBody, MirBuilt, MirOptimized, TypeckTables, FnSignature")]
except = "Hir, HirBody, mir_built, optimized_mir, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub fn type_of_parameter(p: i64) {}
@ -59,7 +59,7 @@ pub fn type_of_parameter_ref(p: &i32) {}
#[cfg(not(cfail1))]
#[rustc_clean(cfg = "cfail2",
except = "Hir, HirBody, MirBuilt, MirOptimized, TypeckTables, FnSignature")]
except = "Hir, HirBody, mir_built, optimized_mir, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub fn type_of_parameter_ref(p: &mut i32) {}
@ -71,7 +71,7 @@ pub fn order_of_parameters(p1: i32, p2: i64) {}
#[cfg(not(cfail1))]
#[rustc_clean(cfg = "cfail2",
except = "Hir, HirBody, MirBuilt, MirOptimized, TypeckTables, FnSignature")]
except = "Hir, HirBody, mir_built, optimized_mir, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub fn order_of_parameters(p2: i64, p1: i32) {}
@ -83,7 +83,7 @@ pub fn make_unsafe() {}
#[cfg(not(cfail1))]
#[rustc_clean(cfg = "cfail2",
except = "Hir, HirBody, MirBuilt, MirOptimized, TypeckTables, FnSignature")]
except = "Hir, HirBody, mir_built, optimized_mir, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub unsafe fn make_unsafe() {}
@ -94,7 +94,7 @@ pub unsafe fn make_unsafe() {}
pub fn make_extern() {}
#[cfg(not(cfail1))]
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, MirBuilt, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, mir_built, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub extern "C" fn make_extern() {}
@ -292,7 +292,7 @@ pub mod change_return_type_indirectly {
use super::ReferencedType2 as ReturnType;
#[rustc_clean(cfg = "cfail2",
except = "Hir, HirBody, MirBuilt, MirOptimized, TypeckTables, FnSignature")]
except = "Hir, HirBody, mir_built, optimized_mir, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub fn indirect_return_type() -> ReturnType {
ReturnType {}
@ -309,7 +309,7 @@ pub mod change_parameter_type_indirectly {
use super::ReferencedType2 as ParameterType;
#[rustc_clean(cfg = "cfail2",
except = "Hir, HirBody, MirBuilt, MirOptimized, TypeckTables, FnSignature")]
except = "Hir, HirBody, mir_built, optimized_mir, TypeckTables, FnSignature")]
#[rustc_clean(cfg = "cfail3")]
pub fn indirect_parameter_type(p: ParameterType) {}
}

View File

@ -25,7 +25,7 @@ pub fn change_condition(x: bool) -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_condition(x: bool) -> u32 {
if !x {
@ -46,7 +46,7 @@ pub fn change_then_branch(x: bool) -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_then_branch(x: bool) -> u32 {
if x {
@ -69,7 +69,7 @@ pub fn change_else_branch(x: bool) -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_else_branch(x: bool) -> u32 {
if x {
@ -120,7 +120,7 @@ pub fn change_condition_if_let(x: Option<u32>) -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_condition_if_let(x: Option<u32>) -> u32 {
if let Some(_) = x {
@ -143,7 +143,7 @@ pub fn change_then_branch_if_let(x: Option<u32>) -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_then_branch_if_let(x: Option<u32>) -> u32 {
if let Some(x) = x {
@ -166,7 +166,7 @@ pub fn change_else_branch_if_let(x: Option<u32>) -> u32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_else_branch_if_let(x: Option<u32>) -> u32 {
if let Some(x) = x {

View File

@ -42,7 +42,7 @@ impl Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl Foo {
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn method_body() {
println!("Hello, world!");
@ -63,7 +63,7 @@ impl Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl Foo {
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[inline]
pub fn method_body_inlined() {
@ -114,7 +114,7 @@ impl Foo {
impl Foo {
#[rustc_clean(
cfg="cfail2",
except="Hir,HirBody,FnSignature,TypeckTables,MirOptimized,MirBuilt"
except="Hir,HirBody,FnSignature,TypeckTables,optimized_mir,mir_built"
)]
#[rustc_clean(cfg="cfail3")]
pub fn method_selfmutness(&mut self) { }
@ -154,7 +154,7 @@ impl Foo {
impl Foo {
#[rustc_clean(
cfg="cfail2",
except="Hir,HirBody,FnSignature,TypeckTables,MirOptimized,MirBuilt"
except="Hir,HirBody,FnSignature,TypeckTables,optimized_mir,mir_built"
)]
#[rustc_clean(cfg="cfail3")]
pub fn add_method_parameter(&self, _: i32) { }
@ -172,7 +172,7 @@ impl Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl Foo {
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_method_parameter_name(&self, b: i64) { }
}
@ -191,7 +191,7 @@ impl Foo {
impl Foo {
#[rustc_clean(
cfg="cfail2",
except="Hir,HirBody,FnSignature,MirOptimized,MirBuilt,TypeckTables")]
except="Hir,HirBody,FnSignature,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_method_return_type(&self) -> u8 { 0 }
}
@ -226,7 +226,7 @@ impl Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl Foo {
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_method_parameter_order(&self, b: i64, a: i64) { }
}
@ -245,7 +245,7 @@ impl Foo {
impl Foo {
#[rustc_clean(
cfg="cfail2",
except="Hir,HirBody,FnSignature,TypeckTables,MirOptimized,MirBuilt"
except="Hir,HirBody,FnSignature,TypeckTables,optimized_mir,mir_built"
)]
#[rustc_clean(cfg="cfail3")]
pub unsafe fn make_method_unsafe(&self) { }
@ -263,7 +263,7 @@ impl Foo {
#[rustc_clean(cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
impl Foo {
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,MirBuilt,FnSignature,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,mir_built,FnSignature,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub extern fn make_method_extern(&self) { }
}
@ -447,7 +447,7 @@ impl Bar<u32> {
impl<T> Bar<T> {
#[rustc_clean(
cfg="cfail2",
except="generics_of,FnSignature,TypeckTables,type_of,MirOptimized,MirBuilt"
except="generics_of,FnSignature,TypeckTables,type_of,optimized_mir,mir_built"
)]
#[rustc_clean(cfg="cfail3")]
pub fn add_type_parameter_to_impl(&self) { }
@ -465,7 +465,7 @@ impl Bar<u32> {
#[rustc_clean(cfg="cfail2", except="Hir,HirBody")]
#[rustc_clean(cfg="cfail3")]
impl Bar<u64> {
#[rustc_clean(cfg="cfail2", except="FnSignature,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="FnSignature,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_impl_self_type(&self) { }
}

View File

@ -33,7 +33,7 @@ pub fn change_template(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub fn change_template(a: i32) -> i32 {
@ -69,7 +69,7 @@ pub fn change_output(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub fn change_output(a: i32) -> i32 {
@ -105,7 +105,7 @@ pub fn change_input(_a: i32, _b: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub fn change_input(_a: i32, _b: i32) -> i32 {
@ -140,7 +140,7 @@ pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
@ -175,7 +175,7 @@ pub fn change_clobber(_a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub fn change_clobber(_a: i32) -> i32 {
@ -210,7 +210,7 @@ pub fn change_options(_a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub fn change_options(_a: i32) -> i32 {

View File

@ -22,7 +22,7 @@ pub fn change_name() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized")]
except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_name() {
let _y = 2u64;
@ -38,7 +38,7 @@ pub fn add_type() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn add_type() {
let _x: u32 = 2u32;
@ -54,7 +54,7 @@ pub fn change_type() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_type() {
let _x: u8 = 2;
@ -70,7 +70,7 @@ pub fn change_mutability_of_reference_type() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_mutability_of_reference_type() {
let _x: &mut u64;
@ -86,7 +86,7 @@ pub fn change_mutability_of_slot() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_mutability_of_slot() {
let _x: u64 = 0;
@ -102,7 +102,7 @@ pub fn change_simple_binding_to_pattern() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_simple_binding_to_pattern() {
let (_a, _b) = (0u8, 'x');
@ -118,7 +118,7 @@ pub fn change_name_in_pattern() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized")]
except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_name_in_pattern() {
let (_a, _c) = (1u8, 'y');
@ -134,7 +134,7 @@ pub fn add_ref_in_pattern() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn add_ref_in_pattern() {
let (ref _a, _b) = (1u8, 'y');
@ -150,7 +150,7 @@ pub fn add_amp_in_pattern() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn add_amp_in_pattern() {
let (&_a, _b) = (&1u8, 'y');
@ -166,7 +166,7 @@ pub fn change_mutability_of_binding_in_pattern() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_mutability_of_binding_in_pattern() {
let (mut _a, _b) = (99u8, 'q');
@ -182,7 +182,7 @@ pub fn add_initializer() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,TypeckTables,MirBuilt,MirOptimized")]
except="HirBody,TypeckTables,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn add_initializer() {
let _x: i16 = 3i16;
@ -198,7 +198,7 @@ pub fn change_initializer() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized")]
except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_initializer() {
let _x = 5u16;

View File

@ -25,7 +25,7 @@ pub fn change_loop_body() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_loop_body() {
let mut _x = 0;
@ -47,7 +47,7 @@ pub fn add_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_break() {
let mut _x = 0;
@ -118,7 +118,7 @@ pub fn change_break_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_break_label() {
let mut _x = 0;
@ -168,7 +168,7 @@ pub fn change_continue_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_label() {
let mut _x = 0;
@ -193,7 +193,7 @@ pub fn change_continue_to_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_to_break() {
let mut _x = 0;

View File

@ -26,7 +26,7 @@ pub fn add_arm(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_arm(x: u32) -> u32 {
match x {
@ -51,7 +51,7 @@ pub fn change_order_of_arms(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized")]
except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_order_of_arms(x: u32) -> u32 {
match x {
@ -75,7 +75,7 @@ pub fn add_guard_clause(x: u32, y: bool) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_guard_clause(x: u32, y: bool) -> u32 {
match x {
@ -99,7 +99,7 @@ pub fn change_guard_clause(x: u32, y: bool) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_guard_clause(x: u32, y: bool) -> u32 {
match x {
@ -123,7 +123,7 @@ pub fn add_at_binding(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_at_binding(x: u32) -> u32 {
match x {
@ -147,7 +147,7 @@ pub fn change_name_of_at_binding(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized")]
except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_name_of_at_binding(x: u32) -> u32 {
match x {
@ -170,7 +170,7 @@ pub fn change_simple_name_to_pattern(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_simple_name_to_pattern(x: u32) -> u32 {
match (x, x & 1) {
@ -193,7 +193,7 @@ pub fn change_name_in_pattern(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized")]
except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_name_in_pattern(x: u32) -> u32 {
match (x, x & 1) {
@ -216,7 +216,7 @@ pub fn change_mutability_of_binding_in_pattern(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_mutability_of_binding_in_pattern(x: u32) -> u32 {
match (x, x & 1) {
@ -238,7 +238,7 @@ pub fn add_ref_to_binding_in_pattern(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_ref_to_binding_in_pattern(x: u32) -> u32 {
match (x, x & 1) {
@ -260,7 +260,7 @@ pub fn add_amp_to_binding_in_pattern(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_amp_to_binding_in_pattern(x: u32) -> u32 {
match (&x, x & 1) {
@ -283,7 +283,7 @@ pub fn change_rhs_of_arm(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized")]
except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_rhs_of_arm(x: u32) -> u32 {
match x {
@ -307,7 +307,7 @@ pub fn add_alternative_to_arm(x: u32) -> u32 {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2",
except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
except="HirBody,mir_built,optimized_mir,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_alternative_to_arm(x: u32) -> u32 {
match x {

View File

@ -18,7 +18,7 @@
// Indexing expression ---------------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn indexing(slice: &[u8]) -> u8 {
#[cfg(cfail1)]
@ -33,7 +33,7 @@ pub fn indexing(slice: &[u8]) -> u8 {
// Arithmetic overflow plus ----------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn arithmetic_overflow_plus(val: i32) -> i32 {
#[cfg(cfail1)]
@ -48,7 +48,7 @@ pub fn arithmetic_overflow_plus(val: i32) -> i32 {
// Arithmetic overflow minus ----------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn arithmetic_overflow_minus(val: i32) -> i32 {
#[cfg(cfail1)]
@ -63,7 +63,7 @@ pub fn arithmetic_overflow_minus(val: i32) -> i32 {
// Arithmetic overflow mult ----------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn arithmetic_overflow_mult(val: i32) -> i32 {
#[cfg(cfail1)]
@ -78,7 +78,7 @@ pub fn arithmetic_overflow_mult(val: i32) -> i32 {
// Arithmetic overflow negation ------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn arithmetic_overflow_negation(val: i32) -> i32 {
#[cfg(cfail1)]
@ -93,7 +93,7 @@ pub fn arithmetic_overflow_negation(val: i32) -> i32 {
// Division by zero ------------------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn division_by_zero(val: i32) -> i32 {
#[cfg(cfail1)]
@ -107,7 +107,7 @@ pub fn division_by_zero(val: i32) -> i32 {
}
// Division by zero ------------------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn mod_by_zero(val: i32) -> i32 {
#[cfg(cfail1)]
@ -122,7 +122,7 @@ pub fn mod_by_zero(val: i32) -> i32 {
// shift left ------------------------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn shift_left(val: i32, shift: usize) -> i32 {
#[cfg(cfail1)]
@ -137,7 +137,7 @@ pub fn shift_left(val: i32, shift: usize) -> i32 {
// shift right ------------------------------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn shift_right(val: i32, shift: usize) -> i32 {
#[cfg(cfail1)]

View File

@ -31,7 +31,7 @@ pub fn change_field_value_regular_struct() -> RegularStruct {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_field_value_regular_struct() -> RegularStruct {
RegularStruct {
@ -82,7 +82,7 @@ pub fn add_field_regular_struct() -> RegularStruct {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_field_regular_struct() -> RegularStruct {
let struct1 = RegularStruct {
@ -117,7 +117,7 @@ pub fn change_field_label_regular_struct() -> RegularStruct {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_field_label_regular_struct() -> RegularStruct {
let struct1 = RegularStruct {
@ -152,7 +152,7 @@ pub fn change_constructor_path_regular_struct() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_regular_struct() {
let _ = RegularStruct2 {
@ -173,7 +173,7 @@ pub mod change_constructor_path_indirectly_regular_struct {
#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,TypeckTables"
except="FnSignature,Hir,HirBody,optimized_mir,mir_built,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Struct {
@ -196,7 +196,7 @@ pub fn change_field_value_tuple_struct() -> TupleStruct {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_field_value_tuple_struct() -> TupleStruct {
TupleStruct(0, 1, 3)
@ -213,7 +213,7 @@ pub fn change_constructor_path_tuple_struct() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_tuple_struct() {
let _ = TupleStruct2(0, 1, 2);
@ -230,7 +230,7 @@ pub mod change_constructor_path_indirectly_tuple_struct {
#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,TypeckTables"
except="FnSignature,Hir,HirBody,optimized_mir,mir_built,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Struct {

View File

@ -21,7 +21,7 @@ pub fn const_negation() -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn const_negation() -> i32 {
-1
@ -36,7 +36,7 @@ pub fn const_bitwise_not() -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn const_bitwise_not() -> i32 {
!99
@ -51,7 +51,7 @@ pub fn var_negation(x: i32, y: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn var_negation(x: i32, y: i32) -> i32 {
-y
@ -66,7 +66,7 @@ pub fn var_bitwise_not(x: i32, y: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn var_bitwise_not(x: i32, y: i32) -> i32 {
!y
@ -81,7 +81,7 @@ pub fn var_deref(x: &i32, y: &i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt,TypeckTables", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built,TypeckTables", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn var_deref(x: &i32, y: &i32) -> i32 {
*y
@ -96,7 +96,7 @@ pub fn first_const_add() -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn first_const_add() -> i32 {
2 + 3
@ -111,7 +111,7 @@ pub fn second_const_add() -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn second_const_add() -> i32 {
1 + 3
@ -126,7 +126,7 @@ pub fn first_var_add(a: i32, b: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn first_var_add(a: i32, b: i32) -> i32 {
b + 2
@ -141,7 +141,7 @@ pub fn second_var_add(a: i32, b: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn second_var_add(a: i32, b: i32) -> i32 {
1 + b
@ -156,7 +156,7 @@ pub fn plus_to_minus(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn plus_to_minus(a: i32) -> i32 {
1 - a
@ -171,7 +171,7 @@ pub fn plus_to_mult(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn plus_to_mult(a: i32) -> i32 {
1 * a
@ -186,7 +186,7 @@ pub fn plus_to_div(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn plus_to_div(a: i32) -> i32 {
1 / a
@ -201,7 +201,7 @@ pub fn plus_to_mod(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn plus_to_mod(a: i32) -> i32 {
1 % a
@ -216,7 +216,7 @@ pub fn and_to_or(a: bool, b: bool) -> bool {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn and_to_or(a: bool, b: bool) -> bool {
a || b
@ -231,7 +231,7 @@ pub fn bitwise_and_to_bitwise_or(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn bitwise_and_to_bitwise_or(a: i32) -> i32 {
1 | a
@ -246,7 +246,7 @@ pub fn bitwise_and_to_bitwise_xor(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn bitwise_and_to_bitwise_xor(a: i32) -> i32 {
1 ^ a
@ -261,7 +261,7 @@ pub fn bitwise_and_to_lshift(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn bitwise_and_to_lshift(a: i32) -> i32 {
a << 1
@ -276,7 +276,7 @@ pub fn bitwise_and_to_rshift(a: i32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn bitwise_and_to_rshift(a: i32) -> i32 {
a >> 1
@ -291,7 +291,7 @@ pub fn eq_to_uneq(a: i32) -> bool {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn eq_to_uneq(a: i32) -> bool {
a != 1
@ -306,7 +306,7 @@ pub fn eq_to_lt(a: i32) -> bool {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn eq_to_lt(a: i32) -> bool {
a < 1
@ -321,7 +321,7 @@ pub fn eq_to_gt(a: i32) -> bool {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn eq_to_gt(a: i32) -> bool {
a > 1
@ -336,7 +336,7 @@ pub fn eq_to_le(a: i32) -> bool {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn eq_to_le(a: i32) -> bool {
a <= 1
@ -351,7 +351,7 @@ pub fn eq_to_ge(a: i32) -> bool {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn eq_to_ge(a: i32) -> bool {
a >= 1
@ -368,7 +368,7 @@ pub fn type_cast(a: u8) -> u64 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt,TypeckTables", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built,TypeckTables", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn type_cast(a: u8) -> u64 {
let b = a as u32;
@ -385,7 +385,7 @@ pub fn value_cast(a: u32) -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn value_cast(a: u32) -> i32 {
2 as i32
@ -403,7 +403,7 @@ pub fn place() -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn place() -> i32 {
let mut x = 10;
@ -423,7 +423,7 @@ pub fn rvalue() -> i32 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn rvalue() -> i32 {
let mut x = 10;
@ -440,7 +440,7 @@ pub fn index_to_slice(s: &[u8], i: usize, j: usize) -> u8 {
}
#[cfg(not(cfail1))]
#[rustc_clean(except="HirBody,MirOptimized,MirBuilt", cfg="cfail2")]
#[rustc_clean(except="HirBody,optimized_mir,mir_built", cfg="cfail2")]
#[rustc_clean(cfg="cfail3")]
pub fn index_to_slice(s: &[u8], i: usize, j: usize) -> u8 {
s[j]

View File

@ -25,7 +25,7 @@ pub fn change_loop_body() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_loop_body() {
let mut _x = 0;
@ -48,7 +48,7 @@ pub fn change_loop_condition() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_loop_condition() {
let mut _x = 0;
@ -70,7 +70,7 @@ pub fn add_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_break() {
let mut _x = 0;
@ -141,7 +141,7 @@ pub fn change_break_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_break_label() {
let mut _x = 0;
@ -191,7 +191,7 @@ pub fn change_continue_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_label() {
let mut _x = 0;
@ -216,7 +216,7 @@ pub fn change_continue_to_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_to_break() {
let mut _x = 0;

View File

@ -25,7 +25,7 @@ pub fn change_loop_body() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_loop_body() {
let mut _x = 0;
@ -48,7 +48,7 @@ pub fn change_loop_condition() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_loop_condition() {
let mut _x = 0;
@ -70,7 +70,7 @@ pub fn add_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_break() {
let mut _x = 0;
@ -141,7 +141,7 @@ pub fn change_break_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_break_label() {
let mut _x = 0;
@ -191,7 +191,7 @@ pub fn change_continue_label() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_label() {
let mut _x = 0;
@ -216,7 +216,7 @@ pub fn change_continue_to_break() {
}
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_to_break() {
let mut _x = 0;

View File

@ -13,7 +13,7 @@ pub fn main() {
}
#[cfg(rpass2)]
#[rustc_dirty(label="MirOptimized", cfg="rpass2")]
#[rustc_dirty(label="optimized_mir", cfg="rpass2")]
pub fn main() {
let _ = 0u8 + 1;
}

View File

@ -19,7 +19,7 @@ pub mod x {
#[cfg(cfail2)]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_dirty(label="optimized_mir", cfg="cfail2")]
pub fn x() {
println!("{}", "2");
}
@ -29,7 +29,7 @@ pub mod y {
use x;
#[rustc_clean(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="optimized_mir", cfg="cfail2")]
pub fn y() {
x::x();
}
@ -39,7 +39,7 @@ pub mod z {
use y;
#[rustc_clean(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="optimized_mir", cfg="cfail2")]
pub fn z() {
y::y();
}