]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #63202 - exphp-forks:parser-ice-63135, r=estebank
Mazdak Farrokhzad [Fri, 2 Aug 2019 10:14:21 +0000 (12:14 +0200)]
Rollup merge of #63202 - exphp-forks:parser-ice-63135, r=estebank

Fix ICE in #63135

Closes #63135.

r?@estebank

4 years agoRollup merge of #63198 - rbartlensky:fix-macro-trailing-comma, r=petrochenkov
Mazdak Farrokhzad [Fri, 2 Aug 2019 10:14:20 +0000 (12:14 +0200)]
Rollup merge of #63198 - rbartlensky:fix-macro-trailing-comma, r=petrochenkov

Allow trailing comma in macro 2.0 declarations.

This should hopefully close #63102.

4 years agoRollup merge of #63189 - waywardmonkeys:doc-improvements, r=Centril
Mazdak Farrokhzad [Fri, 2 Aug 2019 10:14:18 +0000 (12:14 +0200)]
Rollup merge of #63189 - waywardmonkeys:doc-improvements, r=Centril

Doc improvements

Miscellaneous documentation fixes.

4 years agoRollup merge of #63153 - varkor:remove-resolve_const_var, r=cramertj
Mazdak Farrokhzad [Fri, 2 Aug 2019 10:14:17 +0000 (12:14 +0200)]
Rollup merge of #63153 - varkor:remove-resolve_const_var, r=cramertj

Remove redundant method with const variable resolution

I've also removed a `bug!()` in const value relation code and replaced it with a `FIXME`. Now `ConstValue::Slice` and `ConstValue::ByRef` will simply fail to unify rather than ICEing, which seems more user-friendly for testers.

4 years agoRollup merge of #62969 - saleemjaffer:declutter_interperror, r=RalfJung
Mazdak Farrokhzad [Fri, 2 Aug 2019 10:14:15 +0000 (12:14 +0200)]
Rollup merge of #62969 - saleemjaffer:declutter_interperror, r=RalfJung

Changing the structure of `mir::interpret::InterpError`

Implements [this](https://github.com/rust-rfcs/const-eval/issues/4#issuecomment-514559965)

4 years agoRollup merge of #62663 - llogiq:more-questionmark-docs, r=GuillaumeGomez
Mazdak Farrokhzad [Fri, 2 Aug 2019 10:14:14 +0000 (12:14 +0200)]
Rollup merge of #62663 - llogiq:more-questionmark-docs, r=GuillaumeGomez

More questionmarks in doctests

This removes the other `unwrap`s in the macro doctests, replacing them with `?`. For now, we need to specify the main function including the return type, we can get rid of that once the return type suggestion for `fn main() { .. }` works correctly.

r? @QuietMisdreavus

4 years agoAdd check-pass test for #63102.
Robert Bartlensky [Thu, 1 Aug 2019 21:41:10 +0000 (22:41 +0100)]
Add check-pass test for #63102.

4 years agoFix ICE in #63135
Michael Lamparski [Thu, 1 Aug 2019 21:31:12 +0000 (17:31 -0400)]
Fix ICE in #63135

4 years agoAllow trailing comma in macro 2.0 declarations.
Robert Bartlensky [Thu, 1 Aug 2019 20:07:47 +0000 (21:07 +0100)]
Allow trailing comma in macro 2.0 declarations.

4 years agoFutures: Add link to Waker in trait doc.
Bruce Mitchener [Thu, 1 Aug 2019 18:39:25 +0000 (01:39 +0700)]
Futures: Add link to Waker in trait doc.

4 years agoRemove extraneous {} in use stmts in doc comments.
Bruce Mitchener [Thu, 1 Aug 2019 08:13:53 +0000 (15:13 +0700)]
Remove extraneous {} in use stmts in doc comments.

4 years agoFix typos in doc comments.
Bruce Mitchener [Thu, 1 Aug 2019 08:13:31 +0000 (15:13 +0700)]
Fix typos in doc comments.

4 years agoMore questionmarks in doctests
Andre Bogus [Sat, 13 Jul 2019 17:27:22 +0000 (19:27 +0200)]
More questionmarks in doctests

4 years agoAuto merge of #63194 - pietroalbini:rollup-xgnvb1b, r=pietroalbini
bors [Thu, 1 Aug 2019 14:43:00 +0000 (14:43 +0000)]
Auto merge of #63194 - pietroalbini:rollup-xgnvb1b, r=pietroalbini

Rollup of 8 pull requests

Successful merges:

 - #62644 (simplify std::io::Write::write rustdoc)
 - #62971 (Add keywords item into the sidebar)
 - #63122 (Account for `maybe_whole_expr` in range patterns)
 - #63158 (Add test for issue-58951)
 - #63170 (cleanup StringReader fields)
 - #63179 (update test cases for vxWorks)
 - #63188 (Fix typos in release notes.)
 - #63191 (ci: fix toolstate not pushing data for Linux)

Failed merges:

r? @ghost

4 years agoRollup merge of #63191 - pietroalbini:really-fix-toolstate, r=alexcrichton
Pietro Albini [Thu, 1 Aug 2019 14:00:34 +0000 (16:00 +0200)]
Rollup merge of #63191 - pietroalbini:really-fix-toolstate, r=alexcrichton

ci: fix toolstate not pushing data for Linux

A recent commit modified toolstate to only push updated data when the `TOOLSTATE_PUBLISH` environment variable is present. This worked fine on Windows but failed on Linux, since Linux jobs run inside Docker containers and the variable wasn't forwarded inside it.

This changes the Docker startup code to set the `TOOLSTATE_PUBLISH` enviornment variable inside the container if it's present outside.

r? @alexcrichton
fixes https://github.com/rust-lang/rust/issues/63190

4 years agoRollup merge of #63188 - waywardmonkeys:release-note-typo-fixes, r=Centril
Pietro Albini [Thu, 1 Aug 2019 14:00:32 +0000 (16:00 +0200)]
Rollup merge of #63188 - waywardmonkeys:release-note-typo-fixes, r=Centril

Fix typos in release notes.

4 years agoRollup merge of #63179 - BaoshanPang:testcases, r=alexcrichton
Pietro Albini [Thu, 1 Aug 2019 14:00:31 +0000 (16:00 +0200)]
Rollup merge of #63179 - BaoshanPang:testcases, r=alexcrichton

update test cases for vxWorks

issue-2214.rs: lgamma is lgamma on vxWorks
ignore process-envs.rs and process-remove-from-env.rs as there is no 'env' on vxWorks

4 years agoRollup merge of #63170 - matklad:cleanup-fields, r=petrochenkov
Pietro Albini [Thu, 1 Aug 2019 14:00:29 +0000 (16:00 +0200)]
Rollup merge of #63170 - matklad:cleanup-fields, r=petrochenkov

cleanup StringReader fields

reduce visibility and replace `Lrc<SourceFile>` with `start_pos`: the single bit we actually *need* from the file.

r? @petrochenkov

4 years agoRollup merge of #63158 - JohnTitor:add-test-for-58951, r=Centril
Pietro Albini [Thu, 1 Aug 2019 14:00:28 +0000 (16:00 +0200)]
Rollup merge of #63158 - JohnTitor:add-test-for-58951, r=Centril

Add test for issue-58951

Closes #58951

r? @Centril

4 years agoRollup merge of #63122 - Centril:fix-63115, r=petrochenkov
Pietro Albini [Thu, 1 Aug 2019 14:00:26 +0000 (16:00 +0200)]
Rollup merge of #63122 - Centril:fix-63115, r=petrochenkov

Account for `maybe_whole_expr` in range patterns

Fixes https://github.com/rust-lang/rust/issues/63115 (fallout from https://github.com/rust-lang/rust/pull/62550).

r? @petrochenkov

4 years agoRollup merge of #62971 - GuillaumeGomez:keyword-sidebar, r=nobody
Pietro Albini [Thu, 1 Aug 2019 14:00:25 +0000 (16:00 +0200)]
Rollup merge of #62971 - GuillaumeGomez:keyword-sidebar, r=nobody

Add keywords item into the sidebar

Fixes #62939.

cc @pravic

screenshot of the result:

![Screenshot from 2019-07-25 14-29-48](https://user-images.githubusercontent.com/3050060/61874545-f9512080-aee8-11e9-8e8b-aa50216aec94.png)

r? @QuietMisdreavus

4 years agoRollup merge of #62644 - arnottcr:std_io-doc, r=steveklabnik
Pietro Albini [Thu, 1 Aug 2019 14:00:22 +0000 (16:00 +0200)]
Rollup merge of #62644 - arnottcr:std_io-doc, r=steveklabnik

simplify std::io::Write::write rustdoc

The std::io::Write::write method currensly suggests consumers guaranteed
that `0 <= n <= buf.len()`, for `Ok(n)`, however `n` is of type `usize`
causing the compiler to emit a warning:
```
warning: comparison is useless due to type limits
 --> lib.rs:6:18
  |
6 |         Ok(n) => 0 <= n && n <= output.len(),
  |                  ^^^^^^
  |
  = note: #[warn(unused_comparisons)] on by default
```

This PR removes the suggestion to check `0 <= n` since it is moot.

r? @steveklabnik

4 years agoci: forward the TOOLSTATE_PUBLISH environment variable inside docker
Pietro Albini [Thu, 1 Aug 2019 09:34:53 +0000 (11:34 +0200)]
ci: forward the TOOLSTATE_PUBLISH environment variable inside docker

A recent commit modified toolstate to only push updated data when the
TOOLSTATE_PUBLISH environment variable is present. This worked fine on
Windows but failed on Linux, since Linux jobs run inside Docker
containers and the variable wasn't forwarded inside it.

This changes the Docker startup code to set the TOOLSTATE_PUBLISH
enviornment variable inside the container if it's present outside.

4 years agoFixedSizeArray: Add missing links in doc comments.
Bruce Mitchener [Thu, 1 Aug 2019 08:07:40 +0000 (15:07 +0700)]
FixedSizeArray: Add missing links in doc comments.

4 years agoAuto merge of #62507 - petrochenkov:macunstab, r=alexcrichton
bors [Thu, 1 Aug 2019 11:07:26 +0000 (11:07 +0000)]
Auto merge of #62507 - petrochenkov:macunstab, r=alexcrichton

Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`

`Encodable` and `Decodable` were deprecated before 1.0 and emitted an unsuppressable warning all this time.
`#[bench]` is a part of the custom test framework feature and cannot be used meaningfully on stable, only as `cfg(false)`.

Crater results can be found in https://github.com/rust-lang/rust/pull/62507#issuecomment-513850732 and below.

This PR also reroutes the tracking issue for `feature(test)` from #27812 (compiler internals) to #50297 (custom test frameworks).

Closes https://github.com/rust-lang/rust/issues/62048

4 years agoAuto merge of #63181 - ehuss:update-cargo-rls, r=alexcrichton
bors [Thu, 1 Aug 2019 07:29:11 +0000 (07:29 +0000)]
Auto merge of #63181 - ehuss:update-cargo-rls, r=alexcrichton

Update cargo, rls

## cargo

12 commits in d0f828419d6ce6be21a90866964f58eb2c07cd56..26092da337b948719549cd5ed3d1051fd847afd7
2019-07-23 21:58:59 +0000 to 2019-07-31 23:24:32 +0000
- tests: Enable features to fix unstabilized `#[bench]` (rust-lang/cargo#7198)
- Fix excluding target dirs from backups on OSX (rust-lang/cargo#7192)
- Handle symlinks to directories (rust-lang/cargo#6817)
- Enable pipelined compilation by default (rust-lang/cargo#7143)
- Refactor resolve `Method` (rust-lang/cargo#7186)
- Update `cargo_compile` module doc. (rust-lang/cargo#7187)
- Clean up TargetInfo (rust-lang/cargo#7185)
- Fix some issues with absolute paths in dep-info files. (rust-lang/cargo#7137)
- Update the `url` crate to 2.0 (rust-lang/cargo#7175)
- Tighten requirements for git2 crates (rust-lang/cargo#7176)
- Fix a deadlocking test with master libgit2 (rust-lang/cargo#7179)
- Fix detection of cyclic dependencies through `[patch]` (rust-lang/cargo#7174)

## rls

1 commits in 70347b5d4dfe78eeb9e6f6db85f773c8d43cd22b..93d9538c6000fcf6c8da763ef4ce7a8d407b7d24
2019-07-30 12:56:38 +0200 to 2019-07-31 21:42:49 +0200
- Update cargo (rust-lang-nursery/rls#1529)

4 years agocode review fixes
Saleem Jaffer [Thu, 1 Aug 2019 06:43:49 +0000 (12:13 +0530)]
code review fixes

4 years agoFix typos in release notes.
Bruce Mitchener [Thu, 1 Aug 2019 05:38:37 +0000 (12:38 +0700)]
Fix typos in release notes.

4 years agocode review fixes
Saleem Jaffer [Thu, 1 Aug 2019 04:19:01 +0000 (09:49 +0530)]
code review fixes

4 years agoissue-2214.rs: lgamma is lgamma on vxWorks
Baoshan Pang [Thu, 1 Aug 2019 00:09:07 +0000 (17:09 -0700)]
issue-2214.rs: lgamma is lgamma on vxWorks

ignore process-envs.rs and process-remove-from-env.rs as there is no 'env' on vxWorks

4 years agoChange to check-pass
Yuki Okushi [Thu, 1 Aug 2019 02:17:01 +0000 (11:17 +0900)]
Change to check-pass

4 years agoUpdate cargo, rls
Eric Huss [Thu, 1 Aug 2019 00:44:39 +0000 (17:44 -0700)]
Update cargo, rls

4 years agoAddress review comments.
Mazdak Farrokhzad [Wed, 31 Jul 2019 19:25:11 +0000 (21:25 +0200)]
Address review comments.

4 years agoAuto merge of #62897 - alexcrichton:fix-i686-msvc-tests, r=pietroalbini
bors [Wed, 31 Jul 2019 19:05:13 +0000 (19:05 +0000)]
Auto merge of #62897 - alexcrichton:fix-i686-msvc-tests, r=pietroalbini

Attempt to fix backtrace tests on i686-msvc

Some fixes for i686-msvc and Windows have landed on the `backtrace`
crate but hadn't made their way here yet. Let's update that and see if
it passes CI.

4 years agoDrive-by fix: Update two tests failing in `--pass check` mode
Vadim Petrochenkov [Wed, 31 Jul 2019 18:12:10 +0000 (21:12 +0300)]
Drive-by fix: Update two tests failing in `--pass check` mode

4 years agoRemove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`
Vadim Petrochenkov [Sat, 27 Jul 2019 12:06:49 +0000 (15:06 +0300)]
Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`

4 years agoAttempt to fix backtrace tests on i686-msvc
Alex Crichton [Tue, 23 Jul 2019 14:16:59 +0000 (07:16 -0700)]
Attempt to fix backtrace tests on i686-msvc

Some fixes for i686-msvc and Windows have landed on the `backtrace`
crate but hadn't made their way here yet. Let's update that and see if
it passes CI.

4 years agocleanup StringReader fields
Aleksey Kladov [Wed, 31 Jul 2019 16:55:01 +0000 (19:55 +0300)]
cleanup StringReader fields

4 years agoAuto merge of #63141 - JohnTitor:update-miri, r=RalfJung
bors [Wed, 31 Jul 2019 15:20:15 +0000 (15:20 +0000)]
Auto merge of #63141 - JohnTitor:update-miri, r=RalfJung

Update miri

Fixes #63024

r? @RalfJung

4 years agocode review fixes
Saleem Jaffer [Wed, 31 Jul 2019 12:44:49 +0000 (18:14 +0530)]
code review fixes

4 years agoAdd test for issue-58951
Yuki Okushi [Wed, 31 Jul 2019 11:48:20 +0000 (20:48 +0900)]
Add test for issue-58951

4 years agocode review fixes
Saleem Jaffer [Wed, 31 Jul 2019 11:08:39 +0000 (16:38 +0530)]
code review fixes

4 years agoUpdate miri
Yuki Okushi [Tue, 30 Jul 2019 15:56:04 +0000 (00:56 +0900)]
Update miri

4 years agoAuto merge of #62813 - alexcrichton:less-dylib, r=Mark-Simulacrum
bors [Wed, 31 Jul 2019 07:29:59 +0000 (07:29 +0000)]
Auto merge of #62813 - alexcrichton:less-dylib, r=Mark-Simulacrum

rustc: Compile the `fmt_macros` crate as an rlib

I think this was left out by accident from the "convert everything to
rlibs" commit, there's no need for this to be a dylib just as everything
else doesn't need to be a dylib!

4 years agocode review fixes
Saleem Jaffer [Wed, 31 Jul 2019 07:18:54 +0000 (12:48 +0530)]
code review fixes

4 years agoRemove redundant method with const variable resolution
varkor [Wed, 31 Jul 2019 00:51:20 +0000 (01:51 +0100)]
Remove redundant method with const variable resolution

4 years agoAuto merge of #63144 - matthiaskrgr:submodule_upd, r=Manishearth
bors [Wed, 31 Jul 2019 00:36:38 +0000 (00:36 +0000)]
Auto merge of #63144 - matthiaskrgr:submodule_upd, r=Manishearth

submodules: update clippy from dc69a5c0 to c3e91365

Changes:
````
Fix breakage due to rust-lang/rust#61856
Fix dogfood test
Hash discriminant of lifetime.name
Hash discriminant of Lifetime::Name
Updated tests.
Respond to review comments
Updated test stderr
Added doc comment fixed type printout
Respond to comments and improve printout
Responded to comments and fixed compile bug
Fixed more compile errors
Fix some of the compile errors
Changed Ty to ty, added lifetime 'tcx
Lint for type repetition in trait bounds.
````
r? @Manishearth

4 years agoAuto merge of #63148 - Centril:rollup-t813bxw, r=Centril
bors [Tue, 30 Jul 2019 20:48:49 +0000 (20:48 +0000)]
Auto merge of #63148 - Centril:rollup-t813bxw, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #62293 (Unsupport the `await!(future)` macro)
 - #62469 (Add doc links to liballoc crate page)
 - #63095 (Turn `INCOMPLETE_FEATURES` into lint)
 - #63117 (Use global variable 'environ' to pass environments to rtpSpawn)
 - #63123 (`const fn`-ify `std::any::type_name` as laid out in #63084)
 - #63129 (Subslice patterns: Test passing static & dynamic semantics.)
 - #63147 (Updated RELEASES.md for 1.37.0)

Failed merges:

r? @ghost

4 years agoRollup merge of #63147 - Mark-Simulacrum:XAMPPRocky-master, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:40 +0000 (22:43 +0200)]
Rollup merge of #63147 - Mark-Simulacrum:XAMPPRocky-master, r=Mark-Simulacrum

Updated RELEASES.md for 1.37.0

Squashed https://github.com/rust-lang/rust/pull/62653.

4 years agoRollup merge of #63129 - Centril:subslice-pat-statdyn, r=oli-obk
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:39 +0000 (22:43 +0200)]
Rollup merge of #63129 - Centril:subslice-pat-statdyn, r=oli-obk

Subslice patterns: Test passing static & dynamic semantics.

Working towards testing coverage for https://github.com/rust-lang/rust/issues/62254.
See https://github.com/rust-lang/rfcs/blob/master/text/2359-subslice-pattern-syntax.md for the RFC.

r? @oli-obk cc @petrochenkov

4 years agoRollup merge of #63123 - TankhouseAle:const-fn-type-name-any, r=oli-obk
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:37 +0000 (22:43 +0200)]
Rollup merge of #63123 - TankhouseAle:const-fn-type-name-any, r=oli-obk

`const fn`-ify `std::any::type_name` as laid out in #63084

A test, based on the one I added when I implemented support for the underlying `core::intrinsics::type_name` being allowed in `const fn` contexts, is included.

4 years agoRollup merge of #63117 - BaoshanPang:bugfix, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:36 +0000 (22:43 +0200)]
Rollup merge of #63117 - BaoshanPang:bugfix, r=alexcrichton

Use global variable 'environ' to pass environments to rtpSpawn

r? @alexcrichton

4 years agoRollup merge of #63095 - Centril:incomplete-features-lint, r=varkor
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:34 +0000 (22:43 +0200)]
Rollup merge of #63095 - Centril:incomplete-features-lint, r=varkor

Turn `INCOMPLETE_FEATURES` into lint

We do this because it is annoying to see the warning when building rustc and because this is better from a "separation of concerns" POV.

The drawback to this change is that this will respect `--cap-lints`.
Also note that this is not a buffered lint so if there are fatal parser errors then the lint will not trigger.

r? @varkor

4 years agoRollup merge of #62469 - czipperz:liballoc-add-doc-links, r=GuillaumeGomez
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:33 +0000 (22:43 +0200)]
Rollup merge of #62469 - czipperz:liballoc-add-doc-links, r=GuillaumeGomez

Add doc links to liballoc crate page

4 years agoRollup merge of #62293 - Centril:remove-await-macro, r=cramertj
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:31 +0000 (22:43 +0200)]
Rollup merge of #62293 - Centril:remove-await-macro, r=cramertj

Unsupport the `await!(future)` macro

Unsupport the `await!(future)` "macro" and recognize it in error recovery instead.

The `future.await` syntax has been on nightly since 2019-05-08.
This was 55 days ago which is 1.31 releases ago.

Closes https://github.com/rust-lang/rust/issues/60610.

r? @cramertj

4 years agoUpdated RELEASES.md for 1.37.0
Erin Power [Sat, 13 Jul 2019 12:15:01 +0000 (14:15 +0200)]
Updated RELEASES.md for 1.37.0

4 years agoAuto merge of #62805 - Xanewok:update-rls, r=Xanewok
bors [Tue, 30 Jul 2019 16:59:09 +0000 (16:59 +0000)]
Auto merge of #62805 - Xanewok:update-rls, r=Xanewok

Update RLS and Rustfmt

Supersedes https://github.com/rust-lang/rust/pull/62537.
Closes #62803.

Fixes fallout after https://github.com/rust-lang/rust/pull/62679.

r? @ghost

4 years agoEnable nightly feature for crossbeam-utils dep
Igor Matuszewski [Tue, 30 Jul 2019 16:10:52 +0000 (18:10 +0200)]
Enable nightly feature for crossbeam-utils dep

Last two commits bumped rustc-ap-* crates which also transitively
updated rustc_data_structures. That crate enables the "nightly"
whereas Cargo's dep does not hence why we need to unify the features
to deduplicate the artifacts.

4 years agosubmodules: update clippy from dc69a5c0 to c3e91365
Matthias Krüger [Tue, 30 Jul 2019 15:11:30 +0000 (17:11 +0200)]
submodules: update clippy from dc69a5c0 to c3e91365

Changes:
````
Fix breakage due to rust-lang/rust#61856
Fix dogfood test
Hash discriminant of lifetime.name
Hash discriminant of Lifetime::Name
Updated tests.
Respond to review comments
Updated test stderr
Added doc comment fixed type printout
Respond to comments and improve printout
Responded to comments and fixed compile bug
Fixed more compile errors
Fix some of the compile errors
Changed Ty to ty, added lifetime 'tcx
Lint for type repetition in trait bounds.
````

4 years agothrow_X macros use err_X macros
Saleem Jaffer [Tue, 30 Jul 2019 15:06:17 +0000 (20:36 +0530)]
throw_X macros use err_X macros

4 years agorenaming throw_err_* to throw_*
Saleem Jaffer [Tue, 30 Jul 2019 14:48:50 +0000 (20:18 +0530)]
renaming throw_err_* to throw_*

4 years agoUpdate Rustfmt
Igor Matuszewski [Tue, 30 Jul 2019 11:01:32 +0000 (13:01 +0200)]
Update Rustfmt

4 years agoUpdate RLS
Igor Matuszewski [Tue, 30 Jul 2019 11:00:27 +0000 (13:00 +0200)]
Update RLS

4 years agorenaming err to err_unsup
Saleem Jaffer [Tue, 30 Jul 2019 10:38:32 +0000 (16:08 +0530)]
renaming err to err_unsup

4 years agotidy fixes
Saleem Jaffer [Tue, 30 Jul 2019 10:16:02 +0000 (15:46 +0530)]
tidy fixes

4 years agoadding throw_ and err_ macros for InterpError
Saleem Jaffer [Tue, 30 Jul 2019 09:55:12 +0000 (15:25 +0530)]
adding throw_ and err_ macros for InterpError

4 years agoPacify tidy, the merciless.
Mazdak Farrokhzad [Wed, 24 Jul 2019 02:05:20 +0000 (04:05 +0200)]
Pacify tidy, the merciless.

4 years agoUpdate error_codes re. await_macro removal.
Mazdak Farrokhzad [Sat, 6 Jul 2019 05:45:09 +0000 (07:45 +0200)]
Update error_codes re. await_macro removal.

4 years agoAdjust tests. wrt. await_macro being removed.
Mazdak Farrokhzad [Tue, 2 Jul 2019 04:46:35 +0000 (06:46 +0200)]
Adjust tests. wrt. await_macro being removed.

4 years agoUnsupport the await!(..) macro.
Mazdak Farrokhzad [Tue, 2 Jul 2019 04:30:21 +0000 (06:30 +0200)]
Unsupport the await!(..) macro.

4 years agoSubslice patterns: Test passing static & dynamic semantics.
Mazdak Farrokhzad [Tue, 30 Jul 2019 08:05:14 +0000 (10:05 +0200)]
Subslice patterns: Test passing static & dynamic semantics.

4 years ago--bless tests due to INCOMPLETE_FEATURES being a lint.
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:01:57 +0000 (02:01 +0200)]
--bless tests due to INCOMPLETE_FEATURES being a lint.

4 years agoAuto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, r=oli-obk
bors [Tue, 30 Jul 2019 08:39:29 +0000 (08:39 +0000)]
Auto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, r=oli-obk

rustc: Stabilize options for pipelined compilation

This commit stabilizes options in the compiler necessary for Cargo to
enable "pipelined compilation" by default. The concept of pipelined
compilation, how it's implemented, and what it means for rustc are
documented in #60988. This PR is coupled with a PR against Cargo
(rust-lang/cargo#7143) which updates Cargo's support for pipelined
compliation to rustc, and also enables support by default in Cargo.
(note that the Cargo PR cannot land until this one against rustc lands).

The technical changes performed here were to stabilize the functionality
proposed in #60419 and #60987, the underlying pieces to enable pipelined
compilation support in Cargo. The issues have had some discussion during
stabilization, but the newly stabilized surface area here is:

* A new `--json` flag was added to the compiler.
* The `--json` flag can be passed multiple times.
* The value of the `--json` flag is a comma-separated list of
  directives.
* The `--json` flag cannot be combined with `--color`
* The `--json` flag must be combined with `--error-format=json`
* The acceptable list of directives to `--json` are:
  * `diagnostic-short` - the `rendered` field of diagnostics will have a
    "short" rendering matching `--error-format=short`
  * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics
    will be colorized with ansi color codes embedded in the string field
  * `artifacts` - JSON blobs will be emitted for artifacts being emitted
    by the compiler

The unstable `-Z emit-artifact-notifications` and `--json-rendered`
flags have also been removed during this commit as well.

Closes #60419
Closes #60987
Closes #60988

4 years agoAllow 'incomplete_features' in libcore/alloc.
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:01:38 +0000 (02:01 +0200)]
Allow 'incomplete_features' in libcore/alloc.

4 years agoTurn INCOMPLETE_FEATURES into a lint.
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:00:53 +0000 (02:00 +0200)]
Turn INCOMPLETE_FEATURES into a lint.

4 years agoaddding an interp_error module
Saleem Jaffer [Tue, 30 Jul 2019 07:48:36 +0000 (13:18 +0530)]
addding an interp_error module

4 years agocode review fixes
Saleem Jaffer [Tue, 30 Jul 2019 07:02:43 +0000 (12:32 +0530)]
code review fixes

4 years agoAuto merge of #63124 - Centril:rollup-onohtqt, r=Centril
bors [Tue, 30 Jul 2019 03:38:54 +0000 (03:38 +0000)]
Auto merge of #63124 - Centril:rollup-onohtqt, r=Centril

Rollup of 12 pull requests

Successful merges:

 - #61965 (Remove mentions of removed `offset_to` method from `align_offset` docs)
 - #62928 (Syntax: Recover on `for ( $pat in $expr ) $block`)
 - #63000 (Impl Debug for Chars)
 - #63083 (Make generic parameters always use modern hygiene)
 - #63087 (Add very simple edition check to tidy.)
 - #63093 (Properly check the defining scope of existential types)
 - #63096 (Add tests for some `existential_type` ICEs)
 - #63099 (vxworks: Remove Linux-specific comments.)
 - #63106 (ci: Skip installing SWIG/xz on OSX )
 - #63108 (Add links to None in Option doc)
 - #63109 (std: Fix a failing `fs` test on Windows)
 - #63111 (Add syntactic and semantic tests for rest patterns, i.e. `..`)

Failed merges:

r? @ghost

4 years agoRollup merge of #63111 - Centril:rest-pat-tests, r=estebank
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:46 +0000 (05:37 +0200)]
Rollup merge of #63111 - Centril:rest-pat-tests, r=estebank

Add syntactic and semantic tests for rest patterns, i.e. `..`

As per my first note in https://github.com/rust-lang/rust/issues/62254#issuecomment-515784884 this adds syntactic and semantic tests for `..` ("rest") patterns which were implemented in https://github.com/rust-lang/rust/pull/62550.

r? @estebank

4 years agoRollup merge of #63109 - alexcrichton:disable-windows-fs-test, r=sfackler
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:44 +0000 (05:37 +0200)]
Rollup merge of #63109 - alexcrichton:disable-windows-fs-test, r=sfackler

std: Fix a failing `fs` test on Windows

In testing 4-core machines on Azure the `realpath_works_tricky` test in
the standard library is failing with "The directory name is invalid". In
attempting to debug this test I was able to reproduce the failure
locally on my machine, and after inspecing the test it I believe is
exploiting Unix-specific behavior that seems to only sometimes work on
Windows. Specifically the test basically executes:

    mkdir -p a/b
    mkdir -p a/d
    touch a/f
    ln -s a/b/c ../d/e
    ln -s a/d/e ../f

and then asserts that `canonicalize("a/b/c")` and
`canonicalize("a/d/e")` are equivalent to `a/f`. On Windows however the
first symlink is a "directory symlink" and the second is a file symlink.
In both cases, though, they're pointing to files. This means that for
whatever reason locally and on the 4-core environment the call to
`canonicalize` is failing. On Azure today it seems to be passing, and
I'm not entirely sure why. I'm sort of presuming that there's some sort
of internals going on here where there's some global Windows setting
which makes symlinks behavior more unix-like and ignore the directory
hint.

In any case this should keep the test working and also fixes the test
locally for me. It's also worth pointing out that this test was made Windows compatible in https://github.com/rust-lang/rust/pull/31360, a pretty ancient PR at this point.

4 years agoRollup merge of #63108 - lzutao:option-xor-typo, r=jonas-schievink
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:43 +0000 (05:37 +0200)]
Rollup merge of #63108 - lzutao:option-xor-typo, r=jonas-schievink

Add links to None in Option doc

r? @jonas-schievink

4 years agoRollup merge of #63106 - alexcrichton:remove-swig-osx, r=pietroalbini
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:41 +0000 (05:37 +0200)]
Rollup merge of #63106 - alexcrichton:remove-swig-osx, r=pietroalbini

ci: Skip installing SWIG/xz on OSX

I'm relatively certain that SWIG was only needed for LLDB which is no
longer built, and I'm hoping we can remove the xz install to remove the
reliance on `brew` for our build (which is another point of failure for
flaky networks).

4 years agoRollup merge of #63099 - josephlr:vxworks, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:40 +0000 (05:37 +0200)]
Rollup merge of #63099 - josephlr:vxworks, r=alexcrichton

vxworks: Remove Linux-specific comments.

It looks like the VxWorks fork inadvertently left in some Linux-specific workaround comments in `libstd`, these can be removed. Came up when looking into #62516

CC: @BaoshanPang
4 years agoRollup merge of #63096 - Centril:existential-type-add-tests, r=varkor
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:39 +0000 (05:37 +0200)]
Rollup merge of #63096 - Centril:existential-type-add-tests, r=varkor

Add tests for some `existential_type` ICEs

Fix #53678
Fix #60407
Fix #60564

https://github.com/rust-lang/rust/issues/54899 will need some minimization before it can be added.

r? @varkor

4 years agoRollup merge of #63093 - Aaron1011:fix/existential-closure, r=cramertj
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:37 +0000 (05:37 +0200)]
Rollup merge of #63093 - Aaron1011:fix/existential-closure, r=cramertj

Properly check the defining scope of existential types

Fixes #52632

Existential types (soon to be 'impl trait' aliases) can either be
delcared at a top-level crate/module scope, or within another item such
as an fn. Previously, we were handling the second case incorrectly when
recursively searching for defining usages - we would check children of
the item, but not the item itself. This lead to us missing closures
that consituted a defining use of the existential type, as their opaque
type instantiations are stored in the TypeckTables of their parent
function.

This commit ensures that we explicitly visit the defining item itself,
not just its children.

4 years agoRollup merge of #63087 - crlf0710:tidy_2018, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:36 +0000 (05:37 +0200)]
Rollup merge of #63087 - crlf0710:tidy_2018, r=Mark-Simulacrum

Add very simple edition check to tidy.

Fixes #58099.

4 years agoRollup merge of #63083 - matthewjasper:parameter-hygiene, r=petrochenkov
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:34 +0000 (05:37 +0200)]
Rollup merge of #63083 - matthewjasper:parameter-hygiene, r=petrochenkov

Make generic parameters always use modern hygiene

* E0263 (lifetime parameter declared twice in the same scope) now compares modernized identifiers.
* Const parameters are now resolved with modern hygiene.

Closes #58307
Closes #60746
Closes #61574
Closes #62433

4 years agoRollup merge of #63000 - max-sixty:chars-display, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:33 +0000 (05:37 +0200)]
Rollup merge of #63000 - max-sixty:chars-display, r=alexcrichton

Impl Debug for Chars

Closes https://github.com/rust-lang/rust/issues/62947, making `Debug` more consistent with the struct's output and purpose

Let me know any feedback!

4 years agoRollup merge of #62928 - Centril:recover-parens-around-for-head, r=estebank
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:32 +0000 (05:37 +0200)]
Rollup merge of #62928 - Centril:recover-parens-around-for-head, r=estebank

Syntax: Recover on `for ( $pat in $expr ) $block`

Fixes #62724 by adding some recovery:

```
error: unexpected closing `)`
  --> $DIR/recover-for-loop-parens-around-head.rs:10:23
   |
LL |     for ( elem in vec ) {
   |         --------------^
   |         |
   |         opening `(`
   |         help: remove parenthesis in `for` loop: `elem in vec`
```

The last 2 commits are drive-by cleanups.

r? @estebank

4 years agoRollup merge of #61965 - phil-opp:patch-4, r=scottmcm
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:30 +0000 (05:37 +0200)]
Rollup merge of #61965 - phil-opp:patch-4, r=scottmcm

Remove mentions of removed `offset_to` method from `align_offset` docs

The `offset_to` method was deleted in https://github.com/rust-lang/rust/pull/52814.

The replacement for the removed method is `wrapping_offset_from`. However, neither method takes an `usize` as argument, so I don't think that it makes sense to mention them.

4 years agoAdd the necessary changes to any.rs
TankhouseAle [Tue, 30 Jul 2019 03:02:29 +0000 (23:02 -0400)]
Add the necessary changes to any.rs

Specifically the `#[rustc_const_unstable(feature = "const_type_name")]` attribute, as well as marking the actual function as `const`.

4 years agoAdd a test for std::any::type_name() as a const fn
TankhouseAle [Tue, 30 Jul 2019 02:57:21 +0000 (22:57 -0400)]
Add a test for std::any::type_name() as a const fn

This is a modified version of the test I added previously. The difference is this version implements a wrapper around std::any::type_name versus core::intrinsics::type_name, in order to show that it works as desired / intended.

4 years agoAccount for maybe_whole_expr in range patterns.
Mazdak Farrokhzad [Tue, 30 Jul 2019 02:22:09 +0000 (04:22 +0200)]
Account for maybe_whole_expr in range patterns.

4 years agoAdd semantic test for rest patterns.
Mazdak Farrokhzad [Mon, 29 Jul 2019 19:04:32 +0000 (21:04 +0200)]
Add semantic test for rest patterns.

4 years agoAdd another test for const parameter (non) hygiene.
Matthew Jasper [Mon, 29 Jul 2019 19:04:07 +0000 (20:04 +0100)]
Add another test for const parameter (non) hygiene.

4 years agoAdd syntactic test for rest patterns.
Mazdak Farrokhzad [Mon, 29 Jul 2019 07:03:27 +0000 (09:03 +0200)]
Add syntactic test for rest patterns.

4 years agoAdd very simple edition check to tidy; and add missing edition = 2018s.
CrLF0710 [Sun, 28 Jul 2019 17:05:31 +0000 (01:05 +0800)]
Add very simple edition check to tidy; and add missing edition = 2018s.

4 years agostd: Fix a failing `fs` test on Windows
Alex Crichton [Mon, 29 Jul 2019 17:37:36 +0000 (10:37 -0700)]
std: Fix a failing `fs` test on Windows

In testing 4-core machines on Azure the `realpath_works_tricky` test in
the standard library is failing with "The directory name is invalid". In
attempting to debug this test I was able to reproduce the failure
locally on my machine, and after inspecing the test it I believe is
exploiting Unix-specific behavior that seems to only sometimes work on
Windows. Specifically the test basically executes:

    mkdir -p a/b
    mkdir -p a/d
    touch a/f
    ln -s a/b/c ../d/e
    ln -s a/d/e ../f

and then asserts that `canonicalize("a/b/c")` and
`canonicalize("a/d/e")` are equivalent to `a/f`. On Windows however the
first symlink is a "directory symlink" and the second is a file symlink.
In both cases, though, they're pointing to files. This means that for
whatever reason locally and on the 4-core environment the call to
`canonicalize` is failing. On Azure today it seems to be passing, and
I'm not entirely sure why. I'm sort of presuming that there's some sort
of internals going on here where there's some global Windows setting
which makes symlinks behavior more unix-like and ignore the directory
hint.

In any case this should keep the test working and also fixes the test
locally for me.

4 years agouse gloabl variable 'environ' to pass environments to rtpSpawn
Baoshan Pang [Mon, 29 Jul 2019 17:19:59 +0000 (10:19 -0700)]
use gloabl variable 'environ' to pass environments to rtpSpawn

4 years agocomments from @lzutao
Maximilian Roos [Mon, 29 Jul 2019 16:26:59 +0000 (12:26 -0400)]
comments from @lzutao