2016-09-29 16:59:15 -05:00
|
|
|
// This test case tests the incremental compilation hash (ICH) implementation
|
2016-09-30 10:12:37 -05:00
|
|
|
// for enum definitions.
|
2016-09-29 16:59:15 -05:00
|
|
|
|
|
|
|
// The general pattern followed here is: Change one thing between rev1 and rev2
|
|
|
|
// and make sure that the hash has changed, then change nothing between rev2 and
|
|
|
|
// rev3 and make sure that the hash has not changed.
|
|
|
|
|
2016-09-30 09:49:52 -05:00
|
|
|
// We also test the ICH for enum definitions exported in metadata. Same as
|
2016-09-29 16:59:15 -05:00
|
|
|
// above, we want to make sure that the change between rev1 and rev2 also
|
2016-09-30 10:34:33 -05:00
|
|
|
// results in a change of the ICH for the enum's metadata, and that it stays
|
2016-09-29 16:59:15 -05:00
|
|
|
// the same between rev2 and rev3.
|
|
|
|
|
2019-07-02 16:30:28 -05:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2021-04-22 14:33:16 -05:00
|
|
|
// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6
|
|
|
|
// compile-flags: -Z query-dep-graph
|
|
|
|
// [cfail1]compile-flags: -Zincremental-ignore-spans
|
|
|
|
// [cfail2]compile-flags: -Zincremental-ignore-spans
|
|
|
|
// [cfail3]compile-flags: -Zincremental-ignore-spans
|
|
|
|
// [cfail4]compile-flags: -Zincremental-relative-spans
|
|
|
|
// [cfail5]compile-flags: -Zincremental-relative-spans
|
|
|
|
// [cfail6]compile-flags: -Zincremental-relative-spans
|
2016-09-29 16:59:15 -05:00
|
|
|
|
|
|
|
#![allow(warnings)]
|
|
|
|
#![feature(rustc_attrs)]
|
2017-04-14 20:14:44 -05:00
|
|
|
#![feature(stmt_expr_attributes)]
|
2016-09-29 16:59:15 -05:00
|
|
|
#![crate_type="rlib"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change enum visibility -----------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2022-02-13 05:09:50 -06:00
|
|
|
enum EnumVisibility { A }
|
2016-09-29 16:59:15 -05:00
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2022-02-13 05:09:50 -06:00
|
|
|
#[rustc_clean(cfg="cfail2")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2022-02-13 05:09:50 -06:00
|
|
|
pub enum EnumVisibility { A }
|
2016-09-29 16:59:15 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change name of a c-style variant -------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameCStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameCStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2Changed,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change name of a tuple-style variant ---------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameTupleStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2(u32, f32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameTupleStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2Changed(u32, f32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change name of a struct-style variant --------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameStructStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2 { a: u32, b: f32 },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameStructStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2Changed { a: u32, b: f32 },
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change the value of a c-style variant --------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeValueCStyleVariant0 {
|
|
|
|
Variant1,
|
|
|
|
Variant2 = 11,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeValueCStyleVariant0 {
|
|
|
|
Variant1,
|
2021-04-22 14:33:16 -05:00
|
|
|
Variant2 = 22,
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeValueCStyleVariant1 {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeValueCStyleVariant1 {
|
|
|
|
Variant1,
|
|
|
|
Variant2 = 11,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a c-style variant ------------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddCStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddCStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remove a c-style variant ---------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumRemoveCStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumRemoveCStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a tuple-style variant --------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTupleStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTupleStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2(u32, f32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remove a tuple-style variant -----------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumRemoveTupleStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2(u32, f32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumRemoveTupleStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a struct-style variant -------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddStructStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddStructStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2 { a: u32, b: f32 },
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remove a struct-style variant ----------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumRemoveStructStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2 { a: u32, b: f32 },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumRemoveStructStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change the type of a field in a tuple-style variant ------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldTypeTupleStyleVariant {
|
|
|
|
Variant1(u32, u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldTypeTupleStyleVariant {
|
2017-04-05 16:39:02 -05:00
|
|
|
Variant1(u32,
|
|
|
|
u64),
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change the type of a field in a struct-style variant -----------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldTypeStructStyleVariant {
|
|
|
|
Variant1,
|
|
|
|
Variant2 { a: u32, b: u32 },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldTypeStructStyleVariant {
|
|
|
|
Variant1,
|
2017-04-05 16:39:02 -05:00
|
|
|
Variant2 {
|
|
|
|
a: u32,
|
|
|
|
b: u64
|
|
|
|
},
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change the name of a field in a struct-style variant -----------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldNameStructStyleVariant {
|
|
|
|
Variant1 { a: u32, b: u32 },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldNameStructStyleVariant {
|
|
|
|
Variant1 { a: u32, c: u32 },
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change order of fields in a tuple-style variant ----------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeOrderTupleStyleVariant {
|
|
|
|
Variant1(u32, u64),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeOrderTupleStyleVariant {
|
2017-04-05 16:39:02 -05:00
|
|
|
Variant1(
|
|
|
|
u64,
|
|
|
|
u32),
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change order of fields in a struct-style variant ---------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldOrderStructStyleVariant {
|
|
|
|
Variant1 { a: u32, b: f32 },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeFieldOrderStructStyleVariant {
|
2016-09-30 09:49:52 -05:00
|
|
|
Variant1 { b: f32, a: u32 },
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a field to a tuple-style variant ---------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddFieldTupleStyleVariant {
|
|
|
|
Variant1(u32, u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddFieldTupleStyleVariant {
|
|
|
|
Variant1(u32, u32, u32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a field to a struct-style variant --------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddFieldStructStyleVariant {
|
|
|
|
Variant1 { a: u32, b: u32 },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddFieldStructStyleVariant {
|
|
|
|
Variant1 { a: u32, b: u32, c: u32 },
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add #[must_use] to the enum ------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddMustUse {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-11-28 13:56:52 -06:00
|
|
|
#[rustc_clean(cfg="cfail2")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
#[must_use]
|
|
|
|
enum EnumAddMustUse {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add #[repr(C)] to the enum -------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddReprC {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-11-28 13:56:52 -06:00
|
|
|
#[rustc_clean(cfg="cfail2", except="type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
#[repr(C)]
|
|
|
|
enum EnumAddReprC {
|
|
|
|
Variant1,
|
|
|
|
Variant2,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change the name of a type parameter ----------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameOfTypeParameter<S> {
|
|
|
|
Variant1(S),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameOfTypeParameter<T> {
|
|
|
|
Variant1(T),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a type parameter ------------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTypeParameter<S> {
|
|
|
|
Variant1(S),
|
|
|
|
Variant2(S),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTypeParameter<S, T> {
|
|
|
|
Variant1(S),
|
|
|
|
Variant2(T),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change the name of a lifetime parameter ------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameOfLifetimeParameter<'a> {
|
|
|
|
Variant1(&'a u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumChangeNameOfLifetimeParameter<'b> {
|
|
|
|
Variant1(&'b u32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a lifetime parameter ---------------------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeParameter<'a> {
|
|
|
|
Variant1(&'a u32),
|
|
|
|
Variant2(&'a u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeParameter<'a, 'b> {
|
|
|
|
Variant1(&'a u32),
|
|
|
|
Variant2(&'b u32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a lifetime bound to a lifetime parameter -------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeParameterBound<'a, 'b> {
|
|
|
|
Variant1(&'a u32),
|
|
|
|
Variant2(&'b u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeParameterBound<'a, 'b: 'a> {
|
|
|
|
Variant1(&'a u32),
|
|
|
|
Variant2(&'b u32),
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add a lifetime bound to a type parameter -----------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeBoundToParameter<'a, T> {
|
|
|
|
Variant1(T),
|
|
|
|
Variant2(&'a u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
|
|
|
|
Variant1(T),
|
|
|
|
Variant2(&'a u32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a trait bound to a type parameter --------------------------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTraitBound<S> {
|
|
|
|
Variant1(S),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTraitBound<T: Sync> {
|
|
|
|
Variant1(T),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a lifetime bound to a lifetime parameter in where clause ---------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeParameterBoundWhere<'a, 'b> {
|
|
|
|
Variant1(&'a u32),
|
|
|
|
Variant2(&'b u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
|
|
|
|
Variant1(&'a u32),
|
|
|
|
Variant2(&'b u32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a lifetime bound to a type parameter in where clause -------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeBoundToParameterWhere<'a, T> {
|
|
|
|
Variant1(T),
|
|
|
|
Variant2(&'a u32),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
|
|
|
|
Variant1(T),
|
|
|
|
Variant2(&'a u32),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add a trait bound to a type parameter in where clause ----------------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTraitBoundWhere<S> {
|
|
|
|
Variant1(S),
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2021-05-16 03:14:57 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumAddTraitBoundWhere<T> where T: Sync {
|
|
|
|
Variant1(T),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// In an enum with two variants, swap usage of type parameters ----------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumSwapUsageTypeParameters<A, B> {
|
|
|
|
Variant1 { a: A },
|
|
|
|
Variant2 { a: B },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumSwapUsageTypeParameters<A, B> {
|
2017-04-05 16:39:02 -05:00
|
|
|
Variant1 {
|
|
|
|
a: B
|
|
|
|
},
|
|
|
|
Variant2 {
|
|
|
|
a: A
|
|
|
|
},
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// In an enum with two variants, swap usage of lifetime parameters ------------
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumSwapUsageLifetimeParameters<'a, 'b> {
|
|
|
|
Variant1 { a: &'a u32 },
|
|
|
|
Variant2 { b: &'b u32 },
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum EnumSwapUsageLifetimeParameters<'a, 'b> {
|
2017-04-05 16:39:02 -05:00
|
|
|
Variant1 {
|
|
|
|
a: &'b u32
|
|
|
|
},
|
|
|
|
Variant2 {
|
|
|
|
b: &'a u32
|
|
|
|
},
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct ReferencedType1;
|
|
|
|
struct ReferencedType2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change field type in tuple-style variant indirectly by modifying a use statement
|
|
|
|
mod change_field_type_indirectly_tuple_style {
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedType1 as FieldType;
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedType2 as FieldType;
|
|
|
|
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum TupleStyle {
|
2017-04-05 16:39:02 -05:00
|
|
|
Variant1(
|
|
|
|
FieldType
|
|
|
|
)
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change field type in record-style variant indirectly by modifying a use statement
|
|
|
|
mod change_field_type_indirectly_struct_style {
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedType1 as FieldType;
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedType2 as FieldType;
|
|
|
|
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum StructStyle {
|
2017-04-05 16:39:02 -05:00
|
|
|
Variant1 {
|
|
|
|
a: FieldType
|
|
|
|
}
|
2016-09-29 16:59:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trait ReferencedTrait1 {}
|
|
|
|
trait ReferencedTrait2 {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change trait bound of type parameter indirectly by modifying a use statement
|
|
|
|
mod change_trait_bound_indirectly {
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedTrait1 as Trait;
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedTrait2 as Trait;
|
|
|
|
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum Enum<T: Trait> {
|
|
|
|
Variant1(T)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change trait bound of type parameter in where clause indirectly by modifying a use statement
|
|
|
|
mod change_trait_bound_indirectly_where {
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(any(cfail1,cfail4))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedTrait1 as Trait;
|
2021-04-22 14:33:16 -05:00
|
|
|
#[cfg(not(any(cfail1,cfail4)))]
|
2016-09-29 16:59:15 -05:00
|
|
|
use super::ReferencedTrait2 as Trait;
|
|
|
|
|
2020-03-17 20:48:17 -05:00
|
|
|
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
|
2017-10-06 17:15:29 -05:00
|
|
|
#[rustc_clean(cfg="cfail3")]
|
2021-04-22 14:33:16 -05:00
|
|
|
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
|
|
|
|
#[rustc_clean(cfg="cfail6")]
|
2016-09-29 16:59:15 -05:00
|
|
|
enum Enum<T> where T: Trait {
|
|
|
|
Variant1(T)
|
|
|
|
}
|
|
|
|
}
|