]> git.lizzy.rs Git - rust.git/log
rust.git
3 years ago(De-)serialize the supported_sanitizers
Simonas Kazlauskas [Sat, 13 Feb 2021 20:00:07 +0000 (22:00 +0200)]
(De-)serialize the supported_sanitizers

3 years agoMaintain supported sanitizers as a target property
Simonas Kazlauskas [Sun, 7 Feb 2021 22:49:00 +0000 (00:49 +0200)]
Maintain supported sanitizers as a target property

This commit adds an additional target property – `supported_sanitizers`,
and replaces the hardcoded allowlists in argument parsing to use this
new property.

Fixes #81802

3 years agoMove SanitizerSet to rustc_target
Simonas Kazlauskas [Sun, 7 Feb 2021 21:47:03 +0000 (23:47 +0200)]
Move SanitizerSet to rustc_target

3 years agoAuto merge of #76881 - hameerabbasi:issue-53325, r=oli-obk
bors [Fri, 2 Apr 2021 17:38:57 +0000 (17:38 +0000)]
Auto merge of #76881 - hameerabbasi:issue-53325, r=oli-obk

Add allocation information to undefined behaviour errors.

So far I'm looking on information on whether the error messages are suitable.

Fixes #53325.

3 years agoAuto merge of #83468 - hi-rustin:rustin-patch-lint, r=nikomatsakis
bors [Fri, 2 Apr 2021 15:14:48 +0000 (15:14 +0000)]
Auto merge of #83468 - hi-rustin:rustin-patch-lint, r=nikomatsakis

add OR_PATTERNS_BACK_COMPAT lint

close https://github.com/rust-lang/rust/issues/83318

3 years agoAuto merge of #83781 - JohnTitor:rollup-1vm3dxo, r=JohnTitor
bors [Fri, 2 Apr 2021 12:51:41 +0000 (12:51 +0000)]
Auto merge of #83781 - JohnTitor:rollup-1vm3dxo, r=JohnTitor

Rollup of 5 pull requests

Successful merges:

 - #83535 (Break when there is a mismatch in the type count)
 - #83721 (Add a button to copy the "use statement")
 - #83740 (Fix comment typo in once.rs)
 - #83745 (Add my new email address to .mailmap)
 - #83754 (Add test to ensure search tabs behaviour)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #83754 - GuillaumeGomez:search-tab-behaviour, r=jyn514
Yuki Okushi [Fri, 2 Apr 2021 12:28:25 +0000 (21:28 +0900)]
Rollup merge of #83754 - GuillaumeGomez:search-tab-behaviour, r=jyn514

Add test to ensure search tabs behaviour

It adds a GUI test for https://github.com/rust-lang/rust/pull/80382.

r? ```@jyn514```

3 years agoRollup merge of #83745 - JohnTitor:jtitor-mailmap, r=Mark-Simulacrum
Yuki Okushi [Fri, 2 Apr 2021 12:28:24 +0000 (21:28 +0900)]
Rollup merge of #83745 - JohnTitor:jtitor-mailmap, r=Mark-Simulacrum

Add my new email address to .mailmap

3 years agoRollup merge of #83740 - obi1kenobi:patch-1, r=joshtriplett
Yuki Okushi [Fri, 2 Apr 2021 12:28:23 +0000 (21:28 +0900)]
Rollup merge of #83740 - obi1kenobi:patch-1, r=joshtriplett

Fix comment typo in once.rs

I believe I came across a minor typo in a comment. I am not particularly familiar with this part of the codebase, but I have read the surrounding code as well as the referenced `park` and `unpark` functions, and I believe my proposed change is true to the intended meaning of the comment.

I intentionally tried to keep the change as minimal as possible. If I have the maintainers' permission, I'd also love to add a comma to improve readability as follows: `Luckily ``park`` comes with the guarantee that if it got an ``unpark`` just before on an unparked thread, it does not park.`

3 years agoRollup merge of #83721 - GuillaumeGomez:copy-use, r=Nemo157
Yuki Okushi [Fri, 2 Apr 2021 12:28:21 +0000 (21:28 +0900)]
Rollup merge of #83721 - GuillaumeGomez:copy-use, r=Nemo157

Add a button to copy the "use statement"

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

When clicking on the button, it'll add the elements prepended by "use " and will end with a ";". So in the images below, I now have in my clipboard `use std::fs::OpenOptions;`.

A screenshot of the newly added button:

![Screenshot from 2021-03-31 22-12-12](https://user-images.githubusercontent.com/3050060/113205430-90e64500-926e-11eb-8538-529829f611ec.png)

A screenshot after it was clicked:

![Screenshot from 2021-03-31 22-15-31](https://user-images.githubusercontent.com/3050060/113205532-ad827d00-926e-11eb-893d-35f2f8f92696.png)

r? `@Nemo157`

3 years agoRollup merge of #83535 - MidasLamb:mir-type-count-mismatch, r=nikomatsakis
Yuki Okushi [Fri, 2 Apr 2021 12:28:20 +0000 (21:28 +0900)]
Rollup merge of #83535 - MidasLamb:mir-type-count-mismatch, r=nikomatsakis

Break when there is a mismatch in the type count

When other errors are generated, there can be a mismatch between the
amount of input types in MIR, and the amount in the function itself.
Break from the comparative loop if this is the case to prevent
out-of-bounds.
Fixes #83499

3 years agoAuto merge of #83207 - oli-obk:valtree2, r=lcnr
bors [Fri, 2 Apr 2021 10:28:12 +0000 (10:28 +0000)]
Auto merge of #83207 - oli-obk:valtree2, r=lcnr

normalize mir::Constant differently from ty::Const in preparation for valtrees

Valtrees are unable to represent many kind of constant values (this is on purpose). For constants that are used at runtime, we do not need a valtree representation and can thus use a different form of evaluation. In order to make this explicit and less fragile, I added a `fold_constant` method to `TypeFolder` and implemented it for normalization. Normalization can now, when it wants to eagerly evaluate a constant, normalize `mir::Constant` directly into a `mir::ConstantKind::Val` instead of relying on the `ty::Const` evaluation.

In the future we can get rid of the `ty::Const` in there entirely and add our own `Unevaluated` variant to `mir::ConstantKind`. This would allow us to remove the `promoted` field from `ty::ConstKind::Unevaluated`, as promoteds can never occur in the type system.

cc `@rust-lang/wg-const-eval`

r? `@lcnr`

3 years agoAuto merge of #80965 - camelid:rename-doc-spotlight, r=jyn514
bors [Fri, 2 Apr 2021 07:04:58 +0000 (07:04 +0000)]
Auto merge of #80965 - camelid:rename-doc-spotlight, r=jyn514

Rename `#[doc(spotlight)]` to `#[doc(notable_trait)]`

Fixes #80936.

"spotlight" is not a very specific or self-explaining name.
Additionally, the dialog that it triggers is called "Notable traits".
So, "notable trait" is a better name.

* Rename `#[doc(spotlight)]` to `#[doc(notable_trait)]`
* Rename `#![feature(doc_spotlight)]` to `#![feature(doc_notable_trait)]`
* Update documentation
* Improve documentation

r? `@Manishearth`

3 years agoAuto merge of #80828 - SNCPlay42:opaque-projections, r=estebank
bors [Fri, 2 Apr 2021 03:39:32 +0000 (03:39 +0000)]
Auto merge of #80828 - SNCPlay42:opaque-projections, r=estebank

Fix expected/found order on impl trait projection mismatch error

fixes #68561

This PR adds a new `ObligationCauseCode` used when checking the concrete type of an impl trait satisfies its bounds, and checks for that cause code in the existing test to see if a projection's normalized type should be the "expected" or "found" type.

The second commit adds a `peel_derives` to that test, which appears to be necessary in some cases (see projection-mismatch-in-impl-where-clause.rs, which would still give expected/found in the wrong order otherwise). This caused some other changes in diagnostics not involving impl trait, but they look correct to me.

3 years agoAuto merge of #83663 - AngelicosPhosphoros:simplify_binary_and_to_get_better_asm...
bors [Fri, 2 Apr 2021 00:48:31 +0000 (00:48 +0000)]
Auto merge of #83663 - AngelicosPhosphoros:simplify_binary_and_to_get_better_asm, r=nagisa

Simplify logical operations CFG

This is basically same commit as e38e954a0d249f88d0a55504f70d6055e865a931 which was reverted later in 676953fde9120cda62e4ef2f75a804af7481d6af
In both cases, this changes weren't benchmarked.
e38e954a0d249f88d0a55504f70d6055e865a931 leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/62993)
676953fde9120cda62e4ef2f75a804af7481d6af leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/83623)

3 years agoaddress comments
hi-rustin [Fri, 2 Apr 2021 00:08:02 +0000 (08:08 +0800)]
address comments

3 years agoAdd test to ensure search tabs behaviour
Guillaume Gomez [Thu, 1 Apr 2021 19:55:06 +0000 (21:55 +0200)]
Add test to ensure search tabs behaviour

3 years agoAdd a test that triggers the out-of-bounds ICE.
Midas Lambrichts [Thu, 1 Apr 2021 18:54:57 +0000 (20:54 +0200)]
Add a test that triggers the out-of-bounds ICE.

Add a test that has the right input to trigger an out-of-bounds
error when in MIR the local_decls and the normalized_input_tys don't
match in amount.

3 years agoAuto merge of #82780 - cjgillot:dep-stream, r=michaelwoerister
bors [Thu, 1 Apr 2021 16:29:33 +0000 (16:29 +0000)]
Auto merge of #82780 - cjgillot:dep-stream, r=michaelwoerister

Stream the dep-graph to a file instead of storing it in-memory.

This is a reimplementation of #60035.

Instead of storing the dep-graph in-memory, the nodes are encoded as they come
into the a temporary file as they come. At the end of a successful the compilation,
this file is renamed to be the persistent dep-graph, to be decoded during the next
compilation session.

This two-files scheme avoids overwriting the dep-graph on unsuccessful or crashing compilations.

The structure of the file is modified to be the sequence of `(DepNode, Fingerprint, EdgesVec)`.
The deserialization is responsible for going to the more compressed representation.
The `node_count` and `edge_count` are stored in the last 16 bytes of the file,
in order to accurately reserve capacity for the vectors.

At the end of the compilation, the encoder is flushed and dropped.
The graph is not usable after this point: any creation of a node will ICE.

I had to retrofit the debugging options, which is not really pretty.

3 years agoSimplify logical operations CFG
AngelicosPhosphoros [Mon, 29 Mar 2021 21:19:10 +0000 (00:19 +0300)]
Simplify logical operations CFG

This is basically same commit as e38e954a0d249f88d0a55504f70d6055e865a931 which was reverted later in 676953fde9120cda62e4ef2f75a804af7481d6af
In both cases, this changes weren't benchmarked.
e38e954a0d249f88d0a55504f70d6055e865a931 leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/62993)
676953fde9120cda62e4ef2f75a804af7481d6af leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/83623)

Also it changes some src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump* files automatically.

3 years agoadd OR_PATTERNS_BACK_COMPAT lint
hi-rustin [Thu, 25 Mar 2021 13:42:21 +0000 (21:42 +0800)]
add OR_PATTERNS_BACK_COMPAT lint

test: add more cases

test: add comments

refine msg

3 years agoAdd my new email address to .mailmap
Yuki Okushi [Thu, 1 Apr 2021 11:43:44 +0000 (20:43 +0900)]
Add my new email address to .mailmap

3 years agoSome more fine-grained forced inlining
Oli Scherer [Thu, 1 Apr 2021 10:40:50 +0000 (10:40 +0000)]
Some more fine-grained forced inlining

3 years agoLimit the problematic tests to x86_64.
Hameer Abbasi [Thu, 1 Apr 2021 09:24:01 +0000 (09:24 +0000)]
Limit the problematic tests to x86_64.

3 years agoInline some functions that suddenly show up more in traces
Oli Scherer [Wed, 31 Mar 2021 15:38:11 +0000 (15:38 +0000)]
Inline some functions that suddenly show up more in traces

3 years agoAuto merge of #83726 - the8472:large-trustedlen-fail-fast, r=kennytm
bors [Thu, 1 Apr 2021 07:55:00 +0000 (07:55 +0000)]
Auto merge of #83726 - the8472:large-trustedlen-fail-fast, r=kennytm

panic early when `TrustedLen` indicates a `length > usize::MAX`

Changes `TrustedLen` specializations to immediately panic when `size_hint().1 == None`.

As far as I can tell this is ~not a change~ a minimal change in observable behavior for anything except ZSTs because the fallback path would go through `extend_desugared()` which tries to `reserve(lower_bound)` which already is `usize::MAX` and that would also lead to a panic. Before it might have popped somewhere between zero and a few elements from the iterator before panicking while it now panics immediately.

Overall this should reduce codegen by eliminating the fallback paths.

While looking into the `with_capacity()` behavior I also noticed that its documentation didn't have a *Panics* section, so I added that.

3 years agoAuto merge of #83736 - JohnTitor:fix-unsafe_block_in_unsafe_fn-stabilized-version...
bors [Thu, 1 Apr 2021 05:34:54 +0000 (05:34 +0000)]
Auto merge of #83736 - JohnTitor:fix-unsafe_block_in_unsafe_fn-stabilized-version, r=jyn514

Fix the `unsafe_block_in_unsafe_fn`s stabilized version

Fixes #83735

3 years agoFix minor typo in once.rs
Predrag Gruevski [Thu, 1 Apr 2021 04:52:02 +0000 (00:52 -0400)]
Fix minor typo in once.rs

3 years agoAuto merge of #83732 - ehuss:update-cargo, r=ehuss
bors [Thu, 1 Apr 2021 03:13:39 +0000 (03:13 +0000)]
Auto merge of #83732 - ehuss:update-cargo, r=ehuss

Update cargo

5 commits in 1e8703890f285befb5e32627ad4e0a0454dde1fb..3c44c3c4b7900b8b13c85ead25ccaa8abb7d8989
2021-03-26 16:59:39 +0000 to 2021-03-31 21:21:15 +0000
- Fix semver docs for 1.51. (rust-lang/cargo#9316)
- Add `cargo config` subcommand. (rust-lang/cargo#9302)
- Give one more example for the --featuers CLI (rust-lang/cargo#9313)
- Bump to 0.54.0, update changelog (rust-lang/cargo#9308)
- Make the URL to the tracking issue for `--out-dir` into a link (rust-lang/cargo#9309)

3 years agoFix the `unsafe_block_in_unsafe_fn`s stabilized version
Yuki Okushi [Thu, 1 Apr 2021 01:56:51 +0000 (10:56 +0900)]
Fix the `unsafe_block_in_unsafe_fn`s stabilized version

3 years agoUpdate cargo
Eric Huss [Thu, 1 Apr 2021 00:45:03 +0000 (17:45 -0700)]
Update cargo

3 years agoAuto merge of #83731 - Dylan-DPC:rollup-v2z3gkt, r=Dylan-DPC
bors [Thu, 1 Apr 2021 00:42:50 +0000 (00:42 +0000)]
Auto merge of #83731 - Dylan-DPC:rollup-v2z3gkt, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #83015 (Add regression tests for #79825 and #81555)
 - #83699 (Add a regression test for issue-68830)
 - #83700 (Fix documentation of conversion from String to OsString)
 - #83711 (Clarify `--print target-list` is a rustc's option)
 - #83712 (Update LLVM with another wasm simd fix)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #83712 - alexcrichton:more-wasm-simd-llvm-updates, r=nikic
Dylan DPC [Thu, 1 Apr 2021 00:41:48 +0000 (02:41 +0200)]
Rollup merge of #83712 - alexcrichton:more-wasm-simd-llvm-updates, r=nikic

Update LLVM with another wasm simd fix

Just a small bug fix for opcode numberings, not too major.

3 years agoRollup merge of #83711 - JohnTitor:more-friendly-unknown-target-error, r=davidtwco
Dylan DPC [Thu, 1 Apr 2021 00:41:47 +0000 (02:41 +0200)]
Rollup merge of #83711 - JohnTitor:more-friendly-unknown-target-error, r=davidtwco

Clarify `--print target-list` is a rustc's option

Fixes #68238

3 years agoRollup merge of #83700 - steffahn:string_to_pathbuf_conversion_documentation, r=JohnTitor
Dylan DPC [Thu, 1 Apr 2021 00:41:46 +0000 (02:41 +0200)]
Rollup merge of #83700 - steffahn:string_to_pathbuf_conversion_documentation, r=JohnTitor

Fix documentation of conversion from String to OsString

From [this question on URLO](https://users.rust-lang.org/t/does-converting-a-string-into-a-pathbuf-allocate-new-buffer/57678), I noticed that the documentation of `From<String> for OsString` incorrectly claims to be copying data.

````@rustbot```` modify labels: T-doc, T-libs

3 years agoRollup merge of #83699 - JohnTitor:issue-68830, r=Dylan-DPC
Dylan DPC [Thu, 1 Apr 2021 00:41:45 +0000 (02:41 +0200)]
Rollup merge of #83699 - JohnTitor:issue-68830, r=Dylan-DPC

Add a regression test for issue-68830

Closes #68830

3 years agoRollup merge of #83015 - hyd-dev:test-79825-81555, r=Aaron1011
Dylan DPC [Thu, 1 Apr 2021 00:41:44 +0000 (02:41 +0200)]
Rollup merge of #83015 - hyd-dev:test-79825-81555, r=Aaron1011

Add regression tests for #79825 and #81555

Closes #79825.
Closes #81555.

`@rustbot` label A-proc-macros T-compiler

3 years agopanic early when TrustedLen indicates a length > usize::MAX
The8472 [Wed, 31 Mar 2021 21:09:28 +0000 (23:09 +0200)]
panic early when TrustedLen indicates a length > usize::MAX

3 years agoAdd a button to copy the "use statement"
Guillaume Gomez [Wed, 31 Mar 2021 20:13:47 +0000 (22:13 +0200)]
Add a button to copy the "use statement"

3 years agoAuto merge of #76814 - jackh726:binder-refactor, r=nikomatsakis
bors [Wed, 31 Mar 2021 18:06:06 +0000 (18:06 +0000)]
Auto merge of #76814 - jackh726:binder-refactor, r=nikomatsakis

Refactor `Binder` to track bound vars

c.c. `@rust-lang/wg-traits`

This is super early (and might just get closed at some point), but want to get at least an initial idea of the perf impact.

r? `@ghost`

3 years agoUpdate LLVM with another wasm simd fix
Alex Crichton [Wed, 31 Mar 2021 17:24:41 +0000 (10:24 -0700)]
Update LLVM with another wasm simd fix

Just a small bug fix for opcode numberings, not too major.

3 years agoClarify `--print target-list` is a rustc's option
JohnTitor [Wed, 31 Mar 2021 16:59:50 +0000 (01:59 +0900)]
Clarify `--print target-list` is a rustc's option

3 years agoFix compiletest to use correct bitwidth stderr files.
Hameer Abbasi [Wed, 31 Mar 2021 15:30:07 +0000 (15:30 +0000)]
Fix compiletest to use correct bitwidth stderr files.

3 years agoEnable debugging the dep-graph without debug-assertions.
Camille GILLOT [Wed, 31 Mar 2021 15:12:03 +0000 (17:12 +0200)]
Enable debugging the dep-graph without debug-assertions.

It may also be useful in these cases,
and some CI configurations test without debug assertions.

3 years agoCleanups and comments
Jack Huey [Fri, 26 Mar 2021 21:40:15 +0000 (17:40 -0400)]
Cleanups and comments

3 years agoFix tests and AstConv -> dyn AstConv
Jack Huey [Thu, 25 Mar 2021 16:15:45 +0000 (12:15 -0400)]
Fix tests and AstConv -> dyn AstConv

3 years agoFmt and test revert
Jack Huey [Fri, 12 Mar 2021 02:49:41 +0000 (21:49 -0500)]
Fmt and test revert

3 years agoFix new problem from rebase and a little cleanup
Jack Huey [Fri, 12 Mar 2021 02:08:49 +0000 (21:08 -0500)]
Fix new problem from rebase and a little cleanup

3 years agoAdd var to BoundRegion. Add query to get bound vars for applicable items.
Jack Huey [Mon, 26 Oct 2020 18:18:31 +0000 (14:18 -0400)]
Add var to BoundRegion. Add query to get bound vars for applicable items.

3 years agoMake late and late_anon regions track the bound var position
Jack Huey [Sun, 15 Nov 2020 22:06:58 +0000 (17:06 -0500)]
Make late and late_anon regions track the bound var position

3 years agoRevert explicit lifetimes
Jack Huey [Thu, 17 Dec 2020 00:14:21 +0000 (19:14 -0500)]
Revert explicit lifetimes

3 years agoTrack bound vars
Jack Huey [Tue, 6 Oct 2020 00:41:46 +0000 (20:41 -0400)]
Track bound vars

3 years agoAdd tcx lifetime to Binder
Jack Huey [Mon, 5 Oct 2020 20:51:33 +0000 (16:51 -0400)]
Add tcx lifetime to Binder

3 years agocount bound vars
Jack Huey [Tue, 2 Jun 2020 21:10:22 +0000 (17:10 -0400)]
count bound vars

3 years agoApply suggestions from code review
Frank Steffahn [Wed, 31 Mar 2021 14:08:20 +0000 (16:08 +0200)]
Apply suggestions from code review

More links, one more occurrence of “a OsString”

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
3 years agoAdd u32 for bound variables to Binder
Jack Huey [Mon, 1 Jun 2020 23:23:23 +0000 (19:23 -0400)]
Add u32 for bound variables to Binder

3 years agoSome rebinds and dummys
Jack Huey [Thu, 7 Jan 2021 05:41:55 +0000 (00:41 -0500)]
Some rebinds and dummys

3 years agoAdd a few missing links, fix a typo
Frank Steffahn [Wed, 31 Mar 2021 10:24:37 +0000 (12:24 +0200)]
Add a few missing links, fix a typo

3 years agoFix documentation of conversion from String to OsString
Frank Steffahn [Wed, 31 Mar 2021 10:11:24 +0000 (12:11 +0200)]
Fix documentation of conversion from String to OsString

3 years agoRevert tests
Oli Scherer [Wed, 31 Mar 2021 11:33:15 +0000 (11:33 +0000)]
Revert tests

3 years agobail out early when substituting mir constants that don't need substituting
Oli Scherer [Wed, 31 Mar 2021 09:13:25 +0000 (09:13 +0000)]
bail out early when substituting mir constants that don't need substituting

3 years agoForward some layouts to prevent recomputation
Oli Scherer [Tue, 30 Mar 2021 16:08:53 +0000 (16:08 +0000)]
Forward some layouts to prevent recomputation

3 years agoAdd a new normalization query just for mir constants
Oli Scherer [Tue, 30 Mar 2021 14:26:40 +0000 (14:26 +0000)]
Add a new normalization query just for mir constants

3 years agoAdd a regression test for issue-68830
JohnTitor [Wed, 31 Mar 2021 09:48:28 +0000 (18:48 +0900)]
Add a regression test for issue-68830

3 years agoAdd 32bit.stderr files.
Hameer Abbasi [Wed, 31 Mar 2021 09:33:45 +0000 (09:33 +0000)]
Add 32bit.stderr files.

3 years agoWe should never see unevaluated type-level constants after monomorphization unless...
Oli Scherer [Tue, 30 Mar 2021 12:11:29 +0000 (12:11 +0000)]
We should never see unevaluated type-level constants after monomorphization unless errors occurred

3 years agoMake unevaluated DefId rendering deterministic
Oli Scherer [Mon, 29 Mar 2021 16:35:21 +0000 (16:35 +0000)]
Make unevaluated DefId rendering deterministic

3 years agoAuto merge of #83684 - cjgillot:csp, r=petrochenkov
bors [Wed, 31 Mar 2021 08:34:40 +0000 (08:34 +0000)]
Auto merge of #83684 - cjgillot:csp, r=petrochenkov

Remove hir::CrateItem.

The crate span is exactly the crate module's inner span. There is no need to store it twice.

3 years agoRename stderr->64bit.stderr where needed.
Hameer Abbasi [Wed, 31 Mar 2021 08:09:16 +0000 (08:09 +0000)]
Rename stderr->64bit.stderr where needed.

3 years agoAdd allocation information to undefined behaviour errors.
Hameer Abbasi [Mon, 1 Feb 2021 12:02:31 +0000 (12:02 +0000)]
Add allocation information to undefined behaviour errors.

3 years agoAuto merge of #83681 - jyn514:blanket-impls-tweaks, r=Aaron1011
bors [Wed, 31 Mar 2021 05:47:22 +0000 (05:47 +0000)]
Auto merge of #83681 - jyn514:blanket-impls-tweaks, r=Aaron1011

rustdoc: Only look at blanket impls in `get_blanket_impls`

The idea here is that all the work in https://github.com/rust-lang/rust/blob/16156fb2787f745e57504197bd7fe38b69c6cbea/compiler/rustc_middle/src/ty/trait_def.rs#L172-L186 doesn't matter for `get_blanket_impls` - Rustdoc will already pick up on those blocks when it documents the item.

3 years agoAuto merge of #83666 - Amanieu:instrprof-order, r=tmandry
bors [Wed, 31 Mar 2021 03:20:33 +0000 (03:20 +0000)]
Auto merge of #83666 - Amanieu:instrprof-order, r=tmandry

Run LLVM coverage instrumentation passes before optimization passes

This matches the behavior of Clang and allows us to remove several
hacks which were needed to ensure functions weren't optimized away
before reaching the instrumentation pass.

Fixes #83429

cc `@richkadel`

r? `@tmandry`

3 years agoAuto merge of #83692 - Dylan-DPC:rollup-2a2m3jy, r=Dylan-DPC
bors [Tue, 30 Mar 2021 23:47:51 +0000 (23:47 +0000)]
Auto merge of #83692 - Dylan-DPC:rollup-2a2m3jy, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #80720 (Make documentation of which items the prelude exports more readable.)
 - #83654 (Do not emit a suggestion that causes the E0632 error)
 - #83671 (Add a regression test for issue-75801)
 - #83678 (Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc))
 - #83680 (Update for loop desugaring docs)
 - #83683 (bootstrap: don't complain about linkcheck if it is excluded)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #83683 - tblah:riscv64linux_links, r=Mark-Simulacrum
Dylan DPC [Tue, 30 Mar 2021 23:14:50 +0000 (01:14 +0200)]
Rollup merge of #83683 - tblah:riscv64linux_links, r=Mark-Simulacrum

bootstrap: don't complain about linkcheck if it is excluded

We don't need to complain to the user about linkcheck having different
hosts and targets when it is already excluded.

Resolves #83661

3 years agoRollup merge of #83680 - ibraheemdev:patch-2, r=Dylan-DPC
Dylan DPC [Tue, 30 Mar 2021 23:14:49 +0000 (01:14 +0200)]
Rollup merge of #83680 - ibraheemdev:patch-2, r=Dylan-DPC

Update for loop desugaring docs

It looks like the documentation for `for` loops was not updated to match the new de-sugaring process.

3 years agoRollup merge of #83678 - GuillaumeGomez:hack-Self-keyword-conflict, r=jyn514
Dylan DPC [Tue, 30 Mar 2021 23:14:48 +0000 (01:14 +0200)]
Rollup merge of #83678 - GuillaumeGomez:hack-Self-keyword-conflict, r=jyn514

Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc)

This is just a hack to allow rustup to work on macOS and windows again to distribute std documentation (hopefully once https://github.com/rust-lang/rfcs/pull/3097 or an equivalent is merged).

Fixes https://github.com/rust-lang/rust/issues/80504. Prevents https://github.com/rust-lang/rust/issues/83154 and https://github.com/rust-lang/rustup/issues/2694 in future releases.

cc ``@kinnison``
r? ``@jyn514``

3 years agoRollup merge of #83671 - JohnTitor:issue-75801-test, r=Dylan-DPC
Dylan DPC [Tue, 30 Mar 2021 23:14:47 +0000 (01:14 +0200)]
Rollup merge of #83671 - JohnTitor:issue-75801-test, r=Dylan-DPC

Add a regression test for issue-75801

Closes #75801
r? ``@Aaron1011``

3 years agoRollup merge of #83654 - JohnTitor:issue-83606, r=estebank
Dylan DPC [Tue, 30 Mar 2021 23:14:46 +0000 (01:14 +0200)]
Rollup merge of #83654 - JohnTitor:issue-83606, r=estebank

Do not emit a suggestion that causes the E0632 error

Fixes #83606

3 years agoRollup merge of #80720 - steffahn:prettify_prelude_imports, r=camelid,jyn514
Dylan DPC [Tue, 30 Mar 2021 23:14:40 +0000 (01:14 +0200)]
Rollup merge of #80720 - steffahn:prettify_prelude_imports, r=camelid,jyn514

Make documentation of which items the prelude exports more readable.

I recently figured out that rustdoc allows link inside of inline code blocks as long as they’re delimited with `<code> </code>` instead of `` ` ` ``. I think this applies nicely in the listing of prelude exports [in the docs](https://doc.rust-lang.org/std/prelude/index.html). There, currently unformatted `::` and `{ , }` is used in order to mimick import syntax while attatching links to individual identifiers.

## Rendered Comparison
### Currently (light)
![Screenshot_20210105_155801](https://user-images.githubusercontent.com/3986214/103661510-1a87be80-4f6f-11eb-8360-1dfb23f732e8.png)

### After this PR (light)
![Screenshot_20210105_155811](https://user-images.githubusercontent.com/3986214/103661533-1f4c7280-4f6f-11eb-89d4-874793937824.png)

### Currently (dark)
![Screenshot_20210105_155824](https://user-images.githubusercontent.com/3986214/103661571-2a9f9e00-4f6f-11eb-95f9-e291b5570b41.png)

### After this PR (dark)
![Screenshot_20210105_155836](https://user-images.githubusercontent.com/3986214/103661592-2ffce880-4f6f-11eb-977a-82afcb07d331.png)

### Currently (ayu)
![Screenshot_20210105_155917](https://user-images.githubusercontent.com/3986214/103661619-39865080-4f6f-11eb-9ca1-9045a107cddd.png)

### After this PR (ayu)
![Screenshot_20210105_155923](https://user-images.githubusercontent.com/3986214/103661652-3db26e00-4f6f-11eb-82b7-378e38f0c41f.png)

_Edit:_ I just noticed, the “current” screenshots are from stable, so there are a few more differences in the pictures than the ones from just this PR.

3 years agoFix fulldeps tests.
Camille GILLOT [Tue, 30 Mar 2021 21:51:15 +0000 (23:51 +0200)]
Fix fulldeps tests.

3 years agoAuto merge of #83652 - xu-cheng:ipv4-octal, r=sfackler
bors [Tue, 30 Mar 2021 19:34:23 +0000 (19:34 +0000)]
Auto merge of #83652 - xu-cheng:ipv4-octal, r=sfackler

Disallow octal format in Ipv4 string

In its original specification, leading zero in Ipv4 string is interpreted
as octal literals. So a IP address 0127.0.0.1 actually means 87.0.0.1.

This confusion can lead to many security vulnerabilities. Therefore, in
[IETF RFC 6943], it suggests to disallow octal/hexadecimal format in Ipv4
string all together.

Existing implementation already disallows hexadecimal numbers. This commit
makes Parser reject octal numbers.

Fixes #83648.

[IETF RFC 6943]: https://tools.ietf.org/html/rfc6943#section-3.1.1

3 years agoRemove hir::CrateItem.
Camille GILLOT [Tue, 30 Mar 2021 18:31:06 +0000 (20:31 +0200)]
Remove hir::CrateItem.

3 years agobootstrap: don't complain about linkcheck if it is excluded
Tom Eccles [Tue, 30 Mar 2021 17:36:53 +0000 (18:36 +0100)]
bootstrap: don't complain about linkcheck if it is excluded

We don't need to complain to the user about linkcheck having different
hosts and targets when it is already excluded. This can be achieved by
moving the check to when the step is run instead of in should_run.

3 years agoAuto merge of #83639 - osa1:issue83638, r=estebank
bors [Tue, 30 Mar 2021 17:07:19 +0000 (17:07 +0000)]
Auto merge of #83639 - osa1:issue83638, r=estebank

Replace tabs in err messages before rendering

This is done in other call sites, but was missing in one place.

Fixes #83638

3 years agoOnly look at blanket impls in `get_blanket_impls`
Joshua Nelson [Tue, 30 Mar 2021 16:28:33 +0000 (12:28 -0400)]
Only look at blanket impls in `get_blanket_impls`

3 years agoAlso profile finishing the encoding.
Camille GILLOT [Tue, 23 Mar 2021 12:19:42 +0000 (13:19 +0100)]
Also profile finishing the encoding.

3 years agoAdjust profiling.
Camille GILLOT [Thu, 18 Mar 2021 18:38:50 +0000 (19:38 +0100)]
Adjust profiling.

3 years agoAddress review.
Camille GILLOT [Thu, 18 Mar 2021 18:26:08 +0000 (19:26 +0100)]
Address review.

3 years agoAdd documentation.
Camille GILLOT [Wed, 17 Mar 2021 18:23:17 +0000 (19:23 +0100)]
Add documentation.

3 years agoSimplify tracking the encoder state.
Camille GILLOT [Tue, 16 Mar 2021 19:52:28 +0000 (20:52 +0100)]
Simplify tracking the encoder state.

3 years agoRemove the parallel version.
Camille GILLOT [Tue, 16 Mar 2021 18:32:00 +0000 (19:32 +0100)]
Remove the parallel version.

3 years agoFix parallel compiler.
Camille GILLOT [Sat, 6 Mar 2021 14:58:32 +0000 (15:58 +0100)]
Fix parallel compiler.

3 years agoFix tests.
Camille GILLOT [Sat, 6 Mar 2021 12:55:20 +0000 (13:55 +0100)]
Fix tests.

Avoid invoking queries inside `check_paths`, since we are holding a lock
to the reconstructed graph.

3 years agoDo not allocate in decoder.
Camille GILLOT [Sat, 6 Mar 2021 10:17:56 +0000 (11:17 +0100)]
Do not allocate in decoder.

3 years agoStream the dep-graph to a file.
Camille GILLOT [Tue, 2 Mar 2021 21:38:49 +0000 (22:38 +0100)]
Stream the dep-graph to a file.

3 years agoupdate for loop desugaring docs
Ibraheem Ahmed [Tue, 30 Mar 2021 16:03:58 +0000 (12:03 -0400)]
update for loop desugaring docs

3 years agoFix Self keyword doc URL conflict on case insensitive file systems
Guillaume Gomez [Tue, 30 Mar 2021 14:13:11 +0000 (16:13 +0200)]
Fix Self keyword doc URL conflict on case insensitive file systems

3 years agoAuto merge of #83170 - joshtriplett:spawn-cleanup, r=kennytm
bors [Tue, 30 Mar 2021 14:26:01 +0000 (14:26 +0000)]
Auto merge of #83170 - joshtriplett:spawn-cleanup, r=kennytm

Simplify Command::spawn (no semantic change)

This minimizes the size of an unsafe block, and allows outdenting some
complex code.

3 years agoAuto merge of #83674 - Dylan-DPC:rollup-bcuc1hl, r=Dylan-DPC
bors [Tue, 30 Mar 2021 11:44:36 +0000 (11:44 +0000)]
Auto merge of #83674 - Dylan-DPC:rollup-bcuc1hl, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #83568 (update comment at MaybeUninit::uninit_array)
 - #83571 (Constantify some slice methods)
 - #83579 (Improve pointer arithmetic docs)
 - #83645 (Wrap non-pre code blocks)
 - #83656 (Add a regression test for issue-82865)
 - #83662 (Update books)
 - #83667 (Suggest box/pin/arc ing receiver on method calls)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #83667 - estebank:cool-bears-hot-tip, r=lcnr
Dylan DPC [Tue, 30 Mar 2021 09:34:30 +0000 (11:34 +0200)]
Rollup merge of #83667 - estebank:cool-bears-hot-tip, r=lcnr

Suggest box/pin/arc ing receiver on method calls

_Extracted from https://fasterthanli.me/articles/pin-and-suffering_