Commit Graph

199688 Commits

Author SHA1 Message Date
Matthias Krüger
09e7bb427e
Rollup merge of #101534 - rust-lang:notriddle/rustdoc-flex-direction, r=GuillaumeGomez
rustdoc: remove unused mobile CSS `.rustdoc { flex-direction }`

According to MDN, [flex-direction] only applies to [flex containers], which are boxes with `display: flex` or `inline-flex`.

However, the `.rustdoc` body container is not a flex-container on mobile. A few lines above, it's set to `display: block`, so this selector does not have any effect.

[flex-direction]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction

[flex containers]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox#the_flex_container
2022-09-07 21:48:21 +02:00
Matthias Krüger
acb3d11f1b
Rollup merge of #101525 - eltociear:patch-16, r=cjgillot
Fix typo in pass_manager.rs

overriden -> overridden
2022-09-07 21:48:20 +02:00
Matthias Krüger
8d21e97d64
Rollup merge of #101521 - aDotInTheVoid:rdj-structkind, r=GuillaumeGomez
Rustdoc-Json: More accurate struct type.

Closes #101489

r? `@GuillaumeGomez`
2022-09-07 21:48:19 +02:00
Matthias Krüger
fbae06e75f
Rollup merge of #101507 - notriddle:notriddle/main-content-table-td, r=GuillaumeGomez
rustdoc: remove unused CSS `#main-content > table td`

This rule was added in 4e2c59a970 to benefit the module items table. However, the module items table stopped using table tags when 6020c79dde switched us over to grid layout.

You can see when this one used to be triggered by visiting <https://doc.rust-lang.org/1.54.0/alloc/slice/index.html#structs-1> in a very narrow window, but it doesn't any more, because the module table is now rendered using `<div>` tags.
2022-09-07 21:48:18 +02:00
Matthias Krüger
46fe72b359
Rollup merge of #101506 - notriddle:notriddle/rustdoc-main-since-2, r=GuillaumeGomez
rustdoc: remove unused CSS `#main-content > .since`

I missed one from #101298
2022-09-07 21:48:17 +02:00
Matthias Krüger
0a1c816dcd
Rollup merge of #101503 - spastorino:add-debug-calls, r=compiler-errors
Add debug calls

`@oli-obk` requested this and other changes as a way of simplifying https://github.com/rust-lang/rust/pull/101345. This is just going to make the diff of https://github.com/rust-lang/rust/pull/101345 smaller.

r? `@oli-obk` `@cjgillot`
2022-09-07 21:48:16 +02:00
Matthias Krüger
c365ce3ffd
Rollup merge of #101502 - TaKO8Ki:do-not-suggest-semicolon-for-macro-without-exclamation-mark, r=wesleywiser
Do not suggest a semicolon for a macro without `!`

Fixes a regression in #101490
2022-09-07 21:48:15 +02:00
Matthias Krüger
9361297dfc
Rollup merge of #101493 - spastorino:borrow-mut-impl-trait-context, r=oli-obk
Pass ImplTraitContext as &mut to avoid the need of ImplTraitContext::reborrow

`@oli-obk` requested this and other changes as a way of simplifying #101345. This is just going to make the diff of #101345 smaller.

r? `@oli-obk` `@cjgillot`
2022-09-07 21:48:14 +02:00
Matthias Krüger
1d65e9619d
Rollup merge of #101435 - JakobDegen:bitwidth-tests, r=wesleywiser
Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH`

This commit removes the annotation only for those tests where the 32 bit and 64 bit files were exactly identical. I didn't touch anything in the `mir-opt/const` directory, since having this annotation there seems more principled, even if it doesn't make a difference.

This also removes four additional files related to the `separate_const_switch.rs` test. The associated annotations were removed in #100827 , but I forgot to remove the files as well. (#97564 is the issue tracking an automated check here)

r? ```@wesleywiser```
2022-09-07 21:48:13 +02:00
Matthias Krüger
d1ebba41c1
Rollup merge of #101416 - uarif1:doc_non_blocking_stdio, r=joshtriplett
stdio: Document no support for writing to non-blocking stdio/stderr

Printing to stdio/stderr that have been opened with non-blocking
(O_NONBLOCK in linux) can result in an error, which is not handled
by std::io module causing a panic.

Signed-off-by: Usama Arif <usama.arif@bytedance.com>
2022-09-07 21:48:12 +02:00
Matthias Krüger
870a46df88
Rollup merge of #101343 - diminishedprime:patch-3, r=tmandry
Add -api-level to pm command

As of ~Aug 30th, `pm build` commands require an `api-level` flag. This flag should match the fuchsia api-level that's being targeted by the code. Since this is dependent on the version of the SDK that's being used, we may want to change this to something a bit more robust in the future.
2022-09-07 21:48:11 +02:00
bors
da29f8928d Auto merge of #9441 - Jarcho:hang_9433, r=Alexendoo
Fix hang in `vec_init_then_push`

fixes #9433
changelog: Fix infinite loop in `vec_init_then_push`
2022-09-07 19:43:00 +00:00
Jason Newcomb
15859323ea Fix hang in vec_init_then_push 2022-09-07 15:26:44 -04:00
bors
9682b5d3a3 Auto merge of #101476 - ChrisDenton:BCryptRandom-fix, r=thomcc
Open a BCrypt algorithm handle

Fixes #101474, supplants #101456.

Replaces use of a pseduo handle with manually opening a algorithm handle.

Most interesting thing here is the atomics.

r? `@thomcc`
2022-09-07 18:54:03 +00:00
Michael Howell
43681db48d rustdoc: remove unused CSS #main-content > table td
This rule was added in 4e2c59a970
to benefit the module items table. However, the module items table stopped
using table tags when 6020c79dde
switched us over to grid layout.

You can see when this one used to be triggered by visiting
<https://doc.rust-lang.org/1.54.0/alloc/slice/index.html#structs-1> in a
very narrow window, but it doesn't any more, because the module table is
now rendered using `<div>` tags.
2022-09-07 09:52:49 -07:00
bors
f91ca2878a Auto merge of #101522 - oli-obk:miriup, r=oli-obk
Update miri submodule

fixes #101344

cc `@rust-lang/miri`

r? `@ghost`
2022-09-07 16:31:39 +00:00
Maurits van Riezen
5fbe485ecc
Typo 2022-09-07 17:53:47 +02:00
Michael Howell
10fc2ff806 rustdoc: remove unused CSS .content .methods > div
This selector has its roots in these commits:

  * current version:

    `.content .methods > div:not(.notable-traits):not(.method)` from
    9077d540da

  * intermediate version:

    `.content .methods > div:not(.important-traits)` from
    d86621f69e

  * original version:

    `.content .methods > div { margin-left: 40px; }` from
    0a46933c4d

Based on the call stack, where [`class='methods'`] calls `trait_item` and
[`trait_item`] calls [`document`], this div selector was probably intended to
target docblock and stability tags.

In the current version of the code, neither of these can possibly be nested
directly below the `class='methods'` wrapper, because the [current version of
the `trait_item` function] always wraps them in a `<details>` tag if they
exist. The only div tag that can possibly be nested directly below it now is
the one with class `method`, which is explicitly excluded.

[`class='methods'`]: 0a46933c4d/src/librustdoc/html/render.rs (L1811-L1842)

[`trait_item`]: 0a46933c4d/src/librustdoc/html/render.rs (L1807)

[`document`]: 0a46933c4d/src/librustdoc/html/render.rs (L1515-L1523)

[current version of the `trait_item` function]: e7c7aa7288/src/librustdoc/html/render/print_item.rs (L710)
2022-09-07 08:42:31 -07:00
Oli Scherer
419c4e1c4f Update miri submodule 2022-09-07 15:42:12 +00:00
Maurits van Riezen
0a9b49c794
Add doctest 2022-09-07 16:36:32 +02:00
bors
567e1bbca7 Auto merge of #101432 - nnethercote:shrink-PredicateS, r=lcnr
Shrink `PredicateS`

r? `@ghost`
2022-09-07 13:49:58 +00:00
bors
a4d034126d Auto merge of #101432 - nnethercote:shrink-PredicateS, r=lcnr
Shrink `PredicateS`

r? `@ghost`
2022-09-07 13:49:58 +00:00
est31
dc2af5f876 Fix error printing mistake in tidy 2022-09-07 15:48:11 +02:00
Santiago Pastorino
d42afd2bd1
Format hir_id_validator error using pretty print 2022-09-07 10:46:17 -03:00
Santiago Pastorino
e3a738a942
Add instrument and debug calls 2022-09-07 10:46:14 -03:00
Michael Howell
210c851dcd rustdoc: remove unused mobile CSS .rustdoc { flex-direction }
According to MDN, [flex-direction] only applies to [flex containers], which
are boxes with `display: flex` or `inline-flex`.

However, the `.rustdoc` body container is not a flex-container on mobile.
A few lines above, it's set to `display: block`, so this selector does
not have any effect.

[flex-direction]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction

[flex containers]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox#the_flex_container
2022-09-07 06:42:36 -07:00
Krasimir Georgiev
a3b60f1769 llvm-wrapper: adapt for LLVM API changes
No functional changes intended.

Adapts PassWrapper for two recent LLVM API changes:
* e7bac3b9fa
* 93600eb50c
* 5e38b2a456
2022-09-07 13:37:59 +00:00
Guillaume Gomez
88fa621bab
Add documentation for Attr::is_doc_comment 2022-09-07 15:34:16 +02:00
Usama Arif
dfbc1f712d stdio: Document no support for writing to non-blocking stdio/stderr
Printing to stdio/stderr that have been opened with non-blocking
(O_NONBLOCK in linux) can result in an error, which is not handled
by std::io module causing a panic.

Signed-off-by: Usama Arif <usama.arif@bytedance.com>
2022-09-07 14:22:57 +01:00
Caio
0d078c9fd6 [Arithmetic] Consider literals 2022-09-07 10:00:45 -03:00
Chris Denton
832c7af0ea
Don't break windows/rand for miri 2022-09-07 14:00:15 +01:00
Rémy Rakic
318d0eba8b ignore -Zgcc-ld=lld test on msvc
now that CI correctly detects rust-lld in run-make tests, we ignore this
test since it relies on `-Zgcc-ld=lld` which is not made to work on the
windows-msvc targets: it requires a gcc flavor.
2022-09-07 14:51:54 +02:00
Rémy Rakic
c805c62562 fix compiletest detection of needs-rust-lld tests
for both windows and unixes
2022-09-07 14:51:54 +02:00
Rémy Rakic
5f25154813 fix lld-wrapper lld flavor detection 2022-09-07 14:51:54 +02:00
Maurits van Riezen
1dac6da408
This example was broken
The provided example to the `sign_plus` method on `fmt` is broken, it displays the `-` sign twice for negative numbers.
2022-09-07 14:01:30 +02:00
Jakub Beránek
da464dc00e
Update LLVM used in x86 CI dist builds to 15.0.0 2022-09-07 13:21:38 +02:00
Ikko Ashimine
9cef1ee113
Fix typo in pass_manager.rs
overriden -> overridden
2022-09-07 19:32:28 +09:00
bors
e7c7aa7288 Auto merge of #98332 - oli-obk:assume, r=wesleywiser
Lower the assume intrinsic to a MIR statement

This makes https://github.com/rust-lang/rust/pull/96862#issuecomment-1153739068 easier and will generally allow us to cheaply insert assume intrinsic calls in mir building.

r? rust-lang/wg-mir-opt
2022-09-07 09:47:23 +00:00
Vadim Petrochenkov
d8d3b83e3a rustc: Parameterize ty::Visibility over used ID
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
2022-09-07 13:35:41 +04:00
Nixon Enraght-Moony
1c8de17323 Rustdoc-Json: More accurate struct type.
Closes #101489
2022-09-07 09:42:23 +01:00
bors
0568b0a3de Auto merge of #101232 - nikic:issue-98294, r=Mark-Simulacrum
Add test for #98294

Add a test to make that the failure condition for this pattern is optimized away.

Fixes #98294.
2022-09-07 05:58:29 +00:00
bors
ff479b1f3c Auto merge of #100801 - Kobzol:track-pgo-profile-paths, r=michaelwoerister
Track PGO profiles in depinfo

This PR makes sure that PGO profiles (`-Cprofile-use` and `-Cprofile-sample-use`) are tracked in depinfo, so that when they change, the compilation session will be invalidated.

This approach was discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Tracking.20PGO.20profile.20files.20in.20cargo).

I tried it locally and it seems that the code is recompiled just with this change, and https://github.com/rust-lang/rust/pull/100413 is not even needed. But it's possible that not everything required is recompiled, so we will probably want to land both changes.

Another approach to implement this could be to store the PGO profiles in `sess.parse_sess.file_depinfo` when the session is being created, but then the paths would have to be converted to a string and then to a symbol, which seemed unnecessarily complicated.

CC `@michaelwoerister`

r? `@Eh2406`
2022-09-07 03:17:10 +00:00
Joshua Nelson
d2c53caee2 Move Queries::new out of the macro 2022-09-06 21:41:01 -05:00
bors
8c41305631 Auto merge of #101508 - JohnTitor:rollup-i5i2vqc, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #101451 (Add incremental test for changing struct name in assoc type.)
 - #101468 (fix RPIT ICE for implicit HRTB when missing dyn)
 - #101481 (Fix compile errors for uwp-windows-msvc targets)
 - #101484 (Remove dead broken code from const zst handling in backends)
 - #101486 (Add list of recognized repr attributes to the unrecognized repr error)
 - #101488 (rustdoc: remove unused CSS `#results > table`)
 - #101491 (rustdoc: remove outdated CSS `.sub-variant > div > .item-info`)
 - #101497 (⬆️ rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-07 00:35:54 +00:00
Joshua Nelson
4856affd90 Make HandleCycleError an enum instead of a macro-generated closure
- Add a `HandleCycleError` enum to rustc_query_system, along with a `handle_cycle_error` function
- Move `Value` to rustc_query_system, so `handle_cycle_error` can use it
- Move the `Value` impls from rustc_query_impl to rustc_middle. This is necessary due to orphan rules.
2022-09-06 19:26:08 -05:00
bors
7babd1b099 Auto merge of #9421 - xphoniex:fix-#9420, r=giraffate
Suggest `unwrap_or_default` when closure returns `"".to_string`

Closes https://github.com/rust-lang/rust-clippy/issues/9420

changelog: [`unwrap_or_else_default`]: suggest `unwrap_or_default()` instead of `unwrap_or_else` with a closure that returns an empty `to_string`.
2022-09-06 23:44:38 +00:00
Yuki Okushi
6903a8493f
Rollup merge of #101497 - lnicola:rust-analyzer-2022-09-06, r=lnicola
⬆️ rust-analyzer

r? `@ghost`
2022-09-07 07:43:57 +09:00
Yuki Okushi
1bc6110fdf
Rollup merge of #101491 - notriddle:notriddle/sub-variant-div-item-info, r=GuillaumeGomez
rustdoc: remove outdated CSS `.sub-variant > div > .item-info`

This CSS still matches sometimes, as you can see in <https://doc.rust-lang.org/1.63.0/std/collections/enum.TryReserveErrorKind.html#variant.AllocError.fields>, but since nothing else is setting `margin-top`, putting it back to `initial` does nothing.

This selector was added here, but it was called `.stability` instead of `.item-info` at the time, probably as an override for the selector immediately above it that sets a negative margin:

2fd378b82b/src/librustdoc/html/static/rustdoc.css (L514-L522)

That negative margin was removed in 593d6d1cb1.
2022-09-07 07:43:57 +09:00
Yuki Okushi
cf41b38209
Rollup merge of #101488 - notriddle:notriddle/results-table, r=GuillaumeGomez
rustdoc: remove unused CSS `#results > table`

This code was added in 96ef2f8ab9 to improve rendering of the search results table, but results have not used a table since b615c0c854 switched it to rendering with `<div>` tags.
2022-09-07 07:43:56 +09:00
Yuki Okushi
f68d05cf00
Rollup merge of #101486 - asquared31415:invalid_repr_list, r=estebank
Add list of recognized repr attributes to the unrecognized repr error
2022-09-07 07:43:54 +09:00