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
14 // [cfail4]compile-flags: -Zincremental-relative-spans
15 // [cfail5]compile-flags: -Zincremental-relative-spans
16 // [cfail6]compile-flags: -Zincremental-relative-spans
20 #![feature(rustc_attrs)]
25 // Change Method Name -----------------------------------------------------------
26 #[cfg(any(cfail1,cfail4))]
28 pub fn method_name() { }
31 #[cfg(not(any(cfail1,cfail4)))]
32 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
33 #[rustc_clean(cfg="cfail3")]
34 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
35 #[rustc_clean(cfg="cfail6")]
37 #[rustc_clean(cfg="cfail3")]
38 #[rustc_clean(cfg="cfail6")]
39 pub fn method_name2() { }
42 // Change Method Body -----------------------------------------------------------
44 // This should affect the method itself, but not the impl.
45 #[cfg(any(cfail1,cfail4))]
47 //--------------------------------------------------------------------------------------
48 //--------------------------
49 //--------------------------------------------------------------------------------------
50 //--------------------------
51 pub fn method_body() {
52 // -----------------------
56 #[cfg(not(any(cfail1,cfail4)))]
57 #[rustc_clean(cfg="cfail2")]
58 #[rustc_clean(cfg="cfail3")]
59 #[rustc_clean(cfg="cfail5")]
60 #[rustc_clean(cfg="cfail6")]
62 #[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir,promoted_mir,typeck")]
63 #[rustc_clean(cfg="cfail3")]
64 #[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir,promoted_mir,typeck")]
65 #[rustc_clean(cfg="cfail6")]
66 pub fn method_body() {
67 println!("Hello, world!");
72 // Change Method Body (inlined) ------------------------------------------------
74 // This should affect the method itself, but not the impl.
75 #[cfg(any(cfail1,cfail4))]
79 //------------------------------------------------------------
81 //--------------------------
84 //------------------------------------------------------------
86 //--------------------------
88 pub fn method_body_inlined() {
89 // -----------------------
93 #[cfg(not(any(cfail1,cfail4)))]
94 #[rustc_clean(cfg="cfail2")]
95 #[rustc_clean(cfg="cfail3")]
96 #[rustc_clean(cfg="cfail5")]
97 #[rustc_clean(cfg="cfail6")]
101 except="hir_owner_nodes,optimized_mir,promoted_mir,typeck"
103 #[rustc_clean(cfg="cfail3")]
106 except="hir_owner_nodes,optimized_mir,promoted_mir,typeck"
108 #[rustc_clean(cfg="cfail6")]
110 pub fn method_body_inlined() {
111 println!("Hello, world!");
116 // Change Method Privacy -------------------------------------------------------
117 #[cfg(any(cfail1,cfail4))]
119 //--------------------------
120 //--------------------------
121 //--------------------------------------------------------------
122 //--------------------------
123 pub fn method_privacy() { }
126 #[cfg(not(any(cfail1,cfail4)))]
127 #[rustc_clean(cfg="cfail2")]
128 #[rustc_clean(cfg="cfail3")]
129 #[rustc_clean(cfg="cfail5")]
130 #[rustc_clean(cfg="cfail6")]
132 #[rustc_clean(cfg="cfail2")]
133 #[rustc_clean(cfg="cfail3")]
134 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
135 #[rustc_clean(cfg="cfail6")]
136 fn method_privacy() { }
139 // Change Method Selfness -----------------------------------------------------------
140 #[cfg(any(cfail1,cfail4))]
144 //---------------------------------------------------------------------------------------------
146 //--------------------------
149 //---------------------------------------------------------------------------------------------
151 //--------------------------
152 pub fn method_selfness() { }
155 #[cfg(not(any(cfail1,cfail4)))]
156 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
157 #[rustc_clean(cfg="cfail3")]
158 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
159 #[rustc_clean(cfg="cfail6")]
163 except="hir_owner,hir_owner_nodes,fn_sig,generics_of,typeck,associated_item,optimized_mir",
165 #[rustc_clean(cfg="cfail3")]
168 except="hir_owner,hir_owner_nodes,fn_sig,generics_of,typeck,associated_item,optimized_mir",
170 #[rustc_clean(cfg="cfail6")]
171 pub fn method_selfness(&self) { }
174 // Change Method Selfmutness ---------------------------------------------------
175 #[cfg(any(cfail1,cfail4))]
177 //------------------------------------------------------------------------------------------
178 //--------------------------
179 //------------------------------------------------------------------------------------------
180 //--------------------------
181 pub fn method_selfmutness(& self) { }
184 #[cfg(not(any(cfail1,cfail4)))]
185 #[rustc_clean(cfg="cfail2")]
186 #[rustc_clean(cfg="cfail3")]
187 #[rustc_clean(cfg="cfail5")]
188 #[rustc_clean(cfg="cfail6")]
190 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
191 #[rustc_clean(cfg="cfail3")]
192 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
193 #[rustc_clean(cfg="cfail6")]
194 pub fn method_selfmutness(&mut self) { }
199 // Add Method To Impl ----------------------------------------------------------
200 #[cfg(any(cfail1,cfail4))]
202 pub fn add_method_to_impl1(&self) { }
205 #[cfg(not(any(cfail1,cfail4)))]
206 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
207 #[rustc_clean(cfg="cfail3")]
208 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,associated_item_def_ids")]
209 #[rustc_clean(cfg="cfail6")]
211 #[rustc_clean(cfg="cfail2")]
212 #[rustc_clean(cfg="cfail3")]
213 #[rustc_clean(cfg="cfail5")]
214 #[rustc_clean(cfg="cfail6")]
215 pub fn add_method_to_impl1(&self) { }
217 #[rustc_clean(cfg="cfail3")]
218 #[rustc_clean(cfg="cfail6")]
219 pub fn add_method_to_impl2(&self) { }
224 // Add Method Parameter --------------------------------------------------------
225 #[cfg(any(cfail1,cfail4))]
227 //------------------------------------------------------------------------------------------
228 //--------------------------
229 //------------------------------------------------------------------------------------------
230 //--------------------------
231 pub fn add_method_parameter(&self ) { }
234 #[cfg(not(any(cfail1,cfail4)))]
235 #[rustc_clean(cfg="cfail2")]
236 #[rustc_clean(cfg="cfail3")]
237 #[rustc_clean(cfg="cfail5")]
238 #[rustc_clean(cfg="cfail6")]
240 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
241 #[rustc_clean(cfg="cfail3")]
242 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
243 #[rustc_clean(cfg="cfail6")]
244 pub fn add_method_parameter(&self, _: i32) { }
249 // Change Method Parameter Name ------------------------------------------------
250 #[cfg(any(cfail1,cfail4))]
252 //------------------------------------------------------------------
253 //--------------------------
254 //------------------------------------------------------------------
255 //--------------------------
256 pub fn change_method_parameter_name(&self, a: i64) { }
259 #[cfg(not(any(cfail1,cfail4)))]
260 #[rustc_clean(cfg="cfail2")]
261 #[rustc_clean(cfg="cfail3")]
262 #[rustc_clean(cfg="cfail5")]
263 #[rustc_clean(cfg="cfail6")]
265 #[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir")]
266 #[rustc_clean(cfg="cfail3")]
267 #[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir")]
268 #[rustc_clean(cfg="cfail6")]
269 pub fn change_method_parameter_name(&self, b: i64) { }
274 // Change Method Return Type ---------------------------------------------------
275 #[cfg(any(cfail1,cfail4))]
277 //------------------------------------------------------------------------------------------
278 //--------------------------
279 //------------------------------------------------------------------------------------------
280 //--------------------------
281 pub fn change_method_return_type(&self) -> u16 { 0 }
284 #[cfg(not(any(cfail1,cfail4)))]
285 #[rustc_clean(cfg="cfail2")]
286 #[rustc_clean(cfg="cfail3")]
287 #[rustc_clean(cfg="cfail5")]
288 #[rustc_clean(cfg="cfail6")]
290 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,optimized_mir,typeck")]
291 #[rustc_clean(cfg="cfail3")]
292 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,optimized_mir,typeck")]
293 #[rustc_clean(cfg="cfail6")]
294 pub fn change_method_return_type(&self) -> u32 { 0 }
299 // Make Method #[inline] -------------------------------------------------------
300 #[cfg(any(cfail1,cfail4))]
302 //--------------------------
303 //--------------------------
304 //--------------------------
305 //--------------------------
307 pub fn make_method_inline(&self) -> u8 { 0 }
310 #[cfg(not(any(cfail1,cfail4)))]
311 #[rustc_clean(cfg="cfail2")]
312 #[rustc_clean(cfg="cfail3")]
313 #[rustc_clean(cfg="cfail5")]
314 #[rustc_clean(cfg="cfail6")]
316 #[rustc_clean(cfg="cfail2")]
317 #[rustc_clean(cfg="cfail3")]
318 #[rustc_clean(cfg="cfail5")]
319 #[rustc_clean(cfg="cfail6")]
321 pub fn make_method_inline(&self) -> u8 { 0 }
326 // Change order of parameters -------------------------------------------------
327 #[cfg(any(cfail1,cfail4))]
329 //------------------------------------------------------------------
330 //--------------------------
331 //------------------------------------------------------------------
332 //--------------------------
333 pub fn change_method_parameter_order(&self, a: i64, b: i64) { }
336 #[cfg(not(any(cfail1,cfail4)))]
337 #[rustc_clean(cfg="cfail2")]
338 #[rustc_clean(cfg="cfail3")]
339 #[rustc_clean(cfg="cfail5")]
340 #[rustc_clean(cfg="cfail6")]
342 #[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir")]
343 #[rustc_clean(cfg="cfail3")]
344 #[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir")]
345 #[rustc_clean(cfg="cfail6")]
346 pub fn change_method_parameter_order(&self, b: i64, a: i64) { }
351 // Make method unsafe ----------------------------------------------------------
352 #[cfg(any(cfail1,cfail4))]
354 //------------------------------------------------------------------------------------------
355 //--------------------------
356 //------------------------------------------------------------------------------------------
357 //--------------------------
358 pub fn make_method_unsafe(&self) { }
361 #[cfg(not(any(cfail1,cfail4)))]
362 #[rustc_clean(cfg="cfail2")]
363 #[rustc_clean(cfg="cfail3")]
364 #[rustc_clean(cfg="cfail5")]
365 #[rustc_clean(cfg="cfail6")]
367 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
368 #[rustc_clean(cfg="cfail3")]
369 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir")]
370 #[rustc_clean(cfg="cfail6")]
371 pub unsafe fn make_method_unsafe(&self) { }
376 // Make method extern ----------------------------------------------------------
377 #[cfg(any(cfail1,cfail4))]
379 //----------------------------------------------------------------------------
380 //--------------------------
381 //----------------------------------------------------------------------------
382 //--------------------------
383 pub fn make_method_extern(&self) { }
386 #[cfg(not(any(cfail1,cfail4)))]
387 #[rustc_clean(cfg="cfail2")]
388 #[rustc_clean(cfg="cfail3")]
389 #[rustc_clean(cfg="cfail5")]
390 #[rustc_clean(cfg="cfail6")]
392 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
393 #[rustc_clean(cfg="cfail3")]
394 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
395 #[rustc_clean(cfg="cfail6")]
396 pub extern "C" fn make_method_extern(&self) { }
401 // Change method calling convention --------------------------------------------
402 #[cfg(any(cfail1,cfail4))]
404 //----------------------------------------------------------------------------
405 //--------------------------
406 //----------------------------------------------------------------------------
407 //--------------------------
408 pub extern "C" fn change_method_calling_convention(&self) { }
411 #[cfg(not(any(cfail1,cfail4)))]
412 #[rustc_clean(cfg="cfail2")]
413 #[rustc_clean(cfg="cfail3")]
414 #[rustc_clean(cfg="cfail5")]
415 #[rustc_clean(cfg="cfail6")]
417 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
418 #[rustc_clean(cfg="cfail3")]
419 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,typeck")]
420 #[rustc_clean(cfg="cfail6")]
421 pub extern "system" fn change_method_calling_convention(&self) { }
426 // Add Lifetime Parameter to Method --------------------------------------------
427 #[cfg(any(cfail1,cfail4))]
429 // -----------------------------------------------------
430 // ---------------------------------------------------------
431 // ----------------------------------------------------------
432 // -------------------------------------------------------
433 // -------------------------------------------------------
434 // --------------------------------------------------------
435 // ----------------------------------------------------------
436 // -----------------------------------------------------------
437 // ----------------------------------------------------------
438 // --------------------------------------------------------------------
439 // -------------------------
440 // --------------------------------------------------------------------------------
441 // -------------------------
442 pub fn add_lifetime_parameter_to_method (&self) { }
445 #[cfg(not(any(cfail1,cfail4)))]
446 #[rustc_clean(cfg="cfail2")]
447 #[rustc_clean(cfg="cfail3")]
448 #[rustc_clean(cfg="cfail5")]
449 #[rustc_clean(cfg="cfail6")]
451 // Warning: Note that `typeck` are coming up clean here.
452 // The addition or removal of lifetime parameters that don't
453 // appear in the arguments or fn body in any way does not, in
454 // fact, affect the `typeck` in any semantic way (at least
455 // as of this writing). **However,** altering the order of
456 // lowering **can** cause it appear to affect the `typeck`:
457 // if we lower generics before the body, then the `HirId` for
458 // things in the body will be affected. So if you start to see
459 // `typeck` appear dirty, that might be the cause. -nmatsakis
460 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,fn_sig")]
461 #[rustc_clean(cfg="cfail3")]
462 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,fn_sig,generics_of")]
463 #[rustc_clean(cfg="cfail6")]
464 pub fn add_lifetime_parameter_to_method<'a>(&self) { }
469 // Add Type Parameter To Method ------------------------------------------------
470 #[cfg(any(cfail1,cfail4))]
472 // -----------------------------------------------------
473 // ---------------------------------------------------------------
474 // -------------------------------------------------------------
475 // -----------------------------------------------------
476 // -------------------------------------------------------------
477 // ---------------------------------------------------
478 // ------------------------------------------------------------
479 // ------------------------------------------------------
480 // -------------------------------------------------
483 // ----------------------------------------------------------------------
485 // -------------------------
488 // ----------------------------------------------------------------------
490 // -------------------------
491 pub fn add_type_parameter_to_method (&self) { }
494 #[cfg(not(any(cfail1,cfail4)))]
495 #[rustc_clean(cfg="cfail2")]
496 #[rustc_clean(cfg="cfail3")]
497 #[rustc_clean(cfg="cfail5")]
498 #[rustc_clean(cfg="cfail6")]
500 // Warning: Note that `typeck` are coming up clean here.
501 // The addition or removal of type parameters that don't appear in
502 // the arguments or fn body in any way does not, in fact, affect
503 // the `typeck` in any semantic way (at least as of this
504 // writing). **However,** altering the order of lowering **can**
505 // cause it appear to affect the `typeck`: if we lower
506 // generics before the body, then the `HirId` for things in the
507 // body will be affected. So if you start to see `typeck`
508 // appear dirty, that might be the cause. -nmatsakis
511 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
513 #[rustc_clean(cfg="cfail3")]
516 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
518 #[rustc_clean(cfg="cfail6")]
519 pub fn add_type_parameter_to_method<T>(&self) { }
524 // Add Lifetime Bound to Lifetime Parameter of Method --------------------------
525 #[cfg(any(cfail1,cfail4))]
529 //-----------------------------------------------------------------------------
531 //--------------------------
534 //-----------------------------------------------------------------------------
536 //--------------------------
537 pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b >(&self) { }
540 #[cfg(not(any(cfail1,cfail4)))]
541 #[rustc_clean(cfg="cfail2")]
542 #[rustc_clean(cfg="cfail3")]
543 #[rustc_clean(cfg="cfail5")]
544 #[rustc_clean(cfg="cfail6")]
548 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
550 #[rustc_clean(cfg="cfail3")]
553 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
555 #[rustc_clean(cfg="cfail6")]
556 pub fn add_lifetime_bound_to_lifetime_param_of_method<'a, 'b: 'a>(&self) { }
561 // Add Lifetime Bound to Type Parameter of Method ------------------------------
562 #[cfg(any(cfail1,cfail4))]
564 // -----------------------------------------------------
565 // ----------------------------------------------------------
566 // -------------------------------------------------------------
567 // -------------------------------------------------
568 // -------------------------------------------------------------
569 // ---------------------------------------------------
570 // ------------------------------------------------------------
571 // ------------------------------------------------------
572 // -------------------------------------------------
575 // ----------------------------------------------------------------------------
577 // -------------------------
580 // ----------------------------------------------------------------------------
582 // -------------------------
583 pub fn add_lifetime_bound_to_type_param_of_method<'a, T >(&self) { }
586 #[cfg(not(any(cfail1,cfail4)))]
587 #[rustc_clean(cfg="cfail2")]
588 #[rustc_clean(cfg="cfail3")]
589 #[rustc_clean(cfg="cfail5")]
590 #[rustc_clean(cfg="cfail6")]
592 // Warning: Note that `typeck` are coming up clean here.
593 // The addition or removal of bounds that don't appear in the
594 // arguments or fn body in any way does not, in fact, affect the
595 // `typeck` in any semantic way (at least as of this
596 // writing). **However,** altering the order of lowering **can**
597 // cause it appear to affect the `typeck`: if we lower
598 // generics before the body, then the `HirId` for things in the
599 // body will be affected. So if you start to see `typeck`
600 // appear dirty, that might be the cause. -nmatsakis
603 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
605 #[rustc_clean(cfg="cfail3")]
608 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig"
610 #[rustc_clean(cfg="cfail6")]
611 pub fn add_lifetime_bound_to_type_param_of_method<'a, T: 'a>(&self) { }
616 // Add Trait Bound to Type Parameter of Method ------------------------------
617 #[cfg(any(cfail1,cfail4))]
619 // -----------------------------------------------------
620 // ----------------------------------------------------------
621 // -------------------------------------------------------------
622 // -------------------------------------------------
623 // -------------------------------------------------------------
624 // ---------------------------------------------------
625 // ------------------------------------------------------------
626 // ------------------------------------------------------
627 // -------------------------------------------------
628 // ---------------------------------------------------------------------------
629 // -------------------------
630 // ---------------------------------------------------------------------------
631 // -------------------------
632 pub fn add_trait_bound_to_type_param_of_method<T >(&self) { }
635 #[cfg(not(any(cfail1,cfail4)))]
636 #[rustc_clean(cfg="cfail2")]
637 #[rustc_clean(cfg="cfail3")]
638 #[rustc_clean(cfg="cfail5")]
639 #[rustc_clean(cfg="cfail6")]
641 // Warning: Note that `typeck` are coming up clean here.
642 // The addition or removal of bounds that don't appear in the
643 // arguments or fn body in any way does not, in fact, affect the
644 // `typeck` in any semantic way (at least as of this
645 // writing). **However,** altering the order of lowering **can**
646 // cause it appear to affect the `typeck`: if we lower
647 // generics before the body, then the `HirId` for things in the
648 // body will be affected. So if you start to see `typeck`
649 // appear dirty, that might be the cause. -nmatsakis
650 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
651 #[rustc_clean(cfg="cfail3")]
652 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
653 #[rustc_clean(cfg="cfail6")]
654 pub fn add_trait_bound_to_type_param_of_method<T: Clone>(&self) { }
659 // Add #[no_mangle] to Method --------------------------------------------------
660 #[cfg(any(cfail1,cfail4))]
662 //--------------------------
663 //--------------------------
664 //--------------------------
665 //--------------------------
667 pub fn add_no_mangle_to_method(&self) { }
670 #[cfg(not(any(cfail1,cfail4)))]
671 #[rustc_clean(cfg="cfail2")]
672 #[rustc_clean(cfg="cfail3")]
673 #[rustc_clean(cfg="cfail5")]
674 #[rustc_clean(cfg="cfail6")]
676 #[rustc_clean(cfg="cfail2")]
677 #[rustc_clean(cfg="cfail3")]
678 #[rustc_clean(cfg="cfail5")]
679 #[rustc_clean(cfg="cfail6")]
681 pub fn add_no_mangle_to_method(&self) { }
688 // Add Type Parameter To Impl --------------------------------------------------
689 #[cfg(any(cfail1,cfail4))]
691 pub fn add_type_parameter_to_impl(&self) { }
694 #[cfg(not(any(cfail1,cfail4)))]
695 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of")]
696 #[rustc_clean(cfg="cfail3")]
697 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of")]
698 #[rustc_clean(cfg="cfail6")]
702 except="generics_of,fn_sig,typeck,type_of,optimized_mir"
704 #[rustc_clean(cfg="cfail3")]
707 except="generics_of,fn_sig,typeck,type_of,optimized_mir"
709 #[rustc_clean(cfg="cfail6")]
710 pub fn add_type_parameter_to_impl(&self) { }
715 // Change Self Type of Impl ----------------------------------------------------
716 #[cfg(any(cfail1,cfail4))]
718 pub fn change_impl_self_type(&self) { }
721 #[cfg(not(any(cfail1,cfail4)))]
722 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
723 #[rustc_clean(cfg="cfail3")]
724 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
725 #[rustc_clean(cfg="cfail6")]
727 #[rustc_clean(cfg="cfail2", except="fn_sig,optimized_mir,typeck")]
728 #[rustc_clean(cfg="cfail3")]
729 #[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck")]
730 #[rustc_clean(cfg="cfail6")]
731 pub fn change_impl_self_type(&self) { }
736 // Add Lifetime Bound to Impl --------------------------------------------------
737 #[cfg(any(cfail1,cfail4))]
739 pub fn add_lifetime_bound_to_impl_parameter(&self) { }
742 #[cfg(not(any(cfail1,cfail4)))]
743 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
744 #[rustc_clean(cfg="cfail3")]
745 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
746 #[rustc_clean(cfg="cfail6")]
747 impl<T: 'static> Bar<T> {
748 #[rustc_clean(cfg="cfail2")]
749 #[rustc_clean(cfg="cfail3")]
750 #[rustc_clean(cfg="cfail5")]
751 #[rustc_clean(cfg="cfail6")]
752 pub fn add_lifetime_bound_to_impl_parameter(&self) { }
757 // Add Trait Bound to Impl Parameter -------------------------------------------
758 #[cfg(any(cfail1,cfail4))]
760 pub fn add_trait_bound_to_impl_parameter(&self) { }
763 #[cfg(not(any(cfail1,cfail4)))]
764 #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
765 #[rustc_clean(cfg="cfail3")]
766 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
767 #[rustc_clean(cfg="cfail6")]
768 impl<T: Clone> Bar<T> {
769 #[rustc_clean(cfg="cfail2")]
770 #[rustc_clean(cfg="cfail3")]
771 #[rustc_clean(cfg="cfail5")]
772 #[rustc_clean(cfg="cfail6")]
773 pub fn add_trait_bound_to_impl_parameter(&self) { }
777 // Force instantiation of some fns so we can check their hash.
778 pub fn instantiation_root() {
779 Foo::method_privacy();
781 #[cfg(any(cfail1,cfail4))]
783 Bar(0u32).change_impl_self_type();
786 #[cfg(not(any(cfail1,cfail4)))]
788 Bar(0u64).change_impl_self_type();