-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Changing error message from contains interior mutability
to may contain interior mutability
#42490
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
Conversation
@gaurikholkar If you reword your PR description slightly so it contains "fixes #40313" then when this PR is merged, GitHub will close the issue automatically. |
contains interior mutability
to may contain interior mutability
#40313contains interior mutability
to may contain interior mutability
fixes #40313
use std::panic::catch_unwind; | ||
fn main() { | ||
let mut x = Cell::new(22); | ||
catch_unwind(|| { x.set(23); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @alexcrichton I think this test is fine, but the name should probably containref-unwind-safe
.
@gaurikholkar I meant the description which currently contains "This is a fix to #40313 .", not the title, sorry. |
contains interior mutability
to may contain interior mutability
fixes #40313contains interior mutability
to may contain interior mutability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm waiting for @alexcrichton to hear about the RefUnwindSafe
trait.
Sorry what about the |
This PR rewords the error message when that trait is not implemented and adds a test for it. Do you have any objections to that? Also, what should the test be named? |
Nah seems fine to me! I have no opinions on test naming. |
Thanks! shrug guess this will do @bors r+ |
📌 Commit 980a5b0 has been approved by |
Changing error message from `contains interior mutability` to `may contain interior mutability` Fixes rust-lang#40313 . I have changed the message from `contains interior mutability` to `may contain interior mutability` for the following example ``` use std::cell::Cell; use std::panic::catch_unwind; fn main() { let mut x = Cell::new(22); catch_unwind(|| { x.set(23); }); } ``` which has been added as a ui test. Also, the message [here](https://github.com/gaurikholkar/rust/blob/master/src/librustc_mir/transform/qualify_consts.rs#L666) and it's respective `compile-fail` test have been modified. cc @nikomatsakis @Mark-Simulacrum @eddyb
Fixes #40313 . I have changed the message from
contains interior mutability
tomay contain interior mutability
for the following examplewhich has been added as a ui test.
Also, the message here and it's respective
compile-fail
test have been modified.cc @nikomatsakis @Mark-Simulacrum @eddyb