1 // This test case tests the incremental compilation hash (ICH) implementation
2 // for trait definitions.
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 // We also test the ICH for trait definitions exported in metadata. Same as
9 // above, we want to make sure that the change between rev1 and rev2 also
10 // results in a change of the ICH for the trait's metadata, and that it stays
11 // the same between rev2 and rev3.
13 // build-pass (FIXME(62277): could be check-pass?)
14 // revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6
15 // compile-flags: -Z query-dep-graph -O
16 // [cfail1]compile-flags: -Zincremental-ignore-spans
17 // [cfail2]compile-flags: -Zincremental-ignore-spans
18 // [cfail3]compile-flags: -Zincremental-ignore-spans
19 // [cfail4]compile-flags: -Zincremental-relative-spans
20 // [cfail5]compile-flags: -Zincremental-relative-spans
21 // [cfail6]compile-flags: -Zincremental-relative-spans
24 #![feature(rustc_attrs)]
26 #![feature(associated_type_defaults)]
29 // Change trait visibility
30 #[cfg(any(cfail1,cfail4))]
31 trait TraitVisibility { }
33 #[cfg(not(any(cfail1,cfail4)))]
34 #[rustc_clean(cfg="cfail2")]
35 #[rustc_clean(cfg="cfail3")]
36 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
37 #[rustc_clean(cfg="cfail6")]
38 pub trait TraitVisibility { }
42 // Change trait unsafety
43 #[cfg(any(cfail1,cfail4))]
44 trait TraitUnsafety { }
46 #[cfg(not(any(cfail1,cfail4)))]
47 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
48 #[rustc_clean(cfg="cfail3")]
49 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
50 #[rustc_clean(cfg="cfail6")]
51 unsafe trait TraitUnsafety { }
56 #[cfg(any(cfail1,cfail4))]
57 trait TraitAddMethod {
60 #[cfg(not(any(cfail1,cfail4)))]
61 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
62 #[rustc_clean(cfg="cfail3")]
63 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
64 #[rustc_clean(cfg="cfail6")]
65 pub trait TraitAddMethod {
71 // Change name of method
72 #[cfg(any(cfail1,cfail4))]
73 trait TraitChangeMethodName {
77 #[cfg(not(any(cfail1,cfail4)))]
78 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
79 #[rustc_clean(cfg="cfail3")]
80 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
81 #[rustc_clean(cfg="cfail6")]
82 trait TraitChangeMethodName {
88 // Add return type to method
89 #[cfg(any(cfail1,cfail4))]
90 trait TraitAddReturnType {
91 //---------------------------------------------------------------------
92 //--------------------------
93 //---------------------------------------------------------------------
94 //--------------------------
98 #[cfg(not(any(cfail1,cfail4)))]
99 #[rustc_clean(cfg="cfail2")]
100 #[rustc_clean(cfg="cfail3")]
101 #[rustc_clean(cfg="cfail5")]
102 #[rustc_clean(cfg="cfail6")]
103 trait TraitAddReturnType {
104 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
105 #[rustc_clean(cfg="cfail3")]
106 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
107 #[rustc_clean(cfg="cfail6")]
113 // Change return type of method
114 #[cfg(any(cfail1,cfail4))]
115 trait TraitChangeReturnType {
116 // --------------------------------------------------------------------
117 // -------------------------
118 // --------------------------------------------------------------------
119 // -------------------------
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")]
128 trait TraitChangeReturnType {
129 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
130 #[rustc_clean(cfg="cfail3")]
131 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
132 #[rustc_clean(cfg="cfail6")]
138 // Add parameter to method
139 #[cfg(any(cfail1,cfail4))]
140 trait TraitAddParameterToMethod {
141 // --------------------------------------------------------------------
142 // -------------------------
143 // --------------------------------------------------------------------
144 // -------------------------
148 #[cfg(not(any(cfail1,cfail4)))]
149 #[rustc_clean(cfg="cfail2")]
150 #[rustc_clean(cfg="cfail3")]
151 #[rustc_clean(cfg="cfail5")]
152 #[rustc_clean(cfg="cfail6")]
153 trait TraitAddParameterToMethod {
154 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
155 #[rustc_clean(cfg="cfail3")]
156 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
157 #[rustc_clean(cfg="cfail6")]
163 // Change name of method parameter
164 #[cfg(any(cfail1,cfail4))]
165 trait TraitChangeMethodParameterName {
166 //------------------------------------------------------
167 //--------------------------------------------------------------
168 //--------------------------
169 //--------------------------------------------------------------
170 //--------------------------
173 //------------------------------------------------------------------
174 //--------------------------
175 //------------------------------------------------------------------
176 //--------------------------
177 fn with_default(x: i32) {}
180 #[cfg(not(any(cfail1,cfail4)))]
181 #[rustc_clean(cfg="cfail2")]
182 #[rustc_clean(cfg="cfail3")]
183 #[rustc_clean(cfg="cfail5")]
184 #[rustc_clean(cfg="cfail6")]
185 trait TraitChangeMethodParameterName {
186 // FIXME(#38501) This should preferably always be clean.
187 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
188 #[rustc_clean(cfg="cfail3")]
189 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
190 #[rustc_clean(cfg="cfail6")]
193 #[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="cfail2")]
194 #[rustc_clean(cfg="cfail3")]
195 #[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="cfail5")]
196 #[rustc_clean(cfg="cfail6")]
197 fn with_default(y: i32) {}
202 // Change type of method parameter (i32 => i64)
203 #[cfg(any(cfail1,cfail4))]
204 trait TraitChangeMethodParameterType {
205 // --------------------------------------------------------------------
206 // -------------------------
207 // --------------------------------------------------------------------
208 // -------------------------
212 #[cfg(not(any(cfail1,cfail4)))]
213 #[rustc_clean(cfg="cfail2")]
214 #[rustc_clean(cfg="cfail3")]
215 #[rustc_clean(cfg="cfail5")]
216 #[rustc_clean(cfg="cfail6")]
217 trait TraitChangeMethodParameterType {
218 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
219 #[rustc_clean(cfg="cfail3")]
220 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
221 #[rustc_clean(cfg="cfail6")]
227 // Change type of method parameter (&i32 => &mut i32)
228 #[cfg(any(cfail1,cfail4))]
229 trait TraitChangeMethodParameterTypeRef {
230 // --------------------------------------------------------------------
231 // -------------------------
232 // --------------------------------------------------------------------
233 // -------------------------
237 #[cfg(not(any(cfail1,cfail4)))]
238 #[rustc_clean(cfg="cfail2")]
239 #[rustc_clean(cfg="cfail3")]
240 #[rustc_clean(cfg="cfail5")]
241 #[rustc_clean(cfg="cfail6")]
242 trait TraitChangeMethodParameterTypeRef {
243 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
244 #[rustc_clean(cfg="cfail3")]
245 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
246 #[rustc_clean(cfg="cfail6")]
247 fn method(a: &mut i32);
252 // Change order of method parameters
253 #[cfg(any(cfail1,cfail4))]
254 trait TraitChangeMethodParametersOrder {
255 // --------------------------------------------------------------------
256 // -------------------------
257 // --------------------------------------------------------------------
258 // -------------------------
259 fn method(a: i32, b: i64);
262 #[cfg(not(any(cfail1,cfail4)))]
263 #[rustc_clean(cfg="cfail2")]
264 #[rustc_clean(cfg="cfail3")]
265 #[rustc_clean(cfg="cfail5")]
266 #[rustc_clean(cfg="cfail6")]
267 trait TraitChangeMethodParametersOrder {
268 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
269 #[rustc_clean(cfg="cfail3")]
270 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
271 #[rustc_clean(cfg="cfail6")]
272 fn method(b: i64, a: i32);
277 // Add default implementation to method
278 #[cfg(any(cfail1,cfail4))]
279 trait TraitAddMethodAutoImplementation {
280 // -------------------------------------------------------------
281 // -------------------------
282 // -------------------------------------------------------------
283 // -------------------------
287 #[cfg(not(any(cfail1,cfail4)))]
288 #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
289 #[rustc_clean(cfg="cfail3")]
290 #[rustc_clean(except="hir_owner_nodes", cfg="cfail5")]
291 #[rustc_clean(cfg="cfail6")]
292 trait TraitAddMethodAutoImplementation {
293 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
294 #[rustc_clean(cfg="cfail3")]
295 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
296 #[rustc_clean(cfg="cfail6")]
302 // Change order of methods
303 #[cfg(any(cfail1,cfail4))]
304 trait TraitChangeOrderOfMethods {
309 #[cfg(not(any(cfail1,cfail4)))]
310 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
311 #[rustc_clean(cfg="cfail3")]
312 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
313 #[rustc_clean(cfg="cfail6")]
314 trait TraitChangeOrderOfMethods {
321 // Change mode of self parameter
322 #[cfg(any(cfail1,cfail4))]
323 trait TraitChangeModeSelfRefToMut {
324 // --------------------------------------------------------------------
325 // -------------------------
326 // --------------------------------------------------------------------
327 // -------------------------
331 #[cfg(not(any(cfail1,cfail4)))]
332 #[rustc_clean(cfg="cfail2")]
333 #[rustc_clean(cfg="cfail3")]
334 #[rustc_clean(cfg="cfail5")]
335 #[rustc_clean(cfg="cfail6")]
336 trait TraitChangeModeSelfRefToMut {
337 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
338 #[rustc_clean(cfg="cfail3")]
339 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
340 #[rustc_clean(cfg="cfail6")]
341 fn method(&mut self);
346 #[cfg(any(cfail1,cfail4))]
347 trait TraitChangeModeSelfOwnToMut: Sized {
348 // ----------------------------------------------------------------------------------
349 // -------------------------
350 // ----------------------------------------------------------------------------------
351 // -------------------------
355 #[cfg(not(any(cfail1,cfail4)))]
356 #[rustc_clean(cfg="cfail2")]
357 #[rustc_clean(cfg="cfail3")]
358 #[rustc_clean(cfg="cfail5")]
359 #[rustc_clean(cfg="cfail6")]
360 trait TraitChangeModeSelfOwnToMut: Sized {
361 #[rustc_clean(except="hir_owner,hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
362 #[rustc_clean(cfg="cfail3")]
363 #[rustc_clean(except="hir_owner,hir_owner_nodes,typeck,optimized_mir", cfg="cfail5")]
364 #[rustc_clean(cfg="cfail6")]
365 fn method(mut self) {}
370 #[cfg(any(cfail1,cfail4))]
371 trait TraitChangeModeSelfOwnToRef {
372 // --------------------------------------------------------------------------------
373 // -------------------------
374 // --------------------------------------------------------------------------------
375 // -------------------------
379 #[cfg(not(any(cfail1,cfail4)))]
380 #[rustc_clean(cfg="cfail2")]
381 #[rustc_clean(cfg="cfail3")]
382 #[rustc_clean(cfg="cfail5")]
383 #[rustc_clean(cfg="cfail6")]
384 trait TraitChangeModeSelfOwnToRef {
385 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail2")]
386 #[rustc_clean(cfg="cfail3")]
387 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail5")]
388 #[rustc_clean(cfg="cfail6")]
394 // Add unsafe modifier to method
395 #[cfg(any(cfail1,cfail4))]
396 trait TraitAddUnsafeModifier {
397 // --------------------------------------------------------------------
398 // -------------------------
399 // --------------------------------------------------------------------
400 // -------------------------
404 #[cfg(not(any(cfail1,cfail4)))]
405 #[rustc_clean(cfg="cfail2")]
406 #[rustc_clean(cfg="cfail3")]
407 #[rustc_clean(except="hir_owner", cfg="cfail5")]
408 #[rustc_clean(cfg="cfail6")]
409 trait TraitAddUnsafeModifier {
410 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
411 #[rustc_clean(cfg="cfail3")]
412 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
413 #[rustc_clean(cfg="cfail6")]
419 // Add extern modifier to method
420 #[cfg(any(cfail1,cfail4))]
421 trait TraitAddExternModifier {
422 // --------------------------------------------------------------------
423 // -------------------------
424 // --------------------------------------------------------------------
425 // -------------------------
429 #[cfg(not(any(cfail1,cfail4)))]
430 #[rustc_clean(cfg="cfail2")]
431 #[rustc_clean(cfg="cfail3")]
432 #[rustc_clean(except="hir_owner", cfg="cfail5")]
433 #[rustc_clean(cfg="cfail6")]
434 trait TraitAddExternModifier {
435 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
436 #[rustc_clean(cfg="cfail3")]
437 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
438 #[rustc_clean(cfg="cfail6")]
439 extern "C" fn method();
444 // Change extern "C" to extern "stdcall"
445 #[cfg(any(cfail1,cfail4))]
446 trait TraitChangeExternCToRustIntrinsic {
447 // --------------------------------------------------------------------
448 // -------------------------
449 // --------------------------------------------------------------------
450 // -------------------------
451 extern "C" fn method();
454 #[cfg(not(any(cfail1,cfail4)))]
455 #[rustc_clean(cfg="cfail2")]
456 #[rustc_clean(cfg="cfail3")]
457 #[rustc_clean(cfg="cfail5")]
458 #[rustc_clean(cfg="cfail6")]
459 trait TraitChangeExternCToRustIntrinsic {
460 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
461 #[rustc_clean(cfg="cfail3")]
462 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
463 #[rustc_clean(cfg="cfail6")]
464 extern "stdcall" fn method();
469 // Add type parameter to method
470 #[cfg(any(cfail1,cfail4))]
471 trait TraitAddTypeParameterToMethod {
472 // --------------------------------------------------------------------------------
474 // -------------------------
475 // --------------------------------------------------------------------------------
477 // -------------------------
481 #[cfg(not(any(cfail1,cfail4)))]
482 #[rustc_clean(cfg="cfail2")]
483 #[rustc_clean(cfg="cfail3")]
484 #[rustc_clean(cfg="cfail5")]
485 #[rustc_clean(cfg="cfail6")]
486 trait TraitAddTypeParameterToMethod {
487 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
489 #[rustc_clean(cfg="cfail3")]
490 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
492 #[rustc_clean(cfg="cfail6")]
498 // Add lifetime parameter to method
499 #[cfg(any(cfail1,cfail4))]
500 trait TraitAddLifetimeParameterToMethod {
501 // --------------------------------------------------------------------------------
502 // -------------------------
503 // --------------------------------------------------------------------------------
504 // -------------------------
508 #[cfg(not(any(cfail1,cfail4)))]
509 #[rustc_clean(cfg="cfail2")]
510 #[rustc_clean(cfg="cfail3")]
511 #[rustc_clean(cfg="cfail5")]
512 #[rustc_clean(cfg="cfail6")]
513 trait TraitAddLifetimeParameterToMethod {
514 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail2")]
515 #[rustc_clean(cfg="cfail3")]
516 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail5")]
517 #[rustc_clean(cfg="cfail6")]
523 // dummy trait for bound
524 trait ReferencedTrait0 { }
525 trait ReferencedTrait1 { }
527 // Add trait bound to method type parameter
528 #[cfg(any(cfail1,cfail4))]
529 trait TraitAddTraitBoundToMethodTypeParameter {
530 // ---------------------------------------------------------------------------
531 // -------------------------
532 // ---------------------------------------------------------------------------
533 // -------------------------
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")]
542 trait TraitAddTraitBoundToMethodTypeParameter {
543 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
544 #[rustc_clean(cfg="cfail3")]
545 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
546 #[rustc_clean(cfg="cfail6")]
547 fn method<T: ReferencedTrait0>();
552 // Add builtin bound to method type parameter
553 #[cfg(any(cfail1,cfail4))]
554 trait TraitAddBuiltinBoundToMethodTypeParameter {
555 // ---------------------------------------------------------------------------
556 // -------------------------
557 // ---------------------------------------------------------------------------
558 // -------------------------
562 #[cfg(not(any(cfail1,cfail4)))]
563 #[rustc_clean(cfg="cfail2")]
564 #[rustc_clean(cfg="cfail3")]
565 #[rustc_clean(cfg="cfail5")]
566 #[rustc_clean(cfg="cfail6")]
567 trait TraitAddBuiltinBoundToMethodTypeParameter {
568 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
569 #[rustc_clean(cfg="cfail3")]
570 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
571 #[rustc_clean(cfg="cfail6")]
572 fn method<T: Sized>();
577 // Add lifetime bound to method lifetime parameter
578 #[cfg(any(cfail1,cfail4))]
579 trait TraitAddLifetimeBoundToMethodLifetimeParameter {
581 // -----------------------------------------------------------------------------
584 // -------------------------
586 // -----------------------------------------------------------------------------
589 // -------------------------
590 fn method<'a, 'b >(a: &'a u32, b: &'b u32);
593 #[cfg(not(any(cfail1,cfail4)))]
594 #[rustc_clean(cfg="cfail2")]
595 #[rustc_clean(cfg="cfail3")]
596 #[rustc_clean(cfg="cfail5")]
597 #[rustc_clean(cfg="cfail6")]
598 trait TraitAddLifetimeBoundToMethodLifetimeParameter {
600 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
603 #[rustc_clean(cfg="cfail3")]
605 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
608 #[rustc_clean(cfg="cfail6")]
609 fn method<'a, 'b: 'a>(a: &'a u32, b: &'b u32);
614 // Add second trait bound to method type parameter
615 #[cfg(any(cfail1,cfail4))]
616 trait TraitAddSecondTraitBoundToMethodTypeParameter {
617 // ---------------------------------------------------------------------------
618 // -------------------------
619 // ---------------------------------------------------------------------------
620 // -------------------------
621 fn method<T: ReferencedTrait0 >();
624 #[cfg(not(any(cfail1,cfail4)))]
625 #[rustc_clean(cfg="cfail2")]
626 #[rustc_clean(cfg="cfail3")]
627 #[rustc_clean(cfg="cfail5")]
628 #[rustc_clean(cfg="cfail6")]
629 trait TraitAddSecondTraitBoundToMethodTypeParameter {
630 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
631 #[rustc_clean(cfg="cfail3")]
632 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
633 #[rustc_clean(cfg="cfail6")]
634 fn method<T: ReferencedTrait0 + ReferencedTrait1>();
639 // Add second builtin bound to method type parameter
640 #[cfg(any(cfail1,cfail4))]
641 trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
642 // ---------------------------------------------------------------------------
643 // -------------------------
644 // ---------------------------------------------------------------------------
645 // -------------------------
646 fn method<T: Sized >();
649 #[cfg(not(any(cfail1,cfail4)))]
650 #[rustc_clean(cfg="cfail2")]
651 #[rustc_clean(cfg="cfail3")]
652 #[rustc_clean(cfg="cfail5")]
653 #[rustc_clean(cfg="cfail6")]
654 trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
655 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
656 #[rustc_clean(cfg="cfail3")]
657 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
658 #[rustc_clean(cfg="cfail6")]
659 fn method<T: Sized + Sync>();
664 // Add second lifetime bound to method lifetime parameter
665 #[cfg(any(cfail1,cfail4))]
666 trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
668 // -----------------------------------------------------------------------------
671 // -------------------------
673 // -----------------------------------------------------------------------------
676 // -------------------------
677 fn method<'a, 'b, 'c: 'a >(a: &'a u32, b: &'b u32, c: &'c u32);
680 #[cfg(not(any(cfail1,cfail4)))]
681 #[rustc_clean(cfg="cfail2")]
682 #[rustc_clean(cfg="cfail3")]
683 #[rustc_clean(cfg="cfail5")]
684 #[rustc_clean(cfg="cfail6")]
685 trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
687 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
690 #[rustc_clean(cfg="cfail3")]
692 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
695 #[rustc_clean(cfg="cfail6")]
696 fn method<'a, 'b, 'c: 'a + 'b>(a: &'a u32, b: &'b u32, c: &'c u32);
701 // Add associated type
702 #[cfg(any(cfail1,cfail4))]
703 trait TraitAddAssociatedType {
704 //--------------------------
705 //--------------------------
708 //--------------------------
709 //--------------------------
710 //--------------------------
711 //--------------------------
715 #[cfg(not(any(cfail1,cfail4)))]
716 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
717 #[rustc_clean(cfg="cfail3")]
718 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
719 #[rustc_clean(cfg="cfail6")]
720 trait TraitAddAssociatedType {
721 #[rustc_clean(cfg="cfail3")]
722 #[rustc_clean(cfg="cfail6")]
725 #[rustc_clean(cfg="cfail2")]
726 #[rustc_clean(cfg="cfail3")]
727 #[rustc_clean(cfg="cfail5")]
728 #[rustc_clean(cfg="cfail6")]
734 // Add trait bound to associated type
735 #[cfg(any(cfail1,cfail4))]
736 trait TraitAddTraitBoundToAssociatedType {
737 // -------------------------------------------------------------
738 // -------------------------
739 // -------------------------------------------------------------
740 // -------------------------
747 // Apparently the type bound contributes to the predicates of the trait, but
748 // does not change the associated item itself.
749 #[cfg(not(any(cfail1,cfail4)))]
750 #[rustc_clean(cfg="cfail2")]
751 #[rustc_clean(cfg="cfail3")]
752 #[rustc_clean(cfg="cfail5")]
753 #[rustc_clean(cfg="cfail6")]
754 trait TraitAddTraitBoundToAssociatedType {
755 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
756 #[rustc_clean(cfg="cfail3")]
757 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
758 #[rustc_clean(cfg="cfail6")]
759 type Associated: ReferencedTrait0;
766 // Add lifetime bound to associated type
767 #[cfg(any(cfail1,cfail4))]
768 trait TraitAddLifetimeBoundToAssociatedType<'a> {
769 // -------------------------------------------------------------
770 // -------------------------
771 // -------------------------------------------------------------
772 // -------------------------
778 #[cfg(not(any(cfail1,cfail4)))]
779 #[rustc_clean(cfg="cfail2")]
780 #[rustc_clean(cfg="cfail3")]
781 #[rustc_clean(cfg="cfail5")]
782 #[rustc_clean(cfg="cfail6")]
783 trait TraitAddLifetimeBoundToAssociatedType<'a> {
784 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
785 #[rustc_clean(cfg="cfail3")]
786 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
787 #[rustc_clean(cfg="cfail6")]
795 // Add default to associated type
796 #[cfg(any(cfail1,cfail4))]
797 trait TraitAddDefaultToAssociatedType {
798 //--------------------------------------------------------------
799 //--------------------------
800 //--------------------------------------------------------------
801 //--------------------------
807 #[cfg(not(any(cfail1,cfail4)))]
808 #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
809 #[rustc_clean(cfg="cfail3")]
810 #[rustc_clean(except="hir_owner_nodes", cfg="cfail5")]
811 #[rustc_clean(cfg="cfail6")]
812 trait TraitAddDefaultToAssociatedType {
813 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
814 #[rustc_clean(cfg="cfail3")]
815 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
816 #[rustc_clean(cfg="cfail6")]
817 type Associated = ReferenceType0;
824 // Add associated constant
825 #[cfg(any(cfail1,cfail4))]
826 trait TraitAddAssociatedConstant {
830 #[cfg(not(any(cfail1,cfail4)))]
831 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
832 #[rustc_clean(cfg="cfail3")]
833 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
834 #[rustc_clean(cfg="cfail6")]
835 trait TraitAddAssociatedConstant {
843 // Add initializer to associated constant
844 #[cfg(any(cfail1,cfail4))]
845 trait TraitAddInitializerToAssociatedConstant {
846 //--------------------------------------------------------------
847 //--------------------------
848 //--------------------------------------------------------------
849 //--------------------------
852 //--------------------------
853 //--------------------------
854 //--------------------------
855 //--------------------------
859 #[cfg(not(any(cfail1,cfail4)))]
860 #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
861 #[rustc_clean(cfg="cfail3")]
862 #[rustc_clean(except="hir_owner_nodes", cfg="cfail5")]
863 #[rustc_clean(cfg="cfail6")]
864 trait TraitAddInitializerToAssociatedConstant {
865 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
866 #[rustc_clean(cfg="cfail3")]
867 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
868 #[rustc_clean(cfg="cfail6")]
869 const Value: u32 = 1;
871 #[rustc_clean(cfg="cfail2")]
872 #[rustc_clean(cfg="cfail3")]
873 #[rustc_clean(cfg="cfail5")]
874 #[rustc_clean(cfg="cfail6")]
880 // Change type of associated constant
881 #[cfg(any(cfail1,cfail4))]
882 trait TraitChangeTypeOfAssociatedConstant {
883 // ---------------------------------------------------------------------
884 // -------------------------
885 // ---------------------------------------------------------------------
886 // -------------------------
889 // -------------------------
890 // -------------------------
891 // -------------------------
892 // -------------------------
896 #[cfg(not(any(cfail1,cfail4)))]
897 #[rustc_clean(cfg="cfail2")]
898 #[rustc_clean(cfg="cfail3")]
899 #[rustc_clean(cfg="cfail5")]
900 #[rustc_clean(cfg="cfail6")]
901 trait TraitChangeTypeOfAssociatedConstant {
902 #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
903 #[rustc_clean(cfg="cfail3")]
904 #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail5")]
905 #[rustc_clean(cfg="cfail6")]
908 #[rustc_clean(cfg="cfail2")]
909 #[rustc_clean(cfg="cfail3")]
910 #[rustc_clean(cfg="cfail5")]
911 #[rustc_clean(cfg="cfail6")]
918 #[cfg(any(cfail1,cfail4))]
919 trait TraitAddSuperTrait { }
921 #[cfg(not(any(cfail1,cfail4)))]
922 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
923 #[rustc_clean(cfg="cfail3")]
924 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
925 #[rustc_clean(cfg="cfail6")]
926 trait TraitAddSuperTrait : ReferencedTrait0 { }
930 // Add builtin bound (Send or Copy)
931 #[cfg(any(cfail1,cfail4))]
932 trait TraitAddBuiltiBound { }
934 #[cfg(not(any(cfail1,cfail4)))]
935 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
936 #[rustc_clean(cfg="cfail3")]
937 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
938 #[rustc_clean(cfg="cfail6")]
939 trait TraitAddBuiltiBound : Send { }
943 // Add 'static lifetime bound to trait
944 #[cfg(any(cfail1,cfail4))]
945 trait TraitAddStaticLifetimeBound { }
947 #[cfg(not(any(cfail1,cfail4)))]
948 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
949 #[rustc_clean(cfg="cfail3")]
950 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
951 #[rustc_clean(cfg="cfail6")]
952 trait TraitAddStaticLifetimeBound : 'static { }
956 // Add super trait as second bound
957 #[cfg(any(cfail1,cfail4))]
958 trait TraitAddTraitAsSecondBound : ReferencedTrait0 { }
960 #[cfg(not(any(cfail1,cfail4)))]
961 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
962 #[rustc_clean(cfg="cfail3")]
963 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
964 #[rustc_clean(cfg="cfail6")]
965 trait TraitAddTraitAsSecondBound : ReferencedTrait0 + ReferencedTrait1 { }
967 #[cfg(any(cfail1,cfail4))]
968 trait TraitAddTraitAsSecondBoundFromBuiltin : Send { }
970 #[cfg(not(any(cfail1,cfail4)))]
971 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
972 #[rustc_clean(cfg="cfail3")]
973 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
974 #[rustc_clean(cfg="cfail6")]
975 trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { }
979 // Add builtin bound as second bound
980 #[cfg(any(cfail1,cfail4))]
981 trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 { }
983 #[cfg(not(any(cfail1,cfail4)))]
984 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
985 #[rustc_clean(cfg="cfail3")]
986 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
987 #[rustc_clean(cfg="cfail6")]
988 trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 + Send { }
990 #[cfg(any(cfail1,cfail4))]
991 trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin : Send { }
993 #[cfg(not(any(cfail1,cfail4)))]
994 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
995 #[rustc_clean(cfg="cfail3")]
996 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
997 #[rustc_clean(cfg="cfail6")]
998 trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { }
1002 // Add 'static bounds as second bound
1003 #[cfg(any(cfail1,cfail4))]
1004 trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 { }
1006 #[cfg(not(any(cfail1,cfail4)))]
1007 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1008 #[rustc_clean(cfg="cfail3")]
1009 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1010 #[rustc_clean(cfg="cfail6")]
1011 trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 + 'static { }
1013 #[cfg(any(cfail1,cfail4))]
1014 trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send { }
1016 #[cfg(not(any(cfail1,cfail4)))]
1017 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1018 #[rustc_clean(cfg="cfail3")]
1019 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1020 #[rustc_clean(cfg="cfail6")]
1021 trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { }
1025 // Add type parameter to trait
1026 #[cfg(any(cfail1,cfail4))]
1027 trait TraitAddTypeParameterToTrait { }
1029 #[cfg(not(any(cfail1,cfail4)))]
1030 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1031 #[rustc_clean(cfg="cfail3")]
1032 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1033 #[rustc_clean(cfg="cfail6")]
1034 trait TraitAddTypeParameterToTrait<T> { }
1038 // Add lifetime parameter to trait
1039 #[cfg(any(cfail1,cfail4))]
1040 trait TraitAddLifetimeParameterToTrait { }
1042 #[cfg(not(any(cfail1,cfail4)))]
1043 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1044 #[rustc_clean(cfg="cfail3")]
1045 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1046 #[rustc_clean(cfg="cfail6")]
1047 trait TraitAddLifetimeParameterToTrait<'a> { }
1051 // Add trait bound to type parameter of trait
1052 #[cfg(any(cfail1,cfail4))]
1053 trait TraitAddTraitBoundToTypeParameterOfTrait<T> { }
1055 #[cfg(not(any(cfail1,cfail4)))]
1056 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1057 #[rustc_clean(cfg="cfail3")]
1058 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1059 #[rustc_clean(cfg="cfail6")]
1060 trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
1064 // Add lifetime bound to type parameter of trait
1065 #[cfg(any(cfail1,cfail4))]
1066 trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T> { }
1068 #[cfg(not(any(cfail1,cfail4)))]
1069 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1070 #[rustc_clean(cfg="cfail3")]
1071 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1072 #[rustc_clean(cfg="cfail6")]
1073 trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { }
1077 // Add lifetime bound to lifetime parameter of trait
1078 #[cfg(any(cfail1,cfail4))]
1079 trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a, 'b> { }
1081 #[cfg(not(any(cfail1,cfail4)))]
1082 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1083 #[rustc_clean(cfg="cfail3")]
1084 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1085 #[rustc_clean(cfg="cfail6")]
1086 trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { }
1090 // Add builtin bound to type parameter of trait
1091 #[cfg(any(cfail1,cfail4))]
1092 trait TraitAddBuiltinBoundToTypeParameterOfTrait<T> { }
1094 #[cfg(not(any(cfail1,cfail4)))]
1095 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1096 #[rustc_clean(cfg="cfail3")]
1097 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1098 #[rustc_clean(cfg="cfail6")]
1099 trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { }
1103 // Add second type parameter to trait
1104 #[cfg(any(cfail1,cfail4))]
1105 trait TraitAddSecondTypeParameterToTrait<T> { }
1107 #[cfg(not(any(cfail1,cfail4)))]
1108 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1109 #[rustc_clean(cfg="cfail3")]
1110 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1111 #[rustc_clean(cfg="cfail6")]
1112 trait TraitAddSecondTypeParameterToTrait<T, S> { }
1116 // Add second lifetime parameter to trait
1117 #[cfg(any(cfail1,cfail4))]
1118 trait TraitAddSecondLifetimeParameterToTrait<'a> { }
1120 #[cfg(not(any(cfail1,cfail4)))]
1121 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1122 #[rustc_clean(cfg="cfail3")]
1123 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1124 #[rustc_clean(cfg="cfail6")]
1125 trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { }
1129 // Add second trait bound to type parameter of trait
1130 #[cfg(any(cfail1,cfail4))]
1131 trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
1133 #[cfg(not(any(cfail1,cfail4)))]
1134 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1135 #[rustc_clean(cfg="cfail3")]
1136 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1137 #[rustc_clean(cfg="cfail6")]
1138 trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + ReferencedTrait1> { }
1142 // Add second lifetime bound to type parameter of trait
1143 #[cfg(any(cfail1,cfail4))]
1144 trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a> { }
1146 #[cfg(not(any(cfail1,cfail4)))]
1147 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1148 #[rustc_clean(cfg="cfail3")]
1149 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1150 #[rustc_clean(cfg="cfail6")]
1151 trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { }
1155 // Add second lifetime bound to lifetime parameter of trait
1156 #[cfg(any(cfail1,cfail4))]
1157 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b, 'c> { }
1159 #[cfg(not(any(cfail1,cfail4)))]
1160 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1161 #[rustc_clean(cfg="cfail3")]
1162 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1163 #[rustc_clean(cfg="cfail6")]
1164 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c> { }
1168 // Add second builtin bound to type parameter of trait
1169 #[cfg(any(cfail1,cfail4))]
1170 trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send> { }
1172 #[cfg(not(any(cfail1,cfail4)))]
1173 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1174 #[rustc_clean(cfg="cfail3")]
1175 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1176 #[rustc_clean(cfg="cfail6")]
1177 trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send + Sync> { }
1181 struct ReferenceType0 {}
1182 struct ReferenceType1 {}
1186 // Add trait bound to type parameter of trait in where clause
1187 #[cfg(any(cfail1,cfail4))]
1188 trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> { }
1190 #[cfg(not(any(cfail1,cfail4)))]
1191 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1192 #[rustc_clean(cfg="cfail3")]
1193 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1194 #[rustc_clean(cfg="cfail6")]
1195 trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
1199 // Add lifetime bound to type parameter of trait in where clause
1200 #[cfg(any(cfail1,cfail4))]
1201 trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> { }
1203 #[cfg(not(any(cfail1,cfail4)))]
1204 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1205 #[rustc_clean(cfg="cfail3")]
1206 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1207 #[rustc_clean(cfg="cfail6")]
1208 trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { }
1212 // Add lifetime bound to lifetime parameter of trait in where clause
1213 #[cfg(any(cfail1,cfail4))]
1214 trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> { }
1216 #[cfg(not(any(cfail1,cfail4)))]
1217 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1218 #[rustc_clean(cfg="cfail3")]
1219 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1220 #[rustc_clean(cfg="cfail6")]
1221 trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b { }
1225 // Add builtin bound to type parameter of trait in where clause
1226 #[cfg(any(cfail1,cfail4))]
1227 trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> { }
1229 #[cfg(not(any(cfail1,cfail4)))]
1230 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1231 #[rustc_clean(cfg="cfail3")]
1232 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1233 #[rustc_clean(cfg="cfail6")]
1234 trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
1238 // Add second trait bound to type parameter of trait in where clause
1239 #[cfg(any(cfail1,cfail4))]
1240 trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
1242 #[cfg(not(any(cfail1,cfail4)))]
1243 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1244 #[rustc_clean(cfg="cfail3")]
1245 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1246 #[rustc_clean(cfg="cfail6")]
1247 trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T>
1248 where T: ReferencedTrait0 + ReferencedTrait1 { }
1252 // Add second lifetime bound to type parameter of trait in where clause
1253 #[cfg(any(cfail1,cfail4))]
1254 trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a { }
1256 #[cfg(not(any(cfail1,cfail4)))]
1257 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1258 #[rustc_clean(cfg="cfail3")]
1259 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1260 #[rustc_clean(cfg="cfail6")]
1261 trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a + 'b { }
1265 // Add second lifetime bound to lifetime parameter of trait in where clause
1266 #[cfg(any(cfail1,cfail4))]
1267 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b { }
1269 #[cfg(not(any(cfail1,cfail4)))]
1270 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1271 #[rustc_clean(cfg="cfail3")]
1272 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1273 #[rustc_clean(cfg="cfail6")]
1274 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b + 'c { }
1278 // Add second builtin bound to type parameter of trait in where clause
1279 #[cfg(any(cfail1,cfail4))]
1280 trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
1282 #[cfg(not(any(cfail1,cfail4)))]
1283 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1284 #[rustc_clean(cfg="cfail3")]
1285 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1286 #[rustc_clean(cfg="cfail6")]
1287 trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send + Sync { }
1290 // Change return type of method indirectly by modifying a use statement
1291 mod change_return_type_of_method_indirectly_use {
1292 #[cfg(any(cfail1,cfail4))]
1293 use super::ReferenceType0 as ReturnType;
1294 #[cfg(not(any(cfail1,cfail4)))]
1295 use super::ReferenceType1 as ReturnType;
1297 #[rustc_clean(cfg="cfail2")]
1298 #[rustc_clean(cfg="cfail3")]
1299 #[rustc_clean(cfg="cfail5")]
1300 #[rustc_clean(cfg="cfail6")]
1301 trait TraitChangeReturnType {
1302 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
1303 #[rustc_clean(cfg="cfail3")]
1304 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
1305 #[rustc_clean(cfg="cfail6")]
1306 fn method() -> ReturnType;
1312 // Change type of method parameter indirectly by modifying a use statement
1313 mod change_method_parameter_type_indirectly_by_use {
1314 #[cfg(any(cfail1,cfail4))]
1315 use super::ReferenceType0 as ArgType;
1316 #[cfg(not(any(cfail1,cfail4)))]
1317 use super::ReferenceType1 as ArgType;
1319 #[rustc_clean(cfg="cfail2")]
1320 #[rustc_clean(cfg="cfail3")]
1321 #[rustc_clean(cfg="cfail5")]
1322 #[rustc_clean(cfg="cfail6")]
1323 trait TraitChangeArgType {
1324 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
1325 #[rustc_clean(cfg="cfail3")]
1326 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
1327 #[rustc_clean(cfg="cfail6")]
1328 fn method(a: ArgType);
1334 // Change trait bound of method type parameter indirectly by modifying a use statement
1335 mod change_method_parameter_type_bound_indirectly_by_use {
1336 #[cfg(any(cfail1,cfail4))]
1337 use super::ReferencedTrait0 as Bound;
1338 #[cfg(not(any(cfail1,cfail4)))]
1339 use super::ReferencedTrait1 as Bound;
1341 #[rustc_clean(cfg="cfail2")]
1342 #[rustc_clean(cfg="cfail3")]
1343 #[rustc_clean(cfg="cfail5")]
1344 #[rustc_clean(cfg="cfail6")]
1345 trait TraitChangeBoundOfMethodTypeParameter {
1346 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1347 #[rustc_clean(cfg="cfail3")]
1348 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1349 #[rustc_clean(cfg="cfail6")]
1350 fn method<T: Bound>(a: T);
1356 // Change trait bound of method type parameter in where clause indirectly
1357 // by modifying a use statement
1358 mod change_method_parameter_type_bound_indirectly_by_use_where {
1359 #[cfg(any(cfail1,cfail4))]
1360 use super::ReferencedTrait0 as Bound;
1361 #[cfg(not(any(cfail1,cfail4)))]
1362 use super::ReferencedTrait1 as Bound;
1364 #[rustc_clean(cfg="cfail2")]
1365 #[rustc_clean(cfg="cfail3")]
1366 #[rustc_clean(cfg="cfail5")]
1367 #[rustc_clean(cfg="cfail6")]
1368 trait TraitChangeBoundOfMethodTypeParameterWhere {
1369 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1370 #[rustc_clean(cfg="cfail3")]
1371 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1372 #[rustc_clean(cfg="cfail6")]
1373 fn method<T>(a: T) where T: Bound;
1379 // Change trait bound of trait type parameter indirectly by modifying a use statement
1380 mod change_method_type_parameter_bound_indirectly {
1381 #[cfg(any(cfail1,cfail4))]
1382 use super::ReferencedTrait0 as Bound;
1383 #[cfg(not(any(cfail1,cfail4)))]
1384 use super::ReferencedTrait1 as Bound;
1386 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1387 #[rustc_clean(cfg="cfail3")]
1388 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1389 #[rustc_clean(cfg="cfail6")]
1390 trait TraitChangeTraitBound<T: Bound> {
1397 // Change trait bound of trait type parameter in where clause indirectly
1398 // by modifying a use statement
1399 mod change_method_type_parameter_bound_indirectly_where {
1400 #[cfg(any(cfail1,cfail4))]
1401 use super::ReferencedTrait0 as Bound;
1402 #[cfg(not(any(cfail1,cfail4)))]
1403 use super::ReferencedTrait1 as Bound;
1405 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1406 #[rustc_clean(cfg="cfail3")]
1407 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1408 #[rustc_clean(cfg="cfail6")]
1409 trait TraitChangeTraitBoundWhere<T> where T: Bound {