Remove `use memoffset_unstable_const::offset_of` from generated code.

Before this CL, Rust might warn about an unused import in the generated
`..._rs_api.rs` files.  For example:

```stderr
warning: unused import: `memoffset_unstable_const::offset_of`
  --> crubit/rs_bindings_from_cc/test/golden/no_elided_lifetimes_cc_rust_api.rs:10:5
   |
10 | use memoffset_unstable_const::offset_of;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default
```

After this CL, the generated code doesn't include the problematic import
anymore.  Instead, a fully-qualified name of `offset_of` is used as
needed.  This CL is similar to the earlier https://github.com/google/crubit/commit/768bba3e5255a825d7ea27d38261bb0c495e429e (which stopped
importing items from the `static_assertions` crate).

FWIW this CL seems compatible with the ideas shared on b/230665484 where
we've discussed various strategies to 1) avoid naming conflicts between
end-user code and Crubit internal code and 2) keep the generated code
human-readable.

PiperOrigin-RevId: 448348361
19 files changed
tree: 31ad4c15c8d4d95c1945ffb1979be85265e69eea
  1. cc_template/
  2. common/
  3. docs/
  4. lifetime_annotations/
  5. migrator/
  6. rs_bindings_from_cc/
  7. BUILD
  8. CODE_OF_CONDUCT
  9. CONTRIBUTING
  10. LICENSE
  11. README.md
README.md

Crubit: C++/Rust Bidirectional Interop Tool

Extremely experimental interop tooling for C++ and Rust.

Please don‘t use, this is an experiment and we don’t yet know where will it take us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.