@@ -373,13 +373,6 @@ pub struct JniExt {
373373 /// Per-rank output wrappers. Same shape as [`Self::input_wrappers`].
374374 pub ( crate ) output_wrappers : [ HashMap < TypeKey , WrapperFn > ; 4 ] ,
375375
376- /// Author-supplied Rust items prepended to the generated file before
377- /// the framework's own prerequisites. Use for `use crate::errors::X;`
378- /// statements that bring any identifiers used in the binding's
379- /// converter patterns into scope at the include site (e.g. the
380- /// `ZResult<_>` alias zenoh registers a throwing converter for).
381- pub ( crate ) extra_prerequisites : Vec < syn:: Item > ,
382-
383376 /// Tracks the last [`Self::kotlin_class`] key registered so
384377 /// [`Self::method`] / [`Self::suppress_kotlin_code`] know which
385378 /// entry to extend. Cleared after each unrelated builder call.
@@ -434,7 +427,6 @@ impl JniExt {
434427 HashMap :: new ( ) ,
435428 HashMap :: new ( ) ,
436429 ] ,
437- extra_prerequisites : Vec :: new ( ) ,
438430 last_opaque_key : None ,
439431 last_meta_key : None ,
440432 last_exception_idx : None ,
@@ -508,18 +500,6 @@ impl JniExt {
508500 self
509501 }
510502
511- /// Inject an extra Rust item (typically a `use` statement) into the
512- /// preamble of the generated file. Use this to bring identifiers
513- /// referenced by `output_throws` / `output_wrapper` patterns into
514- /// scope at the include site — e.g. `use crate::errors::ZResult;`
515- /// for a binding whose `#[prebindgen]` fns return `ZResult<T>` and
516- /// whose registered converter patterns use the same bare name.
517- /// The framework itself stays unaware of these aliases.
518- pub fn add_prerequisite ( mut self , item : syn:: Item ) -> Self {
519- self . extra_prerequisites . push ( item) ;
520- self
521- }
522-
523503 /// Register an output converter that may raise a JVM exception.
524504 /// **Must be chained immediately after a [`Self::kotlin_exception_class`]
525505 /// call** — the registration is scoped to that exception, and the
@@ -1600,7 +1580,6 @@ impl PrebindgenExt for JniExt {
16001580 pub ( crate ) type __JniErr = #error_type;
16011581 ) ;
16021582 let mut items = vec ! [ alias] ;
1603- items. extend ( self . extra_prerequisites . iter ( ) . cloned ( ) ) ;
16041583 items. extend ( owned_object_prerequisite_items ( ) ) ;
16051584 // Throw fns — one `pub(crate) fn throw_<short>(env, &err)` per
16061585 // registered `kotlin_exception_class`. Emitted as prerequisites
0 commit comments