Changing error message from contains interior mutability to may contain interior mutability#42490
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.
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
eddyb
left a comment
There was a problem hiding this comment.
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 mutabilitytomay contain interior mutabilityfor the following examplewhich has been added as a ui test.
Also, the message here and it's respective
compile-failtest have been modified.cc @nikomatsakis @Mark-Simulacrum @eddyb