Commit Graph

761 Commits

Author SHA1 Message Date
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
Eric Huss
da2eb65d01 Update cargo, rls 2020-04-21 14:11:30 -07:00
Shotaro Yamada
33905adc5f Remove unused dependencies 2020-04-20 17:59:27 +09:00
bors
9b2f8dbba3 Auto merge of #71007 - Amanieu:deprecate_asm, r=Mark-Simulacrum
Deprecate the asm! macro in favor of llvm_asm!

Since we will be changing the syntax of `asm!` soon, deprecate it and encourage people to use `llvm_asm!` instead (which preserves the old syntax). This will avoid breakage when `asm!` is changed.

RFC: https://github.com/rust-lang/rfcs/pull/2843
2020-04-20 02:18:00 +00:00
bors
a0e52b1e82 Auto merge of #71102 - tmiasko:compiler-builtins, r=Mark-Simulacrum
Update compiler_builtins to 0.1.27

* aarch64: Exclude FP intrinsics on +nofp or +nosimd
* Place intrinsics in individual object files

https://github.com/rust-lang/compiler-builtins/compare/0.1.25...0.1.27
2020-04-19 02:16:13 +00:00
Eduard-Mihai Burtescu
289f46a7f5 Detect mistyped associated consts in Instance::resolve. 2020-04-18 18:39:59 +03:00
bors
534a41a329 Auto merge of #71173 - RalfJung:miri, r=RalfJung
bump Miri

Fixes https://github.com/rust-lang/rust/issues/71110
r? @ghost Cc @rust-lang/miri
2020-04-16 05:47:24 +00:00
bors
be895b2bb8 Auto merge of #71159 - topecongiro:rustfmt-1.4.14, r=Dylan-DPC
Bump rustfmt and rls

Close #71076. Close #71077.

r? @Xanewok
2020-04-16 02:10:29 +00:00
Ralf Jung
7fa2907e3f bump Miri 2020-04-16 01:14:59 +02:00
bors
ce1ab355c2 Auto merge of #71180 - Dylan-DPC:rollup-pscpg6q, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #69903 (Do not ICE in the face of invalid enum discriminant)
 - #70354 (Update RELEASES.md for 1.43.0)
 - #70774 (End cleanup on rustdoc-js tools)
 - #70990 (Improve rustdoc source code a bit)
 - #71145 (Add illumos triple)
 - #71166 (Clean up E0518 explanation)

Failed merges:

r? @ghost
2020-04-15 22:58:54 +00:00
bors
d2230290f7 Auto merge of #71139 - matthiaskrgr:submodule_upd, r=Dylan-DPC
submodules: update clippy from af5940b7 to d236b30a

Changes:
````
rustup https://github.com/rust-lang/rust/pull/70643
Explain panic on `E0463` in integration tests
Temporarily disable rustfmt integration test
Cleanup: Use rustc's is_proc_macro_attr
Cleanup: Use our `sym!` macro more
Fixes #5405: redundant clone false positive with arrays
update lints
verbose_bit_mask: fix bit mask used in docs
Update documentation for new_ret_no_self
````

Fixes #71114
2020-04-15 19:47:56 +00:00
Matthias Krüger
fada4b24b2 submodules: update clippy from af5940b7 to 6651c1b9
Changes:
````
Rename dummy_hir_id -> parent_hir_id
rustup https://github.com/rust-lang/rust/pull/71116
Change default many single char names threshold
Better precedence case management + more tests
Use only check_expr with parent expr and precedence
Check for Deref trait impl + add fixed version
Report using stmts and expr + tests
Global rework + fix imports
Working basic dereference clip
Add test for zero single char names
Make the single char threshold strict inequality
large_enum_variant: Report sizes of variants
Refactor: Use rustc's `match_def_path`
deps: bump compiletest-rs from 0.4 to 0.5
rustup https://github.com/rust-lang/rust/pull/70643
Explain panic on `E0463` in integration tests
Temporarily disable rustfmt integration test
result_map_unit_fn: Fix incorrect UI tests
Cleanup: Use rustc's is_proc_macro_attr
Cleanup: Use our `sym!` macro more
Fixes #5405: redundant clone false positive with arrays
Disallow bit-shifting in `integer_arithmetic` lint
update lints
cargo dev fmt
Make use of Option/Result diagnostic items
Make use of some existing diagnostic items
Say that diagnostic items are preferred over paths
verbose_bit_mask: fix bit mask used in docs
Update documentation for new_ret_no_self
Update doc generation script
Add lint on large const arrays
Make the epsilon note spanless
Split check_fn function
Indicate when arrays are compared in error message
Make epsilon note spanless when comparing arrays
Add float cmp const tests for arrays
Add float cmp tests for arrays
Handle constant arrays with single value
Don't show comparison suggestion for arrays
Allow for const arrays of zeros
Handle evaluating constant index expression
Add handling of float arrays to miri_to_const
Update stderr of float_cmp test
Update field names in is_float
Add tests for float in array comparison
Add lint when comparing floats in an array
````

Fixes #71114
2020-04-15 20:56:28 +02:00
Amanieu d'Antras
c4ca63885e Update parking_lot dependency to avoid use of deprecated asm! 2020-04-15 17:46:29 +01:00
topecongiro
84c4514849
Bump rustfmt and rls 2020-04-15 11:09:29 +09:00
Patrick Mooney
b77aefb76e Add illumos triple
Co-Authored-By: Jason King <jason.brian.king@gmail.com>
Co-Authored-By: Joshua M. Clulow <jmc@oxide.computer>
2020-04-14 20:36:07 +00:00
Eric Huss
b04924aa01 Update cargo 2020-04-14 09:50:52 -07:00
Tomasz Miąsko
09633062b6 Update compiler_builtins to 0.1.27
* aarch64: Exclude FP intrinsics on +nofp or +nosimd
* Place intrinsics in individual object files
2020-04-13 00:00:00 +00:00
Luca Barbieri
ac2b84f962 Depend on getopts from crates.io
rustc_session exports it for other crates to avoid mismatching
crate versions.
2020-04-11 17:49:16 -04:00
Luca Barbieri
45ede927fb Depend on libc from crates.io 2020-04-11 11:07:04 -04:00
Mazdak Farrokhzad
eea91c308f
Rollup merge of #70519 - estebank:constraints-before-args-spans, r=Centril
Tweak output of type params and constraints in the wrong order

r? @Centril @varkor
2020-04-06 04:24:15 +02:00
Esteban Küber
c9f55ea689 review comments: use partition_map 2020-04-05 17:03:15 -07:00
Mazdak Farrokhzad
be93b1cdc5
Rollup merge of #70553 - hermitcore:abi, r=dtolnay
move OS constants to platform crate

to reduce platform specific constants move O_RDONLY etc. and the definition of thread priorities to hermit-abi
2020-04-06 00:53:42 +02:00
Igor Matuszewski
370be8e02b rustc-workspace-hack: Account for upgraded crossbeam-utils 0.7 2020-04-05 00:45:50 +02:00
Igor Matuszewski
b2561c9ea2 submodules: Update RLS and Rustfmt to 1.4.13 2020-04-05 00:45:50 +02:00
Stefan Lankes
e2780b3919
Merge branch 'master' into abi 2020-04-04 16:19:40 +02:00
bors
cff07db629 Auto merge of #70683 - jclulow:illumos-openssl-gmake, r=Mark-Simulacrum
update openssl-src to 111.8.1+1.1.1f

This update includes a fix for alexcrichton/openssl-src-rs#52 which allows Cargo to build correctly on Solaris/illumos.
2020-04-04 13:40:49 +00:00
bors
1b521f5773 Auto merge of #70136 - hermitcore:network_tcp, r=dtolnay
add basic IP support in HermitCore

- add initial version to support sockets
- use TcpStream as test case
- HermitCore uses smoltcp as IP stack for pure Rust applications
- further functionalities (e.g. UDP support) will be added step by step
- in principle, the current PR is a revision of #69404
2020-04-04 06:04:32 +00:00
Stefan Lankes
aa223304dc
Merge branch 'master' into abi 2020-04-04 07:41:05 +02:00
Arlo Siemsen
f86b078e2d Add hash of source files in debug info
* Adds either an MD5 or SHA1 hash to the debug info.
* Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-04-02 14:13:19 -07:00
Joshua M. Clulow
328366d025 update openssl-src to 111.8.1+1.1.1f
This update includes a fix for alexcrichton/openssl-src-rs#52 which
allows Cargo to build correctly on Solaris/illumos.
2020-04-02 11:19:11 -07:00
Dylan DPC
b99db6ee10
Rollup merge of #70546 - lqd:polonius_update, r=nikomatsakis
Polonius: update to 0.12.1, fix more move errors false positives, update test expectations

This PR:
- updates `polonius-engine` to version 0.12.1 to fix some move errors false positives
- fixes a fact generation mistake creating the other move errors false positives
- updates the test expectations for the polonius compare-mode so that all (minus the 2 OOMs) ui tests pass again (matching the [analysis doc](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) starting at case 34)

In my opinion, this is safe to rollup.

r? @nikomatsakis
2020-03-30 16:24:49 +02:00
Stefan Lankes
9f6b96e461 move the definition of thread priorities to hermit-abi 2020-03-30 07:39:57 +02:00
Mazdak Farrokhzad
7710f2dd5c rustc -> rustc_middle part 1 2020-03-30 07:02:56 +02:00
Stefan Lankes
415aff0516 move OS constants to platform crate 2020-03-30 06:49:17 +02:00
Remy Rakic
df1ac67913 update polonius-engine to 0.12.1
This will fix some move errors false positives
2020-03-30 01:11:44 +02:00
Mazdak Farrokhzad
59a69708e1 reduce rustc_attr usage in places 2020-03-29 12:01:11 +02:00
bors
e768d6f0bc Auto merge of #70485 - matthiaskrgr:submodule_upd, r=Dylan-DPC
submodules: update clippy from 1ff81c1b to 70b93aab

Changes:
````
remove redundant import
rustup https://github.com/rust-lang/rust/pull/68404
rustup https://github.com/rust-lang/rust/pull/69644
rustup https://github.com/rust-lang/rust/pull/70344
Move verbose_file_reads to restriction
move redundant_pub_crate to nursery
readme: explain how to run only a single lint on a codebase
Remove dependency on `matches` crate
Move useless_transmute to nursery
nursery group -> style
Update for PR feedback
Auto merge of #5314 - ehuss:remove-git2, r=flip1995
Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them
````

Fixes #70456
2020-03-28 14:15:27 +00:00
Matthias Krüger
6e01d0fdad submodules: update clippy from 1ff81c1b to 70b93aab
Changes:
````
remove redundant import
rustup https://github.com/rust-lang/rust/pull/68404
rustup https://github.com/rust-lang/rust/pull/69644
rustup https://github.com/rust-lang/rust/pull/70344
Move verbose_file_reads to restriction
move redundant_pub_crate to nursery
readme: explain how to run only a single lint on a codebase
Remove dependency on `matches` crate
Move useless_transmute to nursery
nursery group -> style
Update for PR feedback
Auto merge of #5314 - ehuss:remove-git2, r=flip1995
Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them
````

Fixes #70456
2020-03-27 23:43:22 +01:00
bors
0bf7c2ad77 Auto merge of #70162 - cjgillot:split_query, r=Zoxc
Move the query system to a dedicated crate

The query system `rustc::ty::query` is split out into the `rustc_query_system` crate.

Some commits are unformatted, to ease rebasing.

Based on #67761 and #69910.

r? @Zoxc
2020-03-27 21:36:51 +00:00
bors
b9ac29169a Auto merge of #69470 - mati865:deps, r=Mark-Simulacrum
Upgrade rustc and bootstrap dependencies
2020-03-27 06:31:49 +00:00
Dylan DPC
7041efcfc3
Rollup merge of #70344 - Centril:hir-pretty, r=eddyb
Decouple `rustc_hir::print` into `rustc_hir_pretty`

High level summary:
- The HIR pretty printer, `rustc_hir::print` is moved into a new crate `rustc_hir_pretty`.
- `rustc_ast_pretty` and `rustc_errors` are dropped as `rustc_hir` dependencies.
- The dependence on HIR pretty is generally reduced, leaving `rustc_save_analysis`, `rustdoc`, `rustc_metadata`, and `rustc_driver` as the remaining clients.

The main goal here is to reduce `rustc_hir`'s dependencies and its size such that it can start and finish earlier, thereby working towards https://github.com/rust-lang/rust/issues/65031.

r? @Zoxc
2020-03-27 01:23:53 +01:00
Mateusz Mikuła
f5e702df0e Upgrade rustc and bootstrap dependencies 2020-03-26 14:11:23 +01:00
Camille GILLOT
260cfaba12 Don't allow access to the Session. 2020-03-26 09:40:52 +01:00
Camille GILLOT
0e8b59a2f4 Prune dependencies. 2020-03-26 09:40:51 +01:00
Camille GILLOT
8e873c3c64 Make librustc_query_system compile. 2020-03-26 09:25:35 +01:00
Mazdak Farrokhzad
3cced917ff
Rollup merge of #70361 - tmiasko:backtrace, r=Mark-Simulacrum
Update backtrace crate to 0.3.46

* Support line-tables-only when using libbacktrace
* Update libbacktrace to latest master
* Define HAVE_KERN_PROC on FreeBSD to fix rust-lang/rust#54434
2020-03-25 06:45:32 +01:00
Pietro Albini
9beb8f5477
ci: add github actions configuration 2020-03-24 15:36:07 +01:00
Mazdak Farrokhzad
f1701ddef1 rustc: remove rustc_hir_pretty dependency. 2020-03-24 08:44:55 +01:00
Mazdak Farrokhzad
92885e3a5b rustc_typeck: remove rustc_hir_pretty usage 2020-03-24 08:38:32 +01:00
Mazdak Farrokhzad
b3866a5c93 move rustc_hir::print -> rustc_hir_pretty 2020-03-24 06:25:03 +01:00
Mazdak Farrokhzad
b60d732efe rustc_hir: nix rustc_errors dep 2020-03-24 06:22:27 +01:00
Tomasz Miąsko
64a8c8a493 Update backtrace crate to 0.3.46 2020-03-24 00:00:00 +00:00
Camille GILLOT
6624dc4045 Make librustc_query_system compile. 2020-03-23 23:07:19 +01:00
Mazdak Farrokhzad
40cec7854b lowering: remove librustc dependency 2020-03-21 22:20:24 +01:00
Mazdak Farrokhzad
14f89ded2c {rustc::hir::map -> rustc_hir}::definitions 2020-03-21 22:20:24 +01:00
Mazdak Farrokhzad
0f68ab03c3 separate out an arena for HIR 2020-03-21 22:18:57 +01:00
bors
38114ff16e Auto merge of #69729 - RalfJung:backtrace, r=Mark-Simulacrum
update backtrace crate

In particular this release includes https://github.com/rust-lang/backtrace-rs/pull/297 and https://github.com/rust-lang/backtrace-rs/pull/300.
2020-03-21 16:41:39 +00:00
Mark Mansi
2d75a339ca Refactorings to begin getting rid of rustc_codegen_utils 2020-03-19 23:14:46 -05:00
Stefan Lankes
57b7203047 add basic IP support in HermitCore
- add initial version to support sockets
- use TcpStream as test case
- HermitCore uses smoltcp as IP stack for pure Rust applications
- further functionalities (e.g. UDP support) will be added step by step
2020-03-19 08:34:22 +01:00
Mazdak Farrokhzad
61fe2e4036
Rollup merge of #69443 - ehuss:tidy-license, r=skade,Mark-Simulacrum
tidy: Better license checks.

This implements some improvements to the license checks in tidy:

* Use `cargo_metadata` instead of parsing vendored crates. This allows license checks to run without vendoring enabled, and allows the checks to run on PR builds.
* Check for stale entries.
* Check that the licenses for exceptions are what we think they are.
* Verify exceptions do not leak into the runtime.

Closes #62618
Closes #62619
Closes #63238 (I think)

There are some substantive changes here. The follow licenses have changed from the original comments:

* openssl BSD+advertising clause to Apache-2.0
* pest MPL2 to MIT/Apache-2.0
* smallvec MPL2 to MIT/Apache-2.0
* clippy lints MPL2 to MIT OR Apache-2.0
2020-03-19 06:57:30 +01:00
Mazdak Farrokhzad
292c538265
Rollup merge of #69920 - Centril:hir-cleanup, r=Zoxc
Remove some imports to the rustc crate

- When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code).

- Use `rustc_session::` imports instead of `rustc::{session, lint}`.

r? @Zoxc
2020-03-18 18:03:44 +01:00
Eric Huss
d79c1d3428 Update cargo 2020-03-17 20:33:07 -07:00
Matthias Krüger
7e2ebb0789 submodules: update clippy from 8485d40a to 23549a8c
Changes:
````
rustup https://github.com/rust-lang/rust/pull/69738
rustup https://github.com/rust-lang/rust/pull/68944
Make use of `or_patterns` feature
rustup https://github.com/rust-lang/rust/pull/69589/
Rustup to rust-lang/rust#69076
Don't convert Path to lossy str
Use `into_path`
Use pattern matching instead of manually checking condition
Fix typo
Remove git2 dependency.
Document that wildcard_imports doesn't warn about `use ...::prelude::*;`
Change changelog formatting
Update changelog_update doc to reflect the actual ordering of the changelog
Update CHANGELOG.md
````

Fixes #70007
2020-03-16 19:06:15 +01:00
Mazdak Farrokhzad
4392a8b73c use direct imports for rustc::{lint, session}. 2020-03-16 02:52:06 +01:00
bors
131772c5e0 Auto merge of #69076 - cjgillot:split_trait, r=matthewjasper
Split librustc::{traits,infer} to their respective crates

Followup on #67953.

I tried to follow the existing module structures.

cc @eddyb
r? @Zoxc
2020-03-14 16:43:20 +00:00
Camille GILLOT
0144a97946 Trim dependencies and features. 2020-03-14 14:18:15 +01:00
Camille GILLOT
0535dd3721 Split librustc_infer. 2020-03-14 14:17:13 +01:00
Camille GILLOT
c1e3d556bf Move rustc_infer::traits to new crate rustc_trait_selection. 2020-03-14 14:15:50 +01:00
Eric Huss
349fcb9ef6 tidy: Use cargo_metadata for license checks. 2020-03-12 19:19:18 -07:00
Matthias Krüger
66949a72d1 submodules: update clippy from 329923ed to 8485d40a
Changes:
````
Rustup to rust-lang/rust#69674
Use visit_place
Check for mutation
Only fires on temporaries
Extend `redundant_clone` to the case that cloned value is not consumed
add CR feedback
Improve documentation
Use `edition:2018` flag more widely
Update tests/ui/needless_doc_main.rs
Move links to the end of each chapter on adding_lints
Move links to the end of each chapter on CONTRIBUTING
Clean-up adding_lints.md
Clean-up CONTRIBUTING.md
needless_doc_main: only check rust code
Use `node_type_opt` over `node_type`
Fix doc
Fix ICE with trivial_bounds feature
clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy.
update rust-lang.github.io to rustc-dev-guide.rust-lang.org
Improve placeholder in map_unit_fn
Fix match single binding when in a let stmt
Improve error messages for {option,result}_map_unit_fn
Mention the setup instructions in CONTRIBUTING
redundant_pattern: take binding (ref, ref mut) into account in suggestion.
check_pat: delay creation of the "normal" vec until we reach the branch where is is actually needed
deps: bump itertools 0.8 -> 0.9
add lint on File::read_to_string and File::read_to_end
transition rustc-guide to rustc-dev-guide
Rename macro_use_import -> macro_use_imports
warn on macro_use attr
Fix deploy script for tag deploys
````

Fixes #69957
2020-03-12 21:49:29 +01:00
Ralf Jung
9552d2e4ab bump backtrace-sys 2020-03-10 21:45:31 +01:00
Mazdak Farrokhzad
fd302f46dc Store TokenStream in rmeta::MacroDef.
This removes a hack from `load_macro_untracked` in which parsing is used.
2020-03-10 07:26:27 +01:00
Ralf Jung
22ee27b266 update backtrace crate 2020-03-05 11:13:02 +01:00
bors
2b0cfa5b4c Auto merge of #69636 - RalfJung:miri, r=nikomatsakis
update miri

Let's make that toolstate green again. :D

This bumps serde in the lockfile, so r? @oli-obk

Fixes https://github.com/rust-lang/rust/issues/69462
2020-03-04 10:44:55 +00:00
Ralf Jung
faf3a5ea72 update miri 2020-03-04 11:03:08 +01:00
bors
b135c739fb Auto merge of #69482 - lqd:poloniusup, r=nikomatsakis
Polonius: update `polonius-engine` to 0.12.0

Since @albins won't have the time to finish up #68993 for a while, I'll take care of the trivial remaining tasks (rebasing, taking care of tidy/rustfmt).

I'll r? @nikomatsakis since they're assigned to #68993, but have actually [already reviewed it pre-rebase](https://github.com/rust-lang/rust/pull/68993#issuecomment-586413089).

When CI passes: I'll notify bors and close #68993, since this PR supersedes it.
2020-03-03 13:27:52 +00:00
bors
9381e8178b Auto merge of #69247 - CAD97:remove-chalk, r=nikomatsakis
Remove experimental chalk option

As suggested by @nikomatsakis [here](https://github.com/rust-lang/rust/pull/68807#issuecomment-583339932).

The current version of chalk used by the experimental `-Zchalk` flag is [v0.9.0, which is over a year old](https://crates.io/crates/chalk-engine). Since v0.9.0, chalk has seen [a lot of further development](https://github.com/rust-lang/chalk/compare/41dfe13...master), and the intent is to eventually upgrade rustc to use a more recent chalk.

However, it will take a decent chunk of effort to upgrade the current experimental chalk support, and it is currently [blocking at least some PRs](https://github.com/rust-lang/rust/pull/68807) due to chalk:0.9.0's use of unstable features. So for the interim until the next chalk release and experimental rustc integration, we remove the chalk-specific code from rustc.
2020-03-03 04:31:01 +00:00
CAD97
b3777c952f Remove chalk integration 2020-03-02 18:11:53 -05:00
Eric Huss
15264e95f2 Update cargo, clippy 2020-03-02 12:25:29 -08:00
Vadim Petrochenkov
6054a30370 Make it build again 2020-02-29 20:47:10 +03:00
Albin Stjerna
6f40cdb380 - polonius: adapt to the new fact format
- update polonius-engine dependency to 0.12.0

- rustfmt the files failing tidy
2020-02-27 21:17:12 +01:00
Yuki Okushi
3b431234e0 Update Clippy 2020-02-17 22:34:35 +09:00
Camille GILLOT
e88500b5e1 Prune rustc dependencies. 2020-02-16 12:03:30 +01:00
Camille GILLOT
bee6a5ac12 Other crates. 2020-02-16 11:59:35 +01:00
Camille GILLOT
f07e889145 Make librustc_infer compile. 2020-02-16 11:49:29 +01:00
Yuki Okushi
a6ff1dbaa4
Rollup merge of #69164 - GuillaumeGomez:update-pulldown-cmark, r=Dylan-DPC
Update pulldown-cmark dependency

r? @kinnison

cc @ollie27

Reopening of  #65894.
2020-02-15 07:17:53 +09:00
Guillaume Gomez
d8589de1f0 Update pulldown-cmark dependency 2020-02-14 22:39:45 +01:00
bors
35071e3e2e Auto merge of #69100 - cjgillot:resolve_instance, r=Zoxc
Move resolve_instance to rustc_ty.

r? @Zoxc
2020-02-14 16:30:31 +00:00
Camille GILLOT
0e652c5507 Move resolve_instance to rustc_ty. 2020-02-13 18:53:21 +01:00
Andreas Jonson
cec0ed0219 add selfprofiling for new llvm passmanager 2020-02-13 08:02:18 +01:00
bors
ba18875557 Auto merge of #69097 - Xanewok:update-rls-rustfmt, r=Dylan-DPC
Update RLS and Rustfmt

Bumps `rustc-ap-*` packages to v642.

Closes #68916.
Closes #68917.

cc @topecongiro
2020-02-13 01:40:54 +00:00
Dylan DPC
e86019c4a0
Rollup merge of #69086 - tmandry:probestack-hidden-2, r=Dylan-DPC
Update compiler-builtins to 0.1.25

- https://github.com/rust-lang/compiler-builtins/pull/340 Set probestack visibility to hidden on ELF targets

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

Tested in CI: https://github.com/rust-lang/rust/pull/69045.

r? @Mark-Simulacrum
2020-02-12 20:36:59 +01:00
Igor Matuszewski
8fc4bba2c4 Update RLS and Rustfmt
Bumps rustc-ap-* packages to v642.
2020-02-12 15:47:38 +01:00
Dylan DPC
6b40f59db1
Rollup merge of #69042 - yaahc:backtrace-header, r=dtolnay
Remove backtrace header text

Fixes point 3 from https://github.com/rust-lang/rust/issues/65280

related to https://github.com/rust-lang/rust/issues/53487

This should probably be double checked by someone who works on fuschia because theres some extra fuschia specific output in `add_context` that is also removed by this change.
2020-02-12 14:21:13 +01:00
Yuki Okushi
9b51a52084
Rollup merge of #68999 - andjo403:itertools, r=Centril
remove dependency on itertools

r? @Centril
2020-02-12 18:55:42 +09:00
Yuki Okushi
19b0c00da3
Rollup merge of #68554 - cjgillot:lang_items, r=Zoxc
Split lang_items to crates `rustc_hir` and `rustc_passes`.

As discussed in comment https://github.com/rust-lang/rust/pull/67688#discussion_r368289946
2020-02-12 18:55:37 +09:00
Yuki Okushi
344f8d9e62
Rollup merge of #68487 - 0dvictor:nolink, r=tmandry
[experiment] Support linking from a .rlink file

Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file.

Part of Issue #64191
2020-02-12 18:55:36 +09:00
Tyler Mandry
ee85e913a2 Update compiler-builtins to 0.1.25 2020-02-11 22:25:32 -08:00
Camille GILLOT
d3b2385d40 Move it all into rustc_hir. 2020-02-11 23:14:07 +01:00
Camille GILLOT
a056817aae Move hir::check_attr::Target to librustc_lang_items. 2020-02-11 23:07:54 +01:00
Jane Lusby
d2b08c7e93 Update Cargo.lock 2020-02-11 12:51:23 -08:00
Andreas Jonson
3b23d22e75 remove some dependencies on itertools 2020-02-11 19:28:38 +01:00
Victor Ding
a47fdb99c0 Support linking from a .rlink file
Flag `-Z no-link` was previously introduced, which allows creating
an `.rlink` file to perform compilation without linking.
This change enables linking from an `.rlink` file.
2020-02-11 20:19:28 +11:00
Matthias Krüger
451d4925f7 submodules: update cargo from 9d32b7b01 to 3c53211c3
Changes:
````
Update jobserver.
Update tar.
Emit report on error with Ztimings.
Do not run `formats_source` if `rustfmt` is not available
Fix rebuild_sub_package_then_while_package on HFS.
Remove likely brittle test.
Install rustfmt for testing in CI
Fix build-std collisions.
Fix BuildScriptOutput when a build script is run multiple times.
Fix required-features using renamed dependencies.
Fix using global options before an alias.
Update changelog for 1.42.
Bump to 0.44.0.
Log rustfmt output if it fails; also do not check that rustfmt exists
Update pretty_env_logger requirement from 0.3 to 0.4
Swap std::sync::mpsc channel with crossbeam_channel
Fix tests on Linux/MacOS
Fix typo.
Add tests
Deduplicate warnings about missing rustfmt
Log entry 2: first implementation
Refactor code
Stabilize config-profile.
Log entry 1
Format code
Remove tempdir after install
Keep existing package with git install
Use non-ephemeral workspace
Test that git install reads virtual manifest
Fix failing test
Search for root manifest with ephemeral workspaces
Support out-dir in build section of Cargo configuration file
````
2020-02-10 21:12:16 +01:00
mark
0c0c31b11c implement proper linkchecker hardening 2020-02-03 10:44:23 -06:00
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 -&gt; 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