102863 Commits

Author SHA1 Message Date
Harald Hoyer
de122e673a
std::error::Chain: remove Copy
remove Copy from Iterator as per comment
https://github.com/rust-lang/rust/issues/58520#issuecomment-553682166
2019-11-18 09:01:34 +01:00
Camille GILLOT
a65091ffff Rename generated lifetime. 2019-11-18 08:41:28 +01:00
Camille GILLOT
35cba9eb0b Retire EnumLiftImpl. 2019-11-18 08:41:28 +01:00
Camille GILLOT
033d1df19b Retire BraceStructLiftImpl. 2019-11-18 08:41:28 +01:00
Camille GILLOT
2add2075de Create derive proc-macro for Lift trait. 2019-11-18 08:41:28 +01:00
bors
9966af3897 Auto merge of #66396 - smmalis37:pythontest, r=alexcrichton
Make a test compatible across python versions.

Progress on #65063

This PR allows this test to work on both python2 and python3, ~~and it also allows `./x.py test` to fully complete on my system without python2 installed at all.~~
2019-11-18 06:09:04 +00:00
bors
d67ca28354 Auto merge of #66238 - ehuss:stabilize-rustdoc-edition, r=GuillaumeGomez
rustdoc: Stabilize `edition` annotation.

The rustdoc `edition` annotation is currently ignored on stable. This means that the tests will be ignored, unless there is a `rust` annotation, then it will use the global edition. I suspect this was just an oversight during the edition stabilization, but I don't know. Example:

```rust
/// ```edition2018
/// // This code block was ignored on stable.
/// ```

/// ```rust,edition2018
/// // This code block would use whatever edition is passed on the command line.
/// ```
```

AFAIK, it is not possible to write a test that verifies stable behavior, as all tests appear to set RUSTC_BOOTSTRAP which forces all tests to run as "nightly", even on a stable release.

Closes #65980
2019-11-18 03:06:42 +00:00
bors
361791bb5f Auto merge of #65456 - estebank:trait-bound-borrow, r=matthewjasper
Suggest borrowing when it would satisfy an unmet trait bound

When there are multiple implementors for the same trait that is present
in an unmet binding, modify the E0277 error to refer to the parent
obligation and verify whether borrowing the argument being passed in
would satisfy the unmet bound. If it would, suggest it.

Fix #56368.
2019-11-18 00:05:38 +00:00
Esteban Küber
8d1c2612f8 review comments 2019-11-17 14:40:41 -08:00
Esteban Küber
578bc438b0 Do not ICE on trait aliases with missing obligations 2019-11-17 14:40:41 -08:00
Camille GILLOT
44a595f52c Simplify impl for SymbolStr. 2019-11-17 22:37:16 +01:00
Camille GILLOT
3d97a91e7f Remove extern crate. 2019-11-17 22:37:16 +01:00
Camille GILLOT
5b4dad7ad2 Derive HashStable_Generic for ABI types. 2019-11-17 22:37:16 +01:00
Camille GILLOT
e8e7ad6fb8 Implement HashStable for RangeInclusive. 2019-11-17 22:37:15 +01:00
Camille GILLOT
79bde05b45 Derive HashStable for PanicStrategy. 2019-11-17 22:37:15 +01:00
Camille GILLOT
375a761303 HashStable in libsyntax. 2019-11-17 22:37:15 +01:00
Camille GILLOT
333c11433b Derive HashStable in librustc_target. 2019-11-17 22:37:15 +01:00
Camille GILLOT
2ba84c6bea HashStable_Generic for librustc_target. 2019-11-17 22:37:14 +01:00
Camille GILLOT
a265bc22f1 HashStable_Generic for libsyntax_pos. 2019-11-17 22:37:13 +01:00
Camille GILLOT
2a67986eb6 HashStable literals in libsyntax. 2019-11-17 22:37:10 +01:00
Camille GILLOT
efcb695f4c Further HashStable_Generic derives. 2019-11-17 22:37:10 +01:00
Camille GILLOT
1dd5133dce Move impl HashStable for Symbol in libsyntax_pos. 2019-11-17 22:37:09 +01:00
Camille GILLOT
05f5f76b3b Move impl HashStable for SymbolStr in libsyntax_pos. 2019-11-17 22:37:09 +01:00
Camille GILLOT
c2e1658c67 Use proc_macro for HashStable derive in libsyntax. 2019-11-17 22:37:08 +01:00
Camille GILLOT
5b0e702f6c Create a generic HashStable derive. 2019-11-17 22:37:01 +01:00
Nadrieril
7f5e0441e2 ConstantValue is the only other ctor allowed when subtracting from slice ctors 2019-11-17 19:58:11 +00:00
Nadrieril
bd0e3ccd0b Store SliceKinds directly when subtracting 2019-11-17 19:25:03 +00:00
bors
0f0c640e0e Auto merge of #66385 - ecstatic-morse:check-only-pass2, r=eddyb
Make dataflow-based const qualification the canonical one

For over a month, dataflow-based const qualification has been running in parallel with `qualify_consts` to check the bodies of `const` and `static`s. This PR removes the old qualification pass completely in favor of the dataflow-based one.

**edit:**
This PR also stops checking `QUALIF_ERROR_BIT` during promotion. This check appears to no longer serve a purpose now that the CTFE engine is more robust.

As a side-effect, this resolves #66167.

r? @eddyb
2019-11-17 18:38:15 +00:00
Nadrieril
daa117eab7 Small improvement to exhaustiveness diagnostics 2019-11-17 17:59:37 +00:00
Nadrieril
54e97e889b Factor out slice constructor struct and simplify 2019-11-17 17:59:37 +00:00
Vadim Petrochenkov
febde53fde rustc_metadata: Cleanup crate search with exact paths 2019-11-17 20:13:54 +03:00
Vadim Petrochenkov
26f113e5b6 rustc_metadata: Remove CrateMetadata::is_proc_macro_crate 2019-11-17 20:13:53 +03:00
Vadim Petrochenkov
09c1c94df3 rustc_metadata: Stop leaking Lazy from the rmeta module 2019-11-17 20:13:53 +03:00
Vadim Petrochenkov
c1570238b8 rustc_metadata: Move CrateMetadata into decoder.rs
It allows to make most of its fields private
2019-11-17 20:13:42 +03:00
Vadim Petrochenkov
41ee980f9f rustc_metadata: Give a constructor to CratePaths 2019-11-17 20:12:50 +03:00
Vadim Petrochenkov
0aed810abf rustc_metadata: Minor cleanup 2019-11-17 20:12:50 +03:00
Vadim Petrochenkov
ff3e06fbe6 rustc_metadata: Give a constructor to CrateMetadata 2019-11-17 20:12:50 +03:00
Vadim Petrochenkov
bdce69dd83 rustc_metadata: Give a constructor to CrateLocator 2019-11-17 20:12:50 +03:00
Vadim Petrochenkov
c6bcf6016c rustc_metadata: locator::Context -> CrateLocator 2019-11-17 20:12:50 +03:00
Vadim Petrochenkov
68985c7613 rustc_metadata: Move some structs from cstore to decoder
This allows to privatize their fields.
2019-11-17 19:59:34 +03:00
Nadrieril
d0cfef32a8 Unify the various slice constructors 2019-11-17 15:54:44 +00:00
Yuki Okushi
d8ea7866fc Add JohnTitor to rustc-guide toolstate notification list
Also update org names of some books
2019-11-18 00:47:38 +09:00
bors
d8014582b8 Auto merge of #66384 - cjgillot:typefoldable, r=Zoxc
Derive TypeFoldable using a proc-macro

A new proc macro is added in librustc_macros.
It is used to derive TypeFoldable inside librustc and librustc_traits.

For now, the macro uses the `'tcx` lifetime implicitly, and does not allow for a more robust selection of the adequate lifetime.

The Clone-based TypeFoldable implementations are not migrated.

Closes #65674
2019-11-17 15:25:10 +00:00
bors
4b6cef1e32 Auto merge of #66488 - RalfJung:miri, r=RalfJung
update Miri

r? @ghost Cc @oli-obk
2019-11-17 10:45:37 +00:00
Ralf Jung
2bfa622a99 update Miri 2019-11-17 11:40:18 +01:00
Vadim Petrochenkov
7f49f7bcc2 Rename directory rustc_plugin -> rustc_plugin_impl 2019-11-17 11:04:49 +03:00
Vadim Petrochenkov
ce7a579cac rustc_plugin: Remove the compatibility shim 2019-11-17 11:04:49 +03:00
bors
5966d9b4d9 Auto merge of #66336 - ehuss:update-cargo-books, r=Mark-Simulacrum
Update Cargo, books

## cargo

12 commits in 5da4b4d47963868d9878480197581ccbbdaece74..8280633db680dec5bfe1de25156d1a1d53e6d190
2019-10-28 21:53:41 +0000 to 2019-11-11 23:17:05 +0000
- Don't panic when parsing `/proc/stat` (rust-lang/cargo#7580)
- Fix unused configuration key warning for a few keys under `build`. (rust-lang/cargo#7575)
- Add back support for `BROWSER` envvar in `cargo doc --open`. (rust-lang/cargo#7576)
- Only include "already existing ..." comment in gitignore on conflict (rust-lang/cargo#7570)
- Add VS Code user dir to .gitignore (rust-lang/cargo#7578)
- Added aliases to subcommand typo suggestions. (rust-lang/cargo#7486)
- Use multiple requirement syntax consistently (rust-lang/cargo#7573)
- Update verison to 0.42 (rust-lang/cargo#7568)
- Expand documentation on build scripts. (rust-lang/cargo#7565)
- Update crossbeam-utils requirement from 0.6 to 0.7 (rust-lang/cargo#7566)
- don't download std-docs on CI (rust-lang/cargo#7513)
- Change my-buddy to github-handle (rust-lang/cargo#7553)

## nomicon

2 commits in 5004ad30d69f93553ceef74439fea2159d1f769e..58e36e0e08dec5a379ac568827c058e25990d6cd
2019-10-12 19:52:40 +0200 to 2019-10-30 08:14:24 -0500
- remove references to the nursery
- Add github action to replace Travis.yml (rust-lang-nursery/nomicon#172)

## reference

7 commits in 4b21b646669e0af49fae7cae301898dc4bfaa1f0..45558c464fb458affbcdcb34323946da45c8a117
2019-10-27 22:33:11 +0100 to 2019-11-08 14:47:35 +0100
- Audit code blocks. (rust-lang-nursery/reference#715)
- Update coherence and orphan rules documentation to match RFC 2451 (rust-lang-nursery/reference#703)
- Update organization name (rust-lang-nursery/reference#713)
- State that no_implicit_prelude also applies to nested modules (rust-lang-nursery/reference#707)
- expand Copy docs (rust-lang-nursery/reference#711)
- github action doesn't use the nursery (rust-lang-nursery/reference#706)
- Migrate to GitHub Actions. (rust-lang-nursery/reference#705)

## book

1 commits in 28fa3d15b0bc67ea5e79eeff2198e4277fc61baf..e79dd62aa63396714278d484d91d48826737f47f
2019-10-29 07:16:09 -0500 to 2019-10-30 07:33:12 -0500
- No need for an iterator here to fetch values (rust-lang/book#1957)

## rust-by-example

1 commits in f3197ddf2abab9abdbc029def8164f4a748b0d91..dcee312c66267eb5a2f6f1561354003950e29105
2019-10-29 10:17:40 -0300 to 2019-10-31 11:26:53 -0300
- refactor: simplify extracting Result from Option (rust-lang/rust-by-example#1283)

## edition-guide

2 commits in e58bc4ca104e890ac56af846877c874c432a64b5..f553fb26c60c4623ea88a1cfe731eafe0643ce34
2019-07-31 20:14:12 +0200 to 2019-10-30 08:27:42 -0500
- remove old references to the nursery
- Port from Travis to GitHub Actions (rust-lang-nursery/edition-guide#192)
2019-11-17 07:45:00 +00:00
bors
8831d766ac Auto merge of #66485 - JohnTitor:rollup-vbwhg6r, r=JohnTitor
Rollup of 11 pull requests

Successful merges:

 - #65739 (Improve documentation of `Vec::split_off(...)`)
 - #66271 (syntax: Keep string literals in ABIs and `asm!` more precisely)
 - #66344 (rustc_plugin: Remove `Registry::register_attribute`)
 - #66381 (find_deprecation: deprecation attr may be ill-formed meta.)
 - #66395 (Centralize panic macro documentation)
 - #66456 (Move `DIAGNOSTICS` usage to `rustc_driver`)
 - #66465 (add missing 'static lifetime in docs)
 - #66466 (miri panic_unwind: fix hack for SEH platforms)
 - #66469 (Use "field is never read" instead of "field is never used")
 - #66471 (Add test for issue 63116)
 - #66477 (Clarify transmute_copy documentation example)

Failed merges:

r? @ghost
2019-11-17 04:37:53 +00:00
Yuki Okushi
f65cb87a09
Rollup merge of #66477 - ALSchwalm:clarify-transmute-copy, r=Centril
Clarify transmute_copy documentation example

Currently the documentation for `transmute_copy` implies that the function accepts a slice due to the variable name chosen in the example. This is misleading as `foo_slice` is actually an array and `transmute_copy` cannot take an unsized type anyway.

This PR just clarifies things by renaming the variable used in the example.
2019-11-17 13:36:25 +09:00