-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add #[warn_unused_result] attribute for functions #2965
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
Comments
@pcwalton wants (and I tend to agree) to make all expressions warn if they have an unused result, rather like O'Caml. |
Changing to RFC so we can discuss "make all expressions warn if they have an unused result." I support that as well. |
Created a separate issue (#2974) for a more general version of this. Closing for now in favorite of that issue. |
celinval
pushed a commit
to celinval/rust-dev
that referenced
this issue
Jun 4, 2024
The "CBMC latest" workflow is composed of two jobs (`regression` and `perf`) which perform testing with the most recent development version of CBMC. At present, the `regression` jobs are not actually testing with the CBMC that we build from source, but the CBMC installed through the setup scripts, as revealed in rust-lang#2954. This PR changes the `regression` jobs so that they use `cmake` to build. This allows the runner to pick up the recently-built CBMC development version instead of the one installed through setup scripts, as it's done in the `perf` jobs. Unfortunately, [this CI run](https://github.com/adpaco-aws/rmc/actions/runs/7390380572) doesn't demonstrate the fix as it should due to an unrelated breaking change in the latest CBMC version. However, rust-lang#2952 provides more context in case you need it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just like
__attribute__((warn_unused_result))
in C.One thing this would be really useful for is to help people distinguish functional-style vs in-place-style data structure update functions. I could have saved some time during ICFP (#2928) 'cause I was using vec::append as though it were vec::push_all.
Marking this I-completion because I care a lot about it. Feel free to debate its importance.
The text was updated successfully, but these errors were encountered: