Commit Graph

47915 Commits

Author SHA1 Message Date
Alex Crichton
94aee5b7e6 std: Refactor process exit code handling slightly
* Store the native representation directly in the `ExitStatus` structure instead
  of a "parsed version" (mostly for Unix).
* On Windows, be more robust against processes exiting with the status of 259.
  Unfortunately this exit code corresponds to `STILL_ACTIVE`, causing libstd to
  think the process was still alive, causing an infinite loop. Instead the loop
  is removed altogether and `WaitForSingleObject` is used to wait for the
  process to exit.
2015-11-06 14:40:43 -08:00
bors
475f91f46e Auto merge of #29582 - oli-obk:token_tree, r=sfackler 2015-11-06 21:11:06 +00:00
Steve Klabnik
801f83ff65 sleep_ms -> sleep
Now that thread::sleep is a real thing, let's use it

Fixes #29621
2015-11-06 18:00:29 +01:00
Steve Klabnik
586eb3d50f Add multi-line string literals to TRPL
Fixes #29591
2015-11-06 17:58:27 +01:00
Steve Klabnik
5eacf66c48 Make a note about "gigabyte"
Fixes #28461
2015-11-06 17:44:04 +01:00
bors
b14dc5bc1c Auto merge of #29657 - defuz:patch-2, r=steveklabnik
r? @steveklabnik
2015-11-06 16:42:03 +00:00
angelsl
43e1f9ac5a Update compiler-rt 2015-11-07 00:26:44 +08:00
bors
2143a9ff9a Auto merge of #29643 - petrochenkov:stability5, r=alexcrichton
Also remove `stable` stability annotations from inherent impls

(There will be a warning for useless stability annotations soon.)

r? @Gankro
2015-11-06 14:57:41 +00:00
Oliver Schneider
fcc7067904 remove Tt prefix from TokenType variants
[breaking change]
2015-11-06 14:52:02 +01:00
bors
7cd8f69a4f Auto merge of #29620 - petrochenkov:reachable2, r=alexcrichton
Handle them in `middle::reachable` instead (no optimizations so far, just drop all trait impl items into the reachable set, as before). Addresses the concerns from https://github.com/rust-lang/rust/pull/29291#discussion_r43672413
\+ In `middle::reachable` don't treat impls of `Drop` specially, they are subsumed by the general impl treatment.
\+ Add some tests checking reachability of trait methods written in UFCS form
\+ Minor refactoring in the second commit

r? @alexcrichton
2015-11-06 13:13:08 +00:00
Ivan Ivaschenko
1ebdb734aa Opps, fix incorrect call 2015-11-06 13:52:17 +02:00
Ivan Ivaschenko
0ccd883e7f Rename me in AUTHORS.txt 2015-11-06 13:48:24 +02:00
Ivan Ivaschenko
d071bd00bf Removing the hack from error handling chapter, which is does not make sense anymore. 2015-11-06 13:44:42 +02:00
bors
2f59977d96 Auto merge of #29615 - steveklabnik:lol_strings, r=alexcrichton
&format!("...") is the same as "" if we're not doing any interpolation,
and doesn't allocate an intermediate String.
2015-11-06 11:28:07 +00:00
arcnmx
892b50ba74 Preserve public static items across LTO 2015-11-06 05:04:43 -05:00
bors
6878fce9c7 Auto merge of #29604 - bstrie:de_ms, r=alexcrichton 2015-11-06 09:42:17 +00:00
bors
02d9f29455 Auto merge of #29600 - Ryman:rustdoc_better_testnames, r=alexcrichton
Old doctest names
```bash
test sync::atomic::load_0 ... ok
test sync::atomic::load_0 ... ok
test sync::atomic::load_0 ... ok
test sync::atomic::load_0 ... ok
```

New doctest names
```bash
test sync::atomic::AtomicBool::load_0 ... ok
test sync::atomic::AtomicIsize::load_0 ... ok
test sync::atomic::AtomicPtr<T>::load_0 ... ok
test sync::atomic::AtomicUsize::load_0 ... ok
```
2015-11-06 07:58:27 +00:00
bors
98fa2ac1bc Auto merge of #29588 - nikomatsakis:mir-switch, r=aatch
Introduce a `SwitchInt` and restructure pattern matching to collect integers and characters into one master switch. This is aimed at #29227, but is not a complete fix. Whereas before we generated an if-else-if chain and, at least on my machine, just failed to compile, we now spend ~9sec compiling `rustc_abuse`. AFAICT this is basically just due to a need for more micro-optimization of the matching process: perf shows a fair amount of time just spent iterating over the candidate list. Still, it seemed worth opening a PR with this step alone, since it's a big step forward.
2015-11-06 06:13:59 +00:00
bors
7512808ac9 Auto merge of #29491 - alexcrichton:avoid-stdio-tls, r=brson
Currently if a print happens while a thread is being torn down it may cause a
panic if the LOCAL_STDOUT TLS slot has been destroyed by that point. This adds a
guard to check and prints to the process stdout if that's the case (as we do for
if the slot is already borrowed).

Closes #29488
2015-11-06 04:29:11 +00:00
bors
d53496bda9 Auto merge of #29653 - alexcrichton:fix-distcheck-again-zomg, r=brson
The recent change of libdir on windows was accidentally not propagated to
`make dist` and related commands. This commit touches that up!

Closes #29640
2015-11-06 02:41:20 +00:00
bors
41308a0520 Auto merge of #29305 - alexcrichton:bad-getenv, r=brson
As discovered in #29298, `env::set_var("", "")` will panic, but it turns out
that it *also* deadlocks on Unix systems. This happens because if a panic
happens while holding the environment lock, we then go try to read
RUST_BACKTRACE, grabbing the environment lock, causing a deadlock.

Specifically, the changes made here are:

* The environment lock is pushed into `std::sys` instead of `std::env`. This
  also only puts it in the Unix implementation, not Windows where the functions
  are already threadsafe.
* The `std::sys` implementation now returns `io::Result` so panics are
  explicitly at the `std::env` level.
2015-11-06 00:56:08 +00:00
Alex Crichton
3d619d77b0 mk: Account for libdir change on windows
The recent change of libdir on windows was accidentally not propagated to
`make dist` and related commands. This commit touches that up!

Closes #29640
2015-11-05 16:43:31 -08:00
Kevin Butler
4202615e01 librustdoc: improve testnames for doctests 2015-11-06 00:37:32 +00:00
bors
1dac3adc34 Auto merge of #29648 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29609, #29611, #29613, #29614, #29619, #29624, #29630
- Failed merges:
2015-11-05 21:51:29 +00:00
Steve Klabnik
1036d64db0 Rollup merge of #29630 - apasel422:marker, r=steveklabnik
r? @steveklabnik
2015-11-05 22:28:50 +01:00
Steve Klabnik
28fd5e49df Rollup merge of #29624 - rilut:patch-1, r=steveklabnik
Thanks.
r? @steveklabnik
2015-11-05 22:28:49 +01:00
Steve Klabnik
115c223e73 Rollup merge of #29619 - steveklabnik:gh28824, r=alexcrichton
Fixes #28824
2015-11-05 22:28:49 +01:00
Steve Klabnik
0171abb0d0 Rollup merge of #29614 - bluss:vec-drop-comment, r=Gankro
vec: Remove old comment in Vec::drop

This comment was leftover from an earlier revision of a PR, something
that never was merged. There is no ZST special casing in Vec::drop.
2015-11-05 22:28:49 +01:00
Steve Klabnik
15dd4170ff Rollup merge of #29613 - steveklabnik:29506, r=alexcrichton
in favor of just expect()

Fixes #29506
2015-11-05 22:28:49 +01:00
Steve Klabnik
fdccd94269 Rollup merge of #29611 - steveklabnik:gh25918, r=alexcrichton
Originally, this was my 30 minute introduction, and we eventually made
it the opener to the book. But as #25918 has shown, the example I use
here has some issues. The good news is that Rust makes heap allocation
syntatically expensive, but the bad news is that that means showing
equivalent programs from Rust and other languages is difficult. After
thinking about it, I'm not sure this section is pulling its weight, and
since it has problems, I'd rather just pull it than try to re-write it
right now. I think the book is fine without it.

FIxes #25918
2015-11-05 22:28:49 +01:00
Steve Klabnik
09a1e5853e Rollup merge of #29609 - ivan:rustdoc-ctrl-s, r=steveklabnik
Rustdoc pages with a search box inadvertently override `ctrl-s` in addition to the intended `s` and `S` keys.  You can test this in at least Firefox and Chrome (tested: Windows): press `ctrl-s` on http://doc.rust-lang.org/std/.  The search box is focused when instead the browser's save feature should be activated.  This PR fixes `ctrl-s` and possibly other browser shortcuts.
2015-11-05 22:28:48 +01:00
Vadim Petrochenkov
2ef07f0519 Remove stability annotations from trait impl items
Remove `stable` stability annotations from inherent impls
2015-11-06 00:13:46 +03:00
bors
96c95f160f Auto merge of #29583 - dotdash:mir_small_agg, r=nikomatsakis
Fix handling of small aggregate function arguments and assignments of temporaries to lvalues.
2015-11-05 20:06:13 +00:00
Andrew Paseltiner
d76cdac482 Tidy core::marker doc summaries 2015-11-05 13:29:46 -05:00
bors
3a0409d291 Auto merge of #29565 - sfackler:issue-29540, r=huonw
Closes #29540

r? @huonw
2015-11-05 18:15:26 +00:00
Rizky Luthfianto
edee023297 doc(lib.rs): fix #L79 with inline link syntax 2015-11-06 00:15:32 +07:00
Niko Matsakis
dcf323e586 Convert TODO into FIXME 2015-11-05 11:54:24 -05:00
bors
74185aff27 Auto merge of #29593 - ben0x539:reflect-doc-comment, r=steveklabnik
Rustdoc takes the first paragraph as a summary, so having a huge
paragraph that ends with introducing an example looked somewhat wrong on
the module page.
2015-11-05 16:29:07 +00:00
Steve Klabnik
58628b3f79 Beef up macro designator docs
Fixes #28824
2015-11-05 16:46:56 +01:00
Vadim Petrochenkov
1d693976df EmbargoVisitor::reexports isn't needed 2015-11-05 18:42:48 +03:00
Björn Steinbrink
3235b22ee3 Fix handling of fat pointer function arguments
The store for the "extra" data went to the wrong destination.
2015-11-05 16:18:45 +01:00
Vadim Petrochenkov
5092b09648 rustc_privacy: Do not export items needed solely for the reachability analysis
Process them in middle::reachable instead
Add tests for reachability of trait methods written in UFCS form
2015-11-05 18:17:33 +03:00
Steve Klabnik
63576c23e4 remove excess string allocation
&format!("...") is the same as "" if we're not doing any interpolation,
and doesn't allocate an intermediate String.
2015-11-05 15:30:34 +01:00
Ulrik Sverdrup
7300ed8e40 vec: Remove old comment in Vec::drop
This comment was leftover from an earlier revision of a PR, something
that never was merged. There is no ZST special casing in Vec::drop.
2015-11-05 14:41:31 +01:00
Steve Klabnik
6d9502d35b Remove .ok().expect()
in favor of just expect()

Fixes #29506
2015-11-05 14:40:50 +01:00
Steve Klabnik
f70f8b4301 Remove short intro from README
Originally, this was my 30 minute introduction, and we eventually made
it the opener to the book. But as #25918 has shown, the example I use
here has some issues. The good news is that Rust makes heap allocation
syntatically expensive, but the bad news is that that means showing
equivalent programs from Rust and other languages is difficult. After
thinking about it, I'm not sure this section is pulling its weight, and
since it has problems, I'd rather just pull it than try to re-write it
right now. I think the book is fine without it.

FIxes #25918
2015-11-05 14:04:39 +01:00
bors
2509948b3e Auto merge of #29610 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29416, #29537, #29538, #29539, #29567, #29568, #29571, #29579
- Failed merges:
2015-11-05 12:49:44 +00:00
Benjamin Herr
4db95e652e docs for Reflect: blank line after first sentence
Rustdoc takes the first paragraph as a summary, so having a huge
paragraph that ends with introducing an example looked somewhat wrong on
the module page.
2015-11-05 13:37:43 +01:00
Steve Klabnik
05cbfa478c Rollup merge of #29579 - steveklabnik:gh27322, r=apasel422
Fixes #27322
2015-11-05 12:43:03 +01:00
Steve Klabnik
f04e77d598 Rollup merge of #29571 - steveklabnik:gh29322, r=apasel422
Fixes #29322
2015-11-05 12:43:03 +01:00