Commit Graph

54745 Commits

Author SHA1 Message Date
bors
26fd0117f9 Auto merge of #34705 - alexcrichton:clean-deprecated, r=brson
std: Clean out deprecated APIs

This primarily removes a lot of `sync::Static*` APIs and rejiggers the
associated implementations. While doing this it was discovered that the
`is_poisoned` method can actually result in a data race for the Mutex/RwLock
primitives, so the inner `Cell<bool>` was changed to an `AtomicBool` to prevent
the associated data race. Otherwise the usage/gurantees should be the same
they were before.
2016-07-12 15:15:56 -07:00
Alex Crichton
a7220d9046 std: Clean out deprecated APIs
This primarily removes a lot of `sync::Static*` APIs and rejiggers the
associated implementations. While doing this it was discovered that the
`is_poisoned` method can actually result in a data race for the Mutex/RwLock
primitives, so the inner `Cell<bool>` was changed to an `AtomicBool` to prevent
the associated data race. Otherwise the usage/gurantees should be the same
they were before.
2016-07-12 12:51:13 -07:00
bors
3085ec7848 Auto merge of #34757 - sourcefrog:debug-filetype, r=alexcrichton
Derive Debug on FileType.

Partially fixes #32054
2016-07-12 06:54:46 -07:00
bors
31e9ed5d6c Auto merge of #34778 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests

- Successful merges: #34736, #34737, #34740, #34742, #34749, #34750, #34770
- Failed merges: #33951
2016-07-12 03:58:33 -07:00
Guillaume Gomez
23d5f5652c Rollup merge of #34770 - davidko:patch-1, r=steveklabnik
Fixed some typos

I believe these are typos?
2016-07-12 12:08:24 +02:00
Guillaume Gomez
1958e39cca Rollup merge of #34750 - GuillaumeGomez:error_doc, r=steveklabnik
Add examples for std::Error module

Fixes #29352.

r? @steveklabnik
2016-07-12 12:08:24 +02:00
Guillaume Gomez
ea6cb8744a Rollup merge of #34749 - GuillaumeGomez:any_doc, r=steveklabnik
Improve std::any module doc

Fixes #29340.

r? @steveklabnik
2016-07-12 12:08:23 +02:00
Guillaume Gomez
e2e4b82356 Rollup merge of #34742 - abhijeetbhagat:master, r=steveklabnik
Update on struct expressions

Update doc for struct expressions (#32769)
2016-07-12 12:08:23 +02:00
Guillaume Gomez
f02754a2b2 Rollup merge of #34740 - GuillaumeGomez:boxed_doc, r=steveklabnik
Improve boxed docs

Fixes #29343.

r? @steveklabnik
2016-07-12 12:08:23 +02:00
Guillaume Gomez
a94e4c0f10 Rollup merge of #34737 - frewsxcv:libstd-process-child, r=GuillaumeGomez
Various `std::process` doc improvements.

None
2016-07-12 12:08:23 +02:00
Guillaume Gomez
9f4d2b6cd9 Rollup merge of #34736 - GuillaumeGomez:cells_doc, r=steveklabnik
Add missing examples for std::cell types

Fixes #29344.

r? @steveklabnik
2016-07-12 12:08:22 +02:00
bors
5c69a4f619 Auto merge of #34755 - jonas-schievink:minor-differences, r=eddyb
Move variant_size_differences out of trans

Also enhances the error message a bit, fixes #30505 on the way, and adds
a test (which was missing).

Closes #34018
2016-07-12 01:06:34 -07:00
bors
2539c15b49 Auto merge of #34637 - GuillaumeGomez:syntax_codes, r=jonathandturner
Syntax codes

r? @jonathandturner

cc @steveklabnik

This is a first big shot. I'll do the second one later in the week once this one is merged.
2016-07-11 22:09:44 -07:00
bors
3265bd54b5 Auto merge of #33971 - bltavares:28322/default-channel-to-stable-on-tarball, r=brson
Use --release-channel=stable by default on releases

> Release tarballs should be compilable with just basic ./configure ;
> make ; sudo make install without having to pass special flags to
> configure. This is the case of the --release-channel option, that must
> be changed in the releases.

This commit detects the presence of .git, as it happens on other parts
of `configure` to assume it is a tarball. Then it changes the default
value stored, before parsing the arguments, while still allowing it to
be overriden before any action verifying the flag is done.

Closes #28322
2016-07-11 17:27:31 -07:00
David
81386cf277 Fixed some typos 2016-07-11 14:43:56 -07:00
Guillaume Gomez
b777f145e6 Move E0533 to E0558 (because of external change) 2016-07-11 23:27:27 +02:00
ggomez
937f072cb4 Fix typos 2016-07-11 23:24:49 +02:00
Guillaume Gomez
8dc79ecd13 Update make tidy 2016-07-11 23:24:49 +02:00
Guillaume Gomez
ed2bf57728 Add E0537 error explanation 2016-07-11 23:24:49 +02:00
Guillaume Gomez
ebebb3164a Add E0536 error explanation 2016-07-11 23:24:49 +02:00
Guillaume Gomez
9fe31a1b36 Add E0535 error explanation 2016-07-11 23:24:49 +02:00
Guillaume Gomez
38a0177917 Add E0534 error explanation 2016-07-11 23:24:49 +02:00
Guillaume Gomez
028c796363 Add E0533 error explanation 2016-07-11 23:24:49 +02:00
bors
7ad125c4eb Auto merge of #34686 - alexcrichton:new-stage, r=luqmana
rustc: Update stage0 to beta-2016-07-06

Hot off the presses, let's update our stage0 compiler!
2016-07-11 11:29:52 -07:00
Corey Farwell
97d96bd40c std::process doc improvements.
* Link to `process::Command` from `process::Child`.
* Move out inline Markdown link in doc comment.
* Link to `process::Child::wait` from `process::Child`.
* Link to `process::Child` from `process::ChildStdin`.
* Link to `process::Child` from `process::ChildStdout`.
* Link to `process::Child` from `process::ChildStderr`.
2016-07-11 12:08:15 -04:00
Guillaume Gomez
1ef7bdc0c7 Improve boxed docs 2016-07-11 17:25:10 +02:00
Guillaume Gomez
76dd02025c Add missing examples for std::cell types 2016-07-11 17:13:36 +02:00
Jonas Schievink
fd2b65ee70 Register reads on the corrent HIR item 2016-07-11 17:11:51 +02:00
bors
3ab8054ac1 Auto merge of #34725 - GuillaumeGomez:doc_slice, r=steveklabnik
Improve slice docs

Fixes  #29337.

r? @steveklabnik
2016-07-11 07:13:50 -07:00
Jonas Schievink
37d5c06a0d Don't register reads for external items
Presumably, this ICEs when translating an inlined item from another
crate. There shouldn't be a need to track dependencies in that case.
2016-07-11 01:49:38 +02:00
Jonas Schievink
dd0505cefc Calculate the 2 largest variants using iterators
No need to store all sizes in a vector
2016-07-11 01:43:55 +02:00
Jonas Schievink
66fb62baf7 Get rid of node_levels and node_lint_levels 2016-07-11 01:21:12 +02:00
Martin Pool
bba33ecd86 Derive Debug on FileType.
Partially fixes #32054
2016-07-10 15:37:41 -07:00
Guillaume Gomez
e634d21ba9 Add examples for std::Error module 2016-07-10 22:29:19 +02:00
Jonas Schievink
f5d29a3b59 Move variant_size_differences out of trans
Also enhances the error message a bit, fixes #30505 on the way, and adds
a test (which was missing).

Closes #34018
2016-07-10 22:12:31 +02:00
bors
47b3a98340 Auto merge of #34753 - sfackler:demangle-curly-braces, r=alexcrichton
Demangle curly braces

They show up in things like
fn(&std..panic..PanicInfo<'_>) $u7b$hook$u7d$::fn_pointer_shim.8352::h01f889b2277c719d

r? @alexcrichton
2016-07-10 12:30:00 -07:00
Guillaume Gomez
4c3cff6c65 Improve std::any module doc 2016-07-10 19:41:50 +02:00
Steven Fackler
8511b6faf4 Demangle curly braces
They show up in things like
fn(&std..panic..PanicInfo<'_>) $u7b$hook$u7d$::fn_pointer_shim.8352::h01f889b2277c719d
2016-07-10 10:04:20 -07:00
bors
6871b3f240 Auto merge of #34657 - oli-obk:no_needless_const_eval, r=eddyb
don't const eval constants during MIR creation

this didn't work very well anyway, because const_eval can't eval all kinds of constants.
2016-07-10 06:43:47 -07:00
bors
46e7f4b8c5 Auto merge of #34731 - GGist:fix_sync_try_recv, r=alexcrichton
Check for data in Receiver::try_recv before reporting disconnect

Fixes #34711

r? @alexcrichton
2016-07-10 00:22:33 -07:00
bors
c73bb9b7d9 Auto merge of #34745 - alexandermerritt:slice-doc, r=brson
make docs for clone_from_slice consistent with copy_from_slice

What 'this slice' refers to is not intuitive, given this method can appear in other places, e.g. in docs for Vec.
2016-07-09 21:16:20 -07:00
Alexander Merritt
6a4016933e make clone_from_slice consistent with copy_from_slice
What 'this slice' refers to is not intuitive (we're in the docs for Vec).
2016-07-09 21:50:25 -04:00
bors
4d50e47ce5 Auto merge of #34723 - GuillaumeGomez:slice_doc, r=apasel422
Remove useless doc comment for slice

r? @steveklabnik

This doc comment isn't useful so I removed it. It also "fixes" the weird rustdoc output.

Before:

![screenshot from 2016-07-08 02-04-59](https://cloud.githubusercontent.com/assets/3050060/16688164/fbb321d6-451c-11e6-8d98-53346bc6eb1e.png)

After:

![screenshot from 2016-07-08 02-05-31](https://cloud.githubusercontent.com/assets/3050060/16688166/00b174e4-451d-11e6-83dd-93ab2509f647.png)
2016-07-09 18:16:48 -07:00
bors
f93aaf84cb Auto merge of #34365 - petrochenkov:deferr, r=eddyb
Some more pattern cleanup and bugfixing

The next part of https://github.com/rust-lang/rust/pull/34095

The most significant fixed mistake is definitions for partially resolved associated types not being updated after full resolution.
```
fn f<T: Fn()>(arg: T::Output) { .... } // <- the definition of T::Output was not updated in def_map
```
For this reason unstable associated types of stable traits, like `FnOnce::Output`, could be used in stable code when written in unqualified form. Now they are properly checked, this is a **[breaking-change]** (pretty minor one, but a crater run would be nice). The fix is not to use unstable library features in stable code, alternatively `FnOnce::Output` can be stabilized.

Besides that, paths in struct patterns and expressions `S::A { .. }` are now fully resolved as associated types. Such types cannot be identified as structs at the moment, i.e. the change doesn't make previously invalid code valid, but it improves error diagnostics.

Other changes: `Def::Err` is supported better (less chances for ICEs for erroneous code), some incorrect error messages are corrected, some duplicated error messages are not reported, ADT definitions are now available through constructor IDs, everything else is cleanup and code audit.

Fixes https://github.com/rust-lang/rust/issues/34209
Closes https://github.com/rust-lang/rust/issues/22933 (adds tests)

r? @eddyb
2016-07-09 15:16:21 -07:00
abhi
f396cb42ee Update on struct expressions (check #32769) 2016-07-10 02:10:57 +05:30
bors
d40c593f42 Auto merge of #34717 - frewsxcv:sink, r=apasel422
Remove unnecessarily mutable reference in doc example.

None
2016-07-09 12:16:57 -07:00
bors
7323ac4add Auto merge of #34728 - michaelwoerister:issue34569, r=luqmana
trans: Make sure that closures only get translated once.

Fixes #34569.
2016-07-09 09:17:35 -07:00
Michael Woerister
b732cf46f8 trans: Make sure that closures only get translated once. 2016-07-09 12:15:34 -04:00
bors
459b1a4fbb Auto merge of #34709 - GuillaumeGomez:primitives, r=steveklabnik
Improve primitive integers documentation

Fixes #29335.

r? @steveklabnik
2016-07-09 06:18:55 -07:00
Guillaume Gomez
50483d5fa3 Improve slice docs 2016-07-09 11:54:58 +02:00