This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ // This test ensures that the "implementations on foreign types" of a trait are correctly sorted.
2+ go-to: "file://" + |DOC_PATH| + "/test_docs/foreign_impl_order/trait.Foo.html"
3+ assert-text: ("details:nth-of-type(1) h3", "impl Foo<1> for [u8; 1]")
4+ assert-text: ("details:nth-of-type(2) h3", "impl Foo<2> for [u8; 2]")
5+ assert-text: ("details:nth-of-type(3) h3", "impl Foo<3> for [u8; 3]")
6+ assert-text: ("details:nth-of-type(4) h3", "impl Foo<4> for [u8; 4]")
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ call-function: ("check-colors", {
7979set-window-size: (851, 600)
8080
8181// Check the size and count in tabs
82- assert-text: ("#search-tabs > button:nth-child(1) > .count", " (24 ) ")
82+ assert-text: ("#search-tabs > button:nth-child(1) > .count", " (25 ) ")
8383assert-text: ("#search-tabs > button:nth-child(2) > .count", " (5) ")
8484assert-text: ("#search-tabs > button:nth-child(3) > .count", " (0) ")
8585store-property: ("#search-tabs > button:nth-child(1)", {"offsetWidth": buttonWidth})
Original file line number Diff line number Diff line change @@ -574,3 +574,22 @@ impl ZyxwvutTrait for ZyxwvutMethodDisambiguation {
574574 x
575575 }
576576}
577+
578+ pub mod foreign_impl_order {
579+ pub trait Foo < const W : usize > {
580+ fn f ( & mut self , with : [ u8 ; W ] ) ;
581+ }
582+
583+ impl Foo < 4 > for [ u8 ; 4 ] {
584+ fn f ( & mut self , fg : [ u8 ; 4 ] ) { }
585+ }
586+ impl Foo < 2 > for [ u8 ; 2 ] {
587+ fn f ( & mut self , fg : [ u8 ; 2 ] ) { }
588+ }
589+ impl Foo < 1 > for [ u8 ; 1 ] {
590+ fn f ( & mut self , fg : [ u8 ; 1 ] ) { }
591+ }
592+ impl Foo < 3 > for [ u8 ; 3 ] {
593+ fn f ( & mut self , fg : [ u8 ; 3 ] ) { }
594+ }
595+ }
You can’t perform that action at this time.
0 commit comments