File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -372,7 +372,10 @@ impl<'a> TypeConverter<'a> {
372372 }
373373 let ( new_tn, api) = self . get_templated_typename ( & Type :: Path ( typ) ) ?;
374374 extra_apis. extend ( api. into_iter ( ) ) ;
375- deps. remove ( & tn) ;
375+ // Although it's tempting to remove the dep on the original type,
376+ // this means we wouldn't spot cases where the original type can't
377+ // be represented in C++, e.g. because it has an unused template parameter.
378+ // So we keep the original dep too.
376379 typ = new_tn. to_type_path ( ) ;
377380 deps. insert ( new_tn) ;
378381 }
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ impl<'a> BridgeConverter<'a> {
120120 Self :: dump_apis ( "parsing" , & apis) ;
121121 // Inside parse_results, we now have a list of APIs.
122122 // We now enter various analysis phases.
123- // Next , convert any typedefs.
123+ // First , convert any typedefs.
124124 // "Convert" means replacing bindgen-style type targets
125125 // (e.g. root::std::unique_ptr) with cxx-style targets (e.g. UniquePtr).
126126 let apis = convert_typedef_targets ( self . config , apis) ;
You can’t perform that action at this time.
0 commit comments