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
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(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
35 #[rustc_clean(cfg="cfail3")]
36 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
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,hir_owner_nodes", cfg="cfail2")]
289 #[rustc_clean(cfg="cfail3")]
290 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
291 #[rustc_clean(cfg="cfail6")]
292 trait TraitAddMethodAutoImplementation
{
293 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail2")]
294 #[rustc_clean(cfg="cfail3")]
295 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", 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
{
803 #[cfg(not(any(cfail1,cfail4)))]
804 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
805 #[rustc_clean(cfg="cfail3")]
806 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
807 #[rustc_clean(cfg="cfail6")]
808 trait TraitAddDefaultToAssociatedType
{
809 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail2")]
810 #[rustc_clean(cfg="cfail3")]
811 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail5")]
812 #[rustc_clean(cfg="cfail6")]
813 type Associated
= ReferenceType0
;
820 // Add associated constant
821 #[cfg(any(cfail1,cfail4))]
822 trait TraitAddAssociatedConstant
{
826 #[cfg(not(any(cfail1,cfail4)))]
827 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
828 #[rustc_clean(cfg="cfail3")]
829 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
830 #[rustc_clean(cfg="cfail6")]
831 trait TraitAddAssociatedConstant
{
839 // Add initializer to associated constant
840 #[cfg(any(cfail1,cfail4))]
841 trait TraitAddInitializerToAssociatedConstant
{
847 #[cfg(not(any(cfail1,cfail4)))]
848 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
849 #[rustc_clean(cfg="cfail3")]
850 #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
851 #[rustc_clean(cfg="cfail6")]
852 trait TraitAddInitializerToAssociatedConstant
{
853 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail2")]
854 #[rustc_clean(cfg="cfail3")]
855 #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail5")]
856 #[rustc_clean(cfg="cfail6")]
857 const Value
: u32 = 1;
859 #[rustc_clean(cfg="cfail2")]
860 #[rustc_clean(cfg="cfail3")]
861 #[rustc_clean(cfg="cfail5")]
862 #[rustc_clean(cfg="cfail6")]
868 // Change type of associated constant
869 #[cfg(any(cfail1,cfail4))]
870 trait TraitChangeTypeOfAssociatedConstant
{
871 // ---------------------------------------------------------------------
872 // -------------------------
873 // ---------------------------------------------------------------------
874 // -------------------------
877 // -------------------------
878 // -------------------------
879 // -------------------------
880 // -------------------------
884 #[cfg(not(any(cfail1,cfail4)))]
885 #[rustc_clean(cfg="cfail2")]
886 #[rustc_clean(cfg="cfail3")]
887 #[rustc_clean(cfg="cfail5")]
888 #[rustc_clean(cfg="cfail6")]
889 trait TraitChangeTypeOfAssociatedConstant
{
890 #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
891 #[rustc_clean(cfg="cfail3")]
892 #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail5")]
893 #[rustc_clean(cfg="cfail6")]
896 #[rustc_clean(cfg="cfail2")]
897 #[rustc_clean(cfg="cfail3")]
898 #[rustc_clean(cfg="cfail5")]
899 #[rustc_clean(cfg="cfail6")]
906 #[cfg(any(cfail1,cfail4))]
907 trait TraitAddSuperTrait { }
909 #[cfg(not(any(cfail1,cfail4)))]
910 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
911 #[rustc_clean(cfg="cfail3")]
912 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
913 #[rustc_clean(cfg="cfail6")]
914 trait TraitAddSuperTrait
: ReferencedTrait0 { }
918 // Add builtin bound (Send or Copy)
919 #[cfg(any(cfail1,cfail4))]
920 trait TraitAddBuiltiBound { }
922 #[cfg(not(any(cfail1,cfail4)))]
923 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
924 #[rustc_clean(cfg="cfail3")]
925 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
926 #[rustc_clean(cfg="cfail6")]
927 trait TraitAddBuiltiBound
: Send { }
931 // Add 'static lifetime bound to trait
932 #[cfg(any(cfail1,cfail4))]
933 trait TraitAddStaticLifetimeBound { }
935 #[cfg(not(any(cfail1,cfail4)))]
936 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
937 #[rustc_clean(cfg="cfail3")]
938 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
939 #[rustc_clean(cfg="cfail6")]
940 trait TraitAddStaticLifetimeBound
: '
static { }
944 // Add super trait as second bound
945 #[cfg(any(cfail1,cfail4))]
946 trait TraitAddTraitAsSecondBound
: ReferencedTrait0 { }
948 #[cfg(not(any(cfail1,cfail4)))]
949 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
950 #[rustc_clean(cfg="cfail3")]
951 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
952 #[rustc_clean(cfg="cfail6")]
953 trait TraitAddTraitAsSecondBound
: ReferencedTrait0
+ ReferencedTrait1 { }
955 #[cfg(any(cfail1,cfail4))]
956 trait TraitAddTraitAsSecondBoundFromBuiltin
: Send { }
958 #[cfg(not(any(cfail1,cfail4)))]
959 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
960 #[rustc_clean(cfg="cfail3")]
961 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
962 #[rustc_clean(cfg="cfail6")]
963 trait TraitAddTraitAsSecondBoundFromBuiltin
: Send
+ ReferencedTrait0 { }
967 // Add builtin bound as second bound
968 #[cfg(any(cfail1,cfail4))]
969 trait TraitAddBuiltinBoundAsSecondBound
: ReferencedTrait0 { }
971 #[cfg(not(any(cfail1,cfail4)))]
972 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
973 #[rustc_clean(cfg="cfail3")]
974 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
975 #[rustc_clean(cfg="cfail6")]
976 trait TraitAddBuiltinBoundAsSecondBound
: ReferencedTrait0
+ Send { }
978 #[cfg(any(cfail1,cfail4))]
979 trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin
: Send { }
981 #[cfg(not(any(cfail1,cfail4)))]
982 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
983 #[rustc_clean(cfg="cfail3")]
984 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
985 #[rustc_clean(cfg="cfail6")]
986 trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin
: Send
+ Copy { }
990 // Add 'static bounds as second bound
991 #[cfg(any(cfail1,cfail4))]
992 trait TraitAddStaticBoundAsSecondBound
: ReferencedTrait0 { }
994 #[cfg(not(any(cfail1,cfail4)))]
995 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
996 #[rustc_clean(cfg="cfail3")]
997 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
998 #[rustc_clean(cfg="cfail6")]
999 trait TraitAddStaticBoundAsSecondBound
: ReferencedTrait0
+ '
static { }
1001 #[cfg(any(cfail1,cfail4))]
1002 trait TraitAddStaticBoundAsSecondBoundFromBuiltin
: Send { }
1004 #[cfg(not(any(cfail1,cfail4)))]
1005 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1006 #[rustc_clean(cfg="cfail3")]
1007 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1008 #[rustc_clean(cfg="cfail6")]
1009 trait TraitAddStaticBoundAsSecondBoundFromBuiltin
: Send
+ '
static { }
1013 // Add type parameter to trait
1014 #[cfg(any(cfail1,cfail4))]
1015 trait TraitAddTypeParameterToTrait { }
1017 #[cfg(not(any(cfail1,cfail4)))]
1018 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1019 #[rustc_clean(cfg="cfail3")]
1020 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1021 #[rustc_clean(cfg="cfail6")]
1022 trait TraitAddTypeParameterToTrait
<T
> { }
1026 // Add lifetime parameter to trait
1027 #[cfg(any(cfail1,cfail4))]
1028 trait TraitAddLifetimeParameterToTrait { }
1030 #[cfg(not(any(cfail1,cfail4)))]
1031 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1032 #[rustc_clean(cfg="cfail3")]
1033 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1034 #[rustc_clean(cfg="cfail6")]
1035 trait TraitAddLifetimeParameterToTrait
<'a
> { }
1039 // Add trait bound to type parameter of trait
1040 #[cfg(any(cfail1,cfail4))]
1041 trait TraitAddTraitBoundToTypeParameterOfTrait
<T
> { }
1043 #[cfg(not(any(cfail1,cfail4)))]
1044 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1045 #[rustc_clean(cfg="cfail3")]
1046 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1047 #[rustc_clean(cfg="cfail6")]
1048 trait TraitAddTraitBoundToTypeParameterOfTrait
<T
: ReferencedTrait0
> { }
1052 // Add lifetime bound to type parameter of trait
1053 #[cfg(any(cfail1,cfail4))]
1054 trait TraitAddLifetimeBoundToTypeParameterOfTrait
<'a
, T
> { }
1056 #[cfg(not(any(cfail1,cfail4)))]
1057 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1058 #[rustc_clean(cfg="cfail3")]
1059 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1060 #[rustc_clean(cfg="cfail6")]
1061 trait TraitAddLifetimeBoundToTypeParameterOfTrait
<'a
, T
: 'a
> { }
1065 // Add lifetime bound to lifetime parameter of trait
1066 #[cfg(any(cfail1,cfail4))]
1067 trait TraitAddLifetimeBoundToLifetimeParameterOfTrait
<'a
, 'b
> { }
1069 #[cfg(not(any(cfail1,cfail4)))]
1070 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1071 #[rustc_clean(cfg="cfail3")]
1072 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1073 #[rustc_clean(cfg="cfail6")]
1074 trait TraitAddLifetimeBoundToLifetimeParameterOfTrait
<'a
: 'b
, 'b
> { }
1078 // Add builtin bound to type parameter of trait
1079 #[cfg(any(cfail1,cfail4))]
1080 trait TraitAddBuiltinBoundToTypeParameterOfTrait
<T
> { }
1082 #[cfg(not(any(cfail1,cfail4)))]
1083 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1084 #[rustc_clean(cfg="cfail3")]
1085 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1086 #[rustc_clean(cfg="cfail6")]
1087 trait TraitAddBuiltinBoundToTypeParameterOfTrait
<T
: Send
> { }
1091 // Add second type parameter to trait
1092 #[cfg(any(cfail1,cfail4))]
1093 trait TraitAddSecondTypeParameterToTrait
<T
> { }
1095 #[cfg(not(any(cfail1,cfail4)))]
1096 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1097 #[rustc_clean(cfg="cfail3")]
1098 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1099 #[rustc_clean(cfg="cfail6")]
1100 trait TraitAddSecondTypeParameterToTrait
<T
, S
> { }
1104 // Add second lifetime parameter to trait
1105 #[cfg(any(cfail1,cfail4))]
1106 trait TraitAddSecondLifetimeParameterToTrait
<'a
> { }
1108 #[cfg(not(any(cfail1,cfail4)))]
1109 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1110 #[rustc_clean(cfg="cfail3")]
1111 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1112 #[rustc_clean(cfg="cfail6")]
1113 trait TraitAddSecondLifetimeParameterToTrait
<'a
, 'b
> { }
1117 // Add second trait bound to type parameter of trait
1118 #[cfg(any(cfail1,cfail4))]
1119 trait TraitAddSecondTraitBoundToTypeParameterOfTrait
<T
: ReferencedTrait0
> { }
1121 #[cfg(not(any(cfail1,cfail4)))]
1122 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1123 #[rustc_clean(cfg="cfail3")]
1124 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1125 #[rustc_clean(cfg="cfail6")]
1126 trait TraitAddSecondTraitBoundToTypeParameterOfTrait
<T
: ReferencedTrait0
+ ReferencedTrait1
> { }
1130 // Add second lifetime bound to type parameter of trait
1131 #[cfg(any(cfail1,cfail4))]
1132 trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait
<'a
, 'b
, T
: 'a
> { }
1134 #[cfg(not(any(cfail1,cfail4)))]
1135 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1136 #[rustc_clean(cfg="cfail3")]
1137 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1138 #[rustc_clean(cfg="cfail6")]
1139 trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait
<'a
, 'b
, T
: 'a
+ 'b
> { }
1143 // Add second lifetime bound to lifetime parameter of trait
1144 #[cfg(any(cfail1,cfail4))]
1145 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait
<'a
: 'b
, 'b
, 'c
> { }
1147 #[cfg(not(any(cfail1,cfail4)))]
1148 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1149 #[rustc_clean(cfg="cfail3")]
1150 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1151 #[rustc_clean(cfg="cfail6")]
1152 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait
<'a
: 'b
+ 'c
, 'b
, 'c
> { }
1156 // Add second builtin bound to type parameter of trait
1157 #[cfg(any(cfail1,cfail4))]
1158 trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait
<T
: Send
> { }
1160 #[cfg(not(any(cfail1,cfail4)))]
1161 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1162 #[rustc_clean(cfg="cfail3")]
1163 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1164 #[rustc_clean(cfg="cfail6")]
1165 trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait
<T
: Send
+ Sync
> { }
1169 struct ReferenceType0 {}
1170 struct ReferenceType1 {}
1174 // Add trait bound to type parameter of trait in where clause
1175 #[cfg(any(cfail1,cfail4))]
1176 trait TraitAddTraitBoundToTypeParameterOfTraitWhere
<T
> { }
1178 #[cfg(not(any(cfail1,cfail4)))]
1179 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1180 #[rustc_clean(cfg="cfail3")]
1181 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1182 #[rustc_clean(cfg="cfail6")]
1183 trait TraitAddTraitBoundToTypeParameterOfTraitWhere
<T
> where T
: ReferencedTrait0 { }
1187 // Add lifetime bound to type parameter of trait in where clause
1188 #[cfg(any(cfail1,cfail4))]
1189 trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere
<'a
, T
> { }
1191 #[cfg(not(any(cfail1,cfail4)))]
1192 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1193 #[rustc_clean(cfg="cfail3")]
1194 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1195 #[rustc_clean(cfg="cfail6")]
1196 trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere
<'a
, T
> where T
: 'a { }
1200 // Add lifetime bound to lifetime parameter of trait in where clause
1201 #[cfg(any(cfail1,cfail4))]
1202 trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere
<'a
, 'b
> { }
1204 #[cfg(not(any(cfail1,cfail4)))]
1205 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1206 #[rustc_clean(cfg="cfail3")]
1207 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1208 #[rustc_clean(cfg="cfail6")]
1209 trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere
<'a
, 'b
> where 'a
: 'b { }
1213 // Add builtin bound to type parameter of trait in where clause
1214 #[cfg(any(cfail1,cfail4))]
1215 trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere
<T
> { }
1217 #[cfg(not(any(cfail1,cfail4)))]
1218 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1219 #[rustc_clean(cfg="cfail3")]
1220 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1221 #[rustc_clean(cfg="cfail6")]
1222 trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere
<T
> where T
: Send { }
1226 // Add second trait bound to type parameter of trait in where clause
1227 #[cfg(any(cfail1,cfail4))]
1228 trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere
<T
> where T
: ReferencedTrait0 { }
1230 #[cfg(not(any(cfail1,cfail4)))]
1231 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1232 #[rustc_clean(cfg="cfail3")]
1233 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1234 #[rustc_clean(cfg="cfail6")]
1235 trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere
<T
>
1236 where T
: ReferencedTrait0
+ ReferencedTrait1 { }
1240 // Add second lifetime bound to type parameter of trait in where clause
1241 #[cfg(any(cfail1,cfail4))]
1242 trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere
<'a
, 'b
, T
> where T
: 'a { }
1244 #[cfg(not(any(cfail1,cfail4)))]
1245 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
1246 #[rustc_clean(cfg="cfail3")]
1247 #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail5")]
1248 #[rustc_clean(cfg="cfail6")]
1249 trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere
<'a
, 'b
, T
> where T
: 'a
+ 'b { }
1253 // Add second lifetime bound to lifetime parameter of trait in where clause
1254 #[cfg(any(cfail1,cfail4))]
1255 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere
<'a
, 'b
, 'c
> where 'a
: 'b { }
1257 #[cfg(not(any(cfail1,cfail4)))]
1258 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1259 #[rustc_clean(cfg="cfail3")]
1260 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1261 #[rustc_clean(cfg="cfail6")]
1262 trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere
<'a
, 'b
, 'c
> where 'a
: 'b
+ 'c { }
1266 // Add second builtin bound to type parameter of trait in where clause
1267 #[cfg(any(cfail1,cfail4))]
1268 trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere
<T
> where T
: Send { }
1270 #[cfg(not(any(cfail1,cfail4)))]
1271 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1272 #[rustc_clean(cfg="cfail3")]
1273 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1274 #[rustc_clean(cfg="cfail6")]
1275 trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere
<T
> where T
: Send
+ Sync { }
1278 // Change return type of method indirectly by modifying a use statement
1279 mod change_return_type_of_method_indirectly_use
{
1280 #[cfg(any(cfail1,cfail4))]
1281 use super::ReferenceType0
as ReturnType
;
1282 #[cfg(not(any(cfail1,cfail4)))]
1283 use super::ReferenceType1
as ReturnType
;
1285 #[rustc_clean(cfg="cfail2")]
1286 #[rustc_clean(cfg="cfail3")]
1287 #[rustc_clean(cfg="cfail5")]
1288 #[rustc_clean(cfg="cfail6")]
1289 trait TraitChangeReturnType
{
1290 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
1291 #[rustc_clean(cfg="cfail3")]
1292 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
1293 #[rustc_clean(cfg="cfail6")]
1294 fn method() -> ReturnType
;
1300 // Change type of method parameter indirectly by modifying a use statement
1301 mod change_method_parameter_type_indirectly_by_use
{
1302 #[cfg(any(cfail1,cfail4))]
1303 use super::ReferenceType0
as ArgType
;
1304 #[cfg(not(any(cfail1,cfail4)))]
1305 use super::ReferenceType1
as ArgType
;
1307 #[rustc_clean(cfg="cfail2")]
1308 #[rustc_clean(cfg="cfail3")]
1309 #[rustc_clean(cfg="cfail5")]
1310 #[rustc_clean(cfg="cfail6")]
1311 trait TraitChangeArgType
{
1312 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
1313 #[rustc_clean(cfg="cfail3")]
1314 #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail5")]
1315 #[rustc_clean(cfg="cfail6")]
1316 fn method(a
: ArgType
);
1322 // Change trait bound of method type parameter indirectly by modifying a use statement
1323 mod change_method_parameter_type_bound_indirectly_by_use
{
1324 #[cfg(any(cfail1,cfail4))]
1325 use super::ReferencedTrait0
as Bound
;
1326 #[cfg(not(any(cfail1,cfail4)))]
1327 use super::ReferencedTrait1
as Bound
;
1329 #[rustc_clean(cfg="cfail2")]
1330 #[rustc_clean(cfg="cfail3")]
1331 #[rustc_clean(cfg="cfail5")]
1332 #[rustc_clean(cfg="cfail6")]
1333 trait TraitChangeBoundOfMethodTypeParameter
{
1334 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1335 #[rustc_clean(cfg="cfail3")]
1336 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1337 #[rustc_clean(cfg="cfail6")]
1338 fn method
<T
: Bound
>(a
: T
);
1344 // Change trait bound of method type parameter in where clause indirectly
1345 // by modifying a use statement
1346 mod change_method_parameter_type_bound_indirectly_by_use_where
{
1347 #[cfg(any(cfail1,cfail4))]
1348 use super::ReferencedTrait0
as Bound
;
1349 #[cfg(not(any(cfail1,cfail4)))]
1350 use super::ReferencedTrait1
as Bound
;
1352 #[rustc_clean(cfg="cfail2")]
1353 #[rustc_clean(cfg="cfail3")]
1354 #[rustc_clean(cfg="cfail5")]
1355 #[rustc_clean(cfg="cfail6")]
1356 trait TraitChangeBoundOfMethodTypeParameterWhere
{
1357 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1358 #[rustc_clean(cfg="cfail3")]
1359 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1360 #[rustc_clean(cfg="cfail6")]
1361 fn method
<T
>(a
: T
) where T
: Bound
;
1367 // Change trait bound of trait type parameter indirectly by modifying a use statement
1368 mod change_method_type_parameter_bound_indirectly
{
1369 #[cfg(any(cfail1,cfail4))]
1370 use super::ReferencedTrait0
as Bound
;
1371 #[cfg(not(any(cfail1,cfail4)))]
1372 use super::ReferencedTrait1
as Bound
;
1374 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1375 #[rustc_clean(cfg="cfail3")]
1376 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1377 #[rustc_clean(cfg="cfail6")]
1378 trait TraitChangeTraitBound
<T
: Bound
> {
1385 // Change trait bound of trait type parameter in where clause indirectly
1386 // by modifying a use statement
1387 mod change_method_type_parameter_bound_indirectly_where
{
1388 #[cfg(any(cfail1,cfail4))]
1389 use super::ReferencedTrait0
as Bound
;
1390 #[cfg(not(any(cfail1,cfail4)))]
1391 use super::ReferencedTrait1
as Bound
;
1393 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
1394 #[rustc_clean(cfg="cfail3")]
1395 #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
1396 #[rustc_clean(cfg="cfail6")]
1397 trait TraitChangeTraitBoundWhere
<T
> where T
: Bound
{