rust/src/libcore
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
..
fmt Rollup merge of #22876 - Florob:const, r=nikomatsakis 2015-03-03 17:02:20 +05:30
hash Add core::num::wrapping and fix overflow errors. 2015-03-03 12:10:19 +01:00
num Add #[allow_internal_unstable] to track stability for macros better. 2015-03-06 00:18:28 +11:00
str Auto merge of #22532 - pnkfelix:arith-overflow, r=pnkfelix,eddyb 2015-03-03 14:18:03 +00:00
any.rs Rename Show to Debug, String to Display 2015-02-08 20:00:30 +03:00
array.rs Rollup merge of #22320 - petrochenkov:eq, r=alexcrichton 2015-02-23 11:43:59 -08:00
atomic.rs Enable recursion for visit_ty in lint visitor 2015-03-02 15:35:48 -08:00
cell.rs Add negative impls for Sync 2015-02-22 02:14:24 +01:00
char.rs Refactored code into Searcher traits with naive implementations 2015-02-20 00:57:38 +01:00
clone.rs core: Use int/isize in Clone boilerplate 2015-02-14 15:50:26 -08:00
cmp.rs Audit core::cmp for int/uint. 2015-02-18 14:39:06 +01:00
cmp_macros.rs Tweaks to equality comparisons for slices/arrays/vectors 2015-02-20 20:32:55 +03:00
default.rs Audit core::default for int/uint usage. 2015-02-18 14:41:13 +01:00
error.rs Rename std::path to std::old_path 2015-02-03 14:34:42 -08:00
finally.rs Audit integer types in finally. 2015-02-15 10:25:13 -05:00
intrinsics.rs rustc: implement arithmetic overflow checking 2015-03-03 12:09:07 +01:00
iter.rs Auto merge of #22958 - laijs:option_map_for_iter_map, r=alexcrichton 2015-03-04 09:46:29 +00:00
lib.rs Added OverflowingOps trait to core::num::wrapping. 2015-03-03 12:10:19 +01:00
macros.rs register snapshot 880fb89 2015-02-27 01:48:49 +01:00
marker.rs Change MarkerTrait to be invariant. This is a (small) loss of expressiveness, 2015-02-25 12:21:15 -05:00
mem.rs std: Stabilize some ptr functions 2015-02-24 14:22:33 -08:00
nonzero.rs Rewrite Unique<T> so that it is covariant in T, implies NonZero and ownership, 2015-02-18 10:25:12 -05:00
ops.rs Add documentation to associated types in libcore, libstd 2015-02-23 11:05:55 -08:00
option.rs Use arrays instead of vectors in tests 2015-02-24 21:15:45 +03:00
panicking.rs register snapshot 880fb89 2015-02-27 01:48:49 +01:00
prelude.rs register snapshots 2015-02-02 13:38:32 -05:00
ptr.rs std: Stabilize some ptr functions 2015-02-24 14:22:33 -08:00
raw.rs Enable recursion for visit_ty in lint visitor 2015-03-02 15:35:48 -08:00
result.rs Rollup merge of #22817 - jmesmon:result-or-type, r=huonw 2015-02-27 22:07:03 +05:30
simd.rs s/Show/Debug/g 2015-01-29 07:49:02 -05:00
slice.rs Rollup merge of #22988 - dcrewi:slice-swap-inline, r=alexcrichton 2015-03-03 17:02:24 +05:30
tuple.rs Set up docs for missing core types 2015-02-09 22:26:33 -05:00
ty.rs markers -> marker 2015-01-07 12:10:31 +13:00