about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-10-22Rollup merge of #103364 - notriddle:notriddle/toggles, r=jshaMatthias Krüger-10/+27
rustdoc: clean up rustdoc-toggle CSS
2022-10-22Rollup merge of #103359 - WaffleLapkin:drain_no_mut_qqq, r=scottmcmMatthias Krüger-3/+1
Remove incorrect comment in `Vec::drain` r? ``@scottmcm`` Turns out this comment wasn't correct for 6 years, since #34951, which switched from using `slice::IterMut` into using `slice::Iter`.
2022-10-22Rollup merge of #103351 - oli-obk:tilde_const_impls, r=fee1-deadMatthias Krüger-102/+119
Require Drop impls to have the same constness on its bounds as the bounds on the struct have r? ``@fee1-dead``
2022-10-22Rollup merge of #103341 - Rageking8:add-test-for-issue-97607, r=compiler-errorsMatthias Krüger-0/+12
Add test for issue 97607 Fixes #97607 r? ``@compiler-errors`` Not sure which UI test dir to put this under, kindly let me know of a better dir if necessary and I will change it. Thanks.
2022-10-22Rollup merge of #103340 - RalfJung:winconsole, r=thomccMatthias Krüger-5/+4
WinConsole::new is not actually fallible I just noticed this while reading the code for other reasons. r? ``@thomcc``
2022-10-22Rollup merge of #103339 - Rageking8:fix-some-typos, r=fee1-deadMatthias Krüger-6/+6
Fix some typos
2022-10-22Rollup merge of #103335 - SarthakSingh31:issue-89008, r=jackh726Matthias Krüger-36/+11
Replaced wrong test with the correct mcve Closes #89008. The old test was wrong and the compiler was [correctly raising an error](https://github.com/rust-lang/rust/issues/89008#issuecomment-1285128060). The bug in the issue was resolved at some point but due to the wrong test the issue was never closed. This pr replaces that test with the correct MCVE (made by ``@jackh726).`` The error raised by the bug changed between when the bug was posted (2021-09-08) and when the MCVE [was posted](https://github.com/rust-lang/rust/issues/89008#issuecomment-950110735) (2021-10-23). I ran them both through `nightly-2021-09-08` and they produce identical error messages. They also produce identical but different from before error messages when ran through `nightly-2021-10-23`. <details> <summary>Error message with <code>nightly-2021-09-08</code></summary> The code with the original bug report: ``` error[E0277]: the size for values of type `Repr` cannot be known at compilation time --> src/main.rs:23:43 | 23 | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` For more information about this error, try `rustc --explain E0277`. error: could not compile `test-234234` due to previous error ``` MVCE: ``` error[E0277]: the size for values of type `Repr` cannot be known at compilation time --> src/main.rs:30:43 | 30 | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` For more information about this error, try `rustc --explain E0277`. error: could not compile `test-234234` due to previous error ``` </details> <details> <summary>Error message with <code>nightly-2021-10-23</code></summary> The code with the original bug report: ``` error[E0271]: type mismatch resolving `<impl futures::Future as futures::Future>::Output == impl futures::Stream` --> src/main.rs:23:43 | 19 | type LineStream<'a, Repr> = impl Stream<Item = Repr>; | ------------------------ the expected opaque type ... 23 | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found struct `futures::stream::Empty` | = note: expected opaque type `impl futures::Stream` found struct `futures::stream::Empty<_>` error: could not find defining uses --> src/main.rs:19:33 | 19 | type LineStream<'a, Repr> = impl Stream<Item = Repr>; | ^^^^^^^^^^^^^^^^^^^^^^^^ For more information about this error, try `rustc --explain E0271`. error: could not compile `test-234234` due to 2 previous errors ``` MCVE: ``` error[E0271]: type mismatch resolving `<impl Future as Future>::Output == impl Stream` --> src/main.rs:30:43 | 28 | type LineStream<'a, Repr> = impl Stream<Item = Repr>; | ------------------------ the expected opaque type 29 | type LineStreamFut<'a, Repr> = impl Future<Output = Self::LineStream<'a, Repr>>; 30 | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found struct `Empty` | = note: expected opaque type `impl Stream` found struct `Empty<_>` error: could not find defining uses --> src/main.rs:28:33 | 28 | type LineStream<'a, Repr> = impl Stream<Item = Repr>; | ^^^^^^^^^^^^^^^^^^^^^^^^ For more information about this error, try `rustc --explain E0271`. error: could not compile `test-234234` due to 2 previous errors ``` </details>
2022-10-22Rollup merge of #102635 - lcnr:incoherent_auto_trait_objects, r=jackh726Matthias Krüger-0/+113
make `order_dependent_trait_objects` show up in future-breakage reports tried to change it to a hard error in #102474 but breaking the more than 1000 dependents of `traitobject` doesn't feel great :sweat_smile: This lint has existed since more than 3 years now and the way this is currently implemented is buggy and will break with #102472. imo we should upgrade it to also report for dependencies and maybe also backport this to beta. Then after maybe 2-3 stable versions I would like to finally convert this lint to a hard error.
2022-10-21Auto merge of #101077 - sunshowers:signal-mask-inherit, r=sunshowersbors-79/+143
Change process spawning to inherit the parent's signal mask by default Previously, the signal mask was always reset when a child process is started. This breaks tools like `nohup` which expect `SIGHUP` to be blocked for all transitive processes. With this change, the default behavior changes to inherit the signal mask. This also changes the signal disposition for `SIGPIPE` to only be changed if the `#[unix_sigpipe]` attribute isn't set.
2022-10-21rustdoc: prevent method summary margin from being applied to docblocksMichael Howell-2/+25
2022-10-21rustdoc: merge identical CSS blocksMichael Howell-8/+2
2022-10-21Remove incorrect comment in `Vec::drain`Maybe Waffle-3/+1
2022-10-21Auto merge of #98450 - lqd:doc-metadata, r=lqd,GuillaumeGomezbors-14/+111
Remove more attributes from metadata A lot of the attributes that are currently stored in the metadata aren't used at all. The biggest metadata usage comes from the doc attributes currently but they are needed by rustdoc so we only removed the ones that cannot be used in downstream crates (doc comments on private items). r? `@ghost`
2022-10-21Require Drop impls to have the same constness on its bounds as the bounds on ↵Oli Scherer-53/+116
the struct have
2022-10-21Remove needless special cases and dead codeOli Scherer-49/+3
2022-10-21Auto merge of #103344 - Dylan-DPC:rollup-d1rpfvx, r=Dylan-DPCbors-490/+617
Rollup of 6 pull requests Successful merges: - #102287 (Elaborate supertrait bounds when triggering `unused_must_use` on `impl Trait`) - #102922 (Filtering spans when emitting json) - #103051 (translation: doc comments with derives, subdiagnostic-less enum variants, more derive use) - #103111 (Account for hygiene in typo suggestions, and use them to point to shadowed names) - #103260 (Fixup a few tests needing asm support) - #103321 (rustdoc: improve appearance of source page navigation bar) Failed merges: - #103209 (Diagnostic derives: allow specifying multiple alternative suggestions) r? `@ghost` `@rustbot` modify labels: rollup
2022-10-21Rollup merge of #103321 - notriddle:notriddle/source-page-top-bar-layout, ↵Dylan DPC-52/+72
r=GuillaumeGomez rustdoc: improve appearance of source page navigation bar This commit changes things so that the search bar is exactly centered between the top of the page and the top of the source code content area. Preview: https://notriddle.com/notriddle-rustdoc-demos/source-page-header/src/std/lib.rs.html ## Before ![image](https://user-images.githubusercontent.com/1593513/197053420-02a64627-48ed-4bb6-9363-a1863d47b092.png) ## After ![image](https://user-images.githubusercontent.com/1593513/197053355-bd6149f9-0f5c-47da-aeb7-590b5eecb5da.png)
2022-10-21Rollup merge of #103260 - cuviper:needs-asm-support, r=fee1-deadDylan DPC-49/+44
Fixup a few tests needing asm support
2022-10-21Rollup merge of #103111 - cjgillot:shadow-label, r=estebankDylan DPC-32/+102
Account for hygiene in typo suggestions, and use them to point to shadowed names Fixes https://github.com/rust-lang/rust/issues/97459 r? `@estebank`
2022-10-21Rollup merge of #103051 - davidtwco:translation-tidying-up, r=compiler-errorsDylan DPC-238/+286
translation: doc comments with derives, subdiagnostic-less enum variants, more derive use - Adds support for `doc` attributes in the diagnostic derives so that documentation comments don't result in the derive failing. - Adds support for enum variants in the subdiagnostic derive to not actually correspond to an addition to a diagnostic. - Made use of the derive in more places in the `rustc_ast_lowering`, `rustc_ast_passes`, `rustc_lint`, `rustc_session`, `rustc_infer` - taking advantage of recent additions like eager subdiagnostics, multispan suggestions, etc. cc #100717
2022-10-21Rollup merge of #102922 - kper:bugfix/102902-filtering-json, r=oli-obkDylan DPC-117/+81
Filtering spans when emitting json According to the issue #102902, we shouldn't emit spans which have an empty span and no suggested replacement.
2022-10-21Rollup merge of #102287 - compiler-errors:unused-must-use-also-supertrait, ↵Dylan DPC-2/+32
r=fee1-dead Elaborate supertrait bounds when triggering `unused_must_use` on `impl Trait` Given `impl Trait`, if one of its supertraits has a `#[must_use]`, then trigger the lint. This means that, for example, `-> impl ExactSizeIterator` also triggers the `must_use` on `trait Iterator`, which fixes #102183. This might need `@rust-lang/lang` sign-off, since it changes the behavior of the lint, so cc'ing them.
2022-10-21add test for issue 97607Rageking8-0/+12
2022-10-21WinConsole::new is not actually fallibleRalf Jung-5/+4
2022-10-21fix some typosRageking8-6/+6
2022-10-21Auto merge of #103310 - lcnr:rustc_hir_typeck, r=compiler-errorsbors-1154/+1252
move hir typeck into separate crate second part https://github.com/rust-lang/compiler-team/issues/529 I avoided pretty much anything that wasn't just a simple move + path adjustment. Left fixmes for methods which are at an odd place r? `@compiler-errors`
2022-10-21replaced wrong test with the correct mcveSarthak Singh-36/+11
2022-10-21Auto merge of #103308 - sunfishcode:sunfishcode/wasi-io-safety, r=joshtriplettbors-2/+2
Mark `std::os::wasi::io::AsFd` etc. as stable. io_safety was stabilized in Rust 1.63, so mark the io_safety exports in `std::os::wasi::io` as stable. Fixes #103306.
2022-10-20Add UI regression test when querying visibility of generic parameterGuillaume Gomez-0/+9
2022-10-20Add ui test to ensure attributes generated from macros are kept as expectedGuillaume Gomez-0/+35
2022-10-20Add code comments and documentationGuillaume Gomez-0/+16
2022-10-20Remove doc comments only for private items or some specific doc commentsGuillaume Gomez-4/+27
2022-10-20Add missing @local_only on attributesGuillaume Gomez-10/+24
2022-10-20Change process spawning to inherit the parent's signal mask by defaultRain-79/+143
Previously, the signal mask is always reset when a child process is started. This breaks tools like `nohup` which expect `SIGHUP` to be blocked. With this change, the default behavior changes to inherit the signal mask. This also changes the signal disposition for `SIGPIPE` to only be changed if the `#[unix_sigpipe]` attribute isn't set.
2022-10-20update doc linkslcnr-3/+2
2022-10-20Make the whole `std::os::wasi::io` module stable.Dan Gohman-1/+1
2022-10-20Auto merge of #103322 - matthiaskrgr:rollup-m9zgpft, r=matthiaskrgrbors-130/+235
Rollup of 9 pull requests Successful merges: - #103221 (Fix `SelfVisitor::is_self_ty` ICE) - #103230 (Clarify startup) - #103281 (Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output) - #103288 (Fixed docs typo in `library/std/src/time.rs`) - #103296 (+/- shortcut now only expand/collapse, not both) - #103297 (fix typo) - #103313 (Don't label `src/test` tests as `A-testsuite`) - #103315 (interpret: remove an incorrect assertion) - #103319 (Improve "`~const` is not allowed here" message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-20Rollup merge of #103319 - fee1-dead-contrib:improve_tilde_const_msg, r=oli-obkMatthias Krüger-25/+85
Improve "`~const` is not allowed here" message r? `@oli-obk`
2022-10-20Rollup merge of #103315 - RalfJung:interpret-switchint-ice, r=bjorn3Matthias Krüger-1/+0
interpret: remove an incorrect assertion This fixes an ICE in Miri, [reported](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/SwitchInt.20with.20no.20targets.3F) by `@saethlin.` The faulty assertion was introduced by https://github.com/rust-lang/rust/commit/432535da2b5144d467056efcfa6864d35ba2de0f, when a previously correct assertion checking that the `otherwise` target exists got replaced by this assertion checking that at least one more target beyond `otherwise` exists. Sadly we don't have a small reproducer so I don't think we can easily add a testcase.
2022-10-20Rollup merge of #103313 - compiler-errors:no-test, r=jyn514Matthias Krüger-1/+0
Don't label `src/test` tests as `A-testsuite` Nearly every PR modifies `src/test`; A-testsuite is meant to be for things affecting the test runners themselves. cc https://github.com/rust-lang/rust/pull/103204#discussion_r1000868781 r? `@jyn514`
2022-10-20Rollup merge of #103297 - catandcoder:master, r=JohnTitorMatthias Krüger-1/+1
fix typo
2022-10-20Rollup merge of #103296 - GuillaumeGomez:collapse-expand-shortcuts, r=notriddleMatthias Krüger-29/+48
+/- shortcut now only expand/collapse, not both Fixes https://github.com/rust-lang/rust/issues/102772. r? ```@notriddle```
2022-10-20Rollup merge of #103288 - johnmatthiggins:master, r=thomccMatthias Krüger-1/+1
Fixed docs typo in `library/std/src/time.rs` * Changed comment from `Previous rust versions panicked when self was earlier than the current time.` to `Previous rust versions panicked when the current time was earlier than self.` * Resolves #103282.
2022-10-20Rollup merge of #103281 - thomcc:long-overdue, r=jyn514Matthias Krüger-24/+31
Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output This is essentially a documentation-only change (although it does touch code in an irrelevant way).
2022-10-20Rollup merge of #103230 - nnethercote:clarify-startup, r=jyn514Matthias Krüger-45/+50
Clarify startup A small follow-up to #102769. r? `@jyn514`
2022-10-20Rollup merge of #103221 - TaKO8Ki:fix-103202, r=oli-obkMatthias Krüger-3/+19
Fix `SelfVisitor::is_self_ty` ICE Fixes #103202
2022-10-20rustdoc: improve appearance of source page navigation barMichael Howell-52/+72
This commit changes things so that the search bar is exactly centered between the top of the page and the top of the source code content area.
2022-10-20Improve "`~const` is not allowed here" messageDeadbeef-25/+85
2022-10-20Elaborate supertrait bounds when triggering unused_must_use on impl TraitMichael Goulet-2/+32
2022-10-20interpret: remove an incorrect assertionRalf Jung-1/+0