Commit Graph

69517 Commits

Author SHA1 Message Date
Guillaume Gomez
0e4c829f2b Add "As parameters" items as well 2017-11-12 21:38:24 +01:00
Guillaume Gomez
5c5ab0d1fb Improve result output 2017-11-12 21:38:24 +01:00
Guillaume Gomez
6514f44bd1 Big JS optimization 2017-11-12 21:38:23 +01:00
Guillaume Gomez
c96be6f4cb Add elements count in tab search title 2017-11-12 21:38:23 +01:00
Guillaume Gomez
c3207ba0cf JS big updates 2017-11-12 21:38:23 +01:00
Guillaume Gomez
2db6ce6e96 Generate generics on search-index 2017-11-12 21:38:23 +01:00
bors
965ace59f2 Auto merge of #45932 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 4 pull requests

- Successful merges: #45631, #45812, #45877, #45919
- Failed merges:
2017-11-11 13:30:16 +00:00
Guillaume Gomez
04785f7e33 Rollup merge of #45919 - lukaramu:patch-1, r=kennytm
Fix broken link markup in Hasher::finish docs

Just a quick fix: there were apostrophes when there needed to be backticks.
2017-11-11 13:38:08 +01:00
Guillaume Gomez
5d07d73ffb Rollup merge of #45877 - mikhail-m1:mir-borrowck-act-on-moved, r=arielb1
restore move out dataflow, add report of move out errors

fix https://github.com/rust-lang/rust/issues/45363
r? @arielb1
2017-11-11 13:38:07 +01:00
Guillaume Gomez
fec24adea8 Rollup merge of #45812 - GuillaumeGomez:links-and-search, r=QuietMisdreavus
Fix navbar click while in a search

Fixes #45790.
2017-11-11 13:38:06 +01:00
Guillaume Gomez
cb71247861 Rollup merge of #45631 - GuillaumeGomez:file-ext-docs, r=frewsxcv
Add missing links and examples for FileExt

r? @rust-lang/docs
2017-11-11 13:38:05 +01:00
Guillaume Gomez
c09adc4f1c Add missing links and examples for FileExt 2017-11-11 13:36:42 +01:00
bors
69ee5a8a97 Auto merge of #45772 - leodasvacas:fix-auto-bounds-in-trait-objects, r=nikomatsakis
Fix checking of auto trait bounds in trait objects.

Any auto trait is allowed in trait object bounds. Fix duplicate check of type and lifetime parameter count, which we were [emitting twice](https://play.rust-lang.org/?gist=37dbbdbbec62dec423bb8f6d92f137cc&version=stable).

Note: This was the last use of `Send` in the compiler, meaning after a new `stage0` we could remove the `send` lang item.
2017-11-11 09:56:22 +00:00
bors
bd7ce71aab Auto merge of #45807 - tommyip:format_err, r=estebank
Make positional argument error in format! clearer

r? @estebank

Fixes #44954
2017-11-11 07:33:31 +00:00
bors
c703ff275f Auto merge of #45806 - alexcrichton:update-llvm-for-mips, r=michaelwoerister
rustbuild: Re-enable ThinLTO for MIPS

Now that the upstream LLVM bug is now fixed this commit cherry-picks the commit
onto our LLVM and then re-enables the ThinLTO paths for MIPS.

Closes #45654
2017-11-11 02:11:34 +00:00
Guillaume Gomez
0d898998b1 Few improvements on search, history and title 2017-11-11 00:44:36 +01:00
bors
25cc4a86c0 Auto merge of #45707 - Ryman:deprecated-item-name, r=nikomatsakis
rustc: add item name to deprecated lint warning

It can sometimes be difficult to know what is actually deprecated when you have `foo.bar()` and `bar` comes from a trait in another crate.
2017-11-10 21:42:09 +00:00
Lukas H
6443873821
Fix broken link markup in Hasher::finish docs
There were apostrophes when there needed to be backticks.
2017-11-10 20:58:03 +01:00
bors
a35a3abcda Auto merge of #45050 - petrochenkov:ambind, r=nikomatsakis
resolve: Use same rules for disambiguating fresh bindings in `match` and `let`

Resolve `Unit` as a unit struct pattern in
```rust
struct Unit;

let Unit = x;
```
consistently with
```rust
match x {
    Unit => {}
}
```
It was previously an error.
(The change also applies to unit variants and constants.)

Fixes https://users.rust-lang.org/t/e0530-cannot-shadow-unit-structs-what-in-the-earthly-what/13054
(This particular change doesn't depend on a fix for the issue mentioned in https://users.rust-lang.org/t/e0530-cannot-shadow-unit-structs-what-in-the-earthly-what/13054/4)

cc @rust-lang/lang
r? @nikomatsakis
2017-11-10 19:10:12 +00:00
Guillaume Gomez
72338b8ccb Allow to go back to previous search 2017-11-10 19:40:46 +01:00
bors
75d25acd97 Auto merge of #45804 - gnzlbg:div_intr, r=alexcrichton
[intrinsics] add missing div and rem vector intrinsics
2017-11-10 16:42:49 +00:00
bors
563dc5171f Auto merge of #45791 - eddyb:quote-unquote, r=jseyfried
Prefer libproc_macro APIs to libsyntax ones in the quasi-quoter.

The shift to using `proc_macro`'s own APIs in `proc_macro::quote`, both in the implementation of the quasi-quoter and the Rust code it generates to build `TokenStream`s at runtime, greatly reduces the dependency on `libsyntax`, with the generated runtime code being completely free of it.

This is a prerequirement for introducing more abstraction/indirection between `proc_macro` and compiler implementation details (mainly those from `libsyntax`), which I want to attempt.

cc @alexcrichton @jseyfried @nrc
2017-11-10 14:10:07 +00:00
bors
968b6206cb Auto merge of #45785 - arielb1:unsafe-fixes, r=eddyb
fixes to MIR effectck

r? @eddyb

beta-nominating because regression (MIR effectck is new)
2017-11-10 11:37:32 +00:00
bors
c0d326f06d Auto merge of #45907 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #45783, #45856, #45863, #45869, #45878, #45882, #45887, #45895, #45901
- Failed merges:
2017-11-10 09:08:15 +00:00
kennytm
6a9931c3fb Rollup merge of #45901 - rkruppe:fix-typo, r=kennytm
Fix typo in -Zsaturating-float-casts test
2017-11-10 17:07:12 +08:00
kennytm
9c76885909 Rollup merge of #45895 - arielb1:inline-debug, r=eddyb
add a bunch of debug logging to MIR inlining

r? @eddyb

@bors rollup
2017-11-10 17:07:11 +08:00
kennytm
253d18e3f9 Rollup merge of #45887 - xfix:assert-eq-trailling-comma, r=dtolnay
Allow a trailling comma in assert_eq/ne macro

From Rust beginners IRC:

<???> It sure does annoy me that assert_eq!() does not accept a trailing comma after the last argument.
<???> ???: File an issue against https://github.com/rust-lang/rust and CC @rust-lang/libs

Figured that might as well submit it. Will become insta-stable after merging (danger zone).

cc @rust-lang/libs
2017-11-10 17:07:10 +08:00
kennytm
20e11db8f7 Rollup merge of #45882 - japaric:gh45802, r=kennytm
fix core for targets with max-atomic-width = 0

closes #45802

cc @kennytm
2017-11-10 17:07:09 +08:00
kennytm
e26bcbe4d4 Rollup merge of #45878 - jhford:use-get-in-get-example, r=kennytm
get() example should use get() not get_mut()

I'm really new to Rust, this is the first thing I've ever actually pushed to github in a rust project, so please double check that it's correct.  I noticed that the in-doc example for the string's get() function was referring to get_mut().  Looks like a copy/paste issue.

```rust
fn main() {
    let v = String::from("🗻🌏");

    assert_eq!(Some("🗻"), v.get(0..4));

    // indices not on UTF-8 sequence boundaries
    assert!(v.get(1..).is_none());
    assert!(v.get(..8).is_none());

    // out of bounds
    assert!(v.get(..42).is_none());
}
```
results in:
```
jhford-work:~/rust/redish $ cat get-example.rs
fn main() {
    let v = String::from("🗻🌏");

    assert_eq!(Some("🗻"), v.get(0..4));

    // indices not on UTF-8 sequence boundaries
    assert!(v.get(1..).is_none());
    assert!(v.get(..8).is_none());

    // out of bounds
    assert!(v.get(..42).is_none());
}
jhford-work:~/rust/redish $ rustc get-example.rs
jhford-work:~/rust/redish $ ./get-example ; echo $?
0
```

I did not build an entire rust toolchain as I'm not totally sure how to do that.
2017-11-10 17:07:08 +08:00
kennytm
91cdb0f9bd Rollup merge of #45869 - GuillaumeGomez:debug-doc, r=frewsxcv
Add missing example for Debug trait

r? @rust-lang/docs
2017-11-10 17:07:07 +08:00
kennytm
65a0fb84ed Rollup merge of #45863 - LukasKalbertodt:add-option-filter, r=dtolnay
Add `Option::filter()` according to RFC 2124

(*old PR: https://github.com/rust-lang/rust/pull/44996*)

This is the implementation of [RFC "Add `Option::filter` to the standard library"](https://github.com/rust-lang/rfcs/pull/2124). Tracking issue: https://github.com/rust-lang/rust/issues/45860

**Questions for code reviewers:**

- Is the documentation sufficiently long?
- Is the documentation easy enough to understand?
- Is the position of the new method (after `and_then()`) a good one?
2017-11-10 17:07:06 +08:00
kennytm
de083eb165 Rollup merge of #45856 - estebank:issue-45829, r=nikomatsakis
Fix help for duplicated names: `extern crate (...) as (...)`

On the case of duplicated names caused by an `extern crate` statement
with a rename, don't include the inline suggestion, instead using a span
label with only the text to avoid incorrect rust code output.

Fix #45829.
2017-11-10 17:07:05 +08:00
kennytm
2c4a0a78b8 Rollup merge of #45783 - kennytm:compiler-test-fixes, r=alexcrichton
Miscellaneous changes for CI, Docker and compiletest.

This PR contains 7 independent commits that improves interaction with CI, Docker and compiletest.

1. a4e5c91cb8 — Forces a newline every 100 dots when testing in quiet mode. Prevents spurious timeouts when abusing the CI to test Android jobs.

2. 1b5aaf22e8 — Use vault.centos.org for dist-powerpc64le-linux, see #45744.

3. 33400fbbcd — Modify `src/ci/docker/run.sh` so that the docker images can be run from Docker Toolbox for Windows on Windows 7. I haven't checked the behavior of the newer Docker for Windows on Windows 10. Also, "can run" does not mean all the test can pass successfully (the UDP tests failed last time I checked)

4. d517668a08 — Don't emit a real warning the linker segfault, which affects UI tests like https://github.com/rust-lang/rust/pull/45489#issuecomment-340134944. Log it instead.

5. 51e2247948 — During run-pass, trim the output if stdout/stderr exceeds 416 KB (top 160 KB + bottom 256 KB). This is an attempt to avoid spurious failures like https://github.com/rust-lang/rust/pull/45384#issuecomment-341755788

6. 9cfdabaf3c — Force `gem update --system` before deploy. This is an attempt to prevent spurious error #44159.

7. eee10cc482 — Tries to print the crash log on macOS on failure. This is an attempt to debug #45230.
2017-11-10 17:07:04 +08:00
bors
d5ff0e6422 Auto merge of #45773 - Badel2:dotdoteq, r=petrochenkov
Add error for `...` in expressions

Follow-up to https://github.com/rust-lang/rust/pull/44709
Tracking issue: https://github.com/rust-lang/rust/issues/28237

* Using `...` in expressions was a warning, now it's an error
* The error message suggests using `..` or `..=` instead, and explains the difference
* Updated remaining occurrences of `...` to `..=`

r? petrochenkov
2017-11-10 01:40:21 +00:00
Robin Kruppe
0872cda34a Fix typo in -Zsaturating-float-casts test 2017-11-10 01:26:22 +01:00
bors
aa1b0b2391 Auto merge of #45761 - gnzlbg:xsave_feature, r=alexcrichton
[xsave] whitelist xsave target feature

Required for https://github.com/rust-lang-nursery/stdsimd/issues/171
2017-11-09 23:17:13 +00:00
Ariel Ben-Yehuda
48655ea661 add a bunch of debug logging to transform::inline 2017-11-09 23:03:41 +02:00
Tommy Ip
b577b9aef3 Retain information on whether a format argument has explicit position 2017-11-09 20:57:58 +00:00
bors
d6b06c63a0 Auto merge of #45757 - mikhail-m1:change-mir-dump-filename, r=nikomatsakis
change MIR dump filenames from `rustc.nodeN...` to `rustc.<DefPath>`

r? @nikomatsakis
2017-11-09 20:46:39 +00:00
bors
f1ea23e2cc Auto merge of #45725 - alexcrichton:std-less-rand, r=dtolnay
Working towards a libc-less (wasm32) libstd

This is a series of commits I was able to extract from prepare to comiple libstd on a "bare libc-less" target, notably wasm32. The actual wasm32 bits I intend to send in a PR later, this is just some internal refactorings required for libstd to work with a `libc` that's empty and a few other assorted refactorings.

No functional change should be included in this PR for users of libstd, this is intended to just be internal refactorings.
2017-11-09 18:14:48 +00:00
Alex Crichton
5c3fe111d4 std: Avoid use of libc in portable modules
This commit removes usage of the `libc` crate in "portable" modules like
those at the top level and `sys_common`. Instead common types like `*mut
u8` or `u32` are used instead of `*mut c_void` or `c_int` as well as
switching to platform-specific functions like `sys::strlen` instead of
`libc::strlen`.
2017-11-09 07:56:44 -08:00
bors
98e791e7e1 Auto merge of #45741 - oli-obk:refactor_suggestions, r=estebank
Refactor internal suggestion API

~~The only functional change is that whitespace, which is suggested to be added, also gets `^^^^` under it. An example is shown in the tests (the only test that changed).~~

Continuation of #41876

r? @nagisa

the changes are probably best viewed [without whitespace](https://github.com/rust-lang/rust/pull/45741/files?w=1)
2017-11-09 15:42:26 +00:00
Mikhail Modin
3acb4e9e4a add reinit test 2017-11-09 17:46:35 +03:00
Konrad Borowski
6a92c0fdbd Allow a trailing comma in assert_eq/ne macro 2017-11-09 14:14:49 +01:00
Mikhail Modin
0e5c95ebcb change separator from . to - 2017-11-09 12:37:16 +03:00
Mikhail Modin
7a6832de99 change MIR dump filenames from nodeN to DefPath 2017-11-09 12:00:17 +03:00
Mikhail Modin
3ccb567b90 Add TerminatorKind::DropAndReplace handling 2017-11-09 11:55:23 +03:00
Alex Crichton
348930eb4e std: Move the cmath module into the sys module
This commit moves the `f32::cmath` and `f64::cmath` modules into the
`sys` module. Note that these are not publicly exported modules, simply
implementation details. These modules are already platform-specific with
shims on MSVC and this is mostly just a reflection of that reality. This
should also help cut down on `#[cfg]` traffic if platforms are brought on
which don't directly support these functions.
2017-11-08 20:42:23 -08:00
Alex Crichton
1ccb50eaa6 std: Change how EBADF is handled in sys
This commit removes the reexport of `EBADF_ERR` as a constant from
libstd's portability facade, instead opting for a platform-specific
function that specifically queries an `io::Error`. Not all platforms may
have a constant for this, so it makes the intent a little more clear
that a code need not be supplied, just an answer to a query.
2017-11-08 20:41:17 -08:00
Alex Crichton
6bc8f164b0 std: Remove rand crate and module
This commit removes the `rand` crate from the standard library facade as
well as the `__rand` module in the standard library. Neither of these
were used in any meaningful way in the standard library itself. The only
need for randomness in libstd is to initialize the thread-local keys of
a `HashMap`, and that unconditionally used `OsRng` defined in the
standard library anyway.

The cruft of the `rand` crate and the extra `rand` support in the
standard library makes libstd slightly more difficult to port to new
platforms, namely WebAssembly which doesn't have any randomness at all
(without interfacing with JS). The purpose of this commit is to clarify
and streamline randomness in libstd, focusing on how it's only required
in one location, hashmap seeds.

Note that the `rand` crate out of tree has almost always been a drop-in
replacement for the `rand` crate in-tree, so any usage (accidental or
purposeful) of the crate in-tree should switch to the `rand` crate on
crates.io. This then also has the further benefit of avoiding
duplication (mostly) between the two crates!
2017-11-08 20:41:17 -08:00