95762 Commits

Author SHA1 Message Date
Zack M. Davis
6bb60ef6f2 name the trait in ambiguous-associated-items fully qualified suggestion
We have the trait at this point, so we can name it in the error
message, rather than using "Trait" as a (potentially confusing)
placeholder.

Thanks to Yuki "@JohnTitor" Okushi for pointing out where to look (in
the same file) for a closely related issue for ambiguous associated
types (as opposed to items; that was #59225, except that one won't be
quite as easy to resolve, because we actually don't have the trait
`DefId` at that point).
2019-07-06 16:47:43 -07:00
bors
dfd52ba6ac Auto merge of #59772 - andrehjr:add-rustc-guide-to-toolstate, r=mark-i-m
Add rustc guide to toolstate

Closes #59597
2019-07-06 18:19:01 +00:00
André Luis Leal Cardoso Junior
b5cd962be8 Don't return an error from linkcheck when it's not supported' 2019-07-06 11:05:22 -03:00
André Luis Leal Cardoso Junior
43cb7d08e4 Ignore unused variable for non-linux builds 2019-07-06 11:05:22 -03:00
Mark Mansi
f0e45bfe81 fix macos build 2019-07-06 11:05:22 -03:00
Mark Mansi
1de42ff95a cfg: linkcheck only on x86-64 linux 2019-07-06 11:05:22 -03:00
André Luis Leal Cardoso Junior
7fbc6a9ba3 add missing libssl-dev dependency to docker images on travis 2019-07-06 11:05:22 -03:00
André Luis Leal Cardoso Junior
9ca5dee0ad Add 'Apache-2.0 OR MIT' license variation to tidy/tools check 2019-07-06 11:05:22 -03:00
André Luis Leal Cardoso Junior
a55fa18a52 Move installing of deps to the docker container, instead of installing on the host machine on travis 2019-07-06 11:05:22 -03:00
André Luis Leal Cardoso Junior
f80697215f Add linkcheck command to rustbook tool 2019-07-06 11:05:22 -03:00
André Luis Leal Cardoso Junior
d8a6ccfb4a Track rustc-guide on toolstate 2019-07-06 11:05:22 -03:00
André Luis Leal Cardoso Junior
83877773da add ./x.py test src/doc/rustc-guide 2019-07-06 11:05:22 -03:00
bors
254f201495 Auto merge of #61988 - Centril:there-is-only-loop, r=matthewjasper
[let_chains, 3/6] And then there was only Loop

Here we remove `hir::ExprKind::While`.
Instead, we desugar: `'label: while $cond $body` into:

```rust
'label: loop {
    match DropTemps($cond) {
        true => $body,
        _ => break,
    }
}
```

Per https://github.com/rust-lang/rust/issues/53667#issuecomment-471583239.
This is a follow up to https://github.com/rust-lang/rust/pull/59288 which did the same for `if` expressions.

r? @matthewjasper
2019-07-06 06:15:44 +00:00
Mazdak Farrokhzad
9b1d513e47 --bless --compare-mode=nll 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
075e381b91 Bless mir-opt/while-storage.rs. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
b32beb88cd Cleanup liveness comment. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
b9e7e3175a while_{let_}loops/change_{break,continue}: typeck_tables_of clean. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
26144fe869 Lowering: Fuse ExprKind::While logic + Cleanup. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
547735457f Make WhileTrue into an EarlyLintPass lint. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
f01562af33 Make sure while-exprs require 'cond: bool' exactly. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
ebcc966ac1 Adjust incremental test while_loops.rs 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
7d1cd41be3 while desugars to loop so 'a: while break 'a {} in ctfe doesn't work yet. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
4edfa6d4c9 Enforce 'cond: bool' in while-expr + improve reachability diags. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
e7b544ee83 min_const_fn: change error message due to changed desugaring. 2019-07-06 06:43:58 +02:00
Mazdak Farrokhzad
f8b32dfb27 Remove ExprKind::While from HIR. 2019-07-06 06:43:58 +02:00
bors
b820c76174 Auto merge of #62428 - Centril:rollup-2udow5e, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #62151 (Update linked OpenSSL version)
 - #62245 (Miri engine: support extra function (pointer) values)
 - #62257 (forward read_c_str method from Memory to Alloc)
 - #62264 (Fix perf regression from Miri Machine trait changes)
 - #62296 (request at least ptr-size alignment from posix_memalign)
 - #62329 (Remove support for 1-token lookahead from the lexer)
 - #62377 (Add test for ICE #62375)

Failed merges:

r? @ghost
2019-07-06 02:58:36 +00:00
Mazdak Farrokhzad
46edb516df
Rollup merge of #62377 - wesleywiser:fix_62375, r=alexcrichton
Add test for ICE #62375

Fixes #62375
2019-07-06 02:38:02 +02:00
Mazdak Farrokhzad
952ee77871
Rollup merge of #62329 - matklad:no-peeking, r=petrochenkov
Remove support for 1-token lookahead from the lexer

`StringReader` maintained `peek_token` and `peek_span_src_raw` for look ahead.

`peek_token` was used only by rustdoc syntax coloring. After moving peeking logic into highlighter, I was able to remove `peek_token` from the lexer. I tried to use `iter::Peekable`, but that wasn't as pretty as I hoped, due to buffered fatal errors. So I went with hand-rolled peeking.

After that I've noticed that the only peeking behavior left was for raw tokens to test tt jointness. I've rewritten it in terms of trivia tokens, and not just spans.

After that it became possible to simplify the awkward constructor of the lexer, which could return `Err` if the first peeked token contained error.
2019-07-06 02:38:01 +02:00
Mazdak Farrokhzad
3c4a6c8606
Rollup merge of #62296 - RalfJung:memalign, r=alexcrichton
request at least ptr-size alignment from posix_memalign

Fixes https://github.com/rust-lang/rust/issues/62251
2019-07-06 02:37:59 +02:00
Mazdak Farrokhzad
0383be8577
Rollup merge of #62264 - RalfJung:inline-forcing, r=zackmdavis
Fix perf regression from Miri Machine trait changes

Maybe this fixes the perf regression that https://github.com/rust-lang/rust/pull/62003 seemingly introduced?

Cc @nnethercote
2019-07-06 02:37:58 +02:00
Mazdak Farrokhzad
947d7cf16d
Rollup merge of #62257 - RalfJung:miri-c-str, r=estebank
forward read_c_str method from Memory to Alloc

This is more convenient to call when one starts with a `Scalar` (which is the common case).

`read_c_str` is only used in Miri.
2019-07-06 02:37:56 +02:00
Mazdak Farrokhzad
182248a466
Rollup merge of #62245 - RalfJung:miri-extra-fn, r=eddyb,zackmdavis
Miri engine: support extra function (pointer) values

We want to add basic support for `dlsym` in Miri (needed to run the latest version of `getrandom`). For that to work, `dlsym` needs to return *something* that can be stored in a function pointer and later called.

So we add a new `ExtraFnVal` type to the `Machine` trait, and enable Miri's memory to associate allocation IDs with such values, so that `create_fn_alloc` and `get_fn` can work on *both* `Instance` (this is used for "normal" function pointers) and `ExtraFnVal`.

Cc @oli-obk
2019-07-06 02:37:54 +02:00
Mazdak Farrokhzad
a8f8c7c78c
Rollup merge of #62151 - alexcrichton:update-openssl, r=Mark-Simulacrum
Update linked OpenSSL version

This bumps our linked OpenSSL version from 1.1.1a to 1.1.1c, picking up
some various bug fixes and minor security issue fixes.
2019-07-06 02:37:53 +02:00
bors
481068a707 Auto merge of #62419 - Centril:rollup-82umycq, r=Centril
Rollup of 13 pull requests

Successful merges:

 - #61545 (Implement another internal lints)
 - #62110 (Improve -Ztime-passes)
 - #62133 (Feature gate `rustc` attributes harder)
 - #62158 (Add MemoryExtra in InterpretCx constructor params)
 - #62168 (The (almost) culmination of HirIdification)
 - #62193 (Create async version of the dynamic-drop test)
 - #62369 (Remove `compile-pass` from compiletest)
 - #62380 (rustc_target: avoid negative register counts in the SysV x86_64 ABI.)
 - #62381 (Fix a typo in Write::write_vectored docs)
 - #62390 (Update README.md)
 - #62396 (remove Scalar::is_null_ptr)
 - #62406 (Lint on invalid values passed to x.py --warnings)
 - #62414 (Remove last use of mem::uninitialized in SGX)

Failed merges:

r? @ghost
2019-07-05 18:27:52 +00:00
Mazdak Farrokhzad
e89bd8c308
Rollup merge of #62414 - jethrogb:jb/sgx-uninit, r=Mark-Simulacrum
Remove last use of mem::uninitialized in SGX

See #62397
2019-07-05 20:27:08 +02:00
Mazdak Farrokhzad
cc453d9895
Rollup merge of #62406 - Mark-Simulacrum:warnings-lint, r=RalfJung
Lint on invalid values passed to x.py --warnings

This also introduces support for `--warnings allow` and fixes --warnings
being overridden by the configuration file, config.toml.

Fixes #62402

r? @RalfJung
2019-07-05 20:27:06 +02:00
Mazdak Farrokhzad
3c2cba847b
Rollup merge of #62396 - RalfJung:miri-no-null, r=alexcrichton
remove Scalar::is_null_ptr

Comparing pointers should be done more carefully than that. With https://github.com/rust-lang/miri/pull/825, Miri does not need it any more and it is otherwise unused.
2019-07-05 20:27:05 +02:00
Mazdak Farrokhzad
4ac3e626a7
Rollup merge of #62390 - markebrooks:encourage, r=Centril
Update README.md

Let's not discourage contributions.
2019-07-05 20:27:04 +02:00
Mazdak Farrokhzad
c5d18600ef
Rollup merge of #62381 - pawroman:fix_typo_in_write_vectored, r=Centril
Fix a typo in Write::write_vectored docs

Fixed what seems like a typo. "Copy to from" is extremely confusing.
2019-07-05 20:27:02 +02:00
Mazdak Farrokhzad
58f402aab7
Rollup merge of #62380 - eddyb:x64-sysv-regs, r=nagisa
rustc_target: avoid negative register counts in the SysV x86_64 ABI.

Because `needed_{int,sse}` and `{int,sse}_regs` were only used with integer literals, they were inferred to `i32` and `{int,sse}_regs` could therefore be negative.
There was a check which prevented that, but *only* for aggregate arguments, not scalars.

Fixes #62350.

r? @nagisa or @rkruppe
2019-07-05 20:27:01 +02:00
Mazdak Farrokhzad
216a1871bb
Rollup merge of #62369 - JohnTitor:remove-compile-pass, r=petrochenkov
Remove `compile-pass` from compiletest

This is a part of #62277.
Removes `compile-pass` from compiletest (and modify some tests' annotations).

r? @Centril
2019-07-05 20:26:59 +02:00
Mazdak Farrokhzad
30aa2450e1
Rollup merge of #62193 - matthewjasper:dynamic-drop-async, r=Centril
Create async version of the dynamic-drop test

Some of the tests in dynamic-drop have been cut:
* The tests that are just simpler versions of other tests - these tests are already fairly slow due to all of the unwinding and async functions have more control flow paths than normal functions.
* The union test - it's for an unstable feature that has an RFC to remove it.
* The generator test - there aren't async generators yet.
* The tests that show values being leaked - these can be added once the issue is fixed.

r? @Centril
cc  #62121 @cramertj
2019-07-05 20:26:58 +02:00
Mazdak Farrokhzad
2e86c006f7
Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=Zoxc
The (almost) culmination of HirIdification

It's finally over.

This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name.
All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
2019-07-05 20:26:56 +02:00
Mazdak Farrokhzad
b41a62ef69
Rollup merge of #62158 - christianpoveda:ecx-memory-extra, r=RalfJung
Add MemoryExtra in InterpretCx constructor params

This is to avoid modifying `MemoryExtra` inside `InterpretCx` after initialization. Related miri PR: https://github.com/rust-lang/miri/pull/792

r? @RalfJung
2019-07-05 20:26:55 +02:00
Mazdak Farrokhzad
0224532493
Rollup merge of #62133 - petrochenkov:norustc, r=eddyb
Feature gate `rustc` attributes harder

Fixes https://github.com/rust-lang/rust/issues/62116
2019-07-05 20:26:54 +02:00
Mazdak Farrokhzad
40841e049a
Rollup merge of #62110 - nnethercote:improve-Ztime-passes, r=Zoxc
Improve -Ztime-passes

Two improvements that make `-Ztime-passes` more useful.

r? @Zoxc
2019-07-05 20:26:52 +02:00
Mazdak Farrokhzad
485a084b45
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Implement another internal lints

cc #49509

This adds ~~two~~ one internal lint~~s~~:
1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669
2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~

~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~

TODO (not directly relevant for review):
- [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) 🤔 cc @eddyb)
- [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870
- [x] Check explicitly for the `{declare,impl}_lint_pass!` macros

r? @oli-obk
2019-07-05 20:26:51 +02:00
Yuki Okushi
1640ab2e1f Fix test annotation 2019-07-06 02:06:39 +09:00
Yuki Okushi
211b52bb23 Update rustc-guide 2019-07-06 02:06:00 +09:00
Yuki Okushi
db93d01493 Remove compile-pass from error codes' explanation 2019-07-06 02:06:00 +09:00