rust/src/librustc/metadata
Huon Wilson 84b060ce29 Add #[allow_internal_unstable] to track stability for macros better.
Unstable items used in a macro expansion will now always trigger
stability warnings, *unless* the unstable items are directly inside a
macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns
unless the span of the unstable item is a subspan of the definition of a
macro marked with that attribute.

E.g.

    #[allow_internal_unstable]
    macro_rules! foo {
        ($e: expr) => {{
            $e;
            unstable(); // no warning
            only_called_by_foo!();
        }}
    }

    macro_rules! only_called_by_foo {
        () => { unstable() } // warning
    }

    foo!(unstable()) // warning

The unstable inside `foo` is fine, due to the attribute. But the
`unstable` inside `only_called_by_foo` is not, since that macro doesn't
have the attribute, and the `unstable` passed into `foo` is also not
fine since it isn't contained in the macro itself (that is, even though
it is only used directly in the macro).

In the process this makes the stability tracking much more precise,
e.g. previously `println!("{}", unstable())` got no warning, but now it
does. As such, this is a bug fix that may cause [breaking-change]s.

The attribute is definitely feature gated, since it explicitly allows
side-stepping the feature gating system.
2015-03-06 00:18:28 +11:00
..
common.rs Encode codemap and span information in crate metadata. 2015-03-04 09:50:09 +01:00
creader.rs Add #[allow_internal_unstable] to track stability for macros better. 2015-03-06 00:18:28 +11:00
csearch.rs rustc_resolve: remove the distinction between DefStaticMethod and DefMethod. 2015-02-24 14:14:17 +02:00
cstore.rs std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
decoder.rs std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
encoder.rs Encode codemap and span information in crate metadata. 2015-03-04 09:50:09 +01:00
filesearch.rs std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
loader.rs std: Deprecate std::old_io::fs 2015-03-04 15:59:30 -08:00
macro_import.rs Add #[allow_internal_unstable] to track stability for macros better. 2015-03-06 00:18:28 +11:00
mod.rs
tydecode.rs Remove the synthetic "region bound" from closures and instead update how 2015-03-02 05:45:41 -05:00
tyencode.rs metadata: Implement relaxation of short RBML lengths. 2015-03-03 11:55:37 +09:00