Commit graph

43553 commits

Author SHA1 Message Date
Tamir Duberstein
f5e9a4ae15 compiletest/raise_fd_limit: use libc instead of custom impl
Fixes #29751.
2015-11-10 12:27:55 -05:00
bors
e9aa32ac72 Auto merge of #29697 - dotdash:mir_trans_switchint, r=nikomatsakis 2015-11-10 13:17:15 +00:00
bors
4afa9d9003 Auto merge of #29699 - tamird:valgrind-supp, r=alexcrichton
Quite a bit of cruft in the valgrind suppressions. I started from a clean slate and found a few unique failures; this commit also moves the tests "fixed" by these suppressions into run-pass-valgrind.
2015-11-10 11:34:13 +00:00
bors
4b23a0962d Auto merge of #29647 - goyox86:goyox86/rustfmting-librustc_frontII, r=nrc
Hi Rustaceans!

This is the second take  on running latest rustfmt on librustc_front!

This is the same in https://github.com/rust-lang/rust/pull/29075 but cleaned. All fixups have been applied.

//cc @nrc
2015-11-10 08:38:52 +00:00
bors
6aee7c5d2c Auto merge of #29546 - alexcrichton:new-libc, r=brson
This commit replaces the in-tree liblibc with the [external clone](https://github.com/rust-lang-nursery/libc) which has no evolved beyond the in-tree version in light of its [recent redesign](https://github.com/rust-lang/rfcs/pull/1291).

The primary changes here are:

* `src/liblibc/lib.rs` was deleted
* `src/liblibc` is now a submodule pointing at the external repository
* `src/libstd/sys/unix/{c.rs,sync.rs}` were both deleted having all bindings folded into the external liblibc.
* Many ad-hoc `extern` blocks in the standard library were removed in favor of bindings now being in the external liblibc.
* Many functions/types were added to `src/libstd/sys/windows/c.rs`, and the scattered definitions throughout the standard library were consolidated here.

At the API level this commit is **not a breaking change**, although it is only very lightly tested on the *BSD variants and is probably going to break almost all of their builds! Follow-up commits to liblibc should in theory be all that's necessary to get the build working on the *BSDs again.
2015-11-10 06:56:30 +00:00
Alex Crichton
3d28b8b98e std: Migrate to the new libc
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself
* Update all references to use `libc` as a result.
* Update all references to the new flat namespace.
* Moves all windows bindings into sys::c
2015-11-09 22:55:50 -08:00
Alex Crichton
c8a29c2092 libc: Replace liblibc with crates.io libc 2015-11-09 17:36:13 -08:00
Jose Narvaez
cbd2ef8185 Rustfmting librustc_front (again). 2015-11-09 21:55:51 +00:00
Björn Steinbrink
b0d7338d6d [MIR trans] Add support for SwitchInt 2015-11-09 16:54:58 +01:00
Andrew Paseltiner
269b59fe69 Remove executable permission from .rs files 2015-11-09 09:28:51 -05:00
bors
00aa3cbecc Auto merge of #29695 - dtrebbien:remove-mention-of-struct_variant-feature, r=sanxiyn
The struct_variant feature was accepted and is no longer feature gated.
See #19122, #19124

§6.1.6 Enumerations shows an example of a struct-like enum variant.
2015-11-09 11:14:26 +00:00
bors
36f211b353 Auto merge of #29682 - Ryman:dead_spam, r=sanxiyn
This standardises the current behavior to match `enum` variants, hopefully leading to less warning spam for users!

For example the code below will have 2 warnings (for `Foo` and `Bar`) rather than 7:
```rust
enum Foo {
    A,
    B { a: String, b: isize },
    C
}

struct Bar {
    a: i32,
    b: String,
    c: ()
}

fn main() {
    println!("Hi")
}
```
http://is.gd/zAztKW
2015-11-09 08:28:35 +00:00
bors
5b4986fa57 Auto merge of #29684 - stepancheg:size-hint, r=Gankro
* `size_hint()` cannot be relied upon to perform memory unsafe operations

Same applies to `len()` function of `ExactSizeIterator` trait.
2015-11-08 22:01:44 +00:00
bors
9eb099daa4 Auto merge of #29686 - jrburke:docs-error-handling-search-case, r=BurntSushi
In src/doc/trpl/error-handling.md, in this section:

It mentions three steps, to "convert this to proper error handling", the last one being:

3. Handle the error in main.

However, it is not shown. This pull request adds a code example showing how `main`'s call to `search` should use case analysis. I am still very much new to learning Rust, so this may not be idiomatic. Happy to make changes with guidance.
2015-11-08 20:20:16 +00:00
bors
e543815c85 Auto merge of #29690 - tbu-:pr_doc_env_home_dir, r=Manishearth 2015-11-08 18:37:18 +00:00
Tamir Duberstein
269a811192 valgrind: update suppressions and move interesting tests 2015-11-08 13:36:36 -05:00
Tamir Duberstein
c21ffc27b1 print the unexpected character 2015-11-08 13:36:36 -05:00
Stepan Koltsov
f6f99ce7a3 Explain that size_hint cannot be trusted
Same applies to `len()` function of `ExactSizeIterator` trait.
2015-11-08 21:27:12 +03:00
jrburke
0dd2c1c07d doc: error-handling.md: main case analysis for search 2015-11-08 09:53:21 -08:00
Daniel Trebbien
9f7afd060b reference: Remove struct_variant from Compiler Features
The struct_variant feature was accepted and is no longer feature gated.
See #19122, #19124

§6.1.6 Enumerations shows an example of a struct-like enum variant.
2015-11-08 11:27:40 -05:00
Jake Worth
8a41d1292f Fix double word 'be' 2015-11-08 09:39:01 -06:00
Tobias Bucher
e5100a5802 Spell out the fallback of std::env::home_dir on POSIX 2015-11-08 15:34:16 +00:00
bors
01fc81f249 Auto merge of #29683 - apasel422:typos, r=steveklabnik
r? @steveklabnik
2015-11-08 05:31:21 +00:00
bors
4648d2b0f7 Auto merge of #29681 - vadimcn:fix-dist, r=alexcrichton
Resolves  #29672.   This happened because rust runtime startup objects, rsbegin.o and rsend.o, were not included in the target libraries package for -windows-gnu.

r? @alexcrichton
2015-11-08 02:34:24 +00:00
Andrew Paseltiner
e807b1f5ab Remove duplicate words from docs 2015-11-07 21:28:13 -05:00
Kevin Butler
c0a3538315 librustc: dont warn for inside of items when the parent is dead 2015-11-08 02:04:34 +00:00
Vadim Chugunov
9f9afe5769 Make sure rsbegin.o and rsend.o get packaged with target lib artifacts.
Also, unified libc startup objects finding logic with that of the `-musl` target, since conceptually they were doing the same thing.
2015-11-07 17:56:55 -08:00
bors
bfdc358910 Auto merge of #29674 - inrustwetrust:flag_alignment, r=alexcrichton
The `enable-nonzeroing-move-hints` flag name was too long and caused misalignment of the help text.
Now calculating the needed padding dynamically from the available flags instead.
2015-11-07 23:45:14 +00:00
Jake Worth
ac19178078 Fix typo 2015-11-07 12:27:58 -06:00
inrustwetrust
61bb652ada Fixed text alignment for output of "rustc -Z help" 2015-11-07 14:13:30 +01:00
Oliver Middleton
4f6eb1e93a Update list of array implementations in src/libstd/primitive_docs.rs 2015-11-07 12:01:11 +00:00
bors
bb9b5f5ede Auto merge of #29666 - Manishearth:rollup, r=Manishearth
- Successful merges: #29617, #29622, #29656, #29659, #29660
- Failed merges:
2015-11-07 02:26:45 +00:00
Manish Goregaokar
d9dd67d908 Rollup merge of #29660 - steveklabnik:gh28461, r=brson
Fixes #28461
2015-11-07 06:44:46 +05:30
Manish Goregaokar
e42dbc26de Rollup merge of #29659 - angelsl:crt-rebase, r=alexcrichton
cc: @vadimcn @vhbit

r? @alexcrichton
2015-11-07 06:44:46 +05:30
Manish Goregaokar
29c32cae2a Rollup merge of #29656 - arcnmx:static-extern, r=alexcrichton
This is currently done for functions but not public static symbols.
2015-11-07 06:44:45 +05:30
Manish Goregaokar
be4cd07a7e Rollup merge of #29622 - steveklabnik:gh29621, r=bstrie
Now that thread::sleep is a real thing, let's use it

Fixes #29621

r? @bstrie
2015-11-07 06:44:45 +05:30
Manish Goregaokar
50e8707cc3 Rollup merge of #29617 - steveklabnik:gh29591, r=alexcrichton
Fixes #29591
2015-11-07 06:44:45 +05:30
bors
1e3e7e73c6 Auto merge of #29551 - arcnmx:target-family, r=alexcrichton
Allow the changing of `target_family` through flexible configuration. The whole computing world isn't just a binary of *nix and Windows! Makes porting `libstd` and co to new platforms a lot less painful.
2015-11-07 00:42:10 +00:00
bors
6dbd2509f0 Auto merge of #29462 - alexcrichton:refactor-process-ret, r=aturon
* 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 22:57:37 +00:00
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