about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-06-07 21:58:44 -0400
committerGitHub <noreply@github.com>2017-06-07 21:58:44 -0400
commit3ce88c7c8d3a422146bdc749c4e0207517b1f92a (patch)
treeb03d95cd3a30c560d6351bcd4e87c3921928145a /src/libstd
parent0362891073f442a151b1255c57549b46beaa1fb3 (diff)
parent980a5b0529a94d68c1ab37170f810e7cf73996d8 (diff)
downloadrust-3ce88c7c8d3a422146bdc749c4e0207517b1f92a.tar.gz
rust-3ce88c7c8d3a422146bdc749c4e0207517b1f92a.zip
Rollup merge of #42490 - gaurikholkar:master, r=eddyb
Changing error message from `contains interior mutability` to `may contain interior mutability`

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](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
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/panic.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs
index f99634ecac2..58356bc43ee 100644
--- a/src/libstd/panic.rs
+++ b/src/libstd/panic.rs
@@ -112,7 +112,7 @@ pub trait UnwindSafe {}
 /// This is a "helper marker trait" used to provide impl blocks for the
 /// `UnwindSafe` trait, for more information see that documentation.
 #[stable(feature = "catch_unwind", since = "1.9.0")]
-#[rustc_on_unimplemented = "the type {Self} contains interior mutability \
+#[rustc_on_unimplemented = "the type {Self} may contain interior mutability \
                             and a reference may not be safely transferrable \
                             across a catch_unwind boundary"]
 pub trait RefUnwindSafe {}