Commit Graph

156238 Commits

Author SHA1 Message Date
Guillaume Gomez
38f6c07b11 Improve code readability for sidebar links 2021-10-13 21:58:55 +02:00
Josh Stone
a0cc8725e9 Update the 1.56.0 release header for consistency 2021-10-13 11:10:00 -07:00
bors
eeb16a2a89 Auto merge of #89822 - tmiasko:overflap-duplicates, r=cjgillot
Deduplicate regions ids before merging them

The merging code does not expect to see any duplicates.

Fixes #89820.

r? `@cjgillot`
2021-10-13 16:42:53 +00:00
Yoshua Wuyts
21429eda2d Improve std:🧵:available_parallelism docs 2021-10-13 17:57:05 +02:00
bors
81117ff930 Auto merge of #89847 - JohnTitor:rollup-xfymeo4, r=JohnTitor
Rollup of 12 pull requests

Successful merges:

 - #89768 (add some more testcases)
 - #89777 (Edit explanation of test for nested type ascriptions)
 - #89781 (Add missing words in `Infallible` docs)
 - #89782 (Improve CJK font in rustdoc)
 - #89794 (Add #[must_use] to to_value conversions)
 - #89814 (Fix uppercase/lowercase error)
 - #89816 (Fix invalid rules in .gitignore)
 - #89817 (Add #[inline] to int log10 functions.)
 - #89818 (Use Option::map_or instead of open coding it)
 - #89828 (Fix config.toml overflow-checks options)
 - #89840 (fix the stage0 tools config file path in `config.toml.example`)
 - #89845 (Add davidtwco to the `.mailmap`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-10-13 13:41:48 +00:00
Yuki Okushi
e21f8920d3
Rollup merge of #89845 - davidtwco:davidtwco-mailmap, r=oli-obk
Add davidtwco to the `.mailmap`
2021-10-13 21:55:19 +09:00
Yuki Okushi
d01cfe1bf1
Rollup merge of #89840 - wangkirin:master, r=jyn514
fix the stage0 tools config file path in `config.toml.example`

in  #88362  , the `stage0.txt ` have been switched to `stage0.json`  , but in `config.toml.example` the guide didn't change ,  this PR fix  this issue
2021-10-13 21:55:18 +09:00
Yuki Okushi
72626bfb15
Rollup merge of #89828 - rusticstuff:overflow-check-options-take-two, r=Mark-Simulacrum
Fix config.toml overflow-checks options

This a follow-up PR to #87784.

Improvements:
* Add missing entries for overflow-checks to config.toml.example.
* Add --enable-overflow-checks-std option to configure script.
* Make rust.overflow-checks-stdoption default to rust.overflow-checks.

Also adds the missing  `--enable-debug-assertions-std `option to configure script.

r? ```@Mark-Simulacrum```
cc ```@jyn514```
2021-10-13 21:55:18 +09:00
Yuki Okushi
6eb0a5f0e8
Rollup merge of #89818 - LingMan:map_or, r=oli-obk
Use Option::map_or instead of open coding it

````@rustbot```` modify labels +C-cleanup +T-compiler
2021-10-13 21:55:17 +09:00
Yuki Okushi
59ebfdd7e0
Rollup merge of #89817 - m-ou-se:int-log-10-inline, r=the8472
Add #[inline] to int log10 functions.
2021-10-13 21:55:16 +09:00
Yuki Okushi
7948883754
Rollup merge of #89816 - Canop:master, r=Mark-Simulacrum
Fix invalid rules in .gitignore

`**node_modules` in a .gitignore is the same than
`*node_modules` or `*****node_modules`.

It matches every file whose name ends with `node_modules`,
including `not_node_modules`.

The intent here was obviously to have `**/node_modules`
which is the same than just `node_modules`.

Reference on git ignoring rules format: https://git-scm.com/docs/gitignore
2021-10-13 21:55:15 +09:00
Yuki Okushi
06e4aee220
Rollup merge of #89814 - jkugelman:must-use-string-transforms-typo, r=joshtriplett
Fix uppercase/lowercase error

Fix https://github.com/rust-lang/rust/pull/89694#discussion_r726829890

r? ````@joshtriplett````
2021-10-13 21:55:14 +09:00
Yuki Okushi
c1bde6e4b6
Rollup merge of #89794 - jkugelman:must-use-to_value-conversions, r=joshtriplett
Add #[must_use] to to_value conversions

`NonNull<T>::cast` snuck in when I wasn't looking. What a scamp!

Parent issue: #89692

r? ````@joshtriplett````
2021-10-13 21:55:13 +09:00
Yuki Okushi
cabfda428d
Rollup merge of #89782 - konan8205:develop, r=jsha
Improve CJK font in rustdoc

This PR includes:
- Fix unicode range of korean letters in `rustdoc.css`.
- Add WOFF2 format version of Noto Sans KR font.
- Shorten the font file name.
2021-10-13 21:55:12 +09:00
Yuki Okushi
f759fff447
Rollup merge of #89781 - Wilfred:patch-2, r=JohnTitor
Add missing words in `Infallible` docs

This sentence was previously incomplete.
2021-10-13 21:55:11 +09:00
Yuki Okushi
cd5fe938e7
Rollup merge of #89777 - pierwill:fix-88233, r=Mark-Simulacrum
Edit explanation of test for nested type ascriptions

Fixes typo ("an ascribing") and removes extra.

Closes #88233.
2021-10-13 21:55:10 +09:00
Yuki Okushi
0caa6164a3
Rollup merge of #89768 - hellow554:tests, r=Mark-Simulacrum
add some more testcases

resolves #52893
resolves #68295
resolves #87750
resolves #88071

All these issues have been fixed according to glacier. Just adding a test so it can be closed.

Can anybody tell me why the github keywords do not work? 🤔
Please edit this post if you can fix it.
2021-10-13 21:55:10 +09:00
Scott Mabin
cf905ed72f Add riscv32imc-esp-espidf to changelog 2021-10-13 13:14:16 +01:00
David Wood
646bc1d239 Add davidtwco to the .mailmap
Signed-off-by: David Wood <david.wood@huawei.com>
2021-10-13 11:12:54 +00:00
Oli Scherer
20d6aadff7 Update clippy ui output 2021-10-13 11:06:14 +00:00
Oli Scherer
ab7721d694 Bless nll tests 2021-10-13 10:53:44 +00:00
Oli Scherer
888ba509ea Re-use logic for adding a suggestion when a lifetime bound is missing on an impl trait 2021-10-13 10:53:44 +00:00
Oli Scherer
be399635a2 Remove explicit -Zborrowck=mir which does not affect test anymore 2021-10-13 10:53:44 +00:00
Oli Scherer
56e79e6ce2 Remove a feature attribute for an accepted feature 2021-10-13 10:53:44 +00:00
Oli Scherer
d435101537 Use a label instead of a note for member constraint errors 2021-10-13 10:53:44 +00:00
Oli Scherer
15f93473f1 Remove textual span from diagnostic string 2021-10-13 10:53:44 +00:00
bors
5728bd64b4 Auto merge of #89587 - camelid:all-candidates, r=petrochenkov
Include rmeta candidates in "multiple matching crates" error

Only dylib and rlib candidates were included in the error. I think the
reason is that at the time this error was originally implemented, rmeta
crate sources were represented different from dylib and rlib sources.
I wrote up more detailed analysis in [this comment][1].

The new version of the code is also a bit easier to read and should be
more robust to future changes since it uses `CrateSources::paths()`.

I also changed the code to sort the candidates to make the output deterministic;
added full stderr tests for the error; and added a long error code explanation.

[1]: https://github.com/rust-lang/rust/pull/88675#issuecomment-935282436

cc `@Mark-Simulacrum` `@jyn514`
2021-10-13 10:38:12 +00:00
Wang Qilin
4b4d3ee60b fix the stage0 tools config file path in config.toml.example 2021-10-13 15:47:15 +08:00
Joshua Nelson
31265c6ca3 Assemble the compiler when running x.py build
Previously, there was no way to actually get binaries in
`build/$TARGET/stage1/bin` without building the standard library. This
makes it possible to build just the compiler. This can be useful when
the standard library isn't actually necessary for trying out your tests
(e.g. a bug that can be reproduced with only a `no_core` crate).
2021-10-13 04:10:09 +00:00
Takayuki Maeda
f819e6d59c suggestion for typoed crate or module
avoid suggesting the same name

sort candidates

fix a message

use `opt_def_id` instead of `def_id`

move `find_similarly_named_module_or_crate` to rustc_resolve/src/diagnostics.rs
2021-10-13 12:17:02 +09:00
bors
a16f686e4a Auto merge of #89802 - ehuss:update-cargo, r=ehuss
Update cargo

7 commits in d56b42c549dbb7e7d0f712c51b39400260d114d4..c7957a74bdcf3b11e7154c1a9401735f23ebd484
2021-09-27 13:44:18 +0000 to 2021-10-11 20:17:07 +0000
- Add some more information to verbose version. (rust-lang/cargo#9968)
- Skip all `cargo fix` that tends to write to registry cache. (rust-lang/cargo#9938)
- Stabilize named profiles (rust-lang/cargo#9943)
- Update git2 (rust-lang/cargo#9963)
- Distinguish lockfile version req from normal dep in resolver error message (rust-lang/cargo#9847)
- nit: Allocated slightly bigger vec than needed (rust-lang/cargo#9954)
- Add shell completion for shorthand commands (rust-lang/cargo#9951)
2021-10-13 03:00:33 +00:00
Tomasz Miąsko
8aaf4ab59a Deduplicate regions ids before merging them
The merging code does not expect to see any duplicates.
2021-10-13 00:00:00 +00:00
bors
ef4b3069ba Auto merge of #89774 - the8472:inline-mut-iter-next, r=m-ou-se
inline next() on &mut Iterator impl

In [#87431](https://github.com/rust-lang/rust/pull/87431/files#diff-79a6b417b85ecf4f1a4ef2235135fedf540199caf6e9e1d154ac6a413b40a757R132-R136)   I found that `(&mut range).fold` doesn't optimize well because the default impl for for `fold` on `&mut Iterator` doesn't inline `next`. In that particular case it was worked around by using `try_fold` which takes a `&mut self` instead of `self`.

Let's see if this can be fixed more broadly.
2021-10-12 23:59:48 +00:00
bors
d7c97a02d1 Auto merge of #89105 - DevinR528:reachable-fix, r=Nadrieril
Fix: non_exhaustive_omitted_patterns by filtering unstable and doc hidden variants

Fixes: #89042

Now that #86809 has been merged there are cases (std::io::ErrorKind) where unstable feature gated variants were included in warning/error messages when the feature was not turned on. This filters those variants out of the return of `SplitWildcard::new`.

Variants marked `doc(hidden)` are filtered out of the witnesses list in `Usefulness::apply_constructor`.

Probably worth a perf run 🤷 since this area can be sensitive.
2021-10-12 20:54:15 +00:00
Noah Lev
bf2d2e5597 Work around different filenames for DLLs 2021-10-12 13:31:21 -07:00
Noah Lev
cc6a09009d Add long explanation for E0464
The test is copied from `src/test/ui/crate-loading/crateresolve1.rs` and
its auxiliary tests. I added it to the `compile_fail` code example check
exemption list since it's hard if not impossible to reproduce this error
in a standalone code example.
2021-10-12 13:10:12 -07:00
Noah Lev
2e56b6f98e Include rmeta candidates in "multiple matching crates" error
Only dylib and rlib candidates were included in the error. I think the
reason is that at the time this error was originally implemented, rmeta
crate sources were represented different from dylib and rlib sources.
I wrote up more detailed analysis in [this comment][1].

The new version of the code is also a bit easier to read and should be
more robust to future changes since it uses `CrateSources::paths()`.

[1]: https://github.com/rust-lang/rust/pull/88675#issuecomment-935282436
2021-10-12 13:10:11 -07:00
Noah Lev
ad49cb6e0c Add test for showing rmeta candidates in error 2021-10-12 13:10:11 -07:00
Noah Lev
642a43a9cd Test crate loading error stderr
And remove E0464 from test-exemption list, since it now has a full test.
2021-10-12 13:10:10 -07:00
Noah Lev
6792c6a851 Sort candidate libraries by source path in error
This makes the error output deterministic and thus testable.
2021-10-12 13:08:32 -07:00
Hans Kratz
905ed5fa89 Make rust.overflow-checks-stdoption default to rust.overflow-checks. 2021-10-12 21:57:40 +02:00
Hans Kratz
bcf7cf6670 Add --enable-debug-assertions-std option to configure script. 2021-10-12 21:49:06 +02:00
Hans Kratz
cfc7782a84 Add --enable-overflow-checks-std option to configure script. 2021-10-12 21:49:06 +02:00
Hans Kratz
7a646df098 Add missing entries for overflow-checks to config.toml.example. 2021-10-12 21:49:00 +02:00
bors
044674337a Auto merge of #89813 - the8472:rollup-f1f99mb, r=the8472
Rollup of 7 pull requests

Successful merges:

 - #89778 (Add #[must_use] to as_type conversions)
 - #89784 (Remove built-in query cache_hit tracking)
 - #89796 (Add #[must_use] to non-mutating verb methods)
 - #89797 (Add #[must_use] to is_condition tests)
 - #89799 (fix minor spelling error in Poll::ready docs)
 - #89800 (Update books)
 - #89809 (Remap ssa RealPredicate to llvm RealPredicate)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-10-12 17:57:34 +00:00
jackh726
9855e7dc7b Switch order of terms to prevent overflow 2021-10-12 11:14:31 -04:00
Eric Huss
d9f0eb54f7 Update winapi shared features.
Needed due to os_info.
2021-10-12 07:14:32 -07:00
Mara Bos
a6bb1fb641 Add #[inline] to int log10 functions. 2021-10-12 15:21:14 +02:00
Canop
e5cfe844c9 Fix invalid rules in .gitignore
`**node_modules` in a .gitignore is the same than
`*node_modules` or `*****node_modules`.

It matches every file whose name ends with `node_modules`,
including `not_node_modules`.

The intent here was obviously to have `**/node_modules`
which is the same than just `node_modules`.
2021-10-12 15:09:28 +02:00
Guillaume Gomez
51a993f4a6 Add test for associated constants in the sidebar 2021-10-12 15:07:11 +02:00