File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1050,11 +1050,13 @@ impl Parser {
1050
1050
// Like the above, but can also parse kind bounds in the case of a
1051
1051
// path to be used as a type that might be a trait.
1052
1052
pub fn parse_type_path ( & self ) -> ( @ast:: Path , OptVec < TyParamBound > ) {
1053
- let mut bounds = None ;
1053
+ let mut bounds = opt_vec :: Empty ;
1054
1054
let path = self . parse_bounded_path_with_tps ( false , Some ( || {
1055
- bounds = Some ( self . parse_optional_ty_param_bounds ( ) ) ;
1055
+ // Note: this closure might not even get called in the case of a
1056
+ // macro-generated path. But that's the macro parser's job.
1057
+ bounds = self . parse_optional_ty_param_bounds ( ) ;
1056
1058
} ) ) ;
1057
- ( path, bounds. unwrap ( ) )
1059
+ ( path, bounds)
1058
1060
}
1059
1061
1060
1062
/// parses 0 or 1 lifetime
You can’t perform that action at this time.
0 commit comments