File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed
compiler/rustc_ast_pretty/src/pprust Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -2328,11 +2328,12 @@ impl<'a> State<'a> {
23282328 self . print_path ( path, false , depth) ;
23292329 }
23302330 self . s . word ( ">" ) ;
2331- self . s . word ( "::" ) ;
2332- let item_segment = path. segments . last ( ) . unwrap ( ) ;
2333- self . print_ident ( item_segment. ident ) ;
2334- if let Some ( ref args) = item_segment. args {
2335- self . print_generic_args ( args, colons_before_params)
2331+ for item_segment in & path. segments [ qself. position ..] {
2332+ self . s . word ( "::" ) ;
2333+ self . print_ident ( item_segment. ident ) ;
2334+ if let Some ( ref args) = item_segment. args {
2335+ self . print_generic_args ( args, colons_before_params)
2336+ }
23362337 }
23372338 }
23382339
Original file line number Diff line number Diff line change 1+ // pp-exact
2+
3+
4+ mod m {
5+ pub trait Tr {
6+ type Ts : super :: Tu ;
7+ }
8+ }
9+
10+ trait Tu {
11+ fn dummy ( ) { }
12+ }
13+
14+ fn foo < T : m:: Tr > ( ) { <T as m:: Tr >:: Ts :: dummy ( ) ; }
15+
16+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments