Skip to content

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

Merged
merged 2 commits into from
Jun 8, 2017

Conversation

gaurikholkar-zz
Copy link

@gaurikholkar-zz gaurikholkar-zz commented Jun 6, 2017

Fixes #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 and it's respective compile-fail test have been modified.

cc @nikomatsakis @Mark-Simulacrum @eddyb

@eddyb
Copy link
Member

eddyb commented Jun 6, 2017

@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.

@gaurikholkar-zz gaurikholkar-zz changed the title Changing error message from contains interior mutability to may contain interior mutability #40313 Changing error message from contains interior mutability to may contain interior mutability fixes #40313 Jun 6, 2017
use std::panic::catch_unwind;
fn main() {
let mut x = Cell::new(22);
catch_unwind(|| { x.set(23); });
Copy link
Member

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.

@eddyb
Copy link
Member

eddyb commented Jun 6, 2017

@gaurikholkar I meant the description which currently contains "This is a fix to #40313 .", not the title, sorry.

@eddyb eddyb changed the title Changing error message from contains interior mutability to may contain interior mutability fixes #40313 Changing error message from contains interior mutability to may contain interior mutability Jun 6, 2017
Copy link
Member

@eddyb eddyb left a 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.

@alexcrichton
Copy link
Member

Sorry what about the RefUnwindSafe trait? I'm not sure what my input is requested on here...

@eddyb
Copy link
Member

eddyb commented Jun 7, 2017

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?

@alexcrichton
Copy link
Member

Nah seems fine to me! I have no opinions on test naming.

@eddyb
Copy link
Member

eddyb commented Jun 7, 2017

Thanks! shrug guess this will do

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 7, 2017

📌 Commit 980a5b0 has been approved by eddyb

@aidanhs aidanhs added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 7, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 8, 2017
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
bors added a commit that referenced this pull request Jun 8, 2017
Rollup of 5 pull requests

- Successful merges: #42470, #42490, #42497, #42510, #42512
- Failed merges:
@bors bors merged commit 980a5b0 into rust-lang:master Jun 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants