]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRollup merge of #23043 - steveklabnik:doc_default_method, r=nikomatsakis
Manish Goregaokar [Sun, 8 Mar 2015 18:36:20 +0000 (00:06 +0530)]
Rollup merge of #23043 - steveklabnik:doc_default_method, r=nikomatsakis

9 years agoRollup merge of #22917 - randfur:master, r=steveklabnik
Manish Goregaokar [Sun, 8 Mar 2015 18:36:03 +0000 (00:06 +0530)]
Rollup merge of #22917 - randfur:master, r=steveklabnik

 The docs currently define `array_expr`s as:

    array_expr : '[' \"mut\" ? vec_elems? ']' ;
    array_elems : [expr [',' expr]*] | [expr ',' \"..\" expr] ;

`vec_elems` is not defined anywhere else so it is probably a typo for `array_elems`.

9 years agoRollup merge of #23153 - Manishearth:snap, r=alexcrichton
Manish Goregaokar [Sun, 8 Mar 2015 18:34:20 +0000 (00:04 +0530)]
Rollup merge of #23153 - Manishearth:snap, r=alexcrichton

 Needed so that #21824 can land

9 years agoRollup merge of #23179 - steveklabnik:mini_rollup, r=steveklabnik
Manish Goregaokar [Sun, 8 Mar 2015 18:32:37 +0000 (00:02 +0530)]
Rollup merge of #23179 - steveklabnik:mini_rollup, r=steveklabnik

 I had to fix up some PRs:

* https://github.com/rust-lang/rust/pull/22976
* https://github.com/rust-lang/rust/pull/22945
* https://github.com/rust-lang/rust/pull/22845

9 years agoRollup merge of #22984 - carols10cents:tests-for-float, r=huonw
Manish Goregaokar [Sun, 8 Mar 2015 18:32:28 +0000 (00:02 +0530)]
Rollup merge of #22984 - carols10cents:tests-for-float, r=huonw

 Building on #22076, I've added some tests for stable methods in f32 and f64 that didn't have any before.

Please let me know if there are any improvements I can make, and I am happy to make them! :mailbox_with_mail:

9 years agoAdd default methods to trait documentation
Steve Klabnik [Wed, 4 Mar 2015 22:13:49 +0000 (17:13 -0500)]
Add default methods to trait documentation

9 years agoFix array syntax in comment.
Amol Mundayoor [Mon, 23 Feb 2015 21:06:20 +0000 (13:06 -0800)]
Fix array syntax in comment.

Fixes #22721.

9 years agoAdd description of fold function arguments.
Łukasz Niemier [Mon, 2 Mar 2015 21:31:01 +0000 (22:31 +0100)]
Add description of fold function arguments.

9 years agoAdds an example for PhantomData<T>.
Pyry Kontio [Mon, 2 Mar 2015 04:14:45 +0000 (06:14 +0200)]
Adds an example for PhantomData<T>.

9 years agoAuto merge of #23167 - rprichard:fix-plugin-rustbook, r=steveklabnik
bors [Sun, 8 Mar 2015 12:10:42 +0000 (12:10 +0000)]
Auto merge of #23167 - rprichard:fix-plugin-rustbook, r=steveklabnik

 * "let mut text" was previously of &String type.  Now it is of &str type.

 * Update the slicing syntax.  Both &text[] and text.slice_from() evaluate
   to a &str.

 * We were passing a u32 to expr_usize.  Call expr_u32 instead.

r? @steveklabnik
Fixes #23166

9 years agoAuto merge of #23127 - alexcrichton:bench-wrapping, r=brson
bors [Sun, 8 Mar 2015 08:34:56 +0000 (08:34 +0000)]
Auto merge of #23127 - alexcrichton:bench-wrapping, r=brson

Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:

    #[bench]
    fn foo(b: &mut test::Bencher) {}

This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.

9 years agoFix #23166. Get the Compiler Plugins example compiling again.
Ryan Prichard [Sun, 8 Mar 2015 06:57:51 +0000 (22:57 -0800)]
Fix #23166. Get the Compiler Plugins example compiling again.

 * "let met text" was previously of &String type.  Now it is of &str type.

 * Update the slicing syntax.  Both &text[] and text.slice_from() evaluate
   to a &str.

 * We were passing a u32 to expr_usize.  Call expr_u32 instead.

9 years agoAuto merge of #23160 - rprichard:fix-numtest-assert, r=brson
bors [Sun, 8 Mar 2015 05:20:17 +0000 (05:20 +0000)]
Auto merge of #23160 - rprichard:fix-numtest-assert, r=brson

The previous code was passing "true" as the panic! error value.

9 years agoAuto merge of #23145 - semarie:openbsd-5806, r=alexcrichton
bors [Sun, 8 Mar 2015 01:43:22 +0000 (01:43 +0000)]
Auto merge of #23145 - semarie:openbsd-5806, r=alexcrichton

follow freebsd due to last deprecation of `std::old_io::fs`

9 years agoUse assert_eq! rather than assert!
Ryan Prichard [Sun, 8 Mar 2015 00:53:01 +0000 (16:53 -0800)]
Use assert_eq! rather than assert!

The previous code was passing "true" as the panic! error value.

9 years agoAuto merge of #23143 - 5paceToast:cygwin-6.3, r=alexcrichton
bors [Sat, 7 Mar 2015 21:52:20 +0000 (21:52 +0000)]
Auto merge of #23143 - 5paceToast:cygwin-6.3, r=alexcrichton

Not checking for 32/64 bit, since `uname -s` no longer contains an indicator (and `uname -m` returns correct results)

9 years agoRegister new snapshots (270a677)
Manish Goregaokar [Sat, 7 Mar 2015 18:59:15 +0000 (00:29 +0530)]
Register new snapshots (270a677)

9 years agoAuto merge of #23137 - kmcallister:derive-sugar, r=sfackler
bors [Sat, 7 Mar 2015 18:39:17 +0000 (18:39 +0000)]
Auto merge of #23137 - kmcallister:derive-sugar, r=sfackler

This is a hack, but I don't think we can do much better as long as `derive` is running at the syntax expansion phase.

If the `custom_derive` feature gate is enabled, this works with user-defined traits and syntax extensions. Without the gate, you can't use e.g. `#[derive_Clone]` directly, so this does not change the stable language.

To make this effective, we now check gated attributes both before and after macro expansion. This uncovered a number of tests that were missing feature gates.

This PR also cleans up the deriving code somewhat, and forbids some previously-meaningless attribute syntax. For this reason it's technically a

    [breaking-change]

r? @sfackler

9 years agoAuto merge of #23146 - lifthrasiir:oh-noes-i-broke-rustdoc-sidebars-what-to-do-now...
bors [Sat, 7 Mar 2015 14:08:29 +0000 (14:08 +0000)]
Auto merge of #23146 - lifthrasiir:oh-noes-i-broke-rustdoc-sidebars-what-to-do-now, r=Manishearth

We require the *deferred* loading, not just an opportunistic asynchronous loading. (Yes, that was my oversight, as I only checked it locally...) I think `<script defer>` is safe to use, according to <http://caniuse.com/#feat=script-defer>.

9 years agorustdoc: Fixed an asynchronous loading of rustdoc sidebars.
Kang Seonghoon [Sat, 7 Mar 2015 14:01:31 +0000 (23:01 +0900)]
rustdoc: Fixed an asynchronous loading of rustdoc sidebars.

We require the *deferred* loading, not just an opportunistic
asynchronous loading. I think `<script defer>` is safe to use,
according to <http://caniuse.com/#feat=script-defer>.

9 years agodisable test for issue-5806 on openbsd
Sébastien Marie [Sat, 7 Mar 2015 12:40:35 +0000 (13:40 +0100)]
disable test for issue-5806 on openbsd

follow freebsd due to last deprecation of std::old_io::fs

9 years agoAuto merge of #22549 - steveklabnik:doc_documentation, r=huonw
bors [Sat, 7 Mar 2015 10:01:13 +0000 (10:01 +0000)]
Auto merge of #22549 - steveklabnik:doc_documentation, r=huonw

This chapter covers writing documentation in depth.

Fixes #4361
Fixes #12862
Fixes #14070
Fixes #14967

9 years agoadded support for CYGWIN 6.3 into configure script
Chloe [Sat, 7 Mar 2015 08:44:02 +0000 (03:44 -0500)]
added support for CYGWIN 6.3 into configure script

Not checking for 32/64 bit, since `uname -s` no longer contains an indicator (and `uname -m` returns correct results)

9 years agoAuto merge of #23132 - alexcrichton:remove-deprecated-unicode-escapes, r=huonw
bors [Sat, 7 Mar 2015 06:48:45 +0000 (06:48 +0000)]
Auto merge of #23132 - alexcrichton:remove-deprecated-unicode-escapes, r=huonw

These have been deprecated for quite some time, so we should be good to remove
them now.

9 years agoAuto merge of #23107 - Manishearth:rollup, r=alexcrichton
bors [Sat, 7 Mar 2015 03:28:03 +0000 (03:28 +0000)]
Auto merge of #23107 - Manishearth:rollup, r=alexcrichton

9 years agoTest fixes and rebase conflicts
Alex Crichton [Fri, 6 Mar 2015 23:53:32 +0000 (15:53 -0800)]
Test fixes and rebase conflicts

9 years agoMake #[derive(Anything)] into sugar for #[derive_Anything]
Keegan McAllister [Fri, 6 Mar 2015 21:15:54 +0000 (13:15 -0800)]
Make #[derive(Anything)] into sugar for #[derive_Anything]

This is a hack, but I don't think we can do much better as long as `derive` is
running at the syntax expansion phase.

If the custom_derive feature gate is enabled, this works with user-defined
traits and syntax extensions. Without the gate, you can't use e.g. #[derive_Clone]
directly, so this does not change the stable language.

This commit also cleans up the deriving code somewhat, and forbids some
previously-meaningless attribute syntax. For this reason it's technically a

    [breaking-change]

9 years agoCheck gated attributes before and after macro expansion
Keegan McAllister [Fri, 6 Mar 2015 23:10:20 +0000 (15:10 -0800)]
Check gated attributes before and after macro expansion

This is important because attributes can affect expansion.

9 years agorollup merge of #23124: brson/oldtests
Alex Crichton [Fri, 6 Mar 2015 23:38:09 +0000 (15:38 -0800)]
rollup merge of #23124: brson/oldtests

9 years agorollup merge of #23117: japaric/default-impl
Alex Crichton [Fri, 6 Mar 2015 23:38:06 +0000 (15:38 -0800)]
rollup merge of #23117: japaric/default-impl

fixes #23080

r? @nikomatsakis
cc @FlaPer87

9 years agorollup merge of #23097: alexcrichton/issue-23076
Alex Crichton [Fri, 6 Mar 2015 23:37:56 +0000 (15:37 -0800)]
rollup merge of #23097: alexcrichton/issue-23076

The `rsplitn` call was called with 2 instead of 1 so the iterator would yield 3
items in some cases, not the 2 that it should have.

Closes #23076

9 years agorollup merge of #23091: japaric/phantom
Alex Crichton [Fri, 6 Mar 2015 23:37:51 +0000 (15:37 -0800)]
rollup merge of #23091: japaric/phantom

r? @nikomatsakis See the cfail test, it compiles without this patch
cc #13231

9 years agorollup merge of #23087: nagisa/std-undeadlock
Alex Crichton [Fri, 6 Mar 2015 23:37:47 +0000 (15:37 -0800)]
rollup merge of #23087: nagisa/std-undeadlock

Being a person who somehow has taken a liking to premature optimisation, my knee-jerk reaction to
locking in std handles was preamble resembling following snippet:

    let stdout = stdout();
    let lstdout = stdout.lock();
    let stdin = stdin();
    let lstdin = stdin.lock();

and then reading from the locked handle like this:

    let mut letter = [0; 1];
    lstdin.read(&mut letter).unwrap();

As it is now this code will deadlock because the `read` method attempts to lock stdout as well!

r? @alexcrichton

---

Either way, I find flushing stdout when stdin is used debatable. I believe people who write prompts should take care to flush stdout when necessary themselves.

Another idea: Would be cool if locks on std handles would be taken for a thread, rather than a handle, so given preamble (first code snippet)

    stdin.lock()

or more generally

    stdin.read(…)

worked fine. I.e. if more than a single lock are all taken inside the same thread, it would work, though not sure if our synchronisation primitives are expressive enough to make it possible.

9 years agorollup merge of #22975: alexcrichton/stabilize-ffi
Alex Crichton [Fri, 6 Mar 2015 23:37:14 +0000 (15:37 -0800)]
rollup merge of #22975: alexcrichton/stabilize-ffi

Conflicts:
src/librustc_trans/back/link.rs
src/librustc_trans/lib.rs

9 years agorollup merge of #22813: alexcrichton/deprecate-net
Alex Crichton [Fri, 6 Mar 2015 23:36:08 +0000 (15:36 -0800)]
rollup merge of #22813: alexcrichton/deprecate-net

The `std::net` primitives should be ready for use now and as a result the old
ones are now deprecated and slated for removal. Most TCP/UDP functionality is
now available through `std::net` but the `std::old_io::net::pipe` module is
removed entirely from the standard library.

Unix socket funtionality can be found in sfackler's [`unix_socket`][unix] crate
and there is currently no replacement for named pipes on Windows.

[unix]: https://crates.io/crates/unix_socket

[breaking-change]

9 years agoSuppress some warnings about features
Alex Crichton [Fri, 6 Mar 2015 23:11:59 +0000 (15:11 -0800)]
Suppress some warnings about features

9 years agoConsolidate ExpansionConfig feature tests
Keegan McAllister [Fri, 6 Mar 2015 20:56:28 +0000 (12:56 -0800)]
Consolidate ExpansionConfig feature tests

9 years agosyntax: Remove deprecated unicode escapes
Alex Crichton [Fri, 6 Mar 2015 21:57:44 +0000 (13:57 -0800)]
syntax: Remove deprecated unicode escapes

These have been deprecated for quite some time, so we should be good to remove
them now.

9 years agostd: Ignore a test on windows
Alex Crichton [Fri, 6 Mar 2015 21:54:42 +0000 (13:54 -0800)]
std: Ignore a test on windows

This test is known to fail on windows.

9 years agotest: Fix an overflow on empty benchmarks
Alex Crichton [Fri, 6 Mar 2015 19:58:32 +0000 (11:58 -0800)]
test: Fix an overflow on empty benchmarks

Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:

    #[bench]
    fn foo(b: &mut test::Bencher) {}

This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.

9 years agoAuto merge of #22474 - iKevinY:pandoc-version-check, r=brson
bors [Fri, 6 Mar 2015 19:04:53 +0000 (19:04 +0000)]
Auto merge of #22474 - iKevinY:pandoc-version-check, r=brson

Executing `configure` seems to create the following error due to how the script [parses Pandoc's version](https://github.com/rust-lang/rust/blob/master/configure#L705):

```text
./configure: line 705: [: pandoc: integer expression expected
./configure: line 705: [: 1.12.4.2: integer expression expected
```

This issue seems to stem from a discrepancy between BSD and GNU versions of sed. This patch changes the sed command to use an extended regex, which works with both flavours of sed.

9 years agostd: Deprecate the std::old_io::net primitives
Alex Crichton [Wed, 25 Feb 2015 21:08:51 +0000 (13:08 -0800)]
std: Deprecate the std::old_io::net primitives

The `std::net` primitives should be ready for use now and as a result the old
ones are now deprecated and slated for removal. Most TCP/UDP functionality is
now available through `std::net` but the `std::old_io::net::pipe` module is
removed entirely from the standard library.

Unix socket funtionality can be found in sfackler's [`unix_socket`][unix] crate
and there is currently no replacement for named pipes on Windows.

[unix]: https://crates.io/crates/unix_socket

[breaking-change]

9 years agoRemove two green threading tests
Brian Anderson [Fri, 6 Mar 2015 18:10:47 +0000 (10:10 -0800)]
Remove two green threading tests

9 years agomove check into wf pass, add a test for assoc types
Jorge Aparicio [Fri, 6 Mar 2015 17:14:38 +0000 (12:14 -0500)]
move check into wf pass, add a test for assoc types

9 years agoRollup merge of #22474 - iKevinY:pandoc-version-check, r=brson
Manish Goregaokar [Fri, 6 Mar 2015 10:55:43 +0000 (16:25 +0530)]
Rollup merge of #22474 - iKevinY:pandoc-version-check, r=brson

 Executing `configure` seems to create the following error due to how the script [parses Pandoc's version](https://github.com/rust-lang/rust/blob/master/configure#L705):

```text
./configure: line 705: [: pandoc: integer expression expected
./configure: line 705: [: 1.12.4.2: integer expression expected
```

This issue seems to stem from a discrepancy between BSD and GNU versions of sed. This patch changes the sed command to use an extended regex, which works with both flavours of sed.

9 years agoBufferedWriter -> BufWriter (fixup #23060)
Manish Goregaokar [Fri, 6 Mar 2015 05:33:51 +0000 (11:03 +0530)]
BufferedWriter -> BufWriter (fixup #23060)

9 years agoRollup merge of #23100 - wesleywiser:fix_23059, r=brson
Manish Goregaokar [Fri, 6 Mar 2015 03:36:28 +0000 (09:06 +0530)]
Rollup merge of #23100 - wesleywiser:fix_23059, r=brson

 Fixes #23059

9 years agoRollup merge of #23096 - posborne:paths-documentation-grammar-fix, r=huonw
Manish Goregaokar [Fri, 6 Mar 2015 03:36:03 +0000 (09:06 +0530)]
Rollup merge of #23096 - posborne:paths-documentation-grammar-fix, r=huonw

9 years agoRollup merge of #23094 - brson:beta, r=huonw
Manish Goregaokar [Fri, 6 Mar 2015 03:35:46 +0000 (09:05 +0530)]
Rollup merge of #23094 - brson:beta, r=huonw

 No more alphas, please.

9 years agoRollup merge of #23082 - killercup:patch-6, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:35:28 +0000 (09:05 +0530)]
Rollup merge of #23082 - killercup:patch-6, r=alexcrichton

 This should fix #22615. Previously, the playpen links grabbed the content of all `.rusttest` containers on the same level to build the URL. Now they just select the one before the `pre` they are shown in.

I have only tested this by changing the file in my local build of the docs (not by running rustdoc itself).

9 years agoRollup merge of #23067 - oli-obk:doc_examle_fix, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:35:12 +0000 (09:05 +0530)]
Rollup merge of #23067 - oli-obk:doc_examle_fix, r=alexcrichton

 The compiler even tells us this won't work.
```
let mut i = s.len();
while i < 0 { ... }
```

9 years agoRollup merge of #23056 - awlnx:master, r=nrc
Manish Goregaokar [Fri, 6 Mar 2015 03:34:47 +0000 (09:04 +0530)]
Rollup merge of #23056 - awlnx:master, r=nrc

9 years agoRollup merge of #23048 - davbo:fix-broken-link-in-old-guide, r=brson
Manish Goregaokar [Fri, 6 Mar 2015 03:34:22 +0000 (09:04 +0530)]
Rollup merge of #23048 - davbo:fix-broken-link-in-old-guide, r=brson

 Having come back to rust recently after > 6months I was looking for docs
on tasks and stumbled upon this broken link.

9 years agoRollup merge of #23045 - ctjhoa:master, r=Manishearth
Manish Goregaokar [Fri, 6 Mar 2015 03:34:07 +0000 (09:04 +0530)]
Rollup merge of #23045 - ctjhoa:master, r=Manishearth

 r? @steveklabnik

9 years agoRollup merge of #23025 - huonw:better-iter-infer, r=Gankro
Manish Goregaokar [Fri, 6 Mar 2015 03:33:51 +0000 (09:03 +0530)]
Rollup merge of #23025 - huonw:better-iter-infer, r=Gankro

 This concretely improves type inference of some cases (see included
test). I assume the compiler struggles to reason about multiple layers
of generic type parameters (even with associated-type equalities) but
*can* understand pure associated types, since they are always directly
computable from the input types.

Thanks to @shepmaster for noticing the issue with `Cloned` (I took that example as a test case).

9 years agoRollup merge of #23101 - laijs:fix-file-perm, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:33:24 +0000 (09:03 +0530)]
Rollup merge of #23101 - laijs:fix-file-perm, r=alexcrichton

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
9 years agoRollup merge of #23099 - brson:lint-cstack, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:33:09 +0000 (09:03 +0530)]
Rollup merge of #23099 - brson:lint-cstack, r=alexcrichton

9 years agoRollup merge of #23098 - brson:ignore-fast, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:32:56 +0000 (09:02 +0530)]
Rollup merge of #23098 - brson:ignore-fast, r=alexcrichton

9 years agoCheck that traits with default impls have no methods
Jorge Aparicio [Fri, 6 Mar 2015 13:07:50 +0000 (08:07 -0500)]
Check that traits with default impls have no methods

fixes #23080

9 years agoFix an easy to trigger deadlock in std::io::stdio
Simonas Kazlauskas [Thu, 5 Mar 2015 21:03:30 +0000 (23:03 +0200)]
Fix an easy to trigger deadlock in std::io::stdio

Being a person who somehow has taken a liking to premature optimisation, my knee-jerk reaction to
locking in std handles was preamble resembling following snippet:

    let stdout = stdout();
    let lstdout = stdout.lock();
    let stdin = stdin();
    let lstdin = stdin.lock();

and then reading from the locked handle like this:

    let mut letter = [0; 1];
    lstdin.read(&mut letter).unwrap();

As it is now this code will deadlock because the `read` method attempts to lock stdout as well!

9 years agoAuto merge of #22899 - huonw:macro-stability, r=alexcrichton
bors [Fri, 6 Mar 2015 05:20:11 +0000 (05:20 +0000)]
Auto merge of #22899 - huonw:macro-stability, r=alexcrichton

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.

---

This updates `thread_local!` macro to use the attribute, since it uses
unstable features internally (initialising a struct with unstable
fields).

9 years agoRollup merge of #23095 - stepancheg:test-bind-fail, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:32:27 +0000 (09:02 +0530)]
Rollup merge of #23095 - stepancheg:test-bind-fail, r=alexcrichton

 Bind on non-local IP address is essentially the same test, and it works
same way on all platforms.

Fixes #11530

9 years agoRollup merge of #23090 - alexcrichton:dep-info, r=pnkfelix
Manish Goregaokar [Fri, 6 Mar 2015 03:32:08 +0000 (09:02 +0530)]
Rollup merge of #23090 - alexcrichton:dep-info, r=pnkfelix

 Closes #23089

9 years agoRollup merge of #23081 - alexcrichton:stabilize-fs, r=aturon
Manish Goregaokar [Fri, 6 Mar 2015 03:31:50 +0000 (09:01 +0530)]
Rollup merge of #23081 - alexcrichton:stabilize-fs, r=aturon

 This commit performs a stabilization pass over the `std::fs` module now that
it's had some time to bake. The change was largely just adding `#[stable]` tags,
but there are a few APIs that remain `#[unstable]`.

The following apis are now marked `#[stable]`:

* `std::fs` (the name)
* `File`
* `Metadata`
* `ReadDir`
* `DirEntry`
* `OpenOptions`
* `Permissions`
* `File::{open, create}`
* `File::{sync_all, sync_data}`
* `File::set_len`
* `File::metadata`
* Trait implementations for `File` and `&File`
* `OpenOptions::new`
* `OpenOptions::{read, write, append, truncate, create}`
* `OpenOptions::open` - this function was modified, however, to not attempt to
  reject cross-platform openings of directories. This means that some platforms
  will succeed in opening a directory and others will fail.
* `Metadata::{is_dir, is_file, len, permissions}`
* `Permissions::{readonly, set_readonly}`
* `Iterator for ReadDir`
* `DirEntry::path`
* `remove_file` - like with `OpenOptions::open`, the extra windows code to
  remove a readonly file has been removed. This means that removing a readonly
  file will succeed on some platforms but fail on others.
* `metadata`
* `rename`
* `copy`
* `hard_link`
* `soft_link`
* `read_link`
* `create_dir`
* `create_dir_all`
* `remove_dir`
* `remove_dir_all`
* `read_dir`

The following apis remain `#[unstable]`.

* `WalkDir` and `walk` - there are many methods by which a directory walk can be
  constructed, and it's unclear whether the current semantics are the right
  ones. For example symlinks are not handled super well currently. This is now
  behind a new `fs_walk` feature.
* `File::path` - this is an extra abstraction which the standard library
  provides on top of what the system offers and it's unclear whether we should
  be doing so. This is now behind a new `file_path` feature.
* `Metadata::{accessed, modified}` - we do not currently have a good
  abstraction for a moment in time which is what these APIs should likely be
  returning, so these remain `#[unstable]` for now. These are now behind a new
  `fs_time` feature
* `set_file_times` - like with `Metadata::accessed`, we do not currently have
  the appropriate abstraction for the arguments here so this API remains
  unstable behind the `fs_time` feature gate.
* `PathExt` - the precise set of methods on this trait may change over time and
  some methods may be removed. This API remains unstable behind the `path_ext`
  feature gate.
* `set_permissions` - we may wish to expose a more granular ability to set the
  permissions on a file instead of just a blanket \"set all permissions\" method.
  This function remains behind the `fs` feature.

The following apis are now `#[deprecated]`

* The `TempDir` type is now entirely deprecated and is [located on
  crates.io][tempdir] as the `tempdir` crate with [its source][github] at
  rust-lang/tempdir.

[tempdir]: https://crates.io/crates/tempdir
[github]: https://github.com/rust-lang/tempdir

The stability of some of these APIs has been questioned over the past few weeks
in using these APIs, and it is intentional that the majority of APIs here are
marked `#[stable]`. The `std::fs` module has a lot of room to grow and the
material is [being tracked in a RFC issue][rfc-issue].

[rfc-issue]: rust-lang/rfcs#939

Closes #22879

[breaking-change]

9 years agoRollup merge of #23079 - alexcrichton:deprecate-process, r=aturon
Manish Goregaokar [Fri, 6 Mar 2015 03:31:37 +0000 (09:01 +0530)]
Rollup merge of #23079 - alexcrichton:deprecate-process, r=aturon

 This module is now superseded by the `std::process` module. This module still
has some room to expand to get quite back up to parity with the `old_io`
version, and there is a [tracking issue][issue] for feature requests as well as
known room for expansion.

[issue]: https://github.com/rust-lang/rfcs/issues/941
[breaking-change]

9 years agoRollup merge of #23074 - michaelwoerister:constants-debug-locs, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:31:23 +0000 (09:01 +0530)]
Rollup merge of #23074 - michaelwoerister:constants-debug-locs, r=alexcrichton

 With this PR in-place constants are handled correctly with respect to debug location assignment.
The PR also adds an (unrelated) test case for debug locations in `extern \"C\"` functions.

Fixes #22432

9 years agoRollup merge of #23070 - krdln:fix-stat-arm, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:30:34 +0000 (09:00 +0530)]
Rollup merge of #23070 - krdln:fix-stat-arm, r=alexcrichton

 This separates definitions of struct stat and other typedefs between Android and Linux on ARM (Android has a non-standard one). This makes functions such as `File::metadata()` work correctly and makes one able to check file's size. All tests from std (and also run-pass: stat.rs) now pass on ARM Linux. Fixes #20007.

9 years agoRollup merge of #23060 - lifthrasiir:rustdoc-sidebar-in-js, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:29:13 +0000 (08:59 +0530)]
Rollup merge of #23060 - lifthrasiir:rustdoc-sidebar-in-js, r=alexcrichton

 It had been a source of huge bloat in rustdoc outputs. Of course, we can simply disable compiler docs (as `rustc` generates over 90M of HTML) but this approach fares better even after such decision.

Each directory now has `sidebar-items.js`, which immediately calls `initSidebarItems` with a JSON sidebar data. This file is shared throughout every item in the sidebar. The current item is highlighted via a separate JS snippet (`window.sidebarCurrent`). The JS file is designed to be loaded asynchronously, as the sidebar is rendered before the content and slow sidebar loading blocks the entire rendering. For the minimal accessibility without JS, links to the parent items are left in HTML.

In the future, it might also be possible to integrate crates data with the same fashion: `sidebar-items.js` at the root path will do that. (Currently rustdoc skips writing JS in that case.)

This has a huge impact on the size of rustdoc outputs. Originally it was 326MB uncompressed (37.7MB gzipped, 6.1MB xz compressed); it is 169MB uncompressed (11.9MB gzipped, 5.9MB xz compressed) now. The sidebar JS only takes 10MB uncompressed & 0.3MB gzipped.

9 years agoRollup merge of #23039 - steveklabnik:doc_vec_macro, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:28:58 +0000 (08:58 +0530)]
Rollup merge of #23039 - steveklabnik:doc_vec_macro, r=alexcrichton

9 years agoRollup merge of #23010 - alexcrichton:deprecate-some-old-io, r=aturon
Manish Goregaokar [Fri, 6 Mar 2015 03:28:44 +0000 (08:58 +0530)]
Rollup merge of #23010 - alexcrichton:deprecate-some-old-io, r=aturon

 The new `io` module has had some time to bake and this commit stabilizes some of
the utilities associated with it. This commit also deprecates a number of
`std::old_io::util` functions and structures.

These items are now `#[stable]`

* `Cursor`
* `Cursor::{new, into_inner, get_ref, get_mut, position, set_position}`
* Implementations of I/O traits for `Cursor<T>`
* Delegating implementations of I/O traits for references and `Box` pointers
* Implementations of I/O traits for primitives like slices and `Vec<T>`
* `ReadExt::bytes`
* `Bytes` (and impls)
* `ReadExt::chain`
* `Chain` (and impls)
* `ReadExt::take` (and impls)
* `BufReadExt::lines`
* `Lines` (and impls)
* `io::copy`
* `io::{empty, Empty}` (and impls)
* `io::{sink, Sink}` (and impls)
* `io::{repeat, Repeat}` (and impls)

These items remain `#[unstable]`

* Core I/O traits. These may want a little bit more time to bake along with the
  commonly used methods like `read_to_end`.
* `BufReadExt::split` - this function may be renamed to not conflict with
  `SliceExt::split`.
* `Error` - there are a number of questions about its representation,
  `ErrorKind`, and usability.

These items are now `#[deprecated]` in `old_io`

* `LimitReader` - use `take` instead
* `NullWriter` - use `io::sink` instead
* `ZeroReader` - use `io::repeat` instead
* `NullReader` - use `io::empty` instead
* `MultiWriter` - use `broadcast` instead
* `ChainedReader` - use `chain` instead
* `TeeReader` - use `tee` instead
* `copy` - use `io::copy` instead

[breaking-change]

9 years agoRollup merge of #22980 - alexcrichton:debug-assertions, r=pnkfelix
Manish Goregaokar [Fri, 6 Mar 2015 03:28:30 +0000 (08:58 +0530)]
Rollup merge of #22980 - alexcrichton:debug-assertions, r=pnkfelix

 This commit is an implementation of [RFC 563][rfc] which adds a new
`cfg(debug_assertions)` directive which is specially recognized and calculated
by the compiler. The flag is turned off at any optimization level greater than 1
and may also be explicitly controlled through the `-C debug-assertions`
flag.

[rfc]: https://github.com/rust-lang/rfcs/pull/563

The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of
the `ndebug` variable and `ndebug` no longer holds any meaning to the standard
library.

Code which was previously relying on `not(ndebug)` to gate expensive code should
be updated to rely on `debug_assertions` instead.

Closes #22492
[breaking-change]

9 years agoRollup merge of #22899 - huonw:macro-stability, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:28:16 +0000 (08:58 +0530)]
Rollup merge of #22899 - huonw:macro-stability, r=alexcrichton

 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.

---

This updates `thread_local!` macro to use the attribute, since it uses
unstable features internally (initialising a struct with unstable
fields).

9 years agoRollup merge of #22862 - vhbit:broken-open, r=alexcrichton
Manish Goregaokar [Fri, 6 Mar 2015 03:28:02 +0000 (08:58 +0530)]
Rollup merge of #22862 - vhbit:broken-open, r=alexcrichton

 According to Apple's [arm64 calling convention](https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html#//apple_ref/doc/uid/TP40013702-SW1) varargs always are passed
through stack. Since `open` is actually a vararg function on Darwin,
it means that older declaration caused permissions to be taken from
stack, while passed through register => it set file permissions
to garbage and it was simply impossible to read/delete files after they
were created.

They way this commit handles it is to preserve compatibility with
existing code - it simply creates a shim unsafe function so all existing
callers continue work as nothing happened.

9 years agofile permission: remove executable bit from *.rs
Lai Jiangshan [Fri, 6 Mar 2015 02:03:00 +0000 (10:03 +0800)]
file permission: remove executable bit from *.rs

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
9 years agoFix reference to 'librlibc' in libcore docs
Wesley Wiser [Fri, 6 Mar 2015 01:45:54 +0000 (20:45 -0500)]
Fix reference to 'librlibc' in libcore docs

Fixes #23059

9 years agoRemove run-pass/lint-cstack.rs. No longer testing anything.
Brian Anderson [Fri, 6 Mar 2015 01:38:18 +0000 (17:38 -0800)]
Remove run-pass/lint-cstack.rs. No longer testing anything.

9 years agoRemoving unnecessary pub from a test function
Carol Nichols [Mon, 2 Mar 2015 23:43:29 +0000 (18:43 -0500)]
Removing unnecessary pub from a test function

9 years agoAdd tests to stable f32 and f64 methods that didn't have any
Carol Nichols [Sat, 14 Feb 2015 23:18:41 +0000 (18:18 -0500)]
Add tests to stable f32 and f64 methods that didn't have any

9 years agoRearrange tests to be in the same order as implementation
Carol Nichols [Sat, 14 Feb 2015 23:14:52 +0000 (18:14 -0500)]
Rearrange tests to be in the same order as implementation

I was having trouble figuring out which functions had tests and which
didn't. This commit is just moving tests around and does not change
anything.

9 years ago'ignore-fast' directives do nothing
Brian Anderson [Fri, 6 Mar 2015 01:29:38 +0000 (17:29 -0800)]
'ignore-fast' directives do nothing

9 years agostd: Fix peeling ports from addresses
Alex Crichton [Fri, 6 Mar 2015 01:20:16 +0000 (17:20 -0800)]
std: Fix peeling ports from addresses

The `rsplitn` call was called with 2 instead of 1 so the iterator would yield 3
items in some cases, not the 2 that it should have.

Closes #23076

9 years agofix minor grammar mistake in paths documentation
Paul Osborne [Fri, 6 Mar 2015 01:11:59 +0000 (19:11 -0600)]
fix minor grammar mistake in paths documentation

9 years agostd: Stabilize the `fs` module
Alex Crichton [Wed, 4 Mar 2015 03:18:29 +0000 (19:18 -0800)]
std: Stabilize the `fs` module

This commit performs a stabilization pass over the `std::fs` module now that
it's had some time to bake. The change was largely just adding `#[stable]` tags,
but there are a few APIs that remain `#[unstable]`.

The following apis are now marked `#[stable]`:

* `std::fs` (the name)
* `File`
* `Metadata`
* `ReadDir`
* `DirEntry`
* `OpenOptions`
* `Permissions`
* `File::{open, create}`
* `File::{sync_all, sync_data}`
* `File::set_len`
* `File::metadata`
* Trait implementations for `File` and `&File`
* `OpenOptions::new`
* `OpenOptions::{read, write, append, truncate, create}`
* `OpenOptions::open` - this function was modified, however, to not attempt to
  reject cross-platform openings of directories. This means that some platforms
  will succeed in opening a directory and others will fail.
* `Metadata::{is_dir, is_file, len, permissions}`
* `Permissions::{readonly, set_readonly}`
* `Iterator for ReadDir`
* `DirEntry::path`
* `remove_file` - like with `OpenOptions::open`, the extra windows code to
  remove a readonly file has been removed. This means that removing a readonly
  file will succeed on some platforms but fail on others.
* `metadata`
* `rename`
* `copy`
* `hard_link`
* `soft_link`
* `read_link`
* `create_dir`
* `create_dir_all`
* `remove_dir`
* `remove_dir_all`
* `read_dir`

The following apis remain `#[unstable]`.

* `WalkDir` and `walk` - there are many methods by which a directory walk can be
  constructed, and it's unclear whether the current semantics are the right
  ones. For example symlinks are not handled super well currently. This is now
  behind a new `fs_walk` feature.
* `File::path` - this is an extra abstraction which the standard library
  provides on top of what the system offers and it's unclear whether we should
  be doing so. This is now behind a new `file_path` feature.
* `Metadata::{accessed, modified}` - we do not currently have a good
  abstraction for a moment in time which is what these APIs should likely be
  returning, so these remain `#[unstable]` for now. These are now behind a new
  `fs_time` feature
* `set_file_times` - like with `Metadata::accessed`, we do not currently have
  the appropriate abstraction for the arguments here so this API remains
  unstable behind the `fs_time` feature gate.
* `PathExt` - the precise set of methods on this trait may change over time and
  some methods may be removed. This API remains unstable behind the `path_ext`
  feature gate.
* `set_permissions` - we may wish to expose a more granular ability to set the
  permissions on a file instead of just a blanket "set all permissions" method.
  This function remains behind the `fs` feature.

The following apis are now `#[deprecated]`

* The `TempDir` type is now entirely deprecated and is [located on
  crates.io][tempdir] as the `tempdir` crate with [its source][github] at
  rust-lang/tempdir.

[tempdir]: https://crates.io/crates/tempdir
[github]: https://github.com/rust-lang/tempdir

The stability of some of these APIs has been questioned over the past few weeks
in using these APIs, and it is intentional that the majority of APIs here are
marked `#[stable]`. The `std::fs` module has a lot of room to grow and the
material is [being tracked in a RFC issue][rfc-issue].

[rfc-issue]: https://github.com/rust-lang/rfcs/issues/939

[breaking-change]

9 years agostd: net: enable bind_error test on all platforms
Stepan Koltsov [Thu, 5 Mar 2015 23:33:24 +0000 (02:33 +0300)]
std: net: enable bind_error test on all platforms

Bind on non-local IP address is essentially the same test, and it works
same way on all platforms.

Fixes #11530

9 years agomk: Once again rename the beta channel artifacts as 'beta'
Brian Anderson [Thu, 5 Mar 2015 23:27:19 +0000 (15:27 -0800)]
mk: Once again rename the beta channel artifacts as 'beta'

No more alphas, please.

9 years agostd: Stabilize the `ffi` module
Alex Crichton [Mon, 2 Mar 2015 18:46:05 +0000 (10:46 -0800)]
std: Stabilize the `ffi` module

The two main sub-modules, `c_str` and `os_str`, have now had some time to bake
in the standard library. This commits performs a sweep over the modules adding
various stability tags.

The following APIs are now marked `#[stable]`

* `OsString`
* `OsStr`
* `OsString::from_string`
* `OsString::from_str`
* `OsString::new`
* `OsString::into_string`
* `OsString::push` (renamed from `push_os_str`, added an `AsOsStr` bound)
* various trait implementations for `OsString`
* `OsStr::from_str`
* `OsStr::to_str`
* `OsStr::to_string_lossy`
* `OsStr::to_os_string`
* various trait implementations for `OsStr`
* `CString`
* `CStr`
* `NulError`
* `CString::new` - this API's implementation may change as a result of
  rust-lang/rfcs#912 but the usage of `CString::new(thing)` looks like it is
  unlikely to change. Additionally, the `IntoBytes` bound is also likely to
  change but the set of implementors for the trait will not change (despite the
  trait perhaps being renamed).
* `CString::from_vec_unchecked`
* `CString::as_bytes`
* `CString::as_bytes_with_nul`
* `NulError::nul_position`
* `NulError::into_vec`
* `CStr::from_ptr`
* `CStr::as_ptr`
* `CStr::to_bytes`
* `CStr::to_bytes_with_nul`
* various trait implementations for `CStr`

The following APIs remain `#[unstable]`

* `OsStr*Ext` traits remain unstable as the organization of `os::platform` is
  uncertain still and the traits may change location.
* `AsOsStr` remains unstable as generic conversion traits are likely to be
  rethought soon.

The following APIs were deprecated

* `OsString::push_os_str` is now called `push` and takes `T: AsOsStr` instead (a
  superset of the previous functionality).

9 years agorustc: Add a debug_assertions #[cfg] directive
Alex Crichton [Mon, 2 Mar 2015 22:51:24 +0000 (14:51 -0800)]
rustc: Add a debug_assertions #[cfg] directive

This commit is an implementation of [RFC 563][rfc] which adds a new
`cfg(debug_assertions)` directive which is specially recognized and calculated
by the compiler. The flag is turned off at any optimization level greater than 1
and may also be explicitly controlled through the `-C debug-assertions`
flag.

[rfc]: https://github.com/rust-lang/rfcs/pull/563

The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of
the `ndebug` variable and `ndebug` no longer holds any meaning to the standard
library.

Code which was previously relying on `not(ndebug)` to gate expensive code should
be updated to rely on `debug_assertions` instead.

Closes #22492
[breaking-change]

9 years agorustc: Don't emit dep-info for imported files
Alex Crichton [Thu, 5 Mar 2015 22:49:58 +0000 (14:49 -0800)]
rustc: Don't emit dep-info for imported files

Closes #23089

9 years agoOIBIT: for `PhantomData<T>` check `T` rather than the struct itself
Jorge Aparicio [Thu, 5 Mar 2015 21:20:02 +0000 (16:20 -0500)]
OIBIT: for `PhantomData<T>` check `T` rather than the struct itself

9 years agoAuto merge of #23031 - Manishearth:rollup, r=Manishearth
bors [Thu, 5 Mar 2015 21:03:10 +0000 (21:03 +0000)]
Auto merge of #23031 - Manishearth:rollup, r=Manishearth

9 years agoFix Playpen Links Containing Multiple Examples
Pascal Hertleif [Thu, 5 Mar 2015 19:53:53 +0000 (20:53 +0100)]
Fix Playpen Links Containing Multiple Examples

Fixes #22615.

9 years agostd: Deprecate the old_io::process module
Alex Crichton [Thu, 5 Mar 2015 18:41:42 +0000 (10:41 -0800)]
std: Deprecate the old_io::process module

This module is now superseded by the `std::process` module. This module still
has some room to expand to get quite back up to parity with the `old_io`
version, and there is a [tracking issue][issue] for feature requests as well as
known room for expansion.

[issue]: https://github.com/rust-lang/rfcs/issues/941
[breaking-change]

9 years agoAuto merge of #23026 - nikomatsakis:issue-20220-supertrait, r=nikomatsakis
bors [Thu, 5 Mar 2015 17:52:21 +0000 (17:52 +0000)]
Auto merge of #23026 - nikomatsakis:issue-20220-supertrait, r=nikomatsakis

The main gist of this PR is commit 1077efb which removes the list of supertraits from the `TraitDef` and pulls them into a separate table, which is accessed via `lookup_super_predicates`. This is analogous to `lookup_predicates`, which gets the complete where clause. This allows us to create the `TraitDef`, which contains the list generics and so forth, without fully knowing the list of supertraits. This in turn allows the *supertrait listing* to contain references to associated types like `<Self as Foo>::Item`, which were previously impossible because conversion required having the `TraitDef` for `Foo`.

We do not yet support `Self::Item` in a supertrait listing. This doesn't work because to convert that, it attempts to expand out the full set of supertraits, which are in the process of being created. This could potentially be worked out by having the expansion of supertraits proceed in a lazy fashion, but we'd have to define shadowing rules for associated types which we don't currently have.

Along the way (in 9de9ec5) I also removed the restriction against duplicate bounds and generalized the code so that it can handle having the same supertrait multiple times with different arguments, e.g. `Foo : Bar<i32> + Bar<u32>`. This restriction was serving no particular purpose, since the same trait could be extended multiple times indirectly, and in the era of multidispatch it is actively harmful.

This is technically a [breaking-change] because it affects the definition of a super-trait. Anything in a where clause that looks like `where Self : Foo` is now considered a supertrait. Because cycles are disallowed in supertraits, that could lead to some errors. This has not been observed in any existing code.

r? @nrc

9 years agofix for new attributes failing. issue #22964
awlnx [Thu, 5 Mar 2015 16:53:51 +0000 (11:53 -0500)]
fix for new attributes failing. issue #22964

9 years agodebuginfo: Add test case for `extern "C"` functions.
Michael Woerister [Thu, 5 Mar 2015 14:03:14 +0000 (15:03 +0100)]
debuginfo: Add test case for `extern "C"` functions.

9 years agorustdoc: Reworded comments to give the rationale for JS.
Kang Seonghoon [Thu, 5 Mar 2015 14:10:15 +0000 (23:10 +0900)]
rustdoc: Reworded comments to give the rationale for JS.

9 years agodebuginfo: Add `debuginfo::with_source_location_override()` function...
Michael Woerister [Thu, 5 Mar 2015 14:00:25 +0000 (15:00 +0100)]
debuginfo: Add `debuginfo::with_source_location_override()` function...

... and use it to fix a debug-location issue with constants.

9 years agoRun feature-gating on the final AST passed to the compiler.
Huon Wilson [Wed, 4 Mar 2015 07:05:38 +0000 (18:05 +1100)]
Run feature-gating on the final AST passed to the compiler.

This ensures we catch everything; previously, an unknown attribute
inserted by #[cfg_attr(...)] in a macro expansion would not be detected.

9 years agoAdd more debugging to syntax::feature_gate.
Huon Wilson [Wed, 4 Mar 2015 07:10:54 +0000 (18:10 +1100)]
Add more debugging to syntax::feature_gate.

9 years agoUse `#[allow_internal_unstable]` for `thread_local!`
Huon Wilson [Sun, 1 Mar 2015 03:09:42 +0000 (14:09 +1100)]
Use `#[allow_internal_unstable]` for `thread_local!`

This destabilises all the implementation details of `thread_local!`,
since they do not *need* to be stable with the new attribute.