authorbors <bors@rust-lang.org> 2026-04-22 06:20:12 UTC
committerbors <bors@rust-lang.org> 2026-04-22 06:20:12 UTC
logcf1817bc6ecd2d14ca492247c804bad31948dd56
treece1e42e6bcdc62b4a6a86c6445ade2c31ffa3b7c
parent1bfcb284f7a2199ad322daa463e29e708d5bc635
parent6fa2b1d01a0250d273b34529ce4202ea49f2a324

Auto merge of #155634 - jhpratt:rollup-lo99oO5, r=jhpratt

Rollup of 7 pull requests Successful merges: - rust-lang/rust#155589 (Forbid `check-pass`/`build-pass`/`run-pass` directives in incremental tests) - rust-lang/rust#155610 (Add missing `dyn` keyword to `trait_alias` page of the Unstable Book) - rust-lang/rust#155615 (test cleanups for `ui/derives` and `ui/deriving`) - rust-lang/rust#154874 (Fix ICE for inherited const conditions on const closures) - rust-lang/rust#155605 (std: Update support for `wasm32-wasip3`) - rust-lang/rust#155613 (c-variadic: tweak `std` docs) - rust-lang/rust#155619 (Remove a bunch of unnecessary explicit lifetimes from the ast validator)

114 files changed, 4090 insertions(+), 4118 deletions(-)

compiler/rustc_ast_passes/src/ast_validation.rs+16-16
......@@ -208,7 +208,7 @@ impl<'a> AstValidator<'a> {
208208 }
209209
210210 // Mirrors `visit::walk_ty`, but tracks relevant state.
211 fn walk_ty(&mut self, t: &'a Ty) {
211 fn walk_ty(&mut self, t: &Ty) {
212212 match &t.kind {
213213 TyKind::ImplTrait(_, bounds) => {
214214 self.with_impl_trait(Some(t.span), |this| visit::walk_ty(this, t));
......@@ -731,7 +731,7 @@ impl<'a> AstValidator<'a> {
731731 /// C-variadics must be:
732732 /// - Non-const
733733 /// - Either foreign, or free and `unsafe extern "C"` semantically
734 fn check_c_variadic_type(&self, fk: FnKind<'a>, attrs: &'a AttrVec) {
734 fn check_c_variadic_type(&self, fk: FnKind<'_>, attrs: &AttrVec) {
735735 // `...` is already rejected when it is not the final parameter.
736736 let variadic_param = match fk.decl().inputs.last() {
737737 Some(param) if matches!(param.ty.kind, TyKind::CVarArgs) => param,
......@@ -806,7 +806,7 @@ impl<'a> AstValidator<'a> {
806806 fn check_c_variadic_abi(
807807 &self,
808808 abi: ExternAbi,
809 attrs: &'a AttrVec,
809 attrs: &AttrVec,
810810 dotdotdot_span: Span,
811811 sig: &FnSig,
812812 ) {
......@@ -976,7 +976,7 @@ impl<'a> AstValidator<'a> {
976976 });
977977 }
978978
979 fn visit_ty_common(&mut self, ty: &'a Ty) {
979 fn visit_ty_common(&mut self, ty: &Ty) {
980980 match &ty.kind {
981981 TyKind::FnPtr(bfty) => {
982982 self.check_fn_ptr_safety(bfty.decl_span, bfty.safety);
......@@ -1039,13 +1039,13 @@ impl<'a> AstValidator<'a> {
10391039 }
10401040
10411041 // Used within `visit_item` for item kinds where we don't call `visit::walk_item`.
1042 fn visit_attrs_vis(&mut self, attrs: &'a AttrVec, vis: &'a Visibility) {
1042 fn visit_attrs_vis(&mut self, attrs: &AttrVec, vis: &Visibility) {
10431043 walk_list!(self, visit_attribute, attrs);
10441044 self.visit_vis(vis);
10451045 }
10461046
10471047 // Used within `visit_item` for item kinds where we don't call `visit::walk_item`.
1048 fn visit_attrs_vis_ident(&mut self, attrs: &'a AttrVec, vis: &'a Visibility, ident: &'a Ident) {
1048 fn visit_attrs_vis_ident(&mut self, attrs: &AttrVec, vis: &Visibility, ident: &Ident) {
10491049 walk_list!(self, visit_attribute, attrs);
10501050 self.visit_vis(vis);
10511051 self.visit_ident(ident);
......@@ -1125,17 +1125,17 @@ fn validate_generic_param_order(dcx: DiagCtxtHandle<'_>, generics: &[GenericPara
11251125 }
11261126}
11271127
1128impl<'a> Visitor<'a> for AstValidator<'a> {
1128impl Visitor<'_> for AstValidator<'_> {
11291129 fn visit_attribute(&mut self, attr: &Attribute) {
11301130 validate_attr::check_attr(&self.sess.psess, attr);
11311131 }
11321132
1133 fn visit_ty(&mut self, ty: &'a Ty) {
1133 fn visit_ty(&mut self, ty: &Ty) {
11341134 self.visit_ty_common(ty);
11351135 self.walk_ty(ty)
11361136 }
11371137
1138 fn visit_item(&mut self, item: &'a Item) {
1138 fn visit_item(&mut self, item: &Item) {
11391139 if item.attrs.iter().any(|attr| attr.is_proc_macro_attr()) {
11401140 self.has_proc_macro_decls = true;
11411141 }
......@@ -1477,7 +1477,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
14771477 self.lint_node_id = previous_lint_node_id;
14781478 }
14791479
1480 fn visit_foreign_item(&mut self, fi: &'a ForeignItem) {
1480 fn visit_foreign_item(&mut self, fi: &ForeignItem) {
14811481 match &fi.kind {
14821482 ForeignItemKind::Fn(box Fn { defaultness, ident, sig, body, .. }) => {
14831483 self.check_defaultness(fi.span, *defaultness, AllowDefault::No, AllowFinal::No);
......@@ -1527,7 +1527,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15271527 }
15281528
15291529 // Mirrors `visit::walk_generic_args`, but tracks relevant state.
1530 fn visit_generic_args(&mut self, generic_args: &'a GenericArgs) {
1530 fn visit_generic_args(&mut self, generic_args: &GenericArgs) {
15311531 match generic_args {
15321532 GenericArgs::AngleBracketed(data) => {
15331533 self.check_generic_args_before_constraints(data);
......@@ -1557,7 +1557,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15571557 }
15581558 }
15591559
1560 fn visit_generics(&mut self, generics: &'a Generics) {
1560 fn visit_generics(&mut self, generics: &Generics) {
15611561 let mut prev_param_default = None;
15621562 for param in &generics.params {
15631563 match param.kind {
......@@ -1613,7 +1613,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
16131613 }
16141614 }
16151615
1616 fn visit_param_bound(&mut self, bound: &'a GenericBound, ctxt: BoundKind) {
1616 fn visit_param_bound(&mut self, bound: &GenericBound, ctxt: BoundKind) {
16171617 match bound {
16181618 GenericBound::Trait(trait_ref) => {
16191619 match (ctxt, trait_ref.modifiers.constness, trait_ref.modifiers.polarity) {
......@@ -1671,7 +1671,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
16711671 visit::walk_param_bound(self, bound)
16721672 }
16731673
1674 fn visit_fn(&mut self, fk: FnKind<'a>, attrs: &AttrVec, span: Span, id: NodeId) {
1674 fn visit_fn(&mut self, fk: FnKind<'_>, attrs: &AttrVec, span: Span, id: NodeId) {
16751675 // Only associated `fn`s can have `self` parameters.
16761676 let self_semantic = match fk.ctxt() {
16771677 Some(FnCtxt::Assoc(_)) => SelfSemantic::Yes,
......@@ -1784,7 +1784,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
17841784 self.with_tilde_const(disallowed, |this| visit::walk_fn(this, fk));
17851785 }
17861786
1787 fn visit_assoc_item(&mut self, item: &'a AssocItem, ctxt: AssocCtxt) {
1787 fn visit_assoc_item(&mut self, item: &AssocItem, ctxt: AssocCtxt) {
17881788 if let Some(ident) = item.kind.ident()
17891789 && attr::contains_name(&item.attrs, sym::no_mangle)
17901790 {
......@@ -1931,7 +1931,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
19311931 }
19321932 }
19331933
1934 fn visit_anon_const(&mut self, anon_const: &'a AnonConst) {
1934 fn visit_anon_const(&mut self, anon_const: &AnonConst) {
19351935 self.with_tilde_const(
19361936 Some(TildeConstReason::AnonConst { span: anon_const.value.span }),
19371937 |this| visit::walk_anon_const(this, anon_const),
compiler/rustc_trait_selection/src/traits/effects.rs+2-9
......@@ -556,15 +556,8 @@ fn evaluate_host_effect_for_fn_goal<'tcx>(
556556
557557 ty::Closure(def, args) => {
558558 // For now we limit ourselves to closures without binders. The next solver can handle them.
559 let sig =
560 args.as_closure().sig().no_bound_vars().ok_or(EvaluationFailure::NoSolution)?;
561 (
562 def,
563 tcx.mk_args_from_iter(
564 [ty::GenericArg::from(*sig.inputs().get(0).unwrap()), sig.output().into()]
565 .into_iter(),
566 ),
567 )
559 args.as_closure().sig().no_bound_vars().ok_or(EvaluationFailure::NoSolution)?;
560 (def, args)
568561 }
569562
570563 // Everything else needs explicit impls or cannot have an impl
library/Cargo.lock+16-4
......@@ -346,6 +346,7 @@ dependencies = [
346346 "vex-sdk",
347347 "wasip1",
348348 "wasip2",
349 "wasip3",
349350 "windows-link 0.0.0",
350351]
351352
......@@ -418,9 +419,20 @@ dependencies = [
418419
419420[[package]]
420421name = "wasip2"
421version = "1.0.2+wasi-0.2.9"
422version = "1.0.3+wasi-0.2.9"
422423source = "registry+https://github.com/rust-lang/crates.io-index"
423checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
424checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6"
425dependencies = [
426 "rustc-std-workspace-alloc",
427 "rustc-std-workspace-core",
428 "wit-bindgen",
429]
430
431[[package]]
432name = "wasip3"
433version = "0.6.0+wasi-0.3.0-rc-2026-03-15"
434source = "registry+https://github.com/rust-lang/crates.io-index"
435checksum = "ed83456dd6a0b8581998c0365e4651fa2997e5093b49243b7f35391afaa7a3d9"
424436dependencies = [
425437 "rustc-std-workspace-alloc",
426438 "rustc-std-workspace-core",
......@@ -513,9 +525,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
513525
514526[[package]]
515527name = "wit-bindgen"
516version = "0.51.0"
528version = "0.57.1"
517529source = "registry+https://github.com/rust-lang/crates.io-index"
518checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
530checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
519531dependencies = [
520532 "rustc-std-workspace-alloc",
521533 "rustc-std-workspace-core",
library/core/src/ffi/va_list.rs+30-11
......@@ -213,14 +213,15 @@ crate::cfg_select! {
213213/// assert_eq!(unsafe { my_func(3, 42i32, -7i32, 20i32) }, 55);
214214/// ```
215215///
216/// The [`VaList::arg`] method can be used to read an argument from the list. This method
217/// automatically advances the `VaList` to the next argument. The C equivalent is `va_arg`.
216/// The [`VaList::arg`] method reads the next argument from the variable argument list,
217/// and is equivalent to C `va_arg`.
218218///
219219/// Cloning a `VaList` performs the equivalent of C `va_copy`, producing an independent cursor
220220/// that arguments can be read from without affecting the original. Dropping a `VaList` performs
221221/// the equivalent of C `va_end`.
222222///
223/// This can be used across an FFI boundary, and fully matches the platform's `va_list`.
223/// A `VaList` can be used across an FFI boundary, and fully matches the platform's `va_list` in
224/// terms of layout and ABI.
224225#[repr(transparent)]
225226#[lang = "va_list"]
226227pub struct VaList<'a> {
......@@ -285,17 +286,33 @@ mod sealed {
285286
286287/// Types that are valid to read using [`VaList::arg`].
287288///
288/// # Safety
289/// This trait is implemented for primitive types that have a variable argument application-binary
290/// interface (ABI) on the current platform. It is always implemented for:
291///
292/// - [`c_int`], [`c_long`] and [`c_longlong`]
293/// - [`c_uint`], [`c_ulong`] and [`c_ulonglong`]
294/// - [`c_double`]
295/// - `*const T` and `*mut T`
289296///
290/// The standard library implements this trait for primitive types that are
291/// expected to have a variable argument application-binary interface (ABI) on all
292/// platforms.
297/// Implementations for e.g. `i32` or `usize` shouldn't be relied upon directly,
298/// because they may not be available on all platforms.
299///
300/// # Safety
293301///
294/// When C passes variable arguments, integers smaller than [`c_int`] and floats smaller
295/// than [`c_double`] are implicitly promoted to [`c_int`] and [`c_double`] respectively.
296/// Implementing this trait for types that are subject to this promotion rule is invalid.
302/// When C passes variable arguments, signed integers smaller than [`c_int`] are promoted
303/// to [`c_int`], unsigned integers smaller than [`c_uint`] are promoted to [`c_uint`],
304/// and [`c_float`] is promoted to [`c_double`]. Implementing this trait for types that are
305/// subject to this promotion rule is invalid.
297306///
298307/// [`c_int`]: core::ffi::c_int
308/// [`c_long`]: core::ffi::c_long
309/// [`c_longlong`]: core::ffi::c_longlong
310///
311/// [`c_uint`]: core::ffi::c_uint
312/// [`c_ulong`]: core::ffi::c_ulong
313/// [`c_ulonglong`]: core::ffi::c_ulonglong
314///
315/// [`c_float`]: core::ffi::c_float
299316/// [`c_double`]: core::ffi::c_double
300317// We may unseal this trait in the future, but currently our `va_arg` implementations don't support
301318// types with an alignment larger than 8, or with a non-scalar layout. Inline assembly can be used
......@@ -352,14 +369,16 @@ const _: () = {
352369 va_arg_safe_check::<crate::ffi::c_int>();
353370 va_arg_safe_check::<crate::ffi::c_uint>();
354371 va_arg_safe_check::<crate::ffi::c_long>();
372
355373 va_arg_safe_check::<crate::ffi::c_ulong>();
356374 va_arg_safe_check::<crate::ffi::c_longlong>();
357375 va_arg_safe_check::<crate::ffi::c_ulonglong>();
376
358377 va_arg_safe_check::<crate::ffi::c_double>();
359378};
360379
361380impl<'f> VaList<'f> {
362 /// Read an argument from the variable argument list, and advance to the next argument.
381 /// Read the next argument from the variable argument list.
363382 ///
364383 /// Only types that implement [`VaArgSafe`] can be read from a variable argument list.
365384 ///
library/std/Cargo.toml+2-2
......@@ -84,12 +84,12 @@ wasip1 = { version = "1.0.0", features = [
8484], default-features = false }
8585
8686[target.'cfg(all(target_os = "wasi", target_env = "p2"))'.dependencies]
87wasip2 = { version = '1.0.2', features = [
87wasip2 = { version = '1.0.3', features = [
8888 'rustc-dep-of-std',
8989], default-features = false }
9090
9191[target.'cfg(all(target_os = "wasi", target_env = "p3"))'.dependencies]
92wasip2 = { version = '1.0.2', features = [
92wasip3 = { version = '0.6.0', features = [
9393 'rustc-dep-of-std',
9494], default-features = false }
9595
library/std/src/sys/args/mod.rs+2-2
......@@ -42,8 +42,8 @@ cfg_select! {
4242 pub use wasip1::*;
4343 }
4444 all(target_os = "wasi", any(target_env = "p2", target_env = "p3")) => {
45 mod wasip2;
46 pub use wasip2::*;
45 mod wasi;
46 pub use wasi::*;
4747 }
4848 target_os = "xous" => {
4949 mod xous;
library/std/src/sys/args/wasi.rs created+11
......@@ -0,0 +1,11 @@
1#[cfg(target_env = "p2")]
2use wasip2 as wasi;
3#[cfg(target_env = "p3")]
4use wasip3 as wasi;
5
6pub use super::common::Args;
7
8/// Returns the command line arguments
9pub fn args() -> Args {
10 Args::new(wasi::cli::environment::get_arguments().into_iter().map(|arg| arg.into()).collect())
11}
library/std/src/sys/args/wasip2.rs deleted-6
......@@ -1,6 +0,0 @@
1pub use super::common::Args;
2
3/// Returns the command line arguments
4pub fn args() -> Args {
5 Args::new(wasip2::cli::environment::get_arguments().into_iter().map(|arg| arg.into()).collect())
6}
library/std/src/sys/random/mod.rs+2-2
......@@ -95,8 +95,8 @@ cfg_select! {
9595 pub use wasip1::fill_bytes;
9696 }
9797 all(target_os = "wasi", any(target_env = "p2", target_env = "p3")) => {
98 mod wasip2;
99 pub use wasip2::{fill_bytes, hashmap_random_keys};
98 mod wasi;
99 pub use wasi::{fill_bytes, hashmap_random_keys};
100100 }
101101 target_os = "zkvm" => {
102102 mod zkvm;
library/std/src/sys/random/wasi.rs created+12
......@@ -0,0 +1,12 @@
1#[cfg(target_env = "p2")]
2use wasip2::random::{insecure_seed::insecure_seed as get_insecure_seed, random::get_random_bytes};
3#[cfg(target_env = "p3")]
4use wasip3::random::{insecure_seed::get_insecure_seed, random::get_random_bytes};
5
6pub fn fill_bytes(bytes: &mut [u8]) {
7 bytes.copy_from_slice(&get_random_bytes(u64::try_from(bytes.len()).unwrap()));
8}
9
10pub fn hashmap_random_keys() -> (u64, u64) {
11 get_insecure_seed()
12}
library/std/src/sys/random/wasip2.rs deleted-9
......@@ -1,9 +0,0 @@
1pub fn fill_bytes(bytes: &mut [u8]) {
2 bytes.copy_from_slice(&wasip2::random::random::get_random_bytes(
3 u64::try_from(bytes.len()).unwrap(),
4 ));
5}
6
7pub fn hashmap_random_keys() -> (u64, u64) {
8 wasip2::random::insecure_seed::insecure_seed()
9}
src/doc/rustc-dev-guide/src/tests/compiletest.md+5-4
......@@ -156,11 +156,12 @@ series of steps.
156156Compiletest starts with an empty directory with the `-C incremental` flag, and
157157then runs the compiler for each revision, reusing the incremental results from previous steps.
158158
159The revisions should start with:
159Each revision name must start with one of:
160160
161* `bfail` — the test should fail to compile
162* `bpass` — the test should compile successully
163* `rpass` — the test should compile and run successfully
161* `cpass` - the test must compile successfully (check build, no codegen)
162* `bfail` — the test must fail to compile (full build, with codegen)
163* `bpass` — the test must compile successully (full build, with codegen)
164* `rpass` — the test must compile and run successfully
164165
165166To make the revisions unique, you should add a suffix like `rpass1` and `rpass2`.
166167
src/doc/rustc-dev-guide/src/tests/directives.md+6-6
......@@ -70,11 +70,11 @@ See [Controlling pass/fail expectations](ui.md#controlling-passfail-expectations
7070
7171| Directive | Explanation | Supported test suites | Possible values |
7272|-----------------------------|---------------------------------------------|-------------------------------------------|-----------------|
73| `check-pass` | Building (no codegen) should pass | `ui`, `crashes`, `incremental` | N/A |
73| `check-pass` | Building (no codegen) should pass | `ui`, `crashes` | N/A |
7474| `check-fail` | Building (no codegen) should fail | `ui`, `crashes` | N/A |
75| `build-pass` | Building should pass | `ui`, `crashes`, `codegen`, `incremental` | N/A |
75| `build-pass` | Building should pass | `ui`, `crashes`, `codegen` | N/A |
7676| `build-fail` | Building should fail | `ui`, `crashes` | N/A |
77| `run-pass` | Program must exit with code `0` | `ui`, `crashes`, `incremental` | N/A |
77| `run-pass` | Program must exit with code `0` | `ui`, `crashes` | N/A |
7878| `run-fail` | Program must exit with code `1..=127` | `ui`, `crashes` | N/A |
7979| `run-crash` | Program must crash | `ui` | N/A |
8080| `run-fail-or-crash` | Program must `run-fail` or `run-crash` | `ui` | N/A |
......@@ -90,9 +90,9 @@ comparison](ui.md#output-comparison) and [Rustfix tests](ui.md#rustfix-tests) fo
9090
9191| Directive | Explanation | Supported test suites | Possible values |
9292|-----------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|-----------------------------------------------------------------------------------------|
93| `check-run-results` | Check run test binary `run-{pass,fail}` output snapshot | `ui`, `crashes`, `incremental` if `run-pass` | N/A |
94| `error-pattern` | Check that output contains a specific string | `ui`, `crashes`, `incremental` if `run-pass` | String |
95| `regex-error-pattern` | Check that output contains a regex pattern | `ui`, `crashes`, `incremental` if `run-pass` | Regex |
93| `check-run-results` | Check run test binary `run-{pass,fail}` output snapshot | `ui`, `crashes`, `incremental` | N/A |
94| `error-pattern` | Check that output contains a specific string | `ui`, `crashes`, `incremental` | String |
95| `regex-error-pattern` | Check that output contains a regex pattern | `ui`, `crashes`, `incremental` | Regex |
9696| `check-stdout` | Check `stdout` against `error-pattern`s from running test binary[^check_stdout] | `ui`, `crashes`, `incremental` | N/A |
9797| `normalize-stderr-32bit` | Normalize actual stderr (for 32-bit platforms) with a rule `"<raw>" -> "<normalized>"` before comparing against snapshot | `ui`, `incremental` | `"<RAW>" -> "<NORMALIZED>"`, `<RAW>`/`<NORMALIZED>` is regex capture and replace syntax |
9898| `normalize-stderr-64bit` | Normalize actual stderr (for 64-bit platforms) with a rule `"<raw>" -> "<normalized>"` before comparing against snapshot | `ui`, `incremental` | `"<RAW>" -> "<NORMALIZED>"`, `<RAW>`/`<NORMALIZED>` is regex capture and replace syntax |
src/doc/unstable-book/src/language-features/trait-alias.md+1-1
......@@ -26,7 +26,7 @@ pub fn main() {
2626 foo(&1);
2727
2828 // Use trait alias for trait objects.
29 let a: &Bar = &123;
29 let a: &dyn Bar = &123;
3030 println!("{:?}", a);
3131 let b = Box::new(456) as Box<dyn Foo>;
3232 println!("{:?}", b);
src/tools/compiletest/src/directives.rs-7
......@@ -439,13 +439,6 @@ impl TestProps {
439439 (TestMode::Ui, _) => (),
440440 (TestMode::Crashes, _) => (),
441441 (TestMode::Codegen, "build-pass") => (),
442 (TestMode::Incremental, _) => {
443 // FIXME(Zalathar): This only detects forbidden directives that are
444 // declared _after_ the incompatible `//@ revisions:` directive(s).
445 if self.revisions.iter().any(|r| !r.starts_with("bfail")) {
446 panic!("`{s}` directive is only supported in `bfail` incremental tests")
447 }
448 }
449442 (mode, _) => panic!("`{s}` directive is not supported in `{mode}` tests"),
450443 };
451444 let pass_mode = if config.parse_name_directive(ln, "check-pass") {
src/tools/compiletest/src/runtest.rs+6-3
......@@ -327,12 +327,15 @@ impl<'test> TestCx<'test> {
327327 TestMode::Incremental => {
328328 let revision =
329329 self.revision.expect("incremental tests require a list of revisions");
330 if revision.starts_with("bpass") || revision.starts_with("rpass") {
330 if revision.starts_with("cpass")
331 || revision.starts_with("bpass")
332 || revision.starts_with("rpass")
333 {
331334 true
332335 } else if revision.starts_with("bfail") {
333 pm.is_some()
336 false
334337 } else {
335 panic!("revision name must begin with `bfail`, `bpass`, or `rpass`");
338 panic!("revision name must begin with `cpass`, `bfail`, `bpass`, or `rpass`");
336339 }
337340 }
338341 mode => panic!("unimplemented for mode {:?}", mode),
src/tools/compiletest/src/runtest/incremental.rs+10-2
......@@ -1,4 +1,4 @@
1use super::{FailMode, ProcRes, TestCx, WillExecute};
1use super::{Emit, FailMode, PassMode, ProcRes, TestCx, WillExecute};
22
33impl TestCx<'_> {
44 pub(super) fn run_incremental_test(&self) {
......@@ -31,7 +31,9 @@ impl TestCx<'_> {
3131 write!(self.stdout, "revision={:?} props={:#?}", revision, self.props);
3232 }
3333
34 if revision.starts_with("bpass") {
34 if revision.starts_with("cpass") {
35 self.run_cpass_test();
36 } else if revision.starts_with("bpass") {
3537 self.run_bpass_test();
3638 } else if revision.starts_with("rpass") {
3739 self.run_rpass_test();
......@@ -42,6 +44,12 @@ impl TestCx<'_> {
4244 }
4345 }
4446
47 fn run_cpass_test(&self) {
48 let proc_res = self.compile_test(WillExecute::No, Emit::Metadata);
49 self.check_if_test_should_compile(None, Some(PassMode::Check), &proc_res);
50 self.check_compiler_output_for_incr(&proc_res);
51 }
52
4553 fn run_bpass_test(&self) {
4654 let emit_metadata = self.should_emit_metadata(self.pass_mode());
4755 let proc_res = self.compile_test(WillExecute::No, emit_metadata);
src/tools/tidy/src/deps.rs+1
......@@ -541,6 +541,7 @@ const PERMITTED_STDLIB_DEPENDENCIES: &[&str] = &[
541541 "vex-sdk",
542542 "wasip1",
543543 "wasip2",
544 "wasip3",
544545 "windows-link",
545546 "windows-sys",
546547 "windows-targets",
src/tools/tidy/src/issues.txt-9
......@@ -844,15 +844,6 @@ ui/derives/issue-43023.rs
844844ui/derives/issue-91492.rs
845845ui/derives/issue-91550.rs
846846ui/derives/issue-97343.rs
847ui/deriving/issue-103157.rs
848ui/deriving/issue-15689-1.rs
849ui/deriving/issue-15689-2.rs
850ui/deriving/issue-18738.rs
851ui/deriving/issue-19358.rs
852ui/deriving/issue-3935.rs
853ui/deriving/issue-58319.rs
854ui/deriving/issue-6341.rs
855ui/deriving/issue-89188-gat-hrtb.rs
856847ui/did_you_mean/issue-103909.rs
857848ui/did_you_mean/issue-105225-named-args.rs
858849ui/did_you_mean/issue-105225.rs
tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs+11-12
......@@ -2,21 +2,20 @@
22// crate. This should not cause anything we use to be invalidated.
33// Regression test for #36168.
44
5//@ revisions: bfail1 bfail2
5//@ revisions: bpass1 bpass2
66//@ compile-flags: -Z query-dep-graph
77//@ aux-build:point.rs
8//@ build-pass
98//@ ignore-backends: gcc
109
1110#![feature(rustc_attrs)]
1211#![allow(dead_code)]
1312#![crate_type = "rlib"]
1413
15#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bfail2")]
16#![rustc_partition_reused(module="struct_point-fn_calls_free_fn", cfg="bfail2")]
17#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")]
18#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")]
19#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")]
14#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bpass2")]
15#![rustc_partition_reused(module="struct_point-fn_calls_free_fn", cfg="bpass2")]
16#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")]
17#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")]
18#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")]
2019
2120extern crate point;
2221
......@@ -24,7 +23,7 @@ extern crate point;
2423pub mod fn_calls_methods_in_same_impl {
2524 use point::Point;
2625
27 #[rustc_clean(cfg="bfail2")]
26 #[rustc_clean(cfg="bpass2")]
2827 pub fn check() {
2928 let x = Point { x: 2.0, y: 2.0 };
3029 x.distance_from_origin();
......@@ -35,7 +34,7 @@ pub mod fn_calls_methods_in_same_impl {
3534pub mod fn_calls_free_fn {
3635 use point::{self, Point};
3736
38 #[rustc_clean(cfg="bfail2")]
37 #[rustc_clean(cfg="bpass2")]
3938 pub fn check() {
4039 let x = Point { x: 2.0, y: 2.0 };
4140 point::distance_squared(&x);
......@@ -46,7 +45,7 @@ pub mod fn_calls_free_fn {
4645pub mod fn_make_struct {
4746 use point::Point;
4847
49 #[rustc_clean(cfg="bfail2")]
48 #[rustc_clean(cfg="bpass2")]
5049 pub fn make_origin() -> Point {
5150 Point { x: 2.0, y: 2.0 }
5251 }
......@@ -56,7 +55,7 @@ pub mod fn_make_struct {
5655pub mod fn_read_field {
5756 use point::Point;
5857
59 #[rustc_clean(cfg="bfail2")]
58 #[rustc_clean(cfg="bpass2")]
6059 pub fn get_x(p: Point) -> f32 {
6160 p.x
6261 }
......@@ -66,7 +65,7 @@ pub mod fn_read_field {
6665pub mod fn_write_field {
6766 use point::Point;
6867
69 #[rustc_clean(cfg="bfail2")]
68 #[rustc_clean(cfg="bpass2")]
7069 pub fn inc_x(p: &mut Point) {
7170 p.x += 1.0;
7271 }
tests/incremental/change_add_field/struct_point.rs+22-23
......@@ -3,9 +3,8 @@
33// Fns with that type used only in their body are also recompiled, but
44// their callers are not.
55
6//@ revisions: bfail1 bfail2
6//@ revisions: bpass1 bpass2
77//@ compile-flags: -Z query-dep-graph
8//@ build-pass
98//@ ignore-backends: gcc
109
1110#![feature(rustc_attrs)]
......@@ -13,24 +12,24 @@
1312#![crate_type = "rlib"]
1413
1514// These are expected to require codegen.
16#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")]
17#![rustc_partition_codegened(module="struct_point-fn_with_type_in_sig", cfg="bfail2")]
18#![rustc_partition_codegened(module="struct_point-call_fn_with_type_in_sig", cfg="bfail2")]
19#![rustc_partition_codegened(module="struct_point-fn_with_type_in_body", cfg="bfail2")]
20#![rustc_partition_codegened(module="struct_point-fn_make_struct", cfg="bfail2")]
21#![rustc_partition_codegened(module="struct_point-fn_read_field", cfg="bfail2")]
22#![rustc_partition_codegened(module="struct_point-fn_write_field", cfg="bfail2")]
15#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")]
16#![rustc_partition_codegened(module="struct_point-fn_with_type_in_sig", cfg="bpass2")]
17#![rustc_partition_codegened(module="struct_point-call_fn_with_type_in_sig", cfg="bpass2")]
18#![rustc_partition_codegened(module="struct_point-fn_with_type_in_body", cfg="bpass2")]
19#![rustc_partition_codegened(module="struct_point-fn_make_struct", cfg="bpass2")]
20#![rustc_partition_codegened(module="struct_point-fn_read_field", cfg="bpass2")]
21#![rustc_partition_codegened(module="struct_point-fn_write_field", cfg="bpass2")]
2322
24#![rustc_partition_reused(module="struct_point-call_fn_with_type_in_body", cfg="bfail2")]
23#![rustc_partition_reused(module="struct_point-call_fn_with_type_in_body", cfg="bpass2")]
2524
2625pub mod point {
27 #[cfg(bfail1)]
26 #[cfg(bpass1)]
2827 pub struct Point {
2928 pub x: f32,
3029 pub y: f32,
3130 }
3231
33 #[cfg(bfail2)]
32 #[cfg(bpass2)]
3433 pub struct Point {
3534 pub x: f32,
3635 pub y: f32,
......@@ -39,18 +38,18 @@ pub mod point {
3938
4039 impl Point {
4140 pub fn origin() -> Point {
42 #[cfg(bfail1)]
41 #[cfg(bpass1)]
4342 return Point { x: 0.0, y: 0.0 };
4443
45 #[cfg(bfail2)]
44 #[cfg(bpass2)]
4645 return Point { x: 0.0, y: 0.0, z: 0.0 };
4746 }
4847
4948 pub fn total(&self) -> f32 {
50 #[cfg(bfail1)]
49 #[cfg(bpass1)]
5150 return self.x + self.y;
5251
53 #[cfg(bfail2)]
52 #[cfg(bpass2)]
5453 return self.x + self.y + self.z;
5554 }
5655
......@@ -70,7 +69,7 @@ pub mod point {
7069pub mod fn_with_type_in_sig {
7170 use point::Point;
7271
73 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")]
72 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")]
7473 pub fn boop(p: Option<&Point>) -> f32 {
7574 p.map(|p| p.total()).unwrap_or(0.0)
7675 }
......@@ -86,7 +85,7 @@ pub mod fn_with_type_in_sig {
8685pub mod call_fn_with_type_in_sig {
8786 use fn_with_type_in_sig;
8887
89 #[rustc_clean(except="typeck_root,optimized_mir", cfg="bfail2")]
88 #[rustc_clean(except="typeck_root,optimized_mir", cfg="bpass2")]
9089 pub fn bip() -> f32 {
9190 fn_with_type_in_sig::boop(None)
9291 }
......@@ -102,7 +101,7 @@ pub mod call_fn_with_type_in_sig {
102101pub mod fn_with_type_in_body {
103102 use point::Point;
104103
105 #[rustc_clean(except="typeck_root,optimized_mir", cfg="bfail2")]
104 #[rustc_clean(except="typeck_root,optimized_mir", cfg="bpass2")]
106105 pub fn boop() -> f32 {
107106 Point::origin().total()
108107 }
......@@ -115,7 +114,7 @@ pub mod fn_with_type_in_body {
115114pub mod call_fn_with_type_in_body {
116115 use fn_with_type_in_body;
117116
118 #[rustc_clean(cfg="bfail2")]
117 #[rustc_clean(cfg="bpass2")]
119118 pub fn bip() -> f32 {
120119 fn_with_type_in_body::boop()
121120 }
......@@ -125,7 +124,7 @@ pub mod call_fn_with_type_in_body {
125124pub mod fn_make_struct {
126125 use point::Point;
127126
128 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")]
127 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")]
129128 pub fn make_origin(p: Point) -> Point {
130129 Point { ..p }
131130 }
......@@ -135,7 +134,7 @@ pub mod fn_make_struct {
135134pub mod fn_read_field {
136135 use point::Point;
137136
138 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")]
137 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")]
139138 pub fn get_x(p: Point) -> f32 {
140139 p.x
141140 }
......@@ -145,7 +144,7 @@ pub mod fn_read_field {
145144pub mod fn_write_field {
146145 use point::Point;
147146
148 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")]
147 #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")]
149148 pub fn inc_x(p: &mut Point) {
150149 p.x += 1.0;
151150 }
tests/incremental/change_crate_dep_kind.rs+4-4
......@@ -2,16 +2,16 @@
22// detected then -Zincremental-verify-ich will trigger an assertion.
33
44//@ needs-unwind
5//@ revisions: bfail1 bfail2
5//@ revisions: bpass1 bpass2
66//@ compile-flags: -Z query-dep-graph -Cpanic=unwind
77//@ needs-unwind
8//@ build-pass (FIXME(62277): could be check-pass?)
98//@ ignore-backends: gcc
9// FIXME(#62277): could be check-pass?
1010
11#![cfg_attr(bfail1, feature(panic_unwind))]
11#![cfg_attr(bpass1, feature(panic_unwind))]
1212
1313// Turn the panic_unwind crate from an explicit into an implicit query:
14#[cfg(bfail1)]
14#[cfg(bpass1)]
1515extern crate panic_unwind;
1616
1717fn main() {}
tests/incremental/change_private_fn/struct_point.rs+15-15
......@@ -1,22 +1,22 @@
11// Test where we change the body of a private method in an impl.
22// We then test what sort of functions must be rebuilt as a result.
33
4//@ revisions: bfail1 bfail2
4//@ revisions: bpass1 bpass2
55//@ compile-flags: -Z query-dep-graph
6//@ build-pass (FIXME(62277): could be check-pass?)
76//@ ignore-backends: gcc
7// FIXME(#62277): could be check-pass?
88
99#![feature(rustc_attrs)]
1010#![allow(dead_code)]
1111#![crate_type = "rlib"]
1212
13#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")]
13#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")]
1414
15#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bfail2")]
16#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bfail2")]
17#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")]
18#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")]
19#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")]
15#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bpass2")]
16#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bpass2")]
17#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")]
18#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")]
19#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")]
2020
2121pub mod point {
2222 pub struct Point {
......@@ -25,10 +25,10 @@ pub mod point {
2525 }
2626
2727 fn distance_squared(this: &Point) -> f32 {
28 #[cfg(bfail1)]
28 #[cfg(bpass1)]
2929 return this.x + this.y;
3030
31 #[cfg(bfail2)]
31 #[cfg(bpass2)]
3232 return this.x * this.x + this.y * this.y;
3333 }
3434
......@@ -55,7 +55,7 @@ pub mod fn_calls_methods_in_same_impl {
5555 // (not just marked green) - for example, `DeadVisitor`
5656 // always runs during compilation as a "pass", and loads
5757 // the typeck_root results for bodies.
58 #[rustc_clean(cfg="bfail2", loaded_from_disk="typeck_root")]
58 #[rustc_clean(cfg="bpass2", loaded_from_disk="typeck_root")]
5959 pub fn check() {
6060 let x = Point { x: 2.0, y: 2.0 };
6161 x.distance_from_origin();
......@@ -66,7 +66,7 @@ pub mod fn_calls_methods_in_same_impl {
6666pub mod fn_calls_methods_in_another_impl {
6767 use point::Point;
6868
69 #[rustc_clean(cfg="bfail2")]
69 #[rustc_clean(cfg="bpass2")]
7070 pub fn check() {
7171 let mut x = Point { x: 2.0, y: 2.0 };
7272 x.translate(3.0, 3.0);
......@@ -77,7 +77,7 @@ pub mod fn_calls_methods_in_another_impl {
7777pub mod fn_make_struct {
7878 use point::Point;
7979
80 #[rustc_clean(cfg="bfail2")]
80 #[rustc_clean(cfg="bpass2")]
8181 pub fn make_origin() -> Point {
8282 Point { x: 2.0, y: 2.0 }
8383 }
......@@ -87,7 +87,7 @@ pub mod fn_make_struct {
8787pub mod fn_read_field {
8888 use point::Point;
8989
90 #[rustc_clean(cfg="bfail2")]
90 #[rustc_clean(cfg="bpass2")]
9191 pub fn get_x(p: Point) -> f32 {
9292 p.x
9393 }
......@@ -97,7 +97,7 @@ pub mod fn_read_field {
9797pub mod fn_write_field {
9898 use point::Point;
9999
100 #[rustc_clean(cfg="bfail2")]
100 #[rustc_clean(cfg="bpass2")]
101101 pub fn inc_x(p: &mut Point) {
102102 p.x += 1.0;
103103 }
tests/incremental/change_private_fn_cc/auxiliary/point.rs+2-2
......@@ -4,10 +4,10 @@ pub struct Point {
44}
55
66fn distance_squared(this: &Point) -> f32 {
7 #[cfg(bfail1)]
7 #[cfg(bpass1)]
88 return this.x + this.y;
99
10 #[cfg(bfail2)]
10 #[cfg(bpass2)]
1111 return this.x * this.x + this.y * this.y;
1212}
1313
tests/incremental/change_private_fn_cc/struct_point.rs+12-12
......@@ -1,21 +1,21 @@
11// Test where we change the body of a private method in an impl.
22// We then test what sort of functions must be rebuilt as a result.
33
4//@ revisions: bfail1 bfail2
4//@ revisions: bpass1 bpass2
55//@ compile-flags: -Z query-dep-graph
66//@ aux-build:point.rs
7//@ build-pass (FIXME(62277): could be check-pass?)
87//@ ignore-backends: gcc
8// FIXME(#62277): could be check-pass?
99
1010#![crate_type = "rlib"]
1111#![feature(rustc_attrs)]
1212#![allow(dead_code)]
1313
14#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bfail2")]
15#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bfail2")]
16#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")]
17#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")]
18#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")]
14#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bpass2")]
15#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bpass2")]
16#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")]
17#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")]
18#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")]
1919
2020extern crate point;
2121
......@@ -23,7 +23,7 @@ extern crate point;
2323pub mod fn_calls_methods_in_same_impl {
2424 use point::Point;
2525
26 #[rustc_clean(cfg="bfail2")]
26 #[rustc_clean(cfg="bpass2")]
2727 pub fn check() {
2828 let x = Point { x: 2.0, y: 2.0 };
2929 x.distance_from_origin();
......@@ -34,7 +34,7 @@ pub mod fn_calls_methods_in_same_impl {
3434pub mod fn_calls_methods_in_another_impl {
3535 use point::Point;
3636
37 #[rustc_clean(cfg="bfail2")]
37 #[rustc_clean(cfg="bpass2")]
3838 pub fn check() {
3939 let mut x = Point { x: 2.0, y: 2.0 };
4040 x.translate(3.0, 3.0);
......@@ -45,7 +45,7 @@ pub mod fn_calls_methods_in_another_impl {
4545pub mod fn_make_struct {
4646 use point::Point;
4747
48 #[rustc_clean(cfg="bfail2")]
48 #[rustc_clean(cfg="bpass2")]
4949 pub fn make_origin() -> Point {
5050 Point { x: 2.0, y: 2.0 }
5151 }
......@@ -55,7 +55,7 @@ pub mod fn_make_struct {
5555pub mod fn_read_field {
5656 use point::Point;
5757
58 #[rustc_clean(cfg="bfail2")]
58 #[rustc_clean(cfg="bpass2")]
5959 pub fn get_x(p: Point) -> f32 {
6060 p.x
6161 }
......@@ -65,7 +65,7 @@ pub mod fn_read_field {
6565pub mod fn_write_field {
6666 use point::Point;
6767
68 #[rustc_clean(cfg="bfail2")]
68 #[rustc_clean(cfg="bpass2")]
6969 pub fn inc_x(p: &mut Point) {
7070 p.x += 1.0;
7171 }
tests/incremental/change_private_impl_method/struct_point.rs+14-15
......@@ -1,22 +1,21 @@
11// Test where we change the body of a private method in an impl.
22// We then test what sort of functions must be rebuilt as a result.
33
4//@ revisions: bfail1 bfail2
4//@ revisions: bpass1 bpass2
55//@ compile-flags: -Z query-dep-graph
6//@ build-pass
76//@ ignore-backends: gcc
87
98#![feature(rustc_attrs)]
109#![allow(dead_code)]
1110#![crate_type = "rlib"]
1211
13#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")]
12#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")]
1413
15#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bfail2")]
16#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bfail2")]
17#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")]
18#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")]
19#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")]
14#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bpass2")]
15#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bpass2")]
16#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")]
17#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")]
18#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")]
2019
2120pub mod point {
2221 pub struct Point {
......@@ -26,10 +25,10 @@ pub mod point {
2625
2726 impl Point {
2827 pub fn distance_squared(&self) -> f32 {
29 #[cfg(bfail1)]
28 #[cfg(bpass1)]
3029 return self.x + self.y;
3130
32 #[cfg(bfail2)]
31 #[cfg(bpass2)]
3332 return self.x * self.x + self.y * self.y;
3433 }
3534
......@@ -51,7 +50,7 @@ pub mod point {
5150pub mod fn_calls_methods_in_same_impl {
5251 use point::Point;
5352
54 #[rustc_clean(cfg="bfail2")]
53 #[rustc_clean(cfg="bpass2")]
5554 pub fn check() {
5655 let x = Point { x: 2.0, y: 2.0 };
5756 x.distance_from_origin();
......@@ -62,7 +61,7 @@ pub mod fn_calls_methods_in_same_impl {
6261pub mod fn_calls_methods_in_another_impl {
6362 use point::Point;
6463
65 #[rustc_clean(cfg="bfail2")]
64 #[rustc_clean(cfg="bpass2")]
6665 pub fn check() {
6766 let mut x = Point { x: 2.0, y: 2.0 };
6867 x.translate(3.0, 3.0);
......@@ -73,7 +72,7 @@ pub mod fn_calls_methods_in_another_impl {
7372pub mod fn_make_struct {
7473 use point::Point;
7574
76 #[rustc_clean(cfg="bfail2")]
75 #[rustc_clean(cfg="bpass2")]
7776 pub fn make_origin() -> Point {
7877 Point { x: 2.0, y: 2.0 }
7978 }
......@@ -83,7 +82,7 @@ pub mod fn_make_struct {
8382pub mod fn_read_field {
8483 use point::Point;
8584
86 #[rustc_clean(cfg="bfail2")]
85 #[rustc_clean(cfg="bpass2")]
8786 pub fn get_x(p: Point) -> f32 {
8887 p.x
8988 }
......@@ -93,7 +92,7 @@ pub mod fn_read_field {
9392pub mod fn_write_field {
9493 use point::Point;
9594
96 #[rustc_clean(cfg="bfail2")]
95 #[rustc_clean(cfg="bpass2")]
9796 pub fn inc_x(p: &mut Point) {
9897 p.x += 1.0;
9998 }
tests/incremental/change_private_impl_method_cc/auxiliary/point.rs+2-2
......@@ -5,10 +5,10 @@ pub struct Point {
55
66impl Point {
77 fn distance_squared(&self) -> f32 {
8 #[cfg(bfail1)]
8 #[cfg(bpass1)]
99 return self.x + self.y;
1010
11 #[cfg(bfail2)]
11 #[cfg(bpass2)]
1212 return self.x * self.x + self.y * self.y;
1313 }
1414
tests/incremental/change_private_impl_method_cc/struct_point.rs+12-12
......@@ -1,22 +1,22 @@
11// Test where we change the body of a private method in an impl.
22// We then test what sort of functions must be rebuilt as a result.
33
4//@ revisions: bfail1 bfail2
4//@ revisions: bpass1 bpass2
55//@ compile-flags: -Z query-dep-graph
66//@ aux-build:point.rs
7//@ build-pass (FIXME(62277): could be check-pass?)
87//@ ignore-backends: gcc
8// FIXME(#62277): could be check-pass?
99
1010#![crate_type = "rlib"]
1111#![feature(rustc_attrs)]
1212#![allow(dead_code)]
1313
14#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")]
15#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")]
16#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")]
14#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")]
15#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")]
16#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")]
1717
18#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bfail2")]
19#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bfail2")]
18#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bpass2")]
19#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bpass2")]
2020
2121extern crate point;
2222
......@@ -24,7 +24,7 @@ extern crate point;
2424pub mod fn_calls_methods_in_same_impl {
2525 use point::Point;
2626
27 #[rustc_clean(cfg="bfail2")]
27 #[rustc_clean(cfg="bpass2")]
2828 pub fn check() {
2929 let x = Point { x: 2.0, y: 2.0 };
3030 x.distance_from_origin();
......@@ -35,7 +35,7 @@ pub mod fn_calls_methods_in_same_impl {
3535pub mod fn_calls_methods_in_another_impl {
3636 use point::Point;
3737
38 #[rustc_clean(cfg="bfail2")]
38 #[rustc_clean(cfg="bpass2")]
3939 pub fn dirty() {
4040 let mut x = Point { x: 2.0, y: 2.0 };
4141 x.translate(3.0, 3.0);
......@@ -46,7 +46,7 @@ pub mod fn_calls_methods_in_another_impl {
4646pub mod fn_make_struct {
4747 use point::Point;
4848
49 #[rustc_clean(cfg="bfail2")]
49 #[rustc_clean(cfg="bpass2")]
5050 pub fn make_origin() -> Point {
5151 Point { x: 2.0, y: 2.0 }
5252 }
......@@ -56,7 +56,7 @@ pub mod fn_make_struct {
5656pub mod fn_read_field {
5757 use point::Point;
5858
59 #[rustc_clean(cfg="bfail2")]
59 #[rustc_clean(cfg="bpass2")]
6060 pub fn get_x(p: Point) -> f32 {
6161 p.x
6262 }
......@@ -66,7 +66,7 @@ pub mod fn_read_field {
6666pub mod fn_write_field {
6767 use point::Point;
6868
69 #[rustc_clean(cfg="bfail2")]
69 #[rustc_clean(cfg="bpass2")]
7070 pub fn inc_x(p: &mut Point) {
7171 p.x += 1.0;
7272 }
tests/incremental/change_pub_inherent_method_body/struct_point.rs+14-15
......@@ -1,21 +1,20 @@
11// Test where we change the body of a public, inherent method.
22
3//@ revisions: bfail1 bfail2
3//@ revisions: bpass1 bpass2
44//@ compile-flags: -Z query-dep-graph
5//@ build-pass
65//@ ignore-backends: gcc
76
87#![crate_type = "rlib"]
98#![feature(rustc_attrs)]
109#![allow(dead_code)]
1110
12#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")]
11#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")]
1312
14#![rustc_partition_reused(module="struct_point-fn_calls_changed_method", cfg="bfail2")]
15#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bfail2")]
16#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")]
17#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")]
18#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")]
13#![rustc_partition_reused(module="struct_point-fn_calls_changed_method", cfg="bpass2")]
14#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bpass2")]
15#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")]
16#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")]
17#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")]
1918
2019pub mod point {
2120 pub struct Point {
......@@ -25,10 +24,10 @@ pub mod point {
2524
2625 impl Point {
2726 pub fn distance_from_origin(&self) -> f32 {
28 #[cfg(bfail1)]
27 #[cfg(bpass1)]
2928 return self.x * self.x + self.y * self.y;
3029
31 #[cfg(bfail2)]
30 #[cfg(bpass2)]
3231 return (self.x * self.x + self.y * self.y).sqrt();
3332 }
3433
......@@ -42,7 +41,7 @@ pub mod point {
4241pub mod fn_calls_changed_method {
4342 use point::Point;
4443
45 #[rustc_clean(cfg="bfail2")]
44 #[rustc_clean(cfg="bpass2")]
4645 pub fn check() {
4746 let p = Point { x: 2.0, y: 2.0 };
4847 p.distance_from_origin();
......@@ -53,7 +52,7 @@ pub mod fn_calls_changed_method {
5352pub mod fn_calls_another_method {
5453 use point::Point;
5554
56 #[rustc_clean(cfg="bfail2")]
55 #[rustc_clean(cfg="bpass2")]
5756 pub fn check() {
5857 let p = Point { x: 2.0, y: 2.0 };
5958 p.x();
......@@ -64,7 +63,7 @@ pub mod fn_calls_another_method {
6463pub mod fn_make_struct {
6564 use point::Point;
6665
67 #[rustc_clean(cfg="bfail2")]
66 #[rustc_clean(cfg="bpass2")]
6867 pub fn make_origin() -> Point {
6968 Point { x: 2.0, y: 2.0 }
7069 }
......@@ -74,7 +73,7 @@ pub mod fn_make_struct {
7473pub mod fn_read_field {
7574 use point::Point;
7675
77 #[rustc_clean(cfg="bfail2")]
76 #[rustc_clean(cfg="bpass2")]
7877 pub fn get_x(p: Point) -> f32 {
7978 p.x
8079 }
......@@ -84,7 +83,7 @@ pub mod fn_read_field {
8483pub mod fn_write_field {
8584 use point::Point;
8685
87 #[rustc_clean(cfg="bfail2")]
86 #[rustc_clean(cfg="bpass2")]
8887 pub fn inc_x(p: &mut Point) {
8988 p.x += 1.0;
9089 }
tests/incremental/change_pub_inherent_method_sig/struct_point.rs+14-15
......@@ -1,8 +1,7 @@
11// Test where we change the *signature* of a public, inherent method.
22
3//@ revisions: bfail1 bfail2
3//@ revisions: bpass1 bpass2
44//@ compile-flags: -Z query-dep-graph
5//@ build-pass
65//@ ignore-backends: gcc
76
87#![crate_type = "rlib"]
......@@ -10,13 +9,13 @@
109#![allow(dead_code)]
1110
1211// These are expected to require codegen.
13#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")]
14#![rustc_partition_codegened(module="struct_point-fn_calls_changed_method", cfg="bfail2")]
12#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")]
13#![rustc_partition_codegened(module="struct_point-fn_calls_changed_method", cfg="bpass2")]
1514
16#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bfail2")]
17#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")]
18#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")]
19#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")]
15#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bpass2")]
16#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")]
17#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")]
18#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")]
2019
2120pub mod point {
2221 pub struct Point {
......@@ -25,7 +24,7 @@ pub mod point {
2524 }
2625
2726 impl Point {
28 #[cfg(bfail1)]
27 #[cfg(bpass1)]
2928 pub fn distance_from_point(&self, p: Option<Point>) -> f32 {
3029 let p = p.unwrap_or(Point { x: 0.0, y: 0.0 });
3130 let x_diff = self.x - p.x;
......@@ -33,7 +32,7 @@ pub mod point {
3332 return x_diff * x_diff + y_diff * y_diff;
3433 }
3534
36 #[cfg(bfail2)]
35 #[cfg(bpass2)]
3736 pub fn distance_from_point(&self, p: Option<&Point>) -> f32 {
3837 const ORIGIN: &Point = &Point { x: 0.0, y: 0.0 };
3938 let p = p.unwrap_or(ORIGIN);
......@@ -52,7 +51,7 @@ pub mod point {
5251pub mod fn_calls_changed_method {
5352 use point::Point;
5453
55 #[rustc_clean(except="typeck_root,optimized_mir", cfg="bfail2")]
54 #[rustc_clean(except="typeck_root,optimized_mir", cfg="bpass2")]
5655 pub fn check() {
5756 let p = Point { x: 2.0, y: 2.0 };
5857 p.distance_from_point(None);
......@@ -63,7 +62,7 @@ pub mod fn_calls_changed_method {
6362pub mod fn_calls_another_method {
6463 use point::Point;
6564
66 #[rustc_clean(cfg="bfail2")]
65 #[rustc_clean(cfg="bpass2")]
6766 pub fn check() {
6867 let p = Point { x: 2.0, y: 2.0 };
6968 p.x();
......@@ -74,7 +73,7 @@ pub mod fn_calls_another_method {
7473pub mod fn_make_struct {
7574 use point::Point;
7675
77 #[rustc_clean(cfg="bfail2")]
76 #[rustc_clean(cfg="bpass2")]
7877 pub fn make_origin() -> Point {
7978 Point { x: 2.0, y: 2.0 }
8079 }
......@@ -84,7 +83,7 @@ pub mod fn_make_struct {
8483pub mod fn_read_field {
8584 use point::Point;
8685
87 #[rustc_clean(cfg="bfail2")]
86 #[rustc_clean(cfg="bpass2")]
8887 pub fn get_x(p: Point) -> f32 {
8988 p.x
9089 }
......@@ -94,7 +93,7 @@ pub mod fn_read_field {
9493pub mod fn_write_field {
9594 use point::Point;
9695
97 #[rustc_clean(cfg="bfail2")]
96 #[rustc_clean(cfg="bpass2")]
9897 pub fn inc_x(p: &mut Point) {
9998 p.x += 1.0;
10099 }
tests/incremental/hashes/call_expressions.rs+59-60
......@@ -5,14 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
15
14// FIXME(#62277): could be check-pass?
1615
1716#![allow(warnings)]
1817#![feature(rustc_attrs)]
......@@ -23,16 +22,16 @@ fn callee2(_x: u32, _y: i64) {}
2322
2423
2524// Change Callee (Function)
26#[cfg(any(bfail1,bfail4))]
25#[cfg(any(bpass1,bpass4))]
2726pub fn change_callee_function() {
2827 callee1(1, 2)
2928}
3029
31#[cfg(not(any(bfail1,bfail4)))]
32#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
33#[rustc_clean(cfg="bfail3")]
34#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
35#[rustc_clean(cfg="bfail6")]
30#[cfg(not(any(bpass1,bpass4)))]
31#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
32#[rustc_clean(cfg="bpass3")]
33#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
34#[rustc_clean(cfg="bpass6")]
3635pub fn change_callee_function() {
3736 callee2(1, 2)
3837}
......@@ -40,16 +39,16 @@ pub fn change_callee_function() {
4039
4140
4241// Change Argument (Function)
43#[cfg(any(bfail1,bfail4))]
42#[cfg(any(bpass1,bpass4))]
4443pub fn change_argument_function() {
4544 callee1(1, 2)
4645}
4746
48#[cfg(not(any(bfail1,bfail4)))]
49#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
50#[rustc_clean(cfg="bfail3")]
51#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
52#[rustc_clean(cfg="bfail6")]
47#[cfg(not(any(bpass1,bpass4)))]
48#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
49#[rustc_clean(cfg="bpass3")]
50#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
51#[rustc_clean(cfg="bpass6")]
5352pub fn change_argument_function() {
5453 callee1(1, 3)
5554}
......@@ -58,15 +57,15 @@ pub fn change_argument_function() {
5857
5958// Change Callee Indirectly (Function)
6059mod change_callee_indirectly_function {
61 #[cfg(any(bfail1,bfail4))]
60 #[cfg(any(bpass1,bpass4))]
6261 use super::callee1 as callee;
63 #[cfg(not(any(bfail1,bfail4)))]
62 #[cfg(not(any(bpass1,bpass4)))]
6463 use super::callee2 as callee;
6564
66 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail2")]
67 #[rustc_clean(cfg="bfail3")]
68 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail5")]
69 #[rustc_clean(cfg="bfail6")]
65 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass2")]
66 #[rustc_clean(cfg="bpass3")]
67 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass5")]
68 #[rustc_clean(cfg="bpass6")]
7069 pub fn change_callee_indirectly_function() {
7170 callee(1, 2)
7271 }
......@@ -80,17 +79,17 @@ impl Struct {
8079}
8180
8281// Change Callee (Method)
83#[cfg(any(bfail1,bfail4))]
82#[cfg(any(bpass1,bpass4))]
8483pub fn change_callee_method() {
8584 let s = Struct;
8685 s.method1('x', true);
8786}
8887
89#[cfg(not(any(bfail1,bfail4)))]
90#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
91#[rustc_clean(cfg="bfail3")]
92#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
93#[rustc_clean(cfg="bfail6")]
88#[cfg(not(any(bpass1,bpass4)))]
89#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
90#[rustc_clean(cfg="bpass3")]
91#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
92#[rustc_clean(cfg="bpass6")]
9493pub fn change_callee_method() {
9594 let s = Struct;
9695 s.method2('x', true);
......@@ -99,17 +98,17 @@ pub fn change_callee_method() {
9998
10099
101100// Change Argument (Method)
102#[cfg(any(bfail1,bfail4))]
101#[cfg(any(bpass1,bpass4))]
103102pub fn change_argument_method() {
104103 let s = Struct;
105104 s.method1('x', true);
106105}
107106
108#[cfg(not(any(bfail1,bfail4)))]
109#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
110#[rustc_clean(cfg="bfail3")]
111#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
112#[rustc_clean(cfg="bfail6")]
107#[cfg(not(any(bpass1,bpass4)))]
108#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
109#[rustc_clean(cfg="bpass3")]
110#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
111#[rustc_clean(cfg="bpass6")]
113112pub fn change_argument_method() {
114113 let s = Struct;
115114 s.method1('y', true);
......@@ -118,17 +117,17 @@ pub fn change_argument_method() {
118117
119118
120119// Change Callee (Method, UFCS)
121#[cfg(any(bfail1,bfail4))]
120#[cfg(any(bpass1,bpass4))]
122121pub fn change_ufcs_callee_method() {
123122 let s = Struct;
124123 Struct::method1(&s, 'x', true);
125124}
126125
127#[cfg(not(any(bfail1,bfail4)))]
128#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
129#[rustc_clean(cfg="bfail3")]
130#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
131#[rustc_clean(cfg="bfail6")]
126#[cfg(not(any(bpass1,bpass4)))]
127#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
128#[rustc_clean(cfg="bpass3")]
129#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
130#[rustc_clean(cfg="bpass6")]
132131pub fn change_ufcs_callee_method() {
133132 let s = Struct;
134133 Struct::method2(&s, 'x', true);
......@@ -137,17 +136,17 @@ pub fn change_ufcs_callee_method() {
137136
138137
139138// Change Argument (Method, UFCS)
140#[cfg(any(bfail1,bfail4))]
139#[cfg(any(bpass1,bpass4))]
141140pub fn change_argument_method_ufcs() {
142141 let s = Struct;
143142 Struct::method1(&s, 'x', true);
144143}
145144
146#[cfg(not(any(bfail1,bfail4)))]
147#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
148#[rustc_clean(cfg="bfail3")]
149#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
150#[rustc_clean(cfg="bfail6")]
145#[cfg(not(any(bpass1,bpass4)))]
146#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
147#[rustc_clean(cfg="bpass3")]
148#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
149#[rustc_clean(cfg="bpass6")]
151150pub fn change_argument_method_ufcs() {
152151 let s = Struct;
153152 Struct::method1(&s, 'x',false);
......@@ -156,17 +155,17 @@ pub fn change_argument_method_ufcs() {
156155
157156
158157// Change To UFCS
159#[cfg(any(bfail1,bfail4))]
158#[cfg(any(bpass1,bpass4))]
160159pub fn change_to_ufcs() {
161160 let s = Struct;
162161 s.method1('x', true); // ------
163162}
164163
165#[cfg(not(any(bfail1,bfail4)))]
166#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
167#[rustc_clean(cfg="bfail3")]
168#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
169#[rustc_clean(cfg="bfail6")]
164#[cfg(not(any(bpass1,bpass4)))]
165#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
166#[rustc_clean(cfg="bpass3")]
167#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
168#[rustc_clean(cfg="bpass6")]
170169// One might think this would be expanded in the opt_hir_owner_nodes/Mir, but it actually
171170// results in slightly different hir_owner/Mir.
172171pub fn change_to_ufcs() {
......@@ -182,15 +181,15 @@ impl Struct2 {
182181
183182// Change UFCS Callee Indirectly
184183pub mod change_ufcs_callee_indirectly {
185 #[cfg(any(bfail1,bfail4))]
184 #[cfg(any(bpass1,bpass4))]
186185 use super::Struct as Struct;
187 #[cfg(not(any(bfail1,bfail4)))]
186 #[cfg(not(any(bpass1,bpass4)))]
188187 use super::Struct2 as Struct;
189188
190 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
191 #[rustc_clean(cfg="bfail3")]
192 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
193 #[rustc_clean(cfg="bfail6")]
189 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
190 #[rustc_clean(cfg="bpass3")]
191 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
192 #[rustc_clean(cfg="bpass6")]
194193 pub fn change_ufcs_callee_indirectly() {
195194 let s = Struct;
196195 Struct::method1(&s, 'q', false)
tests/incremental/hashes/closure_expressions.rs+41-41
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,16 +19,16 @@
1919
2020
2121// Change closure body
22#[cfg(any(bfail1,bfail4))]
22#[cfg(any(bpass1,bpass4))]
2323pub fn change_closure_body() {
2424 let _ = || 1u32;
2525}
2626
27#[cfg(not(any(bfail1,bfail4)))]
28#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
29#[rustc_clean(cfg="bfail3")]
30#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
31#[rustc_clean(cfg="bfail6")]
27#[cfg(not(any(bpass1,bpass4)))]
28#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
29#[rustc_clean(cfg="bpass3")]
30#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
31#[rustc_clean(cfg="bpass6")]
3232pub fn change_closure_body() {
3333 let _ = || 3u32;
3434}
......@@ -36,17 +36,17 @@ pub fn change_closure_body() {
3636
3737
3838// Add parameter
39#[cfg(any(bfail1,bfail4))]
39#[cfg(any(bpass1,bpass4))]
4040pub fn add_parameter() {
4141 let x = 0u32;
4242 let _ = | | x + 1;
4343}
4444
45#[cfg(not(any(bfail1,bfail4)))]
46#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, typeck_root")]
47#[rustc_clean(cfg="bfail3")]
48#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, typeck_root")]
49#[rustc_clean(cfg="bfail6")]
45#[cfg(not(any(bpass1,bpass4)))]
46#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, typeck_root")]
47#[rustc_clean(cfg="bpass3")]
48#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, typeck_root")]
49#[rustc_clean(cfg="bpass6")]
5050pub fn add_parameter() {
5151 let x = 0u32;
5252 let _ = |x: u32| x + 1;
......@@ -55,16 +55,16 @@ pub fn add_parameter() {
5555
5656
5757// Change parameter pattern
58#[cfg(any(bfail1,bfail4))]
58#[cfg(any(bpass1,bpass4))]
5959pub fn change_parameter_pattern() {
6060 let _ = | x : (u32,)| x;
6161}
6262
63#[cfg(not(any(bfail1,bfail4)))]
64#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, typeck_root")]
65#[rustc_clean(cfg="bfail3")]
66#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, typeck_root")]
67#[rustc_clean(cfg="bfail6")]
63#[cfg(not(any(bpass1,bpass4)))]
64#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, typeck_root")]
65#[rustc_clean(cfg="bpass3")]
66#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, typeck_root")]
67#[rustc_clean(cfg="bpass6")]
6868pub fn change_parameter_pattern() {
6969 let _ = |(x,): (u32,)| x;
7070}
......@@ -72,16 +72,16 @@ pub fn change_parameter_pattern() {
7272
7373
7474// Add `move` to closure
75#[cfg(any(bfail1,bfail4))]
75#[cfg(any(bpass1,bpass4))]
7676pub fn add_move() {
7777 let _ = || 1;
7878}
7979
80#[cfg(not(any(bfail1,bfail4)))]
81#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
82#[rustc_clean(cfg="bfail3")]
83#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
84#[rustc_clean(cfg="bfail6")]
80#[cfg(not(any(bpass1,bpass4)))]
81#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
82#[rustc_clean(cfg="bpass3")]
83#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
84#[rustc_clean(cfg="bpass6")]
8585pub fn add_move() {
8686 let _ = move || 1;
8787}
......@@ -89,17 +89,17 @@ pub fn add_move() {
8989
9090
9191// Add type ascription to parameter
92#[cfg(any(bfail1,bfail4))]
92#[cfg(any(bpass1,bpass4))]
9393pub fn add_type_ascription_to_parameter() {
9494 let closure = |x | x + 1u32;
9595 let _: u32 = closure(1);
9696}
9797
98#[cfg(not(any(bfail1,bfail4)))]
99#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, typeck_root")]
100#[rustc_clean(cfg = "bfail3")]
101#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, typeck_root")]
102#[rustc_clean(cfg = "bfail6")]
98#[cfg(not(any(bpass1,bpass4)))]
99#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, typeck_root")]
100#[rustc_clean(cfg = "bpass3")]
101#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, typeck_root")]
102#[rustc_clean(cfg = "bpass6")]
103103pub fn add_type_ascription_to_parameter() {
104104 let closure = |x: u32| x + 1u32;
105105 let _: u32 = closure(1);
......@@ -108,17 +108,17 @@ pub fn add_type_ascription_to_parameter() {
108108
109109
110110// Change parameter type
111#[cfg(any(bfail1,bfail4))]
111#[cfg(any(bpass1,bpass4))]
112112pub fn change_parameter_type() {
113113 let closure = |x: u32| (x as u64) + 1;
114114 let _ = closure(1);
115115}
116116
117#[cfg(not(any(bfail1,bfail4)))]
118#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
119#[rustc_clean(cfg="bfail3")]
120#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
121#[rustc_clean(cfg="bfail6")]
117#[cfg(not(any(bpass1,bpass4)))]
118#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
119#[rustc_clean(cfg="bpass3")]
120#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
121#[rustc_clean(cfg="bpass6")]
122122pub fn change_parameter_type() {
123123 let closure = |x: u16| (x as u64) + 1;
124124 let _ = closure(1);
tests/incremental/hashes/consts.rs+36-36
......@@ -5,10 +5,10 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3
8//@ revisions: bpass1 bpass2 bpass3
109//@ compile-flags: -Z query-dep-graph -O
1110//@ ignore-backends: gcc
11// FIXME(#62277): could be check-pass?
1212
1313#![allow(warnings)]
1414#![feature(rustc_attrs)]
......@@ -16,75 +16,75 @@
1616
1717
1818// Change const visibility
19#[cfg(bfail1)]
19#[cfg(bpass1)]
2020const CONST_VISIBILITY: u8 = 0;
2121
22#[cfg(not(bfail1))]
23#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
24#[rustc_clean(cfg="bfail3")]
22#[cfg(not(bpass1))]
23#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
24#[rustc_clean(cfg="bpass3")]
2525pub const CONST_VISIBILITY: u8 = 0;
2626
2727
2828// Change type from i32 to u32
29#[cfg(bfail1)]
29#[cfg(bpass1)]
3030const CONST_CHANGE_TYPE_1: i32 = 0;
3131
32#[cfg(not(bfail1))]
33#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
34#[rustc_clean(cfg="bfail3")]
32#[cfg(not(bpass1))]
33#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
34#[rustc_clean(cfg="bpass3")]
3535const CONST_CHANGE_TYPE_1: u32 = 0;
3636
3737
3838// Change type from Option<u32> to Option<u64>
39#[cfg(bfail1)]
39#[cfg(bpass1)]
4040const CONST_CHANGE_TYPE_2: Option<u32> = None;
4141
42#[cfg(not(bfail1))]
43#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
44#[rustc_clean(cfg="bfail3")]
42#[cfg(not(bpass1))]
43#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
44#[rustc_clean(cfg="bpass3")]
4545const CONST_CHANGE_TYPE_2: Option<u64> = None;
4646
4747
4848// Change value between simple literals
49#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
50#[rustc_clean(cfg="bfail3")]
49#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
50#[rustc_clean(cfg="bpass3")]
5151const CONST_CHANGE_VALUE_1: i16 = {
52 #[cfg(bfail1)]
52 #[cfg(bpass1)]
5353 { 1 }
5454
55 #[cfg(not(bfail1))]
55 #[cfg(not(bpass1))]
5656 { 2 }
5757};
5858
5959
6060// Change value between expressions
61#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
62#[rustc_clean(cfg="bfail3")]
61#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
62#[rustc_clean(cfg="bpass3")]
6363const CONST_CHANGE_VALUE_2: i16 = {
64 #[cfg(bfail1)]
64 #[cfg(bpass1)]
6565 { 1 + 1 }
6666
67 #[cfg(not(bfail1))]
67 #[cfg(not(bpass1))]
6868 { 1 + 2 }
6969};
7070
71#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
72#[rustc_clean(cfg="bfail3")]
71#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
72#[rustc_clean(cfg="bpass3")]
7373const CONST_CHANGE_VALUE_3: i16 = {
74 #[cfg(bfail1)]
74 #[cfg(bpass1)]
7575 { 2 + 3 }
7676
77 #[cfg(not(bfail1))]
77 #[cfg(not(bpass1))]
7878 { 2 * 3 }
7979};
8080
81#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
82#[rustc_clean(cfg="bfail3")]
81#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
82#[rustc_clean(cfg="bpass3")]
8383const CONST_CHANGE_VALUE_4: i16 = {
84 #[cfg(bfail1)]
84 #[cfg(bpass1)]
8585 { 1 + 2 * 3 }
8686
87 #[cfg(not(bfail1))]
87 #[cfg(not(bpass1))]
8888 { 1 + 2 * 4 }
8989};
9090
......@@ -94,17 +94,17 @@ struct ReferencedType1;
9494struct ReferencedType2;
9595
9696mod const_change_type_indirectly {
97 #[cfg(bfail1)]
97 #[cfg(bpass1)]
9898 use super::ReferencedType1 as Type;
9999
100 #[cfg(not(bfail1))]
100 #[cfg(not(bpass1))]
101101 use super::ReferencedType2 as Type;
102102
103 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
104 #[rustc_clean(cfg="bfail3")]
103 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
104 #[rustc_clean(cfg="bpass3")]
105105 const CONST_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
106106
107 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
108 #[rustc_clean(cfg="bfail3")]
107 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
108 #[rustc_clean(cfg="bpass3")]
109109 const CONST_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
110110}
tests/incremental/hashes/delayed_lints.rs+6-7
......@@ -2,8 +2,7 @@
22// Emitting these lints is delayed until after ast lowering.
33// This test tests that the delayed hints are correctly hashed for incremental.
44
5//@ check-pass
6//@ revisions: bfail1 bfail2 bfail3
5//@ revisions: cpass1 cpass2 cpass3
76//@ compile-flags: -Z query-dep-graph -O -Zincremental-ignore-spans
87//@ ignore-backends: gcc
98#![feature(rustc_attrs)]
......@@ -15,13 +14,13 @@
1514// Between revision 1 and 2, the only thing we change is that we add "test = 2"
1615// This will emit an extra delayed lint, but it will not change the HIR hash.
1716// We check that even tho the HIR hash didn't change, the extra lint is emitted
18#[cfg_attr(bfail1, doc(hidden))]
19#[cfg_attr(not(bfail1), doc(hidden, test = 2))]
20//[bfail2,bfail3]~^ WARN `#[doc(test(...)]` takes a list of attributes [invalid_doc_attributes]
17#[cfg_attr(cpass1, doc(hidden))]
18#[cfg_attr(not(cpass1), doc(hidden, test = 2))]
19//[cpass2,cpass3]~^ WARN `#[doc(test(...)]` takes a list of attributes [invalid_doc_attributes]
2120
2221// The HIR hash should not change between revisions, for this test to be representative
23#[rustc_clean(cfg="bfail2")]
24#[rustc_clean(cfg="bfail3")]
22#[rustc_clean(cfg="cpass2")]
23#[rustc_clean(cfg="cpass3")]
2524trait Test {}
2625
2726fn main() {}
tests/incremental/hashes/enum_constructors.rs+95-95
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -28,7 +28,7 @@ pub enum Enum {
2828}
2929
3030// Change field value (struct-like) -----------------------------------------
31#[cfg(any(bfail1,bfail4))]
31#[cfg(any(bpass1,bpass4))]
3232pub fn change_field_value_struct_like() -> Enum {
3333 Enum::Struct {
3434 x: 0,
......@@ -37,11 +37,11 @@ pub fn change_field_value_struct_like() -> Enum {
3737 }
3838}
3939
40#[cfg(not(any(bfail1,bfail4)))]
41#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
42#[rustc_clean(cfg="bfail3")]
43#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
44#[rustc_clean(cfg="bfail6")]
40#[cfg(not(any(bpass1,bpass4)))]
41#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
42#[rustc_clean(cfg="bpass3")]
43#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
44#[rustc_clean(cfg="bpass6")]
4545pub fn change_field_value_struct_like() -> Enum {
4646 Enum::Struct {
4747 x: 0,
......@@ -53,7 +53,7 @@ pub fn change_field_value_struct_like() -> Enum {
5353
5454
5555// Change field order (struct-like) -----------------------------------------
56#[cfg(any(bfail1,bfail4))]
56#[cfg(any(bpass1,bpass4))]
5757pub fn change_field_order_struct_like() -> Enum {
5858 Enum::Struct {
5959 x: 3,
......@@ -62,11 +62,11 @@ pub fn change_field_order_struct_like() -> Enum {
6262 }
6363}
6464
65#[cfg(not(any(bfail1,bfail4)))]
66#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
67#[rustc_clean(cfg="bfail3")]
68#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root")]
69#[rustc_clean(cfg="bfail6")]
65#[cfg(not(any(bpass1,bpass4)))]
66#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
67#[rustc_clean(cfg="bpass3")]
68#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root")]
69#[rustc_clean(cfg="bpass6")]
7070// FIXME(michaelwoerister):Interesting. I would have thought that that changes the MIR. And it
7171// would if it were not all constants
7272pub fn change_field_order_struct_like() -> Enum {
......@@ -94,7 +94,7 @@ pub enum Enum2 {
9494}
9595
9696// Change constructor path (struct-like) ------------------------------------
97#[cfg(any(bfail1,bfail4))]
97#[cfg(any(bpass1,bpass4))]
9898pub fn change_constructor_path_struct_like() {
9999 let _ = Enum ::Struct {
100100 x: 0,
......@@ -103,11 +103,11 @@ pub fn change_constructor_path_struct_like() {
103103 };
104104}
105105
106#[cfg(not(any(bfail1,bfail4)))]
107#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
108#[rustc_clean(cfg="bfail3")]
109#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root")]
110#[rustc_clean(cfg="bfail6")]
106#[cfg(not(any(bpass1,bpass4)))]
107#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
108#[rustc_clean(cfg="bpass3")]
109#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root")]
110#[rustc_clean(cfg="bpass6")]
111111pub fn change_constructor_path_struct_like() {
112112 let _ = Enum2::Struct {
113113 x: 0,
......@@ -119,7 +119,7 @@ pub fn change_constructor_path_struct_like() {
119119
120120
121121// Change variant (regular struct) ------------------------------------
122#[cfg(any(bfail1,bfail4))]
122#[cfg(any(bpass1,bpass4))]
123123pub fn change_constructor_variant_struct_like() {
124124 let _ = Enum2::Struct {
125125 x: 0,
......@@ -128,11 +128,11 @@ pub fn change_constructor_variant_struct_like() {
128128 };
129129}
130130
131#[cfg(not(any(bfail1,bfail4)))]
132#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
133#[rustc_clean(cfg="bfail3")]
134#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
135#[rustc_clean(cfg="bfail6")]
131#[cfg(not(any(bpass1,bpass4)))]
132#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
133#[rustc_clean(cfg="bpass3")]
134#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
135#[rustc_clean(cfg="bpass6")]
136136pub fn change_constructor_variant_struct_like() {
137137 let _ = Enum2::Struct2 {
138138 x: 0,
......@@ -144,15 +144,15 @@ pub fn change_constructor_variant_struct_like() {
144144
145145// Change constructor path indirectly (struct-like) -------------------------
146146pub mod change_constructor_path_indirectly_struct_like {
147 #[cfg(any(bfail1,bfail4))]
147 #[cfg(any(bpass1,bpass4))]
148148 use super::Enum as TheEnum;
149 #[cfg(not(any(bfail1,bfail4)))]
149 #[cfg(not(any(bpass1,bpass4)))]
150150 use super::Enum2 as TheEnum;
151151
152 #[rustc_clean(cfg="bfail2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
153 #[rustc_clean(cfg="bfail3")]
154 #[rustc_clean(cfg="bfail5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
155 #[rustc_clean(cfg="bfail6")]
152 #[rustc_clean(cfg="bpass2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
153 #[rustc_clean(cfg="bpass3")]
154 #[rustc_clean(cfg="bpass5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
155 #[rustc_clean(cfg="bpass6")]
156156 pub fn function() -> TheEnum {
157157 TheEnum::Struct {
158158 x: 0,
......@@ -166,15 +166,15 @@ pub mod change_constructor_path_indirectly_struct_like {
166166// Change constructor variant indirectly (struct-like) ---------------------------
167167pub mod change_constructor_variant_indirectly_struct_like {
168168 use super::Enum2;
169 #[cfg(any(bfail1,bfail4))]
169 #[cfg(any(bpass1,bpass4))]
170170 use super::Enum2::Struct as Variant;
171 #[cfg(not(any(bfail1,bfail4)))]
171 #[cfg(not(any(bpass1,bpass4)))]
172172 use super::Enum2::Struct2 as Variant;
173173
174 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
175 #[rustc_clean(cfg="bfail3")]
176 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
177 #[rustc_clean(cfg="bfail6")]
174 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
175 #[rustc_clean(cfg="bpass3")]
176 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
177 #[rustc_clean(cfg="bpass6")]
178178 pub fn function() -> Enum2 {
179179 Variant {
180180 x: 0,
......@@ -186,16 +186,16 @@ pub mod change_constructor_variant_indirectly_struct_like {
186186
187187
188188// Change field value (tuple-like) -------------------------------------------
189#[cfg(any(bfail1,bfail4))]
189#[cfg(any(bpass1,bpass4))]
190190pub fn change_field_value_tuple_like() -> Enum {
191191 Enum::Tuple(0, 1, 2)
192192}
193193
194#[cfg(not(any(bfail1,bfail4)))]
195#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
196#[rustc_clean(cfg="bfail3")]
197#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
198#[rustc_clean(cfg="bfail6")]
194#[cfg(not(any(bpass1,bpass4)))]
195#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
196#[rustc_clean(cfg="bpass3")]
197#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
198#[rustc_clean(cfg="bpass6")]
199199pub fn change_field_value_tuple_like() -> Enum {
200200 Enum::Tuple(0, 1, 3)
201201}
......@@ -203,22 +203,22 @@ pub fn change_field_value_tuple_like() -> Enum {
203203
204204
205205// Change constructor path (tuple-like) --------------------------------------
206#[cfg(any(bfail1,bfail4))]
206#[cfg(any(bpass1,bpass4))]
207207pub fn change_constructor_path_tuple_like() {
208208 let _ = Enum ::Tuple(0, 1, 2);
209209}
210210
211#[cfg(not(any(bfail1,bfail4)))]
211#[cfg(not(any(bpass1,bpass4)))]
212212#[rustc_clean(
213 cfg="bfail2",
213 cfg="bpass2",
214214 except="opt_hir_owner_nodes,typeck_root"
215215)]
216#[rustc_clean(cfg="bfail3")]
216#[rustc_clean(cfg="bpass3")]
217217#[rustc_clean(
218 cfg="bfail5",
218 cfg="bpass5",
219219 except="opt_hir_owner_nodes,typeck_root"
220220)]
221#[rustc_clean(cfg="bfail6")]
221#[rustc_clean(cfg="bpass6")]
222222pub fn change_constructor_path_tuple_like() {
223223 let _ = Enum2::Tuple(0, 1, 2);
224224}
......@@ -226,22 +226,22 @@ pub fn change_constructor_path_tuple_like() {
226226
227227
228228// Change constructor variant (tuple-like) --------------------------------------
229#[cfg(any(bfail1,bfail4))]
229#[cfg(any(bpass1,bpass4))]
230230pub fn change_constructor_variant_tuple_like() {
231231 let _ = Enum2::Tuple (0, 1, 2);
232232}
233233
234#[cfg(not(any(bfail1,bfail4)))]
234#[cfg(not(any(bpass1,bpass4)))]
235235#[rustc_clean(
236 cfg="bfail2",
236 cfg="bpass2",
237237 except="opt_hir_owner_nodes,typeck_root"
238238)]
239#[rustc_clean(cfg="bfail3")]
239#[rustc_clean(cfg="bpass3")]
240240#[rustc_clean(
241 cfg="bfail5",
241 cfg="bpass5",
242242 except="opt_hir_owner_nodes,typeck_root"
243243)]
244#[rustc_clean(cfg="bfail6")]
244#[rustc_clean(cfg="bpass6")]
245245pub fn change_constructor_variant_tuple_like() {
246246 let _ = Enum2::Tuple2(0, 1, 2);
247247}
......@@ -249,15 +249,15 @@ pub fn change_constructor_variant_tuple_like() {
249249
250250// Change constructor path indirectly (tuple-like) ---------------------------
251251pub mod change_constructor_path_indirectly_tuple_like {
252 #[cfg(any(bfail1,bfail4))]
252 #[cfg(any(bpass1,bpass4))]
253253 use super::Enum as TheEnum;
254 #[cfg(not(any(bfail1,bfail4)))]
254 #[cfg(not(any(bpass1,bpass4)))]
255255 use super::Enum2 as TheEnum;
256256
257 #[rustc_clean(cfg="bfail2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
258 #[rustc_clean(cfg="bfail3")]
259 #[rustc_clean(cfg="bfail5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
260 #[rustc_clean(cfg="bfail6")]
257 #[rustc_clean(cfg="bpass2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
258 #[rustc_clean(cfg="bpass3")]
259 #[rustc_clean(cfg="bpass5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
260 #[rustc_clean(cfg="bpass6")]
261261 pub fn function() -> TheEnum {
262262 TheEnum::Tuple(0, 1, 2)
263263 }
......@@ -268,15 +268,15 @@ pub mod change_constructor_path_indirectly_tuple_like {
268268// Change constructor variant indirectly (tuple-like) ---------------------------
269269pub mod change_constructor_variant_indirectly_tuple_like {
270270 use super::Enum2;
271 #[cfg(any(bfail1,bfail4))]
271 #[cfg(any(bpass1,bpass4))]
272272 use super::Enum2::Tuple as Variant;
273 #[cfg(not(any(bfail1,bfail4)))]
273 #[cfg(not(any(bpass1,bpass4)))]
274274 use super::Enum2::Tuple2 as Variant;
275275
276 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
277 #[rustc_clean(cfg="bfail3")]
278 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
279 #[rustc_clean(cfg="bfail6")]
276 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
277 #[rustc_clean(cfg="bpass3")]
278 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
279 #[rustc_clean(cfg="bpass6")]
280280 pub fn function() -> Enum2 {
281281 Variant(0, 1, 2)
282282 }
......@@ -296,16 +296,16 @@ pub enum Clike2 {
296296}
297297
298298// Change constructor path (C-like) --------------------------------------
299#[cfg(any(bfail1,bfail4))]
299#[cfg(any(bpass1,bpass4))]
300300pub fn change_constructor_path_c_like() {
301301 let _x = Clike ::B;
302302}
303303
304#[cfg(not(any(bfail1,bfail4)))]
305#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
306#[rustc_clean(cfg="bfail3")]
307#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
308#[rustc_clean(cfg="bfail6")]
304#[cfg(not(any(bpass1,bpass4)))]
305#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
306#[rustc_clean(cfg="bpass3")]
307#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
308#[rustc_clean(cfg="bpass6")]
309309pub fn change_constructor_path_c_like() {
310310 let _x = Clike2::B;
311311}
......@@ -313,16 +313,16 @@ pub fn change_constructor_path_c_like() {
313313
314314
315315// Change constructor variant (C-like) --------------------------------------
316#[cfg(any(bfail1,bfail4))]
316#[cfg(any(bpass1,bpass4))]
317317pub fn change_constructor_variant_c_like() {
318318 let _x = Clike::A;
319319}
320320
321#[cfg(not(any(bfail1,bfail4)))]
322#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
323#[rustc_clean(cfg="bfail3")]
324#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
325#[rustc_clean(cfg="bfail6")]
321#[cfg(not(any(bpass1,bpass4)))]
322#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
323#[rustc_clean(cfg="bpass3")]
324#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
325#[rustc_clean(cfg="bpass6")]
326326pub fn change_constructor_variant_c_like() {
327327 let _x = Clike::C;
328328}
......@@ -330,15 +330,15 @@ pub fn change_constructor_variant_c_like() {
330330
331331// Change constructor path indirectly (C-like) ---------------------------
332332pub mod change_constructor_path_indirectly_c_like {
333 #[cfg(any(bfail1,bfail4))]
333 #[cfg(any(bpass1,bpass4))]
334334 use super::Clike as TheEnum;
335 #[cfg(not(any(bfail1,bfail4)))]
335 #[cfg(not(any(bpass1,bpass4)))]
336336 use super::Clike2 as TheEnum;
337337
338 #[rustc_clean(cfg="bfail2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
339 #[rustc_clean(cfg="bfail3")]
340 #[rustc_clean(cfg="bfail5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
341 #[rustc_clean(cfg="bfail6")]
338 #[rustc_clean(cfg="bpass2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
339 #[rustc_clean(cfg="bpass3")]
340 #[rustc_clean(cfg="bpass5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
341 #[rustc_clean(cfg="bpass6")]
342342 pub fn function() -> TheEnum {
343343 TheEnum::B
344344 }
......@@ -349,15 +349,15 @@ pub mod change_constructor_path_indirectly_c_like {
349349// Change constructor variant indirectly (C-like) ---------------------------
350350pub mod change_constructor_variant_indirectly_c_like {
351351 use super::Clike;
352 #[cfg(any(bfail1,bfail4))]
352 #[cfg(any(bpass1,bpass4))]
353353 use super::Clike::A as Variant;
354 #[cfg(not(any(bfail1,bfail4)))]
354 #[cfg(not(any(bpass1,bpass4)))]
355355 use super::Clike::B as Variant;
356356
357 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
358 #[rustc_clean(cfg="bfail3")]
359 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
360 #[rustc_clean(cfg="bfail6")]
357 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
358 #[rustc_clean(cfg="bpass3")]
359 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
360 #[rustc_clean(cfg="bpass6")]
361361 pub fn function() -> Clike {
362362 Variant
363363 }
tests/incremental/hashes/enum_defs.rs+227-227
......@@ -10,13 +10,13 @@
1010// results in a change of the ICH for the enum's metadata, and that it stays
1111// the same between rev2 and rev3.
1212
13//@ build-pass (FIXME(62277): could be check-pass?)
14//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
13//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
1514//@ compile-flags: -Z query-dep-graph -O
16//@ [bfail1]compile-flags: -Zincremental-ignore-spans
17//@ [bfail2]compile-flags: -Zincremental-ignore-spans
18//@ [bfail3]compile-flags: -Zincremental-ignore-spans
15//@ [bpass1]compile-flags: -Zincremental-ignore-spans
16//@ [bpass2]compile-flags: -Zincremental-ignore-spans
17//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1918//@ ignore-backends: gcc
19// FIXME(#62277): could be check-pass?
2020
2121#![allow(warnings)]
2222#![feature(rustc_attrs)]
......@@ -26,30 +26,30 @@
2626
2727
2828// Change enum visibility -----------------------------------------------------
29#[cfg(any(bfail1,bfail4))]
29#[cfg(any(bpass1,bpass4))]
3030enum EnumVisibility { A }
3131
32#[cfg(not(any(bfail1,bfail4)))]
33#[rustc_clean(cfg="bfail2")]
34#[rustc_clean(cfg="bfail3")]
35#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
36#[rustc_clean(cfg="bfail6")]
32#[cfg(not(any(bpass1,bpass4)))]
33#[rustc_clean(cfg="bpass2")]
34#[rustc_clean(cfg="bpass3")]
35#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
36#[rustc_clean(cfg="bpass6")]
3737pub enum EnumVisibility { A }
3838
3939
4040
4141// Change name of a c-style variant -------------------------------------------
42#[cfg(any(bfail1,bfail4))]
42#[cfg(any(bpass1,bpass4))]
4343enum EnumChangeNameCStyleVariant {
4444 Variant1,
4545 Variant2,
4646}
4747
48#[cfg(not(any(bfail1,bfail4)))]
49#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
50#[rustc_clean(cfg="bfail3")]
51#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
52#[rustc_clean(cfg="bfail6")]
48#[cfg(not(any(bpass1,bpass4)))]
49#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
50#[rustc_clean(cfg="bpass3")]
51#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
52#[rustc_clean(cfg="bpass6")]
5353enum EnumChangeNameCStyleVariant {
5454 Variant1,
5555 Variant2Changed,
......@@ -58,17 +58,17 @@ enum EnumChangeNameCStyleVariant {
5858
5959
6060// Change name of a tuple-style variant ---------------------------------------
61#[cfg(any(bfail1,bfail4))]
61#[cfg(any(bpass1,bpass4))]
6262enum EnumChangeNameTupleStyleVariant {
6363 Variant1,
6464 Variant2(u32, f32),
6565}
6666
67#[cfg(not(any(bfail1,bfail4)))]
68#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
69#[rustc_clean(cfg="bfail3")]
70#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
71#[rustc_clean(cfg="bfail6")]
67#[cfg(not(any(bpass1,bpass4)))]
68#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
69#[rustc_clean(cfg="bpass3")]
70#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
71#[rustc_clean(cfg="bpass6")]
7272enum EnumChangeNameTupleStyleVariant {
7373 Variant1,
7474 Variant2Changed(u32, f32),
......@@ -77,17 +77,17 @@ enum EnumChangeNameTupleStyleVariant {
7777
7878
7979// Change name of a struct-style variant --------------------------------------
80#[cfg(any(bfail1,bfail4))]
80#[cfg(any(bpass1,bpass4))]
8181enum EnumChangeNameStructStyleVariant {
8282 Variant1,
8383 Variant2 { a: u32, b: f32 },
8484}
8585
86#[cfg(not(any(bfail1,bfail4)))]
87#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
88#[rustc_clean(cfg="bfail3")]
89#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
90#[rustc_clean(cfg="bfail6")]
86#[cfg(not(any(bpass1,bpass4)))]
87#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
88#[rustc_clean(cfg="bpass3")]
89#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
90#[rustc_clean(cfg="bpass6")]
9191enum EnumChangeNameStructStyleVariant {
9292 Variant1,
9393 Variant2Changed { a: u32, b: f32 },
......@@ -96,33 +96,33 @@ enum EnumChangeNameStructStyleVariant {
9696
9797
9898// Change the value of a c-style variant --------------------------------------
99#[cfg(any(bfail1,bfail4))]
99#[cfg(any(bpass1,bpass4))]
100100enum EnumChangeValueCStyleVariant0 {
101101 Variant1,
102102 Variant2 = 11,
103103}
104104
105#[cfg(not(any(bfail1,bfail4)))]
106#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
107#[rustc_clean(cfg="bfail3")]
108#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
109#[rustc_clean(cfg="bfail6")]
105#[cfg(not(any(bpass1,bpass4)))]
106#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
107#[rustc_clean(cfg="bpass3")]
108#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
109#[rustc_clean(cfg="bpass6")]
110110enum EnumChangeValueCStyleVariant0 {
111111 Variant1,
112112 Variant2 = 22,
113113}
114114
115#[cfg(any(bfail1,bfail4))]
115#[cfg(any(bpass1,bpass4))]
116116enum EnumChangeValueCStyleVariant1 {
117117 Variant1,
118118 Variant2,
119119}
120120
121#[cfg(not(any(bfail1,bfail4)))]
122#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
123#[rustc_clean(cfg="bfail3")]
124#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
125#[rustc_clean(cfg="bfail6")]
121#[cfg(not(any(bpass1,bpass4)))]
122#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
123#[rustc_clean(cfg="bpass3")]
124#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
125#[rustc_clean(cfg="bpass6")]
126126enum EnumChangeValueCStyleVariant1 {
127127 Variant1,
128128 Variant2 = 11,
......@@ -131,16 +131,16 @@ enum EnumChangeValueCStyleVariant1 {
131131
132132
133133// Add a c-style variant ------------------------------------------------------
134#[cfg(any(bfail1,bfail4))]
134#[cfg(any(bpass1,bpass4))]
135135enum EnumAddCStyleVariant {
136136 Variant1,
137137}
138138
139#[cfg(not(any(bfail1,bfail4)))]
140#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
141#[rustc_clean(cfg="bfail3")]
142#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
143#[rustc_clean(cfg="bfail6")]
139#[cfg(not(any(bpass1,bpass4)))]
140#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
141#[rustc_clean(cfg="bpass3")]
142#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
143#[rustc_clean(cfg="bpass6")]
144144enum EnumAddCStyleVariant {
145145 Variant1,
146146 Variant2,
......@@ -149,17 +149,17 @@ enum EnumAddCStyleVariant {
149149
150150
151151// Remove a c-style variant ---------------------------------------------------
152#[cfg(any(bfail1,bfail4))]
152#[cfg(any(bpass1,bpass4))]
153153enum EnumRemoveCStyleVariant {
154154 Variant1,
155155 Variant2,
156156}
157157
158#[cfg(not(any(bfail1,bfail4)))]
159#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
160#[rustc_clean(cfg="bfail3")]
161#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
162#[rustc_clean(cfg="bfail6")]
158#[cfg(not(any(bpass1,bpass4)))]
159#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
160#[rustc_clean(cfg="bpass3")]
161#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
162#[rustc_clean(cfg="bpass6")]
163163enum EnumRemoveCStyleVariant {
164164 Variant1,
165165}
......@@ -167,16 +167,16 @@ enum EnumRemoveCStyleVariant {
167167
168168
169169// Add a tuple-style variant --------------------------------------------------
170#[cfg(any(bfail1,bfail4))]
170#[cfg(any(bpass1,bpass4))]
171171enum EnumAddTupleStyleVariant {
172172 Variant1,
173173}
174174
175#[cfg(not(any(bfail1,bfail4)))]
176#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
177#[rustc_clean(cfg="bfail3")]
178#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
179#[rustc_clean(cfg="bfail6")]
175#[cfg(not(any(bpass1,bpass4)))]
176#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
177#[rustc_clean(cfg="bpass3")]
178#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
179#[rustc_clean(cfg="bpass6")]
180180enum EnumAddTupleStyleVariant {
181181 Variant1,
182182 Variant2(u32, f32),
......@@ -185,17 +185,17 @@ enum EnumAddTupleStyleVariant {
185185
186186
187187// Remove a tuple-style variant -----------------------------------------------
188#[cfg(any(bfail1,bfail4))]
188#[cfg(any(bpass1,bpass4))]
189189enum EnumRemoveTupleStyleVariant {
190190 Variant1,
191191 Variant2(u32, f32),
192192}
193193
194#[cfg(not(any(bfail1,bfail4)))]
195#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
196#[rustc_clean(cfg="bfail3")]
197#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
198#[rustc_clean(cfg="bfail6")]
194#[cfg(not(any(bpass1,bpass4)))]
195#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
196#[rustc_clean(cfg="bpass3")]
197#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
198#[rustc_clean(cfg="bpass6")]
199199enum EnumRemoveTupleStyleVariant {
200200 Variant1,
201201}
......@@ -203,16 +203,16 @@ enum EnumRemoveTupleStyleVariant {
203203
204204
205205// Add a struct-style variant -------------------------------------------------
206#[cfg(any(bfail1,bfail4))]
206#[cfg(any(bpass1,bpass4))]
207207enum EnumAddStructStyleVariant {
208208 Variant1,
209209}
210210
211#[cfg(not(any(bfail1,bfail4)))]
212#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
213#[rustc_clean(cfg="bfail3")]
214#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
215#[rustc_clean(cfg="bfail6")]
211#[cfg(not(any(bpass1,bpass4)))]
212#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
213#[rustc_clean(cfg="bpass3")]
214#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
215#[rustc_clean(cfg="bpass6")]
216216enum EnumAddStructStyleVariant {
217217 Variant1,
218218 Variant2 { a: u32, b: f32 },
......@@ -221,17 +221,17 @@ enum EnumAddStructStyleVariant {
221221
222222
223223// Remove a struct-style variant ----------------------------------------------
224#[cfg(any(bfail1,bfail4))]
224#[cfg(any(bpass1,bpass4))]
225225enum EnumRemoveStructStyleVariant {
226226 Variant1,
227227 Variant2 { a: u32, b: f32 },
228228}
229229
230#[cfg(not(any(bfail1,bfail4)))]
231#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
232#[rustc_clean(cfg="bfail3")]
233#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
234#[rustc_clean(cfg="bfail6")]
230#[cfg(not(any(bpass1,bpass4)))]
231#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
232#[rustc_clean(cfg="bpass3")]
233#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
234#[rustc_clean(cfg="bpass6")]
235235enum EnumRemoveStructStyleVariant {
236236 Variant1,
237237}
......@@ -239,16 +239,16 @@ enum EnumRemoveStructStyleVariant {
239239
240240
241241// Change the type of a field in a tuple-style variant ------------------------
242#[cfg(any(bfail1,bfail4))]
242#[cfg(any(bpass1,bpass4))]
243243enum EnumChangeFieldTypeTupleStyleVariant {
244244 Variant1(u32, u32),
245245}
246246
247#[cfg(not(any(bfail1,bfail4)))]
248#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
249#[rustc_clean(cfg="bfail3")]
250#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
251#[rustc_clean(cfg="bfail6")]
247#[cfg(not(any(bpass1,bpass4)))]
248#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
249#[rustc_clean(cfg="bpass3")]
250#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
251#[rustc_clean(cfg="bpass6")]
252252enum EnumChangeFieldTypeTupleStyleVariant {
253253 Variant1(u32,
254254 u64),
......@@ -257,17 +257,17 @@ enum EnumChangeFieldTypeTupleStyleVariant {
257257
258258
259259// Change the type of a field in a struct-style variant -----------------------
260#[cfg(any(bfail1,bfail4))]
260#[cfg(any(bpass1,bpass4))]
261261enum EnumChangeFieldTypeStructStyleVariant {
262262 Variant1,
263263 Variant2 { a: u32, b: u32 },
264264}
265265
266#[cfg(not(any(bfail1,bfail4)))]
267#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
268#[rustc_clean(cfg="bfail3")]
269#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
270#[rustc_clean(cfg="bfail6")]
266#[cfg(not(any(bpass1,bpass4)))]
267#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
268#[rustc_clean(cfg="bpass3")]
269#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
270#[rustc_clean(cfg="bpass6")]
271271enum EnumChangeFieldTypeStructStyleVariant {
272272 Variant1,
273273 Variant2 {
......@@ -279,16 +279,16 @@ enum EnumChangeFieldTypeStructStyleVariant {
279279
280280
281281// Change the name of a field in a struct-style variant -----------------------
282#[cfg(any(bfail1,bfail4))]
282#[cfg(any(bpass1,bpass4))]
283283enum EnumChangeFieldNameStructStyleVariant {
284284 Variant1 { a: u32, b: u32 },
285285}
286286
287#[cfg(not(any(bfail1,bfail4)))]
288#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
289#[rustc_clean(cfg="bfail3")]
290#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
291#[rustc_clean(cfg="bfail6")]
287#[cfg(not(any(bpass1,bpass4)))]
288#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
289#[rustc_clean(cfg="bpass3")]
290#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
291#[rustc_clean(cfg="bpass6")]
292292enum EnumChangeFieldNameStructStyleVariant {
293293 Variant1 { a: u32, c: u32 },
294294}
......@@ -296,16 +296,16 @@ enum EnumChangeFieldNameStructStyleVariant {
296296
297297
298298// Change order of fields in a tuple-style variant ----------------------------
299#[cfg(any(bfail1,bfail4))]
299#[cfg(any(bpass1,bpass4))]
300300enum EnumChangeOrderTupleStyleVariant {
301301 Variant1(u32, u64),
302302}
303303
304#[cfg(not(any(bfail1,bfail4)))]
305#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
306#[rustc_clean(cfg="bfail3")]
307#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
308#[rustc_clean(cfg="bfail6")]
304#[cfg(not(any(bpass1,bpass4)))]
305#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
306#[rustc_clean(cfg="bpass3")]
307#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
308#[rustc_clean(cfg="bpass6")]
309309enum EnumChangeOrderTupleStyleVariant {
310310 Variant1(
311311 u64,
......@@ -315,16 +315,16 @@ enum EnumChangeOrderTupleStyleVariant {
315315
316316
317317// Change order of fields in a struct-style variant ---------------------------
318#[cfg(any(bfail1,bfail4))]
318#[cfg(any(bpass1,bpass4))]
319319enum EnumChangeFieldOrderStructStyleVariant {
320320 Variant1 { a: u32, b: f32 },
321321}
322322
323#[cfg(not(any(bfail1,bfail4)))]
324#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
325#[rustc_clean(cfg="bfail3")]
326#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
327#[rustc_clean(cfg="bfail6")]
323#[cfg(not(any(bpass1,bpass4)))]
324#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
325#[rustc_clean(cfg="bpass3")]
326#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
327#[rustc_clean(cfg="bpass6")]
328328enum EnumChangeFieldOrderStructStyleVariant {
329329 Variant1 { b: f32, a: u32 },
330330}
......@@ -332,16 +332,16 @@ enum EnumChangeFieldOrderStructStyleVariant {
332332
333333
334334// Add a field to a tuple-style variant ---------------------------------------
335#[cfg(any(bfail1,bfail4))]
335#[cfg(any(bpass1,bpass4))]
336336enum EnumAddFieldTupleStyleVariant {
337337 Variant1(u32, u32),
338338}
339339
340#[cfg(not(any(bfail1,bfail4)))]
341#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
342#[rustc_clean(cfg="bfail3")]
343#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
344#[rustc_clean(cfg="bfail6")]
340#[cfg(not(any(bpass1,bpass4)))]
341#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
342#[rustc_clean(cfg="bpass3")]
343#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
344#[rustc_clean(cfg="bpass6")]
345345enum EnumAddFieldTupleStyleVariant {
346346 Variant1(u32, u32, u32),
347347}
......@@ -349,16 +349,16 @@ enum EnumAddFieldTupleStyleVariant {
349349
350350
351351// Add a field to a struct-style variant --------------------------------------
352#[cfg(any(bfail1,bfail4))]
352#[cfg(any(bpass1,bpass4))]
353353enum EnumAddFieldStructStyleVariant {
354354 Variant1 { a: u32, b: u32 },
355355}
356356
357#[cfg(not(any(bfail1,bfail4)))]
358#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
359#[rustc_clean(cfg="bfail3")]
360#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
361#[rustc_clean(cfg="bfail6")]
357#[cfg(not(any(bpass1,bpass4)))]
358#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
359#[rustc_clean(cfg="bpass3")]
360#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
361#[rustc_clean(cfg="bpass6")]
362362enum EnumAddFieldStructStyleVariant {
363363 Variant1 { a: u32, b: u32, c: u32 },
364364}
......@@ -366,17 +366,17 @@ enum EnumAddFieldStructStyleVariant {
366366
367367
368368// Add #[must_use] to the enum ------------------------------------------------
369#[cfg(any(bfail1,bfail4))]
369#[cfg(any(bpass1,bpass4))]
370370enum EnumAddMustUse {
371371 Variant1,
372372 Variant2,
373373}
374374
375#[cfg(not(any(bfail1,bfail4)))]
376#[rustc_clean(cfg="bfail2")]
377#[rustc_clean(cfg="bfail3")]
378#[rustc_clean(cfg="bfail5")]
379#[rustc_clean(cfg="bfail6")]
375#[cfg(not(any(bpass1,bpass4)))]
376#[rustc_clean(cfg="bpass2")]
377#[rustc_clean(cfg="bpass3")]
378#[rustc_clean(cfg="bpass5")]
379#[rustc_clean(cfg="bpass6")]
380380#[must_use]
381381enum EnumAddMustUse {
382382 Variant1,
......@@ -386,17 +386,17 @@ enum EnumAddMustUse {
386386
387387
388388// Add #[repr(C)] to the enum -------------------------------------------------
389#[cfg(any(bfail1,bfail4))]
389#[cfg(any(bpass1,bpass4))]
390390enum EnumAddReprC {
391391 Variant1,
392392 Variant2,
393393}
394394
395#[cfg(not(any(bfail1,bfail4)))]
396#[rustc_clean(cfg="bfail2", except="type_of")]
397#[rustc_clean(cfg="bfail3")]
398#[rustc_clean(cfg="bfail5", except="type_of")]
399#[rustc_clean(cfg="bfail6")]
395#[cfg(not(any(bpass1,bpass4)))]
396#[rustc_clean(cfg="bpass2", except="type_of")]
397#[rustc_clean(cfg="bpass3")]
398#[rustc_clean(cfg="bpass5", except="type_of")]
399#[rustc_clean(cfg="bpass6")]
400400#[repr(C)]
401401enum EnumAddReprC {
402402 Variant1,
......@@ -406,16 +406,16 @@ enum EnumAddReprC {
406406
407407
408408// Change the name of a type parameter ----------------------------------------
409#[cfg(any(bfail1,bfail4))]
409#[cfg(any(bpass1,bpass4))]
410410enum EnumChangeNameOfTypeParameter<S> {
411411 Variant1(S),
412412}
413413
414#[cfg(not(any(bfail1,bfail4)))]
415#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
416#[rustc_clean(cfg="bfail3")]
417#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
418#[rustc_clean(cfg="bfail6")]
414#[cfg(not(any(bpass1,bpass4)))]
415#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
416#[rustc_clean(cfg="bpass3")]
417#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
418#[rustc_clean(cfg="bpass6")]
419419enum EnumChangeNameOfTypeParameter<T> {
420420 Variant1(T),
421421}
......@@ -423,17 +423,17 @@ enum EnumChangeNameOfTypeParameter<T> {
423423
424424
425425// Add a type parameter ------------------------------------------------------
426#[cfg(any(bfail1,bfail4))]
426#[cfg(any(bpass1,bpass4))]
427427enum EnumAddTypeParameter<S> {
428428 Variant1(S),
429429 Variant2(S),
430430}
431431
432#[cfg(not(any(bfail1,bfail4)))]
433#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
434#[rustc_clean(cfg="bfail3")]
435#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
436#[rustc_clean(cfg="bfail6")]
432#[cfg(not(any(bpass1,bpass4)))]
433#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
434#[rustc_clean(cfg="bpass3")]
435#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
436#[rustc_clean(cfg="bpass6")]
437437enum EnumAddTypeParameter<S, T> {
438438 Variant1(S),
439439 Variant2(T),
......@@ -442,16 +442,16 @@ enum EnumAddTypeParameter<S, T> {
442442
443443
444444// Change the name of a lifetime parameter ------------------------------------
445#[cfg(any(bfail1,bfail4))]
445#[cfg(any(bpass1,bpass4))]
446446enum EnumChangeNameOfLifetimeParameter<'a> {
447447 Variant1(&'a u32),
448448}
449449
450#[cfg(not(any(bfail1,bfail4)))]
451#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,generics_of,type_of")]
452#[rustc_clean(cfg="bfail3")]
453#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,generics_of,type_of")]
454#[rustc_clean(cfg="bfail6")]
450#[cfg(not(any(bpass1,bpass4)))]
451#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,generics_of,type_of")]
452#[rustc_clean(cfg="bpass3")]
453#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,generics_of,type_of")]
454#[rustc_clean(cfg="bpass6")]
455455enum EnumChangeNameOfLifetimeParameter<'b> {
456456 Variant1(&'b u32),
457457}
......@@ -459,17 +459,17 @@ enum EnumChangeNameOfLifetimeParameter<'b> {
459459
460460
461461// Add a lifetime parameter ---------------------------------------------------
462#[cfg(any(bfail1,bfail4))]
462#[cfg(any(bpass1,bpass4))]
463463enum EnumAddLifetimeParameter<'a> {
464464 Variant1(&'a u32),
465465 Variant2(&'a u32),
466466}
467467
468#[cfg(not(any(bfail1,bfail4)))]
469#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,generics_of,type_of")]
470#[rustc_clean(cfg="bfail3")]
471#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,generics_of,type_of")]
472#[rustc_clean(cfg="bfail6")]
468#[cfg(not(any(bpass1,bpass4)))]
469#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,generics_of,type_of")]
470#[rustc_clean(cfg="bpass3")]
471#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,generics_of,type_of")]
472#[rustc_clean(cfg="bpass6")]
473473enum EnumAddLifetimeParameter<'a, 'b> {
474474 Variant1(&'a u32),
475475 Variant2(&'b u32),
......@@ -478,34 +478,34 @@ enum EnumAddLifetimeParameter<'a, 'b> {
478478
479479
480480// Add a lifetime bound to a lifetime parameter -------------------------------
481#[cfg(any(bfail1,bfail4))]
481#[cfg(any(bpass1,bpass4))]
482482enum EnumAddLifetimeParameterBound<'a, 'b> {
483483 Variant1(&'a u32),
484484 Variant2(&'b u32),
485485}
486486
487#[cfg(not(any(bfail1,bfail4)))]
488#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,predicates_of")]
489#[rustc_clean(cfg="bfail3")]
490#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
491#[rustc_clean(cfg="bfail6")]
487#[cfg(not(any(bpass1,bpass4)))]
488#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,predicates_of")]
489#[rustc_clean(cfg="bpass3")]
490#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
491#[rustc_clean(cfg="bpass6")]
492492enum EnumAddLifetimeParameterBound<'a, 'b: 'a> {
493493 Variant1(&'a u32),
494494 Variant2(&'b u32),
495495}
496496
497497// Add a lifetime bound to a type parameter -----------------------------------
498#[cfg(any(bfail1,bfail4))]
498#[cfg(any(bpass1,bpass4))]
499499enum EnumAddLifetimeBoundToParameter<'a, T> {
500500 Variant1(T),
501501 Variant2(&'a u32),
502502}
503503
504#[cfg(not(any(bfail1,bfail4)))]
505#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,predicates_of")]
506#[rustc_clean(cfg="bfail3")]
507#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
508#[rustc_clean(cfg="bfail6")]
504#[cfg(not(any(bpass1,bpass4)))]
505#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,predicates_of")]
506#[rustc_clean(cfg="bpass3")]
507#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
508#[rustc_clean(cfg="bpass6")]
509509enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
510510 Variant1(T),
511511 Variant2(&'a u32),
......@@ -514,16 +514,16 @@ enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
514514
515515
516516// Add a trait bound to a type parameter --------------------------------------
517#[cfg(any(bfail1,bfail4))]
517#[cfg(any(bpass1,bpass4))]
518518enum EnumAddTraitBound<S> {
519519 Variant1(S),
520520}
521521
522#[cfg(not(any(bfail1,bfail4)))]
523#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
524#[rustc_clean(cfg="bfail3")]
525#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
526#[rustc_clean(cfg="bfail6")]
522#[cfg(not(any(bpass1,bpass4)))]
523#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
524#[rustc_clean(cfg="bpass3")]
525#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
526#[rustc_clean(cfg="bpass6")]
527527enum EnumAddTraitBound<T: Sync> {
528528 Variant1(T),
529529}
......@@ -531,17 +531,17 @@ enum EnumAddTraitBound<T: Sync> {
531531
532532
533533// Add a lifetime bound to a lifetime parameter in where clause ---------------
534#[cfg(any(bfail1,bfail4))]
534#[cfg(any(bpass1,bpass4))]
535535enum EnumAddLifetimeParameterBoundWhere<'a, 'b> {
536536 Variant1(&'a u32),
537537 Variant2(&'b u32),
538538}
539539
540#[cfg(not(any(bfail1,bfail4)))]
541#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,predicates_of")]
542#[rustc_clean(cfg="bfail3")]
543#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
544#[rustc_clean(cfg="bfail6")]
540#[cfg(not(any(bpass1,bpass4)))]
541#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,predicates_of")]
542#[rustc_clean(cfg="bpass3")]
543#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
544#[rustc_clean(cfg="bpass6")]
545545enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
546546 Variant1(&'a u32),
547547 Variant2(&'b u32),
......@@ -550,17 +550,17 @@ enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
550550
551551
552552// Add a lifetime bound to a type parameter in where clause -------------------
553#[cfg(any(bfail1,bfail4))]
553#[cfg(any(bpass1,bpass4))]
554554enum EnumAddLifetimeBoundToParameterWhere<'a, T> {
555555 Variant1(T),
556556 Variant2(&'a u32),
557557}
558558
559#[cfg(not(any(bfail1,bfail4)))]
560#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,predicates_of")]
561#[rustc_clean(cfg="bfail3")]
562#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
563#[rustc_clean(cfg="bfail6")]
559#[cfg(not(any(bpass1,bpass4)))]
560#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,predicates_of")]
561#[rustc_clean(cfg="bpass3")]
562#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
563#[rustc_clean(cfg="bpass6")]
564564enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
565565 Variant1(T),
566566 Variant2(&'a u32),
......@@ -569,16 +569,16 @@ enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
569569
570570
571571// Add a trait bound to a type parameter in where clause ----------------------
572#[cfg(any(bfail1,bfail4))]
572#[cfg(any(bpass1,bpass4))]
573573enum EnumAddTraitBoundWhere<S> {
574574 Variant1(S),
575575}
576576
577#[cfg(not(any(bfail1,bfail4)))]
578#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
579#[rustc_clean(cfg="bfail3")]
580#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
581#[rustc_clean(cfg="bfail6")]
577#[cfg(not(any(bpass1,bpass4)))]
578#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
579#[rustc_clean(cfg="bpass3")]
580#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,generics_of,predicates_of,type_of")]
581#[rustc_clean(cfg="bpass6")]
582582enum EnumAddTraitBoundWhere<T> where T: Sync {
583583 Variant1(T),
584584}
......@@ -586,17 +586,17 @@ enum EnumAddTraitBoundWhere<T> where T: Sync {
586586
587587
588588// In an enum with two variants, swap usage of type parameters ----------------
589#[cfg(any(bfail1,bfail4))]
589#[cfg(any(bpass1,bpass4))]
590590enum EnumSwapUsageTypeParameters<A, B> {
591591 Variant1 { a: A },
592592 Variant2 { a: B },
593593}
594594
595#[cfg(not(any(bfail1,bfail4)))]
596#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
597#[rustc_clean(cfg="bfail3")]
598#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
599#[rustc_clean(cfg="bfail6")]
595#[cfg(not(any(bpass1,bpass4)))]
596#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
597#[rustc_clean(cfg="bpass3")]
598#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
599#[rustc_clean(cfg="bpass6")]
600600enum EnumSwapUsageTypeParameters<A, B> {
601601 Variant1 {
602602 a: B
......@@ -609,17 +609,17 @@ enum EnumSwapUsageTypeParameters<A, B> {
609609
610610
611611// In an enum with two variants, swap usage of lifetime parameters ------------
612#[cfg(any(bfail1,bfail4))]
612#[cfg(any(bpass1,bpass4))]
613613enum EnumSwapUsageLifetimeParameters<'a, 'b> {
614614 Variant1 { a: &'a u32 },
615615 Variant2 { b: &'b u32 },
616616}
617617
618#[cfg(not(any(bfail1,bfail4)))]
619#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
620#[rustc_clean(cfg="bfail3")]
621#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
622#[rustc_clean(cfg="bfail6")]
618#[cfg(not(any(bpass1,bpass4)))]
619#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
620#[rustc_clean(cfg="bpass3")]
621#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
622#[rustc_clean(cfg="bpass6")]
623623enum EnumSwapUsageLifetimeParameters<'a, 'b> {
624624 Variant1 {
625625 a: &'b u32
......@@ -638,15 +638,15 @@ struct ReferencedType2;
638638
639639// Change field type in tuple-style variant indirectly by modifying a use statement
640640mod change_field_type_indirectly_tuple_style {
641 #[cfg(any(bfail1,bfail4))]
641 #[cfg(any(bpass1,bpass4))]
642642 use super::ReferencedType1 as FieldType;
643 #[cfg(not(any(bfail1,bfail4)))]
643 #[cfg(not(any(bpass1,bpass4)))]
644644 use super::ReferencedType2 as FieldType;
645645
646 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
647 #[rustc_clean(cfg="bfail3")]
648 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
649 #[rustc_clean(cfg="bfail6")]
646 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
647 #[rustc_clean(cfg="bpass3")]
648 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
649 #[rustc_clean(cfg="bpass6")]
650650 enum TupleStyle {
651651 Variant1(
652652 FieldType
......@@ -658,15 +658,15 @@ mod change_field_type_indirectly_tuple_style {
658658
659659// Change field type in record-style variant indirectly by modifying a use statement
660660mod change_field_type_indirectly_struct_style {
661 #[cfg(any(bfail1,bfail4))]
661 #[cfg(any(bpass1,bpass4))]
662662 use super::ReferencedType1 as FieldType;
663 #[cfg(not(any(bfail1,bfail4)))]
663 #[cfg(not(any(bpass1,bpass4)))]
664664 use super::ReferencedType2 as FieldType;
665665
666 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
667 #[rustc_clean(cfg="bfail3")]
668 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
669 #[rustc_clean(cfg="bfail6")]
666 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
667 #[rustc_clean(cfg="bpass3")]
668 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
669 #[rustc_clean(cfg="bpass6")]
670670 enum StructStyle {
671671 Variant1 {
672672 a: FieldType
......@@ -683,15 +683,15 @@ trait ReferencedTrait2 {}
683683
684684// Change trait bound of type parameter indirectly by modifying a use statement
685685mod change_trait_bound_indirectly {
686 #[cfg(any(bfail1,bfail4))]
686 #[cfg(any(bpass1,bpass4))]
687687 use super::ReferencedTrait1 as Trait;
688 #[cfg(not(any(bfail1,bfail4)))]
688 #[cfg(not(any(bpass1,bpass4)))]
689689 use super::ReferencedTrait2 as Trait;
690690
691 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,predicates_of")]
692 #[rustc_clean(cfg="bfail3")]
693 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
694 #[rustc_clean(cfg="bfail6")]
691 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,predicates_of")]
692 #[rustc_clean(cfg="bpass3")]
693 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
694 #[rustc_clean(cfg="bpass6")]
695695 enum Enum<T: Trait> {
696696 Variant1(T)
697697 }
......@@ -701,15 +701,15 @@ mod change_trait_bound_indirectly {
701701
702702// Change trait bound of type parameter in where clause indirectly by modifying a use statement
703703mod change_trait_bound_indirectly_where {
704 #[cfg(any(bfail1,bfail4))]
704 #[cfg(any(bpass1,bpass4))]
705705 use super::ReferencedTrait1 as Trait;
706 #[cfg(not(any(bfail1,bfail4)))]
706 #[cfg(not(any(bpass1,bpass4)))]
707707 use super::ReferencedTrait2 as Trait;
708708
709 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,predicates_of")]
710 #[rustc_clean(cfg="bfail3")]
711 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
712 #[rustc_clean(cfg="bfail6")]
709 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,predicates_of")]
710 #[rustc_clean(cfg="bpass3")]
711 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
712 #[rustc_clean(cfg="bpass6")]
713713 enum Enum<T> where T: Trait {
714714 Variant1(T)
715715 }
tests/incremental/hashes/exported_vs_not.rs+23-23
......@@ -1,10 +1,10 @@
1//@ build-pass (FIXME(62277): could be check-pass?)
2//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
1//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
32//@ compile-flags: -Z query-dep-graph -O
4//@ [bfail1]compile-flags: -Zincremental-ignore-spans
5//@ [bfail2]compile-flags: -Zincremental-ignore-spans
6//@ [bfail3]compile-flags: -Zincremental-ignore-spans
3//@ [bpass1]compile-flags: -Zincremental-ignore-spans
4//@ [bpass2]compile-flags: -Zincremental-ignore-spans
5//@ [bpass3]compile-flags: -Zincremental-ignore-spans
76//@ ignore-backends: gcc
7// FIXME(#62277): could be check-pass?
88
99#![allow(warnings)]
1010#![feature(rustc_attrs)]
......@@ -14,16 +14,16 @@
1414// the hash of the opt_hir_owner_nodes node should change, but not the hash of
1515// either the hir_owner or the Metadata node.
1616
17#[cfg(any(bfail1,bfail4))]
17#[cfg(any(bpass1,bpass4))]
1818pub fn body_not_exported_to_metadata() -> u32 {
1919 1
2020}
2121
22#[cfg(not(any(bfail1,bfail4)))]
23#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
24#[rustc_clean(cfg="bfail3")]
25#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
26#[rustc_clean(cfg="bfail6")]
22#[cfg(not(any(bpass1,bpass4)))]
23#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
24#[rustc_clean(cfg="bpass3")]
25#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
26#[rustc_clean(cfg="bpass6")]
2727pub fn body_not_exported_to_metadata() -> u32 {
2828 2
2929}
......@@ -34,17 +34,17 @@ pub fn body_not_exported_to_metadata() -> u32 {
3434// marked as #[inline]. Only the hash of the hir_owner depnode should be
3535// unaffected by a change to the body.
3636
37#[cfg(any(bfail1,bfail4))]
37#[cfg(any(bpass1,bpass4))]
3838#[inline]
3939pub fn body_exported_to_metadata_because_of_inline() -> u32 {
4040 1
4141}
4242
43#[cfg(not(any(bfail1,bfail4)))]
44#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
45#[rustc_clean(cfg="bfail3")]
46#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
47#[rustc_clean(cfg="bfail6")]
43#[cfg(not(any(bpass1,bpass4)))]
44#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
45#[rustc_clean(cfg="bpass3")]
46#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
47#[rustc_clean(cfg="bpass6")]
4848#[inline]
4949pub fn body_exported_to_metadata_because_of_inline() -> u32 {
5050 2
......@@ -56,17 +56,17 @@ pub fn body_exported_to_metadata_because_of_inline() -> u32 {
5656// generic. Only the hash of the hir_owner depnode should be
5757// unaffected by a change to the body.
5858
59#[cfg(any(bfail1,bfail4))]
59#[cfg(any(bpass1,bpass4))]
6060#[inline]
6161pub fn body_exported_to_metadata_because_of_generic() -> u32 {
6262 1
6363}
6464
65#[cfg(not(any(bfail1,bfail4)))]
66#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
67#[rustc_clean(cfg="bfail3")]
68#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
69#[rustc_clean(cfg="bfail6")]
65#[cfg(not(any(bpass1,bpass4)))]
66#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
67#[rustc_clean(cfg="bpass3")]
68#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
69#[rustc_clean(cfg="bpass6")]
7070#[inline]
7171pub fn body_exported_to_metadata_because_of_generic() -> u32 {
7272 2
tests/incremental/hashes/extern_mods.rs+83-83
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,168 +19,168 @@
1919#![crate_type = "rlib"]
2020
2121// Change function name --------------------------------------------------------
22#[cfg(any(bfail1,bfail4))]
22#[cfg(any(bpass1,bpass4))]
2323extern "C" {
2424 pub fn change_function_name1(c: i64) -> i32;
2525}
2626
27#[cfg(not(any(bfail1,bfail4)))]
28#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes")]
29#[rustc_clean(cfg = "bfail3")]
30#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes")]
31#[rustc_clean(cfg = "bfail6")]
27#[cfg(not(any(bpass1,bpass4)))]
28#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes")]
29#[rustc_clean(cfg = "bpass3")]
30#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes")]
31#[rustc_clean(cfg = "bpass6")]
3232extern "C" {
3333 pub fn change_function_name2(c: i64) -> i32;
3434}
3535
3636// Change parameter name -------------------------------------------------------
37#[cfg(any(bfail1,bfail4))]
37#[cfg(any(bpass1,bpass4))]
3838extern "C" {
3939 pub fn change_parameter_name(c: i64) -> i32;
4040}
4141
42#[cfg(not(any(bfail1,bfail4)))]
43#[rustc_clean(cfg = "bfail2")]
44#[rustc_clean(cfg = "bfail3")]
45#[rustc_clean(cfg = "bfail5")]
46#[rustc_clean(cfg = "bfail6")]
42#[cfg(not(any(bpass1,bpass4)))]
43#[rustc_clean(cfg = "bpass2")]
44#[rustc_clean(cfg = "bpass3")]
45#[rustc_clean(cfg = "bpass5")]
46#[rustc_clean(cfg = "bpass6")]
4747extern "C" {
4848 pub fn change_parameter_name(d: i64) -> i32;
4949}
5050
5151// Change parameter type -------------------------------------------------------
52#[cfg(any(bfail1,bfail4))]
52#[cfg(any(bpass1,bpass4))]
5353extern "C" {
5454 pub fn change_parameter_type(c: i64) -> i32;
5555}
5656
57#[cfg(not(any(bfail1,bfail4)))]
58#[rustc_clean(cfg = "bfail2")]
59#[rustc_clean(cfg = "bfail3")]
60#[rustc_clean(cfg = "bfail5")]
61#[rustc_clean(cfg = "bfail6")]
57#[cfg(not(any(bpass1,bpass4)))]
58#[rustc_clean(cfg = "bpass2")]
59#[rustc_clean(cfg = "bpass3")]
60#[rustc_clean(cfg = "bpass5")]
61#[rustc_clean(cfg = "bpass6")]
6262extern "C" {
6363 pub fn change_parameter_type(c: i32) -> i32;
6464}
6565
6666// Change return type ----------------------------------------------------------
67#[cfg(any(bfail1,bfail4))]
67#[cfg(any(bpass1,bpass4))]
6868extern "C" {
6969 pub fn change_return_type(c: i32) -> i32;
7070}
7171
72#[cfg(not(any(bfail1,bfail4)))]
73#[rustc_clean(cfg = "bfail2")]
74#[rustc_clean(cfg = "bfail3")]
75#[rustc_clean(cfg = "bfail5")]
76#[rustc_clean(cfg = "bfail6")]
72#[cfg(not(any(bpass1,bpass4)))]
73#[rustc_clean(cfg = "bpass2")]
74#[rustc_clean(cfg = "bpass3")]
75#[rustc_clean(cfg = "bpass5")]
76#[rustc_clean(cfg = "bpass6")]
7777extern "C" {
7878 pub fn change_return_type(c: i32) -> i8 ;
7979}
8080
8181// Add parameter ---------------------------------------------------------------
82#[cfg(any(bfail1,bfail4))]
82#[cfg(any(bpass1,bpass4))]
8383extern "C" {
8484 pub fn add_parameter(c: i32 ) -> i32;
8585}
8686
87#[cfg(not(any(bfail1,bfail4)))]
88#[rustc_clean(cfg = "bfail2")]
89#[rustc_clean(cfg = "bfail3")]
90#[rustc_clean(cfg = "bfail5")]
91#[rustc_clean(cfg = "bfail6")]
87#[cfg(not(any(bpass1,bpass4)))]
88#[rustc_clean(cfg = "bpass2")]
89#[rustc_clean(cfg = "bpass3")]
90#[rustc_clean(cfg = "bpass5")]
91#[rustc_clean(cfg = "bpass6")]
9292extern "C" {
9393 pub fn add_parameter(c: i32, d: i32) -> i32;
9494}
9595
9696// Add return type -------------------------------------------------------------
97#[cfg(any(bfail1,bfail4))]
97#[cfg(any(bpass1,bpass4))]
9898extern "C" {
9999 pub fn add_return_type(c: i32) ;
100100}
101101
102#[cfg(not(any(bfail1,bfail4)))]
103#[rustc_clean(cfg = "bfail2")]
104#[rustc_clean(cfg = "bfail3")]
105#[rustc_clean(cfg = "bfail5")]
106#[rustc_clean(cfg = "bfail6")]
102#[cfg(not(any(bpass1,bpass4)))]
103#[rustc_clean(cfg = "bpass2")]
104#[rustc_clean(cfg = "bpass3")]
105#[rustc_clean(cfg = "bpass5")]
106#[rustc_clean(cfg = "bpass6")]
107107extern "C" {
108108 pub fn add_return_type(c: i32) -> i32;
109109}
110110
111111// Make function variadic ------------------------------------------------------
112#[cfg(any(bfail1,bfail4))]
112#[cfg(any(bpass1,bpass4))]
113113extern "C" {
114114 pub fn make_function_variadic(c: i32 );
115115}
116116
117#[cfg(not(any(bfail1,bfail4)))]
118#[rustc_clean(cfg = "bfail2")]
119#[rustc_clean(cfg = "bfail3")]
120#[rustc_clean(cfg = "bfail5")]
121#[rustc_clean(cfg = "bfail6")]
117#[cfg(not(any(bpass1,bpass4)))]
118#[rustc_clean(cfg = "bpass2")]
119#[rustc_clean(cfg = "bpass3")]
120#[rustc_clean(cfg = "bpass5")]
121#[rustc_clean(cfg = "bpass6")]
122122extern "C" {
123123 pub fn make_function_variadic(c: i32, ...);
124124}
125125
126126// Change calling convention ---------------------------------------------------
127#[cfg(any(bfail1,bfail4))]
127#[cfg(any(bpass1,bpass4))]
128128extern "C" {
129129 pub fn change_calling_convention(c: (i32,));
130130}
131131
132#[cfg(not(any(bfail1,bfail4)))]
133#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes")]
134#[rustc_clean(cfg = "bfail3")]
135#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes")]
136#[rustc_clean(cfg = "bfail6")]
132#[cfg(not(any(bpass1,bpass4)))]
133#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes")]
134#[rustc_clean(cfg = "bpass3")]
135#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes")]
136#[rustc_clean(cfg = "bpass6")]
137137extern "rust-call" {
138138 pub fn change_calling_convention(c: (i32,));
139139}
140140
141141// Make function public --------------------------------------------------------
142#[cfg(any(bfail1,bfail4))]
142#[cfg(any(bpass1,bpass4))]
143143extern "C" {
144144 fn make_function_public(c: i32);
145145}
146146
147#[cfg(not(any(bfail1,bfail4)))]
148#[rustc_clean(cfg = "bfail2")]
149#[rustc_clean(cfg = "bfail3")]
150#[rustc_clean(cfg = "bfail5")]
151#[rustc_clean(cfg = "bfail6")]
147#[cfg(not(any(bpass1,bpass4)))]
148#[rustc_clean(cfg = "bpass2")]
149#[rustc_clean(cfg = "bpass3")]
150#[rustc_clean(cfg = "bpass5")]
151#[rustc_clean(cfg = "bpass6")]
152152extern "C" {
153153 pub fn make_function_public(c: i32);
154154}
155155
156156// Add function ----------------------------------------------------------------
157#[cfg(any(bfail1,bfail4))]
157#[cfg(any(bpass1,bpass4))]
158158extern "C" {
159159 pub fn add_function1(c: i32);
160160}
161161
162#[cfg(not(any(bfail1,bfail4)))]
163#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes")]
164#[rustc_clean(cfg = "bfail3")]
165#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes")]
166#[rustc_clean(cfg = "bfail6")]
162#[cfg(not(any(bpass1,bpass4)))]
163#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes")]
164#[rustc_clean(cfg = "bpass3")]
165#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes")]
166#[rustc_clean(cfg = "bpass6")]
167167extern "C" {
168168 pub fn add_function1(c: i32);
169169 pub fn add_function2();
170170}
171171
172172// Change link-name ------------------------------------------------------------
173#[cfg(any(bfail1,bfail4))]
173#[cfg(any(bpass1,bpass4))]
174174#[link(name = "foo")]
175175extern "C" {
176176 pub fn change_link_name(c: i32);
177177}
178178
179#[cfg(not(any(bfail1,bfail4)))]
180#[rustc_clean(cfg = "bfail2")]
181#[rustc_clean(cfg = "bfail3")]
182#[rustc_clean(cfg = "bfail5")]
183#[rustc_clean(cfg = "bfail6")]
179#[cfg(not(any(bpass1,bpass4)))]
180#[rustc_clean(cfg = "bpass2")]
181#[rustc_clean(cfg = "bpass3")]
182#[rustc_clean(cfg = "bpass5")]
183#[rustc_clean(cfg = "bpass6")]
184184#[link(name = "bar")]
185185extern "C" {
186186 pub fn change_link_name(c: i32);
......@@ -191,15 +191,15 @@ type c_i64 = i64;
191191
192192// Indirectly change parameter type --------------------------------------------
193193mod indirectly_change_parameter_type {
194 #[cfg(any(bfail1,bfail4))]
194 #[cfg(any(bpass1,bpass4))]
195195 use super::c_i32 as c_int;
196 #[cfg(not(any(bfail1,bfail4)))]
196 #[cfg(not(any(bpass1,bpass4)))]
197197 use super::c_i64 as c_int;
198198
199 #[rustc_clean(cfg = "bfail2")]
200 #[rustc_clean(cfg = "bfail3")]
201 #[rustc_clean(cfg = "bfail5")]
202 #[rustc_clean(cfg = "bfail6")]
199 #[rustc_clean(cfg = "bpass2")]
200 #[rustc_clean(cfg = "bpass3")]
201 #[rustc_clean(cfg = "bpass5")]
202 #[rustc_clean(cfg = "bpass6")]
203203 extern "C" {
204204 pub fn indirectly_change_parameter_type(c: c_int);
205205 }
......@@ -207,15 +207,15 @@ mod indirectly_change_parameter_type {
207207
208208// Indirectly change return type --------------------------------------------
209209mod indirectly_change_return_type {
210 #[cfg(any(bfail1,bfail4))]
210 #[cfg(any(bpass1,bpass4))]
211211 use super::c_i32 as c_int;
212 #[cfg(not(any(bfail1,bfail4)))]
212 #[cfg(not(any(bpass1,bpass4)))]
213213 use super::c_i64 as c_int;
214214
215 #[rustc_clean(cfg = "bfail2")]
216 #[rustc_clean(cfg = "bfail3")]
217 #[rustc_clean(cfg = "bfail5")]
218 #[rustc_clean(cfg = "bfail6")]
215 #[rustc_clean(cfg = "bpass2")]
216 #[rustc_clean(cfg = "bpass3")]
217 #[rustc_clean(cfg = "bpass5")]
218 #[rustc_clean(cfg = "bpass6")]
219219 extern "C" {
220220 pub fn indirectly_change_return_type() -> c_int;
221221 }
tests/incremental/hashes/for_loops.rs+71-71
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,7 +19,7 @@
1919
2020
2121// Change loop body ------------------------------------------------------------
22#[cfg(any(bfail1,bfail4))]
22#[cfg(any(bpass1,bpass4))]
2323pub fn change_loop_body() {
2424 let mut _x = 0;
2525 for _ in 0..1 {
......@@ -28,11 +28,11 @@ pub fn change_loop_body() {
2828 }
2929}
3030
31#[cfg(not(any(bfail1,bfail4)))]
32#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
33#[rustc_clean(cfg="bfail3")]
34#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
35#[rustc_clean(cfg="bfail6")]
31#[cfg(not(any(bpass1,bpass4)))]
32#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
33#[rustc_clean(cfg="bpass3")]
34#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
35#[rustc_clean(cfg="bpass6")]
3636pub fn change_loop_body() {
3737 let mut _x = 0;
3838 for _ in 0..1 {
......@@ -44,7 +44,7 @@ pub fn change_loop_body() {
4444
4545
4646// Change iteration variable name ----------------------------------------------
47#[cfg(any(bfail1,bfail4))]
47#[cfg(any(bpass1,bpass4))]
4848pub fn change_iteration_variable_name() {
4949 let mut _x = 0;
5050 for _i in 0..1 {
......@@ -53,11 +53,11 @@ pub fn change_iteration_variable_name() {
5353 }
5454}
5555
56#[cfg(not(any(bfail1,bfail4)))]
57#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
58#[rustc_clean(cfg="bfail3")]
59#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
60#[rustc_clean(cfg="bfail6")]
56#[cfg(not(any(bpass1,bpass4)))]
57#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
58#[rustc_clean(cfg="bpass3")]
59#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
60#[rustc_clean(cfg="bpass6")]
6161pub fn change_iteration_variable_name() {
6262 let mut _x = 0;
6363 for _a in 0..1 {
......@@ -69,7 +69,7 @@ pub fn change_iteration_variable_name() {
6969
7070
7171// Change iteration variable pattern -------------------------------------------
72#[cfg(any(bfail1,bfail4))]
72#[cfg(any(bpass1,bpass4))]
7373pub fn change_iteration_variable_pattern() {
7474 let mut _x = 0;
7575 for _i in &[0, 1, 2] {
......@@ -78,11 +78,11 @@ pub fn change_iteration_variable_pattern() {
7878 }
7979}
8080
81#[cfg(not(any(bfail1,bfail4)))]
82#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
83#[rustc_clean(cfg="bfail3")]
84#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
85#[rustc_clean(cfg="bfail6")]
81#[cfg(not(any(bpass1,bpass4)))]
82#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
83#[rustc_clean(cfg="bpass3")]
84#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
85#[rustc_clean(cfg="bpass6")]
8686pub fn change_iteration_variable_pattern() {
8787 let mut _x = 0;
8888 for &_i in &[0, 1, 2] {
......@@ -94,7 +94,7 @@ pub fn change_iteration_variable_pattern() {
9494
9595
9696// Change iterable -------------------------------------------------------------
97#[cfg(any(bfail1,bfail4))]
97#[cfg(any(bpass1,bpass4))]
9898pub fn change_iterable() {
9999 let mut _x = 0;
100100 for _ in &[0, 1, 2] {
......@@ -103,11 +103,11 @@ pub fn change_iterable() {
103103 }
104104}
105105
106#[cfg(not(any(bfail1,bfail4)))]
107#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, promoted_mir")]
108#[rustc_clean(cfg="bfail3")]
109#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, promoted_mir")]
110#[rustc_clean(cfg="bfail6")]
106#[cfg(not(any(bpass1,bpass4)))]
107#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, promoted_mir")]
108#[rustc_clean(cfg="bpass3")]
109#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, promoted_mir")]
110#[rustc_clean(cfg="bpass6")]
111111pub fn change_iterable() {
112112 let mut _x = 0;
113113 for _ in &[0, 1, 3] {
......@@ -119,7 +119,7 @@ pub fn change_iterable() {
119119
120120
121121// Add break -------------------------------------------------------------------
122#[cfg(any(bfail1,bfail4))]
122#[cfg(any(bpass1,bpass4))]
123123pub fn add_break() {
124124 let mut _x = 0;
125125 for _ in 0..1 {
......@@ -128,11 +128,11 @@ pub fn add_break() {
128128 }
129129}
130130
131#[cfg(not(any(bfail1,bfail4)))]
132#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
133#[rustc_clean(cfg="bfail3")]
134#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
135#[rustc_clean(cfg="bfail6")]
131#[cfg(not(any(bpass1,bpass4)))]
132#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
133#[rustc_clean(cfg="bpass3")]
134#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
135#[rustc_clean(cfg="bpass6")]
136136pub fn add_break() {
137137 let mut _x = 0;
138138 for _ in 0..1 {
......@@ -144,7 +144,7 @@ pub fn add_break() {
144144
145145
146146// Add loop label --------------------------------------------------------------
147#[cfg(any(bfail1,bfail4))]
147#[cfg(any(bpass1,bpass4))]
148148pub fn add_loop_label() {
149149 let mut _x = 0;
150150 for _ in 0..1 {
......@@ -153,11 +153,11 @@ pub fn add_loop_label() {
153153 }
154154}
155155
156#[cfg(not(any(bfail1,bfail4)))]
157#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
158#[rustc_clean(cfg="bfail3")]
159#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
160#[rustc_clean(cfg="bfail6")]
156#[cfg(not(any(bpass1,bpass4)))]
157#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
158#[rustc_clean(cfg="bpass3")]
159#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
160#[rustc_clean(cfg="bpass6")]
161161pub fn add_loop_label() {
162162 let mut _x = 0;
163163 'label: for _ in 0..1 {
......@@ -169,7 +169,7 @@ pub fn add_loop_label() {
169169
170170
171171// Add loop label to break -----------------------------------------------------
172#[cfg(any(bfail1,bfail4))]
172#[cfg(any(bpass1,bpass4))]
173173pub fn add_loop_label_to_break() {
174174 let mut _x = 0;
175175 'label: for _ in 0..1 {
......@@ -178,11 +178,11 @@ pub fn add_loop_label_to_break() {
178178 }
179179}
180180
181#[cfg(not(any(bfail1,bfail4)))]
182#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
183#[rustc_clean(cfg="bfail3")]
184#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
185#[rustc_clean(cfg="bfail6")]
181#[cfg(not(any(bpass1,bpass4)))]
182#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
183#[rustc_clean(cfg="bpass3")]
184#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
185#[rustc_clean(cfg="bpass6")]
186186pub fn add_loop_label_to_break() {
187187 let mut _x = 0;
188188 'label: for _ in 0..1 {
......@@ -194,7 +194,7 @@ pub fn add_loop_label_to_break() {
194194
195195
196196// Change break label ----------------------------------------------------------
197#[cfg(any(bfail1,bfail4))]
197#[cfg(any(bpass1,bpass4))]
198198pub fn change_break_label() {
199199 let mut _x = 0;
200200 'outer: for _ in 0..1 {
......@@ -205,11 +205,11 @@ pub fn change_break_label() {
205205 }
206206}
207207
208#[cfg(not(any(bfail1,bfail4)))]
209#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
210#[rustc_clean(cfg="bfail3")]
211#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
212#[rustc_clean(cfg="bfail6")]
208#[cfg(not(any(bpass1,bpass4)))]
209#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
210#[rustc_clean(cfg="bpass3")]
211#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
212#[rustc_clean(cfg="bpass6")]
213213pub fn change_break_label() {
214214 let mut _x = 0;
215215 'outer: for _ in 0..1 {
......@@ -223,7 +223,7 @@ pub fn change_break_label() {
223223
224224
225225// Add loop label to continue --------------------------------------------------
226#[cfg(any(bfail1,bfail4))]
226#[cfg(any(bpass1,bpass4))]
227227pub fn add_loop_label_to_continue() {
228228 let mut _x = 0;
229229 'label: for _ in 0..1 {
......@@ -232,11 +232,11 @@ pub fn add_loop_label_to_continue() {
232232 }
233233}
234234
235#[cfg(not(any(bfail1,bfail4)))]
236#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
237#[rustc_clean(cfg="bfail3")]
238#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
239#[rustc_clean(cfg="bfail6")]
235#[cfg(not(any(bpass1,bpass4)))]
236#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
237#[rustc_clean(cfg="bpass3")]
238#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
239#[rustc_clean(cfg="bpass6")]
240240pub fn add_loop_label_to_continue() {
241241 let mut _x = 0;
242242 'label: for _ in 0..1 {
......@@ -248,7 +248,7 @@ pub fn add_loop_label_to_continue() {
248248
249249
250250// Change continue label ----------------------------------------------------------
251#[cfg(any(bfail1,bfail4))]
251#[cfg(any(bpass1,bpass4))]
252252pub fn change_continue_label() {
253253 let mut _x = 0;
254254 'outer: for _ in 0..1 {
......@@ -259,11 +259,11 @@ pub fn change_continue_label() {
259259 }
260260}
261261
262#[cfg(not(any(bfail1,bfail4)))]
263#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
264#[rustc_clean(cfg="bfail3")]
265#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
266#[rustc_clean(cfg="bfail6")]
262#[cfg(not(any(bpass1,bpass4)))]
263#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
264#[rustc_clean(cfg="bpass3")]
265#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
266#[rustc_clean(cfg="bpass6")]
267267pub fn change_continue_label() {
268268 let mut _x = 0;
269269 'outer: for _ in 0..1 {
......@@ -277,7 +277,7 @@ pub fn change_continue_label() {
277277
278278
279279// Change continue to break ----------------------------------------------------
280#[cfg(any(bfail1,bfail4))]
280#[cfg(any(bpass1,bpass4))]
281281pub fn change_continue_to_break() {
282282 let mut _x = 0;
283283 for _ in 0..1 {
......@@ -286,11 +286,11 @@ pub fn change_continue_to_break() {
286286 }
287287}
288288
289#[cfg(not(any(bfail1,bfail4)))]
290#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
291#[rustc_clean(cfg="bfail3")]
292#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
293#[rustc_clean(cfg="bfail6")]
289#[cfg(not(any(bpass1,bpass4)))]
290#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
291#[rustc_clean(cfg="bpass3")]
292#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
293#[rustc_clean(cfg="bpass6")]
294294pub fn change_continue_to_break() {
295295 let mut _x = 0;
296296 for _ in 0..1 {
tests/incremental/hashes/function_interfaces.rs+151-151
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(linkage)]
......@@ -20,309 +20,309 @@
2020
2121// Add Parameter ---------------------------------------------------------------
2222
23#[cfg(any(bfail1,bfail4))]
23#[cfg(any(bpass1,bpass4))]
2424pub fn add_parameter() {}
2525
26#[cfg(not(any(bfail1,bfail4)))]
26#[cfg(not(any(bpass1,bpass4)))]
2727#[rustc_clean(
28 cfg = "bfail2",
28 cfg = "bpass2",
2929 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
3030)]
31#[rustc_clean(cfg = "bfail3")]
31#[rustc_clean(cfg = "bpass3")]
3232#[rustc_clean(
33 cfg = "bfail5",
33 cfg = "bpass5",
3434 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
3535)]
36#[rustc_clean(cfg = "bfail6")]
36#[rustc_clean(cfg = "bpass6")]
3737pub fn add_parameter(p: i32) {}
3838
3939// Add Return Type -------------------------------------------------------------
4040
41#[cfg(any(bfail1,bfail4))]
41#[cfg(any(bpass1,bpass4))]
4242pub fn add_return_type() {}
4343
44#[cfg(not(any(bfail1,bfail4)))]
45#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes")]
46#[rustc_clean(cfg = "bfail3")]
47#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, optimized_mir")]
48#[rustc_clean(cfg = "bfail6")]
44#[cfg(not(any(bpass1,bpass4)))]
45#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes")]
46#[rustc_clean(cfg = "bpass3")]
47#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, optimized_mir")]
48#[rustc_clean(cfg = "bpass6")]
4949pub fn add_return_type() -> () {}
5050
5151// Change Parameter Type -------------------------------------------------------
5252
53#[cfg(any(bfail1,bfail4))]
53#[cfg(any(bpass1,bpass4))]
5454pub fn type_of_parameter(p: i32) {}
5555
56#[cfg(not(any(bfail1,bfail4)))]
56#[cfg(not(any(bpass1,bpass4)))]
5757#[rustc_clean(
58 cfg = "bfail2",
58 cfg = "bpass2",
5959 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
6060)]
61#[rustc_clean(cfg = "bfail3")]
61#[rustc_clean(cfg = "bpass3")]
6262#[rustc_clean(
63 cfg = "bfail5",
63 cfg = "bpass5",
6464 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
6565)]
66#[rustc_clean(cfg = "bfail6")]
66#[rustc_clean(cfg = "bpass6")]
6767pub fn type_of_parameter(p: i64) {}
6868
6969// Change Parameter Type Reference ---------------------------------------------
7070
71#[cfg(any(bfail1,bfail4))]
71#[cfg(any(bpass1,bpass4))]
7272pub fn type_of_parameter_ref(p: &i32) {}
7373
74#[cfg(not(any(bfail1,bfail4)))]
74#[cfg(not(any(bpass1,bpass4)))]
7575#[rustc_clean(
76 cfg = "bfail2",
76 cfg = "bpass2",
7777 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
7878)]
79#[rustc_clean(cfg = "bfail3")]
79#[rustc_clean(cfg = "bpass3")]
8080#[rustc_clean(
81 cfg = "bfail5",
81 cfg = "bpass5",
8282 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
8383)]
84#[rustc_clean(cfg = "bfail6")]
84#[rustc_clean(cfg = "bpass6")]
8585pub fn type_of_parameter_ref(p: &mut i32) {}
8686
8787// Change Parameter Order ------------------------------------------------------
8888
89#[cfg(any(bfail1,bfail4))]
89#[cfg(any(bpass1,bpass4))]
9090pub fn order_of_parameters(p1: i32, p2: i64) {}
9191
92#[cfg(not(any(bfail1,bfail4)))]
92#[cfg(not(any(bpass1,bpass4)))]
9393#[rustc_clean(
94 cfg = "bfail2",
94 cfg = "bpass2",
9595 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
9696)]
97#[rustc_clean(cfg = "bfail3")]
97#[rustc_clean(cfg = "bpass3")]
9898#[rustc_clean(
99 cfg = "bfail5",
99 cfg = "bpass5",
100100 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
101101)]
102#[rustc_clean(cfg = "bfail6")]
102#[rustc_clean(cfg = "bpass6")]
103103pub fn order_of_parameters(p2: i64, p1: i32) {}
104104
105105// Unsafe ----------------------------------------------------------------------
106106
107#[cfg(any(bfail1,bfail4))]
107#[cfg(any(bpass1,bpass4))]
108108pub fn make_unsafe() {}
109109
110#[cfg(not(any(bfail1,bfail4)))]
110#[cfg(not(any(bpass1,bpass4)))]
111111#[rustc_clean(
112 cfg = "bfail2",
112 cfg = "bpass2",
113113 except = "opt_hir_owner_nodes, typeck_root, fn_sig"
114114)]
115#[rustc_clean(cfg = "bfail3")]
115#[rustc_clean(cfg = "bpass3")]
116116#[rustc_clean(
117 cfg = "bfail5",
117 cfg = "bpass5",
118118 except = "opt_hir_owner_nodes, typeck_root, fn_sig"
119119)]
120#[rustc_clean(cfg = "bfail6")]
120#[rustc_clean(cfg = "bpass6")]
121121pub unsafe fn make_unsafe() {}
122122
123123// Extern ----------------------------------------------------------------------
124124
125#[cfg(any(bfail1,bfail4))]
125#[cfg(any(bpass1,bpass4))]
126126pub fn make_extern() {}
127127
128#[cfg(not(any(bfail1,bfail4)))]
129#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, typeck_root, fn_sig")]
130#[rustc_clean(cfg = "bfail3")]
131#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, typeck_root, fn_sig")]
132#[rustc_clean(cfg = "bfail6")]
128#[cfg(not(any(bpass1,bpass4)))]
129#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, typeck_root, fn_sig")]
130#[rustc_clean(cfg = "bpass3")]
131#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, typeck_root, fn_sig")]
132#[rustc_clean(cfg = "bpass6")]
133133pub extern "C" fn make_extern() {}
134134
135135// Type Parameter --------------------------------------------------------------
136136
137#[cfg(any(bfail1,bfail4))]
137#[cfg(any(bpass1,bpass4))]
138138pub fn type_parameter () {}
139139
140#[cfg(not(any(bfail1,bfail4)))]
140#[cfg(not(any(bpass1,bpass4)))]
141141#[rustc_clean(
142 cfg = "bfail2",
142 cfg = "bpass2",
143143 except = "opt_hir_owner_nodes, generics_of, type_of, predicates_of"
144144)]
145#[rustc_clean(cfg = "bfail3")]
145#[rustc_clean(cfg = "bpass3")]
146146#[rustc_clean(
147 cfg = "bfail5",
147 cfg = "bpass5",
148148 except = "opt_hir_owner_nodes, generics_of, type_of, predicates_of"
149149)]
150#[rustc_clean(cfg = "bfail6")]
150#[rustc_clean(cfg = "bpass6")]
151151pub fn type_parameter<T>() {}
152152
153153// Lifetime Parameter ----------------------------------------------------------
154154
155#[cfg(any(bfail1,bfail4))]
155#[cfg(any(bpass1,bpass4))]
156156pub fn lifetime_parameter () {}
157157
158#[cfg(not(any(bfail1,bfail4)))]
159#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, generics_of,fn_sig")]
160#[rustc_clean(cfg = "bfail3")]
161#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, generics_of,fn_sig")]
162#[rustc_clean(cfg = "bfail6")]
158#[cfg(not(any(bpass1,bpass4)))]
159#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, generics_of,fn_sig")]
160#[rustc_clean(cfg = "bpass3")]
161#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, generics_of,fn_sig")]
162#[rustc_clean(cfg = "bpass6")]
163163pub fn lifetime_parameter<'a>() {}
164164
165165// Trait Bound -----------------------------------------------------------------
166166
167#[cfg(any(bfail1,bfail4))]
167#[cfg(any(bpass1,bpass4))]
168168pub fn trait_bound<T >() {}
169169
170#[cfg(not(any(bfail1,bfail4)))]
171#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, predicates_of")]
172#[rustc_clean(cfg = "bfail3")]
170#[cfg(not(any(bpass1,bpass4)))]
171#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, predicates_of")]
172#[rustc_clean(cfg = "bpass3")]
173173pub fn trait_bound<T: Eq>() {}
174174
175175// Builtin Bound ---------------------------------------------------------------
176176
177#[cfg(any(bfail1,bfail4))]
177#[cfg(any(bpass1,bpass4))]
178178pub fn builtin_bound<T >() {}
179179
180#[cfg(not(any(bfail1,bfail4)))]
181#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, predicates_of")]
182#[rustc_clean(cfg = "bfail3")]
183#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, predicates_of")]
184#[rustc_clean(cfg = "bfail6")]
180#[cfg(not(any(bpass1,bpass4)))]
181#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, predicates_of")]
182#[rustc_clean(cfg = "bpass3")]
183#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, predicates_of")]
184#[rustc_clean(cfg = "bpass6")]
185185pub fn builtin_bound<T: Send>() {}
186186
187187// Lifetime Bound --------------------------------------------------------------
188188
189#[cfg(any(bfail1,bfail4))]
189#[cfg(any(bpass1,bpass4))]
190190pub fn lifetime_bound<'a, T>() {}
191191
192#[cfg(not(any(bfail1,bfail4)))]
192#[cfg(not(any(bpass1,bpass4)))]
193193#[rustc_clean(
194 cfg = "bfail2",
194 cfg = "bpass2",
195195 except = "opt_hir_owner_nodes, generics_of, type_of, predicates_of,fn_sig"
196196)]
197#[rustc_clean(cfg = "bfail3")]
197#[rustc_clean(cfg = "bpass3")]
198198#[rustc_clean(
199 cfg = "bfail5",
199 cfg = "bpass5",
200200 except = "opt_hir_owner_nodes, generics_of, type_of, predicates_of,fn_sig,optimized_mir"
201201)]
202#[rustc_clean(cfg = "bfail6")]
202#[rustc_clean(cfg = "bpass6")]
203203pub fn lifetime_bound<'a, T: 'a>() {}
204204
205205// Second Trait Bound ----------------------------------------------------------
206206
207#[cfg(any(bfail1,bfail4))]
207#[cfg(any(bpass1,bpass4))]
208208pub fn second_trait_bound<T: Eq >() {}
209209
210#[cfg(not(any(bfail1,bfail4)))]
211#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, predicates_of")]
212#[rustc_clean(cfg = "bfail3")]
210#[cfg(not(any(bpass1,bpass4)))]
211#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, predicates_of")]
212#[rustc_clean(cfg = "bpass3")]
213213pub fn second_trait_bound<T: Eq + Clone>() {}
214214
215215// Second Builtin Bound --------------------------------------------------------
216216
217#[cfg(any(bfail1,bfail4))]
217#[cfg(any(bpass1,bpass4))]
218218pub fn second_builtin_bound<T: Send >() {}
219219
220#[cfg(not(any(bfail1,bfail4)))]
221#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes")]
222#[rustc_clean(cfg = "bfail3")]
223#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, predicates_of")]
224#[rustc_clean(cfg = "bfail6")]
220#[cfg(not(any(bpass1,bpass4)))]
221#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes")]
222#[rustc_clean(cfg = "bpass3")]
223#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, predicates_of")]
224#[rustc_clean(cfg = "bpass6")]
225225pub fn second_builtin_bound<T: Send + Sized>() {}
226226
227227// Second Lifetime Bound -------------------------------------------------------
228228
229#[cfg(any(bfail1,bfail4))]
229#[cfg(any(bpass1,bpass4))]
230230pub fn second_lifetime_bound<'a, 'b, T: 'a >() {}
231231
232#[cfg(not(any(bfail1,bfail4)))]
232#[cfg(not(any(bpass1,bpass4)))]
233233#[rustc_clean(
234 cfg = "bfail2",
234 cfg = "bpass2",
235235 except = "opt_hir_owner_nodes, generics_of, type_of, predicates_of,fn_sig"
236236)]
237#[rustc_clean(cfg = "bfail3")]
237#[rustc_clean(cfg = "bpass3")]
238238#[rustc_clean(
239 cfg = "bfail5",
239 cfg = "bpass5",
240240 except = "opt_hir_owner_nodes, generics_of, type_of, predicates_of,fn_sig"
241241)]
242#[rustc_clean(cfg = "bfail6")]
242#[rustc_clean(cfg = "bpass6")]
243243pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {}
244244
245245// Inline ----------------------------------------------------------------------
246246
247#[cfg(any(bfail1,bfail4))]
247#[cfg(any(bpass1,bpass4))]
248248pub fn inline() {}
249249
250#[cfg(not(any(bfail1,bfail4)))]
251#[rustc_clean(cfg = "bfail2")]
252#[rustc_clean(cfg = "bfail3")]
253#[rustc_clean(cfg = "bfail5")]
254#[rustc_clean(cfg = "bfail6")]
250#[cfg(not(any(bpass1,bpass4)))]
251#[rustc_clean(cfg = "bpass2")]
252#[rustc_clean(cfg = "bpass3")]
253#[rustc_clean(cfg = "bpass5")]
254#[rustc_clean(cfg = "bpass6")]
255255#[inline]
256256pub fn inline() {}
257257
258258// Inline Never ----------------------------------------------------------------
259259
260#[cfg(any(bfail1,bfail4))]
260#[cfg(any(bpass1,bpass4))]
261261#[inline(always)]
262262pub fn inline_never() {}
263263
264#[cfg(not(any(bfail1,bfail4)))]
265#[rustc_clean(cfg = "bfail2")]
266#[rustc_clean(cfg = "bfail3")]
267#[rustc_clean(cfg = "bfail5")]
268#[rustc_clean(cfg = "bfail6")]
264#[cfg(not(any(bpass1,bpass4)))]
265#[rustc_clean(cfg = "bpass2")]
266#[rustc_clean(cfg = "bpass3")]
267#[rustc_clean(cfg = "bpass5")]
268#[rustc_clean(cfg = "bpass6")]
269269#[inline(never)]
270270pub fn inline_never() {}
271271
272272// No Mangle -------------------------------------------------------------------
273273
274#[cfg(any(bfail1,bfail4))]
274#[cfg(any(bpass1,bpass4))]
275275pub fn no_mangle() {}
276276
277#[cfg(not(any(bfail1,bfail4)))]
278#[rustc_clean(cfg = "bfail2")]
279#[rustc_clean(cfg = "bfail3")]
280#[rustc_clean(cfg = "bfail5")]
281#[rustc_clean(cfg = "bfail6")]
277#[cfg(not(any(bpass1,bpass4)))]
278#[rustc_clean(cfg = "bpass2")]
279#[rustc_clean(cfg = "bpass3")]
280#[rustc_clean(cfg = "bpass5")]
281#[rustc_clean(cfg = "bpass6")]
282282#[unsafe(no_mangle)]
283283pub fn no_mangle() {}
284284
285285// Linkage ---------------------------------------------------------------------
286286
287#[cfg(any(bfail1,bfail4))]
287#[cfg(any(bpass1,bpass4))]
288288pub fn linkage() {}
289289
290#[cfg(not(any(bfail1,bfail4)))]
291#[rustc_clean(cfg = "bfail2")]
292#[rustc_clean(cfg = "bfail3")]
293#[rustc_clean(cfg = "bfail5")]
294#[rustc_clean(cfg = "bfail6")]
290#[cfg(not(any(bpass1,bpass4)))]
291#[rustc_clean(cfg = "bpass2")]
292#[rustc_clean(cfg = "bpass3")]
293#[rustc_clean(cfg = "bpass5")]
294#[rustc_clean(cfg = "bpass6")]
295295#[linkage = "weak_odr"]
296296pub fn linkage() {}
297297
298298// Return Impl Trait -----------------------------------------------------------
299299
300#[cfg(any(bfail1,bfail4))]
300#[cfg(any(bpass1,bpass4))]
301301pub fn return_impl_trait() -> i32 {
302302 0
303303}
304304
305#[cfg(not(any(bfail1,bfail4)))]
306#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, typeck_root, fn_sig")]
307#[rustc_clean(cfg = "bfail3")]
308#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, typeck_root, fn_sig, optimized_mir")]
309#[rustc_clean(cfg = "bfail6")]
305#[cfg(not(any(bpass1,bpass4)))]
306#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, typeck_root, fn_sig")]
307#[rustc_clean(cfg = "bpass3")]
308#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, typeck_root, fn_sig, optimized_mir")]
309#[rustc_clean(cfg = "bpass6")]
310310pub fn return_impl_trait() -> impl Clone {
311311 0
312312}
313313
314314// Change Return Impl Trait ----------------------------------------------------
315315
316#[cfg(any(bfail1,bfail4))]
316#[cfg(any(bpass1,bpass4))]
317317pub fn change_return_impl_trait() -> impl Clone {
318318 0u32
319319}
320320
321#[cfg(not(any(bfail1,bfail4)))]
322#[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes")]
323#[rustc_clean(cfg = "bfail3")]
324#[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, typeck_root")]
325#[rustc_clean(cfg = "bfail6")]
321#[cfg(not(any(bpass1,bpass4)))]
322#[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes")]
323#[rustc_clean(cfg = "bpass3")]
324#[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, typeck_root")]
325#[rustc_clean(cfg = "bpass6")]
326326pub fn change_return_impl_trait() -> impl Copy {
327327 0u32
328328}
......@@ -333,21 +333,21 @@ pub struct ReferencedType1;
333333pub struct ReferencedType2;
334334
335335pub mod change_return_type_indirectly {
336 #[cfg(any(bfail1,bfail4))]
336 #[cfg(any(bpass1,bpass4))]
337337 use super::ReferencedType1 as ReturnType;
338 #[cfg(not(any(bfail1,bfail4)))]
338 #[cfg(not(any(bpass1,bpass4)))]
339339 use super::ReferencedType2 as ReturnType;
340340
341341 #[rustc_clean(
342 cfg = "bfail2",
342 cfg = "bpass2",
343343 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
344344 )]
345 #[rustc_clean(cfg = "bfail3")]
345 #[rustc_clean(cfg = "bpass3")]
346346 #[rustc_clean(
347 cfg = "bfail5",
347 cfg = "bpass5",
348348 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
349349 )]
350 #[rustc_clean(cfg = "bfail6")]
350 #[rustc_clean(cfg = "bpass6")]
351351 pub fn indirect_return_type() -> ReturnType {
352352 ReturnType {}
353353 }
......@@ -356,21 +356,21 @@ pub mod change_return_type_indirectly {
356356// Change Parameter Type Indirectly --------------------------------------------
357357
358358pub mod change_parameter_type_indirectly {
359 #[cfg(any(bfail1,bfail4))]
359 #[cfg(any(bpass1,bpass4))]
360360 use super::ReferencedType1 as ParameterType;
361 #[cfg(not(any(bfail1,bfail4)))]
361 #[cfg(not(any(bpass1,bpass4)))]
362362 use super::ReferencedType2 as ParameterType;
363363
364364 #[rustc_clean(
365 cfg = "bfail2",
365 cfg = "bpass2",
366366 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
367367 )]
368 #[rustc_clean(cfg = "bfail3")]
368 #[rustc_clean(cfg = "bpass3")]
369369 #[rustc_clean(
370 cfg = "bfail5",
370 cfg = "bpass5",
371371 except = "opt_hir_owner_nodes, optimized_mir, typeck_root, fn_sig"
372372 )]
373 #[rustc_clean(cfg = "bfail6")]
373 #[rustc_clean(cfg = "bpass6")]
374374 pub fn indirect_parameter_type(p: ParameterType) {}
375375}
376376
......@@ -380,30 +380,30 @@ pub trait ReferencedTrait1 {}
380380pub trait ReferencedTrait2 {}
381381
382382pub mod change_trait_bound_indirectly {
383 #[cfg(any(bfail1,bfail4))]
383 #[cfg(any(bpass1,bpass4))]
384384 use super::ReferencedTrait1 as Trait;
385 #[cfg(not(any(bfail1,bfail4)))]
385 #[cfg(not(any(bpass1,bpass4)))]
386386 use super::ReferencedTrait2 as Trait;
387387
388 #[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, predicates_of")]
389 #[rustc_clean(cfg = "bfail3")]
390 #[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, predicates_of")]
391 #[rustc_clean(cfg = "bfail6")]
388 #[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, predicates_of")]
389 #[rustc_clean(cfg = "bpass3")]
390 #[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, predicates_of")]
391 #[rustc_clean(cfg = "bpass6")]
392392 pub fn indirect_trait_bound<T: Trait>(p: T) {}
393393}
394394
395395// Change Trait Bound Indirectly In Where Clause -------------------------------
396396
397397pub mod change_trait_bound_indirectly_in_where_clause {
398 #[cfg(any(bfail1,bfail4))]
398 #[cfg(any(bpass1,bpass4))]
399399 use super::ReferencedTrait1 as Trait;
400 #[cfg(not(any(bfail1,bfail4)))]
400 #[cfg(not(any(bpass1,bpass4)))]
401401 use super::ReferencedTrait2 as Trait;
402402
403 #[rustc_clean(cfg = "bfail2", except = "opt_hir_owner_nodes, predicates_of")]
404 #[rustc_clean(cfg = "bfail3")]
405 #[rustc_clean(cfg = "bfail5", except = "opt_hir_owner_nodes, predicates_of")]
406 #[rustc_clean(cfg = "bfail6")]
403 #[rustc_clean(cfg = "bpass2", except = "opt_hir_owner_nodes, predicates_of")]
404 #[rustc_clean(cfg = "bpass3")]
405 #[rustc_clean(cfg = "bpass5", except = "opt_hir_owner_nodes, predicates_of")]
406 #[rustc_clean(cfg = "bpass6")]
407407 pub fn indirect_trait_bound_where<T>(p: T)
408408 where
409409 T: Trait,
tests/incremental/hashes/if_expressions.rs+53-53
......@@ -5,20 +5,20 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
1818#![crate_type="rlib"]
1919
2020// Change condition (if)
21#[cfg(any(bfail1,bfail4))]
21#[cfg(any(bpass1,bpass4))]
2222pub fn change_condition(x: bool) -> u32 {
2323 if x {
2424 return 1
......@@ -27,11 +27,11 @@ pub fn change_condition(x: bool) -> u32 {
2727 return 0
2828}
2929
30#[cfg(not(any(bfail1,bfail4)))]
31#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
32#[rustc_clean(cfg="bfail3")]
33#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
34#[rustc_clean(cfg="bfail6")]
30#[cfg(not(any(bpass1,bpass4)))]
31#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
32#[rustc_clean(cfg="bpass3")]
33#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
34#[rustc_clean(cfg="bpass6")]
3535pub fn change_condition(x: bool) -> u32 {
3636 if !x {
3737 return 1
......@@ -41,7 +41,7 @@ pub fn change_condition(x: bool) -> u32 {
4141}
4242
4343// Change then branch (if)
44#[cfg(any(bfail1,bfail4))]
44#[cfg(any(bpass1,bpass4))]
4545pub fn change_then_branch(x: bool) -> u32 {
4646 if x {
4747 return 1
......@@ -50,11 +50,11 @@ pub fn change_then_branch(x: bool) -> u32 {
5050 return 0
5151}
5252
53#[cfg(not(any(bfail1,bfail4)))]
54#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
55#[rustc_clean(cfg="bfail3")]
56#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
57#[rustc_clean(cfg="bfail6")]
53#[cfg(not(any(bpass1,bpass4)))]
54#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
55#[rustc_clean(cfg="bpass3")]
56#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
57#[rustc_clean(cfg="bpass6")]
5858pub fn change_then_branch(x: bool) -> u32 {
5959 if x {
6060 return 2
......@@ -66,7 +66,7 @@ pub fn change_then_branch(x: bool) -> u32 {
6666
6767
6868// Change else branch (if)
69#[cfg(any(bfail1,bfail4))]
69#[cfg(any(bpass1,bpass4))]
7070pub fn change_else_branch(x: bool) -> u32 {
7171 if x {
7272 1
......@@ -75,11 +75,11 @@ pub fn change_else_branch(x: bool) -> u32 {
7575 }
7676}
7777
78#[cfg(not(any(bfail1,bfail4)))]
79#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
80#[rustc_clean(cfg="bfail3")]
81#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
82#[rustc_clean(cfg="bfail6")]
78#[cfg(not(any(bpass1,bpass4)))]
79#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
80#[rustc_clean(cfg="bpass3")]
81#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
82#[rustc_clean(cfg="bpass6")]
8383pub fn change_else_branch(x: bool) -> u32 {
8484 if x {
8585 1
......@@ -91,7 +91,7 @@ pub fn change_else_branch(x: bool) -> u32 {
9191
9292
9393// Add else branch (if)
94#[cfg(any(bfail1,bfail4))]
94#[cfg(any(bpass1,bpass4))]
9595pub fn add_else_branch(x: bool) -> u32 {
9696 let mut ret = 1;
9797
......@@ -103,11 +103,11 @@ pub fn add_else_branch(x: bool) -> u32 {
103103 ret
104104}
105105
106#[cfg(not(any(bfail1,bfail4)))]
107#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
108#[rustc_clean(cfg="bfail3")]
109#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root")]
110#[rustc_clean(cfg="bfail6")]
106#[cfg(not(any(bpass1,bpass4)))]
107#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
108#[rustc_clean(cfg="bpass3")]
109#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root")]
110#[rustc_clean(cfg="bpass6")]
111111pub fn add_else_branch(x: bool) -> u32 {
112112 let mut ret = 1;
113113
......@@ -122,7 +122,7 @@ pub fn add_else_branch(x: bool) -> u32 {
122122
123123
124124// Change condition (if let)
125#[cfg(any(bfail1,bfail4))]
125#[cfg(any(bpass1,bpass4))]
126126pub fn change_condition_if_let(x: Option<u32>) -> u32 {
127127 if let Some(_x) = x {
128128 return 1
......@@ -131,11 +131,11 @@ pub fn change_condition_if_let(x: Option<u32>) -> u32 {
131131 0
132132}
133133
134#[cfg(not(any(bfail1,bfail4)))]
135#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
136#[rustc_clean(cfg="bfail3")]
137#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
138#[rustc_clean(cfg="bfail6")]
134#[cfg(not(any(bpass1,bpass4)))]
135#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
136#[rustc_clean(cfg="bpass3")]
137#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
138#[rustc_clean(cfg="bpass6")]
139139pub fn change_condition_if_let(x: Option<u32>) -> u32 {
140140 if let Some(_ ) = x {
141141 return 1
......@@ -147,7 +147,7 @@ pub fn change_condition_if_let(x: Option<u32>) -> u32 {
147147
148148
149149// Change then branch (if let)
150#[cfg(any(bfail1,bfail4))]
150#[cfg(any(bpass1,bpass4))]
151151pub fn change_then_branch_if_let(x: Option<u32>) -> u32 {
152152 if let Some(x) = x {
153153 return x //-
......@@ -156,11 +156,11 @@ pub fn change_then_branch_if_let(x: Option<u32>) -> u32 {
156156 0
157157}
158158
159#[cfg(not(any(bfail1,bfail4)))]
160#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
161#[rustc_clean(cfg="bfail3")]
162#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
163#[rustc_clean(cfg="bfail6")]
159#[cfg(not(any(bpass1,bpass4)))]
160#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
161#[rustc_clean(cfg="bpass3")]
162#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
163#[rustc_clean(cfg="bpass6")]
164164pub fn change_then_branch_if_let(x: Option<u32>) -> u32 {
165165 if let Some(x) = x {
166166 return x + 1
......@@ -172,7 +172,7 @@ pub fn change_then_branch_if_let(x: Option<u32>) -> u32 {
172172
173173
174174// Change else branch (if let)
175#[cfg(any(bfail1,bfail4))]
175#[cfg(any(bpass1,bpass4))]
176176pub fn change_else_branch_if_let(x: Option<u32>) -> u32 {
177177 if let Some(x) = x {
178178 x
......@@ -181,11 +181,11 @@ pub fn change_else_branch_if_let(x: Option<u32>) -> u32 {
181181 }
182182}
183183
184#[cfg(not(any(bfail1,bfail4)))]
185#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
186#[rustc_clean(cfg="bfail3")]
187#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
188#[rustc_clean(cfg="bfail6")]
184#[cfg(not(any(bpass1,bpass4)))]
185#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
186#[rustc_clean(cfg="bpass3")]
187#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
188#[rustc_clean(cfg="bpass6")]
189189pub fn change_else_branch_if_let(x: Option<u32>) -> u32 {
190190 if let Some(x) = x {
191191 x
......@@ -197,7 +197,7 @@ pub fn change_else_branch_if_let(x: Option<u32>) -> u32 {
197197
198198
199199// Add else branch (if let)
200#[cfg(any(bfail1,bfail4))]
200#[cfg(any(bpass1,bpass4))]
201201pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
202202 let mut ret = 1;
203203
......@@ -209,11 +209,11 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
209209 ret
210210}
211211
212#[cfg(not(any(bfail1,bfail4)))]
213#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
214#[rustc_clean(cfg="bfail3")]
215#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
216#[rustc_clean(cfg="bfail6")]
212#[cfg(not(any(bpass1,bpass4)))]
213#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
214#[rustc_clean(cfg="bpass3")]
215#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
216#[rustc_clean(cfg="bpass6")]
217217pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
218218 let mut ret = 1;
219219
tests/incremental/hashes/indexing_expressions.rs+47-47
......@@ -5,29 +5,29 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
1818#![crate_type="rlib"]
1919
2020// Change simple index
21#[cfg(any(bfail1,bfail4))]
21#[cfg(any(bpass1,bpass4))]
2222fn change_simple_index(slice: &[u32]) -> u32 {
2323 slice[3]
2424}
2525
26#[cfg(not(any(bfail1,bfail4)))]
27#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
28#[rustc_clean(cfg="bfail3")]
29#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
30#[rustc_clean(cfg="bfail6")]
26#[cfg(not(any(bpass1,bpass4)))]
27#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
28#[rustc_clean(cfg="bpass3")]
29#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
30#[rustc_clean(cfg="bpass6")]
3131fn change_simple_index(slice: &[u32]) -> u32 {
3232 slice[4]
3333}
......@@ -35,16 +35,16 @@ fn change_simple_index(slice: &[u32]) -> u32 {
3535
3636
3737// Change lower bound
38#[cfg(any(bfail1,bfail4))]
38#[cfg(any(bpass1,bpass4))]
3939fn change_lower_bound(slice: &[u32]) -> &[u32] {
4040 &slice[3..5]
4141}
4242
43#[cfg(not(any(bfail1,bfail4)))]
44#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
45#[rustc_clean(cfg="bfail3")]
46#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
47#[rustc_clean(cfg="bfail6")]
43#[cfg(not(any(bpass1,bpass4)))]
44#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
45#[rustc_clean(cfg="bpass3")]
46#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
47#[rustc_clean(cfg="bpass6")]
4848fn change_lower_bound(slice: &[u32]) -> &[u32] {
4949 &slice[2..5]
5050}
......@@ -52,16 +52,16 @@ fn change_lower_bound(slice: &[u32]) -> &[u32] {
5252
5353
5454// Change upper bound
55#[cfg(any(bfail1,bfail4))]
55#[cfg(any(bpass1,bpass4))]
5656fn change_upper_bound(slice: &[u32]) -> &[u32] {
5757 &slice[3..5]
5858}
5959
60#[cfg(not(any(bfail1,bfail4)))]
61#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
62#[rustc_clean(cfg="bfail3")]
63#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
64#[rustc_clean(cfg="bfail6")]
60#[cfg(not(any(bpass1,bpass4)))]
61#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
62#[rustc_clean(cfg="bpass3")]
63#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
64#[rustc_clean(cfg="bpass6")]
6565fn change_upper_bound(slice: &[u32]) -> &[u32] {
6666 &slice[3..7]
6767}
......@@ -69,16 +69,16 @@ fn change_upper_bound(slice: &[u32]) -> &[u32] {
6969
7070
7171// Add lower bound
72#[cfg(any(bfail1,bfail4))]
72#[cfg(any(bpass1,bpass4))]
7373fn add_lower_bound(slice: &[u32]) -> &[u32] {
7474 &slice[ ..4]
7575}
7676
77#[cfg(not(any(bfail1,bfail4)))]
78#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail2")]
79#[rustc_clean(cfg="bfail3")]
80#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail5")]
81#[rustc_clean(cfg="bfail6")]
77#[cfg(not(any(bpass1,bpass4)))]
78#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass2")]
79#[rustc_clean(cfg="bpass3")]
80#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass5")]
81#[rustc_clean(cfg="bpass6")]
8282fn add_lower_bound(slice: &[u32]) -> &[u32] {
8383 &slice[3..4]
8484}
......@@ -86,16 +86,16 @@ fn add_lower_bound(slice: &[u32]) -> &[u32] {
8686
8787
8888// Add upper bound
89#[cfg(any(bfail1,bfail4))]
89#[cfg(any(bpass1,bpass4))]
9090fn add_upper_bound(slice: &[u32]) -> &[u32] {
9191 &slice[3.. ]
9292}
9393
94#[cfg(not(any(bfail1,bfail4)))]
95#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail2")]
96#[rustc_clean(cfg="bfail3")]
97#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail5")]
98#[rustc_clean(cfg="bfail6")]
94#[cfg(not(any(bpass1,bpass4)))]
95#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass2")]
96#[rustc_clean(cfg="bpass3")]
97#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass5")]
98#[rustc_clean(cfg="bpass6")]
9999fn add_upper_bound(slice: &[u32]) -> &[u32] {
100100 &slice[3..7]
101101}
......@@ -103,16 +103,16 @@ fn add_upper_bound(slice: &[u32]) -> &[u32] {
103103
104104
105105// Change mutability
106#[cfg(any(bfail1,bfail4))]
106#[cfg(any(bpass1,bpass4))]
107107fn change_mutability(slice: &mut [u32]) -> u32 {
108108 (&mut slice[3..5])[0]
109109}
110110
111#[cfg(not(any(bfail1,bfail4)))]
112#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail2")]
113#[rustc_clean(cfg="bfail3")]
114#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail5")]
115#[rustc_clean(cfg="bfail6")]
111#[cfg(not(any(bpass1,bpass4)))]
112#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass2")]
113#[rustc_clean(cfg="bpass3")]
114#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass5")]
115#[rustc_clean(cfg="bpass6")]
116116fn change_mutability(slice: &mut [u32]) -> u32 {
117117 (& slice[3..5])[0]
118118}
......@@ -120,16 +120,16 @@ fn change_mutability(slice: &mut [u32]) -> u32 {
120120
121121
122122// Exclusive to inclusive range
123#[cfg(any(bfail1,bfail4))]
123#[cfg(any(bpass1,bpass4))]
124124fn exclusive_to_inclusive_range(slice: &[u32]) -> &[u32] {
125125 &slice[3.. 7]
126126}
127127
128#[cfg(not(any(bfail1,bfail4)))]
129#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail2")]
130#[rustc_clean(cfg="bfail3")]
131#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail5")]
132#[rustc_clean(cfg="bfail6")]
128#[cfg(not(any(bpass1,bpass4)))]
129#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass2")]
130#[rustc_clean(cfg="bpass3")]
131#[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass5")]
132#[rustc_clean(cfg="bpass6")]
133133fn exclusive_to_inclusive_range(slice: &[u32]) -> &[u32] {
134134 &slice[3..=7]
135135}
tests/incremental/hashes/inherent_impls.rs+257-258
......@@ -6,14 +6,13 @@
66// rev3 and make sure that the hash has not changed.
77
88//@ edition: 2024
9//@ build-pass (FIXME(62277): could be check-pass?)
10//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
9//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
1110//@ compile-flags: -Z query-dep-graph -O
12//@ [bfail1]compile-flags: -Zincremental-ignore-spans
13//@ [bfail2]compile-flags: -Zincremental-ignore-spans
14//@ [bfail3]compile-flags: -Zincremental-ignore-spans
11//@ [bpass1]compile-flags: -Zincremental-ignore-spans
12//@ [bpass2]compile-flags: -Zincremental-ignore-spans
13//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1514//@ ignore-backends: gcc
16
15// FIXME(#62277): could be check-pass?
1716
1817#![allow(warnings)]
1918#![feature(rustc_attrs)]
......@@ -22,26 +21,26 @@
2221pub struct Foo;
2322
2423// Change Method Name -----------------------------------------------------------
25#[cfg(any(bfail1,bfail4))]
24#[cfg(any(bpass1,bpass4))]
2625impl Foo {
2726 pub fn method_name() { }
2827}
2928
30#[cfg(not(any(bfail1,bfail4)))]
31#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,associated_item_def_ids")]
32#[rustc_clean(cfg="bfail3")]
33#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,associated_item_def_ids")]
34#[rustc_clean(cfg="bfail6")]
29#[cfg(not(any(bpass1,bpass4)))]
30#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,associated_item_def_ids")]
31#[rustc_clean(cfg="bpass3")]
32#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,associated_item_def_ids")]
33#[rustc_clean(cfg="bpass6")]
3534impl Foo {
36 #[rustc_clean(cfg="bfail3")]
37 #[rustc_clean(cfg="bfail6")]
35 #[rustc_clean(cfg="bpass3")]
36 #[rustc_clean(cfg="bpass6")]
3837 pub fn method_name2() { }
3938}
4039
4140// Change Method Body -----------------------------------------------------------
4241//
4342// This should affect the method itself, but not the impl.
44#[cfg(any(bfail1,bfail4))]
43#[cfg(any(bpass1,bpass4))]
4544impl Foo {
4645 //------------------------------------------------------------------------------------------
4746 //--------------------------
......@@ -52,16 +51,16 @@ impl Foo {
5251 }
5352}
5453
55#[cfg(not(any(bfail1,bfail4)))]
56#[rustc_clean(cfg="bfail2")]
57#[rustc_clean(cfg="bfail3")]
58#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
59#[rustc_clean(cfg="bfail6")]
54#[cfg(not(any(bpass1,bpass4)))]
55#[rustc_clean(cfg="bpass2")]
56#[rustc_clean(cfg="bpass3")]
57#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
58#[rustc_clean(cfg="bpass6")]
6059impl Foo {
61 #[rustc_clean(cfg="bfail2",except="opt_hir_owner_nodes,optimized_mir,promoted_mir,typeck_root")]
62 #[rustc_clean(cfg="bfail3")]
63 #[rustc_clean(cfg="bfail5",except="opt_hir_owner_nodes,optimized_mir,promoted_mir,typeck_root")]
64 #[rustc_clean(cfg="bfail6")]
60 #[rustc_clean(cfg="bpass2",except="opt_hir_owner_nodes,optimized_mir,promoted_mir,typeck_root")]
61 #[rustc_clean(cfg="bpass3")]
62 #[rustc_clean(cfg="bpass5",except="opt_hir_owner_nodes,optimized_mir,promoted_mir,typeck_root")]
63 #[rustc_clean(cfg="bpass6")]
6564 pub fn method_body() {
6665 println!("Hello, world!");
6766 }
......@@ -71,7 +70,7 @@ impl Foo {
7170// Change Method Body (inlined) ------------------------------------------------
7271//
7372// This should affect the method itself, but not the impl.
74#[cfg(any(bfail1,bfail4))]
73#[cfg(any(bpass1,bpass4))]
7574impl Foo {
7675 //-----------------------------------------------------------------------------
7776 //--------------------------
......@@ -83,16 +82,16 @@ impl Foo {
8382 }
8483}
8584
86#[cfg(not(any(bfail1,bfail4)))]
87#[rustc_clean(cfg="bfail2")]
88#[rustc_clean(cfg="bfail3")]
89#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
90#[rustc_clean(cfg="bfail6")]
85#[cfg(not(any(bpass1,bpass4)))]
86#[rustc_clean(cfg="bpass2")]
87#[rustc_clean(cfg="bpass3")]
88#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
89#[rustc_clean(cfg="bpass6")]
9190impl Foo {
92 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
93 #[rustc_clean(cfg="bfail3")]
94 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
95 #[rustc_clean(cfg="bfail6")]
91 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
92 #[rustc_clean(cfg="bpass3")]
93 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
94 #[rustc_clean(cfg="bpass6")]
9695 #[inline]
9796 pub fn method_body_inlined() {
9897 println!("Hello, world!");
......@@ -101,7 +100,7 @@ impl Foo {
101100
102101
103102// Change Method Privacy -------------------------------------------------------
104#[cfg(any(bfail1,bfail4))]
103#[cfg(any(bpass1,bpass4))]
105104impl Foo {
106105 //--------------------------
107106 //--------------------------
......@@ -110,21 +109,21 @@ impl Foo {
110109 pub fn method_privacy() { }
111110}
112111
113#[cfg(not(any(bfail1,bfail4)))]
114#[rustc_clean(cfg="bfail2")]
115#[rustc_clean(cfg="bfail3")]
116#[rustc_clean(cfg="bfail5")]
117#[rustc_clean(cfg="bfail6")]
112#[cfg(not(any(bpass1,bpass4)))]
113#[rustc_clean(cfg="bpass2")]
114#[rustc_clean(cfg="bpass3")]
115#[rustc_clean(cfg="bpass5")]
116#[rustc_clean(cfg="bpass6")]
118117impl Foo {
119 #[rustc_clean(cfg="bfail2")]
120 #[rustc_clean(cfg="bfail3")]
121 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
122 #[rustc_clean(cfg="bfail6")]
118 #[rustc_clean(cfg="bpass2")]
119 #[rustc_clean(cfg="bpass3")]
120 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
121 #[rustc_clean(cfg="bpass6")]
123122 fn method_privacy() { }
124123}
125124
126125// Change Method Selfness -----------------------------------------------------------
127#[cfg(any(bfail1,bfail4))]
126#[cfg(any(bpass1,bpass4))]
128127impl Foo {
129128 //------------
130129 //---------------
......@@ -139,27 +138,27 @@ impl Foo {
139138 pub fn method_selfness() { }
140139}
141140
142#[cfg(not(any(bfail1,bfail4)))]
143#[rustc_clean(cfg="bfail2")]
144#[rustc_clean(cfg="bfail3")]
145#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
146#[rustc_clean(cfg="bfail6")]
141#[cfg(not(any(bpass1,bpass4)))]
142#[rustc_clean(cfg="bpass2")]
143#[rustc_clean(cfg="bpass3")]
144#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
145#[rustc_clean(cfg="bpass6")]
147146impl Foo {
148147 #[rustc_clean(
149 cfg="bfail2",
148 cfg="bpass2",
150149 except="opt_hir_owner_nodes,fn_sig,generics_of,typeck_root,associated_item,optimized_mir",
151150 )]
152 #[rustc_clean(cfg="bfail3")]
151 #[rustc_clean(cfg="bpass3")]
153152 #[rustc_clean(
154 cfg="bfail5",
153 cfg="bpass5",
155154 except="opt_hir_owner_nodes,fn_sig,generics_of,typeck_root,associated_item,optimized_mir",
156155 )]
157 #[rustc_clean(cfg="bfail6")]
156 #[rustc_clean(cfg="bpass6")]
158157 pub fn method_selfness(&self) { }
159158}
160159
161160// Change Method Selfmutness ---------------------------------------------------
162#[cfg(any(bfail1,bfail4))]
161#[cfg(any(bpass1,bpass4))]
163162impl Foo {
164163 //------------------------------------------------------------------------------------
165164 //--------------------------
......@@ -168,48 +167,48 @@ impl Foo {
168167 pub fn method_selfmutness(& self) { }
169168}
170169
171#[cfg(not(any(bfail1,bfail4)))]
172#[rustc_clean(cfg="bfail2")]
173#[rustc_clean(cfg="bfail3")]
174#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
175#[rustc_clean(cfg="bfail6")]
170#[cfg(not(any(bpass1,bpass4)))]
171#[rustc_clean(cfg="bpass2")]
172#[rustc_clean(cfg="bpass3")]
173#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
174#[rustc_clean(cfg="bpass6")]
176175impl Foo {
177 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
178 #[rustc_clean(cfg="bfail3")]
179 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
180 #[rustc_clean(cfg="bfail6")]
176 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
177 #[rustc_clean(cfg="bpass3")]
178 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
179 #[rustc_clean(cfg="bpass6")]
181180 pub fn method_selfmutness(&mut self) { }
182181}
183182
184183
185184
186185// Add Method To Impl ----------------------------------------------------------
187#[cfg(any(bfail1,bfail4))]
186#[cfg(any(bpass1,bpass4))]
188187impl Foo {
189188 pub fn add_method_to_impl1(&self) { }
190189}
191190
192#[cfg(not(any(bfail1,bfail4)))]
193#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,associated_item_def_ids")]
194#[rustc_clean(cfg="bfail3")]
195#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,associated_item_def_ids")]
196#[rustc_clean(cfg="bfail6")]
191#[cfg(not(any(bpass1,bpass4)))]
192#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,associated_item_def_ids")]
193#[rustc_clean(cfg="bpass3")]
194#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,associated_item_def_ids")]
195#[rustc_clean(cfg="bpass6")]
197196impl Foo {
198 #[rustc_clean(cfg="bfail2")]
199 #[rustc_clean(cfg="bfail3")]
200 #[rustc_clean(cfg="bfail5")]
201 #[rustc_clean(cfg="bfail6")]
197 #[rustc_clean(cfg="bpass2")]
198 #[rustc_clean(cfg="bpass3")]
199 #[rustc_clean(cfg="bpass5")]
200 #[rustc_clean(cfg="bpass6")]
202201 pub fn add_method_to_impl1(&self) { }
203202
204 #[rustc_clean(cfg="bfail3")]
205 #[rustc_clean(cfg="bfail6")]
203 #[rustc_clean(cfg="bpass3")]
204 #[rustc_clean(cfg="bpass6")]
206205 pub fn add_method_to_impl2(&self) { }
207206}
208207
209208
210209
211210// Add Method Parameter --------------------------------------------------------
212#[cfg(any(bfail1,bfail4))]
211#[cfg(any(bpass1,bpass4))]
213212impl Foo {
214213 //------------------------------------------------------------------------------------
215214 //--------------------------
......@@ -218,23 +217,23 @@ impl Foo {
218217 pub fn add_method_parameter(&self ) { }
219218}
220219
221#[cfg(not(any(bfail1,bfail4)))]
222#[rustc_clean(cfg="bfail2")]
223#[rustc_clean(cfg="bfail3")]
224#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
225#[rustc_clean(cfg="bfail6")]
220#[cfg(not(any(bpass1,bpass4)))]
221#[rustc_clean(cfg="bpass2")]
222#[rustc_clean(cfg="bpass3")]
223#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
224#[rustc_clean(cfg="bpass6")]
226225impl Foo {
227 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
228 #[rustc_clean(cfg="bfail3")]
229 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
230 #[rustc_clean(cfg="bfail6")]
226 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
227 #[rustc_clean(cfg="bpass3")]
228 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir")]
229 #[rustc_clean(cfg="bpass6")]
231230 pub fn add_method_parameter(&self, _: i32) { }
232231}
233232
234233
235234
236235// Change Method Parameter Name ------------------------------------------------
237#[cfg(any(bfail1,bfail4))]
236#[cfg(any(bpass1,bpass4))]
238237impl Foo {
239238 //----------------------------------------------------------------------
240239 //--------------------------
......@@ -243,23 +242,23 @@ impl Foo {
243242 pub fn change_method_parameter_name(&self, a: i64) { }
244243}
245244
246#[cfg(not(any(bfail1,bfail4)))]
247#[rustc_clean(cfg="bfail2")]
248#[rustc_clean(cfg="bfail3")]
249#[rustc_clean(cfg="bfail5")]
250#[rustc_clean(cfg="bfail6")]
245#[cfg(not(any(bpass1,bpass4)))]
246#[rustc_clean(cfg="bpass2")]
247#[rustc_clean(cfg="bpass3")]
248#[rustc_clean(cfg="bpass5")]
249#[rustc_clean(cfg="bpass6")]
251250impl Foo {
252 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
253 #[rustc_clean(cfg="bfail3")]
254 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
255 #[rustc_clean(cfg="bfail6")]
251 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
252 #[rustc_clean(cfg="bpass3")]
253 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
254 #[rustc_clean(cfg="bpass6")]
256255 pub fn change_method_parameter_name(&self, b: i64) { }
257256}
258257
259258
260259
261260// Change Method Return Type ---------------------------------------------------
262#[cfg(any(bfail1,bfail4))]
261#[cfg(any(bpass1,bpass4))]
263262impl Foo {
264263 //------------------------------------------------------------------------------------
265264 //--------------------------
......@@ -268,23 +267,23 @@ impl Foo {
268267 pub fn change_method_return_type(&self) -> u16 { 0 }
269268}
270269
271#[cfg(not(any(bfail1,bfail4)))]
272#[rustc_clean(cfg="bfail2")]
273#[rustc_clean(cfg="bfail3")]
274#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
275#[rustc_clean(cfg="bfail6")]
270#[cfg(not(any(bpass1,bpass4)))]
271#[rustc_clean(cfg="bpass2")]
272#[rustc_clean(cfg="bpass3")]
273#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
274#[rustc_clean(cfg="bpass6")]
276275impl Foo {
277 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,fn_sig,optimized_mir,typeck_root")]
278 #[rustc_clean(cfg="bfail3")]
279 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,fn_sig,optimized_mir,typeck_root")]
280 #[rustc_clean(cfg="bfail6")]
276 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,fn_sig,optimized_mir,typeck_root")]
277 #[rustc_clean(cfg="bpass3")]
278 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,fn_sig,optimized_mir,typeck_root")]
279 #[rustc_clean(cfg="bpass6")]
281280 pub fn change_method_return_type(&self) -> u32 { 0 }
282281}
283282
284283
285284
286285// Make Method #[inline] -------------------------------------------------------
287#[cfg(any(bfail1,bfail4))]
286#[cfg(any(bpass1,bpass4))]
288287impl Foo {
289288 //--------------------------
290289 //--------------------------
......@@ -294,16 +293,16 @@ impl Foo {
294293 pub fn make_method_inline(&self) -> u8 { 0 }
295294}
296295
297#[cfg(not(any(bfail1,bfail4)))]
298#[rustc_clean(cfg="bfail2")]
299#[rustc_clean(cfg="bfail3")]
300#[rustc_clean(cfg="bfail5")]
301#[rustc_clean(cfg="bfail6")]
296#[cfg(not(any(bpass1,bpass4)))]
297#[rustc_clean(cfg="bpass2")]
298#[rustc_clean(cfg="bpass3")]
299#[rustc_clean(cfg="bpass5")]
300#[rustc_clean(cfg="bpass6")]
302301impl Foo {
303 #[rustc_clean(cfg="bfail2")]
304 #[rustc_clean(cfg="bfail3")]
305 #[rustc_clean(cfg="bfail5")]
306 #[rustc_clean(cfg="bfail6")]
302 #[rustc_clean(cfg="bpass2")]
303 #[rustc_clean(cfg="bpass3")]
304 #[rustc_clean(cfg="bpass5")]
305 #[rustc_clean(cfg="bpass6")]
307306 #[inline]
308307 pub fn make_method_inline(&self) -> u8 { 0 }
309308}
......@@ -311,7 +310,7 @@ impl Foo {
311310
312311
313312// Change order of parameters -------------------------------------------------
314#[cfg(any(bfail1,bfail4))]
313#[cfg(any(bpass1,bpass4))]
315314impl Foo {
316315 //----------------------------------------------------------------------
317316 //--------------------------
......@@ -320,23 +319,23 @@ impl Foo {
320319 pub fn change_method_parameter_order(&self, a: i64, b: i64) { }
321320}
322321
323#[cfg(not(any(bfail1,bfail4)))]
324#[rustc_clean(cfg="bfail2")]
325#[rustc_clean(cfg="bfail3")]
326#[rustc_clean(cfg="bfail5")]
327#[rustc_clean(cfg="bfail6")]
322#[cfg(not(any(bpass1,bpass4)))]
323#[rustc_clean(cfg="bpass2")]
324#[rustc_clean(cfg="bpass3")]
325#[rustc_clean(cfg="bpass5")]
326#[rustc_clean(cfg="bpass6")]
328327impl Foo {
329 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
330 #[rustc_clean(cfg="bfail3")]
331 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
332 #[rustc_clean(cfg="bfail6")]
328 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
329 #[rustc_clean(cfg="bpass3")]
330 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
331 #[rustc_clean(cfg="bpass6")]
333332 pub fn change_method_parameter_order(&self, b: i64, a: i64) { }
334333}
335334
336335
337336
338337// Make method unsafe ----------------------------------------------------------
339#[cfg(any(bfail1,bfail4))]
338#[cfg(any(bpass1,bpass4))]
340339impl Foo {
341340 //----------------------------------------------------------------------
342341 //--------------------------
......@@ -345,23 +344,23 @@ impl Foo {
345344 pub fn make_method_unsafe(&self) { }
346345}
347346
348#[cfg(not(any(bfail1,bfail4)))]
349#[rustc_clean(cfg="bfail2")]
350#[rustc_clean(cfg="bfail3")]
351#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
352#[rustc_clean(cfg="bfail6")]
347#[cfg(not(any(bpass1,bpass4)))]
348#[rustc_clean(cfg="bpass2")]
349#[rustc_clean(cfg="bpass3")]
350#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
351#[rustc_clean(cfg="bpass6")]
353352impl Foo {
354 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
355 #[rustc_clean(cfg="bfail3")]
356 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
357 #[rustc_clean(cfg="bfail6")]
353 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
354 #[rustc_clean(cfg="bpass3")]
355 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
356 #[rustc_clean(cfg="bpass6")]
358357 pub unsafe fn make_method_unsafe(&self) { }
359358}
360359
361360
362361
363362// Make method extern ----------------------------------------------------------
364#[cfg(any(bfail1,bfail4))]
363#[cfg(any(bpass1,bpass4))]
365364impl Foo {
366365 //----------------------------------------------------------------------
367366 //--------------------------
......@@ -370,23 +369,23 @@ impl Foo {
370369 pub fn make_method_extern(&self) { }
371370}
372371
373#[cfg(not(any(bfail1,bfail4)))]
374#[rustc_clean(cfg="bfail2")]
375#[rustc_clean(cfg="bfail3")]
376#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
377#[rustc_clean(cfg="bfail6")]
372#[cfg(not(any(bpass1,bpass4)))]
373#[rustc_clean(cfg="bpass2")]
374#[rustc_clean(cfg="bpass3")]
375#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
376#[rustc_clean(cfg="bpass6")]
378377impl Foo {
379 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
380 #[rustc_clean(cfg="bfail3")]
381 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
382 #[rustc_clean(cfg="bfail6")]
378 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
379 #[rustc_clean(cfg="bpass3")]
380 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
381 #[rustc_clean(cfg="bpass6")]
383382 pub extern "C" fn make_method_extern(&self) { }
384383}
385384
386385
387386
388387// Change method calling convention --------------------------------------------
389#[cfg(any(bfail1,bfail4))]
388#[cfg(any(bpass1,bpass4))]
390389impl Foo {
391390 //----------------------------------------------------------------------
392391 //--------------------------
......@@ -395,23 +394,23 @@ impl Foo {
395394 pub extern "C" fn change_method_calling_convention(&self) { }
396395}
397396
398#[cfg(not(any(bfail1,bfail4)))]
399#[rustc_clean(cfg="bfail2")]
400#[rustc_clean(cfg="bfail3")]
401#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
402#[rustc_clean(cfg="bfail6")]
397#[cfg(not(any(bpass1,bpass4)))]
398#[rustc_clean(cfg="bpass2")]
399#[rustc_clean(cfg="bpass3")]
400#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
401#[rustc_clean(cfg="bpass6")]
403402impl Foo {
404 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
405 #[rustc_clean(cfg="bfail3")]
406 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
407 #[rustc_clean(cfg="bfail6")]
403 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
404 #[rustc_clean(cfg="bpass3")]
405 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,fn_sig,typeck_root")]
406 #[rustc_clean(cfg="bpass6")]
408407 pub extern "system" fn change_method_calling_convention(&self) { }
409408}
410409
411410
412411
413412// Add Lifetime Parameter to Method --------------------------------------------
414#[cfg(any(bfail1,bfail4))]
413#[cfg(any(bpass1,bpass4))]
415414impl Foo {
416415 // -----------------------------------------------------
417416 // ---------------------------------------------------------
......@@ -429,11 +428,11 @@ impl Foo {
429428 pub fn add_lifetime_parameter_to_method (&self) { }
430429}
431430
432#[cfg(not(any(bfail1,bfail4)))]
433#[rustc_clean(cfg="bfail2")]
434#[rustc_clean(cfg="bfail3")]
435#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
436#[rustc_clean(cfg="bfail6")]
431#[cfg(not(any(bpass1,bpass4)))]
432#[rustc_clean(cfg="bpass2")]
433#[rustc_clean(cfg="bpass3")]
434#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
435#[rustc_clean(cfg="bpass6")]
437436impl Foo {
438437 // Warning: Note that `typeck_root` are coming up clean here.
439438 // The addition or removal of lifetime parameters that don't
......@@ -444,17 +443,17 @@ impl Foo {
444443 // if we lower generics before the body, then the `HirId` for
445444 // things in the body will be affected. So if you start to see
446445 // `typeck_root` appear dirty, that might be the cause. -nmatsakis
447 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,fn_sig")]
448 #[rustc_clean(cfg="bfail3")]
449 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,fn_sig,generics_of")]
450 #[rustc_clean(cfg="bfail6")]
446 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,fn_sig")]
447 #[rustc_clean(cfg="bpass3")]
448 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,fn_sig,generics_of")]
449 #[rustc_clean(cfg="bpass6")]
451450 pub fn add_lifetime_parameter_to_method<'a>(&self) { }
452451}
453452
454453
455454
456455// Add Type Parameter To Method ------------------------------------------------
457#[cfg(any(bfail1,bfail4))]
456#[cfg(any(bpass1,bpass4))]
458457impl Foo {
459458 // -----------------------------------------------------
460459 // ---------------------------------------------------------------
......@@ -478,11 +477,11 @@ impl Foo {
478477 pub fn add_type_parameter_to_method (&self) { }
479478}
480479
481#[cfg(not(any(bfail1,bfail4)))]
482#[rustc_clean(cfg="bfail2")]
483#[rustc_clean(cfg="bfail3")]
484#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
485#[rustc_clean(cfg="bfail6")]
480#[cfg(not(any(bpass1,bpass4)))]
481#[rustc_clean(cfg="bpass2")]
482#[rustc_clean(cfg="bpass3")]
483#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
484#[rustc_clean(cfg="bpass6")]
486485impl Foo {
487486 // Warning: Note that `typeck_root` are coming up clean here.
488487 // The addition or removal of type parameters that don't appear in
......@@ -494,22 +493,22 @@ impl Foo {
494493 // body will be affected. So if you start to see `typeck_root`
495494 // appear dirty, that might be the cause. -nmatsakis
496495 #[rustc_clean(
497 cfg="bfail2",
496 cfg="bpass2",
498497 except="opt_hir_owner_nodes,generics_of,predicates_of,type_of",
499498 )]
500 #[rustc_clean(cfg="bfail3")]
499 #[rustc_clean(cfg="bpass3")]
501500 #[rustc_clean(
502 cfg="bfail5",
501 cfg="bpass5",
503502 except="opt_hir_owner_nodes,generics_of,predicates_of,type_of",
504503 )]
505 #[rustc_clean(cfg="bfail6")]
504 #[rustc_clean(cfg="bpass6")]
506505 pub fn add_type_parameter_to_method<T>(&self) { }
507506}
508507
509508
510509
511510// Add Lifetime Bound to Lifetime Parameter of Method --------------------------
512#[cfg(any(bfail1,bfail4))]
511#[cfg(any(bpass1,bpass4))]
513512impl Foo {
514513 //------------
515514 //---------------
......@@ -524,29 +523,29 @@ impl Foo {
524523 pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b >(&self) { }
525524}
526525
527#[cfg(not(any(bfail1,bfail4)))]
528#[rustc_clean(cfg="bfail2")]
529#[rustc_clean(cfg="bfail3")]
530#[rustc_clean(cfg="bfail5")]
531#[rustc_clean(cfg="bfail6")]
526#[cfg(not(any(bpass1,bpass4)))]
527#[rustc_clean(cfg="bpass2")]
528#[rustc_clean(cfg="bpass3")]
529#[rustc_clean(cfg="bpass5")]
530#[rustc_clean(cfg="bpass6")]
532531impl Foo {
533532 #[rustc_clean(
534 cfg="bfail2",
533 cfg="bpass2",
535534 except="opt_hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
536535 )]
537 #[rustc_clean(cfg="bfail3")]
536 #[rustc_clean(cfg="bpass3")]
538537 #[rustc_clean(
539 cfg="bfail5",
538 cfg="bpass5",
540539 except="opt_hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
541540 )]
542 #[rustc_clean(cfg="bfail6")]
541 #[rustc_clean(cfg="bpass6")]
543542 pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b: 'a>(&self) { }
544543}
545544
546545
547546
548547// Add Lifetime Bound to Type Parameter of Method ------------------------------
549#[cfg(any(bfail1,bfail4))]
548#[cfg(any(bpass1,bpass4))]
550549impl Foo {
551550 // -----------------------------------------------------
552551 // ----------------------------------------------------------
......@@ -570,11 +569,11 @@ impl Foo {
570569 pub fn add_lifetime_bound_to_type_param_of_method<'a, T >(&self) { }
571570}
572571
573#[cfg(not(any(bfail1,bfail4)))]
574#[rustc_clean(cfg="bfail2")]
575#[rustc_clean(cfg="bfail3")]
576#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
577#[rustc_clean(cfg="bfail6")]
572#[cfg(not(any(bpass1,bpass4)))]
573#[rustc_clean(cfg="bpass2")]
574#[rustc_clean(cfg="bpass3")]
575#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
576#[rustc_clean(cfg="bpass6")]
578577impl Foo {
579578 // Warning: Note that `typeck_root` are coming up clean here.
580579 // The addition or removal of bounds that don't appear in the
......@@ -586,22 +585,22 @@ impl Foo {
586585 // body will be affected. So if you start to see `typeck_root`
587586 // appear dirty, that might be the cause. -nmatsakis
588587 #[rustc_clean(
589 cfg="bfail2",
588 cfg="bpass2",
590589 except="opt_hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
591590 )]
592 #[rustc_clean(cfg="bfail3")]
591 #[rustc_clean(cfg="bpass3")]
593592 #[rustc_clean(
594 cfg="bfail5",
593 cfg="bpass5",
595594 except="opt_hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
596595 )]
597 #[rustc_clean(cfg="bfail6")]
596 #[rustc_clean(cfg="bpass6")]
598597 pub fn add_lifetime_bound_to_type_param_of_method<'a, T: 'a>(&self) { }
599598}
600599
601600
602601
603602// Add Trait Bound to Type Parameter of Method ------------------------------
604#[cfg(any(bfail1,bfail4))]
603#[cfg(any(bpass1,bpass4))]
605604impl Foo {
606605 // -----------------------------------------------------
607606 // ----------------------------------------------------------
......@@ -619,11 +618,11 @@ impl Foo {
619618 pub fn add_trait_bound_to_type_param_of_method<T >(&self) { }
620619}
621620
622#[cfg(not(any(bfail1,bfail4)))]
623#[rustc_clean(cfg="bfail2")]
624#[rustc_clean(cfg="bfail3")]
625#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
626#[rustc_clean(cfg="bfail6")]
621#[cfg(not(any(bpass1,bpass4)))]
622#[rustc_clean(cfg="bpass2")]
623#[rustc_clean(cfg="bpass3")]
624#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
625#[rustc_clean(cfg="bpass6")]
627626impl Foo {
628627 // Warning: Note that `typeck_root` are coming up clean here.
629628 // The addition or removal of bounds that don't appear in the
......@@ -634,17 +633,17 @@ impl Foo {
634633 // generics before the body, then the `HirId` for things in the
635634 // body will be affected. So if you start to see `typeck_root`
636635 // appear dirty, that might be the cause. -nmatsakis
637 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,predicates_of")]
638 #[rustc_clean(cfg="bfail3")]
639 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
640 #[rustc_clean(cfg="bfail6")]
636 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,predicates_of")]
637 #[rustc_clean(cfg="bpass3")]
638 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
639 #[rustc_clean(cfg="bpass6")]
641640 pub fn add_trait_bound_to_type_param_of_method<T: Clone>(&self) { }
642641}
643642
644643
645644
646645// Add #[no_mangle] to Method --------------------------------------------------
647#[cfg(any(bfail1,bfail4))]
646#[cfg(any(bpass1,bpass4))]
648647impl Foo {
649648 //--------------------------
650649 //--------------------------
......@@ -654,16 +653,16 @@ impl Foo {
654653 pub fn add_no_mangle_to_method(&self) { }
655654}
656655
657#[cfg(not(any(bfail1,bfail4)))]
658#[rustc_clean(cfg="bfail2")]
659#[rustc_clean(cfg="bfail3")]
660#[rustc_clean(cfg="bfail5")]
661#[rustc_clean(cfg="bfail6")]
656#[cfg(not(any(bpass1,bpass4)))]
657#[rustc_clean(cfg="bpass2")]
658#[rustc_clean(cfg="bpass3")]
659#[rustc_clean(cfg="bpass5")]
660#[rustc_clean(cfg="bpass6")]
662661impl Foo {
663 #[rustc_clean(cfg="bfail2")]
664 #[rustc_clean(cfg="bfail3")]
665 #[rustc_clean(cfg="bfail5")]
666 #[rustc_clean(cfg="bfail6")]
662 #[rustc_clean(cfg="bpass2")]
663 #[rustc_clean(cfg="bpass3")]
664 #[rustc_clean(cfg="bpass5")]
665 #[rustc_clean(cfg="bpass6")]
667666 #[unsafe(no_mangle)]
668667 pub fn add_no_mangle_to_method(&self) { }
669668}
......@@ -673,90 +672,90 @@ impl Foo {
673672struct Bar<T>(T);
674673
675674// Add Type Parameter To Impl --------------------------------------------------
676#[cfg(any(bfail1,bfail4))]
675#[cfg(any(bpass1,bpass4))]
677676impl Bar<u32> {
678677 pub fn add_type_parameter_to_impl(&self) { }
679678}
680679
681#[cfg(not(any(bfail1,bfail4)))]
682#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,generics_of")]
683#[rustc_clean(cfg="bfail3")]
684#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,generics_of")]
685#[rustc_clean(cfg="bfail6")]
680#[cfg(not(any(bpass1,bpass4)))]
681#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,generics_of")]
682#[rustc_clean(cfg="bpass3")]
683#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,generics_of")]
684#[rustc_clean(cfg="bpass6")]
686685impl<T> Bar<T> {
687686 #[rustc_clean(
688 cfg="bfail2",
687 cfg="bpass2",
689688 except="generics_of,fn_sig,typeck_root,type_of,optimized_mir"
690689 )]
691 #[rustc_clean(cfg="bfail3")]
690 #[rustc_clean(cfg="bpass3")]
692691 #[rustc_clean(
693 cfg="bfail5",
692 cfg="bpass5",
694693 except="generics_of,fn_sig,typeck_root,type_of,optimized_mir"
695694 )]
696 #[rustc_clean(cfg="bfail6")]
695 #[rustc_clean(cfg="bpass6")]
697696 pub fn add_type_parameter_to_impl(&self) { }
698697}
699698
700699
701700
702701// Change Self Type of Impl ----------------------------------------------------
703#[cfg(any(bfail1,bfail4))]
702#[cfg(any(bpass1,bpass4))]
704703impl Bar<u32> {
705704 pub fn change_impl_self_type(&self) { }
706705}
707706
708#[cfg(not(any(bfail1,bfail4)))]
709#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
710#[rustc_clean(cfg="bfail3")]
711#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
712#[rustc_clean(cfg="bfail6")]
707#[cfg(not(any(bpass1,bpass4)))]
708#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
709#[rustc_clean(cfg="bpass3")]
710#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
711#[rustc_clean(cfg="bpass6")]
713712impl Bar<u64> {
714 #[rustc_clean(cfg="bfail2", except="fn_sig,optimized_mir,typeck_root")]
715 #[rustc_clean(cfg="bfail3")]
716 #[rustc_clean(cfg="bfail5", except="fn_sig,optimized_mir,typeck_root")]
717 #[rustc_clean(cfg="bfail6")]
713 #[rustc_clean(cfg="bpass2", except="fn_sig,optimized_mir,typeck_root")]
714 #[rustc_clean(cfg="bpass3")]
715 #[rustc_clean(cfg="bpass5", except="fn_sig,optimized_mir,typeck_root")]
716 #[rustc_clean(cfg="bpass6")]
718717 pub fn change_impl_self_type(&self) { }
719718}
720719
721720
722721
723722// Add Lifetime Bound to Impl --------------------------------------------------
724#[cfg(any(bfail1,bfail4))]
723#[cfg(any(bpass1,bpass4))]
725724impl<T> Bar<T> {
726725 pub fn add_lifetime_bound_to_impl_parameter(&self) { }
727726}
728727
729#[cfg(not(any(bfail1,bfail4)))]
730#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
731#[rustc_clean(cfg="bfail3")]
732#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
733#[rustc_clean(cfg="bfail6")]
728#[cfg(not(any(bpass1,bpass4)))]
729#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
730#[rustc_clean(cfg="bpass3")]
731#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
732#[rustc_clean(cfg="bpass6")]
734733impl<T: 'static> Bar<T> {
735 #[rustc_clean(cfg="bfail2")]
736 #[rustc_clean(cfg="bfail3")]
737 #[rustc_clean(cfg="bfail5")]
738 #[rustc_clean(cfg="bfail6")]
734 #[rustc_clean(cfg="bpass2")]
735 #[rustc_clean(cfg="bpass3")]
736 #[rustc_clean(cfg="bpass5")]
737 #[rustc_clean(cfg="bpass6")]
739738 pub fn add_lifetime_bound_to_impl_parameter(&self) { }
740739}
741740
742741
743742
744743// Add Trait Bound to Impl Parameter -------------------------------------------
745#[cfg(any(bfail1,bfail4))]
744#[cfg(any(bpass1,bpass4))]
746745impl<T> Bar<T> {
747746 pub fn add_trait_bound_to_impl_parameter(&self) { }
748747}
749748
750#[cfg(not(any(bfail1,bfail4)))]
751#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
752#[rustc_clean(cfg="bfail3")]
753#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
754#[rustc_clean(cfg="bfail6")]
749#[cfg(not(any(bpass1,bpass4)))]
750#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
751#[rustc_clean(cfg="bpass3")]
752#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
753#[rustc_clean(cfg="bpass6")]
755754impl<T: Clone> Bar<T> {
756 #[rustc_clean(cfg="bfail2")]
757 #[rustc_clean(cfg="bfail3")]
758 #[rustc_clean(cfg="bfail5")]
759 #[rustc_clean(cfg="bfail6")]
755 #[rustc_clean(cfg="bpass2")]
756 #[rustc_clean(cfg="bpass3")]
757 #[rustc_clean(cfg="bpass5")]
758 #[rustc_clean(cfg="bpass6")]
760759 pub fn add_trait_bound_to_impl_parameter(&self) { }
761760}
762761
......@@ -765,12 +764,12 @@ impl<T: Clone> Bar<T> {
765764pub fn instantiation_root() {
766765 Foo::method_privacy();
767766
768 #[cfg(any(bfail1,bfail4))]
767 #[cfg(any(bpass1,bpass4))]
769768 {
770769 Bar(0u32).change_impl_self_type();
771770 }
772771
773 #[cfg(not(any(bfail1,bfail4)))]
772 #[cfg(not(any(bpass1,bpass4)))]
774773 {
775774 Bar(0u64).change_impl_self_type();
776775 }
tests/incremental/hashes/inline_asm.rs+41-41
......@@ -5,14 +5,14 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
1110//@ needs-asm-support
12//@ [bfail1]compile-flags: -Zincremental-ignore-spans
13//@ [bfail2]compile-flags: -Zincremental-ignore-spans
14//@ [bfail3]compile-flags: -Zincremental-ignore-spans
11//@ [bpass1]compile-flags: -Zincremental-ignore-spans
12//@ [bpass2]compile-flags: -Zincremental-ignore-spans
13//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1514//@ ignore-backends: gcc
15// FIXME(#62277): could be check-pass?
1616
1717#![allow(warnings)]
1818#![feature(rustc_attrs)]
......@@ -21,7 +21,7 @@
2121use std::arch::asm;
2222
2323// Change template
24#[cfg(any(bfail1,bfail4))]
24#[cfg(any(bpass1,bpass4))]
2525#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
2626pub fn change_template(_a: i32) -> i32 {
2727 let c: i32;
......@@ -33,11 +33,11 @@ pub fn change_template(_a: i32) -> i32 {
3333 c
3434}
3535
36#[cfg(not(any(bfail1,bfail4)))]
37#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
38#[rustc_clean(cfg="bfail3")]
39#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
40#[rustc_clean(cfg="bfail6")]
36#[cfg(not(any(bpass1,bpass4)))]
37#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
38#[rustc_clean(cfg="bpass3")]
39#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
40#[rustc_clean(cfg="bpass6")]
4141#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
4242pub fn change_template(_a: i32) -> i32 {
4343 let c: i32;
......@@ -52,7 +52,7 @@ pub fn change_template(_a: i32) -> i32 {
5252
5353
5454// Change output
55#[cfg(any(bfail1,bfail4))]
55#[cfg(any(bpass1,bpass4))]
5656#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
5757pub fn change_output(a: i32) -> i32 {
5858 let mut _out1: i32 = 0;
......@@ -66,11 +66,11 @@ pub fn change_output(a: i32) -> i32 {
6666 _out1
6767}
6868
69#[cfg(not(any(bfail1,bfail4)))]
70#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
71#[rustc_clean(cfg="bfail3")]
72#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
73#[rustc_clean(cfg="bfail6")]
69#[cfg(not(any(bpass1,bpass4)))]
70#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
71#[rustc_clean(cfg="bpass3")]
72#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
73#[rustc_clean(cfg="bpass6")]
7474#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
7575pub fn change_output(a: i32) -> i32 {
7676 let mut _out1: i32 = 0;
......@@ -87,7 +87,7 @@ pub fn change_output(a: i32) -> i32 {
8787
8888
8989// Change input
90#[cfg(any(bfail1,bfail4))]
90#[cfg(any(bpass1,bpass4))]
9191#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
9292pub fn change_input(_a: i32, _b: i32) -> i32 {
9393 let _out;
......@@ -100,11 +100,11 @@ pub fn change_input(_a: i32, _b: i32) -> i32 {
100100 _out
101101}
102102
103#[cfg(not(any(bfail1,bfail4)))]
104#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
105#[rustc_clean(cfg="bfail3")]
106#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
107#[rustc_clean(cfg="bfail6")]
103#[cfg(not(any(bpass1,bpass4)))]
104#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
105#[rustc_clean(cfg="bpass3")]
106#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
107#[rustc_clean(cfg="bpass6")]
108108#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
109109pub fn change_input(_a: i32, _b: i32) -> i32 {
110110 let _out;
......@@ -120,7 +120,7 @@ pub fn change_input(_a: i32, _b: i32) -> i32 {
120120
121121
122122// Change input constraint
123#[cfg(any(bfail1,bfail4))]
123#[cfg(any(bpass1,bpass4))]
124124#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
125125pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
126126 let _out;
......@@ -133,11 +133,11 @@ pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
133133 _out
134134}
135135
136#[cfg(not(any(bfail1,bfail4)))]
137#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
138#[rustc_clean(cfg="bfail3")]
139#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
140#[rustc_clean(cfg="bfail6")]
136#[cfg(not(any(bpass1,bpass4)))]
137#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
138#[rustc_clean(cfg="bpass3")]
139#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
140#[rustc_clean(cfg="bpass6")]
141141#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
142142pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
143143 let _out;
......@@ -152,7 +152,7 @@ pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
152152
153153
154154// Change clobber
155#[cfg(any(bfail1,bfail4))]
155#[cfg(any(bpass1,bpass4))]
156156#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
157157pub fn change_clobber(_a: i32) -> i32 {
158158 let _out;
......@@ -166,11 +166,11 @@ pub fn change_clobber(_a: i32) -> i32 {
166166 _out
167167}
168168
169#[cfg(not(any(bfail1,bfail4)))]
170#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
171#[rustc_clean(cfg="bfail3")]
172#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
173#[rustc_clean(cfg="bfail6")]
169#[cfg(not(any(bpass1,bpass4)))]
170#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
171#[rustc_clean(cfg="bpass3")]
172#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
173#[rustc_clean(cfg="bpass6")]
174174#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
175175pub fn change_clobber(_a: i32) -> i32 {
176176 let _out;
......@@ -187,7 +187,7 @@ pub fn change_clobber(_a: i32) -> i32 {
187187
188188
189189// Change options
190#[cfg(any(bfail1,bfail4))]
190#[cfg(any(bpass1,bpass4))]
191191#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
192192pub fn change_options(_a: i32) -> i32 {
193193 let _out;
......@@ -201,11 +201,11 @@ pub fn change_options(_a: i32) -> i32 {
201201 _out
202202}
203203
204#[cfg(not(any(bfail1,bfail4)))]
205#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
206#[rustc_clean(cfg="bfail3")]
207#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
208#[rustc_clean(cfg="bfail6")]
204#[cfg(not(any(bpass1,bpass4)))]
205#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
206#[rustc_clean(cfg="bpass3")]
207#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
208#[rustc_clean(cfg="bpass6")]
209209#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
210210pub fn change_options(_a: i32) -> i32 {
211211 let _out;
tests/incremental/hashes/let_expressions.rs+77-77
......@@ -5,29 +5,29 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
1818#![crate_type="rlib"]
1919
2020// Change Name -----------------------------------------------------------------
21#[cfg(any(bfail1,bfail4))]
21#[cfg(any(bpass1,bpass4))]
2222pub fn change_name() {
2323 let _x = 2u64;
2424}
2525
26#[cfg(not(any(bfail1,bfail4)))]
27#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
28#[rustc_clean(cfg="bfail3")]
29#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
30#[rustc_clean(cfg="bfail6")]
26#[cfg(not(any(bpass1,bpass4)))]
27#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
28#[rustc_clean(cfg="bpass3")]
29#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
30#[rustc_clean(cfg="bpass6")]
3131pub fn change_name() {
3232 let _y = 2u64;
3333}
......@@ -35,16 +35,16 @@ pub fn change_name() {
3535
3636
3737// Add Type --------------------------------------------------------------------
38#[cfg(any(bfail1,bfail4))]
38#[cfg(any(bpass1,bpass4))]
3939pub fn add_type() {
4040 let _x = 2u32;
4141}
4242
43#[cfg(not(any(bfail1,bfail4)))]
44#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
45#[rustc_clean(cfg="bfail3")]
46#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root")]
47#[rustc_clean(cfg="bfail6")]
43#[cfg(not(any(bpass1,bpass4)))]
44#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
45#[rustc_clean(cfg="bpass3")]
46#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root")]
47#[rustc_clean(cfg="bpass6")]
4848pub fn add_type() {
4949 let _x: u32 = 2u32;
5050}
......@@ -52,16 +52,16 @@ pub fn add_type() {
5252
5353
5454// Change Type -----------------------------------------------------------------
55#[cfg(any(bfail1,bfail4))]
55#[cfg(any(bpass1,bpass4))]
5656pub fn change_type() {
5757 let _x: u64 = 2;
5858}
5959
60#[cfg(not(any(bfail1,bfail4)))]
61#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
62#[rustc_clean(cfg="bfail3")]
63#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
64#[rustc_clean(cfg="bfail6")]
60#[cfg(not(any(bpass1,bpass4)))]
61#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
62#[rustc_clean(cfg="bpass3")]
63#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
64#[rustc_clean(cfg="bpass6")]
6565pub fn change_type() {
6666 let _x: u8 = 2;
6767}
......@@ -69,16 +69,16 @@ pub fn change_type() {
6969
7070
7171// Change Mutability of Reference Type -----------------------------------------
72#[cfg(any(bfail1,bfail4))]
72#[cfg(any(bpass1,bpass4))]
7373pub fn change_mutability_of_reference_type() {
7474 let _x: & u64;
7575}
7676
77#[cfg(not(any(bfail1,bfail4)))]
78#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
79#[rustc_clean(cfg="bfail3")]
80#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
81#[rustc_clean(cfg="bfail6")]
77#[cfg(not(any(bpass1,bpass4)))]
78#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
79#[rustc_clean(cfg="bpass3")]
80#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
81#[rustc_clean(cfg="bpass6")]
8282pub fn change_mutability_of_reference_type() {
8383 let _x: &mut u64;
8484}
......@@ -86,16 +86,16 @@ pub fn change_mutability_of_reference_type() {
8686
8787
8888// Change Mutability of Slot ---------------------------------------------------
89#[cfg(any(bfail1,bfail4))]
89#[cfg(any(bpass1,bpass4))]
9090pub fn change_mutability_of_slot() {
9191 let mut _x: u64 = 0;
9292}
9393
94#[cfg(not(any(bfail1,bfail4)))]
95#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
96#[rustc_clean(cfg="bfail3")]
97#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
98#[rustc_clean(cfg="bfail6")]
94#[cfg(not(any(bpass1,bpass4)))]
95#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
96#[rustc_clean(cfg="bpass3")]
97#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
98#[rustc_clean(cfg="bpass6")]
9999pub fn change_mutability_of_slot() {
100100 let _x: u64 = 0;
101101}
......@@ -103,16 +103,16 @@ pub fn change_mutability_of_slot() {
103103
104104
105105// Change Simple Binding to Pattern --------------------------------------------
106#[cfg(any(bfail1,bfail4))]
106#[cfg(any(bpass1,bpass4))]
107107pub fn change_simple_binding_to_pattern() {
108108 let _x = (0u8, 'x');
109109}
110110
111#[cfg(not(any(bfail1,bfail4)))]
112#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
113#[rustc_clean(cfg="bfail3")]
114#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
115#[rustc_clean(cfg="bfail6")]
111#[cfg(not(any(bpass1,bpass4)))]
112#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
113#[rustc_clean(cfg="bpass3")]
114#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
115#[rustc_clean(cfg="bpass6")]
116116pub fn change_simple_binding_to_pattern() {
117117 let (_a, _b) = (0u8, 'x');
118118}
......@@ -120,16 +120,16 @@ pub fn change_simple_binding_to_pattern() {
120120
121121
122122// Change Name in Pattern ------------------------------------------------------
123#[cfg(any(bfail1,bfail4))]
123#[cfg(any(bpass1,bpass4))]
124124pub fn change_name_in_pattern() {
125125 let (_a, _b) = (1u8, 'y');
126126}
127127
128#[cfg(not(any(bfail1,bfail4)))]
129#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
130#[rustc_clean(cfg="bfail3")]
131#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
132#[rustc_clean(cfg="bfail6")]
128#[cfg(not(any(bpass1,bpass4)))]
129#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
130#[rustc_clean(cfg="bpass3")]
131#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
132#[rustc_clean(cfg="bpass6")]
133133pub fn change_name_in_pattern() {
134134 let (_a, _c) = (1u8, 'y');
135135}
......@@ -137,16 +137,16 @@ pub fn change_name_in_pattern() {
137137
138138
139139// Add `ref` in Pattern --------------------------------------------------------
140#[cfg(any(bfail1,bfail4))]
140#[cfg(any(bpass1,bpass4))]
141141pub fn add_ref_in_pattern() {
142142 let ( _a, _b) = (1u8, 'y');
143143}
144144
145#[cfg(not(any(bfail1,bfail4)))]
146#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
147#[rustc_clean(cfg="bfail3")]
148#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
149#[rustc_clean(cfg="bfail6")]
145#[cfg(not(any(bpass1,bpass4)))]
146#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
147#[rustc_clean(cfg="bpass3")]
148#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
149#[rustc_clean(cfg="bpass6")]
150150pub fn add_ref_in_pattern() {
151151 let (ref _a, _b) = (1u8, 'y');
152152}
......@@ -154,16 +154,16 @@ pub fn add_ref_in_pattern() {
154154
155155
156156// Add `&` in Pattern ----------------------------------------------------------
157#[cfg(any(bfail1,bfail4))]
157#[cfg(any(bpass1,bpass4))]
158158pub fn add_amp_in_pattern() {
159159 let ( _a, _b) = (&1u8, 'y');
160160}
161161
162#[cfg(not(any(bfail1,bfail4)))]
163#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
164#[rustc_clean(cfg="bfail3")]
165#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
166#[rustc_clean(cfg="bfail6")]
162#[cfg(not(any(bpass1,bpass4)))]
163#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
164#[rustc_clean(cfg="bpass3")]
165#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
166#[rustc_clean(cfg="bpass6")]
167167pub fn add_amp_in_pattern() {
168168 let (&_a, _b) = (&1u8, 'y');
169169}
......@@ -171,16 +171,16 @@ pub fn add_amp_in_pattern() {
171171
172172
173173// Change Mutability of Binding in Pattern -------------------------------------
174#[cfg(any(bfail1,bfail4))]
174#[cfg(any(bpass1,bpass4))]
175175pub fn change_mutability_of_binding_in_pattern() {
176176 let ( _a, _b) = (99u8, 'q');
177177}
178178
179#[cfg(not(any(bfail1,bfail4)))]
180#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
181#[rustc_clean(cfg="bfail3")]
182#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
183#[rustc_clean(cfg="bfail6")]
179#[cfg(not(any(bpass1,bpass4)))]
180#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
181#[rustc_clean(cfg="bpass3")]
182#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
183#[rustc_clean(cfg="bpass6")]
184184pub fn change_mutability_of_binding_in_pattern() {
185185 let (mut _a, _b) = (99u8, 'q');
186186}
......@@ -188,16 +188,16 @@ pub fn change_mutability_of_binding_in_pattern() {
188188
189189
190190// Add Initializer -------------------------------------------------------------
191#[cfg(any(bfail1,bfail4))]
191#[cfg(any(bpass1,bpass4))]
192192pub fn add_initializer() {
193193 let _x: i16 ;
194194}
195195
196#[cfg(not(any(bfail1,bfail4)))]
197#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
198#[rustc_clean(cfg="bfail3")]
199#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
200#[rustc_clean(cfg="bfail6")]
196#[cfg(not(any(bpass1,bpass4)))]
197#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
198#[rustc_clean(cfg="bpass3")]
199#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root,optimized_mir")]
200#[rustc_clean(cfg="bpass6")]
201201pub fn add_initializer() {
202202 let _x: i16 = 3i16;
203203}
......@@ -205,16 +205,16 @@ pub fn add_initializer() {
205205
206206
207207// Change Initializer ----------------------------------------------------------
208#[cfg(any(bfail1,bfail4))]
208#[cfg(any(bpass1,bpass4))]
209209pub fn change_initializer() {
210210 let _x = 4u16;
211211}
212212
213#[cfg(not(any(bfail1,bfail4)))]
214#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
215#[rustc_clean(cfg="bfail3")]
216#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
217#[rustc_clean(cfg="bfail6")]
213#[cfg(not(any(bpass1,bpass4)))]
214#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
215#[rustc_clean(cfg="bpass3")]
216#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
217#[rustc_clean(cfg="bpass6")]
218218pub fn change_initializer() {
219219 let _x = 5u16;
220220}
tests/incremental/hashes/loop_expressions.rs+53-53
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,7 +19,7 @@
1919
2020
2121// Change loop body
22#[cfg(any(bfail1,bfail4))]
22#[cfg(any(bpass1,bpass4))]
2323pub fn change_loop_body() {
2424 let mut _x = 0;
2525 loop {
......@@ -28,11 +28,11 @@ pub fn change_loop_body() {
2828 }
2929}
3030
31#[cfg(not(any(bfail1,bfail4)))]
32#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
33#[rustc_clean(cfg="bfail3")]
34#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
35#[rustc_clean(cfg="bfail6")]
31#[cfg(not(any(bpass1,bpass4)))]
32#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
33#[rustc_clean(cfg="bpass3")]
34#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
35#[rustc_clean(cfg="bpass6")]
3636pub fn change_loop_body() {
3737 let mut _x = 0;
3838 loop {
......@@ -44,7 +44,7 @@ pub fn change_loop_body() {
4444
4545
4646// Add break
47#[cfg(any(bfail1,bfail4))]
47#[cfg(any(bpass1,bpass4))]
4848pub fn add_break() {
4949 let mut _x = 0;
5050 loop {
......@@ -53,11 +53,11 @@ pub fn add_break() {
5353 }
5454}
5555
56#[cfg(not(any(bfail1,bfail4)))]
57#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
58#[rustc_clean(cfg="bfail3")]
59#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
60#[rustc_clean(cfg="bfail6")]
56#[cfg(not(any(bpass1,bpass4)))]
57#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
58#[rustc_clean(cfg="bpass3")]
59#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
60#[rustc_clean(cfg="bpass6")]
6161pub fn add_break() {
6262 let mut _x = 0;
6363 loop {
......@@ -69,7 +69,7 @@ pub fn add_break() {
6969
7070
7171// Add loop label
72#[cfg(any(bfail1,bfail4))]
72#[cfg(any(bpass1,bpass4))]
7373pub fn add_loop_label() {
7474 let mut _x = 0;
7575 /*---*/ loop {
......@@ -78,11 +78,11 @@ pub fn add_loop_label() {
7878 }
7979}
8080
81#[cfg(not(any(bfail1,bfail4)))]
82#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
83#[rustc_clean(cfg="bfail3")]
84#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
85#[rustc_clean(cfg="bfail6")]
81#[cfg(not(any(bpass1,bpass4)))]
82#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
83#[rustc_clean(cfg="bpass3")]
84#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
85#[rustc_clean(cfg="bpass6")]
8686pub fn add_loop_label() {
8787 let mut _x = 0;
8888 'label: loop {
......@@ -94,7 +94,7 @@ pub fn add_loop_label() {
9494
9595
9696// Add loop label to break
97#[cfg(any(bfail1,bfail4))]
97#[cfg(any(bpass1,bpass4))]
9898pub fn add_loop_label_to_break() {
9999 let mut _x = 0;
100100 'label: loop {
......@@ -103,11 +103,11 @@ pub fn add_loop_label_to_break() {
103103 }
104104}
105105
106#[cfg(not(any(bfail1,bfail4)))]
107#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
108#[rustc_clean(cfg="bfail3")]
109#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
110#[rustc_clean(cfg="bfail6")]
106#[cfg(not(any(bpass1,bpass4)))]
107#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
108#[rustc_clean(cfg="bpass3")]
109#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
110#[rustc_clean(cfg="bpass6")]
111111pub fn add_loop_label_to_break() {
112112 let mut _x = 0;
113113 'label: loop {
......@@ -119,7 +119,7 @@ pub fn add_loop_label_to_break() {
119119
120120
121121// Change break label
122#[cfg(any(bfail1,bfail4))]
122#[cfg(any(bpass1,bpass4))]
123123pub fn change_break_label() {
124124 let mut _x = 0;
125125 'outer: loop {
......@@ -130,11 +130,11 @@ pub fn change_break_label() {
130130 }
131131}
132132
133#[cfg(not(any(bfail1,bfail4)))]
134#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
135#[rustc_clean(cfg="bfail3")]
136#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
137#[rustc_clean(cfg="bfail6")]
133#[cfg(not(any(bpass1,bpass4)))]
134#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
135#[rustc_clean(cfg="bpass3")]
136#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
137#[rustc_clean(cfg="bpass6")]
138138pub fn change_break_label() {
139139 let mut _x = 0;
140140 'outer: loop {
......@@ -148,7 +148,7 @@ pub fn change_break_label() {
148148
149149
150150// Add loop label to continue
151#[cfg(any(bfail1,bfail4))]
151#[cfg(any(bpass1,bpass4))]
152152pub fn add_loop_label_to_continue() {
153153 let mut _x = 0;
154154 'label: loop {
......@@ -157,11 +157,11 @@ pub fn add_loop_label_to_continue() {
157157 }
158158}
159159
160#[cfg(not(any(bfail1,bfail4)))]
161#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
162#[rustc_clean(cfg="bfail3")]
163#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
164#[rustc_clean(cfg="bfail6")]
160#[cfg(not(any(bpass1,bpass4)))]
161#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
162#[rustc_clean(cfg="bpass3")]
163#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
164#[rustc_clean(cfg="bpass6")]
165165pub fn add_loop_label_to_continue() {
166166 let mut _x = 0;
167167 'label: loop {
......@@ -173,7 +173,7 @@ pub fn add_loop_label_to_continue() {
173173
174174
175175// Change continue label
176#[cfg(any(bfail1,bfail4))]
176#[cfg(any(bpass1,bpass4))]
177177pub fn change_continue_label() {
178178 let mut _x = 0;
179179 'outer: loop {
......@@ -184,11 +184,11 @@ pub fn change_continue_label() {
184184 }
185185}
186186
187#[cfg(not(any(bfail1,bfail4)))]
188#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
189#[rustc_clean(cfg="bfail3")]
190#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
191#[rustc_clean(cfg="bfail6")]
187#[cfg(not(any(bpass1,bpass4)))]
188#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
189#[rustc_clean(cfg="bpass3")]
190#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
191#[rustc_clean(cfg="bpass6")]
192192pub fn change_continue_label() {
193193 let mut _x = 0;
194194 'outer: loop {
......@@ -202,7 +202,7 @@ pub fn change_continue_label() {
202202
203203
204204// Change continue to break
205#[cfg(any(bfail1,bfail4))]
205#[cfg(any(bpass1,bpass4))]
206206pub fn change_continue_to_break() {
207207 let mut _x = 0;
208208 loop {
......@@ -211,11 +211,11 @@ pub fn change_continue_to_break() {
211211 }
212212}
213213
214#[cfg(not(any(bfail1,bfail4)))]
215#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, typeck_root, optimized_mir")]
216#[rustc_clean(cfg="bfail3")]
217#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, typeck_root, optimized_mir")]
218#[rustc_clean(cfg="bfail6")]
214#[cfg(not(any(bpass1,bpass4)))]
215#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, typeck_root, optimized_mir")]
216#[rustc_clean(cfg="bpass3")]
217#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, typeck_root, optimized_mir")]
218#[rustc_clean(cfg="bpass6")]
219219pub fn change_continue_to_break() {
220220 let mut _x = 0;
221221 loop {
tests/incremental/hashes/match_expressions.rs+84-84
......@@ -5,20 +5,20 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
1818#![crate_type="rlib"]
1919
2020// Add Arm ---------------------------------------------------------------------
21#[cfg(any(bfail1,bfail4))]
21#[cfg(any(bpass1,bpass4))]
2222pub fn add_arm(x: u32) -> u32 {
2323 match x {
2424 0 => 0,
......@@ -28,11 +28,11 @@ pub fn add_arm(x: u32) -> u32 {
2828 }
2929}
3030
31#[cfg(not(any(bfail1,bfail4)))]
32#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
33#[rustc_clean(cfg="bfail3")]
34#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
35#[rustc_clean(cfg="bfail6")]
31#[cfg(not(any(bpass1,bpass4)))]
32#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
33#[rustc_clean(cfg="bpass3")]
34#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
35#[rustc_clean(cfg="bpass6")]
3636pub fn add_arm(x: u32) -> u32 {
3737 match x {
3838 0 => 0,
......@@ -45,7 +45,7 @@ pub fn add_arm(x: u32) -> u32 {
4545
4646
4747// Change Order Of Arms --------------------------------------------------------
48#[cfg(any(bfail1,bfail4))]
48#[cfg(any(bpass1,bpass4))]
4949pub fn change_order_of_arms(x: u32) -> u32 {
5050 match x {
5151 0 => 0,
......@@ -54,11 +54,11 @@ pub fn change_order_of_arms(x: u32) -> u32 {
5454 }
5555}
5656
57#[cfg(not(any(bfail1,bfail4)))]
58#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
59#[rustc_clean(cfg="bfail3")]
60#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
61#[rustc_clean(cfg="bfail6")]
57#[cfg(not(any(bpass1,bpass4)))]
58#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
59#[rustc_clean(cfg="bpass3")]
60#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
61#[rustc_clean(cfg="bpass6")]
6262pub fn change_order_of_arms(x: u32) -> u32 {
6363 match x {
6464 1 => 1,
......@@ -70,7 +70,7 @@ pub fn change_order_of_arms(x: u32) -> u32 {
7070
7171
7272// Add Guard Clause ------------------------------------------------------------
73#[cfg(any(bfail1,bfail4))]
73#[cfg(any(bpass1,bpass4))]
7474pub fn add_guard_clause(x: u32, y: bool) -> u32 {
7575 match x {
7676 0 => 0,
......@@ -79,11 +79,11 @@ pub fn add_guard_clause(x: u32, y: bool) -> u32 {
7979 }
8080}
8181
82#[cfg(not(any(bfail1,bfail4)))]
83#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
84#[rustc_clean(cfg="bfail3")]
85#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
86#[rustc_clean(cfg="bfail6")]
82#[cfg(not(any(bpass1,bpass4)))]
83#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
84#[rustc_clean(cfg="bpass3")]
85#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
86#[rustc_clean(cfg="bpass6")]
8787pub fn add_guard_clause(x: u32, y: bool) -> u32 {
8888 match x {
8989 0 => 0,
......@@ -95,7 +95,7 @@ pub fn add_guard_clause(x: u32, y: bool) -> u32 {
9595
9696
9797// Change Guard Clause ------------------------------------------------------------
98#[cfg(any(bfail1,bfail4))]
98#[cfg(any(bpass1,bpass4))]
9999pub fn change_guard_clause(x: u32, y: bool) -> u32 {
100100 match x {
101101 0 => 0,
......@@ -104,11 +104,11 @@ pub fn change_guard_clause(x: u32, y: bool) -> u32 {
104104 }
105105}
106106
107#[cfg(not(any(bfail1,bfail4)))]
108#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
109#[rustc_clean(cfg="bfail3")]
110#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
111#[rustc_clean(cfg="bfail6")]
107#[cfg(not(any(bpass1,bpass4)))]
108#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
109#[rustc_clean(cfg="bpass3")]
110#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
111#[rustc_clean(cfg="bpass6")]
112112pub fn change_guard_clause(x: u32, y: bool) -> u32 {
113113 match x {
114114 0 => 0,
......@@ -120,7 +120,7 @@ pub fn change_guard_clause(x: u32, y: bool) -> u32 {
120120
121121
122122// Add @-Binding ---------------------------------------------------------------
123#[cfg(any(bfail1,bfail4))]
123#[cfg(any(bpass1,bpass4))]
124124pub fn add_at_binding(x: u32) -> u32 {
125125 match x {
126126 0 => 0,
......@@ -129,11 +129,11 @@ pub fn add_at_binding(x: u32) -> u32 {
129129 }
130130}
131131
132#[cfg(not(any(bfail1,bfail4)))]
133#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
134#[rustc_clean(cfg="bfail3")]
135#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
136#[rustc_clean(cfg="bfail6")]
132#[cfg(not(any(bpass1,bpass4)))]
133#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
134#[rustc_clean(cfg="bpass3")]
135#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
136#[rustc_clean(cfg="bpass6")]
137137pub fn add_at_binding(x: u32) -> u32 {
138138 match x {
139139 0 => 0,
......@@ -145,7 +145,7 @@ pub fn add_at_binding(x: u32) -> u32 {
145145
146146
147147// Change Name of @-Binding ----------------------------------------------------
148#[cfg(any(bfail1,bfail4))]
148#[cfg(any(bpass1,bpass4))]
149149pub fn change_name_of_at_binding(x: u32) -> u32 {
150150 match x {
151151 0 => 0,
......@@ -154,11 +154,11 @@ pub fn change_name_of_at_binding(x: u32) -> u32 {
154154 }
155155}
156156
157#[cfg(not(any(bfail1,bfail4)))]
158#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
159#[rustc_clean(cfg="bfail3")]
160#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
161#[rustc_clean(cfg="bfail6")]
157#[cfg(not(any(bpass1,bpass4)))]
158#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
159#[rustc_clean(cfg="bpass3")]
160#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
161#[rustc_clean(cfg="bpass6")]
162162pub fn change_name_of_at_binding(x: u32) -> u32 {
163163 match x {
164164 0 => 0,
......@@ -170,7 +170,7 @@ pub fn change_name_of_at_binding(x: u32) -> u32 {
170170
171171
172172// Change Simple Binding To Pattern --------------------------------------------
173#[cfg(any(bfail1,bfail4))]
173#[cfg(any(bpass1,bpass4))]
174174pub fn change_simple_name_to_pattern(x: u32) -> u32 {
175175 match (x, x & 1) {
176176 (0, 0) => 0,
......@@ -178,11 +178,11 @@ pub fn change_simple_name_to_pattern(x: u32) -> u32 {
178178 }
179179}
180180
181#[cfg(not(any(bfail1,bfail4)))]
182#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
183#[rustc_clean(cfg="bfail3")]
184#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
185#[rustc_clean(cfg="bfail6")]
181#[cfg(not(any(bpass1,bpass4)))]
182#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
183#[rustc_clean(cfg="bpass3")]
184#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
185#[rustc_clean(cfg="bpass6")]
186186pub fn change_simple_name_to_pattern(x: u32) -> u32 {
187187 match (x, x & 1) {
188188 (0, 0) => 0,
......@@ -193,7 +193,7 @@ pub fn change_simple_name_to_pattern(x: u32) -> u32 {
193193
194194
195195// Change Name In Pattern ------------------------------------------------------
196#[cfg(any(bfail1,bfail4))]
196#[cfg(any(bpass1,bpass4))]
197197pub fn change_name_in_pattern(x: u32) -> u32 {
198198 match (x, x & 1) {
199199 (a, 0) => 0,
......@@ -202,11 +202,11 @@ pub fn change_name_in_pattern(x: u32) -> u32 {
202202 }
203203}
204204
205#[cfg(not(any(bfail1,bfail4)))]
206#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
207#[rustc_clean(cfg="bfail3")]
208#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
209#[rustc_clean(cfg="bfail6")]
205#[cfg(not(any(bpass1,bpass4)))]
206#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
207#[rustc_clean(cfg="bpass3")]
208#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
209#[rustc_clean(cfg="bpass6")]
210210pub fn change_name_in_pattern(x: u32) -> u32 {
211211 match (x, x & 1) {
212212 (b, 0) => 0,
......@@ -218,7 +218,7 @@ pub fn change_name_in_pattern(x: u32) -> u32 {
218218
219219
220220// Change Mutability Of Binding In Pattern -------------------------------------
221#[cfg(any(bfail1,bfail4))]
221#[cfg(any(bpass1,bpass4))]
222222pub fn change_mutability_of_binding_in_pattern(x: u32) -> u32 {
223223 match (x, x & 1) {
224224 ( a, 0) => 0,
......@@ -226,12 +226,12 @@ pub fn change_mutability_of_binding_in_pattern(x: u32) -> u32 {
226226 }
227227}
228228
229// Ignore optimized_mir in bfail2, the only change to optimized MIR is a span.
230#[cfg(not(any(bfail1,bfail4)))]
231#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
232#[rustc_clean(cfg="bfail3")]
233#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
234#[rustc_clean(cfg="bfail6")]
229// Ignore optimized_mir in bpass2, the only change to optimized MIR is a span.
230#[cfg(not(any(bpass1,bpass4)))]
231#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
232#[rustc_clean(cfg="bpass3")]
233#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
234#[rustc_clean(cfg="bpass6")]
235235pub fn change_mutability_of_binding_in_pattern(x: u32) -> u32 {
236236 match (x, x & 1) {
237237 (mut a, 0) => 0,
......@@ -242,7 +242,7 @@ pub fn change_mutability_of_binding_in_pattern(x: u32) -> u32 {
242242
243243
244244// Add `ref` To Binding In Pattern -------------------------------------
245#[cfg(any(bfail1,bfail4))]
245#[cfg(any(bpass1,bpass4))]
246246pub fn add_ref_to_binding_in_pattern(x: u32) -> u32 {
247247 match (x, x & 1) {
248248 ( a, 0) => 0,
......@@ -250,11 +250,11 @@ pub fn add_ref_to_binding_in_pattern(x: u32) -> u32 {
250250 }
251251}
252252
253#[cfg(not(any(bfail1,bfail4)))]
254#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
255#[rustc_clean(cfg="bfail3")]
256#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
257#[rustc_clean(cfg="bfail6")]
253#[cfg(not(any(bpass1,bpass4)))]
254#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
255#[rustc_clean(cfg="bpass3")]
256#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
257#[rustc_clean(cfg="bpass6")]
258258pub fn add_ref_to_binding_in_pattern(x: u32) -> u32 {
259259 match (x, x & 1) {
260260 (ref a, 0) => 0,
......@@ -265,7 +265,7 @@ pub fn add_ref_to_binding_in_pattern(x: u32) -> u32 {
265265
266266
267267// Add `&` To Binding In Pattern -------------------------------------
268#[cfg(any(bfail1,bfail4))]
268#[cfg(any(bpass1,bpass4))]
269269pub fn add_amp_to_binding_in_pattern(x: u32) -> u32 {
270270 match (&x, x & 1) {
271271 ( a, 0) => 0,
......@@ -273,11 +273,11 @@ pub fn add_amp_to_binding_in_pattern(x: u32) -> u32 {
273273 }
274274}
275275
276#[cfg(not(any(bfail1,bfail4)))]
277#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
278#[rustc_clean(cfg="bfail3")]
279#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
280#[rustc_clean(cfg="bfail6")]
276#[cfg(not(any(bpass1,bpass4)))]
277#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
278#[rustc_clean(cfg="bpass3")]
279#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
280#[rustc_clean(cfg="bpass6")]
281281pub fn add_amp_to_binding_in_pattern(x: u32) -> u32 {
282282 match (&x, x & 1) {
283283 (&a, 0) => 0,
......@@ -288,7 +288,7 @@ pub fn add_amp_to_binding_in_pattern(x: u32) -> u32 {
288288
289289
290290// Change RHS Of Arm -----------------------------------------------------------
291#[cfg(any(bfail1,bfail4))]
291#[cfg(any(bpass1,bpass4))]
292292pub fn change_rhs_of_arm(x: u32) -> u32 {
293293 match x {
294294 0 => 0,
......@@ -297,11 +297,11 @@ pub fn change_rhs_of_arm(x: u32) -> u32 {
297297 }
298298}
299299
300#[cfg(not(any(bfail1,bfail4)))]
301#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
302#[rustc_clean(cfg="bfail3")]
303#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
304#[rustc_clean(cfg="bfail6")]
300#[cfg(not(any(bpass1,bpass4)))]
301#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
302#[rustc_clean(cfg="bpass3")]
303#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
304#[rustc_clean(cfg="bpass6")]
305305pub fn change_rhs_of_arm(x: u32) -> u32 {
306306 match x {
307307 0 => 0,
......@@ -313,7 +313,7 @@ pub fn change_rhs_of_arm(x: u32) -> u32 {
313313
314314
315315// Add Alternative To Arm ------------------------------------------------------
316#[cfg(any(bfail1,bfail4))]
316#[cfg(any(bpass1,bpass4))]
317317pub fn add_alternative_to_arm(x: u32) -> u32 {
318318 match x {
319319 0 => 0,
......@@ -322,11 +322,11 @@ pub fn add_alternative_to_arm(x: u32) -> u32 {
322322 }
323323}
324324
325#[cfg(not(any(bfail1,bfail4)))]
326#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
327#[rustc_clean(cfg="bfail3")]
328#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
329#[rustc_clean(cfg="bfail6")]
325#[cfg(not(any(bpass1,bpass4)))]
326#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
327#[rustc_clean(cfg="bpass3")]
328#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
329#[rustc_clean(cfg="bpass6")]
330330pub fn add_alternative_to_arm(x: u32) -> u32 {
331331 match x {
332332 0 | 7 => 0,
tests/incremental/hashes/panic_exprs.rs+38-38
......@@ -8,10 +8,10 @@
88// and make sure that the hash has changed, then change nothing between rev2 and
99// rev3 and make sure that the hash has not changed.
1010
11//@ build-pass (FIXME(62277): could be check-pass?)
12//@ revisions: bfail1 bfail2 bfail3
11//@ revisions: bpass1 bpass2 bpass3
1312//@ compile-flags: -Z query-dep-graph -C debug-assertions -O
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,14 +19,14 @@
1919
2020
2121// Indexing expression
22#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
23#[rustc_clean(cfg="bfail3")]
22#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
23#[rustc_clean(cfg="bpass3")]
2424pub fn indexing(slice: &[u8]) -> u8 {
25 #[cfg(bfail1)]
25 #[cfg(bpass1)]
2626 {
2727 slice[100]
2828 }
29 #[cfg(not(bfail1))]
29 #[cfg(not(bpass1))]
3030 {
3131 slice[100]
3232 }
......@@ -34,14 +34,14 @@ pub fn indexing(slice: &[u8]) -> u8 {
3434
3535
3636// Arithmetic overflow plus
37#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
38#[rustc_clean(cfg="bfail3")]
37#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
38#[rustc_clean(cfg="bpass3")]
3939pub fn arithmetic_overflow_plus(val: i32) -> i32 {
40 #[cfg(bfail1)]
40 #[cfg(bpass1)]
4141 {
4242 val + 1
4343 }
44 #[cfg(not(bfail1))]
44 #[cfg(not(bpass1))]
4545 {
4646 val + 1
4747 }
......@@ -49,14 +49,14 @@ pub fn arithmetic_overflow_plus(val: i32) -> i32 {
4949
5050
5151// Arithmetic overflow minus
52#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
53#[rustc_clean(cfg="bfail3")]
52#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
53#[rustc_clean(cfg="bpass3")]
5454pub fn arithmetic_overflow_minus(val: i32) -> i32 {
55 #[cfg(bfail1)]
55 #[cfg(bpass1)]
5656 {
5757 val - 1
5858 }
59 #[cfg(not(bfail1))]
59 #[cfg(not(bpass1))]
6060 {
6161 val - 1
6262 }
......@@ -64,14 +64,14 @@ pub fn arithmetic_overflow_minus(val: i32) -> i32 {
6464
6565
6666// Arithmetic overflow mult
67#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
68#[rustc_clean(cfg="bfail3")]
67#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
68#[rustc_clean(cfg="bpass3")]
6969pub fn arithmetic_overflow_mult(val: i32) -> i32 {
70 #[cfg(bfail1)]
70 #[cfg(bpass1)]
7171 {
7272 val * 2
7373 }
74 #[cfg(not(bfail1))]
74 #[cfg(not(bpass1))]
7575 {
7676 val * 2
7777 }
......@@ -79,14 +79,14 @@ pub fn arithmetic_overflow_mult(val: i32) -> i32 {
7979
8080
8181// Arithmetic overflow negation
82#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
83#[rustc_clean(cfg="bfail3")]
82#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
83#[rustc_clean(cfg="bpass3")]
8484pub fn arithmetic_overflow_negation(val: i32) -> i32 {
85 #[cfg(bfail1)]
85 #[cfg(bpass1)]
8686 {
8787 -val
8888 }
89 #[cfg(not(bfail1))]
89 #[cfg(not(bpass1))]
9090 {
9191 -val
9292 }
......@@ -94,28 +94,28 @@ pub fn arithmetic_overflow_negation(val: i32) -> i32 {
9494
9595
9696// Division by zero
97#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
98#[rustc_clean(cfg="bfail3")]
97#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
98#[rustc_clean(cfg="bpass3")]
9999pub fn division_by_zero(val: i32) -> i32 {
100 #[cfg(bfail1)]
100 #[cfg(bpass1)]
101101 {
102102 2 / val
103103 }
104 #[cfg(not(bfail1))]
104 #[cfg(not(bpass1))]
105105 {
106106 2 / val
107107 }
108108}
109109
110110// Division by zero
111#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
112#[rustc_clean(cfg="bfail3")]
111#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
112#[rustc_clean(cfg="bpass3")]
113113pub fn mod_by_zero(val: i32) -> i32 {
114 #[cfg(bfail1)]
114 #[cfg(bpass1)]
115115 {
116116 2 % val
117117 }
118 #[cfg(not(bfail1))]
118 #[cfg(not(bpass1))]
119119 {
120120 2 % val
121121 }
......@@ -123,14 +123,14 @@ pub fn mod_by_zero(val: i32) -> i32 {
123123
124124
125125// shift left
126#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
127#[rustc_clean(cfg="bfail3")]
126#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
127#[rustc_clean(cfg="bpass3")]
128128pub fn shift_left(val: i32, shift: usize) -> i32 {
129 #[cfg(bfail1)]
129 #[cfg(bpass1)]
130130 {
131131 val << shift
132132 }
133 #[cfg(not(bfail1))]
133 #[cfg(not(bpass1))]
134134 {
135135 val << shift
136136 }
......@@ -138,14 +138,14 @@ pub fn shift_left(val: i32, shift: usize) -> i32 {
138138
139139
140140// shift right
141#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
142#[rustc_clean(cfg="bfail3")]
141#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
142#[rustc_clean(cfg="bpass3")]
143143pub fn shift_right(val: i32, shift: usize) -> i32 {
144 #[cfg(bfail1)]
144 #[cfg(bpass1)]
145145 {
146146 val >> shift
147147 }
148 #[cfg(not(bfail1))]
148 #[cfg(not(bpass1))]
149149 {
150150 val >> shift
151151 }
tests/incremental/hashes/statics.rs+81-81
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -21,140 +21,140 @@
2121
2222
2323// Change static visibility
24#[cfg(any(bfail1,bfail4))]
24#[cfg(any(bpass1,bpass4))]
2525static STATIC_VISIBILITY: u8 = 0;
2626
27#[cfg(not(any(bfail1,bfail4)))]
28#[rustc_clean(cfg="bfail2")]
29#[rustc_clean(cfg="bfail3")]
30#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
31#[rustc_clean(cfg="bfail6")]
27#[cfg(not(any(bpass1,bpass4)))]
28#[rustc_clean(cfg="bpass2")]
29#[rustc_clean(cfg="bpass3")]
30#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
31#[rustc_clean(cfg="bpass6")]
3232pub static STATIC_VISIBILITY: u8 = 0;
3333
3434
3535// Change static mutability
36#[cfg(any(bfail1,bfail4))]
36#[cfg(any(bpass1,bpass4))]
3737static STATIC_MUTABILITY: u8 = 0;
3838
39#[cfg(not(any(bfail1,bfail4)))]
40#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
41#[rustc_clean(cfg="bfail3")]
42#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
43#[rustc_clean(cfg="bfail6")]
39#[cfg(not(any(bpass1,bpass4)))]
40#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
41#[rustc_clean(cfg="bpass3")]
42#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
43#[rustc_clean(cfg="bpass6")]
4444static mut STATIC_MUTABILITY: u8 = 0;
4545
4646
4747// Add linkage attribute
48#[cfg(any(bfail1,bfail4))]
48#[cfg(any(bpass1,bpass4))]
4949static STATIC_LINKAGE: u8 = 0;
5050
51#[cfg(not(any(bfail1,bfail4)))]
52#[rustc_clean(cfg="bfail2")]
53#[rustc_clean(cfg="bfail3")]
54#[rustc_clean(cfg="bfail5")]
55#[rustc_clean(cfg="bfail6")]
51#[cfg(not(any(bpass1,bpass4)))]
52#[rustc_clean(cfg="bpass2")]
53#[rustc_clean(cfg="bpass3")]
54#[rustc_clean(cfg="bpass5")]
55#[rustc_clean(cfg="bpass6")]
5656#[linkage="weak_odr"]
5757static STATIC_LINKAGE: u8 = 0;
5858
5959
6060// Add no_mangle attribute
61#[cfg(any(bfail1,bfail4))]
61#[cfg(any(bpass1,bpass4))]
6262static STATIC_NO_MANGLE: u8 = 0;
6363
64#[cfg(not(any(bfail1,bfail4)))]
65#[rustc_clean(cfg="bfail2")]
66#[rustc_clean(cfg="bfail3")]
67#[rustc_clean(cfg="bfail5")]
68#[rustc_clean(cfg="bfail6")]
64#[cfg(not(any(bpass1,bpass4)))]
65#[rustc_clean(cfg="bpass2")]
66#[rustc_clean(cfg="bpass3")]
67#[rustc_clean(cfg="bpass5")]
68#[rustc_clean(cfg="bpass6")]
6969#[unsafe(no_mangle)]
7070static STATIC_NO_MANGLE: u8 = 0;
7171
7272
7373// Add thread_local attribute
74#[cfg(any(bfail1,bfail4))]
74#[cfg(any(bpass1,bpass4))]
7575static STATIC_THREAD_LOCAL: u8 = 0;
7676
77#[cfg(not(any(bfail1,bfail4)))]
78#[rustc_clean(cfg="bfail2")]
79#[rustc_clean(cfg="bfail3")]
80#[rustc_clean(cfg="bfail5")]
81#[rustc_clean(cfg="bfail6")]
77#[cfg(not(any(bpass1,bpass4)))]
78#[rustc_clean(cfg="bpass2")]
79#[rustc_clean(cfg="bpass3")]
80#[rustc_clean(cfg="bpass5")]
81#[rustc_clean(cfg="bpass6")]
8282#[thread_local]
8383static STATIC_THREAD_LOCAL: u8 = 0;
8484
8585
8686// Change type from i16 to u64
87#[cfg(any(bfail1,bfail4))]
87#[cfg(any(bpass1,bpass4))]
8888static STATIC_CHANGE_TYPE_1: i16 = 0;
8989
90#[cfg(not(any(bfail1,bfail4)))]
91#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
92#[rustc_clean(cfg="bfail3")]
93#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
94#[rustc_clean(cfg="bfail6")]
90#[cfg(not(any(bpass1,bpass4)))]
91#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
92#[rustc_clean(cfg="bpass3")]
93#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
94#[rustc_clean(cfg="bpass6")]
9595static STATIC_CHANGE_TYPE_1: u64 = 0;
9696
9797
9898// Change type from Option<i8> to Option<u16>
99#[cfg(any(bfail1,bfail4))]
99#[cfg(any(bpass1,bpass4))]
100100static STATIC_CHANGE_TYPE_2: Option<i8> = None;
101101
102#[cfg(not(any(bfail1,bfail4)))]
103#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
104#[rustc_clean(cfg="bfail3")]
105#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
106#[rustc_clean(cfg="bfail6")]
102#[cfg(not(any(bpass1,bpass4)))]
103#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
104#[rustc_clean(cfg="bpass3")]
105#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
106#[rustc_clean(cfg="bpass6")]
107107static STATIC_CHANGE_TYPE_2: Option<u16> = None;
108108
109109
110110// Change value between simple literals
111#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
112#[rustc_clean(cfg="bfail3")]
113#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
114#[rustc_clean(cfg="bfail6")]
111#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
112#[rustc_clean(cfg="bpass3")]
113#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
114#[rustc_clean(cfg="bpass6")]
115115static STATIC_CHANGE_VALUE_1: i16 = {
116 #[cfg(any(bfail1,bfail4))]
116 #[cfg(any(bpass1,bpass4))]
117117 { 1 }
118118
119 #[cfg(not(any(bfail1,bfail4)))]
119 #[cfg(not(any(bpass1,bpass4)))]
120120 { 2 }
121121};
122122
123123
124124// Change value between expressions
125#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
126#[rustc_clean(cfg="bfail3")]
127#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
128#[rustc_clean(cfg="bfail6")]
125#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
126#[rustc_clean(cfg="bpass3")]
127#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
128#[rustc_clean(cfg="bpass6")]
129129static STATIC_CHANGE_VALUE_2: i16 = {
130 #[cfg(any(bfail1,bfail4))]
130 #[cfg(any(bpass1,bpass4))]
131131 { 1 + 1 }
132132
133 #[cfg(not(any(bfail1,bfail4)))]
133 #[cfg(not(any(bpass1,bpass4)))]
134134 { 1 + 2 }
135135};
136136
137#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
138#[rustc_clean(cfg="bfail3")]
139#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
140#[rustc_clean(cfg="bfail6")]
137#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
138#[rustc_clean(cfg="bpass3")]
139#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
140#[rustc_clean(cfg="bpass6")]
141141static STATIC_CHANGE_VALUE_3: i16 = {
142 #[cfg(any(bfail1,bfail4))]
142 #[cfg(any(bpass1,bpass4))]
143143 { 2 + 3 }
144144
145 #[cfg(not(any(bfail1,bfail4)))]
145 #[cfg(not(any(bpass1,bpass4)))]
146146 { 2 * 3 }
147147};
148148
149#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
150#[rustc_clean(cfg="bfail3")]
151#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
152#[rustc_clean(cfg="bfail6")]
149#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
150#[rustc_clean(cfg="bpass3")]
151#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
152#[rustc_clean(cfg="bpass6")]
153153static STATIC_CHANGE_VALUE_4: i16 = {
154 #[cfg(any(bfail1,bfail4))]
154 #[cfg(any(bpass1,bpass4))]
155155 { 1 + 2 * 3 }
156156
157 #[cfg(not(any(bfail1,bfail4)))]
157 #[cfg(not(any(bpass1,bpass4)))]
158158 { 1 + 2 * 4 }
159159};
160160
......@@ -164,21 +164,21 @@ struct ReferencedType1;
164164struct ReferencedType2;
165165
166166mod static_change_type_indirectly {
167 #[cfg(any(bfail1,bfail4))]
167 #[cfg(any(bpass1,bpass4))]
168168 use super::ReferencedType1 as Type;
169169
170 #[cfg(not(any(bfail1,bfail4)))]
170 #[cfg(not(any(bpass1,bpass4)))]
171171 use super::ReferencedType2 as Type;
172172
173 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
174 #[rustc_clean(cfg="bfail3")]
175 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
176 #[rustc_clean(cfg="bfail6")]
173 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
174 #[rustc_clean(cfg="bpass3")]
175 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
176 #[rustc_clean(cfg="bpass6")]
177177 static STATIC_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
178178
179 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,type_of")]
180 #[rustc_clean(cfg="bfail3")]
181 #[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
182 #[rustc_clean(cfg="bfail6")]
179 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,type_of")]
180 #[rustc_clean(cfg="bpass3")]
181 #[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
182 #[rustc_clean(cfg="bpass6")]
183183 static STATIC_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
184184}
tests/incremental/hashes/struct_constructors.rs+59-59
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -25,7 +25,7 @@ pub struct RegularStruct {
2525}
2626
2727// Change field value (regular struct)
28#[cfg(any(bfail1,bfail4))]
28#[cfg(any(bpass1,bpass4))]
2929pub fn change_field_value_regular_struct() -> RegularStruct {
3030 RegularStruct {
3131 x: 0,
......@@ -34,11 +34,11 @@ pub fn change_field_value_regular_struct() -> RegularStruct {
3434 }
3535}
3636
37#[cfg(not(any(bfail1,bfail4)))]
38#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
39#[rustc_clean(cfg="bfail3")]
40#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
41#[rustc_clean(cfg="bfail6")]
37#[cfg(not(any(bpass1,bpass4)))]
38#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
39#[rustc_clean(cfg="bpass3")]
40#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
41#[rustc_clean(cfg="bpass6")]
4242pub fn change_field_value_regular_struct() -> RegularStruct {
4343 RegularStruct {
4444 x: 0,
......@@ -50,7 +50,7 @@ pub fn change_field_value_regular_struct() -> RegularStruct {
5050
5151
5252// Change field order (regular struct)
53#[cfg(any(bfail1,bfail4))]
53#[cfg(any(bpass1,bpass4))]
5454pub fn change_field_order_regular_struct() -> RegularStruct {
5555 RegularStruct {
5656 x: 3,
......@@ -59,11 +59,11 @@ pub fn change_field_order_regular_struct() -> RegularStruct {
5959 }
6060}
6161
62#[cfg(not(any(bfail1,bfail4)))]
63#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
64#[rustc_clean(cfg="bfail3")]
65#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root")]
66#[rustc_clean(cfg="bfail6")]
62#[cfg(not(any(bpass1,bpass4)))]
63#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
64#[rustc_clean(cfg="bpass3")]
65#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root")]
66#[rustc_clean(cfg="bpass6")]
6767pub fn change_field_order_regular_struct() -> RegularStruct {
6868 RegularStruct {
6969 y: 4,
......@@ -75,7 +75,7 @@ pub fn change_field_order_regular_struct() -> RegularStruct {
7575
7676
7777// Add field (regular struct)
78#[cfg(any(bfail1,bfail4))]
78#[cfg(any(bpass1,bpass4))]
7979pub fn add_field_regular_struct() -> RegularStruct {
8080 let struct1 = RegularStruct {
8181 x: 3,
......@@ -90,11 +90,11 @@ pub fn add_field_regular_struct() -> RegularStruct {
9090 }
9191}
9292
93#[cfg(not(any(bfail1,bfail4)))]
94#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
95#[rustc_clean(cfg="bfail3")]
96#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
97#[rustc_clean(cfg="bfail6")]
93#[cfg(not(any(bpass1,bpass4)))]
94#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
95#[rustc_clean(cfg="bpass3")]
96#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
97#[rustc_clean(cfg="bpass6")]
9898pub fn add_field_regular_struct() -> RegularStruct {
9999 let struct1 = RegularStruct {
100100 x: 3,
......@@ -112,7 +112,7 @@ pub fn add_field_regular_struct() -> RegularStruct {
112112
113113
114114// Change field label (regular struct)
115#[cfg(any(bfail1,bfail4))]
115#[cfg(any(bpass1,bpass4))]
116116pub fn change_field_label_regular_struct() -> RegularStruct {
117117 let struct1 = RegularStruct {
118118 x: 3,
......@@ -127,11 +127,11 @@ pub fn change_field_label_regular_struct() -> RegularStruct {
127127 }
128128}
129129
130#[cfg(not(any(bfail1,bfail4)))]
131#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
132#[rustc_clean(cfg="bfail3")]
133#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
134#[rustc_clean(cfg="bfail6")]
130#[cfg(not(any(bpass1,bpass4)))]
131#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
132#[rustc_clean(cfg="bpass3")]
133#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir,typeck_root")]
134#[rustc_clean(cfg="bpass6")]
135135pub fn change_field_label_regular_struct() -> RegularStruct {
136136 let struct1 = RegularStruct {
137137 x: 3,
......@@ -155,7 +155,7 @@ pub struct RegularStruct2 {
155155}
156156
157157// Change constructor path (regular struct)
158#[cfg(any(bfail1,bfail4))]
158#[cfg(any(bpass1,bpass4))]
159159pub fn change_constructor_path_regular_struct() {
160160 let _ = RegularStruct {
161161 x: 0,
......@@ -164,11 +164,11 @@ pub fn change_constructor_path_regular_struct() {
164164 };
165165}
166166
167#[cfg(not(any(bfail1,bfail4)))]
168#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
169#[rustc_clean(cfg="bfail3")]
170#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root")]
171#[rustc_clean(cfg="bfail6")]
167#[cfg(not(any(bpass1,bpass4)))]
168#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
169#[rustc_clean(cfg="bpass3")]
170#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root")]
171#[rustc_clean(cfg="bpass6")]
172172pub fn change_constructor_path_regular_struct() {
173173 let _ = RegularStruct2 {
174174 x: 0,
......@@ -181,15 +181,15 @@ pub fn change_constructor_path_regular_struct() {
181181
182182// Change constructor path indirectly (regular struct)
183183pub mod change_constructor_path_indirectly_regular_struct {
184 #[cfg(any(bfail1,bfail4))]
184 #[cfg(any(bpass1,bpass4))]
185185 use super::RegularStruct as Struct;
186 #[cfg(not(any(bfail1,bfail4)))]
186 #[cfg(not(any(bpass1,bpass4)))]
187187 use super::RegularStruct2 as Struct;
188188
189 #[rustc_clean(cfg="bfail2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
190 #[rustc_clean(cfg="bfail3")]
191 #[rustc_clean(cfg="bfail5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
192 #[rustc_clean(cfg="bfail6")]
189 #[rustc_clean(cfg="bpass2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
190 #[rustc_clean(cfg="bpass3")]
191 #[rustc_clean(cfg="bpass5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
192 #[rustc_clean(cfg="bpass6")]
193193 pub fn function() -> Struct {
194194 Struct {
195195 x: 0,
......@@ -204,16 +204,16 @@ pub mod change_constructor_path_indirectly_regular_struct {
204204pub struct TupleStruct(i32, i64, i16);
205205
206206// Change field value (tuple struct)
207#[cfg(any(bfail1,bfail4))]
207#[cfg(any(bpass1,bpass4))]
208208pub fn change_field_value_tuple_struct() -> TupleStruct {
209209 TupleStruct(0, 1, 2)
210210}
211211
212#[cfg(not(any(bfail1,bfail4)))]
213#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
214#[rustc_clean(cfg="bfail3")]
215#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
216#[rustc_clean(cfg="bfail6")]
212#[cfg(not(any(bpass1,bpass4)))]
213#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
214#[rustc_clean(cfg="bpass3")]
215#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
216#[rustc_clean(cfg="bpass6")]
217217pub fn change_field_value_tuple_struct() -> TupleStruct {
218218 TupleStruct(0, 1, 3)
219219}
......@@ -223,16 +223,16 @@ pub fn change_field_value_tuple_struct() -> TupleStruct {
223223pub struct TupleStruct2(u16, u16, u16);
224224
225225// Change constructor path (tuple struct)
226#[cfg(any(bfail1,bfail4))]
226#[cfg(any(bpass1,bpass4))]
227227pub fn change_constructor_path_tuple_struct() {
228228 let _ = TupleStruct (0, 1, 2);
229229}
230230
231#[cfg(not(any(bfail1,bfail4)))]
232#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,typeck_root")]
233#[rustc_clean(cfg="bfail3")]
234#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,typeck_root")]
235#[rustc_clean(cfg="bfail6")]
231#[cfg(not(any(bpass1,bpass4)))]
232#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,typeck_root")]
233#[rustc_clean(cfg="bpass3")]
234#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,typeck_root")]
235#[rustc_clean(cfg="bpass6")]
236236pub fn change_constructor_path_tuple_struct() {
237237 let _ = TupleStruct2(0, 1, 2);
238238}
......@@ -241,15 +241,15 @@ pub fn change_constructor_path_tuple_struct() {
241241
242242// Change constructor path indirectly (tuple struct)
243243pub mod change_constructor_path_indirectly_tuple_struct {
244 #[cfg(any(bfail1,bfail4))]
244 #[cfg(any(bpass1,bpass4))]
245245 use super::TupleStruct as Struct;
246 #[cfg(not(any(bfail1,bfail4)))]
246 #[cfg(not(any(bpass1,bpass4)))]
247247 use super::TupleStruct2 as Struct;
248248
249 #[rustc_clean(cfg="bfail5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
250 #[rustc_clean(cfg="bfail6")]
251 #[rustc_clean(cfg="bfail2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
252 #[rustc_clean(cfg="bfail3")]
249 #[rustc_clean(cfg="bpass5", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
250 #[rustc_clean(cfg="bpass6")]
251 #[rustc_clean(cfg="bpass2", except="fn_sig,opt_hir_owner_nodes,optimized_mir,typeck_root")]
252 #[rustc_clean(cfg="bpass3")]
253253 pub fn function() -> Struct {
254254 Struct(0, 1, 2)
255255 }
tests/incremental/hashes/struct_defs.rs+129-129
......@@ -10,52 +10,52 @@
1010// results in a change of the ICH for the struct's metadata, and that it stays
1111// the same between rev2 and rev3.
1212
13//@ build-pass (FIXME(62277): could be check-pass?)
14//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
13//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
1514//@ compile-flags: -Z query-dep-graph -O
16//@ [bfail1]compile-flags: -Zincremental-ignore-spans
17//@ [bfail2]compile-flags: -Zincremental-ignore-spans
18//@ [bfail3]compile-flags: -Zincremental-ignore-spans
15//@ [bpass1]compile-flags: -Zincremental-ignore-spans
16//@ [bpass2]compile-flags: -Zincremental-ignore-spans
17//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1918//@ ignore-backends: gcc
19// FIXME(#62277): could be check-pass?
2020
2121#![allow(warnings)]
2222#![feature(rustc_attrs)]
2323#![crate_type="rlib"]
2424
2525// Layout ----------------------------------------------------------------------
26#[cfg(any(bfail1,bfail4))]
26#[cfg(any(bpass1,bpass4))]
2727pub struct LayoutPacked;
2828
29#[cfg(not(any(bfail1,bfail4)))]
30#[rustc_clean(except="type_of", cfg="bfail2")]
31#[rustc_clean(cfg="bfail3")]
32#[rustc_clean(except="type_of", cfg="bfail5")]
33#[rustc_clean(cfg="bfail6")]
29#[cfg(not(any(bpass1,bpass4)))]
30#[rustc_clean(except="type_of", cfg="bpass2")]
31#[rustc_clean(cfg="bpass3")]
32#[rustc_clean(except="type_of", cfg="bpass5")]
33#[rustc_clean(cfg="bpass6")]
3434#[repr(packed)]
3535pub struct LayoutPacked;
3636
37#[cfg(any(bfail1,bfail4))]
37#[cfg(any(bpass1,bpass4))]
3838struct LayoutC;
3939
40#[cfg(not(any(bfail1,bfail4)))]
41#[rustc_clean(except="type_of", cfg="bfail2")]
42#[rustc_clean(cfg="bfail3")]
43#[rustc_clean(except="type_of", cfg="bfail5")]
44#[rustc_clean(cfg="bfail6")]
40#[cfg(not(any(bpass1,bpass4)))]
41#[rustc_clean(except="type_of", cfg="bpass2")]
42#[rustc_clean(cfg="bpass3")]
43#[rustc_clean(except="type_of", cfg="bpass5")]
44#[rustc_clean(cfg="bpass6")]
4545#[repr(C)]
4646struct LayoutC;
4747
4848
4949// Tuple Struct Change Field Type ----------------------------------------------
5050
51#[cfg(any(bfail1,bfail4))]
51#[cfg(any(bpass1,bpass4))]
5252struct TupleStructFieldType(i32);
5353
54#[cfg(not(any(bfail1,bfail4)))]
55#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
56#[rustc_clean(cfg="bfail3")]
57#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
58#[rustc_clean(cfg="bfail6")]
54#[cfg(not(any(bpass1,bpass4)))]
55#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
56#[rustc_clean(cfg="bpass3")]
57#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
58#[rustc_clean(cfg="bpass6")]
5959// Note that changing the type of a field does not change the type of the struct or enum, but
6060// adding/removing fields or changing a fields name or visibility does.
6161struct TupleStructFieldType(
......@@ -65,14 +65,14 @@ struct TupleStructFieldType(
6565
6666// Tuple Struct Add Field ------------------------------------------------------
6767
68#[cfg(any(bfail1,bfail4))]
68#[cfg(any(bpass1,bpass4))]
6969struct TupleStructAddField(i32);
7070
71#[cfg(not(any(bfail1,bfail4)))]
72#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail2")]
73#[rustc_clean(cfg="bfail3")]
74#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail5")]
75#[rustc_clean(cfg="bfail6")]
71#[cfg(not(any(bpass1,bpass4)))]
72#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass2")]
73#[rustc_clean(cfg="bpass3")]
74#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass5")]
75#[rustc_clean(cfg="bpass6")]
7676struct TupleStructAddField(
7777 i32,
7878 u32
......@@ -81,27 +81,27 @@ struct TupleStructAddField(
8181
8282// Tuple Struct Field Visibility -----------------------------------------------
8383
84#[cfg(any(bfail1,bfail4))]
84#[cfg(any(bpass1,bpass4))]
8585struct TupleStructFieldVisibility( char);
8686
87#[cfg(not(any(bfail1,bfail4)))]
88#[rustc_clean(cfg="bfail2", except="type_of")]
89#[rustc_clean(cfg="bfail3")]
90#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
91#[rustc_clean(cfg="bfail6")]
87#[cfg(not(any(bpass1,bpass4)))]
88#[rustc_clean(cfg="bpass2", except="type_of")]
89#[rustc_clean(cfg="bpass3")]
90#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
91#[rustc_clean(cfg="bpass6")]
9292struct TupleStructFieldVisibility(pub char);
9393
9494
9595// Record Struct Field Type ----------------------------------------------------
9696
97#[cfg(any(bfail1,bfail4))]
97#[cfg(any(bpass1,bpass4))]
9898struct RecordStructFieldType { x: f32 }
9999
100#[cfg(not(any(bfail1,bfail4)))]
101#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
102#[rustc_clean(cfg="bfail3")]
103#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
104#[rustc_clean(cfg="bfail6")]
100#[cfg(not(any(bpass1,bpass4)))]
101#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
102#[rustc_clean(cfg="bpass3")]
103#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
104#[rustc_clean(cfg="bpass6")]
105105// Note that changing the type of a field does not change the type of the struct or enum, but
106106// adding/removing fields or changing a fields name or visibility does.
107107struct RecordStructFieldType {
......@@ -111,27 +111,27 @@ struct RecordStructFieldType {
111111
112112// Record Struct Field Name ----------------------------------------------------
113113
114#[cfg(any(bfail1,bfail4))]
114#[cfg(any(bpass1,bpass4))]
115115struct RecordStructFieldName { x: f32 }
116116
117#[cfg(not(any(bfail1,bfail4)))]
118#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail2")]
119#[rustc_clean(cfg="bfail3")]
120#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail5")]
121#[rustc_clean(cfg="bfail6")]
117#[cfg(not(any(bpass1,bpass4)))]
118#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass2")]
119#[rustc_clean(cfg="bpass3")]
120#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass5")]
121#[rustc_clean(cfg="bpass6")]
122122struct RecordStructFieldName { y: f32 }
123123
124124
125125// Record Struct Add Field -----------------------------------------------------
126126
127#[cfg(any(bfail1,bfail4))]
127#[cfg(any(bpass1,bpass4))]
128128struct RecordStructAddField { x: f32 }
129129
130#[cfg(not(any(bfail1,bfail4)))]
131#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail2")]
132#[rustc_clean(cfg="bfail3")]
133#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail5")]
134#[rustc_clean(cfg="bfail6")]
130#[cfg(not(any(bpass1,bpass4)))]
131#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass2")]
132#[rustc_clean(cfg="bpass3")]
133#[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass5")]
134#[rustc_clean(cfg="bpass6")]
135135struct RecordStructAddField {
136136 x: f32,
137137 y: () }
......@@ -139,53 +139,53 @@ struct RecordStructAddField {
139139
140140// Record Struct Field Visibility ----------------------------------------------
141141
142#[cfg(any(bfail1,bfail4))]
142#[cfg(any(bpass1,bpass4))]
143143struct RecordStructFieldVisibility { x: f32 }
144144
145#[cfg(not(any(bfail1,bfail4)))]
146#[rustc_clean(cfg="bfail2", except="type_of")]
147#[rustc_clean(cfg="bfail3")]
148#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,type_of")]
149#[rustc_clean(cfg="bfail6")]
145#[cfg(not(any(bpass1,bpass4)))]
146#[rustc_clean(cfg="bpass2", except="type_of")]
147#[rustc_clean(cfg="bpass3")]
148#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,type_of")]
149#[rustc_clean(cfg="bpass6")]
150150struct RecordStructFieldVisibility { pub x: f32 }
151151
152152
153153// Add Lifetime Parameter ------------------------------------------------------
154154
155#[cfg(any(bfail1,bfail4))]
155#[cfg(any(bpass1,bpass4))]
156156struct AddLifetimeParameter<'a>(&'a f32, &'a f64);
157157
158#[cfg(not(any(bfail1,bfail4)))]
159#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of", cfg="bfail2")]
160#[rustc_clean(cfg="bfail3")]
161#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of", cfg="bfail5")]
162#[rustc_clean(cfg="bfail6")]
158#[cfg(not(any(bpass1,bpass4)))]
159#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of", cfg="bpass2")]
160#[rustc_clean(cfg="bpass3")]
161#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of", cfg="bpass5")]
162#[rustc_clean(cfg="bpass6")]
163163struct AddLifetimeParameter<'a, 'b>(&'a f32, &'b f64);
164164
165165
166166// Add Lifetime Parameter Bound ------------------------------------------------
167167
168#[cfg(any(bfail1,bfail4))]
168#[cfg(any(bpass1,bpass4))]
169169struct AddLifetimeParameterBound<'a, 'b>(&'a f32, &'b f64);
170170
171#[cfg(not(any(bfail1,bfail4)))]
172#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
173#[rustc_clean(cfg="bfail3")]
174#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
175#[rustc_clean(cfg="bfail6")]
171#[cfg(not(any(bpass1,bpass4)))]
172#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
173#[rustc_clean(cfg="bpass3")]
174#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
175#[rustc_clean(cfg="bpass6")]
176176struct AddLifetimeParameterBound<'a, 'b: 'a>(
177177 &'a f32,
178178 &'b f64
179179);
180180
181#[cfg(any(bfail1,bfail4))]
181#[cfg(any(bpass1,bpass4))]
182182struct AddLifetimeParameterBoundWhereClause<'a, 'b>(&'a f32, &'b f64);
183183
184#[cfg(not(any(bfail1,bfail4)))]
185#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
186#[rustc_clean(cfg="bfail3")]
187#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
188#[rustc_clean(cfg="bfail6")]
184#[cfg(not(any(bpass1,bpass4)))]
185#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
186#[rustc_clean(cfg="bpass3")]
187#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
188#[rustc_clean(cfg="bpass6")]
189189struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
190190 &'a f32,
191191 &'b f64)
......@@ -194,14 +194,14 @@ struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
194194
195195// Add Type Parameter ----------------------------------------------------------
196196
197#[cfg(any(bfail1,bfail4))]
197#[cfg(any(bpass1,bpass4))]
198198struct AddTypeParameter<T1>(T1, T1);
199199
200#[cfg(not(any(bfail1,bfail4)))]
201#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of,predicates_of", cfg="bfail2")]
202#[rustc_clean(cfg="bfail3")]
203#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of,predicates_of", cfg="bfail5")]
204#[rustc_clean(cfg="bfail6")]
200#[cfg(not(any(bpass1,bpass4)))]
201#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of,predicates_of", cfg="bpass2")]
202#[rustc_clean(cfg="bpass3")]
203#[rustc_clean(except="opt_hir_owner_nodes,type_of,generics_of,predicates_of", cfg="bpass5")]
204#[rustc_clean(cfg="bpass6")]
205205struct AddTypeParameter<T1, T2>(
206206 // The field contains the parent's Generics, so it's dirty even though its
207207 // type hasn't changed.
......@@ -212,27 +212,27 @@ struct AddTypeParameter<T1, T2>(
212212
213213// Add Type Parameter Bound ----------------------------------------------------
214214
215#[cfg(any(bfail1,bfail4))]
215#[cfg(any(bpass1,bpass4))]
216216struct AddTypeParameterBound<T>(T);
217217
218#[cfg(not(any(bfail1,bfail4)))]
219#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
220#[rustc_clean(cfg="bfail3")]
221#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
222#[rustc_clean(cfg="bfail6")]
218#[cfg(not(any(bpass1,bpass4)))]
219#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
220#[rustc_clean(cfg="bpass3")]
221#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
222#[rustc_clean(cfg="bpass6")]
223223struct AddTypeParameterBound<T: Send>(
224224 T
225225);
226226
227227
228#[cfg(any(bfail1,bfail4))]
228#[cfg(any(bpass1,bpass4))]
229229struct AddTypeParameterBoundWhereClause<T>(T);
230230
231#[cfg(not(any(bfail1,bfail4)))]
232#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
233#[rustc_clean(cfg="bfail3")]
234#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
235#[rustc_clean(cfg="bfail6")]
231#[cfg(not(any(bpass1,bpass4)))]
232#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
233#[rustc_clean(cfg="bpass3")]
234#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
235#[rustc_clean(cfg="bpass6")]
236236struct AddTypeParameterBoundWhereClause<T>(
237237 T
238238) where T: Sync;
......@@ -243,23 +243,23 @@ struct AddTypeParameterBoundWhereClause<T>(
243243// fingerprint is stable (i.e., that there are no random influences like memory
244244// addresses taken into account by the hashing algorithm).
245245// Note: there is no #[cfg(...)], so this is ALWAYS compiled
246#[rustc_clean(cfg="bfail2")]
247#[rustc_clean(cfg="bfail3")]
248#[rustc_clean(cfg="bfail5")]
249#[rustc_clean(cfg="bfail6")]
246#[rustc_clean(cfg="bpass2")]
247#[rustc_clean(cfg="bpass3")]
248#[rustc_clean(cfg="bpass5")]
249#[rustc_clean(cfg="bpass6")]
250250pub struct EmptyStruct;
251251
252252
253253// Visibility ------------------------------------------------------------------
254254
255#[cfg(any(bfail1,bfail4))]
255#[cfg(any(bpass1,bpass4))]
256256struct Visibility;
257257
258#[cfg(not(any(bfail1,bfail4)))]
259#[rustc_clean(cfg="bfail2")]
260#[rustc_clean(cfg="bfail3")]
261#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
262#[rustc_clean(cfg="bfail6")]
258#[cfg(not(any(bpass1,bpass4)))]
259#[rustc_clean(cfg="bpass2")]
260#[rustc_clean(cfg="bpass3")]
261#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
262#[rustc_clean(cfg="bpass6")]
263263pub struct Visibility;
264264
265265struct ReferencedType1;
......@@ -267,15 +267,15 @@ struct ReferencedType2;
267267
268268// Tuple Struct Change Field Type Indirectly -----------------------------------
269269mod tuple_struct_change_field_type_indirectly {
270 #[cfg(any(bfail1,bfail4))]
270 #[cfg(any(bpass1,bpass4))]
271271 use super::ReferencedType1 as FieldType;
272 #[cfg(not(any(bfail1,bfail4)))]
272 #[cfg(not(any(bpass1,bpass4)))]
273273 use super::ReferencedType2 as FieldType;
274274
275 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
276 #[rustc_clean(cfg="bfail3")]
277 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
278 #[rustc_clean(cfg="bfail6")]
275 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
276 #[rustc_clean(cfg="bpass3")]
277 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
278 #[rustc_clean(cfg="bpass6")]
279279 struct TupleStruct(
280280 FieldType
281281 );
......@@ -284,15 +284,15 @@ mod tuple_struct_change_field_type_indirectly {
284284
285285// Record Struct Change Field Type Indirectly -----------------------------------
286286mod record_struct_change_field_type_indirectly {
287 #[cfg(any(bfail1,bfail4))]
287 #[cfg(any(bpass1,bpass4))]
288288 use super::ReferencedType1 as FieldType;
289 #[cfg(not(any(bfail1,bfail4)))]
289 #[cfg(not(any(bpass1,bpass4)))]
290290 use super::ReferencedType2 as FieldType;
291291
292 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
293 #[rustc_clean(cfg="bfail3")]
294 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
295 #[rustc_clean(cfg="bfail6")]
292 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
293 #[rustc_clean(cfg="bpass3")]
294 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
295 #[rustc_clean(cfg="bpass6")]
296296 struct RecordStruct {
297297 _x: FieldType
298298 }
......@@ -306,28 +306,28 @@ trait ReferencedTrait2 {}
306306
307307// Change Trait Bound Indirectly -----------------------------------------------
308308mod change_trait_bound_indirectly {
309 #[cfg(any(bfail1,bfail4))]
309 #[cfg(any(bpass1,bpass4))]
310310 use super::ReferencedTrait1 as Trait;
311 #[cfg(not(any(bfail1,bfail4)))]
311 #[cfg(not(any(bpass1,bpass4)))]
312312 use super::ReferencedTrait2 as Trait;
313313
314 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
315 #[rustc_clean(cfg="bfail3")]
316 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
317 #[rustc_clean(cfg="bfail6")]
314 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
315 #[rustc_clean(cfg="bpass3")]
316 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
317 #[rustc_clean(cfg="bpass6")]
318318 struct Struct<T: Trait>(T);
319319}
320320
321321// Change Trait Bound Indirectly In Where Clause -------------------------------
322322mod change_trait_bound_indirectly_in_where_clause {
323 #[cfg(any(bfail1,bfail4))]
323 #[cfg(any(bpass1,bpass4))]
324324 use super::ReferencedTrait1 as Trait;
325 #[cfg(not(any(bfail1,bfail4)))]
325 #[cfg(not(any(bpass1,bpass4)))]
326326 use super::ReferencedTrait2 as Trait;
327327
328 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
329 #[rustc_clean(cfg="bfail3")]
330 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
331 #[rustc_clean(cfg="bfail6")]
328 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
329 #[rustc_clean(cfg="bpass3")]
330 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
331 #[rustc_clean(cfg="bpass6")]
332332 struct Struct<T>(T) where T : Trait;
333333}
tests/incremental/hashes/trait_defs.rs+561-561
......@@ -10,13 +10,13 @@
1010// results in a change of the ICH for the trait's metadata, and that it stays
1111// the same between rev2 and rev3.
1212
13//@ build-pass (FIXME(62277): could be check-pass?)
14//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
13//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
1514//@ compile-flags: -Z query-dep-graph -O
16//@ [bfail1]compile-flags: -Zincremental-ignore-spans
17//@ [bfail2]compile-flags: -Zincremental-ignore-spans
18//@ [bfail3]compile-flags: -Zincremental-ignore-spans
15//@ [bpass1]compile-flags: -Zincremental-ignore-spans
16//@ [bpass2]compile-flags: -Zincremental-ignore-spans
17//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1918//@ ignore-backends: gcc
19// FIXME(#62277): could be check-pass?
2020
2121#![allow(warnings)]
2222#![feature(rustc_attrs)]
......@@ -25,41 +25,41 @@
2525
2626
2727// Change trait visibility
28#[cfg(any(bfail1,bfail4))]
28#[cfg(any(bpass1,bpass4))]
2929trait TraitVisibility { }
3030
31#[cfg(not(any(bfail1,bfail4)))]
32#[rustc_clean(cfg="bfail2")]
33#[rustc_clean(cfg="bfail3")]
34#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,predicates_of")]
35#[rustc_clean(cfg="bfail6")]
31#[cfg(not(any(bpass1,bpass4)))]
32#[rustc_clean(cfg="bpass2")]
33#[rustc_clean(cfg="bpass3")]
34#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,predicates_of")]
35#[rustc_clean(cfg="bpass6")]
3636pub trait TraitVisibility { }
3737
3838
3939
4040// Change trait unsafety
41#[cfg(any(bfail1,bfail4))]
41#[cfg(any(bpass1,bpass4))]
4242trait TraitUnsafety { }
4343
44#[cfg(not(any(bfail1,bfail4)))]
45#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
46#[rustc_clean(cfg="bfail3")]
47#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
48#[rustc_clean(cfg="bfail6")]
44#[cfg(not(any(bpass1,bpass4)))]
45#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
46#[rustc_clean(cfg="bpass3")]
47#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
48#[rustc_clean(cfg="bpass6")]
4949unsafe trait TraitUnsafety { }
5050
5151
5252
5353// Add method
54#[cfg(any(bfail1,bfail4))]
54#[cfg(any(bpass1,bpass4))]
5555trait TraitAddMethod {
5656}
5757
58#[cfg(not(any(bfail1,bfail4)))]
59#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
60#[rustc_clean(cfg="bfail3")]
61#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bfail5")]
62#[rustc_clean(cfg="bfail6")]
58#[cfg(not(any(bpass1,bpass4)))]
59#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
60#[rustc_clean(cfg="bpass3")]
61#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bpass5")]
62#[rustc_clean(cfg="bpass6")]
6363pub trait TraitAddMethod {
6464 fn method();
6565}
......@@ -67,16 +67,16 @@ pub trait TraitAddMethod {
6767
6868
6969// Change name of method
70#[cfg(any(bfail1,bfail4))]
70#[cfg(any(bpass1,bpass4))]
7171trait TraitChangeMethodName {
7272 fn method();
7373}
7474
75#[cfg(not(any(bfail1,bfail4)))]
76#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
77#[rustc_clean(cfg="bfail3")]
78#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bfail5")]
79#[rustc_clean(cfg="bfail6")]
75#[cfg(not(any(bpass1,bpass4)))]
76#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
77#[rustc_clean(cfg="bpass3")]
78#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bpass5")]
79#[rustc_clean(cfg="bpass6")]
8080trait TraitChangeMethodName {
8181 fn methodChanged();
8282}
......@@ -84,7 +84,7 @@ trait TraitChangeMethodName {
8484
8585
8686// Add return type to method
87#[cfg(any(bfail1,bfail4))]
87#[cfg(any(bpass1,bpass4))]
8888trait TraitAddReturnType {
8989 //---------------------------------------------------------------
9090 //--------------------------
......@@ -93,23 +93,23 @@ trait TraitAddReturnType {
9393 fn method() ;
9494}
9595
96#[cfg(not(any(bfail1,bfail4)))]
97#[rustc_clean(cfg="bfail2")]
98#[rustc_clean(cfg="bfail3")]
99#[rustc_clean(cfg="bfail5")]
100#[rustc_clean(cfg="bfail6")]
96#[cfg(not(any(bpass1,bpass4)))]
97#[rustc_clean(cfg="bpass2")]
98#[rustc_clean(cfg="bpass3")]
99#[rustc_clean(cfg="bpass5")]
100#[rustc_clean(cfg="bpass6")]
101101trait TraitAddReturnType {
102 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
103 #[rustc_clean(cfg="bfail3")]
104 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
105 #[rustc_clean(cfg="bfail6")]
102 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
103 #[rustc_clean(cfg="bpass3")]
104 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
105 #[rustc_clean(cfg="bpass6")]
106106 fn method() -> u32;
107107}
108108
109109
110110
111111// Change return type of method
112#[cfg(any(bfail1,bfail4))]
112#[cfg(any(bpass1,bpass4))]
113113trait TraitChangeReturnType {
114114 // --------------------------------------------------------------
115115 // -------------------------
......@@ -118,23 +118,23 @@ trait TraitChangeReturnType {
118118 fn method() -> u32;
119119}
120120
121#[cfg(not(any(bfail1,bfail4)))]
122#[rustc_clean(cfg="bfail2")]
123#[rustc_clean(cfg="bfail3")]
124#[rustc_clean(cfg="bfail5")]
125#[rustc_clean(cfg="bfail6")]
121#[cfg(not(any(bpass1,bpass4)))]
122#[rustc_clean(cfg="bpass2")]
123#[rustc_clean(cfg="bpass3")]
124#[rustc_clean(cfg="bpass5")]
125#[rustc_clean(cfg="bpass6")]
126126trait TraitChangeReturnType {
127 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
128 #[rustc_clean(cfg="bfail3")]
129 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
130 #[rustc_clean(cfg="bfail6")]
127 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
128 #[rustc_clean(cfg="bpass3")]
129 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
130 #[rustc_clean(cfg="bpass6")]
131131 fn method() -> u64;
132132}
133133
134134
135135
136136// Add parameter to method
137#[cfg(any(bfail1,bfail4))]
137#[cfg(any(bpass1,bpass4))]
138138trait TraitAddParameterToMethod {
139139 // --------------------------------------------------------------
140140 // -------------------------
......@@ -143,23 +143,23 @@ trait TraitAddParameterToMethod {
143143 fn method( );
144144}
145145
146#[cfg(not(any(bfail1,bfail4)))]
147#[rustc_clean(cfg="bfail2")]
148#[rustc_clean(cfg="bfail3")]
149#[rustc_clean(cfg="bfail5")]
150#[rustc_clean(cfg="bfail6")]
146#[cfg(not(any(bpass1,bpass4)))]
147#[rustc_clean(cfg="bpass2")]
148#[rustc_clean(cfg="bpass3")]
149#[rustc_clean(cfg="bpass5")]
150#[rustc_clean(cfg="bpass6")]
151151trait TraitAddParameterToMethod {
152 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
153 #[rustc_clean(cfg="bfail3")]
154 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
155 #[rustc_clean(cfg="bfail6")]
152 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
153 #[rustc_clean(cfg="bpass3")]
154 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
155 #[rustc_clean(cfg="bpass6")]
156156 fn method(a: u32);
157157}
158158
159159
160160
161161// Change name of method parameter
162#[cfg(any(bfail1,bfail4))]
162#[cfg(any(bpass1,bpass4))]
163163trait TraitChangeMethodParameterName {
164164 //------------------------------------------------------
165165 //--------------------------------------------------------
......@@ -175,30 +175,30 @@ trait TraitChangeMethodParameterName {
175175 fn with_default(x: i32) {}
176176}
177177
178#[cfg(not(any(bfail1,bfail4)))]
179#[rustc_clean(cfg="bfail2")]
180#[rustc_clean(cfg="bfail3")]
181#[rustc_clean(cfg="bfail5")]
182#[rustc_clean(cfg="bfail6")]
178#[cfg(not(any(bpass1,bpass4)))]
179#[rustc_clean(cfg="bpass2")]
180#[rustc_clean(cfg="bpass3")]
181#[rustc_clean(cfg="bpass5")]
182#[rustc_clean(cfg="bpass6")]
183183trait TraitChangeMethodParameterName {
184184 // FIXME(#38501) This should preferably always be clean.
185 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
186 #[rustc_clean(cfg="bfail3")]
187 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
188 #[rustc_clean(cfg="bfail6")]
185 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
186 #[rustc_clean(cfg="bpass3")]
187 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
188 #[rustc_clean(cfg="bpass6")]
189189 fn method(b: u32);
190190
191 #[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
192 #[rustc_clean(cfg="bfail3")]
193 #[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
194 #[rustc_clean(cfg="bfail6")]
191 #[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
192 #[rustc_clean(cfg="bpass3")]
193 #[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
194 #[rustc_clean(cfg="bpass6")]
195195 fn with_default(y: i32) {}
196196}
197197
198198
199199
200200// Change type of method parameter (i32 => i64)
201#[cfg(any(bfail1,bfail4))]
201#[cfg(any(bpass1,bpass4))]
202202trait TraitChangeMethodParameterType {
203203 // --------------------------------------------------------------
204204 // -------------------------
......@@ -207,23 +207,23 @@ trait TraitChangeMethodParameterType {
207207 fn method(a: i32);
208208}
209209
210#[cfg(not(any(bfail1,bfail4)))]
211#[rustc_clean(cfg="bfail2")]
212#[rustc_clean(cfg="bfail3")]
213#[rustc_clean(cfg="bfail5")]
214#[rustc_clean(cfg="bfail6")]
210#[cfg(not(any(bpass1,bpass4)))]
211#[rustc_clean(cfg="bpass2")]
212#[rustc_clean(cfg="bpass3")]
213#[rustc_clean(cfg="bpass5")]
214#[rustc_clean(cfg="bpass6")]
215215trait TraitChangeMethodParameterType {
216 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
217 #[rustc_clean(cfg="bfail3")]
218 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
219 #[rustc_clean(cfg="bfail6")]
216 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
217 #[rustc_clean(cfg="bpass3")]
218 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
219 #[rustc_clean(cfg="bpass6")]
220220 fn method(a: i64);
221221}
222222
223223
224224
225225// Change type of method parameter (&i32 => &mut i32)
226#[cfg(any(bfail1,bfail4))]
226#[cfg(any(bpass1,bpass4))]
227227trait TraitChangeMethodParameterTypeRef {
228228 // --------------------------------------------------------------
229229 // -------------------------
......@@ -232,23 +232,23 @@ trait TraitChangeMethodParameterTypeRef {
232232 fn method(a: & i32);
233233}
234234
235#[cfg(not(any(bfail1,bfail4)))]
236#[rustc_clean(cfg="bfail2")]
237#[rustc_clean(cfg="bfail3")]
238#[rustc_clean(cfg="bfail5")]
239#[rustc_clean(cfg="bfail6")]
235#[cfg(not(any(bpass1,bpass4)))]
236#[rustc_clean(cfg="bpass2")]
237#[rustc_clean(cfg="bpass3")]
238#[rustc_clean(cfg="bpass5")]
239#[rustc_clean(cfg="bpass6")]
240240trait TraitChangeMethodParameterTypeRef {
241 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
242 #[rustc_clean(cfg="bfail3")]
243 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
244 #[rustc_clean(cfg="bfail6")]
241 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
242 #[rustc_clean(cfg="bpass3")]
243 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
244 #[rustc_clean(cfg="bpass6")]
245245 fn method(a: &mut i32);
246246}
247247
248248
249249
250250// Change order of method parameters
251#[cfg(any(bfail1,bfail4))]
251#[cfg(any(bpass1,bpass4))]
252252trait TraitChangeMethodParametersOrder {
253253 // --------------------------------------------------------------
254254 // -------------------------
......@@ -257,23 +257,23 @@ trait TraitChangeMethodParametersOrder {
257257 fn method(a: i32, b: i64);
258258}
259259
260#[cfg(not(any(bfail1,bfail4)))]
261#[rustc_clean(cfg="bfail2")]
262#[rustc_clean(cfg="bfail3")]
263#[rustc_clean(cfg="bfail5")]
264#[rustc_clean(cfg="bfail6")]
260#[cfg(not(any(bpass1,bpass4)))]
261#[rustc_clean(cfg="bpass2")]
262#[rustc_clean(cfg="bpass3")]
263#[rustc_clean(cfg="bpass5")]
264#[rustc_clean(cfg="bpass6")]
265265trait TraitChangeMethodParametersOrder {
266 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
267 #[rustc_clean(cfg="bfail3")]
268 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
269 #[rustc_clean(cfg="bfail6")]
266 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
267 #[rustc_clean(cfg="bpass3")]
268 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
269 #[rustc_clean(cfg="bpass6")]
270270 fn method(b: i64, a: i32);
271271}
272272
273273
274274
275275// Add default implementation to method
276#[cfg(any(bfail1,bfail4))]
276#[cfg(any(bpass1,bpass4))]
277277trait TraitAddMethodAutoImplementation {
278278 // -------------------------------------------------------
279279 // -------------------------
......@@ -282,33 +282,33 @@ trait TraitAddMethodAutoImplementation {
282282 fn method() ;
283283}
284284
285#[cfg(not(any(bfail1,bfail4)))]
286#[rustc_clean(cfg="bfail2")]
287#[rustc_clean(cfg="bfail3")]
288#[rustc_clean(cfg="bfail5")]
289#[rustc_clean(cfg="bfail6")]
285#[cfg(not(any(bpass1,bpass4)))]
286#[rustc_clean(cfg="bpass2")]
287#[rustc_clean(cfg="bpass3")]
288#[rustc_clean(cfg="bpass5")]
289#[rustc_clean(cfg="bpass6")]
290290trait TraitAddMethodAutoImplementation {
291 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
292 #[rustc_clean(cfg="bfail3")]
293 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
294 #[rustc_clean(cfg="bfail6")]
291 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
292 #[rustc_clean(cfg="bpass3")]
293 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
294 #[rustc_clean(cfg="bpass6")]
295295 fn method() {}
296296}
297297
298298
299299
300300// Change order of methods
301#[cfg(any(bfail1,bfail4))]
301#[cfg(any(bpass1,bpass4))]
302302trait TraitChangeOrderOfMethods {
303303 fn method0();
304304 fn method1();
305305}
306306
307#[cfg(not(any(bfail1,bfail4)))]
308#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
309#[rustc_clean(cfg="bfail3")]
310#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail5")]
311#[rustc_clean(cfg="bfail6")]
307#[cfg(not(any(bpass1,bpass4)))]
308#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
309#[rustc_clean(cfg="bpass3")]
310#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass5")]
311#[rustc_clean(cfg="bpass6")]
312312trait TraitChangeOrderOfMethods {
313313 fn method1();
314314 fn method0();
......@@ -317,7 +317,7 @@ trait TraitChangeOrderOfMethods {
317317
318318
319319// Change mode of self parameter
320#[cfg(any(bfail1,bfail4))]
320#[cfg(any(bpass1,bpass4))]
321321trait TraitChangeModeSelfRefToMut {
322322 // --------------------------------------------------------------
323323 // -------------------------
......@@ -326,22 +326,22 @@ trait TraitChangeModeSelfRefToMut {
326326 fn method(& self);
327327}
328328
329#[cfg(not(any(bfail1,bfail4)))]
330#[rustc_clean(cfg="bfail2")]
331#[rustc_clean(cfg="bfail3")]
332#[rustc_clean(cfg="bfail5")]
333#[rustc_clean(cfg="bfail6")]
329#[cfg(not(any(bpass1,bpass4)))]
330#[rustc_clean(cfg="bpass2")]
331#[rustc_clean(cfg="bpass3")]
332#[rustc_clean(cfg="bpass5")]
333#[rustc_clean(cfg="bpass6")]
334334trait TraitChangeModeSelfRefToMut {
335 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
336 #[rustc_clean(cfg="bfail3")]
337 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
338 #[rustc_clean(cfg="bfail6")]
335 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
336 #[rustc_clean(cfg="bpass3")]
337 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
338 #[rustc_clean(cfg="bpass6")]
339339 fn method(&mut self);
340340}
341341
342342
343343
344#[cfg(any(bfail1,bfail4))]
344#[cfg(any(bpass1,bpass4))]
345345trait TraitChangeModeSelfOwnToMut: Sized {
346346 // ----------------------------------------------------------------------------
347347 // -------------------------
......@@ -350,22 +350,22 @@ trait TraitChangeModeSelfOwnToMut: Sized {
350350 fn method( self) {}
351351}
352352
353#[cfg(not(any(bfail1,bfail4)))]
354#[rustc_clean(cfg="bfail2")]
355#[rustc_clean(cfg="bfail3")]
356#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
357#[rustc_clean(cfg="bfail6")]
353#[cfg(not(any(bpass1,bpass4)))]
354#[rustc_clean(cfg="bpass2")]
355#[rustc_clean(cfg="bpass3")]
356#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
357#[rustc_clean(cfg="bpass6")]
358358trait TraitChangeModeSelfOwnToMut: Sized {
359 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bfail2")]
360 #[rustc_clean(cfg="bfail3")]
361 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bfail5")]
362 #[rustc_clean(cfg="bfail6")]
359 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bpass2")]
360 #[rustc_clean(cfg="bpass3")]
361 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bpass5")]
362 #[rustc_clean(cfg="bpass6")]
363363 fn method(mut self) {}
364364}
365365
366366
367367
368#[cfg(any(bfail1,bfail4))]
368#[cfg(any(bpass1,bpass4))]
369369trait TraitChangeModeSelfOwnToRef {
370370 // --------------------------------------------------------------------------
371371 // -------------------------
......@@ -374,23 +374,23 @@ trait TraitChangeModeSelfOwnToRef {
374374 fn method( self);
375375}
376376
377#[cfg(not(any(bfail1,bfail4)))]
378#[rustc_clean(cfg="bfail2")]
379#[rustc_clean(cfg="bfail3")]
380#[rustc_clean(cfg="bfail5")]
381#[rustc_clean(cfg="bfail6")]
377#[cfg(not(any(bpass1,bpass4)))]
378#[rustc_clean(cfg="bpass2")]
379#[rustc_clean(cfg="bpass3")]
380#[rustc_clean(cfg="bpass5")]
381#[rustc_clean(cfg="bpass6")]
382382trait TraitChangeModeSelfOwnToRef {
383 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bfail2")]
384 #[rustc_clean(cfg="bfail3")]
385 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bfail5")]
386 #[rustc_clean(cfg="bfail6")]
383 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bpass2")]
384 #[rustc_clean(cfg="bpass3")]
385 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bpass5")]
386 #[rustc_clean(cfg="bpass6")]
387387 fn method(&self);
388388}
389389
390390
391391
392392// Add unsafe modifier to method
393#[cfg(any(bfail1,bfail4))]
393#[cfg(any(bpass1,bpass4))]
394394trait TraitAddUnsafeModifier {
395395 // --------------------------------------------------------------
396396 // -------------------------
......@@ -399,23 +399,23 @@ trait TraitAddUnsafeModifier {
399399 fn method();
400400}
401401
402#[cfg(not(any(bfail1,bfail4)))]
403#[rustc_clean(cfg="bfail2")]
404#[rustc_clean(cfg="bfail3")]
405#[rustc_clean(cfg="bfail5")]
406#[rustc_clean(cfg="bfail6")]
402#[cfg(not(any(bpass1,bpass4)))]
403#[rustc_clean(cfg="bpass2")]
404#[rustc_clean(cfg="bpass3")]
405#[rustc_clean(cfg="bpass5")]
406#[rustc_clean(cfg="bpass6")]
407407trait TraitAddUnsafeModifier {
408 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
409 #[rustc_clean(cfg="bfail3")]
410 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
411 #[rustc_clean(cfg="bfail6")]
408 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
409 #[rustc_clean(cfg="bpass3")]
410 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
411 #[rustc_clean(cfg="bpass6")]
412412 unsafe fn method();
413413}
414414
415415
416416
417417// Add extern modifier to method
418#[cfg(any(bfail1,bfail4))]
418#[cfg(any(bpass1,bpass4))]
419419trait TraitAddExternModifier {
420420 // --------------------------------------------------------------
421421 // -------------------------
......@@ -424,23 +424,23 @@ trait TraitAddExternModifier {
424424 fn method();
425425}
426426
427#[cfg(not(any(bfail1,bfail4)))]
428#[rustc_clean(cfg="bfail2")]
429#[rustc_clean(cfg="bfail3")]
430#[rustc_clean(cfg="bfail5")]
431#[rustc_clean(cfg="bfail6")]
427#[cfg(not(any(bpass1,bpass4)))]
428#[rustc_clean(cfg="bpass2")]
429#[rustc_clean(cfg="bpass3")]
430#[rustc_clean(cfg="bpass5")]
431#[rustc_clean(cfg="bpass6")]
432432trait TraitAddExternModifier {
433 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
434 #[rustc_clean(cfg="bfail3")]
435 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
436 #[rustc_clean(cfg="bfail6")]
433 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
434 #[rustc_clean(cfg="bpass3")]
435 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
436 #[rustc_clean(cfg="bpass6")]
437437 extern "C" fn method();
438438}
439439
440440
441441
442442// Change extern "C" to extern "stdcall"
443#[cfg(any(bfail1,bfail4))]
443#[cfg(any(bpass1,bpass4))]
444444trait TraitChangeExternCToExternSystem {
445445 // --------------------------------------------------------------
446446 // -------------------------
......@@ -449,23 +449,23 @@ trait TraitChangeExternCToExternSystem {
449449 extern "C" fn method();
450450}
451451
452#[cfg(not(any(bfail1,bfail4)))]
453#[rustc_clean(cfg="bfail2")]
454#[rustc_clean(cfg="bfail3")]
455#[rustc_clean(cfg="bfail5")]
456#[rustc_clean(cfg="bfail6")]
452#[cfg(not(any(bpass1,bpass4)))]
453#[rustc_clean(cfg="bpass2")]
454#[rustc_clean(cfg="bpass3")]
455#[rustc_clean(cfg="bpass5")]
456#[rustc_clean(cfg="bpass6")]
457457trait TraitChangeExternCToRustIntrinsic {
458 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
459 #[rustc_clean(cfg="bfail3")]
460 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
461 #[rustc_clean(cfg="bfail6")]
458 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
459 #[rustc_clean(cfg="bpass3")]
460 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
461 #[rustc_clean(cfg="bpass6")]
462462 extern "system" fn method();
463463}
464464
465465
466466
467467// Add type parameter to method
468#[cfg(any(bfail1,bfail4))]
468#[cfg(any(bpass1,bpass4))]
469469trait TraitAddTypeParameterToMethod {
470470 // --------------------------------------------------------------------------
471471 // ---------------
......@@ -476,25 +476,25 @@ trait TraitAddTypeParameterToMethod {
476476 fn method ();
477477}
478478
479#[cfg(not(any(bfail1,bfail4)))]
480#[rustc_clean(cfg="bfail2")]
481#[rustc_clean(cfg="bfail3")]
482#[rustc_clean(cfg="bfail5")]
483#[rustc_clean(cfg="bfail6")]
479#[cfg(not(any(bpass1,bpass4)))]
480#[rustc_clean(cfg="bpass2")]
481#[rustc_clean(cfg="bpass3")]
482#[rustc_clean(cfg="bpass5")]
483#[rustc_clean(cfg="bpass6")]
484484trait TraitAddTypeParameterToMethod {
485485 #[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of,type_of",
486 cfg="bfail2")]
487 #[rustc_clean(cfg="bfail3")]
486 cfg="bpass2")]
487 #[rustc_clean(cfg="bpass3")]
488488 #[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of,type_of",
489 cfg="bfail5")]
490 #[rustc_clean(cfg="bfail6")]
489 cfg="bpass5")]
490 #[rustc_clean(cfg="bpass6")]
491491 fn method<T>();
492492}
493493
494494
495495
496496// Add lifetime parameter to method
497#[cfg(any(bfail1,bfail4))]
497#[cfg(any(bpass1,bpass4))]
498498trait TraitAddLifetimeParameterToMethod {
499499 // --------------------------------------------------------------------------
500500 // -------------------------
......@@ -503,16 +503,16 @@ trait TraitAddLifetimeParameterToMethod {
503503 fn method ();
504504}
505505
506#[cfg(not(any(bfail1,bfail4)))]
507#[rustc_clean(cfg="bfail2")]
508#[rustc_clean(cfg="bfail3")]
509#[rustc_clean(cfg="bfail5")]
510#[rustc_clean(cfg="bfail6")]
506#[cfg(not(any(bpass1,bpass4)))]
507#[rustc_clean(cfg="bpass2")]
508#[rustc_clean(cfg="bpass3")]
509#[rustc_clean(cfg="bpass5")]
510#[rustc_clean(cfg="bpass6")]
511511trait TraitAddLifetimeParameterToMethod {
512 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bfail2")]
513 #[rustc_clean(cfg="bfail3")]
514 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bfail5")]
515 #[rustc_clean(cfg="bfail6")]
512 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bpass2")]
513 #[rustc_clean(cfg="bpass3")]
514 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,generics_of", cfg="bpass5")]
515 #[rustc_clean(cfg="bpass6")]
516516 fn method<'a>();
517517}
518518
......@@ -523,7 +523,7 @@ trait ReferencedTrait0 { }
523523trait ReferencedTrait1 { }
524524
525525// Add trait bound to method type parameter
526#[cfg(any(bfail1,bfail4))]
526#[cfg(any(bpass1,bpass4))]
527527trait TraitAddTraitBoundToMethodTypeParameter {
528528 // ---------------------------------------------------------------------
529529 // -------------------------
......@@ -532,23 +532,23 @@ trait TraitAddTraitBoundToMethodTypeParameter {
532532 fn method<T >();
533533}
534534
535#[cfg(not(any(bfail1,bfail4)))]
536#[rustc_clean(cfg="bfail2")]
537#[rustc_clean(cfg="bfail3")]
538#[rustc_clean(cfg="bfail5")]
539#[rustc_clean(cfg="bfail6")]
535#[cfg(not(any(bpass1,bpass4)))]
536#[rustc_clean(cfg="bpass2")]
537#[rustc_clean(cfg="bpass3")]
538#[rustc_clean(cfg="bpass5")]
539#[rustc_clean(cfg="bpass6")]
540540trait TraitAddTraitBoundToMethodTypeParameter {
541 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
542 #[rustc_clean(cfg="bfail3")]
543 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
544 #[rustc_clean(cfg="bfail6")]
541 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
542 #[rustc_clean(cfg="bpass3")]
543 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
544 #[rustc_clean(cfg="bpass6")]
545545 fn method<T: ReferencedTrait0>();
546546}
547547
548548
549549
550550// Add builtin bound to method type parameter
551#[cfg(any(bfail1,bfail4))]
551#[cfg(any(bpass1,bpass4))]
552552trait TraitAddBuiltinBoundToMethodTypeParameter {
553553 // ---------------------------------------------------------------------
554554 // -------------------------
......@@ -557,23 +557,23 @@ trait TraitAddBuiltinBoundToMethodTypeParameter {
557557 fn method<T >();
558558}
559559
560#[cfg(not(any(bfail1,bfail4)))]
561#[rustc_clean(cfg="bfail2")]
562#[rustc_clean(cfg="bfail3")]
563#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
564#[rustc_clean(cfg="bfail6")]
560#[cfg(not(any(bpass1,bpass4)))]
561#[rustc_clean(cfg="bpass2")]
562#[rustc_clean(cfg="bpass3")]
563#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
564#[rustc_clean(cfg="bpass6")]
565565trait TraitAddBuiltinBoundToMethodTypeParameter {
566 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
567 #[rustc_clean(cfg="bfail3")]
568 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
569 #[rustc_clean(cfg="bfail6")]
566 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
567 #[rustc_clean(cfg="bpass3")]
568 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
569 #[rustc_clean(cfg="bpass6")]
570570 fn method<T: Sized>();
571571}
572572
573573
574574
575575// Add lifetime bound to method lifetime parameter
576#[cfg(any(bfail1,bfail4))]
576#[cfg(any(bpass1,bpass4))]
577577trait TraitAddLifetimeBoundToMethodLifetimeParameter {
578578 // -----------
579579 // -----------------------------------------------------------------------
......@@ -588,29 +588,29 @@ trait TraitAddLifetimeBoundToMethodLifetimeParameter {
588588 fn method<'a, 'b >(a: &'a u32, b: &'b u32);
589589}
590590
591#[cfg(not(any(bfail1,bfail4)))]
592#[rustc_clean(cfg="bfail2")]
593#[rustc_clean(cfg="bfail3")]
594#[rustc_clean(cfg="bfail5")]
595#[rustc_clean(cfg="bfail6")]
591#[cfg(not(any(bpass1,bpass4)))]
592#[rustc_clean(cfg="bpass2")]
593#[rustc_clean(cfg="bpass3")]
594#[rustc_clean(cfg="bpass5")]
595#[rustc_clean(cfg="bpass6")]
596596trait TraitAddLifetimeBoundToMethodLifetimeParameter {
597597 #[rustc_clean(
598598 except="opt_hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
599 cfg="bfail2",
599 cfg="bpass2",
600600 )]
601 #[rustc_clean(cfg="bfail3")]
601 #[rustc_clean(cfg="bpass3")]
602602 #[rustc_clean(
603603 except="opt_hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
604 cfg="bfail5",
604 cfg="bpass5",
605605 )]
606 #[rustc_clean(cfg="bfail6")]
606 #[rustc_clean(cfg="bpass6")]
607607 fn method<'a, 'b: 'a>(a: &'a u32, b: &'b u32);
608608}
609609
610610
611611
612612// Add second trait bound to method type parameter
613#[cfg(any(bfail1,bfail4))]
613#[cfg(any(bpass1,bpass4))]
614614trait TraitAddSecondTraitBoundToMethodTypeParameter {
615615 // ---------------------------------------------------------------------
616616 // -------------------------
......@@ -619,23 +619,23 @@ trait TraitAddSecondTraitBoundToMethodTypeParameter {
619619 fn method<T: ReferencedTrait0 >();
620620}
621621
622#[cfg(not(any(bfail1,bfail4)))]
623#[rustc_clean(cfg="bfail2")]
624#[rustc_clean(cfg="bfail3")]
625#[rustc_clean(cfg="bfail5")]
626#[rustc_clean(cfg="bfail6")]
622#[cfg(not(any(bpass1,bpass4)))]
623#[rustc_clean(cfg="bpass2")]
624#[rustc_clean(cfg="bpass3")]
625#[rustc_clean(cfg="bpass5")]
626#[rustc_clean(cfg="bpass6")]
627627trait TraitAddSecondTraitBoundToMethodTypeParameter {
628 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
629 #[rustc_clean(cfg="bfail3")]
630 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
631 #[rustc_clean(cfg="bfail6")]
628 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
629 #[rustc_clean(cfg="bpass3")]
630 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
631 #[rustc_clean(cfg="bpass6")]
632632 fn method<T: ReferencedTrait0 + ReferencedTrait1>();
633633}
634634
635635
636636
637637// Add second builtin bound to method type parameter
638#[cfg(any(bfail1,bfail4))]
638#[cfg(any(bpass1,bpass4))]
639639trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
640640 // ---------------------------------------------------------------------
641641 // -------------------------
......@@ -644,23 +644,23 @@ trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
644644 fn method<T: Sized >();
645645}
646646
647#[cfg(not(any(bfail1,bfail4)))]
648#[rustc_clean(cfg="bfail2")]
649#[rustc_clean(cfg="bfail3")]
650#[rustc_clean(cfg="bfail5")]
651#[rustc_clean(cfg="bfail6")]
647#[cfg(not(any(bpass1,bpass4)))]
648#[rustc_clean(cfg="bpass2")]
649#[rustc_clean(cfg="bpass3")]
650#[rustc_clean(cfg="bpass5")]
651#[rustc_clean(cfg="bpass6")]
652652trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
653 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
654 #[rustc_clean(cfg="bfail3")]
655 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
656 #[rustc_clean(cfg="bfail6")]
653 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
654 #[rustc_clean(cfg="bpass3")]
655 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
656 #[rustc_clean(cfg="bpass6")]
657657 fn method<T: Sized + Sync>();
658658}
659659
660660
661661
662662// Add second lifetime bound to method lifetime parameter
663#[cfg(any(bfail1,bfail4))]
663#[cfg(any(bpass1,bpass4))]
664664trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
665665 // -----------
666666 // -----------------------------------------------------------------------
......@@ -675,29 +675,29 @@ trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
675675 fn method<'a, 'b, 'c: 'a >(a: &'a u32, b: &'b u32, c: &'c u32);
676676}
677677
678#[cfg(not(any(bfail1,bfail4)))]
679#[rustc_clean(cfg="bfail2")]
680#[rustc_clean(cfg="bfail3")]
681#[rustc_clean(cfg="bfail5")]
682#[rustc_clean(cfg="bfail6")]
678#[cfg(not(any(bpass1,bpass4)))]
679#[rustc_clean(cfg="bpass2")]
680#[rustc_clean(cfg="bpass3")]
681#[rustc_clean(cfg="bpass5")]
682#[rustc_clean(cfg="bpass6")]
683683trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
684684 #[rustc_clean(
685685 except="opt_hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
686 cfg="bfail2",
686 cfg="bpass2",
687687 )]
688 #[rustc_clean(cfg="bfail3")]
688 #[rustc_clean(cfg="bpass3")]
689689 #[rustc_clean(
690690 except="opt_hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
691 cfg="bfail5",
691 cfg="bpass5",
692692 )]
693 #[rustc_clean(cfg="bfail6")]
693 #[rustc_clean(cfg="bpass6")]
694694 fn method<'a, 'b, 'c: 'a + 'b>(a: &'a u32, b: &'b u32, c: &'c u32);
695695}
696696
697697
698698
699699// Add associated type
700#[cfg(any(bfail1,bfail4))]
700#[cfg(any(bpass1,bpass4))]
701701trait TraitAddAssociatedType {
702702 //--------------------------
703703 //--------------------------
......@@ -710,27 +710,27 @@ trait TraitAddAssociatedType {
710710 fn method();
711711}
712712
713#[cfg(not(any(bfail1,bfail4)))]
714#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
715#[rustc_clean(cfg="bfail3")]
716#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail5")]
717#[rustc_clean(cfg="bfail6")]
713#[cfg(not(any(bpass1,bpass4)))]
714#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
715#[rustc_clean(cfg="bpass3")]
716#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass5")]
717#[rustc_clean(cfg="bpass6")]
718718trait TraitAddAssociatedType {
719 #[rustc_clean(cfg="bfail3")]
720 #[rustc_clean(cfg="bfail6")]
719 #[rustc_clean(cfg="bpass3")]
720 #[rustc_clean(cfg="bpass6")]
721721 type Associated;
722722
723 #[rustc_clean(cfg="bfail2")]
724 #[rustc_clean(cfg="bfail3")]
725 #[rustc_clean(cfg="bfail5")]
726 #[rustc_clean(cfg="bfail6")]
723 #[rustc_clean(cfg="bpass2")]
724 #[rustc_clean(cfg="bpass3")]
725 #[rustc_clean(cfg="bpass5")]
726 #[rustc_clean(cfg="bpass6")]
727727 fn method();
728728}
729729
730730
731731
732732// Add trait bound to associated type
733#[cfg(any(bfail1,bfail4))]
733#[cfg(any(bpass1,bpass4))]
734734trait TraitAddTraitBoundToAssociatedType {
735735 // -------------------------------------------------------
736736 // -------------------------
......@@ -744,16 +744,16 @@ trait TraitAddTraitBoundToAssociatedType {
744744
745745// Apparently the type bound contributes to the predicates of the trait, but
746746// does not change the associated item itself.
747#[cfg(not(any(bfail1,bfail4)))]
748#[rustc_clean(cfg="bfail2")]
749#[rustc_clean(cfg="bfail3")]
750#[rustc_clean(cfg="bfail5")]
751#[rustc_clean(cfg="bfail6")]
747#[cfg(not(any(bpass1,bpass4)))]
748#[rustc_clean(cfg="bpass2")]
749#[rustc_clean(cfg="bpass3")]
750#[rustc_clean(cfg="bpass5")]
751#[rustc_clean(cfg="bpass6")]
752752trait TraitAddTraitBoundToAssociatedType {
753 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
754 #[rustc_clean(cfg="bfail3")]
755 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
756 #[rustc_clean(cfg="bfail6")]
753 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
754 #[rustc_clean(cfg="bpass3")]
755 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
756 #[rustc_clean(cfg="bpass6")]
757757 type Associated: ReferencedTrait0;
758758
759759 fn method();
......@@ -762,7 +762,7 @@ trait TraitAddTraitBoundToAssociatedType {
762762
763763
764764// Add lifetime bound to associated type
765#[cfg(any(bfail1,bfail4))]
765#[cfg(any(bpass1,bpass4))]
766766trait TraitAddLifetimeBoundToAssociatedType<'a> {
767767 // -------------------------------------------------------
768768 // -------------------------
......@@ -773,16 +773,16 @@ trait TraitAddLifetimeBoundToAssociatedType<'a> {
773773 fn method();
774774}
775775
776#[cfg(not(any(bfail1,bfail4)))]
777#[rustc_clean(cfg="bfail2")]
778#[rustc_clean(cfg="bfail3")]
779#[rustc_clean(cfg="bfail5")]
780#[rustc_clean(cfg="bfail6")]
776#[cfg(not(any(bpass1,bpass4)))]
777#[rustc_clean(cfg="bpass2")]
778#[rustc_clean(cfg="bpass3")]
779#[rustc_clean(cfg="bpass5")]
780#[rustc_clean(cfg="bpass6")]
781781trait TraitAddLifetimeBoundToAssociatedType<'a> {
782 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
783 #[rustc_clean(cfg="bfail3")]
784 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
785 #[rustc_clean(cfg="bfail6")]
782 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
783 #[rustc_clean(cfg="bpass3")]
784 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
785 #[rustc_clean(cfg="bpass6")]
786786 type Associated: 'a;
787787
788788 fn method();
......@@ -791,7 +791,7 @@ trait TraitAddLifetimeBoundToAssociatedType<'a> {
791791
792792
793793// Add default to associated type
794#[cfg(any(bfail1,bfail4))]
794#[cfg(any(bpass1,bpass4))]
795795trait TraitAddDefaultToAssociatedType {
796796 //--------------------------------------------------------
797797 //--------------------------
......@@ -802,16 +802,16 @@ trait TraitAddDefaultToAssociatedType {
802802 fn method();
803803}
804804
805#[cfg(not(any(bfail1,bfail4)))]
806#[rustc_clean(cfg="bfail2")]
807#[rustc_clean(cfg="bfail3")]
808#[rustc_clean(cfg="bfail5")]
809#[rustc_clean(cfg="bfail6")]
805#[cfg(not(any(bpass1,bpass4)))]
806#[rustc_clean(cfg="bpass2")]
807#[rustc_clean(cfg="bpass3")]
808#[rustc_clean(cfg="bpass5")]
809#[rustc_clean(cfg="bpass6")]
810810trait TraitAddDefaultToAssociatedType {
811 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
812 #[rustc_clean(cfg="bfail3")]
813 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
814 #[rustc_clean(cfg="bfail6")]
811 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
812 #[rustc_clean(cfg="bpass3")]
813 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
814 #[rustc_clean(cfg="bpass6")]
815815 type Associated = ReferenceType0;
816816
817817 fn method();
......@@ -820,16 +820,16 @@ trait TraitAddDefaultToAssociatedType {
820820
821821
822822// Add associated constant
823#[cfg(any(bfail1,bfail4))]
823#[cfg(any(bpass1,bpass4))]
824824trait TraitAddAssociatedConstant {
825825 fn method();
826826}
827827
828#[cfg(not(any(bfail1,bfail4)))]
829#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
830#[rustc_clean(cfg="bfail3")]
831#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bfail5")]
832#[rustc_clean(cfg="bfail6")]
828#[cfg(not(any(bpass1,bpass4)))]
829#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
830#[rustc_clean(cfg="bpass3")]
831#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bpass5")]
832#[rustc_clean(cfg="bpass6")]
833833trait TraitAddAssociatedConstant {
834834 const Value: u32;
835835
......@@ -839,7 +839,7 @@ trait TraitAddAssociatedConstant {
839839
840840
841841// Add initializer to associated constant
842#[cfg(any(bfail1,bfail4))]
842#[cfg(any(bpass1,bpass4))]
843843trait TraitAddInitializerToAssociatedConstant {
844844 //--------------------------------------------------------
845845 //--------------------------
......@@ -854,29 +854,29 @@ trait TraitAddInitializerToAssociatedConstant {
854854 fn method();
855855}
856856
857#[cfg(not(any(bfail1,bfail4)))]
858#[rustc_clean(cfg="bfail2")]
859#[rustc_clean(cfg="bfail3")]
860#[rustc_clean(cfg="bfail5")]
861#[rustc_clean(cfg="bfail6")]
857#[cfg(not(any(bpass1,bpass4)))]
858#[rustc_clean(cfg="bpass2")]
859#[rustc_clean(cfg="bpass3")]
860#[rustc_clean(cfg="bpass5")]
861#[rustc_clean(cfg="bpass6")]
862862trait TraitAddInitializerToAssociatedConstant {
863 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
864 #[rustc_clean(cfg="bfail3")]
865 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
866 #[rustc_clean(cfg="bfail6")]
863 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
864 #[rustc_clean(cfg="bpass3")]
865 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
866 #[rustc_clean(cfg="bpass6")]
867867 const Value: u32 = 1;
868868
869 #[rustc_clean(cfg="bfail2")]
870 #[rustc_clean(cfg="bfail3")]
871 #[rustc_clean(cfg="bfail5")]
872 #[rustc_clean(cfg="bfail6")]
869 #[rustc_clean(cfg="bpass2")]
870 #[rustc_clean(cfg="bpass3")]
871 #[rustc_clean(cfg="bpass5")]
872 #[rustc_clean(cfg="bpass6")]
873873 fn method();
874874}
875875
876876
877877
878878// Change type of associated constant
879#[cfg(any(bfail1,bfail4))]
879#[cfg(any(bpass1,bpass4))]
880880trait TraitChangeTypeOfAssociatedConstant {
881881 // ---------------------------------------------------------------
882882 // -------------------------
......@@ -891,287 +891,287 @@ trait TraitChangeTypeOfAssociatedConstant {
891891 fn method();
892892}
893893
894#[cfg(not(any(bfail1,bfail4)))]
895#[rustc_clean(cfg="bfail2")]
896#[rustc_clean(cfg="bfail3")]
897#[rustc_clean(cfg="bfail5")]
898#[rustc_clean(cfg="bfail6")]
894#[cfg(not(any(bpass1,bpass4)))]
895#[rustc_clean(cfg="bpass2")]
896#[rustc_clean(cfg="bpass3")]
897#[rustc_clean(cfg="bpass5")]
898#[rustc_clean(cfg="bpass6")]
899899trait TraitChangeTypeOfAssociatedConstant {
900 #[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail2")]
901 #[rustc_clean(cfg="bfail3")]
902 #[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bfail5")]
903 #[rustc_clean(cfg="bfail6")]
900 #[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass2")]
901 #[rustc_clean(cfg="bpass3")]
902 #[rustc_clean(except="opt_hir_owner_nodes,type_of", cfg="bpass5")]
903 #[rustc_clean(cfg="bpass6")]
904904 const Value: f64;
905905
906 #[rustc_clean(cfg="bfail2")]
907 #[rustc_clean(cfg="bfail3")]
908 #[rustc_clean(cfg="bfail5")]
909 #[rustc_clean(cfg="bfail6")]
906 #[rustc_clean(cfg="bpass2")]
907 #[rustc_clean(cfg="bpass3")]
908 #[rustc_clean(cfg="bpass5")]
909 #[rustc_clean(cfg="bpass6")]
910910 fn method();
911911}
912912
913913
914914
915915// Add super trait
916#[cfg(any(bfail1,bfail4))]
916#[cfg(any(bpass1,bpass4))]
917917trait TraitAddSuperTrait { }
918918
919#[cfg(not(any(bfail1,bfail4)))]
920#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
921#[rustc_clean(cfg="bfail3")]
922#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
923#[rustc_clean(cfg="bfail6")]
919#[cfg(not(any(bpass1,bpass4)))]
920#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
921#[rustc_clean(cfg="bpass3")]
922#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
923#[rustc_clean(cfg="bpass6")]
924924trait TraitAddSuperTrait : ReferencedTrait0 { }
925925
926926
927927
928928// Add builtin bound (Send or Copy)
929#[cfg(any(bfail1,bfail4))]
929#[cfg(any(bpass1,bpass4))]
930930trait TraitAddBuiltiBound { }
931931
932#[cfg(not(any(bfail1,bfail4)))]
933#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
934#[rustc_clean(cfg="bfail3")]
935#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
936#[rustc_clean(cfg="bfail6")]
932#[cfg(not(any(bpass1,bpass4)))]
933#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
934#[rustc_clean(cfg="bpass3")]
935#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
936#[rustc_clean(cfg="bpass6")]
937937trait TraitAddBuiltiBound : Send { }
938938
939939
940940
941941// Add 'static lifetime bound to trait
942#[cfg(any(bfail1,bfail4))]
942#[cfg(any(bpass1,bpass4))]
943943trait TraitAddStaticLifetimeBound { }
944944
945#[cfg(not(any(bfail1,bfail4)))]
946#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
947#[rustc_clean(cfg="bfail3")]
948#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
949#[rustc_clean(cfg="bfail6")]
945#[cfg(not(any(bpass1,bpass4)))]
946#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
947#[rustc_clean(cfg="bpass3")]
948#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
949#[rustc_clean(cfg="bpass6")]
950950trait TraitAddStaticLifetimeBound : 'static { }
951951
952952
953953
954954// Add super trait as second bound
955#[cfg(any(bfail1,bfail4))]
955#[cfg(any(bpass1,bpass4))]
956956trait TraitAddTraitAsSecondBound : ReferencedTrait0 { }
957957
958#[cfg(not(any(bfail1,bfail4)))]
959#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
960#[rustc_clean(cfg="bfail3")]
961#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
962#[rustc_clean(cfg="bfail6")]
958#[cfg(not(any(bpass1,bpass4)))]
959#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
960#[rustc_clean(cfg="bpass3")]
961#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
962#[rustc_clean(cfg="bpass6")]
963963trait TraitAddTraitAsSecondBound : ReferencedTrait0 + ReferencedTrait1 { }
964964
965#[cfg(any(bfail1,bfail4))]
965#[cfg(any(bpass1,bpass4))]
966966trait TraitAddTraitAsSecondBoundFromBuiltin : Send { }
967967
968#[cfg(not(any(bfail1,bfail4)))]
969#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
970#[rustc_clean(cfg="bfail3")]
971#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
972#[rustc_clean(cfg="bfail6")]
968#[cfg(not(any(bpass1,bpass4)))]
969#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
970#[rustc_clean(cfg="bpass3")]
971#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
972#[rustc_clean(cfg="bpass6")]
973973trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { }
974974
975975
976976
977977// Add builtin bound as second bound
978#[cfg(any(bfail1,bfail4))]
978#[cfg(any(bpass1,bpass4))]
979979trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 { }
980980
981#[cfg(not(any(bfail1,bfail4)))]
982#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
983#[rustc_clean(cfg="bfail3")]
984#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
985#[rustc_clean(cfg="bfail6")]
981#[cfg(not(any(bpass1,bpass4)))]
982#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
983#[rustc_clean(cfg="bpass3")]
984#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
985#[rustc_clean(cfg="bpass6")]
986986trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 + Send { }
987987
988#[cfg(any(bfail1,bfail4))]
988#[cfg(any(bpass1,bpass4))]
989989trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin : Send { }
990990
991#[cfg(not(any(bfail1,bfail4)))]
992#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
993#[rustc_clean(cfg="bfail3")]
994#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
995#[rustc_clean(cfg="bfail6")]
991#[cfg(not(any(bpass1,bpass4)))]
992#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
993#[rustc_clean(cfg="bpass3")]
994#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
995#[rustc_clean(cfg="bpass6")]
996996trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { }
997997
998998
999999
10001000// Add 'static bounds as second bound
1001#[cfg(any(bfail1,bfail4))]
1001#[cfg(any(bpass1,bpass4))]
10021002trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 { }
10031003
1004#[cfg(not(any(bfail1,bfail4)))]
1005#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1006#[rustc_clean(cfg="bfail3")]
1007#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1008#[rustc_clean(cfg="bfail6")]
1004#[cfg(not(any(bpass1,bpass4)))]
1005#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1006#[rustc_clean(cfg="bpass3")]
1007#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1008#[rustc_clean(cfg="bpass6")]
10091009trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 + 'static { }
10101010
1011#[cfg(any(bfail1,bfail4))]
1011#[cfg(any(bpass1,bpass4))]
10121012trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send { }
10131013
1014#[cfg(not(any(bfail1,bfail4)))]
1015#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1016#[rustc_clean(cfg="bfail3")]
1017#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1018#[rustc_clean(cfg="bfail6")]
1014#[cfg(not(any(bpass1,bpass4)))]
1015#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1016#[rustc_clean(cfg="bpass3")]
1017#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1018#[rustc_clean(cfg="bpass6")]
10191019trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { }
10201020
10211021
10221022
10231023// Add type parameter to trait
1024#[cfg(any(bfail1,bfail4))]
1024#[cfg(any(bpass1,bpass4))]
10251025trait TraitAddTypeParameterToTrait { }
10261026
1027#[cfg(not(any(bfail1,bfail4)))]
1028#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail2")]
1029#[rustc_clean(cfg="bfail3")]
1030#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail5")]
1031#[rustc_clean(cfg="bfail6")]
1027#[cfg(not(any(bpass1,bpass4)))]
1028#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass2")]
1029#[rustc_clean(cfg="bpass3")]
1030#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass5")]
1031#[rustc_clean(cfg="bpass6")]
10321032trait TraitAddTypeParameterToTrait<T> { }
10331033
10341034
10351035
10361036// Add lifetime parameter to trait
1037#[cfg(any(bfail1,bfail4))]
1037#[cfg(any(bpass1,bpass4))]
10381038trait TraitAddLifetimeParameterToTrait { }
10391039
1040#[cfg(not(any(bfail1,bfail4)))]
1041#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail2")]
1042#[rustc_clean(cfg="bfail3")]
1043#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail5")]
1044#[rustc_clean(cfg="bfail6")]
1040#[cfg(not(any(bpass1,bpass4)))]
1041#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass2")]
1042#[rustc_clean(cfg="bpass3")]
1043#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass5")]
1044#[rustc_clean(cfg="bpass6")]
10451045trait TraitAddLifetimeParameterToTrait<'a> { }
10461046
10471047
10481048
10491049// Add trait bound to type parameter of trait
1050#[cfg(any(bfail1,bfail4))]
1050#[cfg(any(bpass1,bpass4))]
10511051trait TraitAddTraitBoundToTypeParameterOfTrait<T> { }
10521052
1053#[cfg(not(any(bfail1,bfail4)))]
1054#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1055#[rustc_clean(cfg="bfail3")]
1056#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1057#[rustc_clean(cfg="bfail6")]
1053#[cfg(not(any(bpass1,bpass4)))]
1054#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1055#[rustc_clean(cfg="bpass3")]
1056#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1057#[rustc_clean(cfg="bpass6")]
10581058trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
10591059
10601060
10611061
10621062// Add lifetime bound to type parameter of trait
1063#[cfg(any(bfail1,bfail4))]
1063#[cfg(any(bpass1,bpass4))]
10641064trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T> { }
10651065
1066#[cfg(not(any(bfail1,bfail4)))]
1067#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1068#[rustc_clean(cfg="bfail3")]
1069#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1070#[rustc_clean(cfg="bfail6")]
1066#[cfg(not(any(bpass1,bpass4)))]
1067#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1068#[rustc_clean(cfg="bpass3")]
1069#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1070#[rustc_clean(cfg="bpass6")]
10711071trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { }
10721072
10731073
10741074
10751075// Add lifetime bound to lifetime parameter of trait
1076#[cfg(any(bfail1,bfail4))]
1076#[cfg(any(bpass1,bpass4))]
10771077trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a, 'b> { }
10781078
1079#[cfg(not(any(bfail1,bfail4)))]
1080#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1081#[rustc_clean(cfg="bfail3")]
1082#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1083#[rustc_clean(cfg="bfail6")]
1079#[cfg(not(any(bpass1,bpass4)))]
1080#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1081#[rustc_clean(cfg="bpass3")]
1082#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1083#[rustc_clean(cfg="bpass6")]
10841084trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { }
10851085
10861086
10871087
10881088// Add builtin bound to type parameter of trait
1089#[cfg(any(bfail1,bfail4))]
1089#[cfg(any(bpass1,bpass4))]
10901090trait TraitAddBuiltinBoundToTypeParameterOfTrait<T> { }
10911091
1092#[cfg(not(any(bfail1,bfail4)))]
1093#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1094#[rustc_clean(cfg="bfail3")]
1095#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1096#[rustc_clean(cfg="bfail6")]
1092#[cfg(not(any(bpass1,bpass4)))]
1093#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1094#[rustc_clean(cfg="bpass3")]
1095#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1096#[rustc_clean(cfg="bpass6")]
10971097trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { }
10981098
10991099
11001100
11011101// Add second type parameter to trait
1102#[cfg(any(bfail1,bfail4))]
1102#[cfg(any(bpass1,bpass4))]
11031103trait TraitAddSecondTypeParameterToTrait<T> { }
11041104
1105#[cfg(not(any(bfail1,bfail4)))]
1106#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail2")]
1107#[rustc_clean(cfg="bfail3")]
1108#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail5")]
1109#[rustc_clean(cfg="bfail6")]
1105#[cfg(not(any(bpass1,bpass4)))]
1106#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass2")]
1107#[rustc_clean(cfg="bpass3")]
1108#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass5")]
1109#[rustc_clean(cfg="bpass6")]
11101110trait TraitAddSecondTypeParameterToTrait<T, S> { }
11111111
11121112
11131113
11141114// Add second lifetime parameter to trait
1115#[cfg(any(bfail1,bfail4))]
1115#[cfg(any(bpass1,bpass4))]
11161116trait TraitAddSecondLifetimeParameterToTrait<'a> { }
11171117
1118#[cfg(not(any(bfail1,bfail4)))]
1119#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail2")]
1120#[rustc_clean(cfg="bfail3")]
1121#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bfail5")]
1122#[rustc_clean(cfg="bfail6")]
1118#[cfg(not(any(bpass1,bpass4)))]
1119#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass2")]
1120#[rustc_clean(cfg="bpass3")]
1121#[rustc_clean(except="opt_hir_owner_nodes,generics_of,predicates_of", cfg="bpass5")]
1122#[rustc_clean(cfg="bpass6")]
11231123trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { }
11241124
11251125
11261126
11271127// Add second trait bound to type parameter of trait
1128#[cfg(any(bfail1,bfail4))]
1128#[cfg(any(bpass1,bpass4))]
11291129trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
11301130
1131#[cfg(not(any(bfail1,bfail4)))]
1132#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1133#[rustc_clean(cfg="bfail3")]
1134#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1135#[rustc_clean(cfg="bfail6")]
1131#[cfg(not(any(bpass1,bpass4)))]
1132#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1133#[rustc_clean(cfg="bpass3")]
1134#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1135#[rustc_clean(cfg="bpass6")]
11361136trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + ReferencedTrait1> { }
11371137
11381138
11391139
11401140// Add second lifetime bound to type parameter of trait
1141#[cfg(any(bfail1,bfail4))]
1141#[cfg(any(bpass1,bpass4))]
11421142trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a> { }
11431143
1144#[cfg(not(any(bfail1,bfail4)))]
1145#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1146#[rustc_clean(cfg="bfail3")]
1147#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1148#[rustc_clean(cfg="bfail6")]
1144#[cfg(not(any(bpass1,bpass4)))]
1145#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1146#[rustc_clean(cfg="bpass3")]
1147#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1148#[rustc_clean(cfg="bpass6")]
11491149trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { }
11501150
11511151
11521152
11531153// Add second lifetime bound to lifetime parameter of trait
1154#[cfg(any(bfail1,bfail4))]
1154#[cfg(any(bpass1,bpass4))]
11551155trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b, 'c> { }
11561156
1157#[cfg(not(any(bfail1,bfail4)))]
1158#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1159#[rustc_clean(cfg="bfail3")]
1160#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1161#[rustc_clean(cfg="bfail6")]
1157#[cfg(not(any(bpass1,bpass4)))]
1158#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1159#[rustc_clean(cfg="bpass3")]
1160#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1161#[rustc_clean(cfg="bpass6")]
11621162trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c> { }
11631163
11641164
11651165
11661166// Add second builtin bound to type parameter of trait
1167#[cfg(any(bfail1,bfail4))]
1167#[cfg(any(bpass1,bpass4))]
11681168trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send> { }
11691169
1170#[cfg(not(any(bfail1,bfail4)))]
1171#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1172#[rustc_clean(cfg="bfail3")]
1173#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1174#[rustc_clean(cfg="bfail6")]
1170#[cfg(not(any(bpass1,bpass4)))]
1171#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1172#[rustc_clean(cfg="bpass3")]
1173#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1174#[rustc_clean(cfg="bpass6")]
11751175trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send + Sync> { }
11761176
11771177
......@@ -1182,125 +1182,125 @@ struct ReferenceType1 {}
11821182
11831183
11841184// Add trait bound to type parameter of trait in where clause
1185#[cfg(any(bfail1,bfail4))]
1185#[cfg(any(bpass1,bpass4))]
11861186trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> { }
11871187
1188#[cfg(not(any(bfail1,bfail4)))]
1189#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1190#[rustc_clean(cfg="bfail3")]
1191#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1192#[rustc_clean(cfg="bfail6")]
1188#[cfg(not(any(bpass1,bpass4)))]
1189#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1190#[rustc_clean(cfg="bpass3")]
1191#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1192#[rustc_clean(cfg="bpass6")]
11931193trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
11941194
11951195
11961196
11971197// Add lifetime bound to type parameter of trait in where clause
1198#[cfg(any(bfail1,bfail4))]
1198#[cfg(any(bpass1,bpass4))]
11991199trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> { }
12001200
1201#[cfg(not(any(bfail1,bfail4)))]
1202#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1203#[rustc_clean(cfg="bfail3")]
1204#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1205#[rustc_clean(cfg="bfail6")]
1201#[cfg(not(any(bpass1,bpass4)))]
1202#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1203#[rustc_clean(cfg="bpass3")]
1204#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1205#[rustc_clean(cfg="bpass6")]
12061206trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { }
12071207
12081208
12091209
12101210// Add lifetime bound to lifetime parameter of trait in where clause
1211#[cfg(any(bfail1,bfail4))]
1211#[cfg(any(bpass1,bpass4))]
12121212trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> { }
12131213
1214#[cfg(not(any(bfail1,bfail4)))]
1215#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1216#[rustc_clean(cfg="bfail3")]
1217#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1218#[rustc_clean(cfg="bfail6")]
1214#[cfg(not(any(bpass1,bpass4)))]
1215#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1216#[rustc_clean(cfg="bpass3")]
1217#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1218#[rustc_clean(cfg="bpass6")]
12191219trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b { }
12201220
12211221
12221222
12231223// Add builtin bound to type parameter of trait in where clause
1224#[cfg(any(bfail1,bfail4))]
1224#[cfg(any(bpass1,bpass4))]
12251225trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> { }
12261226
1227#[cfg(not(any(bfail1,bfail4)))]
1228#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1229#[rustc_clean(cfg="bfail3")]
1230#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1231#[rustc_clean(cfg="bfail6")]
1227#[cfg(not(any(bpass1,bpass4)))]
1228#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1229#[rustc_clean(cfg="bpass3")]
1230#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1231#[rustc_clean(cfg="bpass6")]
12321232trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
12331233
12341234
12351235
12361236// Add second trait bound to type parameter of trait in where clause
1237#[cfg(any(bfail1,bfail4))]
1237#[cfg(any(bpass1,bpass4))]
12381238trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
12391239
1240#[cfg(not(any(bfail1,bfail4)))]
1241#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1242#[rustc_clean(cfg="bfail3")]
1243#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1244#[rustc_clean(cfg="bfail6")]
1240#[cfg(not(any(bpass1,bpass4)))]
1241#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1242#[rustc_clean(cfg="bpass3")]
1243#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1244#[rustc_clean(cfg="bpass6")]
12451245trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T>
12461246 where T: ReferencedTrait0 + ReferencedTrait1 { }
12471247
12481248
12491249
12501250// Add second lifetime bound to type parameter of trait in where clause
1251#[cfg(any(bfail1,bfail4))]
1251#[cfg(any(bpass1,bpass4))]
12521252trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a { }
12531253
1254#[cfg(not(any(bfail1,bfail4)))]
1255#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1256#[rustc_clean(cfg="bfail3")]
1257#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1258#[rustc_clean(cfg="bfail6")]
1254#[cfg(not(any(bpass1,bpass4)))]
1255#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1256#[rustc_clean(cfg="bpass3")]
1257#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1258#[rustc_clean(cfg="bpass6")]
12591259trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a + 'b { }
12601260
12611261
12621262
12631263// Add second lifetime bound to lifetime parameter of trait in where clause
1264#[cfg(any(bfail1,bfail4))]
1264#[cfg(any(bpass1,bpass4))]
12651265trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b { }
12661266
1267#[cfg(not(any(bfail1,bfail4)))]
1268#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1269#[rustc_clean(cfg="bfail3")]
1270#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1271#[rustc_clean(cfg="bfail6")]
1267#[cfg(not(any(bpass1,bpass4)))]
1268#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1269#[rustc_clean(cfg="bpass3")]
1270#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1271#[rustc_clean(cfg="bpass6")]
12721272trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b + 'c { }
12731273
12741274
12751275
12761276// Add second builtin bound to type parameter of trait in where clause
1277#[cfg(any(bfail1,bfail4))]
1277#[cfg(any(bpass1,bpass4))]
12781278trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
12791279
1280#[cfg(not(any(bfail1,bfail4)))]
1281#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1282#[rustc_clean(cfg="bfail3")]
1283#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1284#[rustc_clean(cfg="bfail6")]
1280#[cfg(not(any(bpass1,bpass4)))]
1281#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1282#[rustc_clean(cfg="bpass3")]
1283#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1284#[rustc_clean(cfg="bpass6")]
12851285trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send + Sync { }
12861286
12871287
12881288// Change return type of method indirectly by modifying a use statement
12891289mod change_return_type_of_method_indirectly_use {
1290 #[cfg(any(bfail1,bfail4))]
1290 #[cfg(any(bpass1,bpass4))]
12911291 use super::ReferenceType0 as ReturnType;
1292 #[cfg(not(any(bfail1,bfail4)))]
1292 #[cfg(not(any(bpass1,bpass4)))]
12931293 use super::ReferenceType1 as ReturnType;
12941294
1295 #[rustc_clean(cfg="bfail2")]
1296 #[rustc_clean(cfg="bfail3")]
1297 #[rustc_clean(cfg="bfail5")]
1298 #[rustc_clean(cfg="bfail6")]
1295 #[rustc_clean(cfg="bpass2")]
1296 #[rustc_clean(cfg="bpass3")]
1297 #[rustc_clean(cfg="bpass5")]
1298 #[rustc_clean(cfg="bpass6")]
12991299 trait TraitChangeReturnType {
1300 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
1301 #[rustc_clean(cfg="bfail3")]
1302 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
1303 #[rustc_clean(cfg="bfail6")]
1300 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
1301 #[rustc_clean(cfg="bpass3")]
1302 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
1303 #[rustc_clean(cfg="bpass6")]
13041304 fn method() -> ReturnType;
13051305 }
13061306}
......@@ -1309,20 +1309,20 @@ mod change_return_type_of_method_indirectly_use {
13091309
13101310// Change type of method parameter indirectly by modifying a use statement
13111311mod change_method_parameter_type_indirectly_by_use {
1312 #[cfg(any(bfail1,bfail4))]
1312 #[cfg(any(bpass1,bpass4))]
13131313 use super::ReferenceType0 as ArgType;
1314 #[cfg(not(any(bfail1,bfail4)))]
1314 #[cfg(not(any(bpass1,bpass4)))]
13151315 use super::ReferenceType1 as ArgType;
13161316
1317 #[rustc_clean(cfg="bfail2")]
1318 #[rustc_clean(cfg="bfail3")]
1319 #[rustc_clean(cfg="bfail5")]
1320 #[rustc_clean(cfg="bfail6")]
1317 #[rustc_clean(cfg="bpass2")]
1318 #[rustc_clean(cfg="bpass3")]
1319 #[rustc_clean(cfg="bpass5")]
1320 #[rustc_clean(cfg="bpass6")]
13211321 trait TraitChangeArgType {
1322 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail2")]
1323 #[rustc_clean(cfg="bfail3")]
1324 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bfail5")]
1325 #[rustc_clean(cfg="bfail6")]
1322 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass2")]
1323 #[rustc_clean(cfg="bpass3")]
1324 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="bpass5")]
1325 #[rustc_clean(cfg="bpass6")]
13261326 fn method(a: ArgType);
13271327 }
13281328}
......@@ -1331,20 +1331,20 @@ mod change_method_parameter_type_indirectly_by_use {
13311331
13321332// Change trait bound of method type parameter indirectly by modifying a use statement
13331333mod change_method_parameter_type_bound_indirectly_by_use {
1334 #[cfg(any(bfail1,bfail4))]
1334 #[cfg(any(bpass1,bpass4))]
13351335 use super::ReferencedTrait0 as Bound;
1336 #[cfg(not(any(bfail1,bfail4)))]
1336 #[cfg(not(any(bpass1,bpass4)))]
13371337 use super::ReferencedTrait1 as Bound;
13381338
1339 #[rustc_clean(cfg="bfail2")]
1340 #[rustc_clean(cfg="bfail3")]
1341 #[rustc_clean(cfg="bfail5")]
1342 #[rustc_clean(cfg="bfail6")]
1339 #[rustc_clean(cfg="bpass2")]
1340 #[rustc_clean(cfg="bpass3")]
1341 #[rustc_clean(cfg="bpass5")]
1342 #[rustc_clean(cfg="bpass6")]
13431343 trait TraitChangeBoundOfMethodTypeParameter {
1344 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1345 #[rustc_clean(cfg="bfail3")]
1346 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1347 #[rustc_clean(cfg="bfail6")]
1344 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1345 #[rustc_clean(cfg="bpass3")]
1346 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1347 #[rustc_clean(cfg="bpass6")]
13481348 fn method<T: Bound>(a: T);
13491349 }
13501350}
......@@ -1354,20 +1354,20 @@ mod change_method_parameter_type_bound_indirectly_by_use {
13541354// Change trait bound of method type parameter in where clause indirectly
13551355// by modifying a use statement
13561356mod change_method_parameter_type_bound_indirectly_by_use_where {
1357 #[cfg(any(bfail1,bfail4))]
1357 #[cfg(any(bpass1,bpass4))]
13581358 use super::ReferencedTrait0 as Bound;
1359 #[cfg(not(any(bfail1,bfail4)))]
1359 #[cfg(not(any(bpass1,bpass4)))]
13601360 use super::ReferencedTrait1 as Bound;
13611361
1362 #[rustc_clean(cfg="bfail2")]
1363 #[rustc_clean(cfg="bfail3")]
1364 #[rustc_clean(cfg="bfail5")]
1365 #[rustc_clean(cfg="bfail6")]
1362 #[rustc_clean(cfg="bpass2")]
1363 #[rustc_clean(cfg="bpass3")]
1364 #[rustc_clean(cfg="bpass5")]
1365 #[rustc_clean(cfg="bpass6")]
13661366 trait TraitChangeBoundOfMethodTypeParameterWhere {
1367 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1368 #[rustc_clean(cfg="bfail3")]
1369 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1370 #[rustc_clean(cfg="bfail6")]
1367 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1368 #[rustc_clean(cfg="bpass3")]
1369 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1370 #[rustc_clean(cfg="bpass6")]
13711371 fn method<T>(a: T) where T: Bound;
13721372 }
13731373}
......@@ -1376,15 +1376,15 @@ mod change_method_parameter_type_bound_indirectly_by_use_where {
13761376
13771377// Change trait bound of trait type parameter indirectly by modifying a use statement
13781378mod change_method_type_parameter_bound_indirectly {
1379 #[cfg(any(bfail1,bfail4))]
1379 #[cfg(any(bpass1,bpass4))]
13801380 use super::ReferencedTrait0 as Bound;
1381 #[cfg(not(any(bfail1,bfail4)))]
1381 #[cfg(not(any(bpass1,bpass4)))]
13821382 use super::ReferencedTrait1 as Bound;
13831383
1384 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1385 #[rustc_clean(cfg="bfail3")]
1386 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1387 #[rustc_clean(cfg="bfail6")]
1384 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1385 #[rustc_clean(cfg="bpass3")]
1386 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1387 #[rustc_clean(cfg="bpass6")]
13881388 trait TraitChangeTraitBound<T: Bound> {
13891389 fn method(a: T);
13901390 }
......@@ -1395,15 +1395,15 @@ mod change_method_type_parameter_bound_indirectly {
13951395// Change trait bound of trait type parameter in where clause indirectly
13961396// by modifying a use statement
13971397mod change_method_type_parameter_bound_indirectly_where {
1398 #[cfg(any(bfail1,bfail4))]
1398 #[cfg(any(bpass1,bpass4))]
13991399 use super::ReferencedTrait0 as Bound;
1400 #[cfg(not(any(bfail1,bfail4)))]
1400 #[cfg(not(any(bpass1,bpass4)))]
14011401 use super::ReferencedTrait1 as Bound;
14021402
1403 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail2")]
1404 #[rustc_clean(cfg="bfail3")]
1405 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bfail5")]
1406 #[rustc_clean(cfg="bfail6")]
1403 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass2")]
1404 #[rustc_clean(cfg="bpass3")]
1405 #[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="bpass5")]
1406 #[rustc_clean(cfg="bpass6")]
14071407 trait TraitChangeTraitBoundWhere<T> where T: Bound {
14081408 fn method(a: T);
14091409 }
tests/incremental/hashes/trait_impls.rs+211-211
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -22,35 +22,35 @@ struct Foo;
2222
2323// Change Method Name -----------------------------------------------------------
2424
25#[cfg(any(bfail1,bfail4))]
25#[cfg(any(bpass1,bpass4))]
2626pub trait ChangeMethodNameTrait {
2727 fn method_name();
2828}
2929
30#[cfg(any(bfail1,bfail4))]
30#[cfg(any(bpass1,bpass4))]
3131impl ChangeMethodNameTrait for Foo {
3232 fn method_name() { }
3333}
3434
35#[cfg(not(any(bfail1,bfail4)))]
36#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
37#[rustc_clean(cfg="bfail3")]
38#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bfail5")]
39#[rustc_clean(cfg="bfail6")]
35#[cfg(not(any(bpass1,bpass4)))]
36#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
37#[rustc_clean(cfg="bpass3")]
38#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="bpass5")]
39#[rustc_clean(cfg="bpass6")]
4040pub trait ChangeMethodNameTrait {
41 #[rustc_clean(cfg="bfail3")]
42 #[rustc_clean(cfg="bfail6")]
41 #[rustc_clean(cfg="bpass3")]
42 #[rustc_clean(cfg="bpass6")]
4343 fn method_name2();
4444}
4545
46#[cfg(not(any(bfail1,bfail4)))]
47#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
48#[rustc_clean(cfg="bfail3")]
49#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail5")]
50#[rustc_clean(cfg="bfail6")]
46#[cfg(not(any(bpass1,bpass4)))]
47#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
48#[rustc_clean(cfg="bpass3")]
49#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass5")]
50#[rustc_clean(cfg="bpass6")]
5151impl ChangeMethodNameTrait for Foo {
52 #[rustc_clean(cfg="bfail3")]
53 #[rustc_clean(cfg="bfail6")]
52 #[rustc_clean(cfg="bpass3")]
53 #[rustc_clean(cfg="bpass6")]
5454 fn method_name2() { }
5555}
5656
......@@ -62,7 +62,7 @@ pub trait ChangeMethodBodyTrait {
6262 fn method_name();
6363}
6464
65#[cfg(any(bfail1,bfail4))]
65#[cfg(any(bpass1,bpass4))]
6666impl ChangeMethodBodyTrait for Foo {
6767 // --------------------------------------------------------------
6868 // -------------------------
......@@ -73,16 +73,16 @@ impl ChangeMethodBodyTrait for Foo {
7373 }
7474}
7575
76#[cfg(not(any(bfail1,bfail4)))]
77#[rustc_clean(cfg="bfail2")]
78#[rustc_clean(cfg="bfail3")]
79#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
80#[rustc_clean(cfg="bfail6")]
76#[cfg(not(any(bpass1,bpass4)))]
77#[rustc_clean(cfg="bpass2")]
78#[rustc_clean(cfg="bpass3")]
79#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
80#[rustc_clean(cfg="bpass6")]
8181impl ChangeMethodBodyTrait for Foo {
82 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail2")]
83 #[rustc_clean(cfg="bfail3")]
84 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bfail5")]
85 #[rustc_clean(cfg="bfail6")]
82 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass2")]
83 #[rustc_clean(cfg="bpass3")]
84 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root", cfg="bpass5")]
85 #[rustc_clean(cfg="bpass6")]
8686 fn method_name() {
8787 ()
8888 }
......@@ -96,7 +96,7 @@ pub trait ChangeMethodBodyTraitInlined {
9696 fn method_name();
9797}
9898
99#[cfg(any(bfail1,bfail4))]
99#[cfg(any(bpass1,bpass4))]
100100impl ChangeMethodBodyTraitInlined for Foo {
101101 // ----------------------------------------------------------------------------
102102 // -------------------------
......@@ -108,16 +108,16 @@ impl ChangeMethodBodyTraitInlined for Foo {
108108 }
109109}
110110
111#[cfg(not(any(bfail1,bfail4)))]
112#[rustc_clean(cfg="bfail2")]
113#[rustc_clean(cfg="bfail3")]
114#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
115#[rustc_clean(cfg="bfail6")]
111#[cfg(not(any(bpass1,bpass4)))]
112#[rustc_clean(cfg="bpass2")]
113#[rustc_clean(cfg="bpass3")]
114#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
115#[rustc_clean(cfg="bpass6")]
116116impl ChangeMethodBodyTraitInlined for Foo {
117 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bfail2")]
118 #[rustc_clean(cfg="bfail3")]
119 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bfail5")]
120 #[rustc_clean(cfg="bfail6")]
117 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bpass2")]
118 #[rustc_clean(cfg="bpass3")]
119 #[rustc_clean(except="opt_hir_owner_nodes,typeck_root,optimized_mir", cfg="bpass5")]
120 #[rustc_clean(cfg="bpass6")]
121121 #[inline]
122122 fn method_name() {
123123 panic!()
......@@ -126,37 +126,37 @@ impl ChangeMethodBodyTraitInlined for Foo {
126126
127127// Change Method Selfness ------------------------------------------------------
128128
129#[cfg(any(bfail1,bfail4))]
129#[cfg(any(bpass1,bpass4))]
130130pub trait ChangeMethodSelfnessTrait {
131131 fn method_name();
132132}
133133
134#[cfg(any(bfail1,bfail4))]
134#[cfg(any(bpass1,bpass4))]
135135impl ChangeMethodSelfnessTrait for Foo {
136136 fn method_name() { }
137137}
138138
139#[cfg(not(any(bfail1,bfail4)))]
139#[cfg(not(any(bpass1,bpass4)))]
140140pub trait ChangeMethodSelfnessTrait {
141141 fn method_name(&self);
142142}
143143
144#[cfg(not(any(bfail1,bfail4)))]
145#[rustc_clean(cfg="bfail2")]
146#[rustc_clean(cfg="bfail3")]
147#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
148#[rustc_clean(cfg="bfail6")]
144#[cfg(not(any(bpass1,bpass4)))]
145#[rustc_clean(cfg="bpass2")]
146#[rustc_clean(cfg="bpass3")]
147#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
148#[rustc_clean(cfg="bpass6")]
149149impl ChangeMethodSelfnessTrait for Foo {
150150 #[rustc_clean(
151151 except="opt_hir_owner_nodes,associated_item,generics_of,fn_sig,typeck_root,optimized_mir",
152 cfg="bfail2",
152 cfg="bpass2",
153153 )]
154 #[rustc_clean(cfg="bfail3")]
154 #[rustc_clean(cfg="bpass3")]
155155 #[rustc_clean(
156156 except="opt_hir_owner_nodes,associated_item,generics_of,fn_sig,typeck_root,optimized_mir",
157 cfg="bfail5",
157 cfg="bpass5",
158158 )]
159 #[rustc_clean(cfg="bfail6")]
159 #[rustc_clean(cfg="bpass6")]
160160 fn method_name(&self) {
161161 ()
162162 }
......@@ -164,48 +164,48 @@ impl ChangeMethodSelfnessTrait for Foo {
164164
165165// Change Method Selfness -----------------------------------------------------------
166166
167#[cfg(any(bfail1,bfail4))]
167#[cfg(any(bpass1,bpass4))]
168168pub trait RemoveMethodSelfnessTrait {
169169 fn method_name(&self);
170170}
171171
172#[cfg(any(bfail1,bfail4))]
172#[cfg(any(bpass1,bpass4))]
173173impl RemoveMethodSelfnessTrait for Foo {
174174 fn method_name(&self) { }
175175}
176176
177#[cfg(not(any(bfail1,bfail4)))]
177#[cfg(not(any(bpass1,bpass4)))]
178178pub trait RemoveMethodSelfnessTrait {
179179 fn method_name();
180180}
181181
182#[cfg(not(any(bfail1,bfail4)))]
183#[rustc_clean(cfg="bfail2")]
184#[rustc_clean(cfg="bfail3")]
185#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
186#[rustc_clean(cfg="bfail6")]
182#[cfg(not(any(bpass1,bpass4)))]
183#[rustc_clean(cfg="bpass2")]
184#[rustc_clean(cfg="bpass3")]
185#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
186#[rustc_clean(cfg="bpass6")]
187187impl RemoveMethodSelfnessTrait for Foo {
188188 #[rustc_clean(
189189 except="opt_hir_owner_nodes,associated_item,generics_of,fn_sig,typeck_root,optimized_mir",
190 cfg="bfail2",
190 cfg="bpass2",
191191 )]
192 #[rustc_clean(cfg="bfail3")]
192 #[rustc_clean(cfg="bpass3")]
193193 #[rustc_clean(
194194 except="opt_hir_owner_nodes,associated_item,generics_of,fn_sig,typeck_root,optimized_mir",
195 cfg="bfail5",
195 cfg="bpass5",
196196 )]
197 #[rustc_clean(cfg="bfail6")]
197 #[rustc_clean(cfg="bpass6")]
198198 fn method_name() {}
199199}
200200
201201// Change Method Selfmutness -----------------------------------------------------------
202202
203#[cfg(any(bfail1,bfail4))]
203#[cfg(any(bpass1,bpass4))]
204204pub trait ChangeMethodSelfmutnessTrait {
205205 fn method_name(&self);
206206}
207207
208#[cfg(any(bfail1,bfail4))]
208#[cfg(any(bpass1,bpass4))]
209209impl ChangeMethodSelfmutnessTrait for Foo {
210210 // -----------------------------------------------------------------------------------
211211 // -------------------------
......@@ -214,101 +214,101 @@ impl ChangeMethodSelfmutnessTrait for Foo {
214214 fn method_name(& self) {}
215215}
216216
217#[cfg(not(any(bfail1,bfail4)))]
217#[cfg(not(any(bpass1,bpass4)))]
218218pub trait ChangeMethodSelfmutnessTrait {
219219 fn method_name(&mut self);
220220}
221221
222#[cfg(not(any(bfail1,bfail4)))]
223#[rustc_clean(cfg="bfail2")]
224#[rustc_clean(cfg="bfail3")]
225#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
226#[rustc_clean(cfg="bfail6")]
222#[cfg(not(any(bpass1,bpass4)))]
223#[rustc_clean(cfg="bpass2")]
224#[rustc_clean(cfg="bpass3")]
225#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
226#[rustc_clean(cfg="bpass6")]
227227impl ChangeMethodSelfmutnessTrait for Foo {
228 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bfail2")]
229 #[rustc_clean(cfg="bfail3")]
230 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bfail5")]
231 #[rustc_clean(cfg="bfail6")]
228 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bpass2")]
229 #[rustc_clean(cfg="bpass3")]
230 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bpass5")]
231 #[rustc_clean(cfg="bpass6")]
232232 fn method_name(&mut self) {}
233233}
234234
235235// Change item kind -----------------------------------------------------------
236236
237#[cfg(any(bfail1,bfail4))]
237#[cfg(any(bpass1,bpass4))]
238238pub trait ChangeItemKindTrait {
239239 fn name();
240240}
241241
242#[cfg(any(bfail1,bfail4))]
242#[cfg(any(bpass1,bpass4))]
243243impl ChangeItemKindTrait for Foo {
244244 fn name() { }
245245}
246246
247#[cfg(not(any(bfail1,bfail4)))]
247#[cfg(not(any(bpass1,bpass4)))]
248248pub trait ChangeItemKindTrait {
249249 type name;
250250}
251251
252#[cfg(not(any(bfail1,bfail4)))]
253#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
254#[rustc_clean(cfg="bfail3")]
255#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail5")]
256#[rustc_clean(cfg="bfail6")]
252#[cfg(not(any(bpass1,bpass4)))]
253#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
254#[rustc_clean(cfg="bpass3")]
255#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass5")]
256#[rustc_clean(cfg="bpass6")]
257257impl ChangeItemKindTrait for Foo {
258258 type name = ();
259259}
260260
261261// Remove item -----------------------------------------------------------
262262
263#[cfg(any(bfail1,bfail4))]
263#[cfg(any(bpass1,bpass4))]
264264pub trait RemoveItemTrait {
265265 type TypeName;
266266 fn method_name();
267267}
268268
269#[cfg(any(bfail1,bfail4))]
269#[cfg(any(bpass1,bpass4))]
270270impl RemoveItemTrait for Foo {
271271 type TypeName = ();
272272 fn method_name() { }
273273}
274274
275#[cfg(not(any(bfail1,bfail4)))]
275#[cfg(not(any(bpass1,bpass4)))]
276276pub trait RemoveItemTrait {
277277 type TypeName;
278278}
279279
280#[cfg(not(any(bfail1,bfail4)))]
281#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
282#[rustc_clean(cfg="bfail3")]
283#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail5")]
284#[rustc_clean(cfg="bfail6")]
280#[cfg(not(any(bpass1,bpass4)))]
281#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
282#[rustc_clean(cfg="bpass3")]
283#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass5")]
284#[rustc_clean(cfg="bpass6")]
285285impl RemoveItemTrait for Foo {
286286 type TypeName = ();
287287}
288288
289289// Add item -----------------------------------------------------------
290290
291#[cfg(any(bfail1,bfail4))]
291#[cfg(any(bpass1,bpass4))]
292292pub trait AddItemTrait {
293293 type TypeName;
294294}
295295
296#[cfg(any(bfail1,bfail4))]
296#[cfg(any(bpass1,bpass4))]
297297impl AddItemTrait for Foo {
298298 type TypeName = ();
299299}
300300
301#[cfg(not(any(bfail1,bfail4)))]
301#[cfg(not(any(bpass1,bpass4)))]
302302pub trait AddItemTrait {
303303 type TypeName;
304304 fn method_name();
305305}
306306
307#[cfg(not(any(bfail1,bfail4)))]
308#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail2")]
309#[rustc_clean(cfg="bfail3")]
310#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bfail5")]
311#[rustc_clean(cfg="bfail6")]
307#[cfg(not(any(bpass1,bpass4)))]
308#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass2")]
309#[rustc_clean(cfg="bpass3")]
310#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="bpass5")]
311#[rustc_clean(cfg="bpass6")]
312312impl AddItemTrait for Foo {
313313 type TypeName = ();
314314 fn method_name() { }
......@@ -316,7 +316,7 @@ impl AddItemTrait for Foo {
316316
317317// Change has-value -----------------------------------------------------------
318318
319#[cfg(any(bfail1,bfail4))]
319#[cfg(any(bpass1,bpass4))]
320320pub trait ChangeHasValueTrait {
321321 //--------------------------------------------------------
322322 //--------------------------
......@@ -325,29 +325,29 @@ pub trait ChangeHasValueTrait {
325325 fn method_name() ;
326326}
327327
328#[cfg(any(bfail1,bfail4))]
328#[cfg(any(bpass1,bpass4))]
329329impl ChangeHasValueTrait for Foo {
330330 fn method_name() { }
331331}
332332
333#[cfg(not(any(bfail1,bfail4)))]
334#[rustc_clean(cfg="bfail2")]
335#[rustc_clean(cfg="bfail3")]
336#[rustc_clean(cfg="bfail5")]
337#[rustc_clean(cfg="bfail6")]
333#[cfg(not(any(bpass1,bpass4)))]
334#[rustc_clean(cfg="bpass2")]
335#[rustc_clean(cfg="bpass3")]
336#[rustc_clean(cfg="bpass5")]
337#[rustc_clean(cfg="bpass6")]
338338pub trait ChangeHasValueTrait {
339 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
340 #[rustc_clean(cfg="bfail3")]
341 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
342 #[rustc_clean(cfg="bfail6")]
339 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
340 #[rustc_clean(cfg="bpass3")]
341 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
342 #[rustc_clean(cfg="bpass6")]
343343 fn method_name() { }
344344}
345345
346#[cfg(not(any(bfail1,bfail4)))]
347#[rustc_clean(cfg="bfail2")]
348#[rustc_clean(cfg="bfail3")]
349#[rustc_clean(cfg="bfail5")]
350#[rustc_clean(cfg="bfail6")]
346#[cfg(not(any(bpass1,bpass4)))]
347#[rustc_clean(cfg="bpass2")]
348#[rustc_clean(cfg="bpass3")]
349#[rustc_clean(cfg="bpass5")]
350#[rustc_clean(cfg="bpass6")]
351351impl ChangeHasValueTrait for Foo {
352352 fn method_name() { }
353353}
......@@ -358,7 +358,7 @@ pub trait AddDefaultTrait {
358358 fn method_name();
359359}
360360
361#[cfg(any(bfail1,bfail4))]
361#[cfg(any(bpass1,bpass4))]
362362impl AddDefaultTrait for Foo {
363363 // -------------------------------------------------------
364364 // -------------------------
......@@ -367,27 +367,27 @@ impl AddDefaultTrait for Foo {
367367 fn method_name() { }
368368}
369369
370#[cfg(not(any(bfail1,bfail4)))]
371#[rustc_clean(cfg="bfail2")]
372#[rustc_clean(cfg="bfail3")]
373#[rustc_clean(cfg="bfail5")]
374#[rustc_clean(cfg="bfail6")]
370#[cfg(not(any(bpass1,bpass4)))]
371#[rustc_clean(cfg="bpass2")]
372#[rustc_clean(cfg="bpass3")]
373#[rustc_clean(cfg="bpass5")]
374#[rustc_clean(cfg="bpass6")]
375375impl AddDefaultTrait for Foo {
376 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
377 #[rustc_clean(cfg="bfail3")]
378 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
379 #[rustc_clean(cfg="bfail6")]
376 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
377 #[rustc_clean(cfg="bpass3")]
378 #[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
379 #[rustc_clean(cfg="bpass6")]
380380 default fn method_name() { }
381381}
382382
383383// Add arguments
384384
385#[cfg(any(bfail1,bfail4))]
385#[cfg(any(bpass1,bpass4))]
386386pub trait AddArgumentTrait {
387387 fn method_name(&self);
388388}
389389
390#[cfg(any(bfail1,bfail4))]
390#[cfg(any(bpass1,bpass4))]
391391impl AddArgumentTrait for Foo {
392392 // -----------------------------------------------------------------------------------
393393 // -------------------------
......@@ -396,32 +396,32 @@ impl AddArgumentTrait for Foo {
396396 fn method_name(&self ) { }
397397}
398398
399#[cfg(not(any(bfail1,bfail4)))]
399#[cfg(not(any(bpass1,bpass4)))]
400400pub trait AddArgumentTrait {
401401 fn method_name(&self, x: u32);
402402}
403403
404#[cfg(not(any(bfail1,bfail4)))]
405#[rustc_clean(cfg="bfail2")]
406#[rustc_clean(cfg="bfail3")]
407#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
408#[rustc_clean(cfg="bfail6")]
404#[cfg(not(any(bpass1,bpass4)))]
405#[rustc_clean(cfg="bpass2")]
406#[rustc_clean(cfg="bpass3")]
407#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
408#[rustc_clean(cfg="bpass6")]
409409impl AddArgumentTrait for Foo {
410 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bfail2")]
411 #[rustc_clean(cfg="bfail3")]
412 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bfail5")]
413 #[rustc_clean(cfg="bfail6")]
410 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bpass2")]
411 #[rustc_clean(cfg="bpass3")]
412 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bpass5")]
413 #[rustc_clean(cfg="bpass6")]
414414 fn method_name(&self, _x: u32) { }
415415}
416416
417417// Change argument type
418418
419#[cfg(any(bfail1,bfail4))]
419#[cfg(any(bpass1,bpass4))]
420420pub trait ChangeArgumentTypeTrait {
421421 fn method_name(&self, x: u32);
422422}
423423
424#[cfg(any(bfail1,bfail4))]
424#[cfg(any(bpass1,bpass4))]
425425impl ChangeArgumentTypeTrait for Foo {
426426 // -----------------------------------------------------------------------------------
427427 // -------------------------
......@@ -430,21 +430,21 @@ impl ChangeArgumentTypeTrait for Foo {
430430 fn method_name(&self, _x: u32 ) { }
431431}
432432
433#[cfg(not(any(bfail1,bfail4)))]
433#[cfg(not(any(bpass1,bpass4)))]
434434pub trait ChangeArgumentTypeTrait {
435435 fn method_name(&self, x: char);
436436}
437437
438#[cfg(not(any(bfail1,bfail4)))]
439#[rustc_clean(cfg="bfail2")]
440#[rustc_clean(cfg="bfail3")]
441#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
442#[rustc_clean(cfg="bfail6")]
438#[cfg(not(any(bpass1,bpass4)))]
439#[rustc_clean(cfg="bpass2")]
440#[rustc_clean(cfg="bpass3")]
441#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
442#[rustc_clean(cfg="bpass6")]
443443impl ChangeArgumentTypeTrait for Foo {
444 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bfail2")]
445 #[rustc_clean(cfg="bfail3")]
446 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bfail5")]
447 #[rustc_clean(cfg="bfail6")]
444 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bpass2")]
445 #[rustc_clean(cfg="bpass3")]
446 #[rustc_clean(except="opt_hir_owner_nodes,fn_sig,typeck_root,optimized_mir", cfg="bpass5")]
447 #[rustc_clean(cfg="bpass6")]
448448 fn method_name(&self, _x: char) { }
449449}
450450
......@@ -457,27 +457,27 @@ trait AddTypeParameterToImpl<T> {
457457 fn id(t: T) -> T;
458458}
459459
460#[cfg(any(bfail1,bfail4))]
460#[cfg(any(bpass1,bpass4))]
461461impl AddTypeParameterToImpl<u32> for Bar<u32> {
462462 fn id(t: u32) -> u32 { t }
463463}
464464
465#[cfg(not(any(bfail1,bfail4)))]
466#[rustc_clean(except="opt_hir_owner_nodes,generics_of,impl_trait_header", cfg="bfail2")]
467#[rustc_clean(cfg="bfail3")]
468#[rustc_clean(except="opt_hir_owner_nodes,generics_of,impl_trait_header", cfg="bfail5")]
469#[rustc_clean(cfg="bfail6")]
465#[cfg(not(any(bpass1,bpass4)))]
466#[rustc_clean(except="opt_hir_owner_nodes,generics_of,impl_trait_header", cfg="bpass2")]
467#[rustc_clean(cfg="bpass3")]
468#[rustc_clean(except="opt_hir_owner_nodes,generics_of,impl_trait_header", cfg="bpass5")]
469#[rustc_clean(cfg="bpass6")]
470470impl<TTT> AddTypeParameterToImpl<TTT> for Bar<TTT> {
471471 #[rustc_clean(
472472 except="opt_hir_owner_nodes,generics_of,fn_sig,type_of,typeck_root,optimized_mir",
473 cfg="bfail2",
473 cfg="bpass2",
474474 )]
475 #[rustc_clean(cfg="bfail3")]
475 #[rustc_clean(cfg="bpass3")]
476476 #[rustc_clean(
477477 except="opt_hir_owner_nodes,generics_of,fn_sig,type_of,typeck_root,optimized_mir",
478 cfg="bfail5",
478 cfg="bpass5",
479479 )]
480 #[rustc_clean(cfg="bfail6")]
480 #[rustc_clean(cfg="bpass6")]
481481 fn id(t: TTT) -> TTT { t }
482482}
483483
......@@ -488,21 +488,21 @@ trait ChangeSelfTypeOfImpl {
488488 fn id(self) -> Self;
489489}
490490
491#[cfg(any(bfail1,bfail4))]
491#[cfg(any(bpass1,bpass4))]
492492impl ChangeSelfTypeOfImpl for u32 {
493493 fn id(self) -> Self { self }
494494}
495495
496#[cfg(not(any(bfail1,bfail4)))]
497#[rustc_clean(except="opt_hir_owner_nodes,impl_trait_header", cfg="bfail2")]
498#[rustc_clean(cfg="bfail3")]
499#[rustc_clean(except="opt_hir_owner_nodes,impl_trait_header", cfg="bfail5")]
500#[rustc_clean(cfg="bfail6")]
496#[cfg(not(any(bpass1,bpass4)))]
497#[rustc_clean(except="opt_hir_owner_nodes,impl_trait_header", cfg="bpass2")]
498#[rustc_clean(cfg="bpass3")]
499#[rustc_clean(except="opt_hir_owner_nodes,impl_trait_header", cfg="bpass5")]
500#[rustc_clean(cfg="bpass6")]
501501impl ChangeSelfTypeOfImpl for u64 {
502 #[rustc_clean(except="fn_sig,typeck_root,optimized_mir", cfg="bfail2")]
503 #[rustc_clean(cfg="bfail3")]
504 #[rustc_clean(except="fn_sig,typeck_root,optimized_mir", cfg="bfail5")]
505 #[rustc_clean(cfg="bfail6")]
502 #[rustc_clean(except="fn_sig,typeck_root,optimized_mir", cfg="bpass2")]
503 #[rustc_clean(cfg="bpass3")]
504 #[rustc_clean(except="fn_sig,typeck_root,optimized_mir", cfg="bpass5")]
505 #[rustc_clean(cfg="bpass6")]
506506 fn id(self) -> Self { self }
507507}
508508
......@@ -513,21 +513,21 @@ trait AddLifetimeBoundToImplParameter {
513513 fn id(self) -> Self;
514514}
515515
516#[cfg(any(bfail1,bfail4))]
516#[cfg(any(bpass1,bpass4))]
517517impl<T> AddLifetimeBoundToImplParameter for T {
518518 fn id(self) -> Self { self }
519519}
520520
521#[cfg(not(any(bfail1,bfail4)))]
522#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
523#[rustc_clean(cfg="bfail3")]
524#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
525#[rustc_clean(cfg="bfail6")]
521#[cfg(not(any(bpass1,bpass4)))]
522#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
523#[rustc_clean(cfg="bpass3")]
524#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
525#[rustc_clean(cfg="bpass6")]
526526impl<T: 'static> AddLifetimeBoundToImplParameter for T {
527 #[rustc_clean(cfg="bfail2")]
528 #[rustc_clean(cfg="bfail3")]
529 #[rustc_clean(cfg="bfail5")]
530 #[rustc_clean(cfg="bfail6")]
527 #[rustc_clean(cfg="bpass2")]
528 #[rustc_clean(cfg="bpass3")]
529 #[rustc_clean(cfg="bpass5")]
530 #[rustc_clean(cfg="bpass6")]
531531 fn id(self) -> Self { self }
532532}
533533
......@@ -538,21 +538,21 @@ trait AddTraitBoundToImplParameter {
538538 fn id(self) -> Self;
539539}
540540
541#[cfg(any(bfail1,bfail4))]
541#[cfg(any(bpass1,bpass4))]
542542impl<T> AddTraitBoundToImplParameter for T {
543543 fn id(self) -> Self { self }
544544}
545545
546#[cfg(not(any(bfail1,bfail4)))]
547#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail2")]
548#[rustc_clean(cfg="bfail3")]
549#[rustc_clean(except="opt_hir_owner_nodes", cfg="bfail5")]
550#[rustc_clean(cfg="bfail6")]
546#[cfg(not(any(bpass1,bpass4)))]
547#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass2")]
548#[rustc_clean(cfg="bpass3")]
549#[rustc_clean(except="opt_hir_owner_nodes", cfg="bpass5")]
550#[rustc_clean(cfg="bpass6")]
551551impl<T: Clone> AddTraitBoundToImplParameter for T {
552 #[rustc_clean(cfg="bfail2")]
553 #[rustc_clean(cfg="bfail3")]
554 #[rustc_clean(cfg="bfail5")]
555 #[rustc_clean(cfg="bfail6")]
552 #[rustc_clean(cfg="bpass2")]
553 #[rustc_clean(cfg="bpass3")]
554 #[rustc_clean(cfg="bpass5")]
555 #[rustc_clean(cfg="bpass6")]
556556 fn id(self) -> Self { self }
557557}
558558
......@@ -563,7 +563,7 @@ trait AddNoMangleToMethod {
563563 fn add_no_mangle_to_method(&self) { }
564564}
565565
566#[cfg(any(bfail1,bfail4))]
566#[cfg(any(bpass1,bpass4))]
567567impl AddNoMangleToMethod for Foo {
568568 // -------------------------
569569 // -------------------------
......@@ -573,16 +573,16 @@ impl AddNoMangleToMethod for Foo {
573573 fn add_no_mangle_to_method(&self) { }
574574}
575575
576#[cfg(not(any(bfail1,bfail4)))]
577#[rustc_clean(cfg="bfail2")]
578#[rustc_clean(cfg="bfail3")]
579#[rustc_clean(cfg="bfail5")]
580#[rustc_clean(cfg="bfail6")]
576#[cfg(not(any(bpass1,bpass4)))]
577#[rustc_clean(cfg="bpass2")]
578#[rustc_clean(cfg="bpass3")]
579#[rustc_clean(cfg="bpass5")]
580#[rustc_clean(cfg="bpass6")]
581581impl AddNoMangleToMethod for Foo {
582 #[rustc_clean(cfg="bfail2")]
583 #[rustc_clean(cfg="bfail3")]
584 #[rustc_clean(cfg="bfail5")]
585 #[rustc_clean(cfg="bfail6")]
582 #[rustc_clean(cfg="bpass2")]
583 #[rustc_clean(cfg="bpass3")]
584 #[rustc_clean(cfg="bpass5")]
585 #[rustc_clean(cfg="bpass6")]
586586 #[unsafe(no_mangle)]
587587 fn add_no_mangle_to_method(&self) { }
588588}
......@@ -593,7 +593,7 @@ trait MakeMethodInline {
593593 fn make_method_inline(&self) -> u8 { 0 }
594594}
595595
596#[cfg(any(bfail1,bfail4))]
596#[cfg(any(bpass1,bpass4))]
597597impl MakeMethodInline for Foo {
598598 // -------------------------
599599 // -------------------------
......@@ -603,16 +603,16 @@ impl MakeMethodInline for Foo {
603603 fn make_method_inline(&self) -> u8 { 0 }
604604}
605605
606#[cfg(not(any(bfail1,bfail4)))]
607#[rustc_clean(cfg="bfail2")]
608#[rustc_clean(cfg="bfail3")]
609#[rustc_clean(cfg="bfail5")]
610#[rustc_clean(cfg="bfail6")]
606#[cfg(not(any(bpass1,bpass4)))]
607#[rustc_clean(cfg="bpass2")]
608#[rustc_clean(cfg="bpass3")]
609#[rustc_clean(cfg="bpass5")]
610#[rustc_clean(cfg="bpass6")]
611611impl MakeMethodInline for Foo {
612 #[rustc_clean(cfg="bfail2")]
613 #[rustc_clean(cfg="bfail3")]
614 #[rustc_clean(cfg="bfail5")]
615 #[rustc_clean(cfg="bfail6")]
612 #[rustc_clean(cfg="bpass2")]
613 #[rustc_clean(cfg="bpass3")]
614 #[rustc_clean(cfg="bpass5")]
615 #[rustc_clean(cfg="bpass6")]
616616 #[inline]
617617 fn make_method_inline(&self) -> u8 { 0 }
618618}
tests/incremental/hashes/type_defs.rs+66-66
......@@ -10,10 +10,10 @@
1010// results in a change of the ICH for the enum's metadata, and that it stays
1111// the same between rev2 and rev3.
1212
13//@ build-pass (FIXME(62277): could be check-pass?)
14//@ revisions: bfail1 bfail2 bfail3
13//@ revisions: bpass1 bpass2 bpass3
1514//@ compile-flags: -Z query-dep-graph -O
1615//@ ignore-backends: gcc
16// FIXME(#62277): could be check-pass?
1717
1818#![allow(warnings)]
1919#![feature(rustc_attrs)]
......@@ -21,34 +21,34 @@
2121
2222
2323// Change type (primitive) -----------------------------------------------------
24#[cfg(bfail1)]
24#[cfg(bpass1)]
2525type ChangePrimitiveType = i32;
2626
27#[cfg(not(bfail1))]
28#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
29#[rustc_clean(cfg="bfail3")]
27#[cfg(not(bpass1))]
28#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
29#[rustc_clean(cfg="bpass3")]
3030type ChangePrimitiveType = i64;
3131
3232
3333
3434// Change mutability -----------------------------------------------------------
35#[cfg(bfail1)]
35#[cfg(bpass1)]
3636type ChangeMutability = &'static i32;
3737
38#[cfg(not(bfail1))]
39#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
40#[rustc_clean(cfg="bfail3")]
38#[cfg(not(bpass1))]
39#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
40#[rustc_clean(cfg="bpass3")]
4141type ChangeMutability = &'static mut i32;
4242
4343
4444
4545// Change mutability -----------------------------------------------------------
46#[cfg(bfail1)]
46#[cfg(bpass1)]
4747type ChangeLifetime<'a> = (&'static i32, &'a i32);
4848
49#[cfg(not(bfail1))]
50#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
51#[rustc_clean(cfg="bfail3")]
49#[cfg(not(bpass1))]
50#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
51#[rustc_clean(cfg="bpass3")]
5252type ChangeLifetime<'a> = (&'a i32, &'a i32);
5353
5454
......@@ -57,23 +57,23 @@ type ChangeLifetime<'a> = (&'a i32, &'a i32);
5757struct Struct1;
5858struct Struct2;
5959
60#[cfg(bfail1)]
60#[cfg(bpass1)]
6161type ChangeTypeStruct = Struct1;
6262
63#[cfg(not(bfail1))]
64#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
65#[rustc_clean(cfg="bfail3")]
63#[cfg(not(bpass1))]
64#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
65#[rustc_clean(cfg="bpass3")]
6666type ChangeTypeStruct = Struct2;
6767
6868
6969
7070// Change type (tuple) ---------------------------------------------------------
71#[cfg(bfail1)]
71#[cfg(bpass1)]
7272type ChangeTypeTuple = (u32, u64);
7373
74#[cfg(not(bfail1))]
75#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
76#[rustc_clean(cfg="bfail3")]
74#[cfg(not(bpass1))]
75#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
76#[rustc_clean(cfg="bpass3")]
7777type ChangeTypeTuple = (u32, i64);
7878
7979
......@@ -88,102 +88,102 @@ enum Enum2 {
8888 Var2,
8989}
9090
91#[cfg(bfail1)]
91#[cfg(bpass1)]
9292type ChangeTypeEnum = Enum1;
9393
94#[cfg(not(bfail1))]
95#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
96#[rustc_clean(cfg="bfail3")]
94#[cfg(not(bpass1))]
95#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
96#[rustc_clean(cfg="bpass3")]
9797type ChangeTypeEnum = Enum2;
9898
9999
100100
101101// Add tuple field -------------------------------------------------------------
102#[cfg(bfail1)]
102#[cfg(bpass1)]
103103type AddTupleField = (i32, i64);
104104
105#[cfg(not(bfail1))]
106#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
107#[rustc_clean(cfg="bfail3")]
105#[cfg(not(bpass1))]
106#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
107#[rustc_clean(cfg="bpass3")]
108108type AddTupleField = (i32, i64, i16);
109109
110110
111111
112112// Change nested tuple field ---------------------------------------------------
113#[cfg(bfail1)]
113#[cfg(bpass1)]
114114type ChangeNestedTupleField = (i32, (i64, i16));
115115
116#[cfg(not(bfail1))]
117#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
118#[rustc_clean(cfg="bfail3")]
116#[cfg(not(bpass1))]
117#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
118#[rustc_clean(cfg="bpass3")]
119119type ChangeNestedTupleField = (i32, (i64, i8));
120120
121121
122122
123123// Add type param --------------------------------------------------------------
124#[cfg(bfail1)]
124#[cfg(bpass1)]
125125type AddTypeParam<T1> = (T1, T1);
126126
127#[cfg(not(bfail1))]
128#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
129#[rustc_clean(cfg="bfail3")]
127#[cfg(not(bpass1))]
128#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
129#[rustc_clean(cfg="bpass3")]
130130type AddTypeParam<T1, T2> = (T1, T2);
131131
132132
133133
134134// Add type param bound --------------------------------------------------------
135#[cfg(bfail1)]
135#[cfg(bpass1)]
136136type AddTypeParamBound<T1> = (T1, u32);
137137
138#[cfg(not(bfail1))]
139#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
140#[rustc_clean(cfg="bfail3")]
138#[cfg(not(bpass1))]
139#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
140#[rustc_clean(cfg="bpass3")]
141141type AddTypeParamBound<T1: Clone> = (T1, u32);
142142
143143
144144
145145// Add type param bound in where clause ----------------------------------------
146#[cfg(bfail1)]
146#[cfg(bpass1)]
147147type AddTypeParamBoundWhereClause<T1> where T1: Clone = (T1, u32);
148148
149#[cfg(not(bfail1))]
150#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
151#[rustc_clean(cfg="bfail3")]
149#[cfg(not(bpass1))]
150#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
151#[rustc_clean(cfg="bpass3")]
152152type AddTypeParamBoundWhereClause<T1> where T1: Clone+Copy = (T1, u32);
153153
154154
155155
156156// Add lifetime param ----------------------------------------------------------
157#[cfg(bfail1)]
157#[cfg(bpass1)]
158158type AddLifetimeParam<'a> = (&'a u32, &'a u32);
159159
160#[cfg(not(bfail1))]
161#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
162#[rustc_clean(cfg="bfail3")]
160#[cfg(not(bpass1))]
161#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
162#[rustc_clean(cfg="bpass3")]
163163type AddLifetimeParam<'a, 'b> = (&'a u32, &'b u32);
164164
165165
166166
167167// Add lifetime param bound ----------------------------------------------------
168#[cfg(bfail1)]
168#[cfg(bpass1)]
169169type AddLifetimeParamBound<'a, 'b> = (&'a u32, &'b u32);
170170
171#[cfg(not(bfail1))]
172#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
173#[rustc_clean(cfg="bfail3")]
171#[cfg(not(bpass1))]
172#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
173#[rustc_clean(cfg="bpass3")]
174174type AddLifetimeParamBound<'a, 'b: 'a> = (&'a u32, &'b u32);
175175
176176
177177
178178// Add lifetime param bound in where clause ------------------------------------
179#[cfg(bfail1)]
179#[cfg(bpass1)]
180180type AddLifetimeParamBoundWhereClause<'a, 'b, 'c>
181181where 'b: 'a
182182 = (&'a u32, &'b u32, &'c u32);
183183
184#[cfg(not(bfail1))]
185#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
186#[rustc_clean(cfg="bfail3")]
184#[cfg(not(bpass1))]
185#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
186#[rustc_clean(cfg="bpass3")]
187187type AddLifetimeParamBoundWhereClause<'a, 'b, 'c>
188188where 'b: 'a,
189189 'c: 'a
......@@ -196,13 +196,13 @@ trait ReferencedTrait1 {}
196196trait ReferencedTrait2 {}
197197
198198mod change_trait_bound_indirectly {
199 #[cfg(bfail1)]
199 #[cfg(bpass1)]
200200 use super::ReferencedTrait1 as Trait;
201 #[cfg(not(bfail1))]
201 #[cfg(not(bpass1))]
202202 use super::ReferencedTrait2 as Trait;
203203
204 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
205 #[rustc_clean(cfg="bfail3")]
204 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
205 #[rustc_clean(cfg="bpass3")]
206206 type ChangeTraitBoundIndirectly<T: Trait> = (T, u32);
207207}
208208
......@@ -210,12 +210,12 @@ mod change_trait_bound_indirectly {
210210
211211// Change Trait Bound Indirectly In Where Clause -------------------------------
212212mod change_trait_bound_indirectly_in_where_clause {
213 #[cfg(bfail1)]
213 #[cfg(bpass1)]
214214 use super::ReferencedTrait1 as Trait;
215 #[cfg(not(bfail1))]
215 #[cfg(not(bpass1))]
216216 use super::ReferencedTrait2 as Trait;
217217
218 #[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
219 #[rustc_clean(cfg="bfail3")]
218 #[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
219 #[rustc_clean(cfg="bpass3")]
220220 type ChangeTraitBoundIndirectly<T> where T : Trait = (T, u32);
221221}
tests/incremental/hashes/unary_and_binary_exprs.rs+173-173
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,16 +19,16 @@
1919
2020
2121// Change constant operand of negation -----------------------------------------
22#[cfg(any(bfail1,bfail4))]
22#[cfg(any(bpass1,bpass4))]
2323pub fn const_negation() -> i32 {
2424 -10
2525}
2626
27#[cfg(not(any(bfail1,bfail4)))]
28#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
29#[rustc_clean(cfg="bfail3")]
30#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
31#[rustc_clean(cfg="bfail6")]
27#[cfg(not(any(bpass1,bpass4)))]
28#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
29#[rustc_clean(cfg="bpass3")]
30#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
31#[rustc_clean(cfg="bpass6")]
3232pub fn const_negation() -> i32 {
3333 -1
3434}
......@@ -36,16 +36,16 @@ pub fn const_negation() -> i32 {
3636
3737
3838// Change constant operand of bitwise not --------------------------------------
39#[cfg(any(bfail1,bfail4))]
39#[cfg(any(bpass1,bpass4))]
4040pub fn const_bitwise_not() -> i32 {
4141 !100
4242}
4343
44#[cfg(not(any(bfail1,bfail4)))]
45#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
46#[rustc_clean(cfg="bfail3")]
47#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
48#[rustc_clean(cfg="bfail6")]
44#[cfg(not(any(bpass1,bpass4)))]
45#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
46#[rustc_clean(cfg="bpass3")]
47#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
48#[rustc_clean(cfg="bpass6")]
4949pub fn const_bitwise_not() -> i32 {
5050 !99
5151}
......@@ -53,16 +53,16 @@ pub fn const_bitwise_not() -> i32 {
5353
5454
5555// Change variable operand of negation -----------------------------------------
56#[cfg(any(bfail1,bfail4))]
56#[cfg(any(bpass1,bpass4))]
5757pub fn var_negation(x: i32, y: i32) -> i32 {
5858 -x
5959}
6060
61#[cfg(not(any(bfail1,bfail4)))]
62#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
63#[rustc_clean(cfg="bfail3")]
64#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
65#[rustc_clean(cfg="bfail6")]
61#[cfg(not(any(bpass1,bpass4)))]
62#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
63#[rustc_clean(cfg="bpass3")]
64#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
65#[rustc_clean(cfg="bpass6")]
6666pub fn var_negation(x: i32, y: i32) -> i32 {
6767 -y
6868}
......@@ -70,16 +70,16 @@ pub fn var_negation(x: i32, y: i32) -> i32 {
7070
7171
7272// Change variable operand of bitwise not --------------------------------------
73#[cfg(any(bfail1,bfail4))]
73#[cfg(any(bpass1,bpass4))]
7474pub fn var_bitwise_not(x: i32, y: i32) -> i32 {
7575 !x
7676}
7777
78#[cfg(not(any(bfail1,bfail4)))]
79#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
80#[rustc_clean(cfg="bfail3")]
81#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
82#[rustc_clean(cfg="bfail6")]
78#[cfg(not(any(bpass1,bpass4)))]
79#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
80#[rustc_clean(cfg="bpass3")]
81#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
82#[rustc_clean(cfg="bpass6")]
8383pub fn var_bitwise_not(x: i32, y: i32) -> i32 {
8484 !y
8585}
......@@ -87,16 +87,16 @@ pub fn var_bitwise_not(x: i32, y: i32) -> i32 {
8787
8888
8989// Change variable operand of deref --------------------------------------------
90#[cfg(any(bfail1,bfail4))]
90#[cfg(any(bpass1,bpass4))]
9191pub fn var_deref(x: &i32, y: &i32) -> i32 {
9292 *x
9393}
9494
95#[cfg(not(any(bfail1,bfail4)))]
96#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
97#[rustc_clean(cfg="bfail3")]
98#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
99#[rustc_clean(cfg="bfail6")]
95#[cfg(not(any(bpass1,bpass4)))]
96#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
97#[rustc_clean(cfg="bpass3")]
98#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
99#[rustc_clean(cfg="bpass6")]
100100pub fn var_deref(x: &i32, y: &i32) -> i32 {
101101 *y
102102}
......@@ -104,16 +104,16 @@ pub fn var_deref(x: &i32, y: &i32) -> i32 {
104104
105105
106106// Change first constant operand of addition -----------------------------------
107#[cfg(any(bfail1,bfail4))]
107#[cfg(any(bpass1,bpass4))]
108108pub fn first_const_add() -> i32 {
109109 1 + 3
110110}
111111
112#[cfg(not(any(bfail1,bfail4)))]
113#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
114#[rustc_clean(cfg="bfail3")]
115#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
116#[rustc_clean(cfg="bfail6")]
112#[cfg(not(any(bpass1,bpass4)))]
113#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
114#[rustc_clean(cfg="bpass3")]
115#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
116#[rustc_clean(cfg="bpass6")]
117117pub fn first_const_add() -> i32 {
118118 2 + 3
119119}
......@@ -121,16 +121,16 @@ pub fn first_const_add() -> i32 {
121121
122122
123123// Change second constant operand of addition -----------------------------------
124#[cfg(any(bfail1,bfail4))]
124#[cfg(any(bpass1,bpass4))]
125125pub fn second_const_add() -> i32 {
126126 1 + 2
127127}
128128
129#[cfg(not(any(bfail1,bfail4)))]
130#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
131#[rustc_clean(cfg="bfail3")]
132#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
133#[rustc_clean(cfg="bfail6")]
129#[cfg(not(any(bpass1,bpass4)))]
130#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
131#[rustc_clean(cfg="bpass3")]
132#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
133#[rustc_clean(cfg="bpass6")]
134134pub fn second_const_add() -> i32 {
135135 1 + 3
136136}
......@@ -138,16 +138,16 @@ pub fn second_const_add() -> i32 {
138138
139139
140140// Change first variable operand of addition -----------------------------------
141#[cfg(any(bfail1,bfail4))]
141#[cfg(any(bpass1,bpass4))]
142142pub fn first_var_add(a: i32, b: i32) -> i32 {
143143 a + 2
144144}
145145
146#[cfg(not(any(bfail1,bfail4)))]
147#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
148#[rustc_clean(cfg="bfail3")]
149#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
150#[rustc_clean(cfg="bfail6")]
146#[cfg(not(any(bpass1,bpass4)))]
147#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
148#[rustc_clean(cfg="bpass3")]
149#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
150#[rustc_clean(cfg="bpass6")]
151151pub fn first_var_add(a: i32, b: i32) -> i32 {
152152 b + 2
153153}
......@@ -155,16 +155,16 @@ pub fn first_var_add(a: i32, b: i32) -> i32 {
155155
156156
157157// Change second variable operand of addition ----------------------------------
158#[cfg(any(bfail1,bfail4))]
158#[cfg(any(bpass1,bpass4))]
159159pub fn second_var_add(a: i32, b: i32) -> i32 {
160160 1 + a
161161}
162162
163#[cfg(not(any(bfail1,bfail4)))]
164#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
165#[rustc_clean(cfg="bfail3")]
166#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
167#[rustc_clean(cfg="bfail6")]
163#[cfg(not(any(bpass1,bpass4)))]
164#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
165#[rustc_clean(cfg="bpass3")]
166#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
167#[rustc_clean(cfg="bpass6")]
168168pub fn second_var_add(a: i32, b: i32) -> i32 {
169169 1 + b
170170}
......@@ -172,16 +172,16 @@ pub fn second_var_add(a: i32, b: i32) -> i32 {
172172
173173
174174// Change operator from + to - -------------------------------------------------
175#[cfg(any(bfail1,bfail4))]
175#[cfg(any(bpass1,bpass4))]
176176pub fn plus_to_minus(a: i32) -> i32 {
177177 1 + a
178178}
179179
180#[cfg(not(any(bfail1,bfail4)))]
181#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
182#[rustc_clean(cfg="bfail3")]
183#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
184#[rustc_clean(cfg="bfail6")]
180#[cfg(not(any(bpass1,bpass4)))]
181#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
182#[rustc_clean(cfg="bpass3")]
183#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
184#[rustc_clean(cfg="bpass6")]
185185pub fn plus_to_minus(a: i32) -> i32 {
186186 1 - a
187187}
......@@ -189,16 +189,16 @@ pub fn plus_to_minus(a: i32) -> i32 {
189189
190190
191191// Change operator from + to * -------------------------------------------------
192#[cfg(any(bfail1,bfail4))]
192#[cfg(any(bpass1,bpass4))]
193193pub fn plus_to_mult(a: i32) -> i32 {
194194 1 + a
195195}
196196
197#[cfg(not(any(bfail1,bfail4)))]
198#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
199#[rustc_clean(cfg="bfail3")]
200#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
201#[rustc_clean(cfg="bfail6")]
197#[cfg(not(any(bpass1,bpass4)))]
198#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
199#[rustc_clean(cfg="bpass3")]
200#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
201#[rustc_clean(cfg="bpass6")]
202202pub fn plus_to_mult(a: i32) -> i32 {
203203 1 * a
204204}
......@@ -206,16 +206,16 @@ pub fn plus_to_mult(a: i32) -> i32 {
206206
207207
208208// Change operator from + to / -------------------------------------------------
209#[cfg(any(bfail1,bfail4))]
209#[cfg(any(bpass1,bpass4))]
210210pub fn plus_to_div(a: i32) -> i32 {
211211 1 + a
212212}
213213
214#[cfg(not(any(bfail1,bfail4)))]
215#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
216#[rustc_clean(cfg="bfail3")]
217#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
218#[rustc_clean(cfg="bfail6")]
214#[cfg(not(any(bpass1,bpass4)))]
215#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
216#[rustc_clean(cfg="bpass3")]
217#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
218#[rustc_clean(cfg="bpass6")]
219219pub fn plus_to_div(a: i32) -> i32 {
220220 1 / a
221221}
......@@ -223,16 +223,16 @@ pub fn plus_to_div(a: i32) -> i32 {
223223
224224
225225// Change operator from + to % -------------------------------------------------
226#[cfg(any(bfail1,bfail4))]
226#[cfg(any(bpass1,bpass4))]
227227pub fn plus_to_mod(a: i32) -> i32 {
228228 1 + a
229229}
230230
231#[cfg(not(any(bfail1,bfail4)))]
232#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
233#[rustc_clean(cfg="bfail3")]
234#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
235#[rustc_clean(cfg="bfail6")]
231#[cfg(not(any(bpass1,bpass4)))]
232#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
233#[rustc_clean(cfg="bpass3")]
234#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
235#[rustc_clean(cfg="bpass6")]
236236pub fn plus_to_mod(a: i32) -> i32 {
237237 1 % a
238238}
......@@ -240,16 +240,16 @@ pub fn plus_to_mod(a: i32) -> i32 {
240240
241241
242242// Change operator from && to || -----------------------------------------------
243#[cfg(any(bfail1,bfail4))]
243#[cfg(any(bpass1,bpass4))]
244244pub fn and_to_or(a: bool, b: bool) -> bool {
245245 a && b
246246}
247247
248#[cfg(not(any(bfail1,bfail4)))]
249#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
250#[rustc_clean(cfg="bfail3")]
251#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
252#[rustc_clean(cfg="bfail6")]
248#[cfg(not(any(bpass1,bpass4)))]
249#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
250#[rustc_clean(cfg="bpass3")]
251#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
252#[rustc_clean(cfg="bpass6")]
253253pub fn and_to_or(a: bool, b: bool) -> bool {
254254 a || b
255255}
......@@ -257,16 +257,16 @@ pub fn and_to_or(a: bool, b: bool) -> bool {
257257
258258
259259// Change operator from & to | -------------------------------------------------
260#[cfg(any(bfail1,bfail4))]
260#[cfg(any(bpass1,bpass4))]
261261pub fn bitwise_and_to_bitwise_or(a: i32) -> i32 {
262262 1 & a
263263}
264264
265#[cfg(not(any(bfail1,bfail4)))]
266#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
267#[rustc_clean(cfg="bfail3")]
268#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
269#[rustc_clean(cfg="bfail6")]
265#[cfg(not(any(bpass1,bpass4)))]
266#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
267#[rustc_clean(cfg="bpass3")]
268#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
269#[rustc_clean(cfg="bpass6")]
270270pub fn bitwise_and_to_bitwise_or(a: i32) -> i32 {
271271 1 | a
272272}
......@@ -274,16 +274,16 @@ pub fn bitwise_and_to_bitwise_or(a: i32) -> i32 {
274274
275275
276276// Change operator from & to ^ -------------------------------------------------
277#[cfg(any(bfail1,bfail4))]
277#[cfg(any(bpass1,bpass4))]
278278pub fn bitwise_and_to_bitwise_xor(a: i32) -> i32 {
279279 1 & a
280280}
281281
282#[cfg(not(any(bfail1,bfail4)))]
283#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
284#[rustc_clean(cfg="bfail3")]
285#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
286#[rustc_clean(cfg="bfail6")]
282#[cfg(not(any(bpass1,bpass4)))]
283#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
284#[rustc_clean(cfg="bpass3")]
285#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
286#[rustc_clean(cfg="bpass6")]
287287pub fn bitwise_and_to_bitwise_xor(a: i32) -> i32 {
288288 1 ^ a
289289}
......@@ -291,16 +291,16 @@ pub fn bitwise_and_to_bitwise_xor(a: i32) -> i32 {
291291
292292
293293// Change operator from & to << ------------------------------------------------
294#[cfg(any(bfail1,bfail4))]
294#[cfg(any(bpass1,bpass4))]
295295pub fn bitwise_and_to_lshift(a: i32) -> i32 {
296296 a & 1
297297}
298298
299#[cfg(not(any(bfail1,bfail4)))]
300#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
301#[rustc_clean(cfg="bfail3")]
302#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
303#[rustc_clean(cfg="bfail6")]
299#[cfg(not(any(bpass1,bpass4)))]
300#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
301#[rustc_clean(cfg="bpass3")]
302#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
303#[rustc_clean(cfg="bpass6")]
304304pub fn bitwise_and_to_lshift(a: i32) -> i32 {
305305 a << 1
306306}
......@@ -308,16 +308,16 @@ pub fn bitwise_and_to_lshift(a: i32) -> i32 {
308308
309309
310310// Change operator from & to >> ------------------------------------------------
311#[cfg(any(bfail1,bfail4))]
311#[cfg(any(bpass1,bpass4))]
312312pub fn bitwise_and_to_rshift(a: i32) -> i32 {
313313 a & 1
314314}
315315
316#[cfg(not(any(bfail1,bfail4)))]
317#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
318#[rustc_clean(cfg="bfail3")]
319#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
320#[rustc_clean(cfg="bfail6")]
316#[cfg(not(any(bpass1,bpass4)))]
317#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
318#[rustc_clean(cfg="bpass3")]
319#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
320#[rustc_clean(cfg="bpass6")]
321321pub fn bitwise_and_to_rshift(a: i32) -> i32 {
322322 a >> 1
323323}
......@@ -325,16 +325,16 @@ pub fn bitwise_and_to_rshift(a: i32) -> i32 {
325325
326326
327327// Change operator from == to != -----------------------------------------------
328#[cfg(any(bfail1,bfail4))]
328#[cfg(any(bpass1,bpass4))]
329329pub fn eq_to_uneq(a: i32) -> bool {
330330 a == 1
331331}
332332
333#[cfg(not(any(bfail1,bfail4)))]
334#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
335#[rustc_clean(cfg="bfail3")]
336#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
337#[rustc_clean(cfg="bfail6")]
333#[cfg(not(any(bpass1,bpass4)))]
334#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
335#[rustc_clean(cfg="bpass3")]
336#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
337#[rustc_clean(cfg="bpass6")]
338338pub fn eq_to_uneq(a: i32) -> bool {
339339 a != 1
340340}
......@@ -342,16 +342,16 @@ pub fn eq_to_uneq(a: i32) -> bool {
342342
343343
344344// Change operator from == to < ------------------------------------------------
345#[cfg(any(bfail1,bfail4))]
345#[cfg(any(bpass1,bpass4))]
346346pub fn eq_to_lt(a: i32) -> bool {
347347 a == 1
348348}
349349
350#[cfg(not(any(bfail1,bfail4)))]
351#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
352#[rustc_clean(cfg="bfail3")]
353#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
354#[rustc_clean(cfg="bfail6")]
350#[cfg(not(any(bpass1,bpass4)))]
351#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
352#[rustc_clean(cfg="bpass3")]
353#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
354#[rustc_clean(cfg="bpass6")]
355355pub fn eq_to_lt(a: i32) -> bool {
356356 a < 1
357357}
......@@ -359,16 +359,16 @@ pub fn eq_to_lt(a: i32) -> bool {
359359
360360
361361// Change operator from == to > ------------------------------------------------
362#[cfg(any(bfail1,bfail4))]
362#[cfg(any(bpass1,bpass4))]
363363pub fn eq_to_gt(a: i32) -> bool {
364364 a == 1
365365}
366366
367#[cfg(not(any(bfail1,bfail4)))]
368#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
369#[rustc_clean(cfg="bfail3")]
370#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
371#[rustc_clean(cfg="bfail6")]
367#[cfg(not(any(bpass1,bpass4)))]
368#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
369#[rustc_clean(cfg="bpass3")]
370#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
371#[rustc_clean(cfg="bpass6")]
372372pub fn eq_to_gt(a: i32) -> bool {
373373 a > 1
374374}
......@@ -376,16 +376,16 @@ pub fn eq_to_gt(a: i32) -> bool {
376376
377377
378378// Change operator from == to <= -----------------------------------------------
379#[cfg(any(bfail1,bfail4))]
379#[cfg(any(bpass1,bpass4))]
380380pub fn eq_to_le(a: i32) -> bool {
381381 a == 1
382382}
383383
384#[cfg(not(any(bfail1,bfail4)))]
385#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
386#[rustc_clean(cfg="bfail3")]
387#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
388#[rustc_clean(cfg="bfail6")]
384#[cfg(not(any(bpass1,bpass4)))]
385#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
386#[rustc_clean(cfg="bpass3")]
387#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
388#[rustc_clean(cfg="bpass6")]
389389pub fn eq_to_le(a: i32) -> bool {
390390 a <= 1
391391}
......@@ -393,16 +393,16 @@ pub fn eq_to_le(a: i32) -> bool {
393393
394394
395395// Change operator from == to >= -----------------------------------------------
396#[cfg(any(bfail1,bfail4))]
396#[cfg(any(bpass1,bpass4))]
397397pub fn eq_to_ge(a: i32) -> bool {
398398 a == 1
399399}
400400
401#[cfg(not(any(bfail1,bfail4)))]
402#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
403#[rustc_clean(cfg="bfail3")]
404#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
405#[rustc_clean(cfg="bfail6")]
401#[cfg(not(any(bpass1,bpass4)))]
402#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
403#[rustc_clean(cfg="bpass3")]
404#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
405#[rustc_clean(cfg="bpass6")]
406406pub fn eq_to_ge(a: i32) -> bool {
407407 a >= 1
408408}
......@@ -410,18 +410,18 @@ pub fn eq_to_ge(a: i32) -> bool {
410410
411411
412412// Change type in cast expression ----------------------------------------------
413#[cfg(any(bfail1,bfail4))]
413#[cfg(any(bpass1,bpass4))]
414414pub fn type_cast(a: u8) -> u64 {
415415 let b = a as i32;
416416 let c = b as u64;
417417 c
418418}
419419
420#[cfg(not(any(bfail1,bfail4)))]
421#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir,typeck_root", cfg="bfail2")]
422#[rustc_clean(cfg="bfail3")]
423#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir,typeck_root", cfg="bfail5")]
424#[rustc_clean(cfg="bfail6")]
420#[cfg(not(any(bpass1,bpass4)))]
421#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir,typeck_root", cfg="bpass2")]
422#[rustc_clean(cfg="bpass3")]
423#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir,typeck_root", cfg="bpass5")]
424#[rustc_clean(cfg="bpass6")]
425425pub fn type_cast(a: u8) -> u64 {
426426 let b = a as u32;
427427 let c = b as u64;
......@@ -431,16 +431,16 @@ pub fn type_cast(a: u8) -> u64 {
431431
432432
433433// Change value in cast expression ---------------------------------------------
434#[cfg(any(bfail1,bfail4))]
434#[cfg(any(bpass1,bpass4))]
435435pub fn value_cast(a: u32) -> i32 {
436436 1 as i32
437437}
438438
439#[cfg(not(any(bfail1,bfail4)))]
440#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
441#[rustc_clean(cfg="bfail3")]
442#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
443#[rustc_clean(cfg="bfail6")]
439#[cfg(not(any(bpass1,bpass4)))]
440#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
441#[rustc_clean(cfg="bpass3")]
442#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
443#[rustc_clean(cfg="bpass6")]
444444pub fn value_cast(a: u32) -> i32 {
445445 2 as i32
446446}
......@@ -448,7 +448,7 @@ pub fn value_cast(a: u32) -> i32 {
448448
449449
450450// Change place in assignment --------------------------------------------------
451#[cfg(any(bfail1,bfail4))]
451#[cfg(any(bpass1,bpass4))]
452452pub fn place() -> i32 {
453453 let mut x = 10;
454454 let mut y = 11;
......@@ -456,11 +456,11 @@ pub fn place() -> i32 {
456456 x
457457}
458458
459#[cfg(not(any(bfail1,bfail4)))]
460#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
461#[rustc_clean(cfg="bfail3")]
462#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
463#[rustc_clean(cfg="bfail6")]
459#[cfg(not(any(bpass1,bpass4)))]
460#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
461#[rustc_clean(cfg="bpass3")]
462#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
463#[rustc_clean(cfg="bpass6")]
464464pub fn place() -> i32 {
465465 let mut x = 10;
466466 let mut y = 11;
......@@ -471,18 +471,18 @@ pub fn place() -> i32 {
471471
472472
473473// Change r-value in assignment ------------------------------------------------
474#[cfg(any(bfail1,bfail4))]
474#[cfg(any(bpass1,bpass4))]
475475pub fn rvalue() -> i32 {
476476 let mut x = 10;
477477 x = 9;
478478 x
479479}
480480
481#[cfg(not(any(bfail1,bfail4)))]
482#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
483#[rustc_clean(cfg="bfail3")]
484#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
485#[rustc_clean(cfg="bfail6")]
481#[cfg(not(any(bpass1,bpass4)))]
482#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
483#[rustc_clean(cfg="bpass3")]
484#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
485#[rustc_clean(cfg="bpass6")]
486486pub fn rvalue() -> i32 {
487487 let mut x = 10;
488488 x = 8;
......@@ -492,16 +492,16 @@ pub fn rvalue() -> i32 {
492492
493493
494494// Change index into slice -----------------------------------------------------
495#[cfg(any(bfail1,bfail4))]
495#[cfg(any(bpass1,bpass4))]
496496pub fn index_to_slice(s: &[u8], i: usize, j: usize) -> u8 {
497497 s[i]
498498}
499499
500#[cfg(not(any(bfail1,bfail4)))]
501#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail2")]
502#[rustc_clean(cfg="bfail3")]
503#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bfail5")]
504#[rustc_clean(cfg="bfail6")]
500#[cfg(not(any(bpass1,bpass4)))]
501#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass2")]
502#[rustc_clean(cfg="bpass3")]
503#[rustc_clean(except="opt_hir_owner_nodes,optimized_mir", cfg="bpass5")]
504#[rustc_clean(cfg="bpass6")]
505505pub fn index_to_slice(s: &[u8], i: usize, j: usize) -> u8 {
506506 s[j]
507507}
tests/incremental/hashes/while_let_loops.rs+59-59
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,7 +19,7 @@
1919
2020
2121// Change loop body
22#[cfg(any(bfail1,bfail4))]
22#[cfg(any(bpass1,bpass4))]
2323pub fn change_loop_body() {
2424 let mut _x = 0;
2525 while let Some(0u32) = None {
......@@ -28,11 +28,11 @@ pub fn change_loop_body() {
2828 }
2929}
3030
31#[cfg(not(any(bfail1,bfail4)))]
32#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
33#[rustc_clean(cfg="bfail3")]
34#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
35#[rustc_clean(cfg="bfail6")]
31#[cfg(not(any(bpass1,bpass4)))]
32#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
33#[rustc_clean(cfg="bpass3")]
34#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
35#[rustc_clean(cfg="bpass6")]
3636pub fn change_loop_body() {
3737 let mut _x = 0;
3838 while let Some(0u32) = None {
......@@ -44,7 +44,7 @@ pub fn change_loop_body() {
4444
4545
4646// Change loop body
47#[cfg(any(bfail1,bfail4))]
47#[cfg(any(bpass1,bpass4))]
4848pub fn change_loop_condition() {
4949 let mut _x = 0;
5050 while let Some(0u32) = None {
......@@ -53,11 +53,11 @@ pub fn change_loop_condition() {
5353 }
5454}
5555
56#[cfg(not(any(bfail1,bfail4)))]
57#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
58#[rustc_clean(cfg="bfail3")]
59#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
60#[rustc_clean(cfg="bfail6")]
56#[cfg(not(any(bpass1,bpass4)))]
57#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
58#[rustc_clean(cfg="bpass3")]
59#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
60#[rustc_clean(cfg="bpass6")]
6161pub fn change_loop_condition() {
6262 let mut _x = 0;
6363 while let Some(1u32) = None {
......@@ -69,7 +69,7 @@ pub fn change_loop_condition() {
6969
7070
7171// Add break
72#[cfg(any(bfail1,bfail4))]
72#[cfg(any(bpass1,bpass4))]
7373pub fn add_break() {
7474 let mut _x = 0;
7575 while let Some(0u32) = None {
......@@ -78,11 +78,11 @@ pub fn add_break() {
7878 }
7979}
8080
81#[cfg(not(any(bfail1,bfail4)))]
82#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, typeck_root")]
83#[rustc_clean(cfg="bfail3")]
84#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, typeck_root")]
85#[rustc_clean(cfg="bfail6")]
81#[cfg(not(any(bpass1,bpass4)))]
82#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, typeck_root")]
83#[rustc_clean(cfg="bpass3")]
84#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, typeck_root")]
85#[rustc_clean(cfg="bpass6")]
8686pub fn add_break() {
8787 let mut _x = 0;
8888 while let Some(0u32) = None {
......@@ -94,7 +94,7 @@ pub fn add_break() {
9494
9595
9696// Add loop label
97#[cfg(any(bfail1,bfail4))]
97#[cfg(any(bpass1,bpass4))]
9898pub fn add_loop_label() {
9999 let mut _x = 0;
100100 while let Some(0u32) = None {
......@@ -103,11 +103,11 @@ pub fn add_loop_label() {
103103 }
104104}
105105
106#[cfg(not(any(bfail1,bfail4)))]
107#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
108#[rustc_clean(cfg="bfail3")]
109#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
110#[rustc_clean(cfg="bfail6")]
106#[cfg(not(any(bpass1,bpass4)))]
107#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
108#[rustc_clean(cfg="bpass3")]
109#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
110#[rustc_clean(cfg="bpass6")]
111111pub fn add_loop_label() {
112112 let mut _x = 0;
113113 'label: while let Some(0u32) = None {
......@@ -119,7 +119,7 @@ pub fn add_loop_label() {
119119
120120
121121// Add loop label to break
122#[cfg(any(bfail1,bfail4))]
122#[cfg(any(bpass1,bpass4))]
123123pub fn add_loop_label_to_break() {
124124 let mut _x = 0;
125125 'label: while let Some(0u32) = None {
......@@ -128,11 +128,11 @@ pub fn add_loop_label_to_break() {
128128 }
129129}
130130
131#[cfg(not(any(bfail1,bfail4)))]
132#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
133#[rustc_clean(cfg="bfail3")]
134#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
135#[rustc_clean(cfg="bfail6")]
131#[cfg(not(any(bpass1,bpass4)))]
132#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
133#[rustc_clean(cfg="bpass3")]
134#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
135#[rustc_clean(cfg="bpass6")]
136136pub fn add_loop_label_to_break() {
137137 let mut _x = 0;
138138 'label: while let Some(0u32) = None {
......@@ -144,7 +144,7 @@ pub fn add_loop_label_to_break() {
144144
145145
146146// Change break label
147#[cfg(any(bfail1,bfail4))]
147#[cfg(any(bpass1,bpass4))]
148148pub fn change_break_label() {
149149 let mut _x = 0;
150150 'outer: while let Some(0u32) = None {
......@@ -155,11 +155,11 @@ pub fn change_break_label() {
155155 }
156156}
157157
158#[cfg(not(any(bfail1,bfail4)))]
159#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
160#[rustc_clean(cfg="bfail3")]
161#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
162#[rustc_clean(cfg="bfail6")]
158#[cfg(not(any(bpass1,bpass4)))]
159#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
160#[rustc_clean(cfg="bpass3")]
161#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
162#[rustc_clean(cfg="bpass6")]
163163pub fn change_break_label() {
164164 let mut _x = 0;
165165 'outer: while let Some(0u32) = None {
......@@ -171,7 +171,7 @@ pub fn change_break_label() {
171171}
172172
173173// Add loop label to continue
174#[cfg(any(bfail1,bfail4))]
174#[cfg(any(bpass1,bpass4))]
175175pub fn add_loop_label_to_continue() {
176176 let mut _x = 0;
177177 'label: while let Some(0u32) = None {
......@@ -180,11 +180,11 @@ pub fn add_loop_label_to_continue() {
180180 }
181181}
182182
183#[cfg(not(any(bfail1,bfail4)))]
184#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
185#[rustc_clean(cfg="bfail3")]
186#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
187#[rustc_clean(cfg="bfail6")]
183#[cfg(not(any(bpass1,bpass4)))]
184#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
185#[rustc_clean(cfg="bpass3")]
186#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
187#[rustc_clean(cfg="bpass6")]
188188pub fn add_loop_label_to_continue() {
189189 let mut _x = 0;
190190 'label: while let Some(0u32) = None {
......@@ -196,7 +196,7 @@ pub fn add_loop_label_to_continue() {
196196
197197
198198// Change continue label
199#[cfg(any(bfail1,bfail4))]
199#[cfg(any(bpass1,bpass4))]
200200pub fn change_continue_label() {
201201 let mut _x = 0;
202202 'outer: while let Some(0u32) = None {
......@@ -207,11 +207,11 @@ pub fn change_continue_label() {
207207 }
208208}
209209
210#[cfg(not(any(bfail1,bfail4)))]
211#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
212#[rustc_clean(cfg="bfail3")]
213#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
214#[rustc_clean(cfg="bfail6")]
210#[cfg(not(any(bpass1,bpass4)))]
211#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
212#[rustc_clean(cfg="bpass3")]
213#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
214#[rustc_clean(cfg="bpass6")]
215215pub fn change_continue_label() {
216216 let mut _x = 0;
217217 'outer: while let Some(0u32) = None {
......@@ -225,7 +225,7 @@ pub fn change_continue_label() {
225225
226226
227227// Change continue to break
228#[cfg(any(bfail1,bfail4))]
228#[cfg(any(bpass1,bpass4))]
229229pub fn change_continue_to_break() {
230230 let mut _x = 0;
231231 while let Some(0u32) = None {
......@@ -234,11 +234,11 @@ pub fn change_continue_to_break() {
234234 }
235235}
236236
237#[cfg(not(any(bfail1,bfail4)))]
238#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
239#[rustc_clean(cfg="bfail3")]
240#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
241#[rustc_clean(cfg="bfail6")]
237#[cfg(not(any(bpass1,bpass4)))]
238#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
239#[rustc_clean(cfg="bpass3")]
240#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
241#[rustc_clean(cfg="bpass6")]
242242pub fn change_continue_to_break() {
243243 let mut _x = 0;
244244 while let Some(0u32) = None {
tests/incremental/hashes/while_loops.rs+59-59
......@@ -5,13 +5,13 @@
55// and make sure that the hash has changed, then change nothing between rev2 and
66// rev3 and make sure that the hash has not changed.
77
8//@ build-pass (FIXME(62277): could be check-pass?)
9//@ revisions: bfail1 bfail2 bfail3 bfail4 bfail5 bfail6
8//@ revisions: bpass1 bpass2 bpass3 bpass4 bpass5 bpass6
109//@ compile-flags: -Z query-dep-graph -O
11//@ [bfail1]compile-flags: -Zincremental-ignore-spans
12//@ [bfail2]compile-flags: -Zincremental-ignore-spans
13//@ [bfail3]compile-flags: -Zincremental-ignore-spans
10//@ [bpass1]compile-flags: -Zincremental-ignore-spans
11//@ [bpass2]compile-flags: -Zincremental-ignore-spans
12//@ [bpass3]compile-flags: -Zincremental-ignore-spans
1413//@ ignore-backends: gcc
14// FIXME(#62277): could be check-pass?
1515
1616#![allow(warnings)]
1717#![feature(rustc_attrs)]
......@@ -19,7 +19,7 @@
1919
2020
2121// Change loop body
22#[cfg(any(bfail1,bfail4))]
22#[cfg(any(bpass1,bpass4))]
2323pub fn change_loop_body() {
2424 let mut _x = 0;
2525 while true {
......@@ -28,11 +28,11 @@ pub fn change_loop_body() {
2828 }
2929}
3030
31#[cfg(not(any(bfail1,bfail4)))]
32#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
33#[rustc_clean(cfg="bfail3")]
34#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
35#[rustc_clean(cfg="bfail6")]
31#[cfg(not(any(bpass1,bpass4)))]
32#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
33#[rustc_clean(cfg="bpass3")]
34#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
35#[rustc_clean(cfg="bpass6")]
3636pub fn change_loop_body() {
3737 let mut _x = 0;
3838 while true {
......@@ -44,7 +44,7 @@ pub fn change_loop_body() {
4444
4545
4646// Change loop body
47#[cfg(any(bfail1,bfail4))]
47#[cfg(any(bpass1,bpass4))]
4848pub fn change_loop_condition() {
4949 let mut _x = 0;
5050 while true {
......@@ -53,11 +53,11 @@ pub fn change_loop_condition() {
5353 }
5454}
5555
56#[cfg(not(any(bfail1,bfail4)))]
57#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
58#[rustc_clean(cfg="bfail3")]
59#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
60#[rustc_clean(cfg="bfail6")]
56#[cfg(not(any(bpass1,bpass4)))]
57#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
58#[rustc_clean(cfg="bpass3")]
59#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
60#[rustc_clean(cfg="bpass6")]
6161pub fn change_loop_condition() {
6262 let mut _x = 0;
6363 while false {
......@@ -69,7 +69,7 @@ pub fn change_loop_condition() {
6969
7070
7171// Add break
72#[cfg(any(bfail1,bfail4))]
72#[cfg(any(bpass1,bpass4))]
7373pub fn add_break() {
7474 let mut _x = 0;
7575 while true {
......@@ -78,11 +78,11 @@ pub fn add_break() {
7878 }
7979}
8080
81#[cfg(not(any(bfail1,bfail4)))]
82#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
83#[rustc_clean(cfg="bfail3")]
84#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
85#[rustc_clean(cfg="bfail6")]
81#[cfg(not(any(bpass1,bpass4)))]
82#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
83#[rustc_clean(cfg="bpass3")]
84#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir, typeck_root")]
85#[rustc_clean(cfg="bpass6")]
8686pub fn add_break() {
8787 let mut _x = 0;
8888 while true {
......@@ -94,7 +94,7 @@ pub fn add_break() {
9494
9595
9696// Add loop label
97#[cfg(any(bfail1,bfail4))]
97#[cfg(any(bpass1,bpass4))]
9898pub fn add_loop_label() {
9999 let mut _x = 0;
100100 while true {
......@@ -103,11 +103,11 @@ pub fn add_loop_label() {
103103 }
104104}
105105
106#[cfg(not(any(bfail1,bfail4)))]
107#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
108#[rustc_clean(cfg="bfail3")]
109#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
110#[rustc_clean(cfg="bfail6")]
106#[cfg(not(any(bpass1,bpass4)))]
107#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
108#[rustc_clean(cfg="bpass3")]
109#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
110#[rustc_clean(cfg="bpass6")]
111111pub fn add_loop_label() {
112112 let mut _x = 0;
113113 'label: while true {
......@@ -119,7 +119,7 @@ pub fn add_loop_label() {
119119
120120
121121// Add loop label to break
122#[cfg(any(bfail1,bfail4))]
122#[cfg(any(bpass1,bpass4))]
123123pub fn add_loop_label_to_break() {
124124 let mut _x = 0;
125125 'label: while true {
......@@ -128,11 +128,11 @@ pub fn add_loop_label_to_break() {
128128 }
129129}
130130
131#[cfg(not(any(bfail1,bfail4)))]
132#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
133#[rustc_clean(cfg="bfail3")]
134#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
135#[rustc_clean(cfg="bfail6")]
131#[cfg(not(any(bpass1,bpass4)))]
132#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
133#[rustc_clean(cfg="bpass3")]
134#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
135#[rustc_clean(cfg="bpass6")]
136136pub fn add_loop_label_to_break() {
137137 let mut _x = 0;
138138 'label: while true {
......@@ -144,7 +144,7 @@ pub fn add_loop_label_to_break() {
144144
145145
146146// Change break label
147#[cfg(any(bfail1,bfail4))]
147#[cfg(any(bpass1,bpass4))]
148148pub fn change_break_label() {
149149 let mut _x = 0;
150150 'outer: while true {
......@@ -155,11 +155,11 @@ pub fn change_break_label() {
155155 }
156156}
157157
158#[cfg(not(any(bfail1,bfail4)))]
159#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes,optimized_mir")]
160#[rustc_clean(cfg="bfail3")]
161#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes,optimized_mir")]
162#[rustc_clean(cfg="bfail6")]
158#[cfg(not(any(bpass1,bpass4)))]
159#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes,optimized_mir")]
160#[rustc_clean(cfg="bpass3")]
161#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes,optimized_mir")]
162#[rustc_clean(cfg="bpass6")]
163163pub fn change_break_label() {
164164 let mut _x = 0;
165165 'outer: while true {
......@@ -173,7 +173,7 @@ pub fn change_break_label() {
173173
174174
175175// Add loop label to continue
176#[cfg(any(bfail1,bfail4))]
176#[cfg(any(bpass1,bpass4))]
177177pub fn add_loop_label_to_continue() {
178178 let mut _x = 0;
179179 'label: while true {
......@@ -182,11 +182,11 @@ pub fn add_loop_label_to_continue() {
182182 }
183183}
184184
185#[cfg(not(any(bfail1,bfail4)))]
186#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
187#[rustc_clean(cfg="bfail3")]
188#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
189#[rustc_clean(cfg="bfail6")]
185#[cfg(not(any(bpass1,bpass4)))]
186#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
187#[rustc_clean(cfg="bpass3")]
188#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
189#[rustc_clean(cfg="bpass6")]
190190pub fn add_loop_label_to_continue() {
191191 let mut _x = 0;
192192 'label: while true {
......@@ -198,7 +198,7 @@ pub fn add_loop_label_to_continue() {
198198
199199
200200// Change continue label
201#[cfg(any(bfail1,bfail4))]
201#[cfg(any(bpass1,bpass4))]
202202pub fn change_continue_label() {
203203 let mut _x = 0;
204204 'outer: while true {
......@@ -209,11 +209,11 @@ pub fn change_continue_label() {
209209 }
210210}
211211
212#[cfg(not(any(bfail1,bfail4)))]
213#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes")]
214#[rustc_clean(cfg="bfail3")]
215#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes")]
216#[rustc_clean(cfg="bfail6")]
212#[cfg(not(any(bpass1,bpass4)))]
213#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes")]
214#[rustc_clean(cfg="bpass3")]
215#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes")]
216#[rustc_clean(cfg="bpass6")]
217217pub fn change_continue_label() {
218218 let mut _x = 0;
219219 'outer: while true {
......@@ -227,7 +227,7 @@ pub fn change_continue_label() {
227227
228228
229229// Change continue to break
230#[cfg(any(bfail1,bfail4))]
230#[cfg(any(bpass1,bpass4))]
231231pub fn change_continue_to_break() {
232232 let mut _x = 0;
233233 while true {
......@@ -236,11 +236,11 @@ pub fn change_continue_to_break() {
236236 }
237237}
238238
239#[cfg(not(any(bfail1,bfail4)))]
240#[rustc_clean(cfg="bfail2", except="opt_hir_owner_nodes, optimized_mir")]
241#[rustc_clean(cfg="bfail3")]
242#[rustc_clean(cfg="bfail5", except="opt_hir_owner_nodes, optimized_mir")]
243#[rustc_clean(cfg="bfail6")]
239#[cfg(not(any(bpass1,bpass4)))]
240#[rustc_clean(cfg="bpass2", except="opt_hir_owner_nodes, optimized_mir")]
241#[rustc_clean(cfg="bpass3")]
242#[rustc_clean(cfg="bpass5", except="opt_hir_owner_nodes, optimized_mir")]
243#[rustc_clean(cfg="bpass6")]
244244pub fn change_continue_to_break() {
245245 let mut _x = 0;
246246 while true {
tests/incremental/ich_nested_items.rs+6-6
......@@ -1,24 +1,24 @@
11// Check that the hash of `foo` doesn't change just because we ordered
22// the nested items (or even added new ones).
33
4//@ revisions: bfail1 bfail2
5//@ build-pass (FIXME(62277): could be check-pass?)
4//@ revisions: bpass1 bpass2
65//@ compile-flags: -Z query-dep-graph
76//@ ignore-backends: gcc
7// FIXME(#62277): could be check-pass?
88
99#![crate_type = "rlib"]
1010#![feature(rustc_attrs)]
1111#![allow(dead_code)]
1212
13#[rustc_clean(except = "opt_hir_owner_nodes", cfg = "bfail2")]
13#[rustc_clean(except = "opt_hir_owner_nodes", cfg = "bpass2")]
1414pub fn foo() {
15 #[cfg(bfail1)]
15 #[cfg(bpass1)]
1616 pub fn baz() {} // order is different...
1717
18 #[rustc_clean(cfg = "bfail2")]
18 #[rustc_clean(cfg = "bpass2")]
1919 pub fn bar() {} // but that doesn't matter.
2020
21 #[cfg(bfail2)]
21 #[cfg(bpass2)]
2222 pub fn baz() {} // order is different...
2323
2424 pub fn bap() {} // neither does adding a new item
tests/incremental/incremental_proc_macro.rs+2-2
......@@ -1,7 +1,7 @@
11//@ proc-macro: incremental_proc_macro_aux.rs
2//@ revisions: bfail1 bfail2
3//@ build-pass (FIXME(62277): could be check-pass?)
2//@ revisions: bpass1 bpass2
43//@ ignore-backends: gcc
4// FIXME(#62277): could be check-pass?
55
66// This test makes sure that we still find the proc-macro registrar function
77// when we compile proc-macros incrementally (see #47292).
tests/incremental/issue-42602.rs+6-6
......@@ -6,10 +6,10 @@
66// This was fixed by improving the resolution of the `FnOnce` trait
77// selection node.
88
9//@ revisions: bfail1 bfail2 bfail3
9//@ revisions: bpass1 bpass2 bpass3
1010//@ compile-flags:-Zquery-dep-graph
11//@ build-pass (FIXME(62277): could be check-pass?)
1211//@ ignore-backends: gcc
12// FIXME(#62277): could be check-pass?
1313
1414#![feature(rustc_attrs)]
1515
......@@ -19,14 +19,14 @@ fn main() {
1919}
2020
2121mod a {
22 #[cfg(bfail1)]
22 #[cfg(bpass1)]
2323 pub fn foo() {
2424 let x = vec![1, 2, 3];
2525 let v = || ::std::mem::drop(x);
2626 v();
2727 }
2828
29 #[cfg(not(bfail1))]
29 #[cfg(not(bpass1))]
3030 pub fn foo() {
3131 let x = vec![1, 2, 3, 4];
3232 let v = || ::std::mem::drop(x);
......@@ -35,8 +35,8 @@ mod a {
3535}
3636
3737mod b {
38 #[rustc_clean(cfg="bfail2")]
39 #[rustc_clean(cfg="bfail3")]
38 #[rustc_clean(cfg="bpass2")]
39 #[rustc_clean(cfg="bpass3")]
4040 pub fn bar() {
4141 let x = vec![1, 2, 3];
4242 let v = || ::std::mem::drop(x);
tests/incremental/issue-49595/issue-49595.rs+6-7
......@@ -1,16 +1,15 @@
1//@ revisions: bfail1 bfail2 bfail3
1//@ revisions: bpass1 bpass2 bpass3
22//@ compile-flags: -Z query-dep-graph --test
3//@ build-pass
43//@ ignore-backends: gcc
54
65#![feature(rustc_attrs)]
76#![crate_type = "rlib"]
87
9#![rustc_partition_codegened(module="issue_49595-tests", cfg="bfail2")]
10#![rustc_partition_codegened(module="issue_49595-lit_test", cfg="bfail3")]
8#![rustc_partition_codegened(module="issue_49595-tests", cfg="bpass2")]
9#![rustc_partition_codegened(module="issue_49595-lit_test", cfg="bpass3")]
1110
1211mod tests {
13 #[cfg_attr(not(bfail1), test)]
12 #[cfg_attr(not(bpass1), test)]
1413 fn _test() {
1514 }
1615}
......@@ -20,8 +19,8 @@ mod tests {
2019// takes effect.
2120
2221// replacing a module to have a stable span
23#[cfg_attr(not(bfail3), path = "auxiliary/lit_a.rs")]
24#[cfg_attr(bfail3, path = "auxiliary/lit_b.rs")]
22#[cfg_attr(not(bpass3), path = "auxiliary/lit_a.rs")]
23#[cfg_attr(bpass3, path = "auxiliary/lit_b.rs")]
2524mod lit;
2625
2726pub mod lit_test {
tests/incremental/issue-59523-on-implemented-is-not-unused.rs+2-2
......@@ -2,9 +2,9 @@
22// rustc_on_unimplemented, but with this bug we are seeing it fire (on
33// subsequent runs) if incremental compilation is enabled.
44
5//@ revisions: bfail1 bfail2
6//@ build-pass (FIXME(62277): could be check-pass?)
5//@ revisions: bpass1 bpass2
76//@ ignore-backends: gcc
7// FIXME(#62277): could be check-pass?
88
99#![feature(rustc_attrs)]
1010#![deny(unused_attributes)]
tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs+2-2
......@@ -3,9 +3,9 @@
33// seeing it fire (on subsequent runs) if incremental compilation is
44// enabled.
55
6//@ revisions: bfail1 bfail2
7//@ build-pass (FIXME(62277): could be check-pass?)
6//@ revisions: bpass1 bpass2
87//@ ignore-backends: gcc
8// FIXME(#62277): could be check-pass?
99
1010#![feature(rustc_attrs)]
1111#![deny(unused_attributes)]
tests/incremental/issue-84252-global-alloc.rs+2-3
......@@ -1,5 +1,4 @@
1//@ revisions: bfail1 bfail2
2//@ build-pass
1//@ revisions: bpass1 bpass2
32//@ needs-crate-type: cdylib
43
54#![crate_type="lib"]
......@@ -8,6 +7,6 @@
87#[allow(unused_imports)]
98use std::alloc::System;
109
11#[cfg(bfail1)]
10#[cfg(bpass1)]
1211#[global_allocator]
1312static ALLOC: System = System;
tests/incremental/issue-85360-eval-obligation-ice.rs+3-4
......@@ -1,8 +1,7 @@
1//@ revisions: bfail1 bfail2
2//@[bfail1] compile-flags: --crate-type=lib -Zassert-incr-state=not-loaded
3//@[bfail2] compile-flags: --crate-type=lib -Zassert-incr-state=loaded
1//@ revisions: bpass1 bpass2
2//@[bpass1] compile-flags: --crate-type=lib -Zassert-incr-state=not-loaded
3//@[bpass2] compile-flags: --crate-type=lib -Zassert-incr-state=loaded
44//@ edition: 2021
5//@ build-pass
65//@ ignore-backends: gcc
76
87#![allow(dead_code)]
tests/incremental/krate-inherent.rs+5-5
......@@ -1,11 +1,11 @@
1//@ revisions: bfail1 bfail2
1//@ revisions: bpass1 bpass2
22//@ compile-flags: -Z query-dep-graph
3//@ build-pass (FIXME(62277): could be check-pass?)
43//@ ignore-backends: gcc
4// FIXME(#62277): could be check-pass?
55
66#![allow(warnings)]
77#![feature(rustc_attrs)]
8#![rustc_partition_reused(module = "krate_inherent-x", cfg = "bfail2")]
8#![rustc_partition_reused(module = "krate_inherent-x", cfg = "bpass2")]
99#![crate_type = "rlib"]
1010
1111pub mod x {
......@@ -20,5 +20,5 @@ pub mod x {
2020 }
2121}
2222
23#[cfg(bfail1)]
24pub fn bar() {} // remove this unrelated fn in bfail2, which should not affect `x::method`
23#[cfg(bpass1)]
24pub fn bar() {} // remove this unrelated fn in bpass2, which should not affect `x::method`
tests/incremental/lto-in-linker.rs+2-3
......@@ -1,9 +1,8 @@
1//@ revisions: bfail1 bfail2
1//@ revisions: bpass1 bpass2
22//@ compile-flags: -Z query-dep-graph --crate-type rlib -C linker-plugin-lto -O
33//@ no-prefer-dynamic
4//@ build-pass
54
65#![feature(rustc_attrs)]
7#![rustc_partition_reused(module = "lto_in_linker", cfg = "bfail2")]
6#![rustc_partition_reused(module = "lto_in_linker", cfg = "bpass2")]
87
98pub fn foo() {}
tests/incremental/macro_export.rs+2-2
......@@ -1,6 +1,6 @@
1//@ revisions: bfail1 bfail2 bfail3
2//@ build-pass (FIXME(62277): could be check-pass?)
1//@ revisions: bpass1 bpass2 bpass3
32//@ ignore-backends: gcc
3// FIXME(#62277): could be check-pass?
44
55// This test case makes sure that we can compile with incremental compilation
66// enabled when there are macros exported from this crate. (See #37756)
tests/incremental/no_mangle.rs+1-2
......@@ -1,5 +1,4 @@
1//@ revisions: bfail1 bfail2
2//@ check-pass
1//@ revisions: cpass1 cpass2
32//@ compile-flags: --crate-type cdylib
43//@ needs-crate-type: cdylib
54
tests/incremental/remove_source_file/main.rs+5-5
......@@ -1,24 +1,24 @@
11// This test case makes sure that the compiler doesn't crash due to a failing
22// table lookup when a source file is removed.
33
4//@ revisions: bfail1 bfail2
4//@ revisions: bpass1 bpass2
55
66// Note that we specify -g so that the SourceFiles actually get referenced by the
77// incr. comp. cache:
88//@ compile-flags: -Z query-dep-graph -g
9//@ build-pass (FIXME(62277): could be check-pass?)
9// FIXME(#62277): could be check-pass?
1010
1111#![crate_type= "rlib"]
1212
13#[cfg(bfail1)]
13#[cfg(bpass1)]
1414mod auxiliary;
1515
16#[cfg(bfail1)]
16#[cfg(bpass1)]
1717pub fn foo() {
1818 auxiliary::print_hello();
1919}
2020
21#[cfg(bfail2)]
21#[cfg(bpass2)]
2222pub fn foo() {
2323 println!("hello");
2424}
tests/incremental/rlib-lto.rs+2-3
......@@ -1,8 +1,7 @@
1//@ revisions: bfail1 bfail2
1//@ revisions: bpass1 bpass2
22//@ compile-flags: -Z query-dep-graph --crate-type rlib -C lto
3//@ build-pass
43
54#![feature(rustc_attrs)]
6#![rustc_partition_reused(module = "rlib_lto", cfg = "bfail2")]
5#![rustc_partition_reused(module = "rlib_lto", cfg = "bpass2")]
76
87pub fn foo() {}
tests/incremental/string_constant.rs+7-7
......@@ -1,6 +1,6 @@
1//@ revisions: bfail1 bfail2
1//@ revisions: bpass1 bpass2
22//@ compile-flags: -Z query-dep-graph -Copt-level=0
3//@ build-pass (FIXME(62277): could be check-pass?)
3// FIXME(#62277): could be check-pass?
44
55#![allow(warnings)]
66#![feature(rustc_attrs)]
......@@ -11,13 +11,13 @@
1111// needed even for callers of `x`.
1212
1313pub mod x {
14 #[cfg(bfail1)]
14 #[cfg(bpass1)]
1515 pub fn x() {
1616 println!("{}", "1");
1717 }
1818
19 #[cfg(bfail2)]
20 #[rustc_clean(except = "opt_hir_owner_nodes,optimized_mir", cfg = "bfail2")]
19 #[cfg(bpass2)]
20 #[rustc_clean(except = "opt_hir_owner_nodes,optimized_mir", cfg = "bpass2")]
2121 pub fn x() {
2222 println!("{}", "2");
2323 }
......@@ -26,7 +26,7 @@ pub mod x {
2626pub mod y {
2727 use x;
2828
29 #[rustc_clean(cfg = "bfail2")]
29 #[rustc_clean(cfg = "bpass2")]
3030 pub fn y() {
3131 x::x();
3232 }
......@@ -35,7 +35,7 @@ pub mod y {
3535pub mod z {
3636 use y;
3737
38 #[rustc_clean(cfg = "bfail2")]
38 #[rustc_clean(cfg = "bpass2")]
3939 pub fn z() {
4040 y::y();
4141 }
tests/incremental/thinlto/cgu_invalidated_via_import.rs+7-8
......@@ -2,37 +2,36 @@
22// via ThinLTO and that imported thing changes while the definition of the CGU
33// stays untouched.
44
5//@ revisions: bfail1 bfail2 bfail3
5//@ revisions: bpass1 bpass2 bpass3
66//@ compile-flags: -Z query-dep-graph -O
7//@ build-pass
87//@ ignore-backends: gcc
98
109#![feature(rustc_attrs)]
1110#![crate_type="rlib"]
1211
1312#![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-foo",
14 cfg="bfail2",
13 cfg="bpass2",
1514 kind="no")]
1615#![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-foo",
17 cfg="bfail3",
16 cfg="bpass3",
1817 kind="pre-lto")] // Should be "post-lto", see issue #119076
1918
2019#![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-bar",
21 cfg="bfail2",
20 cfg="bpass2",
2221 kind="pre-lto")]
2322#![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-bar",
24 cfg="bfail3",
23 cfg="bpass3",
2524 kind="pre-lto")] // Should be "post-lto", see issue #119076
2625
2726mod foo {
2827
2928 // Trivial functions like this one are imported very reliably by ThinLTO.
30 #[cfg(bfail1)]
29 #[cfg(bpass1)]
3130 pub fn inlined_fn() -> u32 {
3231 1234
3332 }
3433
35 #[cfg(not(bfail1))]
34 #[cfg(not(bpass1))]
3635 pub fn inlined_fn() -> u32 {
3736 // See `cgu_keeps_identical_fn.rs` for why this is different
3837 // from the other version of this function.
tests/incremental/thinlto/cgu_invalidated_when_export_added.rs+2-3
......@@ -1,5 +1,4 @@
1//@ revisions: bfail1 bfail2
2//@ build-pass
1//@ revisions: bpass1 bpass2
32//@ ignore-backends: gcc
43
54// rust-lang/rust#69798:
......@@ -18,7 +17,7 @@ impl Drop for Foo {
1817pub extern "C" fn run() {
1918 thread_local! { pub static FOO : Foo = Foo { } ; }
2019
21 #[cfg(bfail2)]
20 #[cfg(bpass2)]
2221 {
2322 FOO.with(|_f| ())
2423 }
tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs+2-3
......@@ -1,5 +1,4 @@
1//@ revisions: bfail1 bfail2
2//@ build-pass
1//@ revisions: bpass1 bpass2
32//@ ignore-backends: gcc
43
54// rust-lang/rust#69798:
......@@ -18,7 +17,7 @@ impl Drop for Foo {
1817pub extern "C" fn run() {
1918 thread_local! { pub static FOO : Foo = Foo { } ; }
2019
21 #[cfg(bfail1)]
20 #[cfg(bpass1)]
2221 {
2322 FOO.with(|_f| ())
2423 }
tests/incremental/thinlto/cgu_invalidated_when_import_added.rs+5-6
......@@ -1,6 +1,5 @@
1//@ revisions: bfail1 bfail2
1//@ revisions: bpass1 bpass2
22//@ compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10
3//@ build-pass
43//@ ignore-backends: gcc
54
65// rust-lang/rust#59535:
......@@ -28,16 +27,16 @@ fn main() {
2827
2928mod foo {
3029
31 // In bfail1, ThinLTO decides that foo() does not get inlined into main, and
30 // In bpass1, ThinLTO decides that foo() does not get inlined into main, and
3231 // instead bar() gets inlined into foo().
33 // In bfail2, foo() gets inlined into main.
32 // In bpass2, foo() gets inlined into main.
3433 pub fn foo(){
3534 bar()
3635 }
3736
3837 // This function needs to be big so that it does not get inlined by ThinLTO
3938 // but *does* get inlined into foo() when it is declared `internal` in
40 // bfail1 (alone).
39 // bpass1 (alone).
4140 pub fn bar(){
4241 println!("quux1");
4342 println!("quux2");
......@@ -55,7 +54,7 @@ mod bar {
5554
5655 #[inline(never)]
5756 pub fn baz() {
58 #[cfg(bfail2)]
57 #[cfg(bpass2)]
5958 {
6059 crate::foo::bar();
6160 }
tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs+5-6
......@@ -1,6 +1,5 @@
1//@ revisions: bfail1 bfail2
1//@ revisions: bpass1 bpass2
22//@ compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10
3//@ build-pass
43//@ ignore-backends: gcc
54
65// rust-lang/rust#59535:
......@@ -38,8 +37,8 @@ fn main() {
3837
3938mod foo {
4039
41 // In bfail1, foo() gets inlined into main.
42 // In bfail2, ThinLTO decides that foo() does not get inlined into main, and
40 // In bpass1, foo() gets inlined into main.
41 // In bpass2, ThinLTO decides that foo() does not get inlined into main, and
4342 // instead bar() gets inlined into foo(). But faulty logic in our incr.
4443 // ThinLTO implementation thought that `main()` is unchanged and thus reused
4544 // the object file still containing a call to the now non-existent bar().
......@@ -49,7 +48,7 @@ mod foo {
4948
5049 // This function needs to be big so that it does not get inlined by ThinLTO
5150 // but *does* get inlined into foo() once it is declared `internal` in
52 // bfail2.
51 // bpass2.
5352 pub fn bar(){
5453 println!("quux1");
5554 println!("quux2");
......@@ -67,7 +66,7 @@ mod bar {
6766
6867 #[inline(never)]
6968 pub fn baz() {
70 #[cfg(bfail1)]
69 #[cfg(bpass1)]
7170 {
7271 crate::foo::bar();
7372 }
tests/incremental/thinlto/cgu_keeps_identical_fn.rs+7-8
......@@ -3,43 +3,42 @@
33// ends up with any spans in its LLVM bitecode, so LLVM is able to skip
44// re-building any modules which import 'inlined_fn'
55
6//@ revisions: bfail1 bfail2 bfail3
6//@ revisions: bpass1 bpass2 bpass3
77//@ compile-flags: -Z query-dep-graph -O
8//@ build-pass
98//@ ignore-backends: gcc
109
1110#![feature(rustc_attrs)]
1211#![crate_type = "rlib"]
1312#![rustc_expected_cgu_reuse(
1413 module = "cgu_keeps_identical_fn-foo",
15 cfg = "bfail2",
14 cfg = "bpass2",
1615 kind = "pre-lto"
1716)]
1817#![rustc_expected_cgu_reuse(
1918 module = "cgu_keeps_identical_fn-foo",
20 cfg = "bfail3",
19 cfg = "bpass3",
2120 kind = "pre-lto" // Should be "post-lto", see issue #119076
2221)]
2322#![rustc_expected_cgu_reuse(
2423 module = "cgu_keeps_identical_fn-bar",
25 cfg = "bfail2",
24 cfg = "bpass2",
2625 kind = "pre-lto" // Should be "post-lto", see issue #119076
2726)]
2827#![rustc_expected_cgu_reuse(
2928 module = "cgu_keeps_identical_fn-bar",
30 cfg = "bfail3",
29 cfg = "bpass3",
3130 kind = "pre-lto" // Should be "post-lto", see issue #119076
3231)]
3332
3433mod foo {
3534
3635 // Trivial functions like this one are imported very reliably by ThinLTO.
37 #[cfg(bfail1)]
36 #[cfg(bpass1)]
3837 pub fn inlined_fn() -> u32 {
3938 1234
4039 }
4140
42 #[cfg(not(bfail1))]
41 #[cfg(not(bpass1))]
4342 pub fn inlined_fn() -> u32 {
4443 1234
4544 }
tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs+9-10
......@@ -1,42 +1,41 @@
11// This test checks that a change in a CGU does not invalidate an unrelated CGU
22// during incremental ThinLTO.
33
4//@ revisions: bfail1 bfail2 bfail3
4//@ revisions: bpass1 bpass2 bpass3
55//@ compile-flags: -Z query-dep-graph -O
6//@ build-pass
76//@ ignore-backends: gcc
87
98#![feature(rustc_attrs)]
109#![crate_type="rlib"]
1110
1211#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-foo",
13 cfg="bfail2",
12 cfg="bpass2",
1413 kind="no")]
1514#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-foo",
16 cfg="bfail3",
15 cfg="bpass3",
1716 kind="pre-lto")] // Should be "post-lto", see issue #119076
1817
1918#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar",
20 cfg="bfail2",
19 cfg="bpass2",
2120 kind="pre-lto")]
2221#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar",
23 cfg="bfail3",
22 cfg="bpass3",
2423 kind="pre-lto")] // Should be "post-lto", see issue #119076
2524
2625#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz",
27 cfg="bfail2",
26 cfg="bpass2",
2827 kind="pre-lto")] // Should be "post-lto", see issue #119076
2928#![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz",
30 cfg="bfail3",
29 cfg="bpass3",
3130 kind="pre-lto")] // Should be "post-lto", see issue #119076
3231mod foo {
3332
34 #[cfg(bfail1)]
33 #[cfg(bpass1)]
3534 pub fn inlined_fn() -> u32 {
3635 1234
3736 }
3837
39 #[cfg(not(bfail1))]
38 #[cfg(not(bpass1))]
4039 pub fn inlined_fn() -> u32 {
4140 // See `cgu_keeps_identical_fn.rs` for why this is different
4241 // from the other version of this function.
tests/incremental/track-deps-in-new-solver.rs+3-5
......@@ -1,7 +1,5 @@
1//@ revisions: bfail1 bfail2
2
1//@ revisions: cpass1 cpass2
32//@ compile-flags: -Znext-solver
4//@ check-pass
53
64#![allow(dead_code)]
75
......@@ -18,10 +16,10 @@ impl Future for S {
1816 }
1917}
2018
21#[cfg(bfail1)]
19#[cfg(cpass1)]
2220pub struct Error(());
2321
24#[cfg(bfail2)]
22#[cfg(cpass2)]
2523pub struct Error();
2624
2725fn main() {}
tests/incremental/unrecoverable_query.rs+3-4
......@@ -4,9 +4,8 @@
44// In this test prior to fixing compiler was having problems figuring out
55// drop impl for T inside of m
66
7//@ revisions: bfail1 bfail2
7//@ revisions: bpass1 bpass2
88//@ compile-flags: --crate-type=lib
9//@ build-pass
109//@ ignore-backends: gcc
1110
1211#![allow(dead_code)]
......@@ -32,9 +31,9 @@ impl<D: P> T<D> {
3231}
3332
3433enum C {
35 #[cfg(bfail1)]
34 #[cfg(bpass1)]
3635 Up(()),
37 #[cfg(bfail2)]
36 #[cfg(bpass2)]
3837 Lorry(()),
3938}
4039
tests/incremental/warnings-reemitted.rs+1-2
......@@ -1,6 +1,5 @@
1//@ revisions: bfail1 bfail2 bfail3
1//@ revisions: bpass1 bpass2 bpass3
22//@ compile-flags: -Coverflow-checks=on
3//@ build-pass
43//@ ignore-backends: gcc
54
65#![warn(arithmetic_overflow)]
tests/ui/derives/clone-include-gat-hrtb.rs created+38
......@@ -0,0 +1,38 @@
1//! Regression test for https://github.com/rust-lang/rust/issues/89188.
2//@ check-pass
3
4trait CallWithShim: Sized {
5 type Shim<'s>
6 where
7 Self: 's;
8}
9
10#[derive(Clone)]
11struct ShimMethod<T: CallWithShim + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::Shim<'s>));
12
13trait CallWithShim2: Sized {
14 type Shim<T>;
15}
16
17struct S<'s>(&'s ());
18
19#[derive(Clone)]
20struct ShimMethod2<T: CallWithShim2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::Shim<S<'s>>));
21
22trait Trait<'s, 't, 'u> {}
23
24#[derive(Clone)]
25struct ShimMethod3<T: CallWithShim2 + 'static>(
26 pub &'static dyn for<'s> Fn(
27 &'s mut T::Shim<dyn for<'t> Fn(&'s mut T::Shim<dyn for<'u> Trait<'s, 't, 'u>>)>,
28 ),
29);
30
31trait Trait2 {
32 type As;
33}
34
35#[derive(Clone)]
36struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As));
37
38pub fn main() {}
tests/ui/derives/derive-clone-basic.rs created+65
......@@ -0,0 +1,65 @@
1//! Make sure that `derive(Clone)` works for simple structs and enums.
2//@ run-pass
3#![allow(dead_code)]
4
5#[derive(Clone)]
6enum SimpleEnum {
7 A,
8 B(()),
9 C,
10}
11
12#[derive(Clone)]
13enum GenericEnum<T, U> {
14 A(T),
15 B(T, U),
16 C,
17}
18
19#[derive(Clone)]
20struct TupleStruct((), ());
21
22#[derive(Clone)]
23struct GenericStruct<T> {
24 foo: (),
25 bar: (),
26 baz: T,
27}
28
29#[derive(Clone)]
30struct GenericTupleStruct<T>(T, ());
31
32#[derive(Clone)]
33struct ManyPrimitives {
34 _int: isize,
35 _i8: i8,
36 _i16: i16,
37 _i32: i32,
38 _i64: i64,
39
40 _uint: usize,
41 _u8: u8,
42 _u16: u16,
43 _u32: u32,
44 _u64: u64,
45
46 _f32: f32,
47 _f64: f64,
48
49 _bool: bool,
50 _char: char,
51 _nil: (),
52}
53
54// Regression test for issue #30244
55#[derive(Copy, Clone)]
56struct Array {
57 arr: [[u8; 256]; 4],
58}
59
60pub fn main() {
61 let _ = SimpleEnum::A.clone();
62 let _ = GenericEnum::A::<isize, isize>(1).clone();
63 let _ = GenericStruct { foo: (), bar: (), baz: 1 }.clone();
64 let _ = GenericTupleStruct(1, ()).clone();
65}
tests/ui/derives/derive-eq-check-all-variants.rs created+12
......@@ -0,0 +1,12 @@
1//! Regression test for https://github.com/rust-lang/rust/issues/103157.
2
3#[derive(PartialEq, Eq)]
4pub enum Value {
5 Boolean(Option<bool>),
6 Float(Option<f64>), //~ ERROR the trait bound `f64: Eq` is not satisfied
7}
8
9fn main() {
10 let a = Value::Float(Some(f64::NAN));
11 assert!(a == a);
12}
tests/ui/derives/derive-eq-check-all-variants.stderr created+26
......@@ -0,0 +1,26 @@
1error[E0277]: the trait bound `f64: Eq` is not satisfied
2 --> $DIR/derive-eq-check-all-variants.rs:6:11
3 |
4LL | #[derive(PartialEq, Eq)]
5 | -- in this derive macro expansion
6...
7LL | Float(Option<f64>),
8 | ^^^^^^^^^^^ the trait `Eq` is not implemented for `f64`
9 |
10 = help: the following other types implement trait `Eq`:
11 i128
12 i16
13 i32
14 i64
15 i8
16 isize
17 u128
18 u16
19 and 4 others
20 = note: required for `Option<f64>` to implement `Eq`
21note: required by a bound in `std::cmp::AssertParamIsEq`
22 --> $SRC_DIR/core/src/cmp.rs:LL:COL
23
24error: aborting due to 1 previous error
25
26For more information about this error, try `rustc --explain E0277`.
tests/ui/derives/derive-on-drop-type.rs created+13
......@@ -0,0 +1,13 @@
1//! Regression test for https://github.com/rust-lang/rust/issues/6341.
2//@ check-pass
3
4#[derive(PartialEq)]
5struct A {
6 x: usize,
7}
8
9impl Drop for A {
10 fn drop(&mut self) {}
11}
12
13pub fn main() {}
tests/ui/derives/derive-static-str-field.rs created+18
......@@ -0,0 +1,18 @@
1//! Regression test for https://github.com/rust-lang/rust/issues/18738.
2//@ check-pass
3#![allow(dead_code)]
4#[derive(Eq, PartialEq, PartialOrd, Ord)]
5enum Test<'a> {
6 Int(&'a isize),
7 Slice(&'a [u8]),
8}
9
10#[derive(Eq, PartialEq, PartialOrd, Ord)]
11struct Version {
12 vendor_info: &'static str,
13}
14
15#[derive(Eq, PartialEq, PartialOrd, Ord)]
16struct Foo(&'static str);
17
18fn main() {}
tests/ui/derives/derive-type-with-reference.rs created+11
......@@ -0,0 +1,11 @@
1//! Regression test for https://github.com/rust-lang/rust/issues/15689.
2//@ run-pass
3
4#[derive(PartialEq, Debug, Clone)]
5enum Test<'a> {
6 Slice(&'a isize),
7}
8
9fn main() {
10 assert_eq!(Test::Slice(&1), Test::Slice(&1))
11}
tests/ui/derives/derive-with-where-bounds.rs created+29
......@@ -0,0 +1,29 @@
1//! Regression test for https://github.com/rust-lang/rust/issues/19358.
2//@ check-pass
3
4#![allow(dead_code)]
5
6trait Trait {
7 fn dummy(&self) {}
8}
9
10#[derive(Debug)]
11struct Foo<T: Trait> {
12 foo: T,
13}
14
15#[derive(Debug)]
16struct Bar<T>
17where
18 T: Trait,
19{
20 bar: T,
21}
22
23impl Trait for isize {}
24
25fn main() {
26 let a = Foo { foo: 12 };
27 let b = Bar { bar: 12 };
28 println!("{:?} {:?}", a, b);
29}
tests/ui/derives/deriving-bounds.rs deleted-11
......@@ -1,11 +0,0 @@
1#[derive(Send)]
2//~^ ERROR cannot find derive macro `Send` in this scope
3//~| ERROR cannot find derive macro `Send` in this scope
4struct Test;
5
6#[derive(Sync)]
7//~^ ERROR cannot find derive macro `Sync` in this scope
8//~| ERROR cannot find derive macro `Sync` in this scope
9struct Test1;
10
11pub fn main() {}
tests/ui/derives/deriving-bounds.stderr deleted-52
......@@ -1,52 +0,0 @@
1error: cannot find derive macro `Sync` in this scope
2 --> $DIR/deriving-bounds.rs:6:10
3 |
4LL | #[derive(Sync)]
5 | ^^^^
6 |
7note: unsafe traits like `Sync` should be implemented explicitly
8 --> $DIR/deriving-bounds.rs:6:10
9 |
10LL | #[derive(Sync)]
11 | ^^^^
12
13error: cannot find derive macro `Sync` in this scope
14 --> $DIR/deriving-bounds.rs:6:10
15 |
16LL | #[derive(Sync)]
17 | ^^^^
18 |
19note: unsafe traits like `Sync` should be implemented explicitly
20 --> $DIR/deriving-bounds.rs:6:10
21 |
22LL | #[derive(Sync)]
23 | ^^^^
24 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
25
26error: cannot find derive macro `Send` in this scope
27 --> $DIR/deriving-bounds.rs:1:10
28 |
29LL | #[derive(Send)]
30 | ^^^^
31 |
32note: unsafe traits like `Send` should be implemented explicitly
33 --> $DIR/deriving-bounds.rs:1:10
34 |
35LL | #[derive(Send)]
36 | ^^^^
37
38error: cannot find derive macro `Send` in this scope
39 --> $DIR/deriving-bounds.rs:1:10
40 |
41LL | #[derive(Send)]
42 | ^^^^
43 |
44note: unsafe traits like `Send` should be implemented explicitly
45 --> $DIR/deriving-bounds.rs:1:10
46 |
47LL | #[derive(Send)]
48 | ^^^^
49 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
50
51error: aborting due to 4 previous errors
52
tests/ui/derives/no-send-sync-derives.rs created+11
......@@ -0,0 +1,11 @@
1#[derive(Send)]
2//~^ ERROR cannot find derive macro `Send` in this scope
3//~| ERROR cannot find derive macro `Send` in this scope
4struct Test;
5
6#[derive(Sync)]
7//~^ ERROR cannot find derive macro `Sync` in this scope
8//~| ERROR cannot find derive macro `Sync` in this scope
9struct Test1;
10
11pub fn main() {}
tests/ui/derives/no-send-sync-derives.stderr created+52
......@@ -0,0 +1,52 @@
1error: cannot find derive macro `Sync` in this scope
2 --> $DIR/no-send-sync-derives.rs:6:10
3 |
4LL | #[derive(Sync)]
5 | ^^^^
6 |
7note: unsafe traits like `Sync` should be implemented explicitly
8 --> $DIR/no-send-sync-derives.rs:6:10
9 |
10LL | #[derive(Sync)]
11 | ^^^^
12
13error: cannot find derive macro `Sync` in this scope
14 --> $DIR/no-send-sync-derives.rs:6:10
15 |
16LL | #[derive(Sync)]
17 | ^^^^
18 |
19note: unsafe traits like `Sync` should be implemented explicitly
20 --> $DIR/no-send-sync-derives.rs:6:10
21 |
22LL | #[derive(Sync)]
23 | ^^^^
24 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
25
26error: cannot find derive macro `Send` in this scope
27 --> $DIR/no-send-sync-derives.rs:1:10
28 |
29LL | #[derive(Send)]
30 | ^^^^
31 |
32note: unsafe traits like `Send` should be implemented explicitly
33 --> $DIR/no-send-sync-derives.rs:1:10
34 |
35LL | #[derive(Send)]
36 | ^^^^
37
38error: cannot find derive macro `Send` in this scope
39 --> $DIR/no-send-sync-derives.rs:1:10
40 |
41LL | #[derive(Send)]
42 | ^^^^
43 |
44note: unsafe traits like `Send` should be implemented explicitly
45 --> $DIR/no-send-sync-derives.rs:1:10
46 |
47LL | #[derive(Send)]
48 | ^^^^
49 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
50
51error: aborting due to 4 previous errors
52
tests/ui/derives/six-hundred-fields.rs created+623
......@@ -0,0 +1,623 @@
1//! Regression test for https://github.com/rust-lang/rust/issues/58319.
2//@ build-pass
3fn main() {}
4#[derive(Clone)]
5pub struct Little;
6#[derive(Clone)]
7#[allow(dead_code)]
8pub struct Big(
9 Little,
10 Little,
11 Little,
12 Little,
13 Little,
14 Little,
15 Little,
16 Little,
17 Little,
18 Little,
19 Little,
20 Little,
21 Little,
22 Little,
23 Little,
24 Little,
25 Little,
26 Little,
27 Little,
28 Little,
29 Little,
30 Little,
31 Little,
32 Little,
33 Little,
34 Little,
35 Little,
36 Little,
37 Little,
38 Little,
39 Little,
40 Little,
41 Little,
42 Little,
43 Little,
44 Little,
45 Little,
46 Little,
47 Little,
48 Little,
49 Little,
50 Little,
51 Little,
52 Little,
53 Little,
54 Little,
55 Little,
56 Little,
57 Little,
58 Little,
59 Little,
60 Little,
61 Little,
62 Little,
63 Little,
64 Little,
65 Little,
66 Little,
67 Little,
68 Little,
69 Little,
70 Little,
71 Little,
72 Little,
73 Little,
74 Little,
75 Little,
76 Little,
77 Little,
78 Little,
79 Little,
80 Little,
81 Little,
82 Little,
83 Little,
84 Little,
85 Little,
86 Little,
87 Little,
88 Little,
89 Little,
90 Little,
91 Little,
92 Little,
93 Little,
94 Little,
95 Little,
96 Little,
97 Little,
98 Little,
99 Little,
100 Little,
101 Little,
102 Little,
103 Little,
104 Little,
105 Little,
106 Little,
107 Little,
108 Little,
109 Little,
110 Little,
111 Little,
112 Little,
113 Little,
114 Little,
115 Little,
116 Little,
117 Little,
118 Little,
119 Little,
120 Little,
121 Little,
122 Little,
123 Little,
124 Little,
125 Little,
126 Little,
127 Little,
128 Little,
129 Little,
130 Little,
131 Little,
132 Little,
133 Little,
134 Little,
135 Little,
136 Little,
137 Little,
138 Little,
139 Little,
140 Little,
141 Little,
142 Little,
143 Little,
144 Little,
145 Little,
146 Little,
147 Little,
148 Little,
149 Little,
150 Little,
151 Little,
152 Little,
153 Little,
154 Little,
155 Little,
156 Little,
157 Little,
158 Little,
159 Little,
160 Little,
161 Little,
162 Little,
163 Little,
164 Little,
165 Little,
166 Little,
167 Little,
168 Little,
169 Little,
170 Little,
171 Little,
172 Little,
173 Little,
174 Little,
175 Little,
176 Little,
177 Little,
178 Little,
179 Little,
180 Little,
181 Little,
182 Little,
183 Little,
184 Little,
185 Little,
186 Little,
187 Little,
188 Little,
189 Little,
190 Little,
191 Little,
192 Little,
193 Little,
194 Little,
195 Little,
196 Little,
197 Little,
198 Little,
199 Little,
200 Little,
201 Little,
202 Little,
203 Little,
204 Little,
205 Little,
206 Little,
207 Little,
208 Little,
209 Little,
210 Little,
211 Little,
212 Little,
213 Little,
214 Little,
215 Little,
216 Little,
217 Little,
218 Little,
219 Little,
220 Little,
221 Little,
222 Little,
223 Little,
224 Little,
225 Little,
226 Little,
227 Little,
228 Little,
229 Little,
230 Little,
231 Little,
232 Little,
233 Little,
234 Little,
235 Little,
236 Little,
237 Little,
238 Little,
239 Little,
240 Little,
241 Little,
242 Little,
243 Little,
244 Little,
245 Little,
246 Little,
247 Little,
248 Little,
249 Little,
250 Little,
251 Little,
252 Little,
253 Little,
254 Little,
255 Little,
256 Little,
257 Little,
258 Little,
259 Little,
260 Little,
261 Little,
262 Little,
263 Little,
264 Little,
265 Little,
266 Little,
267 Little,
268 Little,
269 Little,
270 Little,
271 Little,
272 Little,
273 Little,
274 Little,
275 Little,
276 Little,
277 Little,
278 Little,
279 Little,
280 Little,
281 Little,
282 Little,
283 Little,
284 Little,
285 Little,
286 Little,
287 Little,
288 Little,
289 Little,
290 Little,
291 Little,
292 Little,
293 Little,
294 Little,
295 Little,
296 Little,
297 Little,
298 Little,
299 Little,
300 Little,
301 Little,
302 Little,
303 Little,
304 Little,
305 Little,
306 Little,
307 Little,
308 Little,
309 Little,
310 Little,
311 Little,
312 Little,
313 Little,
314 Little,
315 Little,
316 Little,
317 Little,
318 Little,
319 Little,
320 Little,
321 Little,
322 Little,
323 Little,
324 Little,
325 Little,
326 Little,
327 Little,
328 Little,
329 Little,
330 Little,
331 Little,
332 Little,
333 Little,
334 Little,
335 Little,
336 Little,
337 Little,
338 Little,
339 Little,
340 Little,
341 Little,
342 Little,
343 Little,
344 Little,
345 Little,
346 Little,
347 Little,
348 Little,
349 Little,
350 Little,
351 Little,
352 Little,
353 Little,
354 Little,
355 Little,
356 Little,
357 Little,
358 Little,
359 Little,
360 Little,
361 Little,
362 Little,
363 Little,
364 Little,
365 Little,
366 Little,
367 Little,
368 Little,
369 Little,
370 Little,
371 Little,
372 Little,
373 Little,
374 Little,
375 Little,
376 Little,
377 Little,
378 Little,
379 Little,
380 Little,
381 Little,
382 Little,
383 Little,
384 Little,
385 Little,
386 Little,
387 Little,
388 Little,
389 Little,
390 Little,
391 Little,
392 Little,
393 Little,
394 Little,
395 Little,
396 Little,
397 Little,
398 Little,
399 Little,
400 Little,
401 Little,
402 Little,
403 Little,
404 Little,
405 Little,
406 Little,
407 Little,
408 Little,
409 Little,
410 Little,
411 Little,
412 Little,
413 Little,
414 Little,
415 Little,
416 Little,
417 Little,
418 Little,
419 Little,
420 Little,
421 Little,
422 Little,
423 Little,
424 Little,
425 Little,
426 Little,
427 Little,
428 Little,
429 Little,
430 Little,
431 Little,
432 Little,
433 Little,
434 Little,
435 Little,
436 Little,
437 Little,
438 Little,
439 Little,
440 Little,
441 Little,
442 Little,
443 Little,
444 Little,
445 Little,
446 Little,
447 Little,
448 Little,
449 Little,
450 Little,
451 Little,
452 Little,
453 Little,
454 Little,
455 Little,
456 Little,
457 Little,
458 Little,
459 Little,
460 Little,
461 Little,
462 Little,
463 Little,
464 Little,
465 Little,
466 Little,
467 Little,
468 Little,
469 Little,
470 Little,
471 Little,
472 Little,
473 Little,
474 Little,
475 Little,
476 Little,
477 Little,
478 Little,
479 Little,
480 Little,
481 Little,
482 Little,
483 Little,
484 Little,
485 Little,
486 Little,
487 Little,
488 Little,
489 Little,
490 Little,
491 Little,
492 Little,
493 Little,
494 Little,
495 Little,
496 Little,
497 Little,
498 Little,
499 Little,
500 Little,
501 Little,
502 Little,
503 Little,
504 Little,
505 Little,
506 Little,
507 Little,
508 Little,
509 Little,
510 Little,
511 Little,
512 Little,
513 Little,
514 Little,
515 Little,
516 Little,
517 Little,
518 Little,
519 Little,
520 Little,
521 Little,
522 Little,
523 Little,
524 Little,
525 Little,
526 Little,
527 Little,
528 Little,
529 Little,
530 Little,
531 Little,
532 Little,
533 Little,
534 Little,
535 Little,
536 Little,
537 Little,
538 Little,
539 Little,
540 Little,
541 Little,
542 Little,
543 Little,
544 Little,
545 Little,
546 Little,
547 Little,
548 Little,
549 Little,
550 Little,
551 Little,
552 Little,
553 Little,
554 Little,
555 Little,
556 Little,
557 Little,
558 Little,
559 Little,
560 Little,
561 Little,
562 Little,
563 Little,
564 Little,
565 Little,
566 Little,
567 Little,
568 Little,
569 Little,
570 Little,
571 Little,
572 Little,
573 Little,
574 Little,
575 Little,
576 Little,
577 Little,
578 Little,
579 Little,
580 Little,
581 Little,
582 Little,
583 Little,
584 Little,
585 Little,
586 Little,
587 Little,
588 Little,
589 Little,
590 Little,
591 Little,
592 Little,
593 Little,
594 Little,
595 Little,
596 Little,
597 Little,
598 Little,
599 Little,
600 Little,
601 Little,
602 Little,
603 Little,
604 Little,
605 Little,
606 Little,
607 Little,
608 Little,
609 Little,
610 Little,
611 Little,
612 Little,
613 Little,
614 Little,
615 Little,
616 Little,
617 Little,
618 Little,
619 Little,
620 Little,
621 Little,
622 Little,
623);
tests/ui/deriving/deriving-bounds.rs deleted-5
......@@ -1,5 +0,0 @@
1//@ check-pass
2#[derive(Copy, Clone)]
3struct Test;
4
5pub fn main() {}
tests/ui/deriving/deriving-clone-array.rs deleted-10
......@@ -1,10 +0,0 @@
1//@ run-pass
2#![allow(dead_code)]
3// test for issue #30244
4
5#[derive(Copy, Clone)]
6struct Array {
7 arr: [[u8; 256]; 4]
8}
9
10pub fn main() {}
tests/ui/deriving/deriving-clone-enum.rs deleted-13
......@@ -1,13 +0,0 @@
1//@ run-pass
2#![allow(dead_code)]
3
4#[derive(Clone)]
5enum E {
6 A,
7 B(()),
8 C
9}
10
11pub fn main() {
12 let _ = E::A.clone();
13}
tests/ui/deriving/deriving-clone-generic-enum.rs deleted-13
......@@ -1,13 +0,0 @@
1//@ run-pass
2#![allow(dead_code)]
3
4#[derive(Clone)]
5enum E<T,U> {
6 A(T),
7 B(T,U),
8 C
9}
10
11pub fn main() {
12 let _ = E::A::<isize, isize>(1).clone();
13}
tests/ui/deriving/deriving-clone-generic-struct.rs deleted-14
......@@ -1,14 +0,0 @@
1//@ run-pass
2
3#![allow(dead_code)]
4
5#[derive(Clone)]
6struct S<T> {
7 foo: (),
8 bar: (),
9 baz: T,
10}
11
12pub fn main() {
13 let _ = S { foo: (), bar: (), baz: 1 }.clone();
14}
tests/ui/deriving/deriving-clone-generic-tuple-struct.rs deleted-9
......@@ -1,9 +0,0 @@
1//@ run-pass
2
3#[derive(Clone)]
4#[allow(dead_code)]
5struct S<T>(T, ());
6
7pub fn main() {
8 let _ = S(1, ()).clone();
9}
tests/ui/deriving/deriving-clone-struct.rs deleted-27
......@@ -1,27 +0,0 @@
1//@ run-pass
2
3#![allow(dead_code)]
4
5#[derive(Clone)]
6struct S {
7 _int: isize,
8 _i8: i8,
9 _i16: i16,
10 _i32: i32,
11 _i64: i64,
12
13 _uint: usize,
14 _u8: u8,
15 _u16: u16,
16 _u32: u32,
17 _u64: u64,
18
19 _f32: f32,
20 _f64: f64,
21
22 _bool: bool,
23 _char: char,
24 _nil: ()
25}
26
27pub fn main() {}
tests/ui/deriving/deriving-clone-tuple-struct.rs deleted-8
......@@ -1,8 +0,0 @@
1//@ run-pass
2
3#![allow(dead_code)]
4
5#[derive(Clone)]
6struct S((), ());
7
8pub fn main() {}
tests/ui/deriving/issue-103157.rs deleted-12
......@@ -1,12 +0,0 @@
1//@ check-fail
2
3#[derive(PartialEq, Eq)]
4pub enum Value {
5 Boolean(Option<bool>),
6 Float(Option<f64>), //~ ERROR the trait bound `f64: Eq` is not satisfied
7}
8
9fn main() {
10 let a = Value::Float(Some(f64::NAN));
11 assert!(a == a);
12}
tests/ui/deriving/issue-103157.stderr deleted-26
......@@ -1,26 +0,0 @@
1error[E0277]: the trait bound `f64: Eq` is not satisfied
2 --> $DIR/issue-103157.rs:6:11
3 |
4LL | #[derive(PartialEq, Eq)]
5 | -- in this derive macro expansion
6...
7LL | Float(Option<f64>),
8 | ^^^^^^^^^^^ the trait `Eq` is not implemented for `f64`
9 |
10 = help: the following other types implement trait `Eq`:
11 i128
12 i16
13 i32
14 i64
15 i8
16 isize
17 u128
18 u16
19 and 4 others
20 = note: required for `Option<f64>` to implement `Eq`
21note: required by a bound in `std::cmp::AssertParamIsEq`
22 --> $SRC_DIR/core/src/cmp.rs:LL:COL
23
24error: aborting due to 1 previous error
25
26For more information about this error, try `rustc --explain E0277`.
tests/ui/deriving/issue-15689-1.rs deleted-10
......@@ -1,10 +0,0 @@
1//@ run-pass
2
3#[derive(PartialEq, Debug)]
4enum Test<'a> {
5 Slice(&'a isize)
6}
7
8fn main() {
9 assert_eq!(Test::Slice(&1), Test::Slice(&1))
10}
tests/ui/deriving/issue-15689-2.rs deleted-9
......@@ -1,9 +0,0 @@
1//@ check-pass
2#![allow(dead_code)]
3
4#[derive(Clone)]
5enum Test<'a> {
6 Slice(&'a isize)
7}
8
9fn main() {}
tests/ui/deriving/issue-18738.rs deleted-17
......@@ -1,17 +0,0 @@
1//@ check-pass
2#![allow(dead_code)]
3#[derive(Eq, PartialEq, PartialOrd, Ord)]
4enum Test<'a> {
5 Int(&'a isize),
6 Slice(&'a [u8]),
7}
8
9#[derive(Eq, PartialEq, PartialOrd, Ord)]
10struct Version {
11 vendor_info: &'static str
12}
13
14#[derive(Eq, PartialEq, PartialOrd, Ord)]
15struct Foo(&'static str);
16
17fn main() {}
tests/ui/deriving/issue-19358.rs deleted-23
......@@ -1,23 +0,0 @@
1//@ run-pass
2
3#![allow(dead_code)]
4
5trait Trait { fn dummy(&self) { } }
6
7#[derive(Debug)]
8struct Foo<T: Trait> {
9 foo: T,
10}
11
12#[derive(Debug)]
13struct Bar<T> where T: Trait {
14 bar: T,
15}
16
17impl Trait for isize {}
18
19fn main() {
20 let a = Foo { foo: 12 };
21 let b = Bar { bar: 12 };
22 println!("{:?} {:?}", a, b);
23}
tests/ui/deriving/issue-3935.rs deleted-13
......@@ -1,13 +0,0 @@
1//@ run-pass
2
3#[derive(PartialEq)]
4struct Bike {
5 name: String,
6}
7
8pub fn main() {
9 let town_bike = Bike { name: "schwinn".to_string() };
10 let my_bike = Bike { name: "surly".to_string() };
11
12 assert!(town_bike != my_bike);
13}
tests/ui/deriving/issue-58319.rs deleted-622
......@@ -1,622 +0,0 @@
1//@ run-pass
2fn main() {}
3#[derive(Clone)]
4pub struct Little;
5#[derive(Clone)]
6#[allow(dead_code)]
7pub struct Big(
8 Little,
9 Little,
10 Little,
11 Little,
12 Little,
13 Little,
14 Little,
15 Little,
16 Little,
17 Little,
18 Little,
19 Little,
20 Little,
21 Little,
22 Little,
23 Little,
24 Little,
25 Little,
26 Little,
27 Little,
28 Little,
29 Little,
30 Little,
31 Little,
32 Little,
33 Little,
34 Little,
35 Little,
36 Little,
37 Little,
38 Little,
39 Little,
40 Little,
41 Little,
42 Little,
43 Little,
44 Little,
45 Little,
46 Little,
47 Little,
48 Little,
49 Little,
50 Little,
51 Little,
52 Little,
53 Little,
54 Little,
55 Little,
56 Little,
57 Little,
58 Little,
59 Little,
60 Little,
61 Little,
62 Little,
63 Little,
64 Little,
65 Little,
66 Little,
67 Little,
68 Little,
69 Little,
70 Little,
71 Little,
72 Little,
73 Little,
74 Little,
75 Little,
76 Little,
77 Little,
78 Little,
79 Little,
80 Little,
81 Little,
82 Little,
83 Little,
84 Little,
85 Little,
86 Little,
87 Little,
88 Little,
89 Little,
90 Little,
91 Little,
92 Little,
93 Little,
94 Little,
95 Little,
96 Little,
97 Little,
98 Little,
99 Little,
100 Little,
101 Little,
102 Little,
103 Little,
104 Little,
105 Little,
106 Little,
107 Little,
108 Little,
109 Little,
110 Little,
111 Little,
112 Little,
113 Little,
114 Little,
115 Little,
116 Little,
117 Little,
118 Little,
119 Little,
120 Little,
121 Little,
122 Little,
123 Little,
124 Little,
125 Little,
126 Little,
127 Little,
128 Little,
129 Little,
130 Little,
131 Little,
132 Little,
133 Little,
134 Little,
135 Little,
136 Little,
137 Little,
138 Little,
139 Little,
140 Little,
141 Little,
142 Little,
143 Little,
144 Little,
145 Little,
146 Little,
147 Little,
148 Little,
149 Little,
150 Little,
151 Little,
152 Little,
153 Little,
154 Little,
155 Little,
156 Little,
157 Little,
158 Little,
159 Little,
160 Little,
161 Little,
162 Little,
163 Little,
164 Little,
165 Little,
166 Little,
167 Little,
168 Little,
169 Little,
170 Little,
171 Little,
172 Little,
173 Little,
174 Little,
175 Little,
176 Little,
177 Little,
178 Little,
179 Little,
180 Little,
181 Little,
182 Little,
183 Little,
184 Little,
185 Little,
186 Little,
187 Little,
188 Little,
189 Little,
190 Little,
191 Little,
192 Little,
193 Little,
194 Little,
195 Little,
196 Little,
197 Little,
198 Little,
199 Little,
200 Little,
201 Little,
202 Little,
203 Little,
204 Little,
205 Little,
206 Little,
207 Little,
208 Little,
209 Little,
210 Little,
211 Little,
212 Little,
213 Little,
214 Little,
215 Little,
216 Little,
217 Little,
218 Little,
219 Little,
220 Little,
221 Little,
222 Little,
223 Little,
224 Little,
225 Little,
226 Little,
227 Little,
228 Little,
229 Little,
230 Little,
231 Little,
232 Little,
233 Little,
234 Little,
235 Little,
236 Little,
237 Little,
238 Little,
239 Little,
240 Little,
241 Little,
242 Little,
243 Little,
244 Little,
245 Little,
246 Little,
247 Little,
248 Little,
249 Little,
250 Little,
251 Little,
252 Little,
253 Little,
254 Little,
255 Little,
256 Little,
257 Little,
258 Little,
259 Little,
260 Little,
261 Little,
262 Little,
263 Little,
264 Little,
265 Little,
266 Little,
267 Little,
268 Little,
269 Little,
270 Little,
271 Little,
272 Little,
273 Little,
274 Little,
275 Little,
276 Little,
277 Little,
278 Little,
279 Little,
280 Little,
281 Little,
282 Little,
283 Little,
284 Little,
285 Little,
286 Little,
287 Little,
288 Little,
289 Little,
290 Little,
291 Little,
292 Little,
293 Little,
294 Little,
295 Little,
296 Little,
297 Little,
298 Little,
299 Little,
300 Little,
301 Little,
302 Little,
303 Little,
304 Little,
305 Little,
306 Little,
307 Little,
308 Little,
309 Little,
310 Little,
311 Little,
312 Little,
313 Little,
314 Little,
315 Little,
316 Little,
317 Little,
318 Little,
319 Little,
320 Little,
321 Little,
322 Little,
323 Little,
324 Little,
325 Little,
326 Little,
327 Little,
328 Little,
329 Little,
330 Little,
331 Little,
332 Little,
333 Little,
334 Little,
335 Little,
336 Little,
337 Little,
338 Little,
339 Little,
340 Little,
341 Little,
342 Little,
343 Little,
344 Little,
345 Little,
346 Little,
347 Little,
348 Little,
349 Little,
350 Little,
351 Little,
352 Little,
353 Little,
354 Little,
355 Little,
356 Little,
357 Little,
358 Little,
359 Little,
360 Little,
361 Little,
362 Little,
363 Little,
364 Little,
365 Little,
366 Little,
367 Little,
368 Little,
369 Little,
370 Little,
371 Little,
372 Little,
373 Little,
374 Little,
375 Little,
376 Little,
377 Little,
378 Little,
379 Little,
380 Little,
381 Little,
382 Little,
383 Little,
384 Little,
385 Little,
386 Little,
387 Little,
388 Little,
389 Little,
390 Little,
391 Little,
392 Little,
393 Little,
394 Little,
395 Little,
396 Little,
397 Little,
398 Little,
399 Little,
400 Little,
401 Little,
402 Little,
403 Little,
404 Little,
405 Little,
406 Little,
407 Little,
408 Little,
409 Little,
410 Little,
411 Little,
412 Little,
413 Little,
414 Little,
415 Little,
416 Little,
417 Little,
418 Little,
419 Little,
420 Little,
421 Little,
422 Little,
423 Little,
424 Little,
425 Little,
426 Little,
427 Little,
428 Little,
429 Little,
430 Little,
431 Little,
432 Little,
433 Little,
434 Little,
435 Little,
436 Little,
437 Little,
438 Little,
439 Little,
440 Little,
441 Little,
442 Little,
443 Little,
444 Little,
445 Little,
446 Little,
447 Little,
448 Little,
449 Little,
450 Little,
451 Little,
452 Little,
453 Little,
454 Little,
455 Little,
456 Little,
457 Little,
458 Little,
459 Little,
460 Little,
461 Little,
462 Little,
463 Little,
464 Little,
465 Little,
466 Little,
467 Little,
468 Little,
469 Little,
470 Little,
471 Little,
472 Little,
473 Little,
474 Little,
475 Little,
476 Little,
477 Little,
478 Little,
479 Little,
480 Little,
481 Little,
482 Little,
483 Little,
484 Little,
485 Little,
486 Little,
487 Little,
488 Little,
489 Little,
490 Little,
491 Little,
492 Little,
493 Little,
494 Little,
495 Little,
496 Little,
497 Little,
498 Little,
499 Little,
500 Little,
501 Little,
502 Little,
503 Little,
504 Little,
505 Little,
506 Little,
507 Little,
508 Little,
509 Little,
510 Little,
511 Little,
512 Little,
513 Little,
514 Little,
515 Little,
516 Little,
517 Little,
518 Little,
519 Little,
520 Little,
521 Little,
522 Little,
523 Little,
524 Little,
525 Little,
526 Little,
527 Little,
528 Little,
529 Little,
530 Little,
531 Little,
532 Little,
533 Little,
534 Little,
535 Little,
536 Little,
537 Little,
538 Little,
539 Little,
540 Little,
541 Little,
542 Little,
543 Little,
544 Little,
545 Little,
546 Little,
547 Little,
548 Little,
549 Little,
550 Little,
551 Little,
552 Little,
553 Little,
554 Little,
555 Little,
556 Little,
557 Little,
558 Little,
559 Little,
560 Little,
561 Little,
562 Little,
563 Little,
564 Little,
565 Little,
566 Little,
567 Little,
568 Little,
569 Little,
570 Little,
571 Little,
572 Little,
573 Little,
574 Little,
575 Little,
576 Little,
577 Little,
578 Little,
579 Little,
580 Little,
581 Little,
582 Little,
583 Little,
584 Little,
585 Little,
586 Little,
587 Little,
588 Little,
589 Little,
590 Little,
591 Little,
592 Little,
593 Little,
594 Little,
595 Little,
596 Little,
597 Little,
598 Little,
599 Little,
600 Little,
601 Little,
602 Little,
603 Little,
604 Little,
605 Little,
606 Little,
607 Little,
608 Little,
609 Little,
610 Little,
611 Little,
612 Little,
613 Little,
614 Little,
615 Little,
616 Little,
617 Little,
618 Little,
619 Little,
620 Little,
621 Little,
622);
tests/ui/deriving/issue-6341.rs deleted-10
......@@ -1,10 +0,0 @@
1//@ check-pass
2
3#[derive(PartialEq)]
4struct A { x: usize }
5
6impl Drop for A {
7 fn drop(&mut self) {}
8}
9
10pub fn main() {}
tests/ui/deriving/issue-89188-gat-hrtb.rs deleted-37
......@@ -1,37 +0,0 @@
1//@ check-pass
2
3trait CallWithShim: Sized {
4 type Shim<'s>
5 where
6 Self: 's;
7}
8
9#[derive(Clone)]
10struct ShimMethod<T: CallWithShim + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::Shim<'s>));
11
12trait CallWithShim2: Sized {
13 type Shim<T>;
14}
15
16struct S<'s>(&'s ());
17
18#[derive(Clone)]
19struct ShimMethod2<T: CallWithShim2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::Shim<S<'s>>));
20
21trait Trait<'s, 't, 'u> {}
22
23#[derive(Clone)]
24struct ShimMethod3<T: CallWithShim2 + 'static>(
25 pub &'static dyn for<'s> Fn(
26 &'s mut T::Shim<dyn for<'t> Fn(&'s mut T::Shim<dyn for<'u> Trait<'s, 't, 'u>>)>,
27 ),
28);
29
30trait Trait2 {
31 type As;
32}
33
34#[derive(Clone)]
35struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As));
36
37pub fn main() {}
tests/ui/traits/const-traits/const-closure-inherited-const-condition.rs created+11
......@@ -0,0 +1,11 @@
1//@ check-pass
2//@ revisions: next old
3//@[next] compile-flags: -Znext-solver
4
5#![feature(const_closures, const_trait_impl)]
6
7const trait Foo {}
8
9const fn qux<T: [const] Foo>() { (const || {})() }
10
11fn main() {}