Commit Graph

167233 Commits

Author SHA1 Message Date
Camille GILLOT
69985f0175 Do not resolve elided lifetimes in path twice. 2022-04-27 21:59:47 +02:00
Camille GILLOT
38a4c2cc44 Update comment. 2022-04-27 21:59:47 +02:00
Jake Goulding
762bb1f506 Revert "impl From<&[T; N]> and From<&mut [T; N]> for Vec<T>"
This reverts commit 5dd702763a.
2022-04-27 15:56:29 -04:00
Paolo Barbolini
84b8898d63 Add VecDeque::extend benchmark 2022-04-27 21:10:20 +02:00
Loïc BRANSTETT
beb4e16f05 Add missing target_feature to the list of well known cfg names 2022-04-27 19:11:56 +02:00
Jeremy Fitzhardinge
c6bafa7322 Add --json unused-externs-silent with original behaviour
Since Cargo wants to do its own fatal error handling for unused
dependencies, add the option `--json unused-externs-silent` which
has the original behaviour of not indicating non-zero exit status for
`deny`/`forbid`-level unused dependencies.
2022-04-27 10:04:25 -07:00
Jeremy Fitzhardinge
0529a13b5d Plumb through rustc_lint_defs::Level as enum rather than string. 2022-04-27 10:04:25 -07:00
Jeremy Fitzhardinge
39f2f18463 Make --json unused-extern deny/forbid level messages cause exit with error status
Closes: https://github.com/rust-lang/rust/issues/96068
2022-04-27 10:04:25 -07:00
Jeremy Fitzhardinge
2373599b82 Add tests for --json unused-externs
There were none at all. These test for original functionality,
but this also adds a test that `-Dunused-crate-dependencies`
causes a compilation failure, which currently fails
(https://github.com/rust-lang/rust/issues/96068). This is fixed in
subsequent changes.
2022-04-27 10:04:25 -07:00
Nixon Enraght-Moony
d34f8d269a HashMap doc: Don't use monospace font for 'Entry Api' 2022-04-27 17:59:29 +01:00
Jeremy Fitzhardinge
0981b9857e compiletest: add support for unused extern notifications
As generated by --json unused-externs.
2022-04-27 09:37:45 -07:00
bors
69a5d2481e Auto merge of #96179 - klensy:bump-deps-04-22, r=Mark-Simulacrum
Bump deps

Update few deps:

First commit: vulnerable or yanked ones:
* openssl-src 111.17.0+1.1.1m -> 111.18.0+1.1.1n vuln https://rustsec.org/advisories/RUSTSEC-2022-0014
* crossbeam-channel 0.5.2 -> 0.5.4 yanked: https://github.com/crossbeam-rs/crossbeam/pull/802 (https://github.com/crossbeam-rs/crossbeam/blob/crossbeam-channel-0.5.4/crossbeam-channel/CHANGELOG.md)
* crossbeam-utils 0.8.6 -> 0.8.8 yanked: https://github.com/crossbeam-rs/crossbeam/security/advisories/GHSA-qc84-gqf4-9926 (https://github.com/crossbeam-rs/crossbeam/blob/crossbeam-utils-0.8.8/crossbeam-utils/CHANGELOG.md)

Second commit: no notable changes, most of them touched only to remove other ones:
* Updating ammonia v3.1.3 -> v3.2.0
* Updating html5ever v0.25.1 -> v0.26.0
* Updating markup5ever v0.10.1 -> v0.11.0
* Removing markup5ever_rcdom v0.1.0
* Updating phf v0.8.0 -> v0.10.1
* Updating phf_codegen v0.8.0 -> v0.10.0
* Updating phf_generator v0.8.0 -> v0.10.0
* Updating phf_shared v0.8.0 -> v0.10.0
* Updating rand v0.8.4 -> v0.8.5
* Removing rand_hc v0.3.0
* Removing rand_pcg v0.2.1
* Updating string_cache v0.8.0 -> v0.8.3
* Updating string_cache_codegen v0.5.1 -> v0.5.2
* Removing xml5ever v0.16.1

drops markup5ever_rcdom, rand_hc, rand_pcg, xml5ever versions

* rand 0.8.4 -> 0.8.5 (https://github.com/rust-random/rand/blob/0.8.5/CHANGELOG.md#085---2021-08-20)

Third one is perf oriented:
* proc-macro2 v1.0.30 -> v1.0.37 https://github.com/dtolnay/proc-macro2/compare/1.0.30...1.0.37 (https://github.com/dtolnay/proc-macro2/releases, for example https://github.com/dtolnay/proc-macro2/releases/tag/1.0.36)
* quote v1.0.7 -> v1.0.18 https://github.com/dtolnay/quote/compare/1.0.7...1.0.18 (https://github.com/dtolnay/quote/releases) multiple perf improvements: https://github.com/dtolnay/quote/releases/tag/1.0.16, https://github.com/dtolnay/quote/releases/tag/1.0.14, https://github.com/dtolnay/quote/releases/tag/1.0.11
* syn v1.0.80 -> v1.0.91 https://github.com/dtolnay/syn/compare/1.0.80...1.0.91 (https://github.com/dtolnay/syn/releases): didn't find good examples, but given, that there exist private api across `proc-macro2`, `quote` by the same author, *i think* it may take advantage of it.
2022-04-27 16:20:59 +00:00
Simon
332f326334
Fixed grammatical error in example comment 2022-04-27 17:27:02 +02:00
b-naber
ef5f07256c combine all unsized types and add another recursive call to process nested unsized types correctly 2022-04-27 16:58:16 +02:00
Alex Crichton
d51702ae84 Update data layout string for wasm64-unknown-unknown
Looks like this changed in a recent LLVM update but wasm64 isn't built
on CI so it wasn't caught until now.

Closes #96463
2022-04-27 07:29:44 -07:00
bors
ff18038d75 Auto merge of #95170 - jyn514:ci-llvm, r=Mark-Simulacrum
Move `download-ci-llvm` out of bootstrap.py

This is ready for review. It has been tested on Windows, Linux, and NixOS.

The second commit ports the changes from https://github.com/rust-lang/rust/pull/95234 to Rust; I can remove it if desired.

Helps with https://github.com/rust-lang/rust/issues/94829.

As a follow-up, this makes it possible to avoid downloading llvm until it's needed for building `rustc_llvm`; it would be nice to do that, but it shouldn't go in the first draft. It might also be possible to avoid requiring python until tests run (currently there's a check in `sanity.rs`), but I haven't looked too much into that.

`@rustbot` label +A-rustbuild
2022-04-27 13:27:22 +00:00
Chris Denton
1e7c15634d
Note the importance of using sync pipes 2022-04-27 13:56:59 +01:00
Gary Guo
4f9acb2687 Use decorated names for linked_symbols on Windows 2022-04-27 13:17:13 +01:00
SparrowLii
d735aa6810 Eliminate duplication of building panic langcall in codegen 2022-04-27 18:58:59 +08:00
bors
2799141fde Auto merge of #96371 - c410-f3r:z-errors, r=petrochenkov
Move some tests to more reasonable places

cc https://github.com/rust-lang/rust/issues/73494
r? `@petrochenkov`
2022-04-27 10:46:32 +00:00
Christian Poveda
e7ae9eb3f2
rename sum_with_parens 2022-04-27 12:03:16 +02:00
Ellen
f697955c1e tut tut tut 2022-04-27 08:51:33 +01:00
Michael Goulet
83d701e569 Better error messages when collecting into [T; n] 2022-04-26 21:37:10 -07:00
bors
bb85bcaca9 Auto merge of #96195 - sunfishcode:sunfishcode/handle-or-error-type, r=joshtriplett
Define a dedicated error type for `HandleOrNull` and `HandleOrInvalid`.

Define `NullHandleError` and `InvalidHandleError` types, that implement std::error::Error, and use them as the error types in `HandleOrNull` and `HandleOrInvalid`,

This addresses [this concern](https://github.com/rust-lang/rust/issues/87074#issuecomment-1080031167).

This is the same as #95387.

r? `@joshtriplett`
2022-04-27 03:42:59 +00:00
Caio
b72f6e55a1 Move some tests to more reasonable places 2022-04-26 23:38:04 -03:00
Michael Goulet
f9e7489f87 TAITs are suggestable 2022-04-26 18:55:55 -07:00
Michael Goulet
ae42f22ba0 make fn() -> _ {} suggestion MachineApplicable 2022-04-26 18:50:46 -07:00
bors
99b70ee230 Auto merge of #96459 - Dylan-DPC:rollup-de6ud9d, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #92569 (Improve Error Messaging for Unconstructed Structs and Enum Variants in Generic Contexts)
 - #96370 (Cleanup `report_method_error` a bit)
 - #96383 (Fix erased region escaping into wfcheck due to #95395)
 - #96385 (Recover most `impl Trait` and `dyn Trait` lifetime bound suggestions under NLL)
 - #96410 (rustdoc: do not write `{{root}}` in `pub use ::foo` docs)
 - #96430 (Fix handling of `!` in rustdoc search)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-04-27 01:01:58 +00:00
Dylan DPC
c0ed53c0da
Rollup merge of #96430 - GuillaumeGomez:search-exclamation, r=notriddle
Fix handling of `!` in rustdoc search

Fixes #96399.

I also updated the eBNF.

cc `@jsha`
r? `@notriddle`
2022-04-27 02:47:12 +02:00
Dylan DPC
875b22ff30
Rollup merge of #96410 - notriddle:notriddle/issue-95873, r=GuillaumeGomez
rustdoc: do not write `{{root}}` in `pub use ::foo` docs

Fixes #95873
2022-04-27 02:47:11 +02:00
Dylan DPC
dc1f98c655
Rollup merge of #96385 - marmeladema:nll-fix-trait-lifetime-bound-suggestions, r=jackh726
Recover most `impl Trait` and `dyn Trait` lifetime bound suggestions under NLL

This is done by replacing the duplicated (and very partial) implementation from borrowck with one inspsired from `NiceRegionError::try_report_static_impl_trait` and by re-using `suggest_new_region_bound`.

Fixes #96277

r? ```@jackh726```
2022-04-27 02:47:11 +02:00
Dylan DPC
5645732b04
Rollup merge of #96383 - compiler-errors:issue-96381, r=estebank
Fix erased region escaping into wfcheck due to #95395

We can just use `liberate_late_bound_regions` instead of `erase_late_bound_regions`... This gives us `ReEarlyBound` instead of `ReErased`, the former being something typeck actually knows how to deal with...

Fixes #96381

Side-note: We only actually get far enough in the compiler pipeline to cause this ICE when we're invoking rustdoc. We actually abort rustc right before wfcheck because of the error that we emit (having `_` in the type signature). Why does rustdoc keep going even though we raise an error?
2022-04-27 02:47:10 +02:00
Dylan DPC
e63da0ba00
Rollup merge of #96370 - compiler-errors:cleanup-report_method_error, r=estebank
Cleanup `report_method_error` a bit

1. Remove an unnecessary indentation level
2. Split out a couple of large functions from this humongo function body
2022-04-27 02:47:07 +02:00
Dylan DPC
ac46e17c02
Rollup merge of #92569 - George-lewis:87181, r=estebank
Improve Error Messaging for Unconstructed Structs and Enum Variants in Generic Contexts

Improves error messaging for empty-tuple structs and enum variants in certain generic contexts. See new ui tests for examples.

Closes #87181
2022-04-27 02:47:07 +02:00
Nicholas Nethercote
86f011704c Make explicit an unreachable NoDelim case in rustfmt. 2022-04-27 10:35:33 +10:00
Nicholas Nethercote
9665da35cc Avoid producing NoDelim values in FrameData. 2022-04-27 10:35:29 +10:00
bors
a7197189cd Auto merge of #96425 - oli-obk:fix_incremental_regression_unsafety_checking, r=compiler-errors
Fix incremental perf regression unsafety checking

Perf regression introduced in #96294

We will simply avoid emitting the name of the unsafe function in MIR unsafeck, since we're moving to THIR unsafeck anyway.
2022-04-26 22:35:40 +00:00
Nicholas Nethercote
a8e862cb7d Avoid producing NoDelim values in Frame.
The code currently ignores the actual delimiter on the RHS and fakes up
a `NoDelim`/`DelimSpan::dummy()` one. This commit changes it to use the
actual delimiter.

The commit also reorders the fields for the `Delimited` variant to match
the `Sequence` variant.
2022-04-27 08:25:22 +10:00
Nicholas Nethercote
6b367a0532 Avoid producing NoDelim values in MacArgs::delim(). 2022-04-27 08:15:12 +10:00
Nicholas Nethercote
f0bbc782ac Avoid producing NoDelim values in TokenCursorFrame. 2022-04-27 08:15:05 +10:00
George
a6b570b209 Tidy 2022-04-26 17:05:49 -04:00
George
14a127be3e Add new diagnostic 2022-04-26 17:04:44 -04:00
Dan Gohman
531c9373be Fix the filename in the expected error message. 2022-04-26 12:47:24 -07:00
Guillaume Gomez
4e0be6ddeb Remove dead code in main.js 2022-04-26 20:59:33 +02:00
Guillaume Gomez
509b145744 Migrate scrape-examples.js to ES6 2022-04-26 20:59:33 +02:00
Guillaume Gomez
724c4bd9bb Migrate storage.js to ES6 2022-04-26 20:59:32 +02:00
Guillaume Gomez
6faa40d406 Migrate source-script to ES6 2022-04-26 20:59:32 +02:00
Guillaume Gomez
016334a3ad Migrate main.js to ES6 2022-04-26 20:59:32 +02:00
Guillaume Gomez
cb8da88c83 Migrate externs.js to ES6 2022-04-26 20:59:32 +02:00
Guillaume Gomez
ae93e6e3b8 Small JS code improvements 2022-04-26 20:59:32 +02:00