Commit graph

135461 commits

Author SHA1 Message Date
Eric Huss
96a00a96bd Update mdbook 2021-01-20 08:01:37 -05:00
Pietro Albini
4050e2796e bootstrap: fix x.py install not working with relative prefix 2021-01-20 08:01:37 -05:00
Pietro Albini
13cd7680ec bootstrap: use the correct paths during ./x.py install 2021-01-20 08:01:37 -05:00
Pietro Albini
14fa726734 bootstrap: change the dist outputs to GeneratedTarball
The struct will allow to store more context on the generated tarballs.
2021-01-20 08:01:37 -05:00
Pietro Albini
4e4636d9d4 bootstrap: never delete the tarball temporary directory
Files in the temporary directory are used by ./x.py install.
2021-01-20 08:01:37 -05:00
Pietro Albini
44a1f09985 bootstrap: extract from any compression algorithm during distcheck 2021-01-20 08:01:37 -05:00
Steven Fackler
2eef2e24ba clarify docs a bit 2021-01-20 08:01:37 -05:00
Steven Fackler
e73125e9e8 make check a bit more clear 2021-01-20 08:01:37 -05:00
Steven Fackler
2fe7ddc3f8 clean up control flow 2021-01-20 08:01:37 -05:00
Steven Fackler
59b6b1101f Fix handling of malicious Readers in read_to_end 2021-01-20 08:01:37 -05:00
bors
33b84bb246 Auto merge of #81201 - calebcartwright:beta, r=Mark-Simulacrum
[beta] update RLS and rustfmt with backported rustfmt fix

Refs https://github.com/rust-lang/rust/pull/81151#issuecomment-761949761

r? `@Mark-Simulacrum`

cc `@Xanewok`
2021-01-20 01:27:48 +00:00
Caleb Cartwright
78cd953e6a update RLS and rustfmt 2021-01-19 18:56:24 -06:00
bors
ea20aa255b Auto merge of #80975 - ehuss:update-beta-cargo, r=Mark-Simulacrum
[beta] Update cargo

1 commits in 75d5d8cffe3464631f82dcd3c470b78dc1dda8bb..1a8df6a5196e4cad9a3956867e7e928f2bfaaba4
2020-12-22 18:10:56 +0000 to 2021-01-12 20:10:42 +0000
- [BETA] Fix `links` vars showing up for testing packages (rust-lang/cargo#9068)
2021-01-14 05:35:22 +00:00
Eric Huss
914bed4bd5 [beta] Update cargo 2021-01-12 21:52:29 -08:00
bors
ff59982926 Auto merge of #80680 - flip1995:clippy_backport, r=Mark-Simulacrum
[beta] Clippy backport field_reassign_with_default fix

cc `@ebroto` `@Manishearth`

We had multiple complaints about this lint landing in stable 1.49 with a FP hit quite often in real world code. We want to backport the fix for this, so it already gets into 1.50. A stable backport is not warranted by this IMO.

r? `@Mark-Simulacrum`
2021-01-05 05:55:04 +00:00
flip1995
70fced0f88
Merge commit '4bd77a19f3' into beta 2021-01-04 09:22:59 +01:00
bors
4bd77a19f3 Auto merge of #6537 - flip1995:beta, r=ebroto
[beta] Backport of #6375 - field_reassign_with_default fix

With the pinned nightly we can test backports to our beta branch now 🎉

cc #6515

changelog: beta 1.50: Backport of private fields fix in [`field_reassign_with_default`] lints
2021-01-03 14:38:43 +00:00
Cameron Steffen
fa75f63690
Fix field_reassign_with_default for private fields 2021-01-02 18:25:40 +01:00
Cameron Steffen
f74e2001b9
Remove redundant shadow check
There is already an assertion that consecutive lines assign to a struct
field.
2021-01-02 18:25:40 +01:00
Cameron Steffen
173e1ba966
Fix default initialized fields in suggestion
The default value for a field type does not necessarily match the
default value for that field in the struct Default.
2021-01-02 18:25:39 +01:00
bors
25b3db3aa7 Auto merge of #80560 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports

This backports accepted PRs and switches to bootstrapping from the released compiler:

* de-stabilize unsized raw ptr methods for Weak #80422
* Use package name for top-level directory in bare tarballs #80397
* Prevent caching normalization results with a cycle #80246

r? `@Mark-Simulacrum`
2020-12-31 17:46:24 +00:00
Matthew Jasper
89164cdff6 Prevent caching projections in the case of cycles
When normalizing a projection which results in a cycle, we would
cache the result of `project_type` without the nested obligations
(because they're not needed for inference). This would result in
the nested obligations only being handled once in fulfill, which
would avoid the cycle error.

Fixes #79714, a regresion from #79305 caused by the removal of
`get_paranoid_cache_value_obligation`.
2020-12-31 09:52:10 -05:00
Matthew Jasper
8da279982c Make recursion limit fatal in project
This avoid the hang/oom from #79714
2020-12-31 09:52:10 -05:00
Mark Rousskov
31d03c4cc5 Use package name for top-level directory in bare tarballs
This fixes a bug introduced by #79788.
2020-12-31 09:50:27 -05:00
Ralf Jung
48233acf2a de-stabilize unsized raw ptr methods for Weak 2020-12-31 09:49:11 -05:00
Mark Rousskov
bfceef0cb4 Bootstrap from released compiler 2020-12-31 09:49:04 -05:00
bors
05b6023675 Auto merge of #80479 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] Prepare 1.50 beta

r? `@Mark-Simulacrum`
2020-12-29 20:26:40 +00:00
Mark Rousskov
483c1a83ca Permit unstable features during PGO benchmarks 2020-12-29 15:18:40 -05:00
Mark Rousskov
57950a2084 Ignore failures of RLS on aarch64 Windows 2020-12-29 12:34:35 -05:00
Mark Rousskov
d17ca57176 Update fulldeps test 2020-12-29 12:34:26 -05:00
Mark Rousskov
65e131e322 Prepare 1.50 beta 2020-12-29 11:39:30 -05:00
bors
bb178237c5 Auto merge of #80235 - RalfJung:validate-promoteds, r=oli-obk
validate promoteds

Turn on const-value validation for promoteds. This is made possible now that https://github.com/rust-lang/rust/issues/67534 is resolved.

I don't think this is a breaking change. We don't promote any unsafe operation any more (since https://github.com/rust-lang/rust/pull/77526 landed). We *do* promote `const fn` calls under some circumstances (in `const`/`static` initializers), but union field access and similar operations are not allowed in `const fn`. So now is a perfect time to add this check. :D

r? `@oli-obk`
Fixes https://github.com/rust-lang/rust/issues/67465
2020-12-25 18:25:48 +00:00
bors
1832bdd7de Auto merge of #80296 - wesleywiser:revert_missing_fragment_specifier_hard_error, r=Mark-Simulacrum
Revert missing fragment specifier hard error

Closes #76605

Reopens #40107

r? `@Mark-Simulacrum`
2020-12-25 14:09:08 +00:00
bors
ab10778854 Auto merge of #80226 - ThePuzzlemaker:issue-80004-fix, r=jyn514,petrochenkov
Highlight edition-specific keywords correctly in code blocks, accounting for code block edition modifiers

Previously, edition-specific keywords (such as `async` and `await`) were not highlighted in code blocks, regardless of what edition was set. With this PR, this issue is fixed.

Now, the following behavior happens:
- When a code block is explicitly set to edition X, keywords from edition X are highlighted
- When a code block is explicitly set to a version that does not contain those keywords from edition X (e.g. edition Y), keywords from edition X are **not** highlighted
- When a code block has no explicit edition, keywords from the edition passed via `--edition` to rustdoc are highlighted

For example, a project set with `edition = "2015"` in its `Cargo.toml` would not highlight `async`/`await` unless the code block was set to `edition2018`. Additionally, a project set with `edition = "2018"` in its `Cargo.toml` *would* highlight `async`/`await` unless the code block was set to a version that did not contain those keywords (e.g. `edition2015`).

This PR fixes #80004.

r? `@jyn514`
2020-12-25 11:16:53 +00:00
bors
198ec340f6 Auto merge of #80187 - 0dvictor:nativelib, r=bjorn3
Exclude unnecessary info from CodegenResults

`foreign_module` and `wasm_import_module` are not needed for linking, and hence can be removed from CodegenResults.

Fixes #77857
2020-12-25 08:17:21 +00:00
bors
9a40539c38 Auto merge of #80364 - Dylan-DPC:rollup-0y96okz, r=Dylan-DPC
Rollup of 11 pull requests

Successful merges:

 - #79213 (Stabilize `core::slice::fill`)
 - #79999 (Refactored verbose print into a function)
 - #80160 (Implemented a compiler diagnostic for move async mistake)
 - #80274 (Rename rustc_middle::lint::LintSource)
 - #80280 (Add installation commands to `x` tool README)
 - #80319 (Fix elided lifetimes shown as `'_` on async functions)
 - #80327 (Updated the match with the matches macro)
 - #80330 (Fix typo in simplify_try.rs)
 - #80340 (Don't unnecessarily override attrs for Module)
 - #80342 (Fix typo)
 - #80352 (BTreeMap: make test cases more explicit on failure)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2020-12-25 05:23:24 +00:00
Dylan DPC
7c7812dfd3
Rollup merge of #80352 - ssomers:btree_test_diagnostics, r=Mark-Simulacrum
BTreeMap: make test cases more explicit on failure

r? `@Mark-Simulacrum`
2020-12-25 03:39:51 +01:00
Dylan DPC
3cf289bd5f
Rollup merge of #80342 - pierwill:patch-1, r=lcnr
Fix typo
2020-12-25 03:39:49 +01:00
Dylan DPC
28267e3839
Rollup merge of #80340 - jyn514:less-modules-attrs, r=GuillaumeGomez
Don't unnecessarily override attrs for Module

They were never changed from the default, which you can get with `tcx.get_attrs()`.
2020-12-25 03:39:48 +01:00
Dylan DPC
704f81e3cb
Rollup merge of #80330 - eltociear:patch-2, r=lcnr
Fix typo in simplify_try.rs

assigment -> assignment
2020-12-25 03:39:46 +01:00
Dylan DPC
2dab627d77
Rollup merge of #80327 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
Updated the match with the matches macro

r?````@GuillaumeGomez````
2020-12-25 03:39:43 +01:00
Dylan DPC
d837407339
Rollup merge of #80319 - jyn514:async-lifetimes, r=tmandry
Fix elided lifetimes shown as `'_` on async functions

Closes https://github.com/rust-lang/rust/issues/63037.

r? `@tmandry` on the implementation, `@Darksonn` on the test cases.
2020-12-25 03:39:40 +01:00
Dylan DPC
c24fcad7be
Rollup merge of #80280 - pierwill:x-readme, r=Mark-Simulacrum
Add installation commands to `x` tool README
2020-12-25 03:39:38 +01:00
Dylan DPC
b295b8e67b
Rollup merge of #80274 - pierwill:lintlevelsource, r=petrochenkov
Rename rustc_middle::lint::LintSource

Rename [`rustc_middle::lint::LintSource`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/lint/enum.LintSource.html) to `rustc_middle::lint::LintLevelSource`.

This enum represents the source of a *lint level*, not a lint. This should improve code readability.

Update: Also documents `rustc_middle::lint::LevelSource` to clarify.
2020-12-25 03:39:36 +01:00
Dylan DPC
299c2fc695
Rollup merge of #80160 - diondokter:move_async_fix, r=davidtwco
Implemented a compiler diagnostic for move async mistake

Fixes #79694

First time contributing, so I hope I'm doing everything right.
(If not, please correct me!)

This code performs a check when a move capture clause is parsed. The check is to detect if the user has reversed the async move keywords and to provide a diagnostic with a suggestion to fix it.

Checked code:
```rust
fn main() {
    move async { };
}
```

Previous output:
```txt
PS C:\Repos\move_async_test> cargo build
   Compiling move_async_test v0.1.0 (C:\Repos\move_async_test)
error: expected one of `|` or `||`, found keyword `async`
 --> src\main.rs:2:10
  |
2 |     move async { };
  |          ^^^^^ expected one of `|` or `||`

error: aborting due to previous error

error: could not compile `move_async_test`
```

New output:
```txt
PS C:\Repos\move_async_test> cargo +dev build
   Compiling move_async_test v0.1.0 (C:\Repos\move_async_test)
error: the order of `move` and `async` is incorrect
 --> src\main.rs:2:13
  |
2 |     let _ = move async { };
  |             ^^^^^^^^^^
  |
help: try switching the order
  |
2 |     let _ = async move { };
  |             ^^^^^^^^^^

error: aborting due to previous error

error: could not compile `move_async_test`
```

Is there a file/module where these kind of things are tested?
Would love some feedback 😄
2020-12-25 03:39:35 +01:00
Dylan DPC
787b016957
Rollup merge of #79999 - hencrice:yenlinc/79799, r=oli-obk
Refactored verbose print into a function

Also handle Tuple and Array separately, which was not explicitly checked.

Fixes #79799.
2020-12-25 03:39:33 +01:00
Dylan DPC
21d36e0daf
Rollup merge of #79213 - yoshuawuyts:stabilize-slice-fill, r=m-ou-se
Stabilize `core::slice::fill`

Tracking issue https://github.com/rust-lang/rust/issues/70758

Stabilizes the `core::slice::fill` API in Rust 1.50, adding a `memset` doc alias so people coming from C/C++ looking for this operation can find it in the docs. This API hasn't seen any changes since we changed the signature in https://github.com/rust-lang/rust/pull/71165/, and it seems like the right time to propose stabilization. Thanks!

r? `@m-ou-se`
2020-12-25 03:39:31 +01:00
bors
cae1f4ddf2 Auto merge of #79762 - Swatinem:remap-doctest-coverage, r=Swatinem
Remap instrument-coverage line numbers in doctests

This uses the `SourceMap::doctest_offset_line` method to re-map line
numbers from doctests. Remapping columns is not yet done, and rustdoc
still does not output the correct filename when running doctests in a
workspace.

Part of #79417 although I dont consider that fixed until both filenames
and columns are mapped correctly.

r? `@richkadel`

I might jump on zulip the comming days. Still need to figure out how to properly write tests for this, and deal with other doctest issues in the meantime.
2020-12-25 02:37:08 +00:00
bors
2c308b9a2a Auto merge of #79347 - ssomers:btree_split_pointer_provenance, r=Mark-Simulacrum
BTreeMap: respect pointer provenance rules in split_off

The test cases for `split_off` reported a few more violations (now that they support -Zmiri-track-raw-pointers). The functions `shift_kv` and `shift_edges` do not fix anything, I think, but if `move_kv` and `move_edges` exist, they deserve to live too.

r? `@Mark-Simulacrum`
2020-12-24 21:49:15 +00:00
ThePuzzlemaker
db1451c7ad
rustdoc: Highlight edition-specific keywords correctly in code blocks, accounting for code block edition modifiers
This is a squash of these commits:
- Highlight edition-specific keywords correctly in code blocks,
accounting for code block edition modifiers
- Fix unit tests
- Revert changes to rustc_span::symbol to prepare for merge of #80272
- Use new Symbol::is_reserved API from #80272
- Remove unused import added by accident when merging
2020-12-24 12:46:17 -06:00