Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop "readonly" LLVM attribute from references to opaque C++ types #1370

Merged
merged 3 commits into from
Aug 30, 2024

Commits on Aug 30, 2024

  1. Configuration menu
    Copy the full SHA
    3ea960d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e19c267 View commit details
    Browse the repository at this point in the history
  3. Fix compatibility with compilers older than 1.72

    Old compilers didn't used to consider `()` acceptable for FFI.
    
        error: `extern` block uses type `()`, which is not FFI-safe
          --> demo/src/main.rs:20:14
           |
        20 |           type BlobstoreClient;
           |  ______________^
        21 | |
        22 | |         fn new_blobstore_client() -> UniquePtr<BlobstoreClient>;
        23 | |         fn put(&self, parts: &mut MultiBuf) -> u64;
           | |________________^ not FFI-safe
           |
           = help: consider using a struct instead
           = note: tuples have unspecified layout
        note: the lint level is defined here
          --> demo/src/main.rs:1:1
           |
        1  | #[cxx::bridge(namespace = "org::blobstore")]
           | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           = note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info)
    dtolnay committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    642278c View commit details
    Browse the repository at this point in the history