1 // This test case tests the incremental compilation hash (ICH) implementation
2 // for let expressions.
4 // The general pattern followed here is: Change one thing between rev1 and rev2
5 // and make sure that the hash has changed, then change nothing between rev2 and
6 // rev3 and make sure that the hash has not changed.
8 // build-pass (FIXME(62277): could be check-pass?)
9 // revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6
10 // compile-flags: -Z query-dep-graph -O
11 // [cfail1]compile-flags: -Zincremental-ignore-spans
12 // [cfail2]compile-flags: -Zincremental-ignore-spans
13 // [cfail3]compile-flags: -Zincremental-ignore-spans
17 #![feature(rustc_attrs)]
22 // Change Method Name -----------------------------------------------------------
23 #[cfg(any(cfail1,cfail4))]
25 pub fn method_name() { }
28 #[cfg(not(any(cfail1,cfail4)))]
29 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
30 #[rustc_clean(cfg="cfail3")]
31 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
32 #[rustc_clean(cfg="cfail6")]
34 #[rustc_clean(cfg="cfail3")]
35 #[rustc_clean(cfg="cfail6")]
36 pub fn method_name2() { }
39 // Change Method Body -----------------------------------------------------------
41 // This should affect the method itself, but not the impl.
42 #[cfg(any(cfail1,cfail4))]
44 //--------------------------------------------------------------------------------------
45 //--------------------------
46 //--------------------------------------------------------------------------------------
47 //--------------------------
48 pub fn method_body() {
49 // -----------------------
53 #[cfg(not(any(cfail1,cfail4)))]
54 #[rustc_clean(cfg="cfail2")]
55 #[rustc_clean(cfg="cfail3")]
56 #[rustc_clean(cfg="cfail5")]
57 #[rustc_clean(cfg="cfail6")]
59 #[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir,promoted_mir,typeck")]
60 #[rustc_clean(cfg="cfail3")]
61 #[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir,promoted_mir,typeck")]
62 #[rustc_clean(cfg="cfail6")]
63 pub fn method_body() {
64 println!("Hello, world!");
69 // Change Method Body (inlined) ------------------------------------------------
71 // This should affect the method itself, but not the impl.
72 #[cfg(any(cfail1,cfail4))]
76 //------------------------------------------------------------
78 //--------------------------
81 //------------------------------------------------------------
83 //--------------------------
85 pub fn method_body_inlined() {
86 // -----------------------
90 #[cfg(not(any(cfail1,cfail4)))]
91 #[rustc_clean(cfg="cfail2")]
92 #[rustc_clean(cfg="cfail3")]
93 #[rustc_clean(cfg="cfail5")]
94 #[rustc_clean(cfg="cfail6")]
98 except="hir_owner_nodes,optimized_mir,promoted_mir,typeck"
100 #[rustc_clean(cfg="cfail3")]
103 except="hir_owner_nodes,optimized_mir,promoted_mir,typeck"
105 #[rustc_clean(cfg="cfail6")]
107 pub fn method_body_inlined() {
108 println!("Hello, world!");
113 // Change Method Privacy -------------------------------------------------------
114 #[cfg(any(cfail1,cfail4))]
116 //--------------------------
117 //--------------------------
118 //--------------------------------------------------------------
119 //--------------------------
120 pub fn method_privacy() { }
123 #[cfg(not(any(cfail1,cfail4)))]
124 #[rustc_clean(cfg="cfail2")]
125 #[rustc_clean(cfg="cfail3")]
126 #[rustc_clean(cfg="cfail5")]
127 #[rustc_clean(cfg="cfail6")]
129 #[rustc_clean(cfg="cfail2")]
130 #[rustc_clean(cfg="cfail3")]
131 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
132 #[rustc_clean(cfg="cfail6")]
133 fn method_privacy() { }
136 // Change Method Selfness -----------------------------------------------------------
137 #[cfg(any(cfail1,cfail4))]
141 //---------------------------------------------------------------------------------------------
143 //--------------------------
146 //---------------------------------------------------------------------------------------------
148 //--------------------------
149 pub fn method_selfness() { }
152 #[cfg(not(any(cfail1,cfail4)))]
153 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
154 #[rustc_clean(cfg="cfail3")]
155 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
156 #[rustc_clean(cfg="cfail6")]
160 except="hir_owner,hir_owner_nodes,fn_sig,generics_of,typeck,associated_item,optimized_mir",
162 #[rustc_clean(cfg="cfail3")]
165 except="hir_owner,hir_owner_nodes,fn_sig,generics_of,typeck,associated_item,optimized_mir",
167 #[rustc_clean(cfg="cfail6")]
168 pub fn method_selfness(&self) { }
171 // Change Method Selfmutness ---------------------------------------------------
172 #[cfg(any(cfail1,cfail4))]
174 //------------------------------------------------------------------------------------------
175 //--------------------------
176 //------------------------------------------------------------------------------------------
177 //--------------------------
178 pub fn method_selfmutness(& self) { }
181 #[cfg(not(any(cfail1,cfail4)))]
182 #[rustc_clean(cfg="cfail2")]
183 #[rustc_clean(cfg="cfail3")]
184 #[rustc_clean(cfg="cfail5")]
185 #[rustc_clean(cfg="cfail6")]
187 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
188 #[rustc_clean(cfg="cfail3")]
189 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
190 #[rustc_clean(cfg="cfail6")]
191 pub fn method_selfmutness(&mut self) { }
196 // Add Method To Impl ----------------------------------------------------------
197 #[cfg(any(cfail1,cfail4))]
199 pub fn add_method_to_impl1(&self) { }
202 #[cfg(not(any(cfail1,cfail4)))]
203 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
204 #[rustc_clean(cfg="cfail3")]
205 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
206 #[rustc_clean(cfg="cfail6")]
208 #[rustc_clean(cfg="cfail2")]
209 #[rustc_clean(cfg="cfail3")]
210 #[rustc_clean(cfg="cfail5")]
211 #[rustc_clean(cfg="cfail6")]
212 pub fn add_method_to_impl1(&self) { }
214 #[rustc_clean(cfg="cfail3")]
215 #[rustc_clean(cfg="cfail6")]
216 pub fn add_method_to_impl2(&self) { }
221 // Add Method Parameter --------------------------------------------------------
222 #[cfg(any(cfail1,cfail4))]
224 //------------------------------------------------------------------------------------------
225 //--------------------------
226 //------------------------------------------------------------------------------------------
227 //--------------------------
228 pub fn add_method_parameter(&self ) { }
231 #[cfg(not(any(cfail1,cfail4)))]
232 #[rustc_clean(cfg="cfail2")]
233 #[rustc_clean(cfg="cfail3")]
234 #[rustc_clean(cfg="cfail5")]
235 #[rustc_clean(cfg="cfail6")]
237 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
238 #[rustc_clean(cfg="cfail3")]
239 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
240 #[rustc_clean(cfg="cfail6")]
241 pub fn add_method_parameter(&self, _: i32) { }
246 // Change Method Parameter Name ------------------------------------------------
247 #[cfg(any(cfail1,cfail4))]
249 //------------------------------------------------------------------
250 //--------------------------
251 //------------------------------------------------------------------
252 //--------------------------
253 pub fn change_method_parameter_name(&self, a: i64) { }
256 #[cfg(not(any(cfail1,cfail4)))]
257 #[rustc_clean(cfg="cfail2")]
258 #[rustc_clean(cfg="cfail3")]
259 #[rustc_clean(cfg="cfail5")]
260 #[rustc_clean(cfg="cfail6")]
262 #[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir")]
263 #[rustc_clean(cfg="cfail3")]
264 #[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir")]
265 #[rustc_clean(cfg="cfail6")]
266 pub fn change_method_parameter_name(&self, b: i64) { }
271 // Change Method Return Type ---------------------------------------------------
272 #[cfg(any(cfail1,cfail4))]
274 //------------------------------------------------------------------------------------------
275 //--------------------------
276 //------------------------------------------------------------------------------------------
277 //--------------------------
278 pub fn change_method_return_type(&self) -> u16 { 0 }
281 #[cfg(not(any(cfail1,cfail4)))]
282 #[rustc_clean(cfg="cfail2")]
283 #[rustc_clean(cfg="cfail3")]
284 #[rustc_clean(cfg="cfail5")]
285 #[rustc_clean(cfg="cfail6")]
287 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,optimized_mir,typeck")]
288 #[rustc_clean(cfg="cfail3")]
289 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,optimized_mir,typeck")]
290 #[rustc_clean(cfg="cfail6")]
291 pub fn change_method_return_type(&self) -> u32 { 0 }
296 // Make Method #[inline] -------------------------------------------------------
297 #[cfg(any(cfail1,cfail4))]
299 //--------------------------
300 //--------------------------
301 //--------------------------
302 //--------------------------
304 pub fn make_method_inline(&self) -> u8 { 0 }
307 #[cfg(not(any(cfail1,cfail4)))]
308 #[rustc_clean(cfg="cfail2")]
309 #[rustc_clean(cfg="cfail3")]
310 #[rustc_clean(cfg="cfail5")]
311 #[rustc_clean(cfg="cfail6")]
313 #[rustc_clean(cfg="cfail2")]
314 #[rustc_clean(cfg="cfail3")]
315 #[rustc_clean(cfg="cfail5")]
316 #[rustc_clean(cfg="cfail6")]
318 pub fn make_method_inline(&self) -> u8 { 0 }
323 // Change order of parameters -------------------------------------------------
324 #[cfg(any(cfail1,cfail4))]
326 //------------------------------------------------------------------
327 //--------------------------
328 //------------------------------------------------------------------
329 //--------------------------
330 pub fn change_method_parameter_order(&self, a: i64, b: i64) { }
333 #[cfg(not(any(cfail1,cfail4)))]
334 #[rustc_clean(cfg="cfail2")]
335 #[rustc_clean(cfg="cfail3")]
336 #[rustc_clean(cfg="cfail5")]
337 #[rustc_clean(cfg="cfail6")]
339 #[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir")]
340 #[rustc_clean(cfg="cfail3")]
341 #[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir")]
342 #[rustc_clean(cfg="cfail6")]
343 pub fn change_method_parameter_order(&self, b: i64, a: i64) { }
348 // Make method unsafe ----------------------------------------------------------
349 #[cfg(any(cfail1,cfail4))]
351 //------------------------------------------------------------------------------------------
352 //--------------------------
353 //------------------------------------------------------------------------------------------
354 //--------------------------
355 pub fn make_method_unsafe(&self) { }
358 #[cfg(not(any(cfail1,cfail4)))]
359 #[rustc_clean(cfg="cfail2")]
360 #[rustc_clean(cfg="cfail3")]
361 #[rustc_clean(cfg="cfail5")]
362 #[rustc_clean(cfg="cfail6")]
364 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
365 #[rustc_clean(cfg="cfail3")]
366 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
367 #[rustc_clean(cfg="cfail6")]
368 pub unsafe fn make_method_unsafe(&self) { }
373 // Make method extern ----------------------------------------------------------
374 #[cfg(any(cfail1,cfail4))]
376 //----------------------------------------------------------------------------
377 //--------------------------
378 //----------------------------------------------------------------------------
379 //--------------------------
380 pub fn make_method_extern(&self) { }
383 #[cfg(not(any(cfail1,cfail4)))]
384 #[rustc_clean(cfg="cfail2")]
385 #[rustc_clean(cfg="cfail3")]
386 #[rustc_clean(cfg="cfail5")]
387 #[rustc_clean(cfg="cfail6")]
389 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
390 #[rustc_clean(cfg="cfail3")]
391 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
392 #[rustc_clean(cfg="cfail6")]
393 pub extern "C" fn make_method_extern(&self) { }
398 // Change method calling convention --------------------------------------------
399 #[cfg(any(cfail1,cfail4))]
401 //----------------------------------------------------------------------------
402 //--------------------------
403 //----------------------------------------------------------------------------
404 //--------------------------
405 pub extern "C" fn change_method_calling_convention(&self) { }
408 #[cfg(not(any(cfail1,cfail4)))]
409 #[rustc_clean(cfg="cfail2")]
410 #[rustc_clean(cfg="cfail3")]
411 #[rustc_clean(cfg="cfail5")]
412 #[rustc_clean(cfg="cfail6")]
414 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
415 #[rustc_clean(cfg="cfail3")]
416 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
417 #[rustc_clean(cfg="cfail6")]
418 pub extern "system" fn change_method_calling_convention(&self) { }
423 // Add Lifetime Parameter to Method --------------------------------------------
424 #[cfg(any(cfail1,cfail4))]
426 // -----------------------------------------------------
427 // ---------------------------------------------------------
428 // ----------------------------------------------------------
429 // -------------------------------------------------------
430 // -------------------------------------------------------
431 // --------------------------------------------------------
432 // ----------------------------------------------------------
433 // -----------------------------------------------------------
434 // ----------------------------------------------------------
435 // --------------------------------------------------------------------
436 // -------------------------
437 // --------------------------------------------------------------------------------
438 // -------------------------
439 pub fn add_lifetime_parameter_to_method (&self) { }
442 #[cfg(not(any(cfail1,cfail4)))]
443 #[rustc_clean(cfg="cfail2")]
444 #[rustc_clean(cfg="cfail3")]
445 #[rustc_clean(cfg="cfail5")]
446 #[rustc_clean(cfg="cfail6")]
448 // Warning: Note that `typeck` are coming up clean here.
449 // The addition or removal of lifetime parameters that don't
450 // appear in the arguments or fn body in any way does not, in
451 // fact, affect the `typeck` in any semantic way (at least
452 // as of this writing). **However,** altering the order of
453 // lowering **can** cause it appear to affect the `typeck`:
454 // if we lower generics before the body, then the `HirId` for
455 // things in the body will be affected. So if you start to see
456 // `typeck` appear dirty, that might be the cause. -nmatsakis
457 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig")]
458 #[rustc_clean(cfg="cfail3")]
459 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,generics_of")]
460 #[rustc_clean(cfg="cfail6")]
461 pub fn add_lifetime_parameter_to_method<'a>(&self) { }
466 // Add Type Parameter To Method ------------------------------------------------
467 #[cfg(any(cfail1,cfail4))]
469 // -----------------------------------------------------
470 // ---------------------------------------------------------------
471 // -------------------------------------------------------------
472 // -----------------------------------------------------
473 // -------------------------------------------------------------
474 // ---------------------------------------------------
475 // ------------------------------------------------------------
476 // ------------------------------------------------------
477 // -------------------------------------------------
480 // ----------------------------------------------------------------------
482 // -------------------------
485 // ----------------------------------------------------------------------
487 // -------------------------
488 pub fn add_type_parameter_to_method (&self) { }
491 #[cfg(not(any(cfail1,cfail4)))]
492 #[rustc_clean(cfg="cfail2")]
493 #[rustc_clean(cfg="cfail3")]
494 #[rustc_clean(cfg="cfail5")]
495 #[rustc_clean(cfg="cfail6")]
497 // Warning: Note that `typeck` are coming up clean here.
498 // The addition or removal of type parameters that don't appear in
499 // the arguments or fn body in any way does not, in fact, affect
500 // the `typeck` in any semantic way (at least as of this
501 // writing). **However,** altering the order of lowering **can**
502 // cause it appear to affect the `typeck`: if we lower
503 // generics before the body, then the `HirId` for things in the
504 // body will be affected. So if you start to see `typeck`
505 // appear dirty, that might be the cause. -nmatsakis
508 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
510 #[rustc_clean(cfg="cfail3")]
513 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
515 #[rustc_clean(cfg="cfail6")]
516 pub fn add_type_parameter_to_method<T>(&self) { }
521 // Add Lifetime Bound to Lifetime Parameter of Method --------------------------
522 #[cfg(any(cfail1,cfail4))]
526 //-----------------------------------------------------------------------------
528 //--------------------------
531 //-----------------------------------------------------------------------------
533 //--------------------------
534 pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b >(&self) { }
537 #[cfg(not(any(cfail1,cfail4)))]
538 #[rustc_clean(cfg="cfail2")]
539 #[rustc_clean(cfg="cfail3")]
540 #[rustc_clean(cfg="cfail5")]
541 #[rustc_clean(cfg="cfail6")]
545 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
547 #[rustc_clean(cfg="cfail3")]
550 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
552 #[rustc_clean(cfg="cfail6")]
553 pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b: 'a>(&self) { }
558 // Add Lifetime Bound to Type Parameter of Method ------------------------------
559 #[cfg(any(cfail1,cfail4))]
561 // -----------------------------------------------------
562 // ----------------------------------------------------------
563 // -------------------------------------------------------------
564 // -------------------------------------------------
565 // -------------------------------------------------------------
566 // ---------------------------------------------------
567 // ------------------------------------------------------------
568 // ------------------------------------------------------
569 // -------------------------------------------------
572 // ----------------------------------------------------------------------------
574 // -------------------------
577 // ----------------------------------------------------------------------------
579 // -------------------------
580 pub fn add_lifetime_bound_to_type_param_of_method<'a, T >(&self) { }
583 #[cfg(not(any(cfail1,cfail4)))]
584 #[rustc_clean(cfg="cfail2")]
585 #[rustc_clean(cfg="cfail3")]
586 #[rustc_clean(cfg="cfail5")]
587 #[rustc_clean(cfg="cfail6")]
589 // Warning: Note that `typeck` are coming up clean here.
590 // The addition or removal of bounds that don't appear in the
591 // arguments or fn body in any way does not, in fact, affect the
592 // `typeck` in any semantic way (at least as of this
593 // writing). **However,** altering the order of lowering **can**
594 // cause it appear to affect the `typeck`: if we lower
595 // generics before the body, then the `HirId` for things in the
596 // body will be affected. So if you start to see `typeck`
597 // appear dirty, that might be the cause. -nmatsakis
600 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
602 #[rustc_clean(cfg="cfail3")]
605 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
607 #[rustc_clean(cfg="cfail6")]
608 pub fn add_lifetime_bound_to_type_param_of_method<'a, T: 'a>(&self) { }
613 // Add Trait Bound to Type Parameter of Method ------------------------------
614 #[cfg(any(cfail1,cfail4))]
616 // -----------------------------------------------------
617 // ----------------------------------------------------------
618 // -------------------------------------------------------------
619 // -------------------------------------------------
620 // -------------------------------------------------------------
621 // ---------------------------------------------------
622 // ------------------------------------------------------------
623 // ------------------------------------------------------
624 // -------------------------------------------------
625 // ---------------------------------------------------------------------------
626 // -------------------------
627 // ---------------------------------------------------------------------------
628 // -------------------------
629 pub fn add_trait_bound_to_type_param_of_method<T >(&self) { }
632 #[cfg(not(any(cfail1,cfail4)))]
633 #[rustc_clean(cfg="cfail2")]
634 #[rustc_clean(cfg="cfail3")]
635 #[rustc_clean(cfg="cfail5")]
636 #[rustc_clean(cfg="cfail6")]
638 // Warning: Note that `typeck` are coming up clean here.
639 // The addition or removal of bounds that don't appear in the
640 // arguments or fn body in any way does not, in fact, affect the
641 // `typeck` in any semantic way (at least as of this
642 // writing). **However,** altering the order of lowering **can**
643 // cause it appear to affect the `typeck`: if we lower
644 // generics before the body, then the `HirId` for things in the
645 // body will be affected. So if you start to see `typeck`
646 // appear dirty, that might be the cause. -nmatsakis
647 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
648 #[rustc_clean(cfg="cfail3")]
649 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
650 #[rustc_clean(cfg="cfail6")]
651 pub fn add_trait_bound_to_type_param_of_method<T: Clone>(&self) { }
656 // Add #[no_mangle] to Method --------------------------------------------------
657 #[cfg(any(cfail1,cfail4))]
659 //--------------------------
660 //--------------------------
661 //--------------------------
662 //--------------------------
664 pub fn add_no_mangle_to_method(&self) { }
667 #[cfg(not(any(cfail1,cfail4)))]
668 #[rustc_clean(cfg="cfail2")]
669 #[rustc_clean(cfg="cfail3")]
670 #[rustc_clean(cfg="cfail5")]
671 #[rustc_clean(cfg="cfail6")]
673 #[rustc_clean(cfg="cfail2")]
674 #[rustc_clean(cfg="cfail3")]
675 #[rustc_clean(cfg="cfail5")]
676 #[rustc_clean(cfg="cfail6")]
678 pub fn add_no_mangle_to_method(&self) { }
685 // Add Type Parameter To Impl --------------------------------------------------
686 #[cfg(any(cfail1,cfail4))]
688 pub fn add_type_parameter_to_impl(&self) { }
691 #[cfg(not(any(cfail1,cfail4)))]
692 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of")]
693 #[rustc_clean(cfg="cfail3")]
694 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of")]
695 #[rustc_clean(cfg="cfail6")]
699 except="generics_of,fn_sig,typeck,type_of,optimized_mir"
701 #[rustc_clean(cfg="cfail3")]
704 except="generics_of,fn_sig,typeck,type_of,optimized_mir"
706 #[rustc_clean(cfg="cfail6")]
707 pub fn add_type_parameter_to_impl(&self) { }
712 // Change Self Type of Impl ----------------------------------------------------
713 #[cfg(any(cfail1,cfail4))]
715 pub fn change_impl_self_type(&self) { }
718 #[cfg(not(any(cfail1,cfail4)))]
719 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
720 #[rustc_clean(cfg="cfail3")]
721 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
722 #[rustc_clean(cfg="cfail6")]
724 #[rustc_clean(cfg="cfail2", except="fn_sig,optimized_mir,typeck")]
725 #[rustc_clean(cfg="cfail3")]
726 #[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck")]
727 #[rustc_clean(cfg="cfail6")]
728 pub fn change_impl_self_type(&self) { }
733 // Add Lifetime Bound to Impl --------------------------------------------------
734 #[cfg(any(cfail1,cfail4))]
736 pub fn add_lifetime_bound_to_impl_parameter(&self) { }
739 #[cfg(not(any(cfail1,cfail4)))]
740 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
741 #[rustc_clean(cfg="cfail3")]
742 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
743 #[rustc_clean(cfg="cfail6")]
744 impl<T: 'static> Bar<T> {
745 #[rustc_clean(cfg="cfail2")]
746 #[rustc_clean(cfg="cfail3")]
747 #[rustc_clean(cfg="cfail5")]
748 #[rustc_clean(cfg="cfail6")]
749 pub fn add_lifetime_bound_to_impl_parameter(&self) { }
754 // Add Trait Bound to Impl Parameter -------------------------------------------
755 #[cfg(any(cfail1,cfail4))]
757 pub fn add_trait_bound_to_impl_parameter(&self) { }
760 #[cfg(not(any(cfail1,cfail4)))]
761 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
762 #[rustc_clean(cfg="cfail3")]
763 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
764 #[rustc_clean(cfg="cfail6")]
765 impl<T: Clone> Bar<T> {
766 #[rustc_clean(cfg="cfail2")]
767 #[rustc_clean(cfg="cfail3")]
768 #[rustc_clean(cfg="cfail5")]
769 #[rustc_clean(cfg="cfail6")]
770 pub fn add_trait_bound_to_impl_parameter(&self) { }
774 // Force instantiation of some fns so we can check their hash.
775 pub fn instantiation_root() {
776 Foo::method_privacy();
778 #[cfg(any(cfail1,cfail4))]
780 Bar(0u32).change_impl_self_type();
783 #[cfg(not(any(cfail1,cfail4)))]
785 Bar(0u64).change_impl_self_type();