1 #include "ffi/IcuBridge.h"
2 #include <array>
3 #include <cassert>
4 #include <cstddef>
5 #include <cstdint>
6 #include <iterator>
7 #include <new>
8 #include <stdexcept>
9 #include <string>
10 #include <type_traits>
11 #include <utility>
12 
13 namespace rust {
14 inline namespace cxxbridge1 {
15 // #include "rust/cxx.h"
16 
17 #ifndef CXXBRIDGE1_PANIC
18 #define CXXBRIDGE1_PANIC
19 template <typename Exception>
20 void panic [[noreturn]] (const char *msg);
21 #endif // CXXBRIDGE1_PANIC
22 
23 struct unsafe_bitcopy_t;
24 
25 namespace {
26 template <typename T>
27 class impl;
28 } // namespace
29 
30 template <typename T>
31 ::std::size_t size_of();
32 template <typename T>
33 ::std::size_t align_of();
34 
35 #ifndef CXXBRIDGE1_RUST_STRING
36 #define CXXBRIDGE1_RUST_STRING
37 class String final {
38 public:
39   String() noexcept;
40   String(const String &) noexcept;
41   String(String &&) noexcept;
42   ~String() noexcept;
43 
44   String(const std::string &);
45   String(const char *);
46   String(const char *, std::size_t);
47   String(const char16_t *);
48   String(const char16_t *, std::size_t);
49 
50   static String lossy(const std::string &) noexcept;
51   static String lossy(const char *) noexcept;
52   static String lossy(const char *, std::size_t) noexcept;
53   static String lossy(const char16_t *) noexcept;
54   static String lossy(const char16_t *, std::size_t) noexcept;
55 
56   String &operator=(const String &) &noexcept;
57   String &operator=(String &&) &noexcept;
58 
59   explicit operator std::string() const;
60 
61   const char *data() const noexcept;
62   std::size_t size() const noexcept;
63   std::size_t length() const noexcept;
64   bool empty() const noexcept;
65 
66   const char *c_str() noexcept;
67 
68   std::size_t capacity() const noexcept;
69   void reserve(size_t new_cap) noexcept;
70 
71   using iterator = char *;
72   iterator begin() noexcept;
73   iterator end() noexcept;
74 
75   using const_iterator = const char *;
76   const_iterator begin() const noexcept;
77   const_iterator end() const noexcept;
78   const_iterator cbegin() const noexcept;
79   const_iterator cend() const noexcept;
80 
81   bool operator==(const String &) const noexcept;
82   bool operator!=(const String &) const noexcept;
83   bool operator<(const String &) const noexcept;
84   bool operator<=(const String &) const noexcept;
85   bool operator>(const String &) const noexcept;
86   bool operator>=(const String &) const noexcept;
87 
88   void swap(String &) noexcept;
89 
90   String(unsafe_bitcopy_t, const String &) noexcept;
91 
92 private:
93   struct lossy_t;
94   String(lossy_t, const char *, std::size_t) noexcept;
95   String(lossy_t, const char16_t *, std::size_t) noexcept;
swap(String & lhs,String & rhs)96   friend void swap(String &lhs, String &rhs) noexcept { lhs.swap(rhs); }
97 
98   std::array<std::uintptr_t, 3> repr;
99 };
100 #endif // CXXBRIDGE1_RUST_STRING
101 
102 #ifndef CXXBRIDGE1_RUST_SLICE
103 #define CXXBRIDGE1_RUST_SLICE
104 namespace detail {
105 template <bool>
106 struct copy_assignable_if {};
107 
108 template <>
109 struct copy_assignable_if<false> {
110   copy_assignable_if() noexcept = default;
111   copy_assignable_if(const copy_assignable_if &) noexcept = default;
112   copy_assignable_if &operator=(const copy_assignable_if &) &noexcept = delete;
113   copy_assignable_if &operator=(copy_assignable_if &&) &noexcept = default;
114 };
115 } // namespace detail
116 
117 template <typename T>
118 class Slice final
119     : private detail::copy_assignable_if<std::is_const<T>::value> {
120 public:
121   using value_type = T;
122 
123   Slice() noexcept;
124   Slice(T *, std::size_t count) noexcept;
125 
126   Slice &operator=(const Slice<T> &) &noexcept = default;
127   Slice &operator=(Slice<T> &&) &noexcept = default;
128 
129   T *data() const noexcept;
130   std::size_t size() const noexcept;
131   std::size_t length() const noexcept;
132   bool empty() const noexcept;
133 
134   T &operator[](std::size_t n) const noexcept;
135   T &at(std::size_t n) const;
136   T &front() const noexcept;
137   T &back() const noexcept;
138 
139   Slice(const Slice<T> &) noexcept = default;
140   ~Slice() noexcept = default;
141 
142   class iterator;
143   iterator begin() const noexcept;
144   iterator end() const noexcept;
145 
146   void swap(Slice &) noexcept;
147 
148 private:
149   class uninit;
150   Slice(uninit) noexcept;
151   friend impl<Slice>;
152   friend void sliceInit(void *, const void *, std::size_t) noexcept;
153   friend void *slicePtr(const void *) noexcept;
154   friend std::size_t sliceLen(const void *) noexcept;
155 
156   std::array<std::uintptr_t, 2> repr;
157 };
158 
159 template <typename T>
160 class Slice<T>::iterator final {
161 public:
162   using iterator_category = std::random_access_iterator_tag;
163   using value_type = T;
164   using difference_type = std::ptrdiff_t;
165   using pointer = typename std::add_pointer<T>::type;
166   using reference = typename std::add_lvalue_reference<T>::type;
167 
168   reference operator*() const noexcept;
169   pointer operator->() const noexcept;
170   reference operator[](difference_type) const noexcept;
171 
172   iterator &operator++() noexcept;
173   iterator operator++(int) noexcept;
174   iterator &operator--() noexcept;
175   iterator operator--(int) noexcept;
176 
177   iterator &operator+=(difference_type) noexcept;
178   iterator &operator-=(difference_type) noexcept;
179   iterator operator+(difference_type) const noexcept;
180   iterator operator-(difference_type) const noexcept;
181   difference_type operator-(const iterator &) const noexcept;
182 
183   bool operator==(const iterator &) const noexcept;
184   bool operator!=(const iterator &) const noexcept;
185   bool operator<(const iterator &) const noexcept;
186   bool operator<=(const iterator &) const noexcept;
187   bool operator>(const iterator &) const noexcept;
188   bool operator>=(const iterator &) const noexcept;
189 
190 private:
191   friend class Slice;
192   void *pos;
193   std::size_t stride;
194 };
195 
196 template <typename T>
Slice()197 Slice<T>::Slice() noexcept {
198   sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0);
199 }
200 
201 template <typename T>
Slice(T * s,std::size_t count)202 Slice<T>::Slice(T *s, std::size_t count) noexcept {
203   assert(s != nullptr || count == 0);
204   sliceInit(this,
205             s == nullptr && count == 0
206                 ? reinterpret_cast<void *>(align_of<T>())
207                 : const_cast<typename std::remove_const<T>::type *>(s),
208             count);
209 }
210 
211 template <typename T>
data() const212 T *Slice<T>::data() const noexcept {
213   return reinterpret_cast<T *>(slicePtr(this));
214 }
215 
216 template <typename T>
size() const217 std::size_t Slice<T>::size() const noexcept {
218   return sliceLen(this);
219 }
220 
221 template <typename T>
length() const222 std::size_t Slice<T>::length() const noexcept {
223   return this->size();
224 }
225 
226 template <typename T>
empty() const227 bool Slice<T>::empty() const noexcept {
228   return this->size() == 0;
229 }
230 
231 template <typename T>
operator [](std::size_t n) const232 T &Slice<T>::operator[](std::size_t n) const noexcept {
233   assert(n < this->size());
234   auto ptr = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
235   return *reinterpret_cast<T *>(ptr);
236 }
237 
238 template <typename T>
at(std::size_t n) const239 T &Slice<T>::at(std::size_t n) const {
240   if (n >= this->size()) {
241     panic<std::out_of_range>("rust::Slice index out of range");
242   }
243   return (*this)[n];
244 }
245 
246 template <typename T>
front() const247 T &Slice<T>::front() const noexcept {
248   assert(!this->empty());
249   return (*this)[0];
250 }
251 
252 template <typename T>
back() const253 T &Slice<T>::back() const noexcept {
254   assert(!this->empty());
255   return (*this)[this->size() - 1];
256 }
257 
258 template <typename T>
259 typename Slice<T>::iterator::reference
operator *() const260 Slice<T>::iterator::operator*() const noexcept {
261   return *static_cast<T *>(this->pos);
262 }
263 
264 template <typename T>
265 typename Slice<T>::iterator::pointer
operator ->() const266 Slice<T>::iterator::operator->() const noexcept {
267   return static_cast<T *>(this->pos);
268 }
269 
270 template <typename T>
operator [](typename Slice<T>::iterator::difference_type n) const271 typename Slice<T>::iterator::reference Slice<T>::iterator::operator[](
272     typename Slice<T>::iterator::difference_type n) const noexcept {
273   auto ptr = static_cast<char *>(this->pos) + this->stride * n;
274   return *reinterpret_cast<T *>(ptr);
275 }
276 
277 template <typename T>
operator ++()278 typename Slice<T>::iterator &Slice<T>::iterator::operator++() noexcept {
279   this->pos = static_cast<char *>(this->pos) + this->stride;
280   return *this;
281 }
282 
283 template <typename T>
operator ++(int)284 typename Slice<T>::iterator Slice<T>::iterator::operator++(int) noexcept {
285   auto ret = iterator(*this);
286   this->pos = static_cast<char *>(this->pos) + this->stride;
287   return ret;
288 }
289 
290 template <typename T>
operator --()291 typename Slice<T>::iterator &Slice<T>::iterator::operator--() noexcept {
292   this->pos = static_cast<char *>(this->pos) - this->stride;
293   return *this;
294 }
295 
296 template <typename T>
operator --(int)297 typename Slice<T>::iterator Slice<T>::iterator::operator--(int) noexcept {
298   auto ret = iterator(*this);
299   this->pos = static_cast<char *>(this->pos) - this->stride;
300   return ret;
301 }
302 
303 template <typename T>
operator +=(typename Slice<T>::iterator::difference_type n)304 typename Slice<T>::iterator &Slice<T>::iterator::operator+=(
305     typename Slice<T>::iterator::difference_type n) noexcept {
306   this->pos = static_cast<char *>(this->pos) + this->stride * n;
307   return *this;
308 }
309 
310 template <typename T>
operator -=(typename Slice<T>::iterator::difference_type n)311 typename Slice<T>::iterator &Slice<T>::iterator::operator-=(
312     typename Slice<T>::iterator::difference_type n) noexcept {
313   this->pos = static_cast<char *>(this->pos) - this->stride * n;
314   return *this;
315 }
316 
317 template <typename T>
operator +(typename Slice<T>::iterator::difference_type n) const318 typename Slice<T>::iterator Slice<T>::iterator::operator+(
319     typename Slice<T>::iterator::difference_type n) const noexcept {
320   auto ret = iterator(*this);
321   ret.pos = static_cast<char *>(this->pos) + this->stride * n;
322   return ret;
323 }
324 
325 template <typename T>
operator -(typename Slice<T>::iterator::difference_type n) const326 typename Slice<T>::iterator Slice<T>::iterator::operator-(
327     typename Slice<T>::iterator::difference_type n) const noexcept {
328   auto ret = iterator(*this);
329   ret.pos = static_cast<char *>(this->pos) - this->stride * n;
330   return ret;
331 }
332 
333 template <typename T>
334 typename Slice<T>::iterator::difference_type
operator -(const iterator & other) const335 Slice<T>::iterator::operator-(const iterator &other) const noexcept {
336   auto diff = std::distance(static_cast<char *>(other.pos),
337                             static_cast<char *>(this->pos));
338   return diff / static_cast<typename Slice<T>::iterator::difference_type>(
339                     this->stride);
340 }
341 
342 template <typename T>
operator ==(const iterator & other) const343 bool Slice<T>::iterator::operator==(const iterator &other) const noexcept {
344   return this->pos == other.pos;
345 }
346 
347 template <typename T>
operator !=(const iterator & other) const348 bool Slice<T>::iterator::operator!=(const iterator &other) const noexcept {
349   return this->pos != other.pos;
350 }
351 
352 template <typename T>
operator <(const iterator & other) const353 bool Slice<T>::iterator::operator<(const iterator &other) const noexcept {
354   return this->pos < other.pos;
355 }
356 
357 template <typename T>
operator <=(const iterator & other) const358 bool Slice<T>::iterator::operator<=(const iterator &other) const noexcept {
359   return this->pos <= other.pos;
360 }
361 
362 template <typename T>
operator >(const iterator & other) const363 bool Slice<T>::iterator::operator>(const iterator &other) const noexcept {
364   return this->pos > other.pos;
365 }
366 
367 template <typename T>
operator >=(const iterator & other) const368 bool Slice<T>::iterator::operator>=(const iterator &other) const noexcept {
369   return this->pos >= other.pos;
370 }
371 
372 template <typename T>
begin() const373 typename Slice<T>::iterator Slice<T>::begin() const noexcept {
374   iterator it;
375   it.pos = slicePtr(this);
376   it.stride = size_of<T>();
377   return it;
378 }
379 
380 template <typename T>
end() const381 typename Slice<T>::iterator Slice<T>::end() const noexcept {
382   iterator it = this->begin();
383   it.pos = static_cast<char *>(it.pos) + it.stride * this->size();
384   return it;
385 }
386 
387 template <typename T>
swap(Slice & rhs)388 void Slice<T>::swap(Slice &rhs) noexcept {
389   std::swap(*this, rhs);
390 }
391 #endif // CXXBRIDGE1_RUST_SLICE
392 
393 #ifndef CXXBRIDGE1_RUST_BOX
394 #define CXXBRIDGE1_RUST_BOX
395 template <typename T>
396 class Box final {
397 public:
398   using element_type = T;
399   using const_pointer =
400       typename std::add_pointer<typename std::add_const<T>::type>::type;
401   using pointer = typename std::add_pointer<T>::type;
402 
403   Box() = delete;
404   Box(Box &&) noexcept;
405   ~Box() noexcept;
406 
407   explicit Box(const T &);
408   explicit Box(T &&);
409 
410   Box &operator=(Box &&) &noexcept;
411 
412   const T *operator->() const noexcept;
413   const T &operator*() const noexcept;
414   T *operator->() noexcept;
415   T &operator*() noexcept;
416 
417   template <typename... Fields>
418   static Box in_place(Fields &&...);
419 
420   void swap(Box &) noexcept;
421 
422   static Box from_raw(T *) noexcept;
423 
424   T *into_raw() noexcept;
425 
426   /* Deprecated */ using value_type = element_type;
427 
428 private:
429   class uninit;
430   class allocation;
431   Box(uninit) noexcept;
432   void drop() noexcept;
433 
swap(Box & lhs,Box & rhs)434   friend void swap(Box &lhs, Box &rhs) noexcept { lhs.swap(rhs); }
435 
436   T *ptr;
437 };
438 
439 template <typename T>
440 class Box<T>::uninit {};
441 
442 template <typename T>
443 class Box<T>::allocation {
444   static T *alloc() noexcept;
445   static void dealloc(T *) noexcept;
446 
447 public:
allocation()448   allocation() noexcept : ptr(alloc()) {}
~allocation()449   ~allocation() noexcept {
450     if (this->ptr) {
451       dealloc(this->ptr);
452     }
453   }
454   T *ptr;
455 };
456 
457 template <typename T>
Box(Box && other)458 Box<T>::Box(Box &&other) noexcept : ptr(other.ptr) {
459   other.ptr = nullptr;
460 }
461 
462 template <typename T>
Box(const T & val)463 Box<T>::Box(const T &val) {
464   allocation alloc;
465   ::new (alloc.ptr) T(val);
466   this->ptr = alloc.ptr;
467   alloc.ptr = nullptr;
468 }
469 
470 template <typename T>
Box(T && val)471 Box<T>::Box(T &&val) {
472   allocation alloc;
473   ::new (alloc.ptr) T(std::move(val));
474   this->ptr = alloc.ptr;
475   alloc.ptr = nullptr;
476 }
477 
478 template <typename T>
~Box()479 Box<T>::~Box() noexcept {
480   if (this->ptr) {
481     this->drop();
482   }
483 }
484 
485 template <typename T>
operator =(Box && other)486 Box<T> &Box<T>::operator=(Box &&other) &noexcept {
487   if (this->ptr) {
488     this->drop();
489   }
490   this->ptr = other.ptr;
491   other.ptr = nullptr;
492   return *this;
493 }
494 
495 template <typename T>
operator ->() const496 const T *Box<T>::operator->() const noexcept {
497   return this->ptr;
498 }
499 
500 template <typename T>
operator *() const501 const T &Box<T>::operator*() const noexcept {
502   return *this->ptr;
503 }
504 
505 template <typename T>
operator ->()506 T *Box<T>::operator->() noexcept {
507   return this->ptr;
508 }
509 
510 template <typename T>
operator *()511 T &Box<T>::operator*() noexcept {
512   return *this->ptr;
513 }
514 
515 template <typename T>
516 template <typename... Fields>
in_place(Fields &&...fields)517 Box<T> Box<T>::in_place(Fields &&...fields) {
518   allocation alloc;
519   auto ptr = alloc.ptr;
520   ::new (ptr) T{std::forward<Fields>(fields)...};
521   alloc.ptr = nullptr;
522   return from_raw(ptr);
523 }
524 
525 template <typename T>
swap(Box & rhs)526 void Box<T>::swap(Box &rhs) noexcept {
527   using std::swap;
528   swap(this->ptr, rhs.ptr);
529 }
530 
531 template <typename T>
from_raw(T * raw)532 Box<T> Box<T>::from_raw(T *raw) noexcept {
533   Box box = uninit{};
534   box.ptr = raw;
535   return box;
536 }
537 
538 template <typename T>
into_raw()539 T *Box<T>::into_raw() noexcept {
540   T *raw = this->ptr;
541   this->ptr = nullptr;
542   return raw;
543 }
544 
545 template <typename T>
Box(uninit)546 Box<T>::Box(uninit) noexcept {}
547 #endif // CXXBRIDGE1_RUST_BOX
548 
549 #ifndef CXXBRIDGE1_RUST_OPAQUE
550 #define CXXBRIDGE1_RUST_OPAQUE
551 class Opaque {
552 public:
553   Opaque() = delete;
554   Opaque(const Opaque &) = delete;
555   ~Opaque() = delete;
556 };
557 #endif // CXXBRIDGE1_RUST_OPAQUE
558 
559 #ifndef CXXBRIDGE1_IS_COMPLETE
560 #define CXXBRIDGE1_IS_COMPLETE
561 namespace detail {
562 namespace {
563 template <typename T, typename = std::size_t>
564 struct is_complete : std::false_type {};
565 template <typename T>
566 struct is_complete<T, decltype(sizeof(T))> : std::true_type {};
567 } // namespace
568 } // namespace detail
569 #endif // CXXBRIDGE1_IS_COMPLETE
570 
571 #ifndef CXXBRIDGE1_LAYOUT
572 #define CXXBRIDGE1_LAYOUT
573 class layout {
574   template <typename T>
575   friend std::size_t size_of();
576   template <typename T>
577   friend std::size_t align_of();
578   template <typename T>
579   static typename std::enable_if<std::is_base_of<Opaque, T>::value,
580                                  std::size_t>::type
do_size_of()581   do_size_of() {
582     return T::layout::size();
583   }
584   template <typename T>
585   static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
586                                  std::size_t>::type
do_size_of()587   do_size_of() {
588     return sizeof(T);
589   }
590   template <typename T>
591   static
592       typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
size_of()593       size_of() {
594     return do_size_of<T>();
595   }
596   template <typename T>
597   static typename std::enable_if<std::is_base_of<Opaque, T>::value,
598                                  std::size_t>::type
do_align_of()599   do_align_of() {
600     return T::layout::align();
601   }
602   template <typename T>
603   static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
604                                  std::size_t>::type
do_align_of()605   do_align_of() {
606     return alignof(T);
607   }
608   template <typename T>
609   static
610       typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
align_of()611       align_of() {
612     return do_align_of<T>();
613   }
614 };
615 
616 template <typename T>
size_of()617 std::size_t size_of() {
618   return layout::size_of<T>();
619 }
620 
621 template <typename T>
align_of()622 std::size_t align_of() {
623   return layout::align_of<T>();
624 }
625 #endif // CXXBRIDGE1_LAYOUT
626 } // namespace cxxbridge1
627 } // namespace rust
628 
629 namespace minikin {
630   namespace rust {
631     struct Hyphenator;
632   }
633 }
634 
635 namespace minikin {
636 namespace rust {
637 #ifndef CXXBRIDGE1_STRUCT_minikin$rust$Hyphenator
638 #define CXXBRIDGE1_STRUCT_minikin$rust$Hyphenator
639 struct Hyphenator final : public ::rust::Opaque {
640   ~Hyphenator() = delete;
641 
642 private:
643   friend ::rust::layout;
644   struct layout {
645     static ::std::size_t size() noexcept;
646     static ::std::size_t align() noexcept;
647   };
648 };
649 #endif // CXXBRIDGE1_STRUCT_minikin$rust$Hyphenator
650 
651 extern "C" {
minikin$rust$cxxbridge1$getScript(::std::uint32_t cp)652 ::std::uint8_t minikin$rust$cxxbridge1$getScript(::std::uint32_t cp) noexcept {
653   ::std::uint8_t (*getScript$)(::std::uint32_t) = ::minikin::rust::getScript;
654   return getScript$(cp);
655 }
656 
minikin$rust$cxxbridge1$getJoiningType(::std::uint32_t cp)657 ::std::uint8_t minikin$rust$cxxbridge1$getJoiningType(::std::uint32_t cp) noexcept {
658   ::std::uint8_t (*getJoiningType$)(::std::uint32_t) = ::minikin::rust::getJoiningType;
659   return getJoiningType$(cp);
660 }
661 ::std::size_t minikin$rust$cxxbridge1$Hyphenator$operator$sizeof() noexcept;
662 ::std::size_t minikin$rust$cxxbridge1$Hyphenator$operator$alignof() noexcept;
663 
664 ::minikin::rust::Hyphenator *minikin$rust$cxxbridge1$load_hyphenator(::rust::Slice<::std::uint8_t const> data, ::std::uint32_t min_prefix, ::std::uint32_t min_suffix, ::rust::String *locale) noexcept;
665 
666 void minikin$rust$cxxbridge1$hyphenate(::minikin::rust::Hyphenator const &hyphenator, ::rust::Slice<::std::uint16_t const> word, ::rust::Slice<::std::uint8_t > out) noexcept;
667 } // extern "C"
668 
size()669 ::std::size_t Hyphenator::layout::size() noexcept {
670   return minikin$rust$cxxbridge1$Hyphenator$operator$sizeof();
671 }
672 
align()673 ::std::size_t Hyphenator::layout::align() noexcept {
674   return minikin$rust$cxxbridge1$Hyphenator$operator$alignof();
675 }
676 
load_hyphenator(::rust::Slice<::std::uint8_t const> data,::std::uint32_t min_prefix,::std::uint32_t min_suffix,::rust::String locale)677 ::rust::Box<::minikin::rust::Hyphenator> load_hyphenator(::rust::Slice<::std::uint8_t const> data, ::std::uint32_t min_prefix, ::std::uint32_t min_suffix, ::rust::String locale) noexcept {
678   return ::rust::Box<::minikin::rust::Hyphenator>::from_raw(minikin$rust$cxxbridge1$load_hyphenator(data, min_prefix, min_suffix, &locale));
679 }
680 
hyphenate(::minikin::rust::Hyphenator const & hyphenator,::rust::Slice<::std::uint16_t const> word,::rust::Slice<::std::uint8_t> out)681 void hyphenate(::minikin::rust::Hyphenator const &hyphenator, ::rust::Slice<::std::uint16_t const> word, ::rust::Slice<::std::uint8_t > out) noexcept {
682   minikin$rust$cxxbridge1$hyphenate(hyphenator, word, out);
683 }
684 } // namespace rust
685 } // namespace minikin
686 
687 extern "C" {
688 ::minikin::rust::Hyphenator *cxxbridge1$box$minikin$rust$Hyphenator$alloc() noexcept;
689 void cxxbridge1$box$minikin$rust$Hyphenator$dealloc(::minikin::rust::Hyphenator *) noexcept;
690 void cxxbridge1$box$minikin$rust$Hyphenator$drop(::rust::Box<::minikin::rust::Hyphenator> *ptr) noexcept;
691 } // extern "C"
692 
693 namespace rust {
694 inline namespace cxxbridge1 {
695 template <>
alloc()696 ::minikin::rust::Hyphenator *Box<::minikin::rust::Hyphenator>::allocation::alloc() noexcept {
697   return cxxbridge1$box$minikin$rust$Hyphenator$alloc();
698 }
699 template <>
dealloc(::minikin::rust::Hyphenator * ptr)700 void Box<::minikin::rust::Hyphenator>::allocation::dealloc(::minikin::rust::Hyphenator *ptr) noexcept {
701   cxxbridge1$box$minikin$rust$Hyphenator$dealloc(ptr);
702 }
703 template <>
drop()704 void Box<::minikin::rust::Hyphenator>::drop() noexcept {
705   cxxbridge1$box$minikin$rust$Hyphenator$drop(this);
706 }
707 } // namespace cxxbridge1
708 } // namespace rust
709