Commit graph

572 commits

Author SHA1 Message Date
Mazdak Farrokhzad f882b07977 remove rustc_ast_pretty dep from rustc 2020-02-01 18:59:49 +01:00
Mazdak Farrokhzad e233331a51 syntax::print -> new crate rustc_ast_pretty 2020-02-01 18:59:49 +01:00
Mazdak Farrokhzad 98fd6a5c88 1. move allow_internal_unstable to rustc_attr
2. as a result, drop rustc_errors dep from syntax
2020-02-01 18:58:08 +01:00
Mazdak Farrokhzad 097d5e1c5e 1. move node_id to syntax
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
2020-02-01 18:58:08 +01:00
Mazdak Farrokhzad 93a8283614 Move builtin attribute logic to new rustc_attr crate.
For now, this is all the crate contains, but more
attribute logic & types will be moved there over time.
2020-02-01 18:54:56 +01:00
Alex Crichton ad0e4a167d Update jobserver crate to 0.1.21
Brings in a fix for alexcrichton/jobserver-rs#23 which could cause Cargo
to unnecessarily hang in some situations.
2020-01-29 23:47:01 -08:00
John Kåre Alsaker b0b11d31a2 Use termize instead of term_size 2020-01-29 01:13:48 +01:00
Alex Crichton aabf4e9253 Update some of Cargo's dependencies
This is primarily updating the `curl` dependency, but also went ahead
and applied a few updates for other packages that Cargo depends on.
2020-01-23 15:17:55 -08:00
Victor Ding 6a6ebb4403 Add -Z no-link flag
Adds a compiler option to allow rustc compile a crate without linking.
With this flag, rustc serializes codegen_results into a .rlink file.
2020-01-23 11:00:36 +11:00
Mazdak Farrokhzad 06029c4498
Rollup merge of #68421 - ehuss:update-cargo-books, r=alexcrichton
Update cargo, books

## cargo

9 commits in ad3dbe10e1e654fb1f032a5dd9481d7cbaa00d65..f6449ba236db31995255ac5e4cad4ab88296a7c6
2020-01-13 21:37:15 +0000 to 2020-01-21 16:15:39 +0000
- Fix wrong directories in host_libdir. (rust-lang/cargo#7798)
- Update humantime requirement from 1.2.0 to 2.0.0 (rust-lang/cargo#7815)
- Fix doc_target test which no longer works on stable/beta. (rust-lang/cargo#7817)
- Fix some erroneous em-dashes in man pages. (rust-lang/cargo#7814)
- fix some clippy warnings (rust-lang/cargo#7808)
- Don't assume iowait always increases on Linux (rust-lang/cargo#7803)
- Add and update some doc comments. (rust-lang/cargo#7800)
- Consistently use em-dash in environment documentation page. (rust-lang/cargo#7799)
- Load credentials only when needed (rust-lang/cargo#7774)

## reference

3 commits in e1157538e86d83df0cf95d5e33bd943f80d0248f..11e893fc1357bc688418ddf1087c2b7aa25d154d
2019-12-22 13:13:14 +0100 to 2020-01-18 21:24:08 +0100
- Small improvements to types/pointer.md (rust-lang-nursery/reference#726)
- repr(transparent): mention align=1 requirement (rust-lang-nursery/reference#737)
- Elaborate on how to use an extern static correctly (rust-lang-nursery/reference#736)

## book

4 commits in 5c5cfd2e94cd42632798d9bd3d1116133e128ac9..87dd6843678575f8dda962f239d14ef4be14b352
2019-12-16 09:27:21 -0600 to 2020-01-20 15:20:40 -0500
- Fix listing numbers (rust-lang/book#2227)
- Move `async` and `await` keywords to 'Currently in Use' (rust-lang/book#2140)
- More cleanup - remove unneeded files (rust-lang/book#2213)
- Small cleanups extracted from the bigger pr i'm working on (rust-lang/book#2212)

## rust-by-example

1 commits in 1d59403cb5269c190cc52a95584ecc280345495a..1c2bd024d13f8011307e13386cf1fea2180352b5
2019-12-27 08:27:05 -0300 to 2020-01-20 12:18:36 -0300
- CamelCase -> UpperCamelCase (rust-lang/rust-by-example#1302)

## embedded-book

1 commits in 9493b7d4dc97eda439bd8780f05ad7b234cd1cd7..4d78994915af1bde9a95c04a8c27d8dca066232a
2019-12-27 20:05:00 +0000 to 2020-01-14 08:25:25 +0000
- Update .gitattributes  (rust-embedded/book#221)
2020-01-22 01:50:09 +01:00
Eric Huss d45d8b1c7b Update cargo, books 2020-01-21 09:55:43 -08:00
Mazdak Farrokhzad 58eb03d20f check_match: simplify check_arm 2020-01-20 23:39:24 +01:00
Mazdak Farrokhzad de6046fa0f remove rustc_error_codes deps except in rustc_driver 2020-01-18 21:53:53 +01:00
Dylan DPC 6b83862d09
Rollup merge of #67780 - cjgillot:passes-ty, r=Zoxc
Move some queries from rustc::ty to librustc_ty.

cc #65031
2020-01-16 11:58:00 +05:30
Dylan DPC 6270e49ce7
Rollup merge of #68232 - Mark-Simulacrum:unicode-tables, r=joshtriplett
Optimize size/speed of Unicode datasets

The overall implementation has the same general idea as the prior approach,
which was based on a compressed trie structure, but modified to use less space
(and, coincidentally, be an overall performance improvement).

Sizes | Old | New | New/current
-- | -- | -- | --
Alphabetic | 4616 | 2982 | 64.60%
Case_Ignorable | 3144 | 2112 | 67.18%
Cased | 2376 | 934 | 39.31%
Cc | 19 | 43 | 226.32%
Grapheme_Extend | 3072 | 1734 | 56.45%
Lowercase | 2328 | 985 | 42.31%
N | 2648 | 1239 | 46.79%
Uppercase | 1978 | 934 | 47.22%
White_Space | 241 | 140 | 58.09%
  |   |   |
Total | 20422 | 11103 | 54.37%

This table shows the size of the old and new tables in bytes. The most important
of these tables is "Grapheme_Extend", as it is present in essentially all Rust
programs due to being called from `str`'s Debug impl (`char::escape_debug`). In
a representative case given by this [blog post] for the embedded world, the
shrinking in this PR shrinks the final binary by 1,604 bytes, from 14,440 to
12,836.

The performance of these new tables, based on the (rough) benchmark of linearly
scanning the entire valid set of chars, querying for each `is_*`, is roughly
~50% better, though in some cases is either on par or slightly (3-5%) worse. In
practice, I believe the size benefits of this PR are the main concern. The new
implementation has been tested to be equivalent to the current nightly in terms
of returned values on the set of valid chars.

A (relatively) high-level explanation of the specific compression scheme used
can be found [in the generator].

This is split into three commits -- the first adds the generator which produces
the Rust code for the tables, the second adds support code for the lookup, and
the third actually swaps the current implementation out for the new one.

[blog post]: https://jamesmunns.com/blog/fmt-unreasonably-expensive/
[in the generator]: https://github.com/Mark-Simulacrum/rust/blob/unicode-tables/src/tools/unicode-table-generator/src/raw_emitter.rs
2020-01-15 22:49:27 +05:30
bors 6d0bb91bcb Auto merge of #68248 - JohnTitor:rollup-x0kml5f, r=JohnTitor
Rollup of 12 pull requests

Successful merges:

 - #67784 (Reset Formatter flags on exit from pad_integral)
 - #67914 (Don't run const propagation on items with inconsistent bounds)
 - #68141 (use winapi for non-stdlib Windows bindings)
 - #68211 (Add failing example for E0170 explanation)
 - #68219 (Untangle ZST validation from integer validation and generalize it to all zsts)
 - #68222 (Update the wasi-libc bundled with libstd)
 - #68226 (Avoid calling tcx.hir().get() on CRATE_HIR_ID)
 - #68227 (Update to a version of cmake with windows arm64 support)
 - #68229 (Update iovec to a version with no winapi dependency)
 - #68230 (Update libssh2-sys to a version that can build for aarch64-pc-windows…)
 - #68231 (Better support for cross compilation on Windows.)
 - #68233 (Update compiler_builtins with changes to fix 128 bit integer remainder for aarch64 windows.)

Failed merges:

r? @ghost
2020-01-15 13:00:43 +00:00
Yuki Okushi d2840e6bf1
Rollup merge of #68233 - danielframpton:update-compiler-builtins, r=alexcrichton
Update compiler_builtins with changes to fix 128 bit integer remainder for aarch64 windows.

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:59 +09:00
Yuki Okushi 2c994f22d6
Rollup merge of #68230 - danielframpton:update-libssh2-sys, r=alexcrichton
Update libssh2-sys to a version that can build for aarch64-pc-windows…

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:57 +09:00
Yuki Okushi cc07710196
Rollup merge of #68229 - danielframpton:update-iovec, r=alexcrichton
Update iovec to a version with no winapi dependency

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:55 +09:00
Yuki Okushi 58d348d3ab
Rollup merge of #68227 - danielframpton:update-cmake, r=alexcrichton
Update to a version of cmake with windows arm64 support

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:54 +09:00
Yuki Okushi be1ecce01f
Rollup merge of #68141 - euclio:replace-bindings-with-winapi, r=alexcrichton
use winapi for non-stdlib Windows bindings
2020-01-15 21:51:45 +09:00
Mark Rousskov 064f8885d5 Add unicode table generator 2020-01-14 19:11:15 -05:00
Daniel Frampton 106fe0b13a Update to a version of compiler_builtins with changes for fixes remainder for aarch64 windows 2020-01-14 13:32:26 -08:00
Daniel Frampton 9febc2bc7a Update to a version of cmake with windows arm64 support 2020-01-14 11:56:51 -08:00
Daniel Frampton 535fc9ce4c Update iovec to a version with no winapi dependency 2020-01-14 11:52:46 -08:00
Daniel Frampton 9f1452f699 Update libssh2-sys to a version that can build for aarch64-pc-windows-msvc 2020-01-14 11:26:03 -08:00
Eric Huss 55cb505257 Update rustfix in compiletest. 2020-01-14 09:50:55 -08:00
Eric Huss 6da85d6f99 Update cargo, rls 2020-01-14 09:47:04 -08:00
Camille GILLOT 9908a87367 Move to new crate rustc_ty. 2020-01-13 13:41:25 +01:00
bors 59c1db0339 Auto merge of #67901 - matthewjasper:split-mir-build, r=nagisa
Split MIR building into its own crate

This moves `rustc_mir::{build, hair, lints}` to `rustc_mir_build`.
The new crate only has a `provide` function as it's public API.

Based on #67898

cc @Centril @rust-lang/compiler
r? @oli-obk
2020-01-12 09:44:55 +00:00
Matthew Jasper b358929251 Split rustc_mir::{build, hair, lints} into their own crate 2020-01-12 09:39:26 +00:00
Andy Russell 7b564c67de
use winapi for non-stdlib Windows bindings 2020-01-11 20:56:46 -05:00
Mazdak Farrokhzad f58db20362 move rustc::lint::{context, passes} to rustc_lint.
Also do some cleanup of the interface.
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad 8c12c424e2 {rustc::lint -> rustc_lint}::internal 2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad 9634e1f7d9
Rollup merge of #67806 - Centril:splitsynmore, r=petrochenkov
Extract `rustc_ast_passes`, move gating, & refactor linting

Based on https://github.com/rust-lang/rust/pull/67770.

This PR extracts a crate `rustc_ast_passes`:

- `ast_validation.rs`, which is contributed by `rustc_passes` (now only has HIR based passes) -- the goal here is to improve recompilation of the parser,
- `feature_gate.rs`, which is contributed by `syntax` and performs post-expansion-gating & final erroring for pre-expansion gating,
- `show_span`, which is contributed by `syntax`.

To facilitate this, we first have to also:

- Move `{leveled_}feature_err{_err}` from `syntax::feature_gate::check` into `rustc_session::parse`.
- Move `get_features` into `rustc_parse::config`, the only place it is used.
- Move some some lint datatypes and traits, e.g. `LintBuffer`, `BufferedEarlyLint`, `BuiltinLintDiagnostics`, `LintPass`, and `LintArray` into `rustc_session::lint`.
- Move all the hard-wired lint `static`s into `rustc_session::lint::builtin`.
2020-01-11 04:02:22 +01:00
Mazdak Farrokhzad 7d6548a14a rustc_passes: remove unused rustc_parse dep 2020-01-11 03:30:20 +01:00
Mazdak Farrokhzad 6cbcb83022 {syntax -> rustc_ast_passes}::feature_gate 2020-01-11 03:30:20 +01:00
Mazdak Farrokhzad ed69fbbc44 ast_validation -> new crate rustc_ast_passes 2020-01-11 03:27:39 +01:00
Mazdak Farrokhzad f361b71a7d nix syntax::early_buffered_lints 2020-01-11 03:26:16 +01:00
Mazdak Farrokhzad 7dbccf5b55 buffered lint infra -> rustc_session 2020-01-11 03:21:34 +01:00
Mazdak Farrokhzad fff5ef68b0 canonicalize rustc::session import 2020-01-11 03:19:50 +01:00
Mazdak Farrokhzad 6007641d21 gating diagnostics -> rustc_session::parse 2020-01-11 03:15:32 +01:00
bors e621797264 Auto merge of #65241 - tmiasko:no-std-san, r=alexcrichton
build-std compatible sanitizer support

### Motivation

When using `-Z sanitizer=*` feature it is essential that both user code and
standard library is instrumented. Otherwise the utility of sanitizer will be
limited, or its use will be impractical like in the case of memory sanitizer.

The recently introduced cargo feature build-std makes it possible to rebuild
standard library with arbitrary rustc flags. Unfortunately, those changes alone
do not make it easy to rebuild standard library with sanitizers, since runtimes
are dependencies of std that have to be build in specific environment,
generally not available outside rustbuild process. Additionally rebuilding them
requires presence of llvm-config and compiler-rt sources.

The goal of changes proposed here is to make it possible to avoid rebuilding
sanitizer runtimes when rebuilding the std, thus making it possible to
instrument standard library for use with sanitizer with simple, although
verbose command:

```
env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-Zsanitizer=thread cargo test -Zbuild-std --target x86_64-unknown-linux-gnu
```

### Implementation

* Sanitizer runtimes are no long packed into crates. Instead, libraries build
  from compiler-rt are used as is, after renaming them into `librusc_rt.*`.
* rustc obtains runtimes from target libdir for default sysroot, so that
  they are not required in custom build sysroots created with build-std.
* The runtimes are only linked-in into executables to address issue #64629.
  (in previous design it was hard to avoid linking runtimes into static
  libraries produced by rustc as demonstrated by sanitizer-staticlib-link
  test, which still passes despite changes made in #64780).

cc @kennytm, @japaric, @firstyear, @choller
2020-01-10 23:26:21 +00:00
Yuki Okushi 7ae0618e0a
Rollup merge of #68050 - Centril:canon-error, r=Mark-Simulacrum
Canonicalize rustc_error imports

r? @Mark-Simulacrum
2020-01-11 04:50:53 +09:00
Michael Woerister ad65e3e6bc Fix some rebasing fallout. 2020-01-10 10:57:36 +01:00
Michael Woerister 11e4844480 Update measureme to 0.7.1 in order to fix compilation error on big-endian platforms. 2020-01-10 10:19:40 +01:00
Michael Woerister b8ead417a6 Initial support for recording query keys in self-profiling data. 2020-01-10 10:19:39 +01:00
Michael Woerister a62c040929 self-profile: Switch to new approach for event_id generation that enables query-invocation-specific event_ids. 2020-01-10 10:18:21 +01:00
Mazdak Farrokhzad 8bd3d240e3 nix syntax::errors & prefer rustc_errors over errors 2020-01-10 07:41:30 +01:00
Yuki Okushi a366aa6249
Rollup merge of #68040 - sinkuu:unused, r=petrochenkov
Cleanup
2020-01-10 04:18:42 +09:00
Tomasz Miąsko 78e7eeeaa1 Remove sanitizer runtime crates 2020-01-09 07:54:02 +01:00
Shotaro Yamada f443ae68c2 Remove unused dependencies 2020-01-09 11:52:03 +09:00
Mazdak Farrokhzad 2c3e5d3de0 - remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
2020-01-08 04:25:33 +01:00
bors ef92009c1d Auto merge of #66899 - msizanoen1:riscv-std, r=alexcrichton
Standard library support for riscv64gc-unknown-linux-gnu

Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support.

r? @alexcrichton
2020-01-06 19:07:42 +00:00
msizanoen1 d61e193cd0 Update cc crate 2020-01-06 22:44:57 +07:00
Mazdak Farrokhzad ebfd8673a7 Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad 937c76bfb2 cleanup librustc_hir/Cargo.toml 2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad 7a14073875 move def_id to new rustc_hir crate 2020-01-04 19:01:42 +01:00
Mazdak Farrokhzad 5ccc1e45bd move Node{Map,Set} -> rustc_session::node_id 2020-01-04 18:59:28 +01:00
Charles Lew 485e98aae2 Implement uncommon_codepoints lint. 2020-01-03 08:20:12 +08:00
bors 1ed41b0720 Auto merge of #67729 - mati865:deps, r=nikomatsakis
Bump smallvec
2020-01-01 15:10:48 +00:00
Mazdak Farrokhzad 7b6ef2b369 librustc_ast_lowering: cargo changes. 2019-12-31 17:33:10 +01:00
Vadim Petrochenkov b9a9c5b4fd Make things build again 2019-12-30 19:18:16 +03:00
Mateusz Mikuła d452f89206 Bump smallvec 2019-12-30 13:50:23 +01:00
Yuki Okushi f541e91a7a Update Cargo.lock 2019-12-29 17:03:07 +09:00
Oliver Scherer 31fd966647
Rollup merge of #67594 - oxalica:update-libc, r=Dylan-DPC
Update libc to 0.2.66

cc @gnzlbg @alexcrichton
2019-12-28 00:36:02 +01:00
Charles Lew 27e7a1baed Add unicode-normalization to whitelist. 2019-12-26 14:16:36 +08:00
Charles Lew 0bcddfe23a Normalize identifiers in librustc_parse. 2019-12-26 13:12:58 +08:00
oxalica ac31c71698
Update libc to 0.2.66 2019-12-25 01:51:05 +08:00
Ohad Ravid 811bdeee00 Show value for consts in the documentation 2019-12-24 10:10:36 +01:00
Mark Rousskov dddd872427 Implement rustfmt running manually using ignore crate
This replaces cargo-fmt with rustfmt with --skip-children which should
allow us to format code without running into rust-lang/rustfmt#3930.

This also bumps up the version of rustfmt used to a more recent one.
2019-12-21 20:23:55 -05:00
bors 5535c25314 Auto merge of #67495 - Centril:rollup-6aer3xg, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #67160 (Make GATs less ICE-prone.)
 - #67333 ([mir-opt] Fix `Inline` pass to handle inlining into `box` expressions)
 - #67420 (use _val to ignore parameter of any::type_name_of_val)
 - #67469 (Remove rustc-dev from the default nightly components)
 - #67489 (Drop petgraph dependency from bootstrap)
 - #67490 (Document privacy of RangeInclusive fields)
 - #67491 (use Result::map_or for bootstrap)

Failed merges:

r? @ghost
2019-12-21 20:59:22 +00:00
bors fc5deca214 Auto merge of #67206 - ehuss:update-cargo-books, r=dtolnay
Update cargo, books

Update nomicon, cargo, reference, book, rust-by-example, embedded-book

## nomicon

2 commits in 041c46e692a2592853aeca132c8dfe8eb5a79a9e..8be35b201f9cf0a4c3fcc96c83ac21671dcf3112
2019-11-20 16:46:45 +0100 to 2019-12-01 13:02:12 -0500
- Update unwinding.md
- ci: remove needless rust-docs component

## cargo

15 commits in 626f0f40efd32e6b3dbade50cd53fdfaa08446ba..5a139f7e6d67fd8a416a3f19d8e01581d24c0333
2019-12-03 16:53:04 +0000 to 2019-12-10 20:17:50 +0000
- Bump cargo-platform version. (rust-lang/cargo#7693)
- Add a test for `cargo locate-project` (rust-lang/cargo#7690)
- Emit error on [target.'cfg(debug_assertions)'.dependencies] and similar (rust-lang/cargo#7660)
- Update the layout of `Cargo Commands` in doc (rust-lang/cargo#7687)
- Features and dependencies can't have the same name (rust-lang/cargo#7682)
- Fix some typos in doc (rust-lang/cargo#7672)
- Add test for `NAME` environment variable when `cargo new` (rust-lang/cargo#7667)
- Add test for `GIT_COMMITTER_EMAIL` when `cargo new` (rust-lang/cargo#7666)
- document support for Bitbucket Pipelines badges (rust-lang/cargo#7663)
- Add cargo-vendor to the list of cargo commands in doc (rust-lang/cargo#7659)
- Fix typo in section 'Caching the Cargo home in CI' (rust-lang/cargo#7661)
- Docs: Add an appendix on git authentication. (rust-lang/cargo#7658)
- Remove --offline empty index error. (rust-lang/cargo#7655)
- Change the link destination of cargo book contribution (rust-lang/cargo#7657)
- Add a --offline hint. (rust-lang/cargo#7654)

## reference

2 commits in 9e843aeb4df083522c7277179bbaa25d0507731c..787e8d84034a4a0ae17084bbae25474152144b9a
2019-11-24 17:44:04 +0100 to 2019-12-10 10:01:29 -0800
- Update for visibility syntax changes. (rust-lang-nursery/reference#722)
- document `bind_by_move_pattern_guards` (rust-lang-nursery/reference#720)

## book

2 commits in 81ebaa2a3f88d4d106516c489682e64cacba4f60..ef8bb568035ded8ddfa30a9309026638cc3c8136
2019-11-15 08:30:04 -0800 to 2019-11-28 11:00:04 -0600
- Remove optional commas from match arms in ch18-03 (rust-lang/book#2176)
- Remove call_box() from ch20-03 (rust-lang/book#2177)

## rust-by-example

1 commits in 4835e025826729827a94fdeb7cb85fed288d08bb..b7ac1bc76b7d02a43c83b3a931d226f708aa1ff4
2019-11-14 09:20:43 -0300 to 2019-12-02 11:38:43 -0300
- Make TryFrom & TryInto example editable (rust-lang/rust-by-example#1297)

## embedded-book

1 commits in 5ca585c4a7552efb546e7681c3de0712f4ae4fdc..c26234930282210849256e4ecab925f0f2daf3be
2019-08-27 13:39:14 +0000 to 2019-12-07 17:25:11 +0000
- Fix `impl Gpio` -> `impl GpioConfig`  (rust-embedded/book#216)
2019-12-21 17:52:47 +00:00
Mark Rousskov 28af652793 Drop petgraph dependency from bootstrap
It was essentially unused, likely leftover from a previous refactoring
iteration.
2019-12-21 10:54:15 -05:00
Eric Huss e5d39ee842
Update cargo, books 2019-12-14 17:33:08 -08:00
Mateusz Mikuła 2d8d8136fa Update tokio crates to latest versions 2019-12-13 20:51:31 +01:00
bors 703c82e531 Auto merge of #62359 - euclio:remove-serialize, r=Dylan-DPC
replace serialize with serde in rustdoc

This is a slightly less aggressive version of #61028.

r? @GuillaumeGomez
2019-12-13 16:14:47 +00:00
Andy Russell 94630d4c8b
replace serialize with serde in rustdoc 2019-12-12 16:33:25 -05:00
Aaron Hill 47e932b96e
Fix weird implicit dependency between rustllvm and rustc_codegen_llvm
rustllvm relies on the `LLVMRustStringWriteImpl` symbol existing, but
this symbol was previously defined in a *downstream* crate
(rustc_codegen_llvm, which depends on rustc_llvm.

While this somehow worked under the old 'separate bootstrap step for
codegen' scheme, it meant that rustc_llvm could not actually be built by
itself, since it relied linking to the downstream rustc_codegen_llvm
crate.

Now that librustc_codegen_llvm is just a normal crate, we actually try
to build a standalone rustc_llvm when we run tests. This commit moves
`LLVMRustStringWriteImpl` into rustc_llvm (technically the rustllvm
directory, which has its contents built by rustc_llvm). This ensures
that we can build each crate in the graph by itself, without requiring
that any downstream crates be linked in as well.
2019-12-12 10:51:19 -05:00
Aaron Hill 150d328d2e
Update Cargo.lock 2019-12-11 09:50:46 -05:00
Aaron Hill fca192cca2
Fix fallout from rebase 2019-12-11 09:50:12 -05:00
Alex Crichton 7f23e6e8d7
rustc: Link LLVM directly into rustc again
This commit builds on #65501 continue to simplify the build system and
compiler now that we no longer have multiple LLVM backends to ship by
default. Here this switches the compiler back to what it once was long
long ago, which is linking LLVM directly to the compiler rather than
dynamically loading it at runtime. The `codegen-backends` directory of
the sysroot no longer exists and all relevant support in the build
system is removed. Note that `rustc` still supports a dynamically loaded
codegen backend as it did previously, it just no longer supports
dynamically loaded codegen backends in its own sysroot.

Additionally as part of this the `librustc_codegen_llvm` crate now once
again explicitly depends on all of its crates instead of implicitly
loading them through the sysroot. This involved filling out its
`Cargo.toml` and deleting all the now-unnecessary `extern crate`
annotations in the header of the crate. (this in turn required adding a
number of imports for names of macros too).

The end results of this change are:

* Rustbuild's build process for the compiler as all the "oh don't forget
  the codegen backend" checks can be easily removed.
* Building `rustc_codegen_llvm` is much simpler since it's simply
  another compiler crate.
* Managing the dependencies of `rustc_codegen_llvm` is much simpler since
  it's "just another `Cargo.toml` to edit"
* The build process should be a smidge faster because there's more
  parallelism in the main rustc build step rather than splitting
  `librustc_codegen_llvm` out to its own step.
* The compiler is expected to be slightly faster by default because the
  codegen backend does not need to be dynamically loaded.
* Disabling LLVM as part of rustbuild is still supported, supporting
  multiple codegen backends is still supported, and dynamic loading of a
  codegen backend is still supported.
2019-12-11 09:50:11 -05:00
Igor Matuszewski 5b091305c5 Update RLS and Rustfmt 2019-12-10 20:01:55 +01:00
bors 76a252ea9e Auto merge of #67110 - tmandry:bump-compiler-builtins, r=alexcrichton
Bump compiler-builtins

- https://github.com/rust-lang/compiler-builtins/pull/306
- https://github.com/rust-lang/compiler-builtins/pull/309
- https://github.com/rust-lang/compiler-builtins/pull/310
- https://github.com/rust-lang/compiler-builtins/pull/311
- https://github.com/rust-lang/compiler-builtins/pull/312
- https://github.com/rust-lang/compiler-builtins/pull/313
- https://github.com/rust-lang/compiler-builtins/pull/315
- https://github.com/rust-lang/compiler-builtins/pull/317
- https://github.com/rust-lang/compiler-builtins/pull/323
- https://github.com/rust-lang/compiler-builtins/pull/324
- https://github.com/rust-lang/compiler-builtins/pull/328

Adds support for backtraces from `__rust_probestack` plus other goodies.

r? @alexcrichton
2019-12-09 19:42:48 +00:00
bors 3ff17e7c5f Auto merge of #67016 - lqd:placeholder_loans, r=matthewjasper
In which we implement illegal subset relations errors using Polonius

This PR is the rustc side of implementing subset errors using Polonius. That is, in
```rust
fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'a u32 {
    y
}
```
returning `y` requires that `'b: 'a` but we have no evidence of that, so this is an error. (Evidence that the relation holds could come from explicit bounds, or via implied bounds).

Polonius outputs one such error per CFG point where the free region's placeholder loan unexpectedly flowed into another free region. While all these CFG locations could be useful in diagnostics in the future, rustc does not do that (and the duplication is only partially handled in the rest of the errors/diagnostics infrastructure, e.g. duplicate suggestions will be shown by the "outlives suggestions" or some of the `#[rustc_*]` NLL/MIR debug dumps), so I deduplicated the errors.

(The ordering also matters, otherwise some of the elided lifetime naming would change behaviour).

I've blessed a couple of tests, where the output is currently suboptimal:
- the `hrtb-perfect-forwarding` tests mix subset errors with higher-ranked subtyping, however the plan is for chalk to eventually take care of some of this to generate polonius constraints (i.e. it's not polonius' job). Until that happens, polonius will not see the error that NLL sees.
- some other tests have errors and diagnostics specific to `'static`, I _believe_ this to be because of it being treated as more "special" than in polonius. I believe the output is not wrong, but could be better, and appears elsewhere (I feel we'll need to look at polonius' handling of `'static` at some point in the future, maybe to match a bit more what NLL does when it produces errors)

I'll create a tracking issue in the polonius repo to record these 2 points (and a general "we'll need to go over the blessed output" issue, much like we did for NLLs)

The last blessed test is because it's an improvement: in this case, more errors/suggestions were computed, instead of the existing code path where this case apparently stops at the first error.

The `Naive` variant in Polonius computes those errors, so this PR also switches the default variant to that, as we're also in the process of temporarily deactivating all other variants (which exist mostly for performance considerations) until we have completed more work on completeness and correctness, before focusing on efficiency once again.

While most of the correctness in this PR is hidden in the polonius compare-mode (which of course passes locally), I've added a couple of smoke-tests to the existing ones, so that we have some confidence that it works (and keeps working) until we're in a position where we can run them on CI.

As mentioned during yesterday's wg-polonius meeting, @nikomatsakis has already read through most of this PR (and which is matching  what they thought needed to be done [during the recent Polonius sprint](https://hackmd.io/CGMNjt1hR_qYtsR9hgdGmw#Compiler-notes-on-generating-the-placeholder-loans-support)), but Matthew was hopefully going to review (again, not urgent), so:

r? @matthewjasper

(This updates to the latest `polonius-engine` release, and I'm not sure whether `Cargo.lock` updates can easily be rolled up, but apart from that: this changes little that's tested on CI, so seems safe-ish to rollup ?)
2019-12-09 10:50:41 +00:00
bors 59947fcae6 Auto merge of #66981 - michaelwoerister:measureme-0.5.0, r=Mark-Simulacrum
Update measureme crate to 0.5.0

This PR updates the `measureme` self-profiling crate to the latest release. Heads up, this version changes the trace file format, so the `summarize` tool on perf.rlo needs to be updated to 0.5 too.

r? @Mark-Simulacrum
cc @wesleywiser
2019-12-08 19:43:29 +00:00
Ralf Jung 3d05a2705f update Miri 2019-12-08 11:34:36 +01:00
Tyler Mandry 5f4c2ca1aa Bump compiler-builtins 2019-12-06 18:33:07 -08:00
lqd 479cc7ae9a update to polonius 0.11 to compute subset errors
- adapt to the new polonius `FactTypes` API
- reorganize the type aliases referring to polonius to avoid referencing the inner atom or fact types multiple times: only one input and output types should be enough for everyone. They could equally be in `borrow_check` as `nll` though.
2019-12-06 11:50:01 +01:00
Mazdak Farrokhzad 74804fa3e7 rustc_parser: cleanup imports 2019-12-05 06:38:06 +01:00
Mazdak Farrokhzad b6602d2dd1
Rollup merge of #66878 - Mark-Simulacrum:sess-decouple, r=Centril
Move Sessions into (new) librustc_session

This PR moves `ParseSess` and `Session` from their current locations into a new crate, `librustc_session`.

There are several intents behind this change. librustc is a very large crate, and we want to split it up over time -- this movement removes the sizeable session module from it. It also helps allow for future movement of things not coupled to TyCtxt but coupled to Session out of the crate.

This movement allows allows for a future follow-up PR which unifies Session and ParseSess, allowing for a single source of truth for APIs interested in global options throughout the compiler; the ParseSess is already created directly as a member of Session in the current compiler (i.e., we do not first construct a ParseSess and then move it into Session later in the compilation).

This PR intentionally avoids changing numerous imports throughout the tree to new locations of the moved types; this is needless noise and can be done as needed.

In the process of moving the sessions back, the lint system received an update as well -- notably, early buffered lints are no longer ad-hoc declared as enum pairs and later associated with proper lint declarations. They are still separately handled (buffered), it is a little unclear whether this is truly necessary, but regardless is left for future PRs.

Many of the types moved back are sort of ad-hoc placed into the same crate (librustc_session) instead of creating other crates; it's unclear whether this is actually a good thing, but it seemed better than creating numerous tiny crates which served no purpose on their own.
2019-12-03 19:41:48 +01:00
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