File tree 2 files changed +18
-4
lines changed
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -1655,10 +1655,10 @@ impl clean::types::Term {
1655
1655
& ' a self ,
1656
1656
cx : & ' a Context < ' tcx > ,
1657
1657
) -> impl fmt:: Display + ' a + Captures < ' tcx > {
1658
- match self {
1659
- clean:: types:: Term :: Type ( ty) => ty. print ( cx) ,
1660
- _ => todo ! ( ) ,
1661
- }
1658
+ display_fn ( move |f| match self {
1659
+ clean:: types:: Term :: Type ( ty) => fmt :: Display :: fmt ( & ty. print ( cx) , f ) ,
1660
+ clean :: types :: Term :: Constant ( ct ) => fmt :: Display :: fmt ( & ct . print ( cx . tcx ( ) ) , f ) ,
1661
+ } )
1662
1662
}
1663
1663
}
1664
1664
Original file line number Diff line number Diff line change
1
+ #![ crate_name = "foo" ]
2
+
3
+ #![ feature( associated_const_equality) ]
4
+ pub enum ParseMode {
5
+ Raw ,
6
+ }
7
+ pub trait Parse {
8
+ const PARSE_MODE : ParseMode ;
9
+ }
10
+ pub trait RenderRaw { }
11
+
12
+ // @hasraw foo/trait.RenderRaw.html 'impl'
13
+ // @hasraw foo/trait.RenderRaw.html 'ParseMode::Raw'
14
+ impl < T : Parse < PARSE_MODE = { ParseMode :: Raw } > > RenderRaw for T { }
You can’t perform that action at this time.
0 commit comments