Commit Graph

199717 Commits

Author SHA1 Message Date
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
Yuki Okushi
1d49dcec10
Rollup merge of #101484 - oli-obk:no_zst, r=eddyb
Remove dead broken code from const zst handling in backends

cc `@RalfJung`

found by `@eddyb` in https://github.com/rust-lang/rust/pull/98957#discussion_r963744605
2022-09-07 07:43:54 +09:00
Yuki Okushi
923dae5c9f
Rollup merge of #101481 - ChrisDenton:uwp-fix, r=thomcc
Fix compile errors for uwp-windows-msvc targets

Fixes #101480
2022-09-07 07:43:53 +09:00
Yuki Okushi
a12e29af92
Rollup merge of #101468 - spastorino:fix-ice-rpit-hrtb-without-dyn, r=cjgillot
fix RPIT ICE for implicit HRTB when missing dyn

Closes #101297

r? `@cjgillot`

cc `@nikomatsakis`
2022-09-07 07:43:52 +09:00
Yuki Okushi
631aed82bc
Rollup merge of #101451 - cjgillot:test-100521, r=TaKO8Ki
Add incremental test for changing struct name in assoc type.

The ICE appears on beta and is fixed on nightly.

Fixes #100521
2022-09-07 07:43:51 +09:00
Michael Howell
71b40b9dd3 rustdoc: remove unused CSS #main-content > .since
I missed one from 096efc29f1.
2022-09-06 15:34:13 -07:00
bors
699bfa882b Auto merge of #100404 - BelovDV:linker_group, r=petrochenkov
change stdlib circular dependencies handling

Remove group_start and group_end, add dependencies to symbols.o
Implements the suggestion from https://github.com/rust-lang/rust/pull/85805#discussion_r666249351
r? `@petrochenkov`
2022-09-06 22:06:54 +00:00
Nikita Tomashevich
3d70be7240
Whoops forgot a space 2022-09-06 22:55:49 +03:00
Nikita Tomashevich
ee74f925f5
Replace manual impl with a derive macro as multipart suggestions are now supported by them 2022-09-06 22:18:56 +03:00
Takayuki Maeda
7ac124803f do not suggest a semicolon for a macro without ! 2022-09-07 03:59:47 +09:00
Camille GILLOT
5d94d42485 Shrink span for bindings with subpatterns. 2022-09-06 20:57:44 +02:00
Chris Denton
b2e4f9dcb3
Open a BCrypt algorithm handle 2022-09-06 19:29:58 +01:00
Jason Newcomb
0126f7f3a9 Allow lint passes to be bound by TyCtxt 2022-09-06 14:23:03 -04:00
Santiago Pastorino
2166a36245
Pass ImplTraitContext as &mut to avoid the need of ImplTraitContext::reborrow later on 2022-09-06 15:22:16 -03:00
Laurențiu Nicola
d0588007a9 ⬆️ rust-analyzer 2022-09-06 21:20:49 +03:00
bors
78a891d364 Auto merge of #101485 - GuillaumeGomez:rollup-68p9di4, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #101357 (Include enum path in variant suggestion)
 - #101434 (Update `SessionDiagnostic::into_diagnostic` to take `Handler` instead of `ParseSess`)
 - #101445 (Suggest introducing an explicit lifetime if it does not exist)
 - #101457 (Recover from using `;` as separator between fields)
 - #101462 (Rustdoc-Json: Store Variant Fields as their own item.)
 - #101471 (Report number of delayed bugs properly with `-Ztreat-err-as-bug`)
 - #101473 (Add more size assertions for MIR types.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-06 18:10:14 +00:00
bjorn3
d8b382105f
Compile spin_loop_hint as pause on x86 even without sse2 enabled
The x86 `pause` instruction was introduced with sse2, but because it is encoded as `rep nop`, it works just fine on cpu's without sse2 support. It just doesn't do anything.
2022-09-06 20:08:04 +02:00
Takayuki Maeda
1e384423a9 suggest adding array lengths to references to arrays 2022-09-07 02:37:18 +09:00
Michael Howell
e1f5d4f23f 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 in 2fd378b82b (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.
That negative margin was removed in 593d6d1cb1.
2022-09-06 10:36:51 -07:00
Michael Howell
4282802706 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-06 09:15:41 -07:00
Matt Hamrick
056d6338c8
Update src/doc/rustc/src/platform-support/fuchsia.md
Co-authored-by: Andrew Pollack <andrewpkq@gmail.com>
2022-09-06 09:04:28 -07:00
IQuant
cb7ad9e548
Slightly more concise comment
Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2022-09-06 18:41:09 +03:00
Nikita Tomashevich
59c567296a
Use untranslated messages for now 2022-09-06 18:41:09 +03:00
Nikita Tomashevich
e750d7faa7
Remove a comment and use IntoDiagnosticArg instead of add_to() where feasible 2022-09-06 18:41:08 +03:00
Nikita Tomashevich
3190522294
Address some comments 2022-09-06 18:41:08 +03:00
Nikita Tomashevich
e0e9b21c78
Mugrate mismatched_static_lifetime.rs 2022-09-06 18:41:08 +03:00