@@ -201,34 +201,6 @@ pub fn all_edges(_: &BindgenContext, _: Edge) -> bool {
201201 true
202202}
203203
204- /// A `TraversalPredicate` implementation that only follows edges to items that
205- /// are enabled for code generation. This lets us skip considering items for
206- /// which we won't generate any bindings to.
207- pub fn codegen_edges ( ctx : & BindgenContext , edge : Edge ) -> bool {
208- let cc = & ctx. options ( ) . codegen_config ;
209- match edge. kind {
210- EdgeKind :: Generic => ctx. resolve_item ( edge. to ) . is_enabled_for_codegen ( ctx) ,
211-
212- // We statically know the kind of item that non-generic edges can point
213- // to, so we don't need to actually resolve the item and check
214- // `Item::is_enabled_for_codegen`.
215- EdgeKind :: TemplateParameterDefinition |
216- EdgeKind :: TemplateArgument |
217- EdgeKind :: TemplateDeclaration |
218- EdgeKind :: BaseMember |
219- EdgeKind :: Field |
220- EdgeKind :: InnerType |
221- EdgeKind :: FunctionReturn |
222- EdgeKind :: FunctionParameter |
223- EdgeKind :: VarType |
224- EdgeKind :: TypeReference => cc. types ,
225- EdgeKind :: InnerVar => cc. vars ,
226- EdgeKind :: Method => cc. methods ,
227- EdgeKind :: Constructor => cc. constructors ,
228- EdgeKind :: Destructor => cc. destructors ,
229- }
230- }
231-
232204/// A `TraversalPredicate` implementation that never follows any edges, and
233205/// therefore traversals using this predicate will only visit the traversal's
234206/// roots.
0 commit comments