rust/src/libsyntax/ext
Alex Crichton a9c1152c4b std: Add a new top-level thread_local module
This commit removes the `std::local_data` module in favor of a new
`std::thread_local` module providing thread local storage. The module provides
two variants of TLS: one which owns its contents and one which is based on
scoped references. Each implementation has pros and cons listed in the
documentation.

Both flavors have accessors through a function called `with` which yield a
reference to a closure provided. Both flavors also panic if a reference cannot
be yielded and provide a function to test whether an access would panic or not.
This is an implementation of [RFC 461][rfc] and full details can be found in
that RFC.

This is a breaking change due to the removal of the `std::local_data` module.
All users can migrate to the new thread local system like so:

    thread_local!(static FOO: Rc<RefCell<Option<T>>> = Rc::new(RefCell::new(None)))

The old `local_data` module inherently contained the `Rc<RefCell<Option<T>>>` as
an implementation detail which must now be explicitly stated by users.

[rfc]: https://github.com/rust-lang/rfcs/pull/461
[breaking-change]
2014-11-23 23:37:16 -08:00
..
deriving rollup merge of #19090: kmcallister/deriving-non-type 2014-11-19 22:39:49 +01:00
tt Switch to purely namespaced enums 2014-11-17 07:35:51 -08:00
asm.rs rollup merge of #18911: canndrew/slice_shift_char 2014-11-18 00:23:55 +01:00
base.rs auto merge of #19071 : huonw/rust/col2column, r=nikomatsakis 2014-11-20 16:02:03 +00:00
build.rs Remove type parameters from ExprField and ExprTupField 2014-11-23 12:17:43 +01:00
bytes.rs Convert some notes to help messages 2014-11-02 16:12:23 +13:00
cfg.rs Use PascalCase for token variants 2014-10-28 15:55:37 +11:00
cfg_attr.rs Convert cfg syntax to new system 2014-09-27 22:59:26 -07:00
concat.rs Complete the removal of ty_nil, ast::LitNil, ast::TyBot and ast::TyUniq 2014-11-16 14:23:15 +01:00
concat_idents.rs Support parenthesized paths Foo(A,B) -> C that expand to Foo<(A,B),C>. These paths also bind anonymous regions (or will, once HRTB is fully working). 2014-11-06 06:48:23 -05:00
env.rs Fallout from renaming 2014-09-16 14:37:48 -07:00
expand.rs Merge the ExprFnBlock and ExprUnboxedClosure into one ExprClosure with an optional unboxed closure kind. 2014-11-19 13:35:20 -05:00
fmt.rs Implement generalized object and type parameter bounds (Fixes #16462) 2014-08-27 21:46:52 -04:00
format.rs std: Stabilize std::fmt 2014-11-18 21:16:22 -08:00
log_syntax.rs Add Span and separate open/close delims to TTDelim 2014-10-26 09:53:29 +11:00
mtwt.rs std: Add a new top-level thread_local module 2014-11-23 23:37:16 -08:00
quote.rs Parse and store suffixes on literals. 2014-11-20 00:02:42 +11:00
source_util.rs Rename col! to column!. 2014-11-20 20:18:21 +11:00
trace_macros.rs Convert some token functions into methods 2014-10-28 15:55:37 +11:00