Commit Graph

407 Commits

Author SHA1 Message Date
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
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