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
21 #![feature(rustc_attrs)]
23 #![feature(associated_type_defaults)]
26 // Change trait visibility
27 #[cfg(any(cfail1,cfail4))]
28 trait TraitVisibility { }
30 #[cfg(not(any(cfail1,cfail4)))]
31 #[rustc_clean(cfg="cfail2")]
32 #[rustc_clean(cfg="cfail3")]
33 #[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
34 #[rustc_clean(cfg="cfail6")]
35 pub trait TraitVisibility { }
39 // Change trait unsafety
40 #[cfg(any(cfail1,cfail4))]
41 trait TraitUnsafety { }
43 #[cfg(not(any(cfail1,cfail4)))]
44 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
45 #[rustc_clean(cfg="cfail3")]
46 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
47 #[rustc_clean(cfg="cfail6")]
48 unsafe trait TraitUnsafety { }
53 #[cfg(any(cfail1,cfail4))]
54 trait TraitAddMethod {
57 #[cfg(not(any(cfail1,cfail4)))]
58 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
59 #[rustc_clean(cfg="cfail3")]
60 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
61 #[rustc_clean(cfg="cfail6")]
62 pub trait TraitAddMethod {
68 // Change name of method
69 #[cfg(any(cfail1,cfail4))]
70 trait TraitChangeMethodName {
74 #[cfg(not(any(cfail1,cfail4)))]
75 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
76 #[rustc_clean(cfg="cfail3")]
77 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
78 #[rustc_clean(cfg="cfail6")]
79 trait TraitChangeMethodName {
85 // Add return type to method
86 #[cfg(any(cfail1,cfail4))]
87 trait TraitAddReturnType {
88 //---------------------------------------------------------------------
89 //--------------------------
90 //---------------------------------------------------------------------
91 //--------------------------
95 #[cfg(not(any(cfail1,cfail4)))]
96 #[rustc_clean(cfg="cfail2")]
97 #[rustc_clean(cfg="cfail3")]
98 #[rustc_clean(cfg="cfail5")]
99 #[rustc_clean(cfg="cfail6")]
100 trait TraitAddReturnType {
101 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
102 #[rustc_clean(cfg="cfail3")]
103 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
104 #[rustc_clean(cfg="cfail6")]
110 // Change return type of method
111 #[cfg(any(cfail1,cfail4))]
112 trait TraitChangeReturnType {
113 // --------------------------------------------------------------------
114 // -------------------------
115 // --------------------------------------------------------------------
116 // -------------------------
120 #[cfg(not(any(cfail1,cfail4)))]
121 #[rustc_clean(cfg="cfail2")]
122 #[rustc_clean(cfg="cfail3")]
123 #[rustc_clean(cfg="cfail5")]
124 #[rustc_clean(cfg="cfail6")]
125 trait TraitChangeReturnType {
126 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
127 #[rustc_clean(cfg="cfail3")]
128 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
129 #[rustc_clean(cfg="cfail6")]
135 // Add parameter to method
136 #[cfg(any(cfail1,cfail4))]
137 trait TraitAddParameterToMethod {
138 // --------------------------------------------------------------------
139 // -------------------------
140 // --------------------------------------------------------------------
141 // -------------------------
145 #[cfg(not(any(cfail1,cfail4)))]
146 #[rustc_clean(cfg="cfail2")]
147 #[rustc_clean(cfg="cfail3")]
148 #[rustc_clean(cfg="cfail5")]
149 #[rustc_clean(cfg="cfail6")]
150 trait TraitAddParameterToMethod {
151 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
152 #[rustc_clean(cfg="cfail3")]
153 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
154 #[rustc_clean(cfg="cfail6")]
160 // Change name of method parameter
161 #[cfg(any(cfail1,cfail4))]
162 trait TraitChangeMethodParameterName {
163 //------------------------------------------------------
164 //--------------------------------------------------------------
165 //--------------------------
166 //--------------------------------------------------------------
167 //--------------------------
170 //------------------------------------------------------------------
171 //--------------------------
172 //------------------------------------------------------------------
173 //--------------------------
174 fn with_default(x: i32) {}
177 #[cfg(not(any(cfail1,cfail4)))]
178 #[rustc_clean(cfg="cfail2")]
179 #[rustc_clean(cfg="cfail3")]
180 #[rustc_clean(cfg="cfail5")]
181 #[rustc_clean(cfg="cfail6")]
182 trait TraitChangeMethodParameterName {
183 // FIXME(#38501) This should preferably always be clean.
184 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
185 #[rustc_clean(cfg="cfail3")]
186 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
187 #[rustc_clean(cfg="cfail6")]
190 #[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="cfail2")]
191 #[rustc_clean(cfg="cfail3")]
192 #[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="cfail5")]
193 #[rustc_clean(cfg="cfail6")]
194 fn with_default(y: i32) {}
199 // Change type of method parameter (i32 => i64)
200 #[cfg(any(cfail1,cfail4))]
201 trait TraitChangeMethodParameterType {
202 // --------------------------------------------------------------------
203 // -------------------------
204 // --------------------------------------------------------------------
205 // -------------------------
209 #[cfg(not(any(cfail1,cfail4)))]
210 #[rustc_clean(cfg="cfail2")]
211 #[rustc_clean(cfg="cfail3")]
212 #[rustc_clean(cfg="cfail5")]
213 #[rustc_clean(cfg="cfail6")]
214 trait TraitChangeMethodParameterType {
215 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
216 #[rustc_clean(cfg="cfail3")]
217 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
218 #[rustc_clean(cfg="cfail6")]
224 // Change type of method parameter (&i32 => &mut i32)
225 #[cfg(any(cfail1,cfail4))]
226 trait TraitChangeMethodParameterTypeRef {
227 // --------------------------------------------------------------------
228 // -------------------------
229 // --------------------------------------------------------------------
230 // -------------------------
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")]
239 trait TraitChangeMethodParameterTypeRef {
240 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
241 #[rustc_clean(cfg="cfail3")]
242 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
243 #[rustc_clean(cfg="cfail6")]
244 fn method(a: &mut i32);
249 // Change order of method parameters
250 #[cfg(any(cfail1,cfail4))]
251 trait TraitChangeMethodParametersOrder {
252 // --------------------------------------------------------------------
253 // -------------------------
254 // --------------------------------------------------------------------
255 // -------------------------
256 fn method(a: i32, b: 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")]
264 trait TraitChangeMethodParametersOrder {
265 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
266 #[rustc_clean(cfg="cfail3")]
267 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
268 #[rustc_clean(cfg="cfail6")]
269 fn method(b: i64, a: i32);
274 // Add default implementation to method
275 #[cfg(any(cfail1,cfail4))]
276 trait TraitAddMethodAutoImplementation {
277 // -------------------------------------------------------------
278 // -------------------------
279 // -------------------------------------------------------------
280 // -------------------------
284 #[cfg(not(any(cfail1,cfail4)))]
285 #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
286 #[rustc_clean(cfg="cfail3")]
287 #[rustc_clean(except="hir_owner_nodes", cfg="cfail5")]
288 #[rustc_clean(cfg="cfail6")]
289 trait TraitAddMethodAutoImplementation {
290 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
291 #[rustc_clean(cfg="cfail3")]
292 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
293 #[rustc_clean(cfg="cfail6")]
299 // Change order of methods
300 #[cfg(any(cfail1,cfail4))]
301 trait TraitChangeOrderOfMethods {
306 #[cfg(not(any(cfail1,cfail4)))]
307 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
308 #[rustc_clean(cfg="cfail3")]
309 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
310 #[rustc_clean(cfg="cfail6")]
311 trait TraitChangeOrderOfMethods {
318 // Change mode of self parameter
319 #[cfg(any(cfail1,cfail4))]
320 trait TraitChangeModeSelfRefToMut {
321 // --------------------------------------------------------------------
322 // -------------------------
323 // --------------------------------------------------------------------
324 // -------------------------
328 #[cfg(not(any(cfail1,cfail4)))]
329 #[rustc_clean(cfg="cfail2")]
330 #[rustc_clean(cfg="cfail3")]
331 #[rustc_clean(cfg="cfail5")]
332 #[rustc_clean(cfg="cfail6")]
333 trait TraitChangeModeSelfRefToMut {
334 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
335 #[rustc_clean(cfg="cfail3")]
336 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
337 #[rustc_clean(cfg="cfail6")]
338 fn method(&mut self);
343 #[cfg(any(cfail1,cfail4))]
344 trait TraitChangeModeSelfOwnToMut: Sized {
345 // ----------------------------------------------------------------------------------
346 // -------------------------
347 // ----------------------------------------------------------------------------------
348 // -------------------------
352 #[cfg(not(any(cfail1,cfail4)))]
353 #[rustc_clean(cfg="cfail2")]
354 #[rustc_clean(cfg="cfail3")]
355 #[rustc_clean(cfg="cfail5")]
356 #[rustc_clean(cfg="cfail6")]
357 trait TraitChangeModeSelfOwnToMut: Sized {
358 #[rustc_clean(except="hir_owner,hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
359 #[rustc_clean(cfg="cfail3")]
360 #[rustc_clean(except="hir_owner,hir_owner_nodes,typeck,optimized_mir", cfg="cfail5")]
361 #[rustc_clean(cfg="cfail6")]
362 fn method(mut self) {}
367 #[cfg(any(cfail1,cfail4))]
368 trait TraitChangeModeSelfOwnToRef {
369 // --------------------------------------------------------------------------------
370 // -------------------------
371 // --------------------------------------------------------------------------------
372 // -------------------------
376 #[cfg(not(any(cfail1,cfail4)))]
377 #[rustc_clean(cfg="cfail2")]
378 #[rustc_clean(cfg="cfail3")]
379 #[rustc_clean(cfg="cfail5")]
380 #[rustc_clean(cfg="cfail6")]
381 trait TraitChangeModeSelfOwnToRef {
382 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail2")]
383 #[rustc_clean(cfg="cfail3")]
384 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail5")]
385 #[rustc_clean(cfg="cfail6")]
391 // Add unsafe modifier to method
392 #[cfg(any(cfail1,cfail4))]
393 trait TraitAddUnsafeModifier {
394 // --------------------------------------------------------------------
395 // -------------------------
396 // --------------------------------------------------------------------
397 // -------------------------
401 #[cfg(not(any(cfail1,cfail4)))]
402 #[rustc_clean(cfg="cfail2")]
403 #[rustc_clean(cfg="cfail3")]
404 #[rustc_clean(except="hir_owner", cfg="cfail5")]
405 #[rustc_clean(cfg="cfail6")]
406 trait TraitAddUnsafeModifier {
407 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
408 #[rustc_clean(cfg="cfail3")]
409 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
410 #[rustc_clean(cfg="cfail6")]
416 // Add extern modifier to method
417 #[cfg(any(cfail1,cfail4))]
418 trait TraitAddExternModifier {
419 // --------------------------------------------------------------------
420 // -------------------------
421 // --------------------------------------------------------------------
422 // -------------------------
426 #[cfg(not(any(cfail1,cfail4)))]
427 #[rustc_clean(cfg="cfail2")]
428 #[rustc_clean(cfg="cfail3")]
429 #[rustc_clean(except="hir_owner", cfg="cfail5")]
430 #[rustc_clean(cfg="cfail6")]
431 trait TraitAddExternModifier {
432 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
433 #[rustc_clean(cfg="cfail3")]
434 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
435 #[rustc_clean(cfg="cfail6")]
436 extern "C" fn method();
441 // Change extern "C" to extern "stdcall"
442 #[cfg(any(cfail1,cfail4))]
443 trait TraitChangeExternCToRustIntrinsic {
444 // --------------------------------------------------------------------
445 // -------------------------
446 // --------------------------------------------------------------------
447 // -------------------------
448 extern "C" fn method();
451 #[cfg(not(any(cfail1,cfail4)))]
452 #[rustc_clean(cfg="cfail2")]
453 #[rustc_clean(cfg="cfail3")]
454 #[rustc_clean(cfg="cfail5")]
455 #[rustc_clean(cfg="cfail6")]
456 trait TraitChangeExternCToRustIntrinsic {
457 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
458 #[rustc_clean(cfg="cfail3")]
459 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
460 #[rustc_clean(cfg="cfail6")]
461 extern "stdcall" fn method();
466 // Add type parameter to method
467 #[cfg(any(cfail1,cfail4))]
468 trait TraitAddTypeParameterToMethod {
469 // --------------------------------------------------------------------------------
471 // -------------------------
472 // --------------------------------------------------------------------------------
474 // -------------------------
478 #[cfg(not(any(cfail1,cfail4)))]
479 #[rustc_clean(cfg="cfail2")]
480 #[rustc_clean(cfg="cfail3")]
481 #[rustc_clean(cfg="cfail5")]
482 #[rustc_clean(cfg="cfail6")]
483 trait TraitAddTypeParameterToMethod {
484 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
486 #[rustc_clean(cfg="cfail3")]
487 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of",
489 #[rustc_clean(cfg="cfail6")]
495 // Add lifetime parameter to method
496 #[cfg(any(cfail1,cfail4))]
497 trait TraitAddLifetimeParameterToMethod {
498 // --------------------------------------------------------------------------------
499 // -------------------------
500 // --------------------------------------------------------------------------------
501 // -------------------------
505 #[cfg(not(any(cfail1,cfail4)))]
506 #[rustc_clean(cfg="cfail2")]
507 #[rustc_clean(cfg="cfail3")]
508 #[rustc_clean(cfg="cfail5")]
509 #[rustc_clean(cfg="cfail6")]
510 trait TraitAddLifetimeParameterToMethod {
511 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail2")]
512 #[rustc_clean(cfg="cfail3")]
513 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,generics_of", cfg="cfail5")]
514 #[rustc_clean(cfg="cfail6")]
520 // dummy trait for bound
521 trait ReferencedTrait0 { }
522 trait ReferencedTrait1 { }
524 // Add trait bound to method type parameter
525 #[cfg(any(cfail1,cfail4))]
526 trait TraitAddTraitBoundToMethodTypeParameter {
527 // ---------------------------------------------------------------------------
528 // -------------------------
529 // ---------------------------------------------------------------------------
530 // -------------------------
534 #[cfg(not(any(cfail1,cfail4)))]
535 #[rustc_clean(cfg="cfail2")]
536 #[rustc_clean(cfg="cfail3")]
537 #[rustc_clean(cfg="cfail5")]
538 #[rustc_clean(cfg="cfail6")]
539 trait TraitAddTraitBoundToMethodTypeParameter {
540 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
541 #[rustc_clean(cfg="cfail3")]
542 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
543 #[rustc_clean(cfg="cfail6")]
544 fn method<T: ReferencedTrait0>();
549 // Add builtin bound to method type parameter
550 #[cfg(any(cfail1,cfail4))]
551 trait TraitAddBuiltinBoundToMethodTypeParameter {
552 // ---------------------------------------------------------------------------
553 // -------------------------
554 // ---------------------------------------------------------------------------
555 // -------------------------
559 #[cfg(not(any(cfail1,cfail4)))]
560 #[rustc_clean(cfg="cfail2")]
561 #[rustc_clean(cfg="cfail3")]
562 #[rustc_clean(cfg="cfail5")]
563 #[rustc_clean(cfg="cfail6")]
564 trait TraitAddBuiltinBoundToMethodTypeParameter {
565 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
566 #[rustc_clean(cfg="cfail3")]
567 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
568 #[rustc_clean(cfg="cfail6")]
569 fn method<T: Sized>();
574 // Add lifetime bound to method lifetime parameter
575 #[cfg(any(cfail1,cfail4))]
576 trait TraitAddLifetimeBoundToMethodLifetimeParameter {
578 // -----------------------------------------------------------------------------
581 // -------------------------
583 // -----------------------------------------------------------------------------
586 // -------------------------
587 fn method<'a, 'b >(a: &'a u32, b: &'b u32);
590 #[cfg(not(any(cfail1,cfail4)))]
591 #[rustc_clean(cfg="cfail2")]
592 #[rustc_clean(cfg="cfail3")]
593 #[rustc_clean(cfg="cfail5")]
594 #[rustc_clean(cfg="cfail6")]
595 trait TraitAddLifetimeBoundToMethodLifetimeParameter {
597 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
600 #[rustc_clean(cfg="cfail3")]
602 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
605 #[rustc_clean(cfg="cfail6")]
606 fn method<'a, 'b: 'a>(a: &'a u32, b: &'b u32);
611 // Add second trait bound to method type parameter
612 #[cfg(any(cfail1,cfail4))]
613 trait TraitAddSecondTraitBoundToMethodTypeParameter {
614 // ---------------------------------------------------------------------------
615 // -------------------------
616 // ---------------------------------------------------------------------------
617 // -------------------------
618 fn method<T: ReferencedTrait0 >();
621 #[cfg(not(any(cfail1,cfail4)))]
622 #[rustc_clean(cfg="cfail2")]
623 #[rustc_clean(cfg="cfail3")]
624 #[rustc_clean(cfg="cfail5")]
625 #[rustc_clean(cfg="cfail6")]
626 trait TraitAddSecondTraitBoundToMethodTypeParameter {
627 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
628 #[rustc_clean(cfg="cfail3")]
629 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
630 #[rustc_clean(cfg="cfail6")]
631 fn method<T: ReferencedTrait0 + ReferencedTrait1>();
636 // Add second builtin bound to method type parameter
637 #[cfg(any(cfail1,cfail4))]
638 trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
639 // ---------------------------------------------------------------------------
640 // -------------------------
641 // ---------------------------------------------------------------------------
642 // -------------------------
643 fn method<T: Sized >();
646 #[cfg(not(any(cfail1,cfail4)))]
647 #[rustc_clean(cfg="cfail2")]
648 #[rustc_clean(cfg="cfail3")]
649 #[rustc_clean(cfg="cfail5")]
650 #[rustc_clean(cfg="cfail6")]
651 trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
652 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
653 #[rustc_clean(cfg="cfail3")]
654 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
655 #[rustc_clean(cfg="cfail6")]
656 fn method<T: Sized + Sync>();
661 // Add second lifetime bound to method lifetime parameter
662 #[cfg(any(cfail1,cfail4))]
663 trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
665 // -----------------------------------------------------------------------------
668 // -------------------------
670 // -----------------------------------------------------------------------------
673 // -------------------------
674 fn method<'a, 'b, 'c: 'a >(a: &'a u32, b: &'b u32, c: &'c u32);
677 #[cfg(not(any(cfail1,cfail4)))]
678 #[rustc_clean(cfg="cfail2")]
679 #[rustc_clean(cfg="cfail3")]
680 #[rustc_clean(cfg="cfail5")]
681 #[rustc_clean(cfg="cfail6")]
682 trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
684 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
687 #[rustc_clean(cfg="cfail3")]
689 except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
692 #[rustc_clean(cfg="cfail6")]
693 fn method<'a, 'b, 'c: 'a + 'b>(a: &'a u32, b: &'b u32, c: &'c u32);
698 // Add associated type
699 #[cfg(any(cfail1,cfail4))]
700 trait TraitAddAssociatedType {
701 //--------------------------
702 //--------------------------
705 //--------------------------
706 //--------------------------
707 //--------------------------
708 //--------------------------
712 #[cfg(not(any(cfail1,cfail4)))]
713 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
714 #[rustc_clean(cfg="cfail3")]
715 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
716 #[rustc_clean(cfg="cfail6")]
717 trait TraitAddAssociatedType {
718 #[rustc_clean(cfg="cfail3")]
719 #[rustc_clean(cfg="cfail6")]
722 #[rustc_clean(cfg="cfail2")]
723 #[rustc_clean(cfg="cfail3")]
724 #[rustc_clean(cfg="cfail5")]
725 #[rustc_clean(cfg="cfail6")]
731 // Add trait bound to associated type
732 #[cfg(any(cfail1,cfail4))]
733 trait TraitAddTraitBoundToAssociatedType {
734 // -------------------------------------------------------------
735 // -------------------------
736 // -------------------------------------------------------------
737 // -------------------------
744 // Apparently the type bound contributes to the predicates of the trait, but
745 // does not change the associated item itself.
746 #[cfg(not(any(cfail1,cfail4)))]
747 #[rustc_clean(cfg="cfail2")]
748 #[rustc_clean(cfg="cfail3")]
749 #[rustc_clean(cfg="cfail5")]
750 #[rustc_clean(cfg="cfail6")]
751 trait TraitAddTraitBoundToAssociatedType {
752 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
753 #[rustc_clean(cfg="cfail3")]
754 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
755 #[rustc_clean(cfg="cfail6")]
756 type Associated: ReferencedTrait0;
763 // Add lifetime bound to associated type
764 #[cfg(any(cfail1,cfail4))]
765 trait TraitAddLifetimeBoundToAssociatedType<'a> {
766 // -------------------------------------------------------------
767 // -------------------------
768 // -------------------------------------------------------------
769 // -------------------------
775 #[cfg(not(any(cfail1,cfail4)))]
776 #[rustc_clean(cfg="cfail2")]
777 #[rustc_clean(cfg="cfail3")]
778 #[rustc_clean(cfg="cfail5")]
779 #[rustc_clean(cfg="cfail6")]
780 trait TraitAddLifetimeBoundToAssociatedType<'a> {
781 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
782 #[rustc_clean(cfg="cfail3")]
783 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
784 #[rustc_clean(cfg="cfail6")]
792 // Add default to associated type
793 #[cfg(any(cfail1,cfail4))]
794 trait TraitAddDefaultToAssociatedType {
795 //--------------------------------------------------------------
796 //--------------------------
797 //--------------------------------------------------------------
798 //--------------------------
804 #[cfg(not(any(cfail1,cfail4)))]
805 #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
806 #[rustc_clean(cfg="cfail3")]
807 #[rustc_clean(except="hir_owner_nodes", cfg="cfail5")]
808 #[rustc_clean(cfg="cfail6")]
809 trait TraitAddDefaultToAssociatedType {
810 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
811 #[rustc_clean(cfg="cfail3")]
812 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
813 #[rustc_clean(cfg="cfail6")]
814 type Associated = ReferenceType0;
821 // Add associated constant
822 #[cfg(any(cfail1,cfail4))]
823 trait TraitAddAssociatedConstant {
827 #[cfg(not(any(cfail1,cfail4)))]
828 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
829 #[rustc_clean(cfg="cfail3")]
830 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
831 #[rustc_clean(cfg="cfail6")]
832 trait TraitAddAssociatedConstant {
840 // Add initializer to associated constant
841 #[cfg(any(cfail1,cfail4))]
842 trait TraitAddInitializerToAssociatedConstant {
843 //--------------------------------------------------------------
844 //--------------------------
845 //--------------------------------------------------------------
846 //--------------------------
849 //--------------------------
850 //--------------------------
851 //--------------------------
852 //--------------------------
856 #[cfg(not(any(cfail1,cfail4)))]
857 #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
858 #[rustc_clean(cfg="cfail3")]
859 #[rustc_clean(except="hir_owner_nodes", cfg="cfail5")]
860 #[rustc_clean(cfg="cfail6")]
861 trait TraitAddInitializerToAssociatedConstant {
862 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
863 #[rustc_clean(cfg="cfail3")]
864 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
865 #[rustc_clean(cfg="cfail6")]
866 const Value: u32 = 1;
868 #[rustc_clean(cfg="cfail2")]
869 #[rustc_clean(cfg="cfail3")]
870 #[rustc_clean(cfg="cfail5")]
871 #[rustc_clean(cfg="cfail6")]
877 // Change type of associated constant
878 #[cfg(any(cfail1,cfail4))]
879 trait TraitChangeTypeOfAssociatedConstant {
880 // ---------------------------------------------------------------------
881 // -------------------------
882 // ---------------------------------------------------------------------
883 // -------------------------
886 // -------------------------
887 // -------------------------
888 // -------------------------
889 // -------------------------
893 #[cfg(not(any(cfail1,cfail4)))]
894 #[rustc_clean(cfg="cfail2")]
895 #[rustc_clean(cfg="cfail3")]
896 #[rustc_clean(cfg="cfail5")]
897 #[rustc_clean(cfg="cfail6")]
898 trait TraitChangeTypeOfAssociatedConstant {
899 #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
900 #[rustc_clean(cfg="cfail3")]
901 #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail5")]
902 #[rustc_clean(cfg="cfail6")]
905 #[rustc_clean(cfg="cfail2")]
906 #[rustc_clean(cfg="cfail3")]
907 #[rustc_clean(cfg="cfail5")]
908 #[rustc_clean(cfg="cfail6")]
915 #[cfg(any(cfail1,cfail4))]
916 trait TraitAddSuperTrait { }
918 #[cfg(not(any(cfail1,cfail4)))]
919 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
920 #[rustc_clean(cfg="cfail3")]
921 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
922 #[rustc_clean(cfg="cfail6")]
923 trait TraitAddSuperTrait : ReferencedTrait0 { }
927 // Add builtin bound (Send or Copy)
928 #[cfg(any(cfail1,cfail4))]
929 trait TraitAddBuiltiBound { }
931 #[cfg(not(any(cfail1,cfail4)))]
932 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
933 #[rustc_clean(cfg="cfail3")]
934 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
935 #[rustc_clean(cfg="cfail6")]
936 trait TraitAddBuiltiBound : Send { }
940 // Add 'static lifetime bound to trait
941 #[cfg(any(cfail1,cfail4))]
942 trait TraitAddStaticLifetimeBound { }
944 #[cfg(not(any(cfail1,cfail4)))]
945 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
946 #[rustc_clean(cfg="cfail3")]
947 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
948 #[rustc_clean(cfg="cfail6")]
949 trait TraitAddStaticLifetimeBound : 'static { }
953 // Add super trait as second bound
954 #[cfg(any(cfail1,cfail4))]
955 trait TraitAddTraitAsSecondBound : ReferencedTrait0 { }
957 #[cfg(not(any(cfail1,cfail4)))]
958 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
959 #[rustc_clean(cfg="cfail3")]
960 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
961 #[rustc_clean(cfg="cfail6")]
962 trait TraitAddTraitAsSecondBound : ReferencedTrait0 + ReferencedTrait1 { }
964 #[cfg(any(cfail1,cfail4))]
965 trait TraitAddTraitAsSecondBoundFromBuiltin : Send { }
967 #[cfg(not(any(cfail1,cfail4)))]
968 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
969 #[rustc_clean(cfg="cfail3")]
970 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
971 #[rustc_clean(cfg="cfail6")]
972 trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { }
976 // Add builtin bound as second bound
977 #[cfg(any(cfail1,cfail4))]
978 trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 { }
980 #[cfg(not(any(cfail1,cfail4)))]
981 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
982 #[rustc_clean(cfg="cfail3")]
983 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
984 #[rustc_clean(cfg="cfail6")]
985 trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 + Send { }
987 #[cfg(any(cfail1,cfail4))]
988 trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin : Send { }
990 #[cfg(not(any(cfail1,cfail4)))]
991 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
992 #[rustc_clean(cfg="cfail3")]
993 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
994 #[rustc_clean(cfg="cfail6")]
995 trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { }
999 // Add 'static bounds as second bound
1000 #[cfg(any(cfail1,cfail4))]
1001 trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 { }
1003 #[cfg(not(any(cfail1,cfail4)))]
1004 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1005 #[rustc_clean(cfg="cfail3")]
1006 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1007 #[rustc_clean(cfg="cfail6")]
1008 trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 + 'static { }
1010 #[cfg(any(cfail1,cfail4))]
1011 trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send { }
1013 #[cfg(not(any(cfail1,cfail4)))]
1014 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1015 #[rustc_clean(cfg="cfail3")]
1016 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1017 #[rustc_clean(cfg="cfail6")]
1018 trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { }
1022 // Add type parameter to trait
1023 #[cfg(any(cfail1,cfail4))]
1024 trait TraitAddTypeParameterToTrait { }
1026 #[cfg(not(any(cfail1,cfail4)))]
1027 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1028 #[rustc_clean(cfg="cfail3")]
1029 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1030 #[rustc_clean(cfg="cfail6")]
1031 trait TraitAddTypeParameterToTrait<T> { }
1035 // Add lifetime parameter to trait
1036 #[cfg(any(cfail1,cfail4))]
1037 trait TraitAddLifetimeParameterToTrait { }
1039 #[cfg(not(any(cfail1,cfail4)))]
1040 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1041 #[rustc_clean(cfg="cfail3")]
1042 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1043 #[rustc_clean(cfg="cfail6")]
1044 trait TraitAddLifetimeParameterToTrait<'a> { }
1048 // Add trait bound to type parameter of trait
1049 #[cfg(any(cfail1,cfail4))]
1050 trait TraitAddTraitBoundToTypeParameterOfTrait<T> { }
1052 #[cfg(not(any(cfail1,cfail4)))]
1053 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1054 #[rustc_clean(cfg="cfail3")]
1055 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1056 #[rustc_clean(cfg="cfail6")]
1057 trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
1061 // Add lifetime bound to type parameter of trait
1062 #[cfg(any(cfail1,cfail4))]
1063 trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T> { }
1065 #[cfg(not(any(cfail1,cfail4)))]
1066 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1067 #[rustc_clean(cfg="cfail3")]
1068 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1069 #[rustc_clean(cfg="cfail6")]
1070 trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { }
1074 // Add lifetime bound to lifetime parameter of trait
1075 #[cfg(any(cfail1,cfail4))]
1076 trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a, 'b> { }
1078 #[cfg(not(any(cfail1,cfail4)))]
1079 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1080 #[rustc_clean(cfg="cfail3")]
1081 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1082 #[rustc_clean(cfg="cfail6")]
1083 trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { }
1087 // Add builtin bound to type parameter of trait
1088 #[cfg(any(cfail1,cfail4))]
1089 trait TraitAddBuiltinBoundToTypeParameterOfTrait<T> { }
1091 #[cfg(not(any(cfail1,cfail4)))]
1092 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1093 #[rustc_clean(cfg="cfail3")]
1094 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1095 #[rustc_clean(cfg="cfail6")]
1096 trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { }
1100 // Add second type parameter to trait
1101 #[cfg(any(cfail1,cfail4))]
1102 trait TraitAddSecondTypeParameterToTrait<T> { }
1104 #[cfg(not(any(cfail1,cfail4)))]
1105 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1106 #[rustc_clean(cfg="cfail3")]
1107 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1108 #[rustc_clean(cfg="cfail6")]
1109 trait TraitAddSecondTypeParameterToTrait<T, S> { }
1113 // Add second lifetime parameter to trait
1114 #[cfg(any(cfail1,cfail4))]
1115 trait TraitAddSecondLifetimeParameterToTrait<'a> { }
1117 #[cfg(not(any(cfail1,cfail4)))]
1118 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1119 #[rustc_clean(cfg="cfail3")]
1120 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1121 #[rustc_clean(cfg="cfail6")]
1122 trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { }
1126 // Add second trait bound to type parameter of trait
1127 #[cfg(any(cfail1,cfail4))]
1128 trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
1130 #[cfg(not(any(cfail1,cfail4)))]
1131 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1132 #[rustc_clean(cfg="cfail3")]
1133 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1134 #[rustc_clean(cfg="cfail6")]
1135 trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + ReferencedTrait1> { }
1139 // Add second lifetime bound to type parameter of trait
1140 #[cfg(any(cfail1,cfail4))]
1141 trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a> { }
1143 #[cfg(not(any(cfail1,cfail4)))]
1144 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1145 #[rustc_clean(cfg="cfail3")]
1146 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1147 #[rustc_clean(cfg="cfail6")]
1148 trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { }
1152 // Add second lifetime bound to lifetime parameter of trait
1153 #[cfg(any(cfail1,cfail4))]
1154 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b, 'c> { }
1156 #[cfg(not(any(cfail1,cfail4)))]
1157 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1158 #[rustc_clean(cfg="cfail3")]
1159 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1160 #[rustc_clean(cfg="cfail6")]
1161 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c> { }
1165 // Add second builtin bound to type parameter of trait
1166 #[cfg(any(cfail1,cfail4))]
1167 trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send> { }
1169 #[cfg(not(any(cfail1,cfail4)))]
1170 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1171 #[rustc_clean(cfg="cfail3")]
1172 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1173 #[rustc_clean(cfg="cfail6")]
1174 trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send + Sync> { }
1178 struct ReferenceType0 {}
1179 struct ReferenceType1 {}
1183 // Add trait bound to type parameter of trait in where clause
1184 #[cfg(any(cfail1,cfail4))]
1185 trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> { }
1187 #[cfg(not(any(cfail1,cfail4)))]
1188 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1189 #[rustc_clean(cfg="cfail3")]
1190 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1191 #[rustc_clean(cfg="cfail6")]
1192 trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
1196 // Add lifetime bound to type parameter of trait in where clause
1197 #[cfg(any(cfail1,cfail4))]
1198 trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> { }
1200 #[cfg(not(any(cfail1,cfail4)))]
1201 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1202 #[rustc_clean(cfg="cfail3")]
1203 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1204 #[rustc_clean(cfg="cfail6")]
1205 trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { }
1209 // Add lifetime bound to lifetime parameter of trait in where clause
1210 #[cfg(any(cfail1,cfail4))]
1211 trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> { }
1213 #[cfg(not(any(cfail1,cfail4)))]
1214 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1215 #[rustc_clean(cfg="cfail3")]
1216 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1217 #[rustc_clean(cfg="cfail6")]
1218 trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b { }
1222 // Add builtin bound to type parameter of trait in where clause
1223 #[cfg(any(cfail1,cfail4))]
1224 trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> { }
1226 #[cfg(not(any(cfail1,cfail4)))]
1227 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1228 #[rustc_clean(cfg="cfail3")]
1229 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1230 #[rustc_clean(cfg="cfail6")]
1231 trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
1235 // Add second trait bound to type parameter of trait in where clause
1236 #[cfg(any(cfail1,cfail4))]
1237 trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
1239 #[cfg(not(any(cfail1,cfail4)))]
1240 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1241 #[rustc_clean(cfg="cfail3")]
1242 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1243 #[rustc_clean(cfg="cfail6")]
1244 trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T>
1245 where T: ReferencedTrait0 + ReferencedTrait1 { }
1249 // Add second lifetime bound to type parameter of trait in where clause
1250 #[cfg(any(cfail1,cfail4))]
1251 trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a { }
1253 #[cfg(not(any(cfail1,cfail4)))]
1254 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1255 #[rustc_clean(cfg="cfail3")]
1256 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1257 #[rustc_clean(cfg="cfail6")]
1258 trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a + 'b { }
1262 // Add second lifetime bound to lifetime parameter of trait in where clause
1263 #[cfg(any(cfail1,cfail4))]
1264 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b { }
1266 #[cfg(not(any(cfail1,cfail4)))]
1267 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1268 #[rustc_clean(cfg="cfail3")]
1269 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1270 #[rustc_clean(cfg="cfail6")]
1271 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b + 'c { }
1275 // Add second builtin bound to type parameter of trait in where clause
1276 #[cfg(any(cfail1,cfail4))]
1277 trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
1279 #[cfg(not(any(cfail1,cfail4)))]
1280 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1281 #[rustc_clean(cfg="cfail3")]
1282 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1283 #[rustc_clean(cfg="cfail6")]
1284 trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send + Sync { }
1287 // Change return type of method indirectly by modifying a use statement
1288 mod change_return_type_of_method_indirectly_use {
1289 #[cfg(any(cfail1,cfail4))]
1290 use super::ReferenceType0 as ReturnType;
1291 #[cfg(not(any(cfail1,cfail4)))]
1292 use super::ReferenceType1 as ReturnType;
1294 #[rustc_clean(cfg="cfail2")]
1295 #[rustc_clean(cfg="cfail3")]
1296 #[rustc_clean(cfg="cfail5")]
1297 #[rustc_clean(cfg="cfail6")]
1298 trait TraitChangeReturnType {
1299 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
1300 #[rustc_clean(cfg="cfail3")]
1301 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
1302 #[rustc_clean(cfg="cfail6")]
1303 fn method() -> ReturnType;
1309 // Change type of method parameter indirectly by modifying a use statement
1310 mod change_method_parameter_type_indirectly_by_use {
1311 #[cfg(any(cfail1,cfail4))]
1312 use super::ReferenceType0 as ArgType;
1313 #[cfg(not(any(cfail1,cfail4)))]
1314 use super::ReferenceType1 as ArgType;
1316 #[rustc_clean(cfg="cfail2")]
1317 #[rustc_clean(cfg="cfail3")]
1318 #[rustc_clean(cfg="cfail5")]
1319 #[rustc_clean(cfg="cfail6")]
1320 trait TraitChangeArgType {
1321 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
1322 #[rustc_clean(cfg="cfail3")]
1323 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
1324 #[rustc_clean(cfg="cfail6")]
1325 fn method(a: ArgType);
1331 // Change trait bound of method type parameter indirectly by modifying a use statement
1332 mod change_method_parameter_type_bound_indirectly_by_use {
1333 #[cfg(any(cfail1,cfail4))]
1334 use super::ReferencedTrait0 as Bound;
1335 #[cfg(not(any(cfail1,cfail4)))]
1336 use super::ReferencedTrait1 as Bound;
1338 #[rustc_clean(cfg="cfail2")]
1339 #[rustc_clean(cfg="cfail3")]
1340 #[rustc_clean(cfg="cfail5")]
1341 #[rustc_clean(cfg="cfail6")]
1342 trait TraitChangeBoundOfMethodTypeParameter {
1343 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1344 #[rustc_clean(cfg="cfail3")]
1345 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1346 #[rustc_clean(cfg="cfail6")]
1347 fn method<T: Bound>(a: T);
1353 // Change trait bound of method type parameter in where clause indirectly
1354 // by modifying a use statement
1355 mod change_method_parameter_type_bound_indirectly_by_use_where {
1356 #[cfg(any(cfail1,cfail4))]
1357 use super::ReferencedTrait0 as Bound;
1358 #[cfg(not(any(cfail1,cfail4)))]
1359 use super::ReferencedTrait1 as Bound;
1361 #[rustc_clean(cfg="cfail2")]
1362 #[rustc_clean(cfg="cfail3")]
1363 #[rustc_clean(cfg="cfail5")]
1364 #[rustc_clean(cfg="cfail6")]
1365 trait TraitChangeBoundOfMethodTypeParameterWhere {
1366 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1367 #[rustc_clean(cfg="cfail3")]
1368 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1369 #[rustc_clean(cfg="cfail6")]
1370 fn method<T>(a: T) where T: Bound;
1376 // Change trait bound of trait type parameter indirectly by modifying a use statement
1377 mod change_method_type_parameter_bound_indirectly {
1378 #[cfg(any(cfail1,cfail4))]
1379 use super::ReferencedTrait0 as Bound;
1380 #[cfg(not(any(cfail1,cfail4)))]
1381 use super::ReferencedTrait1 as Bound;
1383 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1384 #[rustc_clean(cfg="cfail3")]
1385 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1386 #[rustc_clean(cfg="cfail6")]
1387 trait TraitChangeTraitBound<T: Bound> {
1394 // Change trait bound of trait type parameter in where clause indirectly
1395 // by modifying a use statement
1396 mod change_method_type_parameter_bound_indirectly_where {
1397 #[cfg(any(cfail1,cfail4))]
1398 use super::ReferencedTrait0 as Bound;
1399 #[cfg(not(any(cfail1,cfail4)))]
1400 use super::ReferencedTrait1 as Bound;
1402 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1403 #[rustc_clean(cfg="cfail3")]
1404 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1405 #[rustc_clean(cfg="cfail6")]
1406 trait TraitChangeTraitBoundWhere<T> where T: Bound {