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

fix compile error with Rust 1.64 #5273

Merged
merged 1 commit into from
Oct 12, 2022
Merged

Conversation

yu-re-ka
Copy link
Contributor

As of rustc 1.64, Box::from_raw is #[must_use].

error: unused return value of `Box::<T>::from_raw` that must be used
   --> flux/src/cffi.rs:100:5
    |
100 |     Box::from_raw(cstr);
    |     ^^^^^^^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> flux/src/lib.rs:1:38
    |
1   | #![cfg_attr(feature = "strict", deny(warnings, missing_docs))]
    |                                      ^^^^^^^^
    = note: `#[deny(unused_must_use)]` implied by `#[deny(warnings)]`
    = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`

error: could not compile `flux` due to previous error

Checklist

Dear Author 👋, the following checks should be completed (or explicitly dismissed) before merging.

  • ✏️ Write a PR description, regardless of triviality, to include the value of this PR
  • 🔗 Reference related issues
  • 🏃 Test cases are included to exercise the new code
  • 🧪 If new packages are being introduced to stdlib, link to Working Group discussion notes and ensure it lands under experimental/
  • 📖 If language features are changing, ensure docs/Spec.md has been updated

Dear Reviewer(s) 👋, you are responsible (among others) for ensuring the completeness and quality of the above before approval.

@yu-re-ka yu-re-ka requested a review from a team as a code owner October 11, 2022 14:43
@yu-re-ka yu-re-ka requested review from Marwes and removed request for a team October 11, 2022 14:43
@Marwes
Copy link
Contributor

Marwes commented Oct 11, 2022

You need to run make generate and commit the changes, otherwise 👍

@nathanielc
Copy link
Contributor

@yu-re-ka Thanks for the PR have you signed the CLA https://www.influxdata.com/legal/cla/ ?

@yu-re-ka
Copy link
Contributor Author

Both done

As of rustc 1.64, Box::from_raw is #[must_use].
@nathanielc
Copy link
Contributor

@yu-re-ka Thanks again for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants