Commit Graph

694 Commits

Author SHA1 Message Date
Yuki Okushi
9f8628b38c
cargo update -p atty --aggressive
Updating atty v0.2.11 -> v0.2.14
    Removing c2-chacha v0.2.3
    Updating cc v1.0.52 -> v1.0.54
    Updating ppv-lite86 v0.2.6 -> v0.2.8
    Updating rand_chacha v0.2.1 -> v0.2.2
    Removing redox_termios v0.1.1
    Removing termion v1.5.1
2020-05-26 13:35:21 +09:00
Yuki Okushi
a6e58ae3ce
cargo update -p rls-analysis
Removing itertools v0.7.8
    Updating rls-analysis v0.18.0 -> v0.18.1
    Updating rls-span v0.5.1 -> v0.5.2
2020-05-26 13:33:06 +09:00
Yuki Okushi
b4b76b8206
cargo update -p regex --aggressive
Updating aho-corasick v0.7.3 -> v0.7.10
    Updating memchr v2.3.2 -> v2.3.3
    Updating regex v1.1.6 -> v1.3.7
    Updating regex-syntax v0.6.6 -> v0.6.17
    Removing thread_local v0.3.6
    Removing ucd-util v0.1.3
    Removing utf8-ranges v1.0.2
2020-05-26 13:06:07 +09:00
Yuki Okushi
1f0a395079
cargo update -p colored
Updating colored v1.6.0 -> v1.9.3
    Removing lazy_static v0.2.11
2020-05-26 13:05:49 +09:00
Ralf Jung
fb848a6b7d
Rollup merge of #72388 - Aaron1011:fix/deep-tokenstream-equality, r=petrochenkov
Recursively expand `TokenKind::Interpolated` in `probably_equal_for_proc_macro`

Fixes #68430

When comparing the captured and re-parsed `TokenStream` for a `TokenKind::Interpolated`, we currently treat any nested `TokenKind::Interpolated` tokens as unequal. If a `TokenKind::Interpolated` token shows up in the captured `TokenStream` due to a `macro_rules!` expansion, we will throw away the captured `TokenStream`, losing span information.

This PR recursively invokes `nt_to_tokenstream` on nested `TokenKind::Interpolated` tokens, effectively flattening the stream into a sequence of non-interpolated tokens. This allows it to compare equal with the re-parsed stream, allowing us to keep the original captured `TokenStream` (with span information).

This requires all of the `probably_equal_for_proc_macro` methods to be moved from `librustc_ast` to `librustc_parse` so that they can call `nt_to_tokenstream`.
2020-05-24 09:30:31 +02:00
bors
75b0a68f35 Auto merge of #72478 - Dylan-DPC:rollup-vval8du, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #71289 (Allow using `Self::` in doc)
 - #72375 (Improve E0599 explanation)
 - #72385 (Add some teams to prioritization exclude_labels)
 - #72395 (Allow rust-highfive to label issues it creates.)
 - #72453 (Add flag to open docs:  x.py doc --open)
 - #72459 (Add core::future::IntoFuture)
 - #72461 (Clean up E0600 explanation)

Failed merges:

r? @ghost
2020-05-23 07:18:17 +00:00
Dylan MacKenzie
c282c1c654 Use OnceCell instead of Once 2020-05-22 13:31:02 -07:00
Dylan MacKenzie
9f82785c81 Replace rustc_data_structures::sync::Once with OnceCell 2020-05-22 13:26:39 -07:00
Aaron Hill
5685e4dd90
Fix rebase fallout 2020-05-22 15:12:11 -04:00
David Tolnay
6a3aae8aea
Add flag to open docs: x.py doc --open
Tested with:

       # opens doc/index.html
    x.py doc --stage 0 --open
    x.py doc --stage 0 --open src/doc

       # opens doc/book/index.html
    x.py doc --stage 0 --open src/doc/book

       # opens doc/std/index.html
    x.py doc --stage 0 --open src/libstd

       # opens doc/proc_macro/index.html
    x.py doc --stage 0 --open src/libproc_macro

       # opens both
    x.py doc --stage 0 --open src/libstd src/libproc_macro
2020-05-21 21:42:38 -07:00
Dylan DPC
c93ddbf811
Rollup merge of #72364 - jsgf:remove-unused-deps, r=Mark-Simulacrum
Remove unused dependencies

Remove some unused dependencies found while while working on https://github.com/rust-lang/rust/pull/72342.
2020-05-20 14:21:11 +02:00
bors
692a26e8d7 Auto merge of #72339 - ehuss:update-cargo, r=ehuss
Update cargo

9 commits in cb06cb2696df2567ce06d1a39b1b40612a29f853..500b2bd01c958f5a33b6aa3f080bea015877b83c
2020-05-08 21:57:44 +0000 to 2020-05-18 17:12:54 +0000
- Handle LTO with an rlib/cdylib crate type (rust-lang/cargo#8254)
- Gracefully handle errors during a build. (rust-lang/cargo#8247)
- Update `im-rc` to 15.0.0 (rust-lang/cargo#8255)
- Fix `cargo update` with unused patch. (rust-lang/cargo#8243)
- Rephrased error message for disallowed sections in virtual workspace (rust-lang/cargo#8200)
- Ignore broken console output in some situations. (rust-lang/cargo#8236)
- Expand error message to explain that a string was found (rust-lang/cargo#8235)
- Add context to some fs errors. (rust-lang/cargo#8232)
- Move SipHasher to an isolated module. (rust-lang/cargo#8233)
2020-05-20 02:22:44 +00:00
Jeremy Fitzhardinge
508e3f2bdc Remove unused dependencies 2020-05-19 14:34:23 -07:00
Amanieu d'Antras
1cfdc7ed0c Update dlmalloc dependency to 0.1.4 2020-05-19 18:25:41 +01:00
Eric Huss
c8443bb33a Update cargo 2020-05-18 15:41:57 -07:00
Amanieu d'Antras
5a20f39672 Update compiler_builtins to 0.1.28 2020-05-18 14:41:35 +01:00
Amanieu d'Antras
a656349b55 Move InlineAsmTemplatePiece and InlineAsmOptions to librustc_ast 2020-05-18 14:41:33 +01:00
Amanieu d'Antras
813a9fc4f1 Add asm! to AST 2020-05-18 14:39:54 +01:00
Stefan Lankes
06d692febd use new interface to initialize Condvar
HermitCore introduce a new interface to intialize conditional variables.
Consequently, minor changes are required to support this interface.
2020-05-17 23:49:18 +02:00
Dylan DPC
9dd7ad3ed2
Rollup merge of #71919 - Xanewok:bump-syn-1, r=Xanewok
Update transitive dependency to work towards removing syn <1.0 dep

This bumps a couple of transitive dependencies in hopes of eventually not transitively depending on syn <1.0 and friends. The only upstream changes that this is blocked on seems to be https://github.com/mattico/elasticlunr-rs/pull/27 and https://github.com/rust-lang/mdBook/pull/1210.

While working on https://github.com/rust-lang/rust/pull/71875 I noticed we still use syn 0.15 here and there so this is a drive-by PR which aims to help with things a bit.
2020-05-16 12:42:59 +02:00
bors
8453936049 Auto merge of #72079 - semarie:openbsd-stacker, r=Mark-Simulacrum
update stacker to 0.1.9 to unbreak build on OpenBSD

the version 0.1.8 of stacker (what is currently pinned in Cargo.lock) doesn't build on OpenBSD (see https://github.com/rust-lang/stacker/pull/34).

update the version to 0.1.9
2020-05-16 03:55:49 +00:00
flip1995
10f3cd9bea
Update Cargo.lock 2020-05-11 21:18:42 +02:00
Igor Matuszewski
e26f35d343 rustbook: Bump mdbook dependency 2020-05-11 14:43:41 +02:00
Igor Matuszewski
3bdacedfd9 cargo update -p derive-new 2020-05-11 14:43:41 +02:00
Igor Matuszewski
8c6e568141 cargo update -p pest_generator 2020-05-11 14:43:41 +02:00
Igor Matuszewski
403a9d0867 cargo update -p failure_derive 2020-05-11 14:43:41 +02:00
Igor Matuszewski
5e354932fe cargo update -p serde_derive 2020-05-11 14:40:52 +02:00
Sébastien Marie
a26335b2a0 update stacker to 0.1.9 to unbreak build on OpenBSD 2020-05-10 10:23:13 +00:00
Ralf Jung
37a9192826
Rollup merge of #71882 - alexcrichton:update-cc, r=Mark-Simulacrum
Update the `cc` crate

Pulls in updated MSVC detection logic landed in alexcrichton/cc-rs#488
2020-05-10 11:34:32 +02:00
Ralf Jung
366c1786e6
Rollup merge of #71555 - cjgillot:nameless, r=matthewjasper
Remove ast::{Ident, Name} reexports.

The reexport of `Symbol` into `Name` confused me.
2020-05-09 13:36:39 +02:00
Camille GILLOT
d4e143ed2f Remove ast::{Ident, Name} reexports. 2020-05-08 13:13:15 +02:00
Jack Huey
5fa4c63be0 Fix nit and cargo.lock 2020-05-07 17:46:31 -04:00
Jack Huey
a24df5b3cd Reintegrate chalk using chalk-solve 2020-05-07 17:35:58 -04:00
bors
97f3eeec82 Auto merge of #55617 - oli-obk:stacker, r=nagisa,oli-obk
Prevent compiler stack overflow for deeply recursive code

I was unable to write a test that

1. runs in under 1s
2. overflows on my machine without this patch

The following reproduces the issue, but I don't think it's sensible to include a test that takes 30s to compile. We can now easily squash newly appearing overflows by the strategic insertion of calls to `ensure_sufficient_stack`.

```rust
// compile-pass

#![recursion_limit="1000000"]

macro_rules! chain {
    (EE $e:expr) => {$e.sin()};
    (RECURSE $i:ident $e:expr) => {chain!($i chain!($i chain!($i chain!($i $e))))};
    (Z $e:expr) => {chain!(RECURSE EE $e)};
    (Y $e:expr) => {chain!(RECURSE Z $e)};
    (X $e:expr) => {chain!(RECURSE Y $e)};
    (A $e:expr) => {chain!(RECURSE X $e)};
    (B $e:expr) => {chain!(RECURSE A $e)};
    (C $e:expr) => {chain!(RECURSE B $e)};
    // causes overflow on x86_64 linux
    // less than 1 second until overflow on test machine
    // after overflow has been fixed, takes 30s to compile :/
    (D $e:expr) => {chain!(RECURSE C $e)};
    (E $e:expr) => {chain!(RECURSE D $e)};
    (F $e:expr) => {chain!(RECURSE E $e)};
    // more than 10 seconds
    (G $e:expr) => {chain!(RECURSE F $e)};
    (H $e:expr) => {chain!(RECURSE G $e)};
    (I $e:expr) => {chain!(RECURSE H $e)};
    (J $e:expr) => {chain!(RECURSE I $e)};
    (K $e:expr) => {chain!(RECURSE J $e)};
    (L $e:expr) => {chain!(RECURSE L $e)};
}

fn main() {
    let x = chain!(D 42.0_f32);
}
```

fixes #55471
fixes #41884
fixes #40161
fixes #34844
fixes #32594

cc @alexcrichton @rust-lang/compiler

I looked at all code that checks the recursion limit and inserted stack growth calls where appropriate.
2020-05-07 00:03:23 +00:00
Dylan DPC
a6a7c755fa
Rollup merge of #71591 - hermitcore:thread_create, r=hanna-kruppe
use new interface to create threads on HermitCore

- the new interface allows to define the stack size
- increase the default stack size to 1 MByte
2020-05-06 16:58:53 +02:00
Mateusz Mikuła
935a05f1be Update stacker and psm to 0.1.8 2020-05-06 11:37:18 +02:00
bors
8da5869fb7 Auto merge of #69464 - Marwes:detach_undo_log, r=nikomatsakis
perf: Unify the undo log of all snapshot types

Extracted from #69218 and extended to all the current snapshot types.

Since snapshotting is such a frequent action in the compiler and many of the scopes execute so little work, the act of creating the snapshot and rolling back empty/small snapshots end up showing in perf. By unifying all the logs into one the creation of snapshots becomes significantly cheaper at the cost of some complexity when combining the log with the specific data structures that are being mutated.

Depends on https://github.com/rust-lang-nursery/ena/pull/29
2020-05-06 07:03:31 +00:00
Igor Matuszewski
b512b1c7af Unify some syn 1.0 et al. features for tools 2020-05-05 15:29:15 +02:00
Igor Matuszewski
1dd0e3c38f Update RLS
In addition to fixing the toolstate, this also changes the default
compilation model to the out-of-process one, which should hopefully
target considerable memory usage for long-running instances of the RLS.
2020-05-05 14:16:26 +02:00
Markus Westerlind
bc7f7b2d4d refactor: Rename Logs to InferCtxtUndoLogs 2020-05-05 11:24:36 +02:00
Markus Westerlind
0c5d833812 Move projection_cache into the combined undo log 2020-05-05 11:24:23 +02:00
Markus Westerlind
caacdd2024 Move region_constraint to the unified undo log 2020-05-05 11:23:54 +02:00
Markus Westerlind
1506b1fc6a perf: Reduce snapshot/rollback overhead
By merging the undo_log of all structures part of the snapshot the cost
of creating a snapshot becomes much cheaper. Since snapshots with no or
few changes are so frequent this ends up mattering more than the slight
overhead of dispatching on the variants that map to each field.
2020-05-05 10:03:13 +02:00
Alex Crichton
3318187ebc Update the cc crate
Pulls in updated MSVC detection logic landed in alexcrichton/cc-rs#488
2020-05-04 08:35:45 -07:00
Dylan DPC
24e101c418
Rollup merge of #71542 - crlf0710:confusable_idents, r=petrochenkov
Implement `confusable_idents` lint.

This collects all identifier symbols into `ParseSession` and examines them within the non-ascii-idents lint.

The skeleton generation part needs to be added to `unicode-security` crate. Will update this PR when the crate is updated.

r? @petrochenkov

EDIT: also included the `concat_idents` part.
2020-05-03 14:18:02 +05:30
mibac138
90aa62a1bf Implement RFC 2523, #[cfg(version(..))] 2020-05-03 02:42:07 +02:00
Charles Lew
c05961c2db Implement confusable_idents lint. 2020-05-03 02:30:50 +08:00
Simonas Kazlauskas
a569f2970a Update psm and stacker to 0.1.7 2020-05-02 16:47:56 +02:00
Simonas Kazlauskas
a5c5365031 Move ensure_sufficient_stack to data_structures
We anticipate this to have uses in all sorts of crates and keeping it in
`rustc_data_structures` enables access to it from more locations without
necessarily pulling in the large `librustc` crate.
2020-05-02 16:47:52 +02:00
Oliver Scherer
26edcee093 Prevent stack overflow for deeply recursive code 2020-05-02 16:37:57 +02:00