]> git.lizzy.rs Git - rust.git/log
rust.git
21 months agoAdd ExtraConstraintInfo
Jack Huey [Fri, 16 Sep 2022 21:33:12 +0000 (17:33 -0400)]
Add ExtraConstraintInfo

21 months agoAdd AscribeUserTypeProvePredicate
Jack Huey [Fri, 16 Sep 2022 21:20:11 +0000 (17:20 -0400)]
Add AscribeUserTypeProvePredicate

21 months agoAdd outlives_constraint to BlameConstraint
Jack Huey [Fri, 16 Sep 2022 21:08:35 +0000 (17:08 -0400)]
Add outlives_constraint to BlameConstraint

21 months agoAdd to_constraint_category to ObligationCause and SubregionOrigin
Jack Huey [Fri, 16 Sep 2022 21:00:11 +0000 (17:00 -0400)]
Add to_constraint_category to ObligationCause and SubregionOrigin

21 months agoPass ConstraintCategory thorough a few more places
Jack Huey [Fri, 16 Sep 2022 20:44:18 +0000 (16:44 -0400)]
Pass ConstraintCategory thorough a few more places

21 months agoMake QueryOutlivesConstraint contain a ConstraintCategory
Jack Huey [Fri, 16 Sep 2022 20:15:41 +0000 (16:15 -0400)]
Make QueryOutlivesConstraint contain a ConstraintCategory

21 months agoAuto merge of #101902 - jackh726:revert-static-hrtb-error, r=nikomatsakis
bors [Fri, 16 Sep 2022 16:46:14 +0000 (16:46 +0000)]
Auto merge of #101902 - jackh726:revert-static-hrtb-error, r=nikomatsakis

Partially revert #101433

reverts #101433 to fix #101844

We should get this into the beta cut, since the ICE is getting hit quite a bit.

21 months agoAdd test for #101844
Jack Huey [Fri, 16 Sep 2022 13:47:37 +0000 (09:47 -0400)]
Add test for #101844

21 months agoRevert "Better errors for implied static bound"
Jack Huey [Fri, 16 Sep 2022 13:47:07 +0000 (09:47 -0400)]
Revert "Better errors for implied static bound"

This reverts commit c75817b0a75d4b6b01ee10900ba5d01d4915e6a8.

21 months agoRevert "Use Predicate ConstraintCategory when normalizing"
Jack Huey [Fri, 16 Sep 2022 13:01:28 +0000 (09:01 -0400)]
Revert "Use Predicate ConstraintCategory when normalizing"

This reverts commit aae37f87632dd74856d55c0cd45d2c192379c990.

21 months agoAuto merge of #101895 - GuillaumeGomez:rollup-ured85q, r=GuillaumeGomez
bors [Fri, 16 Sep 2022 12:43:22 +0000 (12:43 +0000)]
Auto merge of #101895 - GuillaumeGomez:rollup-ured85q, r=GuillaumeGomez

Rollup of 7 pull requests

Successful merges:

 - #101494 (rustdoc mobile: move notable traits to return type)
 - #101813 (Extend CSS check to CSS variables)
 - #101825 (Fix back RPIT changes)
 - #101843 (Suggest associated const for incorrect use of let in traits)
 - #101859 (Slight vertical formatting)
 - #101868 (rustdoc: use more precise URLs for jump-to-definition links)
 - #101877 (rustdoc: remove no-op CSS `.block { padding: 0 }`)

Failed merges:

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

21 months agoRollup merge of #101877 - notriddle:notriddle/block, r=Dylan-DPC
Guillaume Gomez [Fri, 16 Sep 2022 11:07:19 +0000 (13:07 +0200)]
Rollup merge of #101877 - notriddle:notriddle/block, r=Dylan-DPC

rustdoc: remove no-op CSS `.block { padding: 0 }`

This rule was changed in 8fb1250aba8135679463351a3813c04ae45bf311 from the original version that had a non-zero padding. It's not needed, because it's not overriding anything that would've given `.block` a padding.

21 months agoRollup merge of #101868 - notriddle:notriddle/short-links-jump-to-definition, r=Guill...
Guillaume Gomez [Fri, 16 Sep 2022 11:07:19 +0000 (13:07 +0200)]
Rollup merge of #101868 - notriddle:notriddle/short-links-jump-to-definition, r=GuillaumeGomez

rustdoc: use more precise URLs for jump-to-definition links

As an example, this cuts down <https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/ty/mod.rs.html> by about 11%.

    $ du -h new_mod.rs.html old_mod.rs.html
    296K new_mod.rs.html
    332K old_mod.rs.html

Like https://github.com/rust-lang/rust/pull/83237, but separate code since source links have a different URL structure.

Related to [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/RFC.20for.20.22jump.20to.20definition.22.20feature/near/299029786) and [the jump-to-definition pre-RFC](https://github.com/GuillaumeGomez/rfcs/pull/1).

21 months agoRollup merge of #101859 - Rageking8:slight-vertical-formatting, r=compiler-errors
Guillaume Gomez [Fri, 16 Sep 2022 11:07:18 +0000 (13:07 +0200)]
Rollup merge of #101859 - Rageking8:slight-vertical-formatting, r=compiler-errors

Slight vertical formatting

21 months agoRollup merge of #101843 - chenyukang:fix-101797, r=oli-obk
Guillaume Gomez [Fri, 16 Sep 2022 11:07:18 +0000 (13:07 +0200)]
Rollup merge of #101843 - chenyukang:fix-101797, r=oli-obk

Suggest associated const for incorrect use of let in traits

Fixes #101797

21 months agoRollup merge of #101825 - spastorino:fix-rpit-changes, r=oli-obk
Guillaume Gomez [Fri, 16 Sep 2022 11:07:17 +0000 (13:07 +0200)]
Rollup merge of #101825 - spastorino:fix-rpit-changes, r=oli-obk

Fix back RPIT changes

r? `@oli-obk`

cc `@compiler-errors`

21 months agoRollup merge of #101813 - GuillaumeGomez:check-css-variables, r=notriddle
Guillaume Gomez [Fri, 16 Sep 2022 11:07:17 +0000 (13:07 +0200)]
Rollup merge of #101813 - GuillaumeGomez:check-css-variables, r=notriddle

Extend CSS check to CSS variables

This PR is a bit big because the first commit is a rewrite of the CSS parser to something a bit simpler which still allows to get easily access to CSS properties name.

The other two are about adding tests and adding the CSS variables check.

This check was missing because we are relying more and more on CSS variables rather than CSS selectors in themes.

r? `@notriddle`

21 months agoRollup merge of #101494 - jsha:notable-traits-right, r=GuillaumeGomez
Guillaume Gomez [Fri, 16 Sep 2022 11:07:16 +0000 (13:07 +0200)]
Rollup merge of #101494 - jsha:notable-traits-right, r=GuillaumeGomez

rustdoc mobile: move notable traits to return type

These were originally on the left, but were moved to the return type in c90fb7185a5febb00b7f8ccb49abceacd41bad6e. The CSS rule for mobile did not get updated at the time, so updating it now.

r? `@notriddle`

21 months agoAuto merge of #101860 - oli-obk:information_throwing, r=compiler-errors
bors [Fri, 16 Sep 2022 09:57:32 +0000 (09:57 +0000)]
Auto merge of #101860 - oli-obk:information_throwing, r=compiler-errors

Don't throw away information just to recompute it again

also allows making some functions private.

21 months agoAuto merge of #101882 - Dylan-DPC:rollup-9lxwuwj, r=Dylan-DPC
bors [Fri, 16 Sep 2022 07:14:29 +0000 (07:14 +0000)]
Auto merge of #101882 - Dylan-DPC:rollup-9lxwuwj, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #101722 (Rustdoc-Json: Fix Type docs.)
 - #101738 (Fix `#[link kind="raw-dylib"]` to respect `#[link_name]`)
 - #101753 (Prefer explict closure sig types over expected ones)
 - #101787 (cache `collect_trait_impl_trait_tys`)
 - #101802 (Constify impl Fn* &(mut) Fn*)
 - #101809 (Replace `check_missing_items.py` with `jsondoclint`)
 - #101864 (rustdoc: remove no-op CSS `h1-4 { color: --main-color }`)

Failed merges:

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

21 months agoRollup merge of #101864 - notriddle:notriddle/h1-h2-h3-h4, r=GuillaumeGomez
Dylan DPC [Fri, 16 Sep 2022 05:47:03 +0000 (11:17 +0530)]
Rollup merge of #101864 - notriddle:notriddle/h1-h2-h3-h4, r=GuillaumeGomez

rustdoc: remove no-op CSS `h1-4 { color: --main-color }`

Headers already inherit the font color they need from their parents.

This rule dates back to earlier versions of the rustdoc theme, where headers and body had different text colors.

https://github.com/rust-lang/rust/blob/68c15be8b5a28297ae58ea030adf49f265e41127/src/librustdoc/html/static/main.css#L72-L98

Nowadays, since the two have exactly the same color (specified by the `--main-color` variable), this rule does nothing.

21 months agoRollup merge of #101809 - aDotInTheVoid:jsondoclint, r=GuillaumeGomez
Dylan DPC [Fri, 16 Sep 2022 05:47:02 +0000 (11:17 +0530)]
Rollup merge of #101809 - aDotInTheVoid:jsondoclint, r=GuillaumeGomez

Replace `check_missing_items.py` with `jsondoclint`

[zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/check_missing_items.2Epy.20Replacement.2E)

check_missing_items.py was a python script that checked rustdoc json output to make sure all the Id's referenced existed in the JSON index. This PR replaces that with a rust binary (`jsondoclint`) that does the same thing.

### Motivation

1. Easier to change when `rustdoc-json-types` changes, as `jsondoclint` uses the types directly.
2. Better Errors:
    - Multiple Errors can be emited for a single crate
    - Errors can say where in JSON they occored
        ```
        2:2889:408 not in index or paths, but refered to at '.index."2:2888:104".inner.items[0]'
        2:2890:410 not in index or paths, but refered to at '.index."2:2888:104".inner.items[1]'
        ```
3. Catches more bugs.
    - Because matches are exaustive, all posible variants considered for enums
    - All Id's checked
    - Has already found #101770, #101199 and #100973
    - Id type is also checked, so the Id's in a structs fields can only be field items.
4. Allows the possibility of running from `rustdoc::json`, which we should do in a crator run at some point.

cc ``@CraftSpider``

r? ``@GuillaumeGomez``

21 months agoRollup merge of #101802 - chriss0612:const_fn_trait_ref_impls, r=fee1-dead
Dylan DPC [Fri, 16 Sep 2022 05:47:02 +0000 (11:17 +0530)]
Rollup merge of #101802 - chriss0612:const_fn_trait_ref_impls, r=fee1-dead

Constify impl Fn* &(mut) Fn*

Tracking Issue: [101803](https://github.com/rust-lang/rust/issues/101803)

Feature gate: `#![feature(const_fn_trait_ref_impls)]`

This feature allows using references to Fn* Items as Fn* Items themself in a const context.

21 months agoRollup merge of #101787 - compiler-errors:cache-rpitit, r=petrochenkov
Dylan DPC [Fri, 16 Sep 2022 05:47:01 +0000 (11:17 +0530)]
Rollup merge of #101787 - compiler-errors:cache-rpitit, r=petrochenkov

cache `collect_trait_impl_trait_tys`

Micro-optimization for RPITITs

21 months agoRollup merge of #101753 - oli-obk:tait_closure_args, r=compiler-errors
Dylan DPC [Fri, 16 Sep 2022 05:47:01 +0000 (11:17 +0530)]
Rollup merge of #101753 - oli-obk:tait_closure_args, r=compiler-errors

Prefer explict closure sig types over expected ones

fixes #100800

Previously we only checked that given closure arguments are equal to expected closure arguments, but now we choose the given closure arguments for the signature that is used when type checking the closure body, and keep the other signature for the type of the closure as seen outside of it.

21 months agoRollup merge of #101738 - dpaoliello:linkname, r=petrochenkov
Dylan DPC [Fri, 16 Sep 2022 05:47:00 +0000 (11:17 +0530)]
Rollup merge of #101738 - dpaoliello:linkname, r=petrochenkov

Fix `#[link kind="raw-dylib"]` to respect `#[link_name]`

Issue Details:
When using `#[link kind="raw-dylib"]` (#58713), the Rust compiler ignored any `#[link_name]` attributes when generating the import library and so the resulting binary would fail to link due to missing symbols.

Fix Details:
Use the name from `#[link_name]` if present when generating the `raw-dylib` import library, otherwise default back to the actual symbol name.

21 months agoRollup merge of #101722 - aDotInTheVoid:rdy-ty-prim-docs, r=CraftSpider
Dylan DPC [Fri, 16 Sep 2022 05:47:00 +0000 (11:17 +0530)]
Rollup merge of #101722 - aDotInTheVoid:rdy-ty-prim-docs, r=CraftSpider

Rustdoc-Json: Fix Type docs.

Primitive doesn't include Array/Slice/Tuple, as they are their own variants.

ResolvedPath doesn't include Traits, as they appear in the DynTrait variant.

21 months agorustdoc: remove no-op CSS `.block { padding: 0 }`
Michael Howell [Fri, 16 Sep 2022 00:16:59 +0000 (17:16 -0700)]
rustdoc: remove no-op CSS `.block { padding: 0 }`

This rule was changed in 8fb1250aba8135679463351a3813c04ae45bf311 from the
original version that had a non-zero padding. It's not needed, because
it's not overriding anything that would've given `.block` a padding.

21 months agoAuto merge of #101711 - chenyukang:fix-101691, r=jyn514
bors [Fri, 16 Sep 2022 00:02:46 +0000 (00:02 +0000)]
Auto merge of #101711 - chenyukang:fix-101691, r=jyn514

Copy stage0 binaries into stage0-sysroot

Fixes #101691

21 months agoAuto merge of #101831 - compiler-errors:issue-75899, r=jackh726
bors [Thu, 15 Sep 2022 21:06:36 +0000 (21:06 +0000)]
Auto merge of #101831 - compiler-errors:issue-75899, r=jackh726

Normalize struct field types in `confirm_builtin_unsize_candidate`

Fixes #75899

---

edited to move the normalization into `confirm_builtin_unsize_candidate` instead of the coercion code.

21 months agorustdoc: fix test cases
Michael Howell [Thu, 15 Sep 2022 20:14:30 +0000 (13:14 -0700)]
rustdoc: fix test cases

21 months agorustdoc: use more precise URLs for jump-to-definition links
Michael Howell [Thu, 15 Sep 2022 20:03:04 +0000 (13:03 -0700)]
rustdoc: use more precise URLs for jump-to-definition links

As an example, this cuts down
<https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/ty/mod.rs.html>
by about 11%.

    $ du -h new_mod.rs.html old_mod.rs.html
    296K new_mod.rs.html
    332K old_mod.rs.html

21 months agoAuto merge of #101858 - oli-obk:lift_derive, r=lcnr
bors [Thu, 15 Sep 2022 18:14:29 +0000 (18:14 +0000)]
Auto merge of #101858 - oli-obk:lift_derive, r=lcnr

derive various impls instead of hand-rolling them

r? `@lcnr`

This may not have been what you asked for in https://github.com/rust-lang/rust/commit/964b97e845d5dd18e09d5e045f5b376086714836#r84051418 but I got carried away while following the compiler team meeting today.

21 months agotweak suggestion
yukang [Thu, 15 Sep 2022 17:09:26 +0000 (01:09 +0800)]
tweak suggestion

21 months agorustdoc: remove no-op CSS `h1-4 { color: --main-color }`
Michael Howell [Thu, 15 Sep 2022 16:59:27 +0000 (09:59 -0700)]
rustdoc: remove no-op CSS `h1-4 { color: --main-color }`

Headers already inherit the font color they need from their parents.

This rule dates back to earlier versions of the rustdoc theme, where headers
and body had different text colors.

https://github.com/rust-lang/rust/blob/68c15be8b5a28297ae58ea030adf49f265e41127/src/librustdoc/html/static/main.css#L72-L98

Nowadays, since the two have exactly the same color (specified by the
`--main-color` variable), this rule does nothing.

21 months agoDon't throw away information just to recompute it again
Oli Scherer [Thu, 8 Sep 2022 15:18:43 +0000 (15:18 +0000)]
Don't throw away information just to recompute it again

21 months agoslight vertical formatting
Rageking8 [Thu, 15 Sep 2022 15:51:43 +0000 (23:51 +0800)]
slight vertical formatting

21 months agoMerge all `TypeVisitable for &List<T>` impls into one generic one
Oli Scherer [Thu, 15 Sep 2022 15:33:46 +0000 (15:33 +0000)]
Merge all `TypeVisitable for &List<T>` impls into one generic one

21 months agoAuto merge of #101410 - dingxiangfei2009:fix-let-else-scoping, r=jackh726
bors [Thu, 15 Sep 2022 15:19:40 +0000 (15:19 +0000)]
Auto merge of #101410 - dingxiangfei2009:fix-let-else-scoping, r=jackh726

Reorder nesting scopes and declare bindings without drop schedule

Fix #99228
Fix #99975

Storages are previously not declared before entering the `else` block of a `let .. else` statement. However, when breaking out of the pattern matching into the `else` block, those storages are recorded as scheduled for drops. This is not expected.

This MR fixes this issue by not scheduling the drops for those storages.

cc `@est31`

21 months agoReplace more manual TypeFoldable and TypeVisitable impls with derives
Oli Scherer [Thu, 15 Sep 2022 15:05:03 +0000 (15:05 +0000)]
Replace more manual TypeFoldable and TypeVisitable impls with derives

21 months agoderive TypeVisitable and TypeFoldable for mir types
Oli Scherer [Thu, 15 Sep 2022 14:42:43 +0000 (14:42 +0000)]
derive TypeVisitable and TypeFoldable for mir types

21 months agoDerive TypeFoldable and TypeVisitable for mir::PlaceElement
Oli Scherer [Thu, 15 Sep 2022 13:43:44 +0000 (13:43 +0000)]
Derive TypeFoldable and TypeVisitable for mir::PlaceElement

21 months agoResolve a FIXME
Oli Scherer [Thu, 15 Sep 2022 13:37:34 +0000 (13:37 +0000)]
Resolve a FIXME

21 months agoderive various Lift impl instead of hand rolling them
Oli Scherer [Thu, 8 Sep 2022 09:04:52 +0000 (09:04 +0000)]
derive various Lift impl instead of hand rolling them

21 months agoAuto merge of #101173 - jyn514:simplify-macro-arguments, r=cjgillot
bors [Thu, 15 Sep 2022 11:54:03 +0000 (11:54 +0000)]
Auto merge of #101173 - jyn514:simplify-macro-arguments, r=cjgillot

Further simplify the macros generated by `rustc_queries`

This doesn't actually move anything outside the macros, but it makes them simpler to read.

- Add a new `rustc_query_names` macro. This allows a much simpler syntax for the matchers in the macros passed to it as a callback.
- Convert `define_dep_nodes` and `alloc_once` to use `rustc_query_names`. This is possible because they only use the names
  (despite the quite complicated matchers in `define_dep_nodes`, none of the other arguments are used).
- Get rid of `rustc_dep_node_append`.

r? `@cjgillot`

21 months agoCorrectly handle parens
Guillaume Gomez [Thu, 15 Sep 2022 11:53:20 +0000 (13:53 +0200)]
Correctly handle parens

21 months agoAuto merge of #101811 - flip1995:clippyup, r=flip1995
bors [Thu, 15 Sep 2022 08:53:51 +0000 (08:53 +0000)]
Auto merge of #101811 - flip1995:clippyup, r=flip1995

Clippy pre beta branch fix

Before beta is branched on Friday, I want to move the `unused_peekable` lint  that was added in this release cycle (1.65) to `nursery`. This lint was already reported twice (https://github.com/rust-lang/rust-clippy/issues/9456, https://github.com/rust-lang/rust-clippy/issues/9462) in a short time, so it is probably a good idea to fix it before it hits beta and then stable.

r? `@Manishearth`

21 months agofix #101797: Suggest associated const for incorrect use of let in traits
yukang [Thu, 15 Sep 2022 07:18:23 +0000 (15:18 +0800)]
fix #101797: Suggest associated const for incorrect use of let in traits

21 months agoAuto merge of #101838 - matthiaskrgr:rollup-d1nm6b3, r=matthiaskrgr
bors [Thu, 15 Sep 2022 06:12:39 +0000 (06:12 +0000)]
Auto merge of #101838 - matthiaskrgr:rollup-d1nm6b3, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #100415 (Add BE8 support)
 - #101559 (Adding "backtrace off" option for fuchsia targets)
 - #101740 (Adding ignore-fuchsia arg to non-applicable compiler ui tests)
 - #101778 (rustdoc: clean up DOM by removing `.dockblock-short p`)
 - #101786 (Tidy will not check coding style in bootstrap/target)
 - #101810 (Constify `PartialEq` for `Ordering`)
 - #101812 (rustdoc: clean up CSS `#titles` using flexbox)
 - #101820 (rustdoc: remove no-op rule `a { background: transparent }`)
 - #101828 (Add test for #101743)

Failed merges:

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

21 months agoRollup merge of #101828 - aDotInTheVoid:test-101743, r=jsha
Matthias Krüger [Thu, 15 Sep 2022 06:00:18 +0000 (08:00 +0200)]
Rollup merge of #101828 - aDotInTheVoid:test-101743, r=jsha

Add test for #101743

The issue was closes as we stopped rendering `const`s like this, but if we move back to doing that, make sure we don't accidently generate tags

21 months agoRollup merge of #101820 - notriddle:notriddle/a, r=GuillaumeGomez
Matthias Krüger [Thu, 15 Sep 2022 06:00:18 +0000 (08:00 +0200)]
Rollup merge of #101820 - notriddle:notriddle/a, r=GuillaumeGomez

rustdoc: remove no-op rule `a { background: transparent }`

The background is transparent by default.

It was added in 5a01dbe67b43660bf1df96074f34a635aad50e56 to work around a bug in the JavaScript syntax highlighting engine that rustdoc used at the time.

21 months agoRollup merge of #101812 - notriddle:notriddle/titles-button, r=GuillaumeGomez
Matthias Krüger [Thu, 15 Sep 2022 06:00:17 +0000 (08:00 +0200)]
Rollup merge of #101812 - notriddle:notriddle/titles-button, r=GuillaumeGomez

rustdoc: clean up CSS `#titles` using flexbox

This commit allows it to stop manually specifying pixel heights for the tabs on search result pages. There's less messing with manual breakpoints and less complex CSS selectors.

# Before

![image](https://user-images.githubusercontent.com/1593513/190215034-253c0f58-07c6-41c9-8848-0442c0522070.png)

# After

![image](https://user-images.githubusercontent.com/1593513/190215065-d2453dca-edf0-4353-8fc8-3a3b31f03892.png)

21 months agoRollup merge of #101810 - raldone01:feat/const_partial_eq_ordering, r=fee1-dead
Matthias Krüger [Thu, 15 Sep 2022 06:00:16 +0000 (08:00 +0200)]
Rollup merge of #101810 - raldone01:feat/const_partial_eq_ordering, r=fee1-dead

Constify `PartialEq` for `Ordering`

Adds `impl const PartialEq for Ordering {}` to #92391.

21 months agoRollup merge of #101786 - chenyukang:fix-tidy-for-bootstrap, r=jyn514
Matthias Krüger [Thu, 15 Sep 2022 06:00:15 +0000 (08:00 +0200)]
Rollup merge of #101786 - chenyukang:fix-tidy-for-bootstrap, r=jyn514

Tidy will not check coding style in bootstrap/target

`bootstrap/target` may contains the files generated by `rust-analysis`, which we won't want to be checked.

21 months agoRollup merge of #101778 - notriddle:notriddle/docblock-short-p, r=GuillaumeGomez
Matthias Krüger [Thu, 15 Sep 2022 06:00:14 +0000 (08:00 +0200)]
Rollup merge of #101778 - notriddle:notriddle/docblock-short-p, r=GuillaumeGomez

rustdoc: clean up DOM by removing `.dockblock-short p`

On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103.

Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-short-p/std/index.html

21 months agoRollup merge of #101740 - andrewpollack:add-ignore-fuchsia-ui-tests, r=tmandry
Matthias Krüger [Thu, 15 Sep 2022 06:00:13 +0000 (08:00 +0200)]
Rollup merge of #101740 - andrewpollack:add-ignore-fuchsia-ui-tests, r=tmandry

Adding ignore-fuchsia arg to non-applicable compiler ui tests

Adding `ignore-fuchsia` flag to tests involving `std::process::Command` calls, and `execve` calls

21 months agoRollup merge of #101559 - andrewpollack:add-backtrace-off-fuchsia, r=tmandry
Matthias Krüger [Thu, 15 Sep 2022 06:00:12 +0000 (08:00 +0200)]
Rollup merge of #101559 - andrewpollack:add-backtrace-off-fuchsia, r=tmandry

Adding "backtrace off" option for fuchsia targets

Used for improving compiler test suite results on Fuchsia targets

21 months agoRollup merge of #100415 - WorksButNotTested:be8, r=wesleywiser
Matthias Krüger [Thu, 15 Sep 2022 06:00:11 +0000 (08:00 +0200)]
Rollup merge of #100415 - WorksButNotTested:be8, r=wesleywiser

Add BE8 support

Built using the following `/config.toml`
```
changelog-seen = 2

[llvm]
download-ci-llvm = false
skip-rebuild = true
optimize = true
ninja = true
targets = "ARM;X86"
clang = false

[build]
target = ["x86_64-unknown-linux-gnu", "armeb-linux-gnueabi"]
docs = false
docs-minification = false
compiler-docs = false
[install]
prefix = "/home/user/x-tools/rust/"

[rust]
debug-logging=true
backtrace = true
incremental = true

[target.x86_64-unknown-linux-gnu]

[dist]

[target.armeb-linux-gnueabi]
cc = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc"
cxx = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-g++"
ar = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ar"
ranlib = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ranlib"
linker = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc"
llvm-config = "/home/user/x-tools/clang/bin/llvm-config"
llvm-filecheck = "/home/user/x-tools/clang/bin/FileCheck"
```

The following `.cargo/config` is needed inside any project directory:
```
[build]
target = "armeb-linux-gnueabi"

[target.armeb-linux-gnueabi]
linker = "armeb-linux-gnueabi-gcc"
```

21 months agoAuto merge of #101830 - nnethercote:streamline-register_res, r=jyn514
bors [Thu, 15 Sep 2022 02:58:21 +0000 (02:58 +0000)]
Auto merge of #101830 - nnethercote:streamline-register_res, r=jyn514

Streamline `register_res`.

Turns out it's only ever passed a `Res::Def`.

r? `@jyn514`

21 months agoadd diagram to explain the MIR structure
Ding Xiang Fei [Tue, 13 Sep 2022 14:07:16 +0000 (22:07 +0800)]
add diagram to explain the MIR structure

21 months agoadd explanatory note
Ding Xiang Fei [Tue, 13 Sep 2022 13:01:48 +0000 (21:01 +0800)]
add explanatory note

21 months agoenclose else block in terminating scope
Ding Xiang Fei [Mon, 12 Sep 2022 14:50:52 +0000 (22:50 +0800)]
enclose else block in terminating scope

21 months agosupplement for the missing or incomplete comments
Ding Xiang Fei [Mon, 5 Sep 2022 06:24:13 +0000 (14:24 +0800)]
supplement for the missing or incomplete comments

21 months agoadd test for #99975
Ding Xiang Fei [Mon, 5 Sep 2022 06:17:41 +0000 (14:17 +0800)]
add test for #99975

21 months agoreorder nesting scopes and declare bindings without drop schedule
Ding Xiang Fei [Sun, 4 Sep 2022 15:17:43 +0000 (23:17 +0800)]
reorder nesting scopes and declare bindings without drop schedule

21 months agoNormalize struct types in confirm_builtin_unsize_candidate
Michael Goulet [Thu, 15 Sep 2022 01:13:46 +0000 (01:13 +0000)]
Normalize struct types in confirm_builtin_unsize_candidate

21 months agoAuto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk
bors [Thu, 15 Sep 2022 00:01:17 +0000 (00:01 +0000)]
Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk

Compute lint levels by definition

Lint levels are currently computed once for the whole crate. Any code that wants to emit a lint depends on this single `lint_levels(())` query. This query contains the `Span` for each attribute that participates in the lint level tree, so any code that wants to emit a lint basically depends on the spans in all files in the crate.

Contrary to hard errors, we do not clear the incremental session on lints, so this implicit world dependency pessimizes incremental reuse. (And is furthermore invisible for allowed lints.)

This PR completes https://github.com/rust-lang/rust/pull/99634 (thanks for the initial work `@fee1-dead)` and includes it in the dependency graph.

The design is based on 2 queries:
1. `lint_levels_on(HirId) -> FxHashMap<LintId, LevelAndSource>` which accesses the attributes at the given `HirId` and processes them into lint levels.  The `TyCtxt` is responsible for probing the HIR tree to find the user-visible level.
2. `lint_expectations(())` which lists all the `#[expect]` attributes in the crate.

This PR also introduces the ability to reconstruct a `HirId` from a `DepNode` by encoding the local part of the `DefPathHash` and the `ItemLocalId` in the two `u64` of the fingerprint.  This allows for the dep-graph to directly recompute `lint_levels_on` directly, without having to force the calling query.

Closes https://github.com/rust-lang/rust/issues/95094.
Supersedes https://github.com/rust-lang/rust/pull/99634.

21 months agoAdding backtrace off option for fuchsia targets
Andrew Pollack [Thu, 8 Sep 2022 05:14:03 +0000 (05:14 +0000)]
Adding backtrace off option for fuchsia targets

21 months agoStreamline `register_res`.
Nicholas Nethercote [Wed, 14 Sep 2022 05:57:22 +0000 (15:57 +1000)]
Streamline `register_res`.

Turns out it's only ever passed a `Res::Def`.

21 months agoAdd test for #101743
Nixon Enraght-Moony [Wed, 14 Sep 2022 21:19:43 +0000 (22:19 +0100)]
Add test for #101743

21 months agoAuto merge of #101313 - SparrowLii:mk_attr_id, r=cjgillot
bors [Wed, 14 Sep 2022 20:52:18 +0000 (20:52 +0000)]
Auto merge of #101313 - SparrowLii:mk_attr_id, r=cjgillot

make `mk_attr_id` part of `ParseSess`

Updates #48685

The current `mk_attr_id` uses the `AtomicU32` type, which is not very efficient and adds a lot of lock contention in a parallel environment.

This PR refers to the task list in #48685, uses `mk_attr_id` as a method of the `AttrIdGenerator` struct, and adds a new field `attr_id_generator` to `ParseSess`.

`AttrIdGenerator` uses the `WorkerLocal`, which has two advantages: 1. `Cell` is more efficient than `AtomicU32`, and does not increase any lock contention. 2. We put the index of the work thread in the first few bits of the generated `AttrId`, so that the `AttrId` generated in different threads can be easily guaranteed to be unique.

cc `@cjgillot`

21 months agocache collect_trait_impl_trait_tys
Michael Goulet [Fri, 9 Sep 2022 15:34:11 +0000 (15:34 +0000)]
cache collect_trait_impl_trait_tys

21 months agoGet rid of 'b lifetime in lower_param_bounds_mut
Santiago Pastorino [Wed, 14 Sep 2022 20:40:51 +0000 (17:40 -0300)]
Get rid of 'b lifetime in lower_param_bounds_mut

21 months agoPass ImplTraitContext as &, there's no need for that to be &mut
Santiago Pastorino [Wed, 14 Sep 2022 20:39:52 +0000 (17:39 -0300)]
Pass ImplTraitContext as &, there's no need for that to be &mut

21 months agoRevert "Rollup merge of #101496 - spastorino:lower_lifetime_binder_api_changes, r...
Santiago Pastorino [Wed, 14 Sep 2022 20:14:36 +0000 (17:14 -0300)]
Revert "Rollup merge of #101496 - spastorino:lower_lifetime_binder_api_changes, r=oli-obk"

This reverts commit 953a6b3da7016d41816951ad0930922f558c16d0, reversing
changes made to b5ffbd32d4838a460a73ce9aa106a4e1856e52c0.

21 months agorustdoc: remove no-op rule `a { background: transparent }`
Michael Howell [Wed, 14 Sep 2022 20:09:32 +0000 (13:09 -0700)]
rustdoc: remove no-op rule `a { background: transparent }`

The background is transparent by default.

It was added in 5a01dbe67b43660bf1df96074f34a635aad50e56 to work around a bug
in the JavaScript syntax highlighting engine that rustdoc used at the time.

21 months agoRemove duplicate warnings
Guillaume Gomez [Wed, 14 Sep 2022 18:23:19 +0000 (20:23 +0200)]
Remove duplicate warnings

21 months agoTemporarily move clippy::unused_peekable to nursery
Philipp Krones [Wed, 14 Sep 2022 18:13:30 +0000 (20:13 +0200)]
Temporarily move clippy::unused_peekable to nursery

21 months agoAuto merge of #101212 - eholk:dyn-star, r=compiler-errors
bors [Wed, 14 Sep 2022 18:10:51 +0000 (18:10 +0000)]
Auto merge of #101212 - eholk:dyn-star, r=compiler-errors

Initial implementation of dyn*

This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things:

* Introduce `dyn_star` feature flag
* Adds parsing for `dyn* Trait` types
* Defines `dyn* Trait` as a sized type
* Adds support for explicit casts, like `42usize as dyn* Debug`
  * Including const evaluation of such casts
* Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope
* Adds codegen for method calls, at least for methods that take `&self`

Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits.

Joint work with `@nikomatsakis` and `@compiler-errors.`

r? `@bjorn3`

21 months agoChanges to rename target and update docs
Your Name [Wed, 14 Sep 2022 17:38:01 +0000 (18:38 +0100)]
Changes to rename target and update docs

21 months agoAdd check for missing CSS variables
Guillaume Gomez [Wed, 14 Sep 2022 16:36:48 +0000 (18:36 +0200)]
Add check for missing CSS variables

21 months agoUpdate theme check tests
Guillaume Gomez [Wed, 14 Sep 2022 15:39:32 +0000 (17:39 +0200)]
Update theme check tests

21 months agoSimplify CSS parser to check themes
Guillaume Gomez [Wed, 14 Sep 2022 15:38:44 +0000 (17:38 +0200)]
Simplify CSS parser to check themes

21 months agoUpdate compiler/rustc_macros/src/query.rs
Camille Gillot [Wed, 14 Sep 2022 17:11:53 +0000 (19:11 +0200)]
Update compiler/rustc_macros/src/query.rs

21 months agoCorrect Key impl for HirId.
Camille GILLOT [Sat, 10 Sep 2022 09:55:10 +0000 (11:55 +0200)]
Correct Key impl for HirId.

21 months agoAdd FIXME.
Camille GILLOT [Sat, 10 Sep 2022 08:16:27 +0000 (10:16 +0200)]
Add FIXME.

21 months agoComment LintLevelSets.
Camille GILLOT [Sat, 10 Sep 2022 08:14:51 +0000 (10:14 +0200)]
Comment LintLevelSets.

21 months agoBless ui test.
Camille GILLOT [Sat, 10 Sep 2022 07:58:49 +0000 (09:58 +0200)]
Bless ui test.

21 months agoRemove unused tool_name.
Camille GILLOT [Sat, 10 Sep 2022 07:58:35 +0000 (09:58 +0200)]
Remove unused tool_name.

21 months agoMove some code and add comments.
Camille GILLOT [Fri, 9 Sep 2022 23:28:08 +0000 (01:28 +0200)]
Move some code and add comments.

21 months agoAllow query system to recover a HirId.
Camille GILLOT [Fri, 9 Sep 2022 10:05:01 +0000 (12:05 +0200)]
Allow query system to recover a HirId.

21 months agoCompute `lint_levels` by definition
Deadbeef [Fri, 22 Jul 2022 16:48:36 +0000 (16:48 +0000)]
Compute `lint_levels` by definition

21 months agorustdoc: clean up CSS `#titles` using flexbox
Michael Howell [Wed, 14 Sep 2022 16:45:05 +0000 (09:45 -0700)]
rustdoc: clean up CSS `#titles` using flexbox

This commit allows it to stop manually specifying pixel heights for the tabs
on search result pages. There's less messing with manual breakpoints and
less complex CSS selectors.

21 months agoConstify `PartialEq` for Ordering.
raldone01 [Wed, 14 Sep 2022 16:31:53 +0000 (18:31 +0200)]
Constify `PartialEq` for Ordering.

21 months agoAuto merge of #101805 - Dylan-DPC:rollup-mpdlbin, r=Dylan-DPC
bors [Wed, 14 Sep 2022 15:19:12 +0000 (15:19 +0000)]
Auto merge of #101805 - Dylan-DPC:rollup-mpdlbin, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #101433 (Emit a note that static bounds from HRTBs are a bug)
 - #101684 (smol grammar changes to README.md)
 - #101769 (rustdoc: remove redundant CSS `.out-of-band > span.since { position }`)
 - #101772 (Also replace the placeholder for the stable_features lint)
 - #101773 (rustdoc: remove outdated CSS `.content table` etc)
 - #101779 (Update test output for drop tracking)

Failed merges:

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

21 months agojsondoclint: Fix TODO's
Nixon Enraght-Moony [Wed, 14 Sep 2022 14:41:54 +0000 (15:41 +0100)]
jsondoclint: Fix TODO's

21 months agojsondoclint: More precise `Path` checks
Nixon Enraght-Moony [Wed, 14 Sep 2022 14:31:45 +0000 (15:31 +0100)]
jsondoclint: More precise `Path` checks

21 months agoRustdoc-Json: Add test for extern_types
Nixon Enraght-Moony [Wed, 14 Sep 2022 14:08:56 +0000 (15:08 +0100)]
Rustdoc-Json: Add test for extern_types

21 months agoRemove check_missing_items.py
Nixon Enraght-Moony [Wed, 14 Sep 2022 13:51:18 +0000 (14:51 +0100)]
Remove check_missing_items.py

21 months agojsondoclint: Document validator
Nixon Enraght-Moony [Wed, 14 Sep 2022 13:47:25 +0000 (14:47 +0100)]
jsondoclint: Document validator