]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoTest exploring the interactions between all of the different kinds of method collisio...
Felix S. Klock II [Sat, 23 Jan 2021 05:54:19 +0000 (00:54 -0500)]
Test exploring the interactions between all of the different kinds of method collisions I could imagine.

The different impls are all guarded by cfg-flags, and the revisions could be
used to cover the full power-set of combinations.

(I only included 20 of the possible 32 cases here; the null-set is not
interesting, and the remaining 11 all yielded ambiguous method resolution errors
which did not mix well with this testing strategy; I'm not trying to check UI
for the resolution diagnostics; I'm trying to create checkpoint of current
resolution semantics when compilation succeeds.)

3 years agoRegression tests for issue 81211.
Felix S. Klock II [Sat, 23 Jan 2021 05:50:31 +0000 (00:50 -0500)]
Regression tests for issue 81211.

3 years agoUse UFCS instead of method calls in `derive(Debug)`. See issue 81211 for discussion.
Felix S. Klock II [Sat, 23 Jan 2021 05:50:03 +0000 (00:50 -0500)]
Use UFCS instead of method calls in `derive(Debug)`. See issue 81211 for discussion.

3 years agoAuto merge of #81625 - jonas-schievink:rollup-mshpp2n, r=jonas-schievink
bors [Mon, 1 Feb 2021 16:30:22 +0000 (16:30 +0000)]
Auto merge of #81625 - jonas-schievink:rollup-mshpp2n, r=jonas-schievink

Rollup of 12 pull requests

Successful merges:

 - #78641 (Let io::copy reuse BufWriter buffers)
 - #79291 (Add error message for private fn)
 - #81364 (Improve `rustc_mir_build::matches` docs)
 - #81387 (Move some tests to more reasonable directories - 3)
 - #81463 (Rename NLL* to Nll* accordingly to C-CASE)
 - #81504 (Suggest accessing field when appropriate)
 - #81529 (Fix invalid camel case suggestion involving unicode idents)
 - #81536 (Indicate both start and end of pass RSS in time-passes output)
 - #81592 (Rustdoc UI fixes)
 - #81594 (Avoid building LLVM just for llvm-dwp)
 - #81598 (Fix calling convention for CRT startup)
 - #81618 (Sync rustc_codegen_cranelift)

Failed merges:

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

3 years agoRollup merge of #81618 - bjorn3:sync_cg_clif-2021-02-01, r=bjorn3
Jonas Schievink [Mon, 1 Feb 2021 13:29:47 +0000 (14:29 +0100)]
Rollup merge of #81618 - bjorn3:sync_cg_clif-2021-02-01, r=bjorn3

Sync rustc_codegen_cranelift

The highlight of this sync are abi compatibility with cg_llvm allowing mixing of cg_clif and cg_llvm compiled crates and switching to the x64 cranelift backend based on the new backend framework.

r? ``@ghost``

``@rustbot`` label +A-codegen +A-cranelift +T-compiler

3 years agoRollup merge of #81598 - sivadeilra:windows_dll_imports_fix_x86, r=m-ou-se
Jonas Schievink [Mon, 1 Feb 2021 13:29:45 +0000 (14:29 +0100)]
Rollup merge of #81598 - sivadeilra:windows_dll_imports_fix_x86, r=m-ou-se

Fix calling convention for CRT startup

My PR #81478 used the wrong calling convention for a set of
functions that are called by the CRT. These functions need to use
`extern "C"`.

This would only affect x86, which is the only target (that I know of)
that has multiple calling conventions.

```@bors``` r? ```@m-ou-se```

3 years agoRollup merge of #81594 - bjorn3:avoid_building_llvm_for_dwp, r=sanxiyn
Jonas Schievink [Mon, 1 Feb 2021 13:29:44 +0000 (14:29 +0100)]
Rollup merge of #81594 - bjorn3:avoid_building_llvm_for_dwp, r=sanxiyn

Avoid building LLVM just for llvm-dwp

When the LLVM backend is disabled, the llvm-project submodule is not checked out by default. This breaks the bootstrap test for cg_clif. As cg_clif doesn't support split debuginfo anyway llvm-dwp is not necessary. Other backends would likely not want to build LLVM just for llvm-dwp either.

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1119

3 years agoRollup merge of #81592 - GuillaumeGomez:rustdoc-ui-fixes, r=Nemo157
Jonas Schievink [Mon, 1 Feb 2021 13:29:42 +0000 (14:29 +0100)]
Rollup merge of #81592 - GuillaumeGomez:rustdoc-ui-fixes, r=Nemo157

Rustdoc UI fixes

The first commit fixes this bug (I couldn't figure out why we were setting the width manually and it works as expected without so...):

![Screenshot from 2021-01-31 12-58-46](https://user-images.githubusercontent.com/3050060/106384371-d56a7700-63ca-11eb-9e04-c06b40c2ab5e.png)

The second commit fixes a small bug. On tablets or computer with very little width, the search section goes "over" the search input, making it impossible to click on the search input:

![Screenshot from 2021-01-31 13-22-37](https://user-images.githubusercontent.com/3050060/106384413-021e8e80-63cb-11eb-8321-391a1f8a4c7e.png)

The third and last commit fixes two bugs that you can see in this screenshot:

![Screenshot from 2021-01-31 13-41-05](https://user-images.githubusercontent.com/3050060/106384424-0cd92380-63cb-11eb-82de-76218286c3fb.png)

The wheel is going over the search input and the search tab is going under the search results text. The bug was fixed by simply switching to "mobile mode" at a bigger width:

![Screenshot from 2021-01-31 13-49-50](https://user-images.githubusercontent.com/3050060/106384466-4447d000-63cb-11eb-9330-a7cd29403905.png)

cc ```@pickfire```
r? ```@Nemo157```

3 years agoRollup merge of #81536 - tgnottingham:time-passes-rss, r=oli-obk
Jonas Schievink [Mon, 1 Feb 2021 13:29:40 +0000 (14:29 +0100)]
Rollup merge of #81536 - tgnottingham:time-passes-rss, r=oli-obk

Indicate both start and end of pass RSS in time-passes output

Previously, only the end of pass RSS was indicated. This could easily
lead one to believe that the change in RSS from one pass to the next was
attributable to the second pass, when in fact it occurred between the
end of the first pass and the start of the second.

Also, improve alignment of columns.

Sample of output:

```
time:   0.739; rss:   607MB ->   637MB item_types_checking
time:   8.429; rss:   637MB ->   775MB item_bodies_checking
time:  11.063; rss:   470MB ->   775MB type_check_crate
time:   0.232; rss:   775MB ->   777MB match_checking
time:   0.139; rss:   777MB ->   779MB liveness_and_intrinsic_checking
time:   0.372; rss:   775MB ->   779MB misc_checking_2
time:   8.188; rss:   779MB ->  1019MB MIR_borrow_checking
time:   0.062; rss:  1019MB ->  1021MB MIR_effect_checking
```

3 years agoRollup merge of #81529 - estebank:case_lints, r=davidtwco
Jonas Schievink [Mon, 1 Feb 2021 13:29:39 +0000 (14:29 +0100)]
Rollup merge of #81529 - estebank:case_lints, r=davidtwco

Fix invalid camel case suggestion involving unicode idents

Follow up to #77805.

3 years agoRollup merge of #81504 - matsujika:suggestion-field-access, r=estebank
Jonas Schievink [Mon, 1 Feb 2021 13:29:37 +0000 (14:29 +0100)]
Rollup merge of #81504 - matsujika:suggestion-field-access, r=estebank

Suggest accessing field when appropriate

Fix #81222

r? ``@estebank``

3 years agoRollup merge of #81463 - matsujika:nll-ensure-c-case, r=varkor
Jonas Schievink [Mon, 1 Feb 2021 13:29:35 +0000 (14:29 +0100)]
Rollup merge of #81463 - matsujika:nll-ensure-c-case, r=varkor

Rename NLL* to Nll* accordingly to C-CASE

Given [C-CASE](https://rust-lang.github.io/api-guidelines/naming.html#casing-conforms-to-rfc-430-c-case), `NLLRegionVariableOrigin` and `NLL` are encouraged to be `NllRegionVariableOrigin` and `Nll` respectively.

3 years agoRollup merge of #81387 - c410-f3r:tests-tests-tests, r=petrochenkov
Jonas Schievink [Mon, 1 Feb 2021 13:29:33 +0000 (14:29 +0100)]
Rollup merge of #81387 - c410-f3r:tests-tests-tests, r=petrochenkov

Move some tests to more reasonable directories - 3

cc #73494
r? ````@petrochenkov````

https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56202.rs <sup>https://github.com/rust-lang/rust/issues/56202</sup>: traits 1.008
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-69841.rs <sup>https://github.com/rust-lang/rust/issues/69841</sup>: for-loop-while 1.014
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10763.rs <sup>https://github.com/rust-lang/rust/issues/10763</sup>: extern 1.016
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-50599.rs <sup>https://github.com/rust-lang/rust/issues/50599</sup>: resolve 1.018
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-6128.rs <sup>https://github.com/rust-lang/rust/issues/6128</sup>: traits 1.043
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-20616-8.rs <sup>https://github.com/rust-lang/rust/issues/20616</sup>: parser 1.045
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-46553.rs <sup>https://github.com/rust-lang/rust/issues/46553</sup>: consts 1.081
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33140-hack-boundaries.rs <sup>https://github.com/rust-lang/rust/issues/33140</sup>: traits 1.101
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-25826.rs <sup>https://github.com/rust-lang/rust/issues/25826</sup>: consts 1.108
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56488.rs <sup>https://github.com/rust-lang/rust/issues/56488</sup>: traits 1.110
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-58856-1.rs <sup>https://github.com/rust-lang/rust/issues/58856</sup>: parser 1.133
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57819.rs <sup>https://github.com/rust-lang/rust/issues/57819</sup>: parser 1.138
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-54348.rs <sup>https://github.com/rust-lang/rust/issues/54348</sup>: consts 1.155
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-14309.rs <sup>https://github.com/rust-lang/rust/issues/14309</sup>: lint 1.160
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-4446.rs <sup>https://github.com/rust-lang/rust/issues/4446</sup>: threads-sendsync 1.203
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-53675-a-test-called-panic.rs <sup>https://github.com/rust-lang/rust/issues/53675</sup>: test-attrs 1.211
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-40231-2.rs <sup>https://github.com/rust-lang/rust/issues/40231</sup>: consts 1.213
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-22037.rs <sup>https://github.com/rust-lang/rust/issues/22037</sup>: associated-types 1.214
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-59029-2.rs <sup>https://github.com/rust-lang/rust/issues/59029</sup>: traits 1.219
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18425.rs <sup>https://github.com/rust-lang/rust/issues/18425</sup>: consts 1.237
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-6157.rs <sup>https://github.com/rust-lang/rust/issues/6157</sup>: regions 1.238
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33819.rs <sup>https://github.com/rust-lang/rust/issues/33819</sup>: borrowck 1.280
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-3683.rs <sup>https://github.com/rust-lang/rust/issues/3683</sup>: traits 1.283
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-8709.rs <sup>https://github.com/rust-lang/rust/issues/8709</sup>: macros 1.291
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-20616-9.rs <sup>https://github.com/rust-lang/rust/issues/20616</sup>: parser 1.293
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-64732.rs <sup>https://github.com/rust-lang/rust/issues/64732</sup>: parser 1.296
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18655.rs <sup>https://github.com/rust-lang/rust/issues/18655</sup>: associated-types 1.305
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-32947.rs <sup>https://github.com/rust-lang/rust/issues/32947</sup>: simd 1.322
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57198.rs <sup>https://github.com/rust-lang/rust/issues/57198</sup>: parser 1.342
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10764-rpass.rs <sup>https://github.com/rust-lang/rust/issues/10764</sup>: extern 1.392
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-73541-2.rs <sup>https://github.com/rust-lang/rust/issues/73541</sup>: async-await 1.422
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-7970b.rs <sup>https://github.com/rust-lang/rust/issues/7970</sup>: parser 1.439
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57684.rs <sup>https://github.com/rust-lang/rust/issues/57684</sup>: parser 1.512
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33264.rs <sup>https://github.com/rust-lang/rust/issues/33264</sup>: llvm-asm 1.523
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs <sup>https://github.com/rust-lang/rust/issues/65284</sup>: suggestions 1.647
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-17458.rs <sup>https://github.com/rust-lang/rust/issues/17458</sup>: consts 1.711
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56762.rs <sup>https://github.com/rust-lang/rust/issues/56762</sup>: consts 1.787
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2216.rs <sup>https://github.com/rust-lang/rust/issues/2216</sup>: for-loop-while 1.856
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs <sup>https://github.com/rust-lang/rust/issues/45696</sup>: nll 2.009
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-46036.rs <sup>https://github.com/rust-lang/rust/issues/46036</sup>: nll 2.059

````@petrochenkov```` Can you put a place holder (like `N/A`) for tests without GitHub issues? It is a lot easier to parse fixed sized rows.

3 years agoRollup merge of #81364 - camelid:improve-build-matches-docs, r=varkor
Jonas Schievink [Mon, 1 Feb 2021 13:29:31 +0000 (14:29 +0100)]
Rollup merge of #81364 - camelid:improve-build-matches-docs, r=varkor

Improve `rustc_mir_build::matches` docs

- Fix typos
- Add more information
- General cleanup

3 years agoRollup merge of #79291 - JulianKnodt:ce_priv, r=petrochenkov
Jonas Schievink [Mon, 1 Feb 2021 13:29:29 +0000 (14:29 +0100)]
Rollup merge of #79291 - JulianKnodt:ce_priv, r=petrochenkov

Add error message for private fn

Attempts to add a more detailed error when a `const_evaluatable` fn from another scope is used inside of a scope which cannot access it.

r? ````@lcnr````

3 years agoRollup merge of #78641 - the8472:buffered-copy, r=sfackler
Jonas Schievink [Mon, 1 Feb 2021 13:29:28 +0000 (14:29 +0100)]
Rollup merge of #78641 - the8472:buffered-copy, r=sfackler

Let io::copy reuse BufWriter buffers

This optimization will allow users to implicitly set the buffer size for io::copy by wrapping the writer into a `BufWriter` if the default block size is insufficient, which should fix #49921

Due to min_specialization limitations this approach only works with `BufWriter` but not for `BufReader<R>` since `R` is unconstrained and thus the necessary specialization on `R: Read` is not always applicable. Once specialization becomes more powerful this optimization could be extended to look at the reader and writer side and use whichever buffer is larger.

3 years agoAuto merge of #81623 - jonas-schievink:rust-analyzer-2021-02-01, r=jonas-schievink
bors [Mon, 1 Feb 2021 13:29:15 +0000 (13:29 +0000)]
Auto merge of #81623 - jonas-schievink:rust-analyzer-2021-02-01, r=jonas-schievink

:arrow_up: rust-analyzer

3 years ago:arrow_up: rust-analyzer
Jonas Schievink [Mon, 1 Feb 2021 13:27:09 +0000 (14:27 +0100)]
:arrow_up: rust-analyzer

3 years agoAuto merge of #80851 - m-ou-se:panic-2021, r=petrochenkov
bors [Mon, 1 Feb 2021 10:25:31 +0000 (10:25 +0000)]
Auto merge of #80851 - m-ou-se:panic-2021, r=petrochenkov

Implement Rust 2021 panic

This implements the Rust 2021 versions of `panic!()`. See https://github.com/rust-lang/rust/issues/80162 and https://github.com/rust-lang/rfcs/pull/3007.

It does so by replacing `{std, core}::panic!()` by a bulitin macro that expands to either `$crate::panic::panic_2015!(..)` or `$crate::panic::panic_2021!(..)` depending on the edition of the caller.

This does not yet make std's panic an alias for core's panic on Rust 2021 as the RFC proposes. That will be a separate change: https://github.com/rust-lang/rust/pull/80879/commits/c5273bdfb266c35e8eab9413aa8d58d27fdbe114 That change is blocked on figuring out what to do with https://github.com/rust-lang/rust/issues/80846 first.

3 years agoMerge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01
bjorn3 [Mon, 1 Feb 2021 09:11:46 +0000 (10:11 +0100)]
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01

3 years agoAuto merge of #81591 - RalfJung:miri, r=RalfJung
bors [Mon, 1 Feb 2021 02:42:07 +0000 (02:42 +0000)]
Auto merge of #81591 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/81551
Cc `@rust-lang/miri` r? `@ghost`

3 years agoAuto merge of #81596 - jonas-schievink:rollup-utk14gr, r=jonas-schievink
bors [Sun, 31 Jan 2021 23:45:37 +0000 (23:45 +0000)]
Auto merge of #81596 - jonas-schievink:rollup-utk14gr, r=jonas-schievink

Rollup of 11 pull requests

Successful merges:

 - #80092 (2229: Fix issues with move closures and mutability)
 - #80404 (Remove const_in_array_repeat)
 - #81255 (Don't link with --export-dynamic on wasm32-wasi)
 - #81480 (Add suggestion for nested fields)
 - #81549 (Misc ip documentation fixes)
 - #81566 (Add a test for #71202)
 - #81568 (Fix an old FIXME in redundant paren lint)
 - #81571 (Fix typo in E0759)
 - #81572 (Edit multiple error code Markdown files)
 - #81589 (Fix small typo in string.rs)
 - #81590 (Stabilize int_bits_const)

Failed merges:

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

3 years agoUpdate outdated comment
Camelid [Sun, 31 Jan 2021 23:41:17 +0000 (15:41 -0800)]
Update outdated comment

The highest-priority item is the *first* in the list, not the last.
See [this code][1] for more.

[this code]: https://github.com/rust-lang/rust/blob/0e63af5da3400ace48a0345117980473fd21ad73/compiler/rustc_mir_build/src/build/matches/mod.rs#L1334-L1335

3 years agoMove some tests to more reasonable directories
Caio [Sun, 31 Jan 2021 22:46:46 +0000 (19:46 -0300)]
Move some tests to more reasonable directories

3 years agoAdd error message for private fn
kadmin [Sun, 22 Nov 2020 09:37:37 +0000 (09:37 +0000)]
Add error message for private fn

Bless tests

Update with changes from comments

3 years agoAdd option to build using the sysroot of rustc
bjorn3 [Sun, 31 Jan 2021 17:31:33 +0000 (18:31 +0100)]
Add option to build using the sysroot of rustc

3 years agoFix calling convention for CRT startup
Arlie Davis [Sun, 31 Jan 2021 16:49:23 +0000 (08:49 -0800)]
Fix calling convention for CRT startup

My PR #81478 used the wrong calling convention for a set of
functions that are called by the CRT. These functions need to use
`extern "C"`.

This would only affect x86, which is the only target (that I know of)
that has multiple calling conventions.

3 years agoRollup merge of #81590 - KodrAus:stabilize/int_bits_const, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 15:36:57 +0000 (16:36 +0100)]
Rollup merge of #81590 - KodrAus:stabilize/int_bits_const, r=m-ou-se

Stabilize int_bits_const

Closes #76904

The FCP to stabilize the `int_bits_const` feature completed on the tracking issue.

3 years agoRollup merge of #81589 - Seppel3210:master, r=jonas-schievink
Jonas Schievink [Sun, 31 Jan 2021 15:36:56 +0000 (16:36 +0100)]
Rollup merge of #81589 - Seppel3210:master, r=jonas-schievink

Fix small typo in string.rs

3 years agoRollup merge of #81572 - pierwill:edit-error-codes-1, r=jonas-schievink
Jonas Schievink [Sun, 31 Jan 2021 15:36:54 +0000 (16:36 +0100)]
Rollup merge of #81572 - pierwill:edit-error-codes-1, r=jonas-schievink

Edit multiple error code Markdown files

Makes small edits to several error code files. Fixes some missing punctuation. Changes some wording, grammar, and formatting for clarity and readability.

Adds a link to the rustup book in E0658.

3 years agoRollup merge of #81571 - schteve:fix_e0759_typo, r=jonas-schievink
Jonas Schievink [Sun, 31 Jan 2021 15:36:52 +0000 (16:36 +0100)]
Rollup merge of #81571 - schteve:fix_e0759_typo, r=jonas-schievink

Fix typo in E0759

Minor typo in E0759 error message.

3 years agoRollup merge of #81568 - osa1:remove_old_fixme, r=jonas-schievink
Jonas Schievink [Sun, 31 Jan 2021 15:36:51 +0000 (16:36 +0100)]
Rollup merge of #81568 - osa1:remove_old_fixme, r=jonas-schievink

Fix an old FIXME in redundant paren lint

Referenced bug was fixed a while ago

3 years agoRollup merge of #81566 - osa1:issue71202, r=jonas-schievink
Jonas Schievink [Sun, 31 Jan 2021 15:36:49 +0000 (16:36 +0100)]
Rollup merge of #81566 - osa1:issue71202, r=jonas-schievink

Add a test for #71202

Closes #71202

---

Note that the test normally generates this warning:

```
warning: cannot use constants which depend on generic parameters in types
  --> test.rs:10:5
   |
10 | /     const ITEM_IS_COPY: [(); 1 - {
11 | |         trait NotCopy {
12 | |             const VALUE: bool = false;
13 | |         }
...  |
26 | |         <IsCopy<T>>::VALUE
27 | |     } as usize] = [];
   | |_____________________^
   |
   = note: `#[warn(const_evaluatable_unchecked)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #76200 <https://github.com/rust-lang/rust/issues/76200>
```

I added `allow(const_evaluatable_unchecked)`, but maybe we just don't want to add a test for this as the program is not really valid?

3 years agoRollup merge of #81549 - est31:wording_fix, r=jonas-schievink
Jonas Schievink [Sun, 31 Jan 2021 15:36:47 +0000 (16:36 +0100)]
Rollup merge of #81549 - est31:wording_fix, r=jonas-schievink

Misc ip documentation fixes

3 years agoRollup merge of #81480 - b-naber:nested_fields_suggestion, r=estebank
Jonas Schievink [Sun, 31 Jan 2021 15:36:46 +0000 (16:36 +0100)]
Rollup merge of #81480 - b-naber:nested_fields_suggestion, r=estebank

Add suggestion for nested fields

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

r? ```@estebank```

3 years agoRollup merge of #81255 - sunfishcode:wasi-no-export-dynamic, r=alexcrichton
Jonas Schievink [Sun, 31 Jan 2021 15:36:44 +0000 (16:36 +0100)]
Rollup merge of #81255 - sunfishcode:wasi-no-export-dynamic, r=alexcrichton

Don't link with --export-dynamic on wasm32-wasi

Remove --export-dynamic from the link arguments on the wasm32-wasi
target, as it emits spurious exports and increases code size.

Leave it in place for wasm32-unknown-unknown and
wasm32-unknown-emscripten. Even though it isn't a great solution
there, users are likely depending on its behavior there.

3 years agoRollup merge of #80404 - JulianKnodt:arr_ref, r=oli-obk
Jonas Schievink [Sun, 31 Jan 2021 15:36:42 +0000 (16:36 +0100)]
Rollup merge of #80404 - JulianKnodt:arr_ref, r=oli-obk

Remove const_in_array_repeat

Fixes #80371. Fixes #81315. Fixes #80767. Fixes #75682.

I thought there might be some issue with `Repeats(_, 0)`, but if you increase the items in the array it still ICEs. I'm not sure if this is the best fix but it does fix the given issue.

3 years agoRollup merge of #80092 - sexxi-goose:restrict_precision, r=nikomatsakis
Jonas Schievink [Sun, 31 Jan 2021 15:36:41 +0000 (16:36 +0100)]
Rollup merge of #80092 - sexxi-goose:restrict_precision, r=nikomatsakis

2229: Fix issues with move closures and mutability

This PR fixes two issues when feature `capture_disjoint_fields` is used.

1. Can't mutate using a mutable reference
2. Move closures try to move value out through a reference.

To do so, we
1. Compute the mutability of the capture and store it as part of the `CapturedPlace`  that is written in TypeckResults
2. Restrict capture precision. Note this is temporary for now, to allow the feature to be used with move closures and ByValue captures and might change depending on discussions with the lang team.
    - No Derefs are captured for ByValue captures, since that will result in value behind a reference getting moved.
    - No projections are applied to raw pointers since these require unsafe blocks. We capture
    them completely.

r? `````@nikomatsakis`````

3 years agoBless coverage-spanview/expected_mir_dump.*.
Mara Bos [Sun, 31 Jan 2021 15:10:08 +0000 (16:10 +0100)]
Bless coverage-spanview/expected_mir_dump.*.

3 years agoAvoid building LLVM just for llvm-dwp
bjorn3 [Sun, 31 Jan 2021 14:05:00 +0000 (15:05 +0100)]
Avoid building LLVM just for llvm-dwp

When the LLVM backend is disabled, the llvm-project submodule is not
checked out by default. This breaks the bootstrap test for cg_clif. As
cg_clif doesn't support split debuginfo anyway llvm-dwp is not
necessary. Other backends would likely not want to build LLVM just for
llvm-dwp either.

3 years agospecialize io::copy to use the memory of the writer if it is a BufWriter
The8472 [Sun, 1 Nov 2020 18:59:24 +0000 (19:59 +0100)]
specialize io::copy to use the memory of the writer if it is a BufWriter

3 years agoMove some env var definitions around to fix cross-compilation
bjorn3 [Sun, 31 Jan 2021 13:56:10 +0000 (14:56 +0100)]
Move some env var definitions around to fix cross-compilation

3 years agoFix a small error in the readme
bjorn3 [Sun, 31 Jan 2021 13:15:50 +0000 (14:15 +0100)]
Fix a small error in the readme

3 years agoRemove code comment
bjorn3 [Sun, 31 Jan 2021 13:04:19 +0000 (14:04 +0100)]
Remove code comment

3 years agoSplit config.sh and add support for copying the mingw runtime objects
bjorn3 [Sun, 31 Jan 2021 12:08:07 +0000 (13:08 +0100)]
Split config.sh and add support for copying the mingw runtime objects

3 years agoupdate Miri
Ralf Jung [Sun, 31 Jan 2021 12:45:15 +0000 (13:45 +0100)]
update Miri

3 years agoImprove resize handling
Guillaume Gomez [Sun, 31 Jan 2021 12:42:16 +0000 (13:42 +0100)]
Improve resize handling

3 years agoPrevent search section to go over search input
Guillaume Gomez [Sun, 31 Jan 2021 12:34:32 +0000 (13:34 +0100)]
Prevent search section to go over search input

3 years agoRemove unneeded explicit width from search results
Guillaume Gomez [Sun, 31 Jan 2021 12:13:52 +0000 (13:13 +0100)]
Remove unneeded explicit width from search results

3 years agostabilize int_bits_const
Ashley Mannix [Sun, 31 Jan 2021 11:50:47 +0000 (21:50 +1000)]
stabilize int_bits_const

3 years agoLink examples to the correct libc when targeting Windows
bjorn3 [Sun, 31 Jan 2021 11:46:17 +0000 (12:46 +0100)]
Link examples to the correct libc when targeting Windows

3 years agoFix sysroot dir for cg_clif_build_sysroot
bjorn3 [Sun, 31 Jan 2021 11:44:02 +0000 (12:44 +0100)]
Fix sysroot dir for cg_clif_build_sysroot

3 years agoAdd missing directory to clean_all.sh
bjorn3 [Sun, 31 Jan 2021 11:43:39 +0000 (12:43 +0100)]
Add missing directory to clean_all.sh

3 years agoFix small typo
Sebastian Widua [Sun, 31 Jan 2021 11:19:09 +0000 (12:19 +0100)]
Fix small typo

3 years agoAuto merge of #81478 - sivadeilra:windows_dll_imports, r=m-ou-se
bors [Sun, 31 Jan 2021 10:01:15 +0000 (10:01 +0000)]
Auto merge of #81478 - sivadeilra:windows_dll_imports, r=m-ou-se

Resolve DLL imports at CRT startup, not on demand

On Windows, libstd uses GetProcAddress to locate some DLL imports, so
that libstd can run on older versions of Windows. If a given DLL import
is not present, then libstd uses other behavior (such as fallback
implementations).

This commit uses a feature of the Windows CRT to do these DLL imports
during module initialization, before main() (or DllMain()) is called.
This is the ideal time to resolve imports, because the module is
effectively single-threaded at that point; no other threads can
touch the data or code of the module that is being initialized.

This avoids several problems. First, it makes the cost of performing
the DLL import lookups deterministic. Right now, the DLL imports are
done on demand, which means that application threads _might_ have to
do the DLL import during some time-sensitive operation. This is a
small source of unpredictability. Since threads can race, it's even
possible to have more than one thread running the same redundant
DLL lookup.

This commit also removes using the heap to allocate strings, during
the DLL lookups.

3 years agoRustfmt
Hirochika Matsumoto [Sun, 31 Jan 2021 07:52:46 +0000 (16:52 +0900)]
Rustfmt

3 years agoFix prefix of debug log
Hirochika Matsumoto [Sun, 31 Jan 2021 07:49:33 +0000 (16:49 +0900)]
Fix prefix of debug log

3 years agoAuto merge of #81327 - RalfJung:codegen-no-const-fail, r=oli-obk
bors [Sun, 31 Jan 2021 07:03:09 +0000 (07:03 +0000)]
Auto merge of #81327 - RalfJung:codegen-no-const-fail, r=oli-obk

codegen: assume constants cannot fail to evaluate

https://github.com/rust-lang/rust/pull/80579 landed, so we can finally remove this old hack from codegen and instead assume that consts never fail to evaluate. :)

r? `@oli-obk`

3 years agoreview comments
Esteban Küber [Sun, 31 Jan 2021 06:06:10 +0000 (22:06 -0800)]
review comments

3 years agoAuto merge of #81578 - jonas-schievink:rollup-yhiyowl, r=jonas-schievink
bors [Sun, 31 Jan 2021 03:05:09 +0000 (03:05 +0000)]
Auto merge of #81578 - jonas-schievink:rollup-yhiyowl, r=jonas-schievink

Rollup of 18 pull requests

Successful merges:

 - #78044 (Implement io::Seek for io::Empty)
 - #79285 (Stabilize Arc::{increment,decrement}_strong_count)
 - #80053 (stabilise `cargo test -- --include-ignored`)
 - #80279 (Implement missing `AsMut<str>` for `str`)
 - #80470 (Stabilize by-value `[T; N]` iterator `core::array::IntoIter`)
 - #80945 (Add Box::downcast() for dyn Any + Send + Sync)
 - #81048 (Stabilize `core::slice::fill_with`)
 - #81198 (Remove requirement that forces symmetric and transitive PartialEq impls to exist)
 - #81422 (Account for existing `_` field pattern when suggesting `..`)
 - #81472 (Clone entire `TokenCursor` when collecting tokens)
 - #81484 (Optimize decimal formatting of 128-bit integers)
 - #81491 (Balance sidebar `Deref` cycle check with main content)
 - #81509 (Add a regression test for ICE of bad_placeholder_type)
 - #81547 (Edit rustc_typeck top-level docs)
 - #81550 (Replace predecessor with range in collections documentation)
 - #81558 (Fix ascii art text wrapping in mobile)
 - #81562 (Clarify that InPlaceIterable guarantees extend to all advancing iterator methods.)
 - #81563 (Improve docblock readability on small screen)

Failed merges:

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

3 years agoRollup merge of #81563 - pickfire:patch-6, r=GuillaumeGomez
Jonas Schievink [Sun, 31 Jan 2021 00:47:48 +0000 (01:47 +0100)]
Rollup merge of #81563 - pickfire:patch-6, r=GuillaumeGomez

Improve docblock readability on small screen

Before

![image](https://user-images.githubusercontent.com/4687791/106363174-f77bdf00-6361-11eb-898f-d480b8460ab3.png)

After

![image](https://user-images.githubusercontent.com/4687791/106363259-6bb68280-6362-11eb-85a1-ef9262681dd7.png)

Too much space is wasted on the left side. I wanted to make that 0 but it breaks some part with error symbols.

0

![image](https://user-images.githubusercontent.com/4687791/106363287-90aaf580-6362-11eb-88c1-62a8313988a7.png)

After

![image](https://user-images.githubusercontent.com/4687791/106363276-825cd980-6362-11eb-86eb-6f4611b4ab99.png)

3 years agoRollup merge of #81562 - the8472:improve-inplaceiterable-docs, r=sfackler
Jonas Schievink [Sun, 31 Jan 2021 00:47:46 +0000 (01:47 +0100)]
Rollup merge of #81562 - the8472:improve-inplaceiterable-docs, r=sfackler

Clarify that InPlaceIterable guarantees extend to all advancing iterator methods.

A documentation update that should answer a question that came up in [this zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Safety.20guarantees.20of.20InPlaceIterable/near/223743336)

CC `@SkiFire13`

3 years agoRollup merge of #81558 - pickfire:patch-5, r=GuillaumeGomez
Jonas Schievink [Sun, 31 Jan 2021 00:47:44 +0000 (01:47 +0100)]
Rollup merge of #81558 - pickfire:patch-5, r=GuillaumeGomez

Fix ascii art text wrapping in mobile

Fix #81377

Before

![image](https://user-images.githubusercontent.com/4687791/106362405-a1a53800-635d-11eb-87b9-2f40bbd023bf.png)
![image](https://user-images.githubusercontent.com/4687791/106362410-aa960980-635d-11eb-96ee-979251b213a3.png)
![image](https://user-images.githubusercontent.com/4687791/106362562-80911700-635e-11eb-97ee-b19a6ea2fc6d.png)

After

![image](https://user-images.githubusercontent.com/4687791/106362428-b4b80800-635d-11eb-8d5b-e4f51f5501ee.png)
![image](https://user-images.githubusercontent.com/4687791/106362433-bbdf1600-635d-11eb-96af-7043c74b3a0a.png)
![image](https://user-images.githubusercontent.com/4687791/106362570-8f77c980-635e-11eb-928d-ef1d26c13136.png)

Note the second image is scrolled to the back (right), I added some padding for the text block (not the code block) to make it more comfortable to read since the last character is stuck to the last character.

3 years agoRollup merge of #81550 - xfix:replace-mention-of-predecessor, r=jonas-schievink
Jonas Schievink [Sun, 31 Jan 2021 00:47:43 +0000 (01:47 +0100)]
Rollup merge of #81550 - xfix:replace-mention-of-predecessor, r=jonas-schievink

Replace predecessor with range in collections documentation

Fixes #81548.

3 years agoRollup merge of #81547 - pierwill:edit-typeck-mod-docs, r=davidtwco
Jonas Schievink [Sun, 31 Jan 2021 00:47:41 +0000 (01:47 +0100)]
Rollup merge of #81547 - pierwill:edit-typeck-mod-docs, r=davidtwco

Edit rustc_typeck top-level docs

Edit punctuation and wording in note on type variables vs. type parameters.

Also add missing punctuation and two inter-doc links.

3 years agoRollup merge of #81509 - 0yoyoyo:fix-issue-72685-ice-drop-in-place, r=estebank
Jonas Schievink [Sun, 31 Jan 2021 00:47:39 +0000 (01:47 +0100)]
Rollup merge of #81509 - 0yoyoyo:fix-issue-72685-ice-drop-in-place, r=estebank

Add a regression test for ICE of bad_placeholder_type

Add a regression test for #72685. Check the error message is output instead of ICE.

3 years agoRollup merge of #81491 - jryans:rustdoc-deref-ice-81395, r=GuillaumeGomez
Jonas Schievink [Sun, 31 Jan 2021 00:47:38 +0000 (01:47 +0100)]
Rollup merge of #81491 - jryans:rustdoc-deref-ice-81395, r=GuillaumeGomez

Balance sidebar `Deref` cycle check with main content

The `Deref` cycle checks added as part of #80653 were "unbalanced" in the sense
that the main content code path checks for cycles _before_ descending, while the
sidebar checks _after_. Checking _before_ is correct, so this changes the
sidebar path to match the main content path.

Fixes #81395

r? ```@GuillaumeGomez```

3 years agoRollup merge of #81484 - Kogia-sima:perf/optimize-udiv_1e19, r=nagisa
Jonas Schievink [Sun, 31 Jan 2021 00:47:36 +0000 (01:47 +0100)]
Rollup merge of #81484 - Kogia-sima:perf/optimize-udiv_1e19, r=nagisa

Optimize decimal formatting of 128-bit integers

## Description

This PR optimizes the `udivmod_1e19` function, which is used for formatting 128-bit integers, based on the algorithm provided in \[1\]. This optimization improves performance of formatting 128-bit integers, especially on 64-bit architectures. It also slightly reduces the output binary size.

## Assembler comparison

https://godbolt.org/z/YrG5zY

## Performance

#### previous results

```
test fmt::write_u128_max                                        ... bench:         552 ns/iter (+/- 4)
test fmt::write_u128_min                                        ... bench:         125 ns/iter (+/- 2)
```

#### new results

```
test fmt::write_u128_max                                        ... bench:         205 ns/iter (+/- 13)
test fmt::write_u128_min                                        ... bench:         129 ns/iter (+/- 5)
```

## Reference

\[1\] T. Granlund and P. Montgomery, “Division by Invariant Integers Using Multiplication” in Proc. of the SIGPLAN94 Conference on Programming Language Design and Implementation, 1994, pp. 61–72

3 years agoRollup merge of #81472 - Aaron1011:fix/revert-cursor-clone, r=petrochenkov
Jonas Schievink [Sun, 31 Jan 2021 00:47:34 +0000 (01:47 +0100)]
Rollup merge of #81472 - Aaron1011:fix/revert-cursor-clone, r=petrochenkov

Clone entire `TokenCursor` when collecting tokens

Reverts PR #80830
Fixes taiki-e/pin-project#312

We can have an arbitrary number of `None`-delimited group frames pushed
on the stack due to proc-macro invocations, which can legally be exited.
Attempting to account for this would add a lot of complexity for a tiny
performance gain, so let's just use the original strategy.

3 years agoRollup merge of #81422 - estebank:dotdot_sugg, r=davidtwco
Jonas Schievink [Sun, 31 Jan 2021 00:47:33 +0000 (01:47 +0100)]
Rollup merge of #81422 - estebank:dotdot_sugg, r=davidtwco

Account for existing `_` field pattern when suggesting `..`

Follow up to #80017.

3 years agoRollup merge of #81198 - dtolnay:partialeq, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:31 +0000 (01:47 +0100)]
Rollup merge of #81198 - dtolnay:partialeq, r=m-ou-se

Remove requirement that forces symmetric and transitive PartialEq impls to exist

### Counterexample of symmetry:

If you [have](https://docs.rs/proc-macro2/1.0.24/proc_macro2/struct.Ident.html#impl-PartialEq%3CT%3E) an impl like:

```rust
impl<T> PartialEq<T> for Ident
where
    T: ?Sized + AsRef<str>
```

then Rust will not even allow the symmetric impl to exist.

```console
error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Ident`)
 --> src/main.rs:9:6
  |
9 | impl<T> PartialEq<Ident> for T where T: ?Sized + AsRef<str> {
  |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Ident`)
  |
  = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
  = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
```

<br>

### Counterexample of transitivity:

Consider these two existing impls from `regex` and `clap`:

```rust
// regex

/// An inline representation of `Option<char>`.
pub struct Char(u32);

impl PartialEq<char> for Char {
    fn eq(&self, other: &char) -> bool {
        self.0 == *other as u32
    }
}
```

```rust
// clap

pub(crate) enum KeyType {
    Short(char),
    Long(OsString),
    Position(u64),
}

impl PartialEq<char> for KeyType {
    fn eq(&self, rhs: &char) -> bool {
        match self {
            KeyType::Short(c) => c == rhs,
            _ => false,
        }
    }
}
```

It's nice to be able to add `PartialEq<proc_macro::Punct> for char` in libproc_macro (https://github.com/rust-lang/rust/pull/80595), but it makes no sense to force an `impl PartialEq<Punct> for Char` and `impl PartialEq<Punct> for KeyType` in `regex` and `clap` in code that otherwise has nothing to do with proc macros.

<br>

`@rust-lang/libs`

3 years agoRollup merge of #81048 - yoshuawuyts:stabilize-core-slice-fill-with, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:29 +0000 (01:47 +0100)]
Rollup merge of #81048 - yoshuawuyts:stabilize-core-slice-fill-with, r=m-ou-se

Stabilize `core::slice::fill_with`

_Tracking issue: https://github.com/rust-lang/rust/issues/79221_

This stabilizes the `slice_fill_with` feature for Rust 1.51, following the stabilization of `slice_fill` in 1.50. This was requested by libs team members in https://github.com/rust-lang/rust/pull/79213.

This PR also adds the "memset" alias for `slice::fill_with`, mirroring the alias set on the `slice::fill` sibling API. This will ensure someone looking for "memset" will find both variants.

r? `@Amanieu`

3 years agoRollup merge of #80945 - sdroege:downcast-send-sync, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:27 +0000 (01:47 +0100)]
Rollup merge of #80945 - sdroege:downcast-send-sync, r=m-ou-se

Add Box::downcast() for dyn Any + Send + Sync

Looks like a plain omission, but unfortunately I just needed that in my code :)

3 years agoRollup merge of #80470 - SimonSapin:array-intoiter-type, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:25 +0000 (01:47 +0100)]
Rollup merge of #80470 - SimonSapin:array-intoiter-type, r=m-ou-se

Stabilize by-value `[T; N]` iterator `core::array::IntoIter`

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

This is unblocked now that `min_const_generics` has been stabilized in https://github.com/rust-lang/rust/pull/79135.

This PR does *not* include the corresponding `IntoIterator` impl, which is https://github.com/rust-lang/rust/pull/65819. Instead, an iterator can be constructed through the `new` method.

`new` would become unnecessary when `IntoIterator` is implemented and might be deprecated then, although it will stay stable.

3 years agoRollup merge of #80279 - Yaulendil:str-as-mut, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:23 +0000 (01:47 +0100)]
Rollup merge of #80279 - Yaulendil:str-as-mut, r=m-ou-se

Implement missing `AsMut<str>` for `str`

Allows `&mut str` to be taken by a Generic which requires `T` such that `T: AsMut<str>`. Motivating example:

```rust
impl<'i, T> From<T> for StructImmut<'i> where
    T: AsRef<str> + 'i,
{
    fn from(asref: T) -> Self {
        let string: &str = asref.as_ref();
        //  ...
    }
}

impl<'i, T> From<T> for StructMut<'i> where
    T: AsMut<str> + 'i,
{
    fn from(mut asmut: T) -> Self {
        let string: &mut str = asmut.as_mut();
        //  ...
    }
}
```

The Immutable form of this structure can be constructed by `StructImmut::from(s)` where `s` may be a `&String` or a `&str`, because `AsRef<str>` is implemented for `str`. However, the mutable form of the structure can be constructed in the same way **only** with a `&mut String`, and **not** with a `&mut str`.

This change does have some precedent, because as can be seen in [the Implementors](https://doc.rust-lang.org/std/convert/trait.AsMut.html#implementors), `AsMut<[T]>` is implemented for `[T]` as well as for `Vec<T>`, but `AsMut<str>` is implemented only for `String`. This would complete the symmetry.

As a trait implementation, this should be immediately stable.

3 years agoRollup merge of #80053 - gilescope:include-ignore, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:22 +0000 (01:47 +0100)]
Rollup merge of #80053 - gilescope:include-ignore, r=m-ou-se

stabilise `cargo test -- --include-ignored`

stabilise `cargo test -- --include-ignored`

On stable there's no way to run ignored tests as well as the normal tests.

An example use case where stabilising this would help:
Exercism has some initial tests and then some additional ignored tests that people run currently with --ignore but currently they can't run all the tests in one go without being on nightly. It would be a little more ergonomic if this flag was stablilised.

( Fixes  #65770 )

I built with ./x.py build -i library/test - but as libtest is a dylib is there an easy way to invoke it manually to check it's working as expected? (I've updated the automated tests.)

3 years agoRollup merge of #79285 - yoshuawuyts:stabilize-arc_mutate_strong_count, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:20 +0000 (01:47 +0100)]
Rollup merge of #79285 - yoshuawuyts:stabilize-arc_mutate_strong_count, r=m-ou-se

Stabilize Arc::{increment,decrement}_strong_count

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

Stabilizes `Arc::{incr,decr}_strong_count`, enabling unsafely incrementing an decrementing the Arc strong count directly with fewer gotchas. This API was first introduced on nightly six months ago, and has not seen any changes since. The initial PR showed two existing pieces of code that would benefit from this API, and included a change inside the stdlib to use this.

Given the small surface area, predictable use, and no changes since introduction, I'd like to propose we stabilize this.

closes https://github.com/rust-lang/rust/issues/71983
r? `@Mark-Simulacrum`

## Links
 * [Initial implementation](https://github.com/rust-lang/rust/pull/70733)
 * [Motivation from #68700](https://github.com/rust-lang/rust/pull/68700#discussion_r396169064)
 * [Real world example in an executor](https://docs.rs/extreme/666.666.666666/src/extreme/lib.rs.html#13)

3 years agoRollup merge of #78044 - oberien:empty-seek, r=m-ou-se
Jonas Schievink [Sun, 31 Jan 2021 00:47:18 +0000 (01:47 +0100)]
Rollup merge of #78044 - oberien:empty-seek, r=m-ou-se

Implement io::Seek for io::Empty

Fix #78029

3 years agoEdit multiple error code Markdown files
pierwill [Sat, 30 Jan 2021 21:32:28 +0000 (13:32 -0800)]
Edit multiple error code Markdown files

Makes small edits to several error code files. Fixes some
missing punctuation. Changes some wording, grammar, and formatting
for clarity and readability.

Adds a link to the rustup book in E0658.

3 years agoAuto merge of #81560 - flip1995:clippyup, r=Manishearth
bors [Sat, 30 Jan 2021 23:55:16 +0000 (23:55 +0000)]
Auto merge of #81560 - flip1995:clippyup, r=Manishearth

Update Clippy

r? `@Manishearth`

Biweekly Clippy update (2 days late)

3 years agoRemove const_in_array_rep_expr
kadmin [Tue, 26 Jan 2021 22:49:30 +0000 (22:49 +0000)]
Remove const_in_array_rep_expr

3 years agoadd suggestion for nested fields
b-naber [Thu, 28 Jan 2021 17:26:31 +0000 (18:26 +0100)]
add suggestion for nested fields

3 years agoimpl Seek for Empty
oberien [Sat, 17 Oct 2020 10:08:59 +0000 (12:08 +0200)]
impl Seek for Empty

Fix #78029

3 years agoBump as_mut_str_for_str stable version.
Mara Bos [Sat, 30 Jan 2021 21:10:25 +0000 (22:10 +0100)]
Bump as_mut_str_for_str stable version.

3 years agoAuto merge of #81565 - nikic:revert, r=nagisa
bors [Sat, 30 Jan 2021 20:46:58 +0000 (20:46 +0000)]
Auto merge of #81565 - nikic:revert, r=nagisa

Revert dist-x86_64-linux update to Clang 11

This reverts commit cb6787ae82d388045cdf6b5dc73787d828d91feb, reversing changes made to 0248c6f178ab3a4d2ec702b7d418ff8375ab0515.

The change causes errors when linking rustc shared objects with the binutils linker.

Fixes #81554.

r? `@Mark-Simulacrum`

3 years agoRe-enable mir inlining for the sysroot
bjorn3 [Sat, 30 Jan 2021 20:26:37 +0000 (21:26 +0100)]
Re-enable mir inlining for the sysroot

3 years agoBump stable version of arc_mutate_strong_count
Mara Bos [Sat, 30 Jan 2021 20:08:30 +0000 (21:08 +0100)]
Bump stable version of arc_mutate_strong_count

3 years agoFix an old FIXME in redundant paren lint
Ömer Sinan Ağacan [Sat, 30 Jan 2021 19:39:52 +0000 (22:39 +0300)]
Fix an old FIXME in redundant paren lint

Referenced bug was fixed a while ago

3 years agoFix macOS build
bjorn3 [Sat, 30 Jan 2021 19:05:38 +0000 (20:05 +0100)]
Fix macOS build

3 years agoAdd a test for #71202
Ömer Sinan Ağacan [Sat, 30 Jan 2021 18:53:59 +0000 (21:53 +0300)]
Add a test for #71202

Closes #71202

3 years agoUpdate Readme.md for the fixed abi compatibility
bjorn3 [Sat, 30 Jan 2021 18:38:57 +0000 (19:38 +0100)]
Update Readme.md for the fixed abi compatibility

3 years agoUpdate clippy test output for panic macros.
Mara Bos [Sat, 30 Jan 2021 18:33:21 +0000 (19:33 +0100)]
Update clippy test output for panic macros.

3 years agoRustup to rustc 1.51.0-nightly (b12290861 2021-01-29)
bjorn3 [Sat, 30 Jan 2021 18:29:02 +0000 (19:29 +0100)]
Rustup to rustc 1.51.0-nightly (b12290861 2021-01-29)

3 years agoEdit rustc_typeck top-level docs
pierwill [Sat, 30 Jan 2021 07:03:35 +0000 (23:03 -0800)]
Edit rustc_typeck top-level docs

Edit punctuation and wording in note on type variables
vs. type parameters.

Also add missing punctuation and two inter-doc links.

3 years agoRemove extra trailing spaces
Ivan Tham [Sat, 30 Jan 2021 17:36:15 +0000 (01:36 +0800)]
Remove extra trailing spaces

3 years agoAdd missing dir to .gitignore
bjorn3 [Sat, 30 Jan 2021 17:27:28 +0000 (18:27 +0100)]
Add missing dir to .gitignore

3 years agoFix docblock short code missing end whitespaces
Ivan Tham [Sat, 30 Jan 2021 17:27:21 +0000 (01:27 +0800)]
Fix docblock short code missing end whitespaces

3 years agoImprove docblock readability on small screen
Ivan Tham [Sat, 30 Jan 2021 17:19:29 +0000 (01:19 +0800)]
Improve docblock readability on small screen

3 years agoClarify that guarantees extend to other advancing iterator methods.
The8472 [Sat, 30 Jan 2021 17:07:48 +0000 (18:07 +0100)]
Clarify that guarantees extend to other advancing iterator methods.

3 years agoMerge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyup
flip1995 [Sat, 30 Jan 2021 17:06:34 +0000 (18:06 +0100)]
Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyup