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
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)
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
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#55471fixes#41884fixes#40161fixes#34844fixes#32594
cc @alexcrichton @rust-lang/compiler
I looked at all code that checks the recursion limit and inserted stack growth calls where appropriate.
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
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.
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.
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.
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.
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
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.
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
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
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).
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
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
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
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
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.
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
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
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