File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -315,13 +315,7 @@ impl<S: Make<PathSegment>> Make<Path> for Vec<S> {
315315 fn make ( self , mk : & Builder ) -> Path {
316316 let mut segments = Punctuated :: new ( ) ;
317317 for s in self {
318- let segment = s. make ( mk) ;
319- let has_params = !segment. arguments . is_empty ( ) ;
320- segments. push ( segment) ;
321- // separate params from their segment with ::
322- if has_params {
323- segments. push_punct ( Default :: default ( ) ) ;
324- }
318+ segments. push ( s. make ( mk) ) ;
325319 }
326320 Path {
327321 leading_colon : None ,
Original file line number Diff line number Diff line change 1+ use c2rust_ast_builder:: mk;
2+ use syn:: __private:: ToTokens ;
3+
4+ #[ test]
5+ fn test_tokenize ( ) {
6+ let tys = vec ! [ mk( ) . path_ty( vec![ "t" ] ) ] ;
7+ let args = mk ( ) . angle_bracketed_args ( tys) ;
8+ let path_segment = mk ( ) . path_segment_with_args ( "x" , args) ;
9+ assert_eq ! ( path_segment. to_token_stream( ) . to_string( ) , "x :: < t >" ) ;
10+
11+ let path = mk ( ) . path ( vec ! [ path_segment] ) ;
12+ assert_eq ! ( path. to_token_stream( ) . to_string( ) , "x :: < t >" ) ;
13+ }
You can’t perform that action at this time.
0 commit comments