Commit graph

94346 commits

Author SHA1 Message Date
Yuki Okushi
8f34a50cc5 Remove ty::BrFresh and new_bound 2019-05-31 15:09:04 +09:00
Lzu Tao
1c26bbf628 Stabilize reverse_bits feature 2019-05-31 04:43:53 +00:00
Esteban Küber
860dce794c Remove unecessary -Z continue-parse-after-error from tests 2019-05-30 18:57:17 -07:00
Esteban Küber
ad0d3b5d40 Move code from parser to diagnostics 2019-05-30 18:19:48 -07:00
Esteban Küber
1ee45da2b9 Remove ArgSource::Recovery 2019-05-30 18:02:40 -07:00
Esteban Küber
b3ac88ad92 Recover gracefully from argument with missing type or param name 2019-05-30 17:59:05 -07:00
varkor
7e92607f5a Fix unwrapping usize issue in HasMutInterior 2019-05-31 01:19:59 +01:00
varkor
eb0afe1845 Add more information in ConstEvalFailure error 2019-05-31 01:19:59 +01:00
varkor
f2210a9971 Update LLVM 2019-05-31 00:49:06 +01:00
OptimisticPeach
fc21f33d4d
Fixed some typos. 2019-05-30 19:37:23 -04:00
Mazdak Farrokhzad
2ebfbb4fab Parse 'async unsafe fn' instead of 'unsafe async fn'. 2019-05-31 00:53:10 +02:00
varkor
c3febc0884 Make "panic did not include expected string" message consistent
Note messages are typically lowercase.
2019-05-30 21:58:33 +01:00
Janusz Marcinkiewicz
4c5eb8ecfc Explicitly suggest 'type_ascription' feature 2019-05-30 22:44:39 +02:00
bors
3ade426ede Auto merge of #61353 - alexcrichton:less-tools, r=pietroalbini
ci: Favor SCRIPT instead of RUST_CHECK_TARGET

Since #61212 we've been timing out on OSX, and this looks to be because
we're building tools like Cargo and the RLS twice instead of once. This
turns out to be a slight bug in our configuration. CI builders using the
`RUST_CHECK_TARGET` directive actually execute `make all` just before
their acual target. In `make all` we're building a stage2 cargo, and
then in `make dist` we're building a stage1 cargo.

Other builders use `SCRIPT` which provides explicit control over what
`x.py` script, for example, is used to execute the build. This moves
almost all targets to using `SCRIPT` to ensure that we're explicitly
specifying what's being built where. Additionally this updates the logic
of `RUST_CHECK_TARGET` to remove the pre-flight tidy as well as the
pre-flight `make all`. The system LLVM builder (run on PRs) now
explicitly runs tidy first and then runs the rest of the test suite.
2019-05-30 19:52:11 +00:00
Christian Vallentin
66aa18bb44
Fixed lifetime misspelling 2019-05-30 21:29:32 +02:00
Matthew Jasper
6a9e68af19 Expand dynamic drop tests for cases in #47949 2019-05-30 20:10:54 +01:00
varkor
0fdd4191ad Add regression test for const generics ICE
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-05-30 19:55:43 +01:00
Jason Shirk
6c534c316f
Merge branch 'master' into iwr_progress 2019-05-30 11:00:21 -07:00
Lzu Tao
0c35c699d4 Stabilize iter_nth_back feature 2019-05-30 18:00:17 +00:00
Guillaume Gomez
436c9bee79 Fix links in Deref documentation 2019-05-30 19:06:23 +02:00
bors
0bfbaa6e8d Auto merge of #61253 - nnethercote:avoid-hygiene_data-lookups, r=petrochenkov
Avoid `hygiene_data` lookups

These commits mostly introduce compound operations that allow two close adjacent `hygiene_data` lookups to be combined.

r? @petrochenkov
2019-05-30 16:54:13 +00:00
Alex Crichton
ebdf42e965 ci: Favor SCRIPT instead of RUST_CHECK_TARGET
Since #61212 we've been timing out on OSX, and this looks to be because
we're building tools like Cargo and the RLS twice instead of once. This
turns out to be a slight bug in our configuration. CI builders using the
`RUST_CHECK_TARGET` directive actually execute `make all` just before
their acual target. In `make all` we're building a stage2 cargo, and
then in `make dist` we're building a stage1 cargo.

Other builders use `SCRIPT` which provides explicit control over what
`x.py` script, for example, is used to execute the build. This moves
almost all targets to using `SCRIPT` to ensure that we're explicitly
specifying what's being built where. Additionally this updates the logic
of `RUST_CHECK_TARGET` to remove the pre-flight tidy as well as the
pre-flight `make all`. The system LLVM builder (run on PRs) now
explicitly runs tidy first and then runs the rest of the test suite.
2019-05-30 07:28:56 -07:00
Mateusz Mikuła
dacf19cb59 Migrate nomicon book to MdBook2 2019-05-30 14:30:59 +02:00
Mateusz Mikuła
5f929be162 Migrate rustdoc book to MdBook2 2019-05-30 14:22:33 +02:00
Ralf Jung
cf26120fbb rename did -> def_id 2019-05-30 14:10:42 +02:00
Mateusz Mikuła
3ffab36462 Migrate unstable-book to MdBook2 2019-05-30 13:59:12 +02:00
bors
aee7012fab Auto merge of #61343 - Centril:rollup-dzsuo01, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #60802 (upgrade rustdoc's `pulldown-cmark` to 0.5.2)
 - #60839 (Fix ICE with struct ctors and const generics.)
 - #60850 (Stabilize RefCell::try_borrow_unguarded)
 - #61231 (Fix linkage diagnostic so it doesn't ICE for external crates)
 - #61244 (Box::into_vec: use Box::into_raw instead of mem::forget)
 - #61279 (implicit `Option`-returning doctests)
 - #61280 (Revert "Disable solaris target since toolchain no longer builds")
 - #61284 (Update all s3 URLs used on CI with subdomains)
 - #61321 (libsyntax: introduce 'fn is_keyword_ahead(dist, keywords)'.)
 - #61322 (ci: display more debug information in the init_repo script)
 - #61333 (Fix ICE with APIT in a function with a const parameter)

Failed merges:

 - #61304 (Speed up Azure CI installing Windows dependencies)

r? @ghost
2019-05-30 11:56:32 +00:00
Ralf Jung
41c36fabef light refactoring of global AllocMap
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind.
* rename the methods that allocate stuff to have consistent names.
2019-05-30 13:05:05 +02:00
memoryruins
e18885e21f Update ui and run-pass for ellipsis_inclusive_range_patterns lint 2019-05-30 06:20:30 -04:00
Matthias Krüger
9817f19080 submodules: update clippy from fb33fad0 to d2f51228
Changes:
````
Rustup to https://github.com/rust-lang/rust/pull/61203
rustup https://github.com/rust-lang/rust/pull/60928
rustup https://github.com/rust-lang/rust/pull/61164 (which is included in https://github.com/rust-lang/rust/pull/61274)
````
2019-05-30 11:55:29 +02:00
Oliver Scherer
5b9848912a Make the type_name intrinsic's output deterministic 2019-05-30 11:19:22 +02:00
Mazdak Farrokhzad
528972a28a
Rollup merge of #61333 - varkor:apit-const-param-ice, r=estebank
Fix ICE with APIT in a function with a const parameter

Fixes https://github.com/rust-lang/rust/issues/60953.
2019-05-30 10:53:07 +02:00
Mazdak Farrokhzad
6282fae46f
Rollup merge of #61322 - pietroalbini:debug-windows-submodule-cloning, r=alexcrichton
ci: display more debug information in the init_repo script

I'm *really* confused about the error message [while cloning submodules on Windows on Azure](https://dev.azure.com/rust-lang/e71b0ddf-dd27-435a-873c-e30f86eea377/_apis/build/builds/295/logs/506):

```
/usr/bin/tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try '/usr/bin/tar --help' or '/usr/bin/tar --usage' for more information.
```

It doesn't make sense for it to execute a command without any of those flags since they're clearly added:

81970852e1/src/ci/init_repo.sh (L45)

So this adds `set -x` to the script to hopefully catch what command it's executing.

r? @alexcrichton
cc https://github.com/rust-lang/rust/issues/61301
2019-05-30 10:53:05 +02:00
Mazdak Farrokhzad
bc3f373cbb
Rollup merge of #61321 - Centril:is_keyword_ahead, r=petrochenkov
libsyntax: introduce 'fn is_keyword_ahead(dist, keywords)'.

Introduces:
```rust
    /// Returns whether any of the given keywords are `dist` tokens ahead of the current one.
    fn is_keyword_ahead(&self, dist: usize, kws: &[Symbol]) -> bool {
        self.look_ahead(dist, |t| kws.iter().any(|&kw| t.is_keyword(kw)))
    }
```

r? @oli-obk
2019-05-30 10:53:03 +02:00
Mazdak Farrokhzad
8cb5885adc
Rollup merge of #61284 - alexcrichton:less-s3, r=pietroalbini
Update all s3 URLs used on CI with subdomains

Ensure that they're all forwards-compatible with AWS updates happening
next year by ensuring the bucket name shows up in the domain name.

Closes #61168
2019-05-30 10:52:59 +02:00
Mazdak Farrokhzad
8b555299b0
Rollup merge of #61280 - bgermann:master, r=alexcrichton
Revert "Disable solaris target since toolchain no longer builds"

This reverts commit e764f475ca.
Fixes #61174.
2019-05-30 10:52:58 +02:00
Mazdak Farrokhzad
07d0b578c1
Rollup merge of #61279 - llogiq:implicit-option-main-doctests, r=GuillaumeGomez
implicit `Option`-returning doctests

This distinguishes `Option` and `Result`-returning doctests with implicit `main` method, where the former tests must end with `Some(())`.

Open question: Does this need a feature gate?

r? @GuillaumeGomez
2019-05-30 10:52:56 +02:00
Mazdak Farrokhzad
1b66a13540
Rollup merge of #61244 - RalfJung:box, r=rkruppe
Box::into_vec: use Box::into_raw instead of mem::forget

`Box::into_raw` does, in one step, turn the `Box` into a raw ptr and avoid deallocation.  Seems cleaner than separating the two.

Also, `mem::forget` gets the `Box` with a `noalias` argument, but it is not actually correct that this is an exclusive pointer. So a stricter version of Stacked Borrows would complain here. (I can't actually make Stacked Borrows that strict yet though due to other issues.)
2019-05-30 10:52:55 +02:00
Mazdak Farrokhzad
6351267c1f
Rollup merge of #61231 - pnkfelix:issue-59548-linkage-diagnostic, r=petrochenkov
Fix linkage diagnostic so it doesn't ICE for external crates

Fix linkage diagnostic so it doesn't ICE for external crates

(As a drive-by improvement, improved the diagnostic to indicate *why* `*const T` or `*mut T` is required.)

Fix #59548
Fix #61232
2019-05-30 10:52:53 +02:00
Mazdak Farrokhzad
74b359373c
Rollup merge of #60850 - SimonSapin:unguarded, r=alexcrichton
Stabilize RefCell::try_borrow_unguarded

Servo has been using this since https://github.com/servo/servo/pull/23196 to add a runtime check to some unsafe code, as discussed in PR https://github.com/rust-lang/rust/pull/59211. Stabilizing would help do more of the same in libraries that also have users on Stable.
2019-05-30 10:52:51 +02:00
Mazdak Farrokhzad
933c773b61
Rollup merge of #60839 - davidtwco:const-generics-struct-ctor, r=varkor
Fix ICE with struct ctors and const generics.

Fixes #60818.

r? @varkor
2019-05-30 10:52:49 +02:00
Mazdak Farrokhzad
040af62a5a
Rollup merge of #60802 - euclio:pulldown-cmark-panic, r=GuillaumeGomez
upgrade rustdoc's `pulldown-cmark` to 0.5.2

Fixes #60482.
2019-05-30 10:52:48 +02:00
Oliver Scherer
14178efa5d Symbol name predicate list printed + excessively 2019-05-30 10:27:34 +02:00
memoryruins
bf0da6c6ce Set ellipsis_inclusive_range_patterns lint to warn 2019-05-30 04:13:55 -04:00
bors
c28084ac16 Auto merge of #61005 - michaelwoerister:error-pgo-windows-unwind, r=zackmdavis
Emit error when trying to use PGO in conjunction with unwinding on Windows.

This PR makes `rustc` emit an error when trying use PGO in conjunction with `-Cpanic=unwind` on Windows, isn't supported by LLVM yet. The error messages points to https://github.com/rust-lang/rust/issues/61002, which documents this known limitation.
2019-05-30 03:37:37 +00:00
bors
19e0ddbb9f Auto merge of #61212 - alexcrichton:skip-rustc, r=pietroalbini
ci: Attempt to skip a full rustc compile on dist*

Currently when we're preparing cross-compiled compilers it can take
quite some time because we have to build the compiler itself three
different times. The first is the normal bootstrap, the second is a
second build for the build platform, and the third is the actual target
architecture compiler. The second compiler was historically built
exclusively for procedural macros, and long ago we didn't actually need
it.

This commit tries out avoiding that second compiled compiler, meaning we
only compile rustc for the build platform only once. Some local testing
shows that this is promising, but bors is of course the ultimate test!
2019-05-30 00:38:51 +00:00
varkor
998ef688a3 Add a regression test for const parameters with impl Trait 2019-05-30 00:21:04 +01:00
varkor
eafa3a888f Sort in-band generic parameter definitions from APIT 2019-05-30 00:20:52 +01:00
Nicholas Nethercote
95ea7fd735 Add HygieneData::{outer,expn_info,is_descendant_of} methods.
This commit factors out some repeated code.
2019-05-30 08:59:22 +10:00
Nicholas Nethercote
2232321ac7 Optimize TyCtxt::adjust_ident.
It's a hot function that returns a 2-tuple, but the hottest call site
(`hygienic_eq`) discards the second element.

This commit renames `adjust_ident` as `adjust_ident_and_get_scope`, and
then introduces a new `adjust_ident` that only computes the first
element. This change also avoids the need to pass in an unused
`DUMMY_HIR_ID` argument in a couple of places, which is nice.
2019-05-30 08:38:15 +10:00