Commit Graph

531 Commits

Author SHA1 Message Date
Mark Rousskov cc2c33a156 Move Session to librustc_session 2019-12-03 12:19:16 -05:00
Mark Rousskov 817d1ae834 Move BufferedEarlyLint to librustc_session 2019-12-03 12:19:16 -05:00
Mark Rousskov f03d8f305a Move early lint declarations to librustc_session 2019-12-03 12:19:14 -05:00
Mark Rousskov 984c74a40a Move cgu_reuse_tracker to librustc_session 2019-12-03 12:18:32 -05:00
Mark Rousskov c761ec1ac9 Introduce rustc_session crate 2019-12-03 12:18:32 -05:00
Alex Crichton f3fb1c5e95 Update the `wasi` crate for `wasm32-wasi`
This commit updates the `wasi` crate used by the standard library which
is used to implement most of the functionality of libstd on the
`wasm32-wasi` target. This update comes with a brand new crate structure
in the `wasi` crate which caused quite a few changes for the wasi target
here, but it also comes with a significant change to where the
functionality is coming from.

The WASI specification is organized into "snapshots" and a new snapshot
happened recently, so the WASI APIs themselves have changed since the
previous revision. This had only minor impact on the public facing
surface area of libstd, only changing on `u32` to a `u64` in an unstable
API. The actual source for all of these types and such, however, is now
coming from the `wasi_preview_snapshot1` module instead of the
`wasi_unstable` module like before. This means that any implementors
generating binaries will need to ensure that their embedding environment
handles the `wasi_preview_snapshot1` module.
2019-12-03 07:03:06 -08:00
Michael Woerister edcca15c5b Update measureme crate to 0.5.0. 2019-12-03 10:33:24 +01:00
Matthias Krüger f77104b424 submodules: update clippy from 7b8e8293 to 7a943a9d
Changes:
````
Normalize custom ICE test
Rustup to rust-lang/rust#64736
Use assert_crate_local for a more explicit error
Rustup to https://github.com/rust-lang/rust/pull/66789
account for external macro in MISSING_INLINE_IN_PUBLIC_ITEMS lint
build(tests/fmt): use shared target dir
chore: fix and split some ui tests on 32bit system
build: set up build job for i686 targets
remove needless my_lint ui test
git quiet
deploy: cd to out/ before adding files to git
Less needless_doctest_main false positives
fmt
Feed the dog
Use rustc_env instead of exec_env for test
Make triggering this lint less likely 📎
Use exec_env to set backtrace level and normalize output
Update custom ICE function with latest rustc
Use Clippy version in ICE message
Add custom ICE message that points to Clippy repo
Fix master deployment
Run update_lints
Add projections check to EUV for escape analysis
Use infer_ctxt
Move use_self to nursery
Use `println!` on success instead of `eprintln!`
Revert "Disable chalk integration test. Output too large"
Remove the old integration-tests.sh script
Use rust implementation for integration tests in CI
Rust implementation of integration test
Don't error on clippy.toml of dependencies
Fix categorizations
Fix arguments on ExprUseVisitor::new
euv moved from middle to typeck
cmt_ -> Place
build: check if RTIM is not installed
make use of Result::map_or
trigger string_lit_as_bytes when literal has escapes
Remove negative float literal checks.
Enable deny-warnings feature everywhere in CI
Remove unused debugging feature
implemented `as_conversions` lint
fixing a typo
[comparison_chain] #4827 Check `core::cmp::Ord` is implemented
add a good example for the approx_const lint
Add suggested good cases in docs for lifetimes lint
````
2019-12-02 23:26:50 +01:00
Mazdak Farrokhzad 70234f16df builtin_attrs.rs -> rustc_feature 2019-11-30 02:34:18 +01:00
Mazdak Farrokhzad 3d080a4a77 introduce crate rustc_feature and move active, accepted, and removed to it 2019-11-30 00:25:40 +01:00
Ralf Jung 9e940f0277 update Miri 2019-11-28 18:40:05 +01:00
Eric Huss 2b98532250 Update cargo, rls, books. 2019-11-25 08:14:07 -08:00
Vadim Petrochenkov f89e6c8811 rustc_plugin: Remove support for syntactic plugins 2019-11-24 12:05:10 +03:00
flip1995 450880fd89
Update Cargo.lock 2019-11-23 17:27:36 +01:00
bors 5fa0af2327 Auto merge of #66558 - Aaron1011:update/miri-unwind, r=RalfJung
Bump Miri for panic unwinding support
2019-11-22 18:23:00 +00:00
bors 083b5a0a1b Auto merge of #66460 - cjgillot:hashstable_generic, r=Zoxc
Add a proc-macro to derive HashStable in librustc dependencies

A second proc-macro is added to derive HashStable for crates librustc depends on.
This proc-macro HashStable_Generic (to bikeshed) allows to decouple code and some librustc's boilerplate.

Not everything is migrated, because `Span` and `TokenKind` require to be placed inside librustc.
Types using them stay there too.

Split out of #66279
r? @Zoxc
2019-11-22 13:54:41 +00:00
Mazdak Farrokhzad 2f00e86cb5 Introduce MIR optimizations for simplifying `x?` on `Result`s.
This optimization depends on inlining for the identity
conversions introduced by the lowering of the `?`.
To take advantage of `SimplifyArmIdentity`, `-Z mir-opt-level=2`
is required because that triggers the inlining MIR optimization.
2019-11-21 20:05:16 +01:00
Mazdak Farrokhzad 647eda17e8
Rollup merge of #66457 - cjgillot:just_hashstable, r=Zoxc
Just derive Hashstable in librustc

Split out of #66279

r? @Zoxc
2019-11-20 18:32:07 +01:00
Mazdak Farrokhzad 3ef2384e50
Rollup merge of #66478 - petrochenkov:rmplugin, r=davidtwco
rustc_plugin: Remove the compatibility shim

The compatibility crate was introduced in https://github.com/rust-lang/rust/pull/62727 to migrate Cargo and some other tools, but now it's no longer necessary.
2019-11-20 12:58:27 +01:00
Aaron Hill 778bb7116f
Bump Miri for panic unwinding support 2019-11-19 16:40:59 -05:00
Camille GILLOT d9eaaf5973 Derive HashStable in librustc_mir. 2019-11-19 20:48:02 +01:00
Camille GILLOT 2ba84c6bea HashStable_Generic for librustc_target. 2019-11-17 22:37:14 +01:00
Camille GILLOT c2e1658c67 Use proc_macro for HashStable derive in libsyntax. 2019-11-17 22:37:08 +01: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 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
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
bors 9b0214d9c5 Auto merge of #66255 - ehuss:update-cc, r=alexcrichton
Update cc, git2, num_cpus.

This updates the `cc` crate, bringing in better parallel building support. Also updates `git2` which enables the parallel feature. (Note: I don't expect it will have a significant impact on build time, but seems good to update anyways.)

The main thorn is that `cc` gained knowledge about RISC-V architectures (https://github.com/alexcrichton/cc-rs/pull/428, https://github.com/alexcrichton/cc-rs/pull/429, https://github.com/alexcrichton/cc-rs/pull/430), but the builders on CI do not have the riscv C compiler installed. This means that bootstraps' cc detection was finding a C compiler that isn't installed, and fails.

The solution here is to override the cc detection to `false`. The C compiler isn't actually used on riscv platforms. AFAIK, the only location would be compiler_builtins, and it currently forces C support off (a533ae9c5a/build.rs (L49-L55)).

Other possible solutions:
- Add the override in cc_detect for riscv (or any "no-C" platform like wasm32 and nvptx)
- Install and use the appropriate c compiler. I tried this the `g++-riscv64-linux-gnu` package, but it failed missing some header file.

Closes #66232
2019-11-16 07:26:57 +00:00
Mazdak Farrokhzad 8444e1628c move DIAGNOSTICS usage to rustc_driver 2019-11-16 02:32:33 +01:00
Mazdak Farrokhzad ae0c8b5f09
Rollup merge of #66427 - Mark-Simulacrum:errors-json, r=Centril
Move the JSON error emitter to librustc_errors

This is done both as a cleanup (it makes little sense for this emitter to be in libsyntax), but also as part of broader work to decouple Session from librustc itself.

Along the way, this also moves SourceMap to syntax_pos, which is also nice for the above reasons, as well as allowing dropping the SourceMapper trait from code. This had the unfortunate side-effect of moving `FatalError` to rustc_data_structures (it's needed in syntax_pos, due to SourceMap, but putting it there feels somehow worse).
2019-11-15 18:02:02 +01:00
Mark Rousskov 942f0a6f7a Move SourceMap to syntax_pos
This does not update the use sites or delete the now unnecessary
SourceMapper trait, to allow git to interpret the file move as a rename
rather than a new file.
2019-11-15 08:38:31 -05:00
Yuki Okushi 8405fc6b70
Rollup merge of #66338 - ehuss:update-mdbook, r=alexcrichton
Update mdbook.

This brings in some important updates to fix some rendering issues in the books. In particular fixing hidden lines in code blocks, and some escaping issues.  More details at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md

This also requires updating mdbook-linkcheck.
2019-11-15 18:36:23 +09:00
Guillaume Gomez 356da40db5 Adapt error index generator to the new format 2019-11-14 13:05:56 +01:00
Guillaume Gomez 125da0cf2a regen 2019-11-14 13:05:56 +01:00
Camille GILLOT d5f5e706ef Use TypeFoldable derive macro in librustc_traits. 2019-11-13 21:37:37 +01:00
Eric Huss 139477df64 Update mdbook. 2019-11-12 10:14:48 -08:00
Eric Huss e0f2f9d363 Update Cargo, books 2019-11-12 09:57:41 -08:00
Mark Rousskov f696b21c5f Move self-profile infrastructure to data structures
The single dependency on queries (QueryName) can be fairly easily
abstracted via a trait and this further decouples Session from librustc
(the primary goal).
2019-11-12 12:48:04 -05:00
Yuki Okushi 86df2f6737
Rollup merge of #66241 - lzutao:ssl, r=alexcrichton
bump openssl version

Fixes #65808

This PR updates `openssl` and `openssl-sys` to support newer versions of `libressl` in `rust` builds.
2019-11-12 16:36:05 +09:00
bors 2a9be46cc4 Auto merge of #66207 - Manishearth:clippyup, r=Centril
Update clippy

Fixes #66150

r? @ghost
2019-11-11 06:29:15 +00:00
Manish Goregaokar 955f861075 Update clippy 2019-11-11 07:27:46 +01:00
bors a3b6e5705c Auto merge of #65324 - Centril:organize-syntax, r=petrochenkov
Split libsyntax apart

In this PR the general idea is to separate the AST, parser, and friends by a more data / logic structure (tho not fully realized!) by separating out the parser and macro expansion code from libsyntax. Specifically have now three crates instead of one (libsyntax):

- libsyntax:

   - concrete syntax tree (`syntax::ast`)

   - definition of tokens and token-streams (`syntax::{token, tokenstream}`) -- used by `syntax::ast`

   - visitors (`syntax::visit`, `syntax::mut_visit`)

   - shared definitions between `libsyntax_expand`

   - feature gating (`syntax::feature_gate`) -- we could possibly move this out to its own crater later.

   - attribute and meta item utilities, including used-marking (`syntax::attr`)

   - pretty printer (`syntax::print`) -- this should possibly be moved out later. For now I've reduced down the dependencies to a single essential one which could be broken via `ParseSess`. This entails that e.g. `Debug` impls for `Path` cannot reference the pretty printer.

   - definition of `ParseSess` (`syntax::sess`) -- this is used by `syntax::{attr, print, feature_gate}` and is a common definition used by the parser and other things like librustc.

   - the `syntax::source_map` -- this includes definitions used by `syntax::ast` and other things but could ostensibly be moved `syntax_pos` since that is more related to this module.

   - a smattering of misc utilities not sufficiently important to itemize -- some of these could be moved to where they are used (often a single place) but I wanted to limit the scope of this PR.

- librustc_parse:

   - parser (`rustc_parse::parser`) -- reading a file and such are defined in the crate root tho.

   - lexer (`rustc_parse::lexer`)

   - validation of meta grammar (post-expansion) in (`rustc_parse::validate_attr`)

- libsyntax_expand -- this defines the infra for macro expansion and conditional compilation but this is not libsyntax_ext; we might want to merge them later but currently libsyntax_expand is depended on by librustc_metadata which libsyntax_ext is not.

   - conditional compilation (`syntax_expand::config`) -- moved from `syntax::config` to here

   - the bulk of this crate is made up of the old `syntax::ext`

r? @estebank
2019-11-10 12:18:53 +00:00
Mazdak Farrokhzad 4ae2728fa8 move syntax::parse -> librustc_parse
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10 03:57:18 +01:00
Eric Huss a902383053 Update cc, git2, num_cpus. 2019-11-09 12:21:50 -08:00
Mark Rousskov dd6df0d20e Move pretty parsing into Session options
This allows us to query whether PpmEveryBodyLoops is set during
expansion and run the everybody loops pass.
2019-11-09 11:10:13 -05:00
Lzu Tao e6d72c3cef bump openssl version
to support newer versions of libressl in rust builds

Co-authored-by: dylanaraps <dylan.araps@gmail.com>
2019-11-09 03:49:03 +00:00
Mazdak Farrokhzad 55f76cdb2f syntax: use distinct FloatTy from rustc_target.
We also sever syntax's dependency on rustc_target as a result.
This should slightly improve pipe-lining.

Moreover, some cleanup is done in related code.
2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad 167b8fedd6
Rollup merge of #66086 - RalfJung:smallvec, r=nagisa
bump smallvec to 1.0

This includes https://github.com/servo/rust-smallvec/pull/162, fixing an unsoundness in smallvec.

See https://github.com/servo/rust-smallvec/pull/175 for the 1.0 release announcement.

Cc @mbrubeck @emilio
2019-11-06 07:03:08 +01:00
Ralf Jung 90b8d34c9f bump smallvec to 1.0 2019-11-04 15:59:09 +01:00
Ralf Jung 9138d3bb80 when Miri tests are not passing, do not add Miri component 2019-11-03 11:47:07 +01:00
bors 253fc0ed74 Auto merge of #65698 - msizanoen1:dual-proc-macro-hash, r=petrochenkov
Dual proc macro hash

This PR changes current `-Z dual-proc-macro` mechanism from resolving only by name to including the hash of the host crate inside the transistive dependency information to prevent name conflicts.
Fix partially #62558
2019-11-01 06:35:40 +00:00
Ralf Jung 9cd1edea4a rebase and re-update lock file 2019-10-31 07:50:54 +01:00
Ralf Jung 64cf596ca6 update miri 2019-10-31 07:50:27 +01:00
msizanoen1 8a0d2332f9 Adjust rustc-workspace-hack 2019-10-31 13:12:35 +07:00
Igor Matuszewski 0658b24925 submodules: Bump RLS to 58869107ec162a821a4bee53cdd3f51c84cda3ea
Most importantly it contains d267b49c2f
which fixes the RLS build whenever Clippy is built successfully in Rust CI.
2019-10-30 16:05:38 +01:00
Tyler Mandry 4359666daa
Rollup merge of #65920 - smaeul:patch/workspace-hack, r=alexcrichton
Use rustc-workspace-hack for rustbook

As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).
2019-10-29 12:01:46 -07:00
Tyler Mandry 67558a890e
Rollup merge of #65906 - integer32llc:update-mdbook, r=alexcrichton
Update mdbook to 0.3.3

There are some new features of mdbook that I'd like to use in TRPL.
2019-10-29 12:01:44 -07:00
Samuel Holland c648ad587c Use rustc-workspace-hack for rustbook
As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).
2019-10-28 22:34:43 -05:00
Mazdak Farrokhzad ffc6225cd2
Rollup merge of #65531 - tmandry:bump-backtrace, r=cramertj
Update backtrace to 0.3.40

Diff: https://github.com/rust-lang/backtrace-rs/compare/0.3.37...b5cc5b12fa4fd03cb83546a7c62b9fff40086b63

Pretty low risk, considering the only changes are in low-tier targets.

r? @cramertj
cc @alexcrichton
2019-10-29 04:08:20 +01:00
Mazdak Farrokhzad 42d4e261a1
Rollup merge of #65294 - varkor:lint-inline-prototype, r=matthewjasper
Lint ignored `#[inline]` on function prototypes

Fixes https://github.com/rust-lang/rust/issues/51280.

- Adds a `unused_attribute` lint for `#[inline]` on function prototypes.
- As a consequence, foreign items, impl items and trait items now have their attributes checked, which could cause some code to no longer compile (it was previously erroneously ignored).
2019-10-29 04:08:18 +01:00
Tyler Mandry d7f99dadd4 Update backtrace to 0.3.40 2019-10-28 16:27:07 -07:00
Carol (Nichols || Goulding) 3bd16c291e
Update mdbook to 0.3.3 2019-10-28 16:21:53 -04:00
Mazdak Farrokhzad fb12c70852 rustc, rustc_passes: don't depend on syntax_expand.
This is done by moving some data definitions to syntax::expand.
2019-10-27 17:05:57 +01:00
bors fae75cd216 Auto merge of #65167 - hermitcore:rusty-hermit, r=alexcrichton
Redesign the interface to the unikernel HermitCore

We are developing the unikernel HermitCore, where the kernel is written in Rust and is already part of the Rust Standard Library. The interface between the standard library and the kernel based on a small C library. With this pull request, we remove completely the dependency to C and use lld as linker. Currently, the kernel will be linked to the application as static library, which is published at https://github.com/hermitcore/libhermit-rs.

We don’t longer support the C interface to the kernel. Consequently, we remove this part from the Rust Standard Library.
2019-10-26 19:35:59 +00:00
varkor b925eb5f42 Update bitflags 2019-10-25 23:26:27 +01:00
Yuki Okushi 574b0780ab
Rollup merge of #65800 - michaelwoerister:measureme-0.4.0, r=wesleywiser
self-profiling: Update measureme to 0.4.0 and remove non-RAII methods from profiler.

This PR removes all non-RAII based profiling methods from `SelfProfilerRef` 🎉
It also delegates the `TimingGuard` implementation to `measureme`, now that that is available there.

r? @wesleywiser
2019-10-26 02:45:59 +09:00
Stefan Lankes 805a330ab4 rerun cargo to generate lock file 2019-10-25 10:24:14 +02:00
Stefan Lankes 88a7736083 update Cargo.lock 2019-10-25 10:03:41 +02:00
bors 85943fd7c8 Auto merge of #65764 - Manishearth:clippyup, r=Manishearth
Update clippy

Fixes #65754

r? @ghost
2019-10-25 07:47:13 +00:00
Stefan Lankes d349e32fc7 Merge branch 'master' into rusty-hermit, resolve conflicts 2019-10-25 09:09:55 +02:00
Manish Goregaokar 7d0162d7ed Update clippy 2019-10-24 08:15:32 -07:00
Michael Woerister ee1173a8ff self-profiling: Update measureme to 0.4.0 and use new RAII-based API. 2019-10-24 17:14:38 +02:00
Alex Crichton 060b6cbe74 Update hashbrown to 0.6.2
Pulls in rust-lang/hashbrown#119 which should be a good improvement for
compile times of hashmap-heavy crates.
2019-10-24 08:07:03 -07:00
Mazdak Farrokhzad 7c043e284a
Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikomatsakis
Lockless LintStore

This removes mutability from the lint store after registration. Each commit stands alone, for the most part, though they don't make sense out of sequence.

The intent here is to move LintStore to a more parallel-friendly architecture, although also just a cleaner one from an implementation perspective. Specifically, this has the following changes:
 * We no longer implicitly register lints when registering lint passes
    * For the most part this means that registration calls now likely want to call something like:
       `lint_store.register_lints(&Pass::get_lints())` as well as `register_*_pass`.
    * In theory this is a simplification as it's much easier for folks to just register lints and then have passes that implement whichever lint however they want, rather than necessarily tying passes to lints.
 * Lint passes still have a list of associated lints, but a followup PR could plausibly change that
   * This list must be known for a given pass type, not instance, i.e., `fn get_lints()` is the signature instead of `fn get_lints(&self)` as before.
 * We do not store pass objects, instead storing constructor functions. This means we always get new passes when running lints (this happens approximately once though for a given compiler session, so no behavior change is expected).
 * Registration API is _much_ simpler: generally all functions are just taking `Fn() -> PassObject` rather than several different `bool`s.
2019-10-23 22:19:10 +02:00
Lzu Tao 7e0ef6e92e update compiletest 2019-10-23 02:46:10 +00:00
Stefan Lankes ddcd157d03
Merge branch 'master' into rusty-hermit 2019-10-22 19:01:09 +02:00
Mazdak Farrokhzad ed9cc70768
Rollup merge of #65595 - Centril:cfgspecs, r=Mark-Simulacrum
move `parse_cfgspecs` to `rustc_interface`

Part of https://github.com/rust-lang/rust/pull/65324.

r? @Mark-Simulacrum
2019-10-20 12:40:19 +02:00
Stefan Lankes b6801b7dcd
Merge branch 'master' into rusty-hermit 2019-10-20 10:48:58 +02:00
Stefan Lankes 5ebd4d9c27 move interface to the unikernel in the crate hermit-abi
=> simplifies the maintenance of the interface
2019-10-20 10:46:18 +02:00
bors 7bf377f289 Auto merge of #65469 - mati865:libc, r=alexcrichton
Update libc to 0.2.64

Passed local tests.

cc potentially interested people: @gnzlbg @tlively
2019-10-20 06:10:51 +00:00
Mazdak Farrokhzad d945f9860f move parse_cfgspecs to rustc_interface 2019-10-19 13:25:46 +02:00
Mark Rousskov dab3bd6cda Create lint store during plugin registration
Remove lint store from Session
2019-10-17 19:41:21 -04:00
Mateusz Mikuła 01008e4cd6 Update libc to 0.2.64 2019-10-16 12:50:59 +02:00
Mazdak Farrokhzad d420d719c4 move syntax::ext to new crate syntax_expand 2019-10-16 10:59:53 +02:00
Ralf Jung 4977e319a4 update miri 2019-10-14 17:59:45 +02:00
Lzu Tao 81d813dd67 Bump home crate 2019-10-12 08:29:27 +00:00
Igor Matuszewski ae79ea3422 Update RLS and Rustfmt
This also bumps rustc-ap-* crates and fixes the relevant toolstate.
2019-10-12 08:28:12 +00:00
Mazdak Farrokhzad 27240fe77b
Rollup merge of #64656 - passcod:map-entry-insert, r=Amanieu
Implement (HashMap) Entry::insert as per #60142

Implementation of `Entry::insert` as per @SimonSapin's comment on #60142. This requires a patch to hashbrown:

```diff
diff --git a/src/rustc_entry.rs b/src/rustc_entry.rs
index fefa5c3..7de8300 100644
--- a/src/rustc_entry.rs
+++ b/src/rustc_entry.rs
@@ -546,6 +546,32 @@ impl<'a, K, V> RustcVacantEntry<'a, K, V> {
         let bucket = self.table.insert_no_grow(self.hash, (self.key, value));
         unsafe { &mut bucket.as_mut().1 }
     }
+
+    /// Sets the value of the entry with the RustcVacantEntry's key,
+    /// and returns a RustcOccupiedEntry.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use hashbrown::HashMap;
+    /// use hashbrown::hash_map::RustcEntry;
+    ///
+    /// let mut map: HashMap<&str, u32> = HashMap::new();
+    ///
+    /// if let RustcEntry::Vacant(v) = map.rustc_entry("poneyland") {
+    ///     let o = v.insert_and_return(37);
+    ///     assert_eq!(o.get(), &37);
+    /// }
+    /// ```
+     #[inline]
+    pub fn insert_and_return(self, value: V) -> RustcOccupiedEntry<'a, K, V> {
+        let bucket = self.table.insert_no_grow(self.hash, (self.key, value));
+        RustcOccupiedEntry {
+            key: None,
+            elem: bucket,
+            table: self.table
+        }
+    }
 }

 impl<K, V> IterMut<'_, K, V> {
```

This is also only an implementation for HashMap. I tried implementing for BTreeMap, but I don't really understand BTreeMap's internals and require more guidance on implementing the equivalent `VacantEntry::insert_and_return` such that it returns an `OccupiedEntry`. Notably, following the original PR's modifications I end up needing a `Handle<NodeRef<marker::Mut<'_>, _, _, marker::LeafOrInternal>, _>` while I only have a `Handle<NodeRef<marker::Mut<'_>, _, _, marker::Internal>, _>` and don't know how to proceed.

(To be clear, I'm not asking for guidance right now; I'd be happy getting only the HashMap implementation — the subject of this PR — reviewed and ready, and leave the BTreeMap implementation for a latter PR.)
2019-10-09 05:31:33 +02:00
Félix Saparelli bdcc21cbc4 Implement (HashMap) Entry::insert as per #60142 2019-10-09 11:00:29 +13:00
Josh Stone 29cd7eb6c9 Update other rayon uses to 1.2 too 2019-10-07 13:44:30 -07:00
Josh Stone 33c4125fbe Rebase rustc-rayon on rayon-1.2
See also https://github.com/rust-lang/rustc-rayon/pull/3
2019-10-07 13:20:17 -07:00
Tyler Mandry c457b6fcbf
Rollup merge of #65101 - mati865:rustc_macro-deps, r=nikomatsakis
Upgrade librustc_macros dependencies

Passed tests on Linux.
2019-10-06 11:41:56 -07:00
Mark Rousskov 7c3f65b3c4 middle::intrinsicck -> rustc_passes 2019-10-04 11:11:33 -04:00
Mateusz Mikuła d89608829c Upgrade librustc_macros dependencies 2019-10-04 14:43:23 +02:00
Alex Crichton 4447388f17 Update `Cargo.lock` for cargo update 2019-10-01 15:02:45 -07:00
bors 22bc9e1d9c Auto merge of #64778 - csmoe:index, r=eddyb
Introduce librustc_index crate

Closes #50592
2019-09-30 13:33:15 +00:00
Ralf Jung 17fa7fe77e bump Miri 2019-09-29 13:57:26 -04:00
csmoe 64f61c7888 remove indexed_vec re-export from rustc_data_structures 2019-09-29 16:48:31 +00:00
csmoe d20183dbbf remove bit_set re-export from rustc_data_structures 2019-09-29 16:11:30 +00:00
csmoe 17990637b3 move bit_set into rustc_index 2019-09-29 16:11:30 +00:00
csmoe 1cff2e6557 move index_vec into rustc_index 2019-09-29 16:11:30 +00:00
Mazdak Farrokhzad e3a5179c7e
Rollup merge of #64847 - mati865:env_logger, r=alexcrichton
Upgrade env_logger to 0.7

`./x.py test` passed locally.
2019-09-28 05:37:57 +02:00
Mazdak Farrokhzad 83dcdd99dd Remove librustc_ast_borrowck from driver & interface. 2019-09-27 19:48:06 +02:00
Mateusz Mikuła 3e4f582699 Upgrade env_logger to 0.7 2019-09-26 13:19:14 +02:00
Manish Goregaokar c4206820b2 Update clippy 2019-09-25 14:56:34 -07:00
bors c7bc0bf82f Auto merge of #64627 - nnethercote:ObligForest-even-more, r=nikomatsakis
Even more `ObligationForest` improvements

Following on from #64545, more speed and readability improvements.

r? @nikomatsakis
2019-09-25 05:54:00 +00:00
Mazdak Farrokhzad 66ca0eb79a
Rollup merge of #64743 - alexcrichton:update-cargo, r=nikomatsakis
Update cargo

11 commits in b6c6f685b38d523580813b0031677c2298f458ea..aa6b7e01abce30091cc594cb23a15c46cead6e24
2019-09-19 21:10:09 +0000 to 2019-09-24 17:19:12 +0000
- Fix interpretation of `--features a b` on the CLI (rust-lang/cargo#7419)
- Update env_logger requirement from 0.6.0 to 0.7.0 (rust-lang/cargo#7422)
- Update some unstable docs (rust-lang/cargo#7407)
- Fix xcompile tests. (rust-lang/cargo#7408)
- -Ztimings: Fix more scale problems. (rust-lang/cargo#7403)
- Fix some rendering issues with -Ztimings. (rust-lang/cargo#7397)
- -Ztimings: show max jobs/cpus (rust-lang/cargo#7398)
- Fix -Ztimings with doc tests. (rust-lang/cargo#7395)
- Add documentation for the -Zdoctest-xcompile feature (rust-lang/cargo#7391)
- Fix integration tests waiting for binaries to finish. (rust-lang/cargo#7394)
- Extract Platform to a separate crate. (rust-lang/cargo#7375)
2019-09-25 03:48:29 +02:00
Mazdak Farrokhzad 9e12827d56
Rollup merge of #64702 - sinkuu:deps, r=jonas-schievink
Remove unused dependencies
2019-09-24 23:45:27 +02:00
Alex Crichton 5c5e3facab Update cargo
11 commits in b6c6f685b38d523580813b0031677c2298f458ea..aa6b7e01abce30091cc594cb23a15c46cead6e24
2019-09-19 21:10:09 +0000 to 2019-09-24 17:19:12 +0000
- Fix interpretation of `--features a b` on the CLI (rust-lang/cargo#7419)
- Update env_logger requirement from 0.6.0 to 0.7.0 (rust-lang/cargo#7422)
- Update some unstable docs (rust-lang/cargo#7407)
- Fix xcompile tests. (rust-lang/cargo#7408)
- -Ztimings: Fix more scale problems. (rust-lang/cargo#7403)
- Fix some rendering issues with -Ztimings. (rust-lang/cargo#7397)
- -Ztimings: show max jobs/cpus (rust-lang/cargo#7398)
- Fix -Ztimings with doc tests. (rust-lang/cargo#7395)
- Add documentation for the -Zdoctest-xcompile feature (rust-lang/cargo#7391)
- Fix integration tests waiting for binaries to finish. (rust-lang/cargo#7394)
- Extract Platform to a separate crate. (rust-lang/cargo#7375)
2019-09-24 11:06:56 -07:00
Alex Crichton b923306913 Remove `--enable-extended` from cross dist builder
Shouldn't have an effect on produced artifacts and otherwise is causing
issues where `-Zsave-analysis` is passed during tests but fails
compilation.
2019-09-23 09:34:44 -07:00
Shotaro Yamada 0423c2a7a3 Remove unused dependencies 2019-09-23 15:25:00 +09:00
Lzu Tao bbce971bf7 Update clippy 2019-09-22 15:02:12 +00:00
Nicholas Nethercote 3eae7f6291 Upgrade to ena-0.13.1 and use the new `inlined_probe_value` function.
This is a big speed win for `keccak` and `inflate`.
2019-09-20 11:24:30 +10:00
Mazdak Farrokhzad 11a0b968c2
Rollup merge of #64536 - Aaron1011:cargo-crate-type, r=ehuss
Update Cargo

This pulls in https://github.com/rust-lang/cargo/pull/7159, which
ensures that documenting proc macros works correctly.
2019-09-19 04:53:08 +02:00
Aaron Hill d440e136e7
Update Cargo
This pulls in https://github.com/rust-lang/cargo/pull/7159, which
ensures that documenting proc macros works correctly.
2019-09-18 21:53:50 -04:00
Pietro Albini a7a6dedfe6
Revert "Rollup merge of #64451 - RalfJung:miri-manifest, r=pietroalbini"
This reverts commit 7975973e2b, reversing
changes made to f0320e54c7.
2019-09-17 09:58:55 +02:00
Mazdak Farrokhzad aeb32f01b6
Rollup merge of #64380 - alexcrichton:update-openssl, r=Mark-Simulacrum
Update bundled OpenSSL to 1.1.1d

Brings in a few minor security fixes to the distributed Cargo/etc.
2019-09-17 03:08:35 +02:00
Mazdak Farrokhzad a31d71f56b
Rollup merge of #64485 - RalfJung:miri, r=alexcrichton
update Miri

Fixes https://github.com/rust-lang/rust/issues/64363

r? @alexcrichton for the Cargo.toml changes: with byteorder 1.3, the `i128` feature is a NOP, so we can remove it everywhere and then get rid of this crate in the workspace-hack.
2019-09-16 23:21:49 +02:00
Ralf Jung f90a81c238 with byteorder 1.3, the i128 feature is a NOP 2019-09-16 18:28:05 +02:00
Ralf Jung 4b175339b8 update miri 2019-09-16 18:27:28 +02:00
bors a44881d892 Auto merge of #64510 - Centril:rollup-m03zsq8, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #63955 (Make sure interned constants are immutable)
 - #64028 (Stabilize `Vec::new` and `String::new` as `const fn`s)
 - #64119 (ci: ensure all tool maintainers are assignable on issues)
 - #64444 (fix building libstd without backtrace feature)
 - #64446 (Fix build script sanitizer check.)
 - #64451 (when Miri tests are not passing, do not add Miri component)
 - #64467 (Hide diagnostics emitted during --cfg parsing)
 - #64497 (Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given)
 - #64499 (Use `Symbol` in two more functions.)
 - #64504 (use println!() instead of println!(""))

Failed merges:

r? @ghost
2019-09-16 15:35:48 +00:00
Mazdak Farrokhzad 7975973e2b
Rollup merge of #64451 - RalfJung:miri-manifest, r=pietroalbini
when Miri tests are not passing, do not add Miri component

This makes build-manifest query the toolstate repo at https://github.com/rust-lang-nursery/rust-toolstate to figure out if the tests of the Miri component are passing. If they are not, we remove the component from the manifest, to avoid shipping a broken Miri.

I tested this locally by running build-manifest and making sure that it correctly detects the toolstate of 02785dabad as broken.

r? @pietroalbini
Cc @kennytm @alexcrichton

Fixes https://github.com/rust-lang/rust/issues/60301
2019-09-16 17:09:40 +02:00
bors 16c4011673 Auto merge of #64381 - mati865:rand, r=alexcrichton
Upgrade parking_lot and tempfile rustc dependencies

This should be last piece to unbreak `rustc` in https://github.com/rust-lang/rust/issues/63848
2019-09-16 11:47:11 +00:00
bors 572d3d9634 Auto merge of #60584 - jonas-schievink:ice-panic-hook, r=oli-obk
Use `panic::set_hook` to print the ICE message

This allows custom frontends and backends to override the hook with their own, for example to point people to a different issue tracker.

ICE messages are printed in a slightly different order now. Nightly prints:

```
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0658.
For more information about an error, try `rustc --explain E0277`.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.36.0-nightly (08bfe1612 2019-05-02) running on x86_64-unknown-linux-gnu
```

After this PR, rustc prints:

```
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.36.0-dev running on x86_64-unknown-linux-gnu

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0658.
For more information about an error, try `rustc --explain E0277`.
```
2019-09-15 00:10:08 +00:00
Mazdak Farrokhzad f7dd5d0f20
Rollup merge of #64384 - mati865:tools_hack, r=alexcrichton
Trim rustc-workspace-hack

Those dependencies seem no longer necessary.
`./x.py test` and `x86_64-gnu-tools` container passed locally so I think this won't hurt.
2019-09-14 16:42:31 +02:00
Ralf Jung 766c4a556e build-manifest: when Miri tests are not passing, do not add Miri component 2019-09-14 12:57:39 +02:00
Mateusz Mikuła 612c3947b4 Trim rustc-workspace-hack 2019-09-12 14:12:12 +02:00
Mateusz Mikuła 935394f4f8 Upgrade parking_lot and tempfile rustc dependencies 2019-09-11 19:15:32 +02:00
Alex Crichton b88bcf0f9d Update bundled OpenSSL to 1.1.1d
Brings in a few minor security fixes to the distributed Cargo/etc.
2019-09-11 06:55:40 -07:00
Mark Rousskov 2fc32b9e72 Locate rustc binary similarly to codegen backend loading
This ensures that the failure cases for finding the codegen backend and
for finding the rustc binary are essentially the same, and since we
almost always will load the codegen backend, this is essentially meaning
that the rustc change is not a regression.
2019-09-10 16:57:14 -04:00
Mazdak Farrokhzad 342722e584
Rollup merge of #64320 - alexcrichton:update-patch, r=RalfJung
Update version of `rustc-std-workspace-*` crates

This commit updates the version of the `rustc-std-workspace-*` crates
in-tree which are used in `[patch]`. This will guarantee that Cargo will
select these versions even if minor updates are published to crates.io
because otherwise a newer version on crates.io would be preferred which
misses the point of `[patch]`!
2019-09-09 22:18:14 +02:00
Mazdak Farrokhzad f353d49edd
Rollup merge of #64279 - Xanewok:bump-rustc-ap, r=tmandry
Bump RLS and Rustfmt submodules to use rustc-ap-* v583

Closes #64180
Closes #64179

r? @topecongiro
2019-09-09 22:18:11 +02:00
Mazdak Farrokhzad 611458ba06
Rollup merge of #63806 - mati865:rand, r=alexcrichton
Upgrade rand to 0.7

Also upgrades `getrandom` to avoid bug encountered by https://github.com/rust-lang/rust/pull/61393 which bumps libc to `0.2.62`.
2019-09-09 22:18:08 +02:00
Alex Crichton 6c74bc9518 Update version of `rustc-std-workspace-*` crates
This commit updates the version of the `rustc-std-workspace-*` crates
in-tree which are used in `[patch]`. This will guarantee that Cargo will
select these versions even if minor updates are published to crates.io
because otherwise a newer version on crates.io would be preferred which
misses the point of `[patch]`!
2019-09-09 13:02:10 -07:00
Igor Matuszewski c2249a4bf9 cargo update -p rustfmt-nightly 2019-09-09 18:18:21 +02:00
Mazdak Farrokhzad 24172084e1
Rollup merge of #64152 - cramertj:update-backtrace, r=alexcrichton
Use backtrace formatting from the backtrace crate

r? @alexcrichton
2019-09-08 12:11:56 +02:00
Mazdak Farrokhzad 448b38f0bf
Rollup merge of #64235 - mati865:env_logger, r=alexcrichton
Upgrade env_logger to 0.6
2019-09-07 20:01:48 +02:00
Mazdak Farrokhzad 89a69fd76d
Rollup merge of #64139 - Mark-Simulacrum:strip-legacy-proc-macro, r=petrochenkov
Migrate internal diagnostic registration to macro_rules

Review is best done commit-by-commit.

Fixes #64132.
2019-09-07 20:01:44 +02:00
Mateusz Mikuła 8ddbe7660f Upgrade env_logger to 0.6 2019-09-06 20:04:12 +02:00
Mateusz Mikuła 32101ad3b3 Upgrade rand to 0.7 2019-09-06 14:45:28 +02:00
Mazdak Farrokhzad 5b995397db
Rollup merge of #63676 - newpavlov:wasi, r=alexcrichton
Use wasi crate for Core API

Blocked by: CraneStation/rust-wasi#5

Blocks: rust-lang/libc#1461

cc @sunfishcode @alexcrichton
2019-09-06 09:36:36 +02:00
Mark Rousskov 3f1dc326ed Remove codegen dependencies
Not doing this leads to building two copies of e.g. num_cpus in the
sysroot and _llvm deps, leading to conflicts between the two when
compiling librustc_codegen_llvm. It's not entirely clear why this is the
case after the changes in this PR but likely has something to do with a
subtle difference in ordering or similar.
2019-09-05 12:35:18 -04:00
bors 618768492f Auto merge of #64172 - Centril:rollup-8i8oh54, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #62848 (Use unicode-xid crate instead of libcore)
 - #63774 (Fix `window.hashchange is not a function`)
 - #63930 (Account for doc comments coming from proc macros without spans)
 - #64003 (place: Passing `align` = `layout.align.abi`, when also passing `layout`)
 - #64030 (Fix unlock ordering in SGX synchronization primitives)
 - #64041 (use TokenStream rather than &[TokenTree] for built-in macros)
 - #64051 (Add x86_64-linux-kernel target)
 - #64063 (Fix const_err with `-(-0.0)`)
 - #64083 (Point at appropriate arm on type error on if/else/match with one non-! arm)
 - #64100 (Fix const eval bug breaking run-pass tests in Miri)
 - #64157 (Opaque type locations in error message for clarity.)

Failed merges:

r? @ghost
2019-09-05 12:41:41 +00:00
Taylor Cramer 290f5b2275 Use backtrace formatting from the backtrace crate 2019-09-04 16:18:12 -07:00
Aleksey Kladov a0c186c34f remove XID and Pattern_White_Space unicode tables from libcore
They are only used by rustc_lexer, and are not needed elsewhere.

So we move the relevant definitions into rustc_lexer (while the actual
unicode data comes from the unicode-xid crate) and make the rest of
the compiler use it.
2019-09-04 13:11:11 +03:00
Albin Stjerna 2adb246b5c NLL: New Polonius version 2019-09-04 09:44:40 +02:00
bors 2d851b3318 Auto merge of #63975 - topecongiro:rustfmt-1.4.6, r=nikomatsakis
Update rustfmt to 1.4.6

This PR updates rustfmt to 1.4.6. [CHANGELOG](https://github.com/rust-lang/rustfmt/blob/v1.4.6/CHANGELOG.md#146-2019-08-28).
2019-08-31 01:35:10 +00:00
Jonas Schievink eefae7b1a9 Update Cargo.lock 2019-08-30 12:34:38 +02:00