Commit Graph

102742 Commits

Author SHA1 Message Date
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
Yuki Okushi
750dd03a23
Rollup merge of #66471 - Alexendoo:test-issue-63116, r=Centril
Add test for issue 63116

Closes #63116
2019-11-17 13:36:24 +09:00
Yuki Okushi
c0fccf5d62
Rollup merge of #66469 - CosineP:fix/field-lint, r=petrochenkov
Use "field is never read" instead of "field is never used"

this is my first PR here so please let me know if i am doing it wrong
closes #64465
i will be referencing this with a book PR that updates the same language
2019-11-17 13:36:22 +09:00
Yuki Okushi
937195beb1
Rollup merge of #66466 - RalfJung:seh, r=oli-obk
miri panic_unwind: fix hack for SEH platforms

The old hack didn't work as we ended up duplicating the `eh_personality` lang item...

I have no idea if rustc cares that `eh_catch_typeinfo` has a certain shape, but better safe than sorry. I cannot test this locally.

r? @oli-obk Cc @Aaron1011
2019-11-17 13:36:21 +09:00
Yuki Okushi
404081fd48
Rollup merge of #66465 - mulimoen:fix_lifetime_elision_not_shown, r=rkruppe
add missing 'static lifetime in docs
2019-11-17 13:36:19 +09:00
Yuki Okushi
6e6c46c694
Rollup merge of #66456 - Centril:driver-codes, r=Mark-Simulacrum
Move `DIAGNOSTICS` usage to `rustc_driver`

Remove `rustc_interface`'s dependency on `rustc_error_codes` and centralize all usages of `DIAGNOSTICS` in `rustc_driver`. Once we remove all references to `rustc_error_codes` in all other crates but `rustc_driver`, this should allow for incremental recompilation of the compiler to be smoother when tweaking error codes. This works towards https://github.com/rust-lang/rust/issues/66210#issuecomment-551862528.

(May include traces of minor drive-by cleanup.)

r? @Mark-Simulacrum
2019-11-17 13:36:18 +09:00
Yuki Okushi
05482d03bc
Rollup merge of #66395 - jplatte:centralize-panic-docs, r=Dylan-DPC
Centralize panic macro documentation

This is just the main commit from #61511 (which got closed because the author didn't reply) cherry-picked on the current master. Building `core` and `std` on this branch in stage 1 succeeded, which I thinks means the issues from the previous PR should be gone (but let's see what CI says).
2019-11-17 13:36:16 +09:00
Yuki Okushi
842612fcc0
Rollup merge of #66381 - Centril:66340, r=petrochenkov
find_deprecation: deprecation attr may be ill-formed meta.

Fixes #66340.

r? @petrochenkov
cc @pnkfelix
2019-11-17 13:36:15 +09:00
Yuki Okushi
54998d1b3f
Rollup merge of #66344 - petrochenkov:noregattr, r=matthewjasper
rustc_plugin: Remove `Registry::register_attribute`

Legacy plugins cannot register inert attributes anymore.

The preferred replacement is to use `register_tool` ([tracking issue](https://github.com/rust-lang/rust/issues/66079)).
```rust
#![register_tool(servo)]

#[servo::must_root]
struct S;
```

The more direct replacement is `register_attribute` ([tracking issue](https://github.com/rust-lang/rust/issues/66080))
```rust
#![register_attr(must_root)]

#[must_root]
struct S;
```
, but it requires registering each attribute individually rather than registering the tool once, and is more likely to be removed rather than stabilized.
2019-11-17 13:36:13 +09:00
Yuki Okushi
b83d50d34f
Rollup merge of #66271 - petrochenkov:abism, r=Centril
syntax: Keep string literals in ABIs and `asm!` more precisely

As a result we don't lose spans when `extern` functions or blocks are passed to proc macros, and also escape all string literals consistently.
Continuation of https://github.com/rust-lang/rust/pull/60679, which did a similar thing with all literals besides those in ABIs and `asm!`.

TODO: Add tests.

Fixes https://github.com/rust-lang/rust/issues/60493
Fixes https://github.com/rust-lang/rust/issues/64561
r? @Centril
2019-11-17 13:36:12 +09:00
Yuki Okushi
d8f2526703
Rollup merge of #65739 - mqudsi:vec_split_off_docs, r=dtolnay
Improve documentation of `Vec::split_off(...)`

The previous ordering of the sentences kept switching between the return
value and the value of `self` after execution, making it hard to follow.

Additionally, as rendered in the browser, the period in "`Self`. `self`"
was difficult to make out as being a sentence separator and not one code
block.
2019-11-17 13:36:10 +09:00