Commit graph

150371 commits

Author SHA1 Message Date
Niko Matsakis
186c09ae83 add test for dyn collisions 2021-06-21 11:55:07 -04:00
Niko Matsakis
3dc47e2c09 do not run rustfix for future-prelude-collision-shadow 2021-06-21 11:22:17 -04:00
Smitty
b8a7bfb9f1 Reference issue test originated from 2021-06-21 11:17:30 -04:00
Yuki Okushi
599e8a7439
Rollup merge of #86503 - ehuss:rustc.css-fonts, r=jyn514,GuillaumeGomez
Fix rust.css fonts.

The `rust.css` file (used for all non-rustdoc and non-mdbook pages) has gotten out of sync with rustdoc's css. The two share the same fonts, so this updates them to match what rustdoc uses.

It would be ideal not to need this at all, but that's for another time.
2021-06-22 00:00:45 +09:00
Yuki Okushi
2fdc2eab76
Rollup merge of #86495 - r00ster91:patch-11, r=petrochenkov
Improve `proc_macro::{Punct, Spacing}` documentation

I noticed some misspellings and then thought I could improve it a bit overall.
2021-06-22 00:00:44 +09:00
Yuki Okushi
f3fe5c3ba1
Rollup merge of #86473 - fee1-dead:rustdoc-const-unstable, r=jyn514
Rustdoc: Account for const-unstable functions

Fixes #86464
2021-06-22 00:00:43 +09:00
Yuki Okushi
9c664b2321
Rollup merge of #86472 - Mark-Simulacrum:fix-ci-beta, r=pietroalbini
Fix CI to fetch master on beta channel

This forward-ports a fix from the beta channel (landing in #86413, hopefully) to master so that we don't need to apply it on each round of backports.

This bug also demonstrates that our channel-checking is a bit insufficient -- stable is checked, but beta has some of its own peculiarities currently and isn't checked. But this does not attempt to adjust for that; we likely can't afford to run both beta and stable channels by CI and the current state here seems OK for now.

r? `@pietroalbini`
2021-06-22 00:00:42 +09:00
Yuki Okushi
a81f55fb16
Rollup merge of #86424 - calebcartwright:rustfmt-mod-resolution, r=Mark-Simulacrum
rustfmt: load nested out-of-line mods correctly

This should address https://github.com/rust-lang/rustfmt/issues/4874

r? `@Mark-Simulacrum`

Decided to make the change directly in tree here for expediency/to minimize any potential backporting issues, and because there's some subtree sync items I need to get resolved before pulling from r-l/rustfmt
2021-06-22 00:00:41 +09:00
Yuki Okushi
aba0bed466
Rollup merge of #86349 - yerke:add-test-for-issue-78632, r=Mark-Simulacrum
Add regression test for issue #78632

Add regression test for issue #78632

Closes #78632

Took this test from #78632 (what was committed to glacier in https://github.com/rust-lang/rust/issues/78632#issuecomment-731843345).

Tested that the we get ICE on 1.52.1 on the playground (https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b86d51fee4cded9d24b50d8ecbc48c6a).
2021-06-22 00:00:40 +09:00
Yuki Okushi
58e7411092
Rollup merge of #86274 - alexander-melentyev:spaces, r=bjorn3
Spaces
2021-06-22 00:00:38 +09:00
Yuki Okushi
ac410564f0
Rollup merge of #86248 - JohnTitor:issue-85113, r=Mark-Simulacrum
Add a regression test for issue-85113

Fixed by #86118, closes #85113
2021-06-22 00:00:37 +09:00
Yuki Okushi
3ee78b38fe
Rollup merge of #86192 - hi-rustin:rustin-patch-lint, r=nikomatsakis
Make OR_PATTERNS_BACK_COMPAT be a 2021 future-incompatible lint

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

r? `@nikomatsakis`
2021-06-22 00:00:36 +09:00
Michael Woerister
c3c4ab5ed2 Encode SourceFile source crate as StableCrateId in incr. comp. OnDiskCache. 2021-06-21 15:30:16 +02:00
Deadbeef
b57077bbf0
Readd unsafe keyword in tests 2021-06-21 20:42:57 +08:00
Deadbeef
f82fb308af
Update comment regarding staged_api 2021-06-21 20:21:37 +08:00
bors
6a5b97adb4 Auto merge of #86210 - ehuss:rustfix-update, r=Mark-Simulacrum
Rustfix update

This updates to rustfix 0.6.0. One of the key changes here is https://github.com/rust-lang/rustfix/pull/195 which changes rustfix to apply multi-part suggestions. One of the tests needs to updated because there are some overlapping suggestions which rustfix cannot handle. The solution is to only apply the machine-applicable suggestions to avoid the overlapping issue.

This also includes a minor change to compiletest to provide better error messages with rustfix.
2021-06-21 12:21:19 +00:00
Deadbeef
0d69a02c31
Removed/Updated some cases and simplified match 2021-06-21 20:15:27 +08:00
Michael Woerister
47327145e3 Disambiguate between SourceFiles from different crates even if they have the same path. 2021-06-21 13:38:46 +02:00
Michael Woerister
da5c911b5f Add regression test for #85955. 2021-06-21 13:38:46 +02:00
Deadbeef
c4396f476e
Added some tests for unsafe in const-dispay.rs 2021-06-21 19:17:07 +08:00
Deadbeef
5fb27bca6c
Check for const_unstable before printing const 2021-06-21 19:06:21 +08:00
bors
9d93819fa7 Auto merge of #86157 - jsha:tera, r=jyn514,GuillaumeGomez
Use Tera templates for rustdoc.

Replaces a format!() call in layout::render with a template
expansion. Introduces a `templates` field in SharedContext so parts
of rustdoc can share pre-rendered templates.

This currently builds in a copy of the single template available, like
with static files. However, future work can make this live-loadable with
a perma-unstable flag, to make rustdoc developers' work easier.

Part of #84419.

Demo at https://hoffman-andrews.com/rust/tera/std/string/struct.String.html.
2021-06-21 09:40:34 +00:00
Christiaan Dirkx
888418a079 Use Unsupported on platforms where available_concurrency is not implemented. 2021-06-21 11:31:07 +02:00
Christiaan Dirkx
05ec710c80 Remove tidy exception for available_concurrency 2021-06-21 11:28:53 +02:00
LeSeulArtichaut
dd90900cf4 Resolve type aliases to the type they point to in intra-doc links 2021-06-21 11:15:07 +02:00
Alexander Melentyev
e84c9aed6d Delete spaces 2021-06-21 12:11:37 +03:00
Christiaan Dirkx
9063edaf3b Move available_concurrency implementation to sys 2021-06-21 11:01:46 +02:00
bors
d789de67dc Auto merge of #85775 - adamrk:warn-unused-target-fields, r=nagisa
Emit warnings for unused fields in custom targets.

Add a warning which lists any fields in a custom target `json` file that aren't used. Currently unrecognized fields are ignored so, for example, a typo in the `json` will silently produce a target which isn't the one intended.
2021-06-21 06:56:51 +00:00
Jacob Hoffman-Andrews
cd0f93193c Use Tera templates for rustdoc.
Replaces a format!() call in layout::render with a template
expansion. Introduces a `templates` field in SharedContext so parts
of rustdoc can share pre-rendered templates.

This currently builds in a copy of the single template available, like
with static files. However, future work can make this live-loadable with
a perma-unstable flag, to make rustdoc developers' work easier.
2021-06-20 23:07:28 -07:00
bors
3824017f8e Auto merge of #86166 - tmiasko:no-alloca-for-zsts, r=nagisa
Do not emit alloca for ZST locals with multiple assignments

This extends 35566bfd7d to additionally stop emitting unnecessary allocas for zero sized locals that are assigned multiple times.

When rebuilding the standard library with `-Zbuild-std` this reduces the number of locals that require an allocation from 62315 to 61767.
2021-06-21 04:03:51 +00:00
bors
6a540bd40c Auto merge of #86502 - JohnTitor:rollup-wge0f3x, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #83739 (Account for bad placeholder errors on consts/statics with trait objects)
 - #85637 (document PartialEq, PartialOrd, Ord requirements more explicitly)
 - #86152 (Lazify is_really_default condition in the RustdocGUI bootstrap step)
 - #86156 (Fix a bug in the linkchecker)
 - #86427 (Updated release note)
 - #86452 (fix panic-safety in specialized Zip::next_back)
 - #86484 (Do not set depth to 0 in fully_expand_fragment)
 - #86491 (expand: Move some more derive logic to rustc_builtin_macros)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-21 01:16:15 +00:00
Eric Huss
008d4d6c11 Fix rust.css fonts. 2021-06-20 18:15:54 -07:00
Yuki Okushi
8b9e138ecd
Rollup merge of #86491 - petrochenkov:derefact, r=Aaron1011
expand: Move some more derive logic to rustc_builtin_macros

And cleanup some `unwrap`s in `cfg_eval`.

Refactorings extracted from https://github.com/rust-lang/rust/pull/83354 and https://github.com/rust-lang/rust/pull/86057.
r? ``@Aaron1011``
2021-06-21 09:42:19 +09:00
Yuki Okushi
e5ecded392
Rollup merge of #86484 - fee1-dead:builtin-macro-recursion, r=petrochenkov
Do not set depth to 0 in fully_expand_fragment

Fixes #84632.
2021-06-21 09:42:18 +09:00
Yuki Okushi
504c378159
Rollup merge of #86452 - the8472:fix-zip-drop-safety, r=m-ou-se
fix panic-safety in specialized Zip::next_back

This was unsound since a panic in a.next_back() would result in the
length not being updated which would then lead to the same element
being revisited in the side-effect preserving code.

fixes #86443
2021-06-21 09:42:17 +09:00
Yuki Okushi
13b0f1a29b
Rollup merge of #86427 - hi-rustin:rustin-patch-release-note, r=Mark-Simulacrum
Updated release note

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

base on https://github.com/rust-lang/rust/pull/78690
2021-06-21 09:42:16 +09:00
Yuki Okushi
e435e3259d
Rollup merge of #86156 - ehuss:linkchecker-fixes, r=Mark-Simulacrum
Fix a bug in the linkchecker

There was a small typo in the linkchecker (in #85652) that caused it to report a `#` fragment link error pointing to the wrong file (it was displaying the path to the source file, not the target of the link).

This also includes a few other changes:
- Fixes the tests due to some changes in the redirect handling in #84703.
- Adds the tests to rustbuild to run whenever the linkchecker itself is run.
- Updates the tests to validate more of the output (so that a mistake like this would have been caught).

Closes #86144
2021-06-21 09:42:15 +09:00
Yuki Okushi
e7a4f1e3fc
Rollup merge of #86152 - the8472:lazify-npm-queries, r=Mark-Simulacrum
Lazify is_really_default condition in the RustdocGUI bootstrap step

The `RustdocGUI::should_run` condition spawns `npm list` several times which adds up to seconds of wall-time.
Evaluate the condition lazily to to keep `./x.py test tidy` and similar short-running tasks fast.

Fixes #86147
2021-06-21 09:42:15 +09:00
Yuki Okushi
e6732e05e4
Rollup merge of #85637 - RalfJung:partial-ord, r=m-ou-se
document PartialEq, PartialOrd, Ord requirements more explicitly

This is the result of discussion in https://github.com/rust-lang/rust/issues/50230, in particular [this summary comment](https://github.com/rust-lang/rust/issues/50230#issuecomment-392819364).

Fixes https://github.com/rust-lang/rust/issues/50230.
2021-06-21 09:42:13 +09:00
Yuki Okushi
1a1909a8a6
Rollup merge of #83739 - JohnTitor:issue-75889, r=estebank
Account for bad placeholder errors on consts/statics with trait objects

Fixes #75889
r? ``@estebank``
2021-06-21 09:42:12 +09:00
Eric Huss
35bf1becaa tidy: Check that cargo and compiletest share the same rustfix. 2021-06-20 16:36:26 -07:00
Eric Huss
f2ef8bf776 compiletest: display the error if rustfix fails 2021-06-20 16:35:14 -07:00
Eric Huss
2817be94cc Update rustfix for compiletest. 2021-06-20 16:35:14 -07:00
bors
03b845a41f Auto merge of #85980 - ssomers:btree_cleanup_LeafRange, r=Mark-Simulacrum
BTree: encapsulate LeafRange better & some debug asserts

Looking at iterators again, I think #81937 didn't house enough code in `LeafRange`. Moving the API boundary a little makes things more local in navigate.rs and less complicated in map.rs.

r? `@Mark-Simulacrum`
2021-06-20 22:52:49 +00:00
Mark Rousskov
61b453cd1a Fix CI to fetch master on beta channel 2021-06-20 16:20:08 -04:00
r00ster91
f804d8d71b Improve documentation 2021-06-20 22:19:47 +02:00
bors
e82b65026d Auto merge of #85538 - r00ster91:iterrepeat, r=Mark-Simulacrum
Replace some `std::iter::repeat` with `str::repeat`

I noticed that there were some instances where `std::iter::repeat` would be used to repeat a string or a char to take a specific count of it and then collect it into a `String` when `str::repeat` is actually much faster and better for that.

See also: https://github.com/rust-lang/rust-clippy/issues/7260.
2021-06-20 20:07:13 +00:00
Deadbeef
37d0d2705d
Do not set depth to 0 in fully_expand_fragment 2021-06-21 02:05:37 +08:00
Smitty
4cd2fab8c5 Specify if struct/enum in arg mismatch error 2021-06-20 13:48:37 -04:00
bors
dd941450fb Auto merge of #84967 - CDirkx:os_str_ext, r=m-ou-se
Move `OsStringExt` and `OsStrExt` to `std::os`

Moves the `OsStringExt` and `OsStrExt` traits and implementations from `sys_common` to `os`. `sys_common` is for abstractions over `sys` and shouldn't really contain publicly exported items.

This does introduce some duplication: the traits and implementations are now duplicated in `unix`, `wasi`, `hermit`, and `sgx`. However, I would argue that this duplication is no different to how something like `MetadataExt` is duplicated in `linux`, `vxworkx`, `redox`, `solaris` etc. The duplication also matches the fact that the traits on different platforms are technically distinct types: any platform is free to add it's own extra methods to the extension trait.
2021-06-20 16:42:13 +00:00