Commit Graph

676 Commits

Author SHA1 Message Date
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
Ralf Jung
cd824a5232
Rollup merge of #71712 - RalfJung:error-backtrace, r=oli-obk
Miri: port error backtraces to std::backtrace

No need to pull in an external dependency if libstd already includes this feature (using the same dependency internally, but... still).

r? @oli-obk
2020-05-02 12:08:03 +02:00
bors
e94eaa6dce Auto merge of #70674 - cjgillot:query-arena-all, r=matthewjasper
Have the per-query caches store the results on arenas

This PR leverages the cache for each query to serve as storage area for the query results.

It introduces a new cache `ArenaCache`, which moves the result to an arena,
and only stores the reference in the hash map.
This allows to remove a sizeable part of the usage of the global `TyCtxt` arena.

I only migrated queries that already used arenas before.
2020-05-01 01:38:05 +00:00
Tyler Mandry
59abc2afd8
Rollup merge of #71719 - tmandry:update-backtrace-sys, r=Mark-Simulacrum
Update backtrace-sys

Diff:

- Don't look for old RUSTC_DEBUGINFO vars (rust-lang/backtrace-rs#313)

This fixes an issue of libbacktrace never being built with debuginfo.

r? @Mark-Simulacrum
cc @alexcrichton
2020-04-30 15:23:20 -07:00
Tyler Mandry
8192cb6ea3
Rollup merge of #71682 - ehuss:bump-pulldown-cmark, r=Dylan-DPC
Bump pulldown-cmark

Pulls in 0.7.1 with the following fixes:

- Update html5ever to 0.25
- Fix hang on unclosed html element

Closes #70871
2020-04-30 15:23:15 -07:00
Tyler Mandry
2bafb1b1d7 Update backtrace-sys
Diff:

- Don't look for old RUSTC_DEBUGINFO vars (rust-lang/backtrace-rs#313)
2020-04-30 12:32:53 -07:00
Dylan DPC
5e53f80d6e
Rollup merge of #71449 - ecstatic-morse:free-region-cleanup, r=Mark-Simulacrum
Move `{Free,}RegionRelations` and `FreeRegionMap` to `rustc_infer`

...and out of `rustc_middle`. This is to further #65031, albeit in a very minor way

r? @Mark-Simulacrum
2020-04-30 20:15:24 +02:00
Ralf Jung
30b32c6570 Miri: port error backtraces to std::backtrace 2020-04-30 18:26:51 +02:00
Eric Huss
1776de948c Bump pulldown-cmark 2020-04-29 09:30:16 -07:00
bors
d9312a8db3 Auto merge of #71577 - tmiasko:backtrace-sys, r=Dylan-DPC
Update backtrace-sys crate to 0.1.36

* Fix an off-by-one error in backtrace-sys
* Only explicitly configure debuginfo in rustc-dep-of-std

https://github.com/rust-lang/backtrace-rs/compare/0.3.46...backtrace-sys-0.1.36

Fixes #71397.
2020-04-29 07:32:52 +00:00
Eric Huss
f23db015ad Update cargo 2020-04-28 08:34:58 -07:00
Camille GILLOT
bd42ef6e4f Introduce ArenaStorage. 2020-04-28 11:24:53 +02:00
Stefan Lankes
4d3cf5bd9b use new interface to create threads on HermitCore
- the new interface allows to define the stack size
2020-04-26 19:47:46 +02:00
Tomasz Miąsko
f22dd92b00 Update backtrace-sys crate to 0.1.36
* Fix an off-by-one error in backtrace-sys
* Only explicitly configure debuginfo in rustc-dep-of-std
2020-04-26 13:19:18 +02:00
bors
3360cc3a0e Auto merge of #71430 - pietroalbini:bump-openssl-src, r=Mark-Simulacrum
Update openssl-src to 1.1.1g

Fixes CVE-2020-1967.

r? @Mark-Simulacrum
2020-04-24 15:38:40 +00:00
Dylan MacKenzie
46154f28bd Move {Free,}RegionRelations and FreeRegionMap out of rustc_middle 2020-04-22 15:54:10 -07:00
Pietro Albini
940ce9465f
update openssl-src to 1.1.1g
Fixes CVE-2020-1967.
2020-04-22 16:21:54 +02:00
Dylan DPC
707004c552
Rollup merge of #70970 - eddyb:trait-vs-impl-mismatch, r=oli-obk
Detect mistyped associated consts in `Instance::resolve`.

*Based on #71049 to prevent redundant/misleading downstream errors.*

Fixes #70942 by refusing to resolve an associated `const` if it doesn't have the same type in the `impl` that it does in the `trait` (which we assume had errored, and `delay_span_bug` guards against bugs).
2020-04-22 12:18:31 +02:00
bors
2dc5b602ee Auto merge of #71410 - JohnTitor:rollup-vh6dut5, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #70998 (Suggest `-> impl Trait` and `-> Box<dyn Trait>` on fn that doesn't return)
 - #71236 (Remove unused rustc_serialize::hex module)
 - #71366 (Use assoc int consts3)
 - #71372 (Fix #! (shebang) stripping account space issue)
 - #71384 (Fix stage0.txt version number comment)
 - #71390 (Fix incorrect description of E0690)
 - #71399 (Clean up E0554 explanation)

Failed merges:

r? @ghost
2020-04-22 03:50:02 +00:00