mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Rename #[mutable] to #[no_freeze]
This commit is contained in:
parent
4af7ebcd8f
commit
22b7eb3802
@ -276,7 +276,8 @@ struct RWARCInner<T> { lock: RWlock, failed: bool, data: T }
|
|||||||
*
|
*
|
||||||
* Unlike mutex_arcs, rw_arcs are safe, because they cannot be nested.
|
* Unlike mutex_arcs, rw_arcs are safe, because they cannot be nested.
|
||||||
*/
|
*/
|
||||||
#[mutable]
|
#[mutable] // XXX remove after snap
|
||||||
|
#[no_freeze]
|
||||||
struct RWARC<T> {
|
struct RWARC<T> {
|
||||||
x: UnsafeAtomicRcBox<RWARCInner<T>>,
|
x: UnsafeAtomicRcBox<RWARCInner<T>>,
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,8 @@ struct Chunk {
|
|||||||
is_pod: bool,
|
is_pod: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[mutable]
|
#[mutable] // XXX remove after snap
|
||||||
|
#[no_freeze]
|
||||||
pub struct Arena {
|
pub struct Arena {
|
||||||
// The head is separated out from the list as a unbenchmarked
|
// The head is separated out from the list as a unbenchmarked
|
||||||
// microoptimization, to avoid needing to case on the list to
|
// microoptimization, to avoid needing to case on the list to
|
||||||
|
@ -169,7 +169,8 @@ struct RcMutBox<T> {
|
|||||||
/// Mutable reference counted pointer type
|
/// Mutable reference counted pointer type
|
||||||
#[non_owned]
|
#[non_owned]
|
||||||
#[no_send]
|
#[no_send]
|
||||||
#[mutable]
|
#[mutable] // XXX remove after snap
|
||||||
|
#[no_freeze]
|
||||||
#[unsafe_no_drop_flag]
|
#[unsafe_no_drop_flag]
|
||||||
pub struct RcMut<T> {
|
pub struct RcMut<T> {
|
||||||
priv ptr: *mut RcMutBox<T>,
|
priv ptr: *mut RcMutBox<T>,
|
||||||
|
@ -2204,7 +2204,7 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn apply_tc_attr(cx: ctxt, did: def_id, mut tc: TypeContents) -> TypeContents {
|
fn apply_tc_attr(cx: ctxt, did: def_id, mut tc: TypeContents) -> TypeContents {
|
||||||
if has_attr(cx, did, "mutable") {
|
if has_attr(cx, did, "no_freeze") {
|
||||||
tc = tc + TC_MUTABLE;
|
tc = tc + TC_MUTABLE;
|
||||||
}
|
}
|
||||||
if has_attr(cx, did, "no_send") {
|
if has_attr(cx, did, "no_send") {
|
||||||
|
@ -22,7 +22,8 @@ A dynamic, mutable location.
|
|||||||
Similar to a mutable option type, but friendlier.
|
Similar to a mutable option type, but friendlier.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#[mutable]
|
#[mutable] // XXX remove after snap
|
||||||
|
#[no_freeze]
|
||||||
#[deriving(Clone, DeepClone, Eq)]
|
#[deriving(Clone, DeepClone, Eq)]
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
pub struct Cell<T> {
|
pub struct Cell<T> {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[mutable]
|
#[no_freeze]
|
||||||
enum Foo { A }
|
enum Foo { A }
|
||||||
|
|
||||||
fn bar<T: Freeze>(_: T) {}
|
fn bar<T: Freeze>(_: T) {}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[mutable]
|
#[no_freeze]
|
||||||
struct Foo { a: int }
|
struct Foo { a: int }
|
||||||
|
|
||||||
fn bar<T: Freeze>(_: T) {}
|
fn bar<T: Freeze>(_: T) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user