- 25 5月, 2022 11 次提交
-
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #93966 (document expectations for Waker::wake) - #97266 (Make weird name lints trigger behind cfg_attr) - #97355 (Remove unused brush image) - #97358 (Update minifier-rs version to 0.1.0) - #97363 (Fix a small mistake in `SliceIndex`'s documentation) - #97364 (Fix weird indentation in continue_keyword docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Yuki Okushi 提交于
Fix weird indentation in continue_keyword docs This format was causing every line in the code examples to have a space at the start.
-
由 Yuki Okushi 提交于
Fix a small mistake in `SliceIndex`'s documentation Originally, it said "`get_(mut_)unchecked`," but the method's actual name is `get_unchecked_mut`.
-
由 Yuki Okushi 提交于
Update minifier-rs version to 0.1.0 It fixes a bug with regex parsing. r? `@notriddle`
-
由 Yuki Okushi 提交于
Remove unused brush image r? `@notriddle`
-
由 Yuki Okushi 提交于
Make weird name lints trigger behind cfg_attr The weird name lints (`unknown_lints`, `renamed_and_removed_lints`), the lints that lint the linting, were previously not firing for lint level declarations behind `cfg_attr`, as they were only running before expansion. Now, this will give a `unknown_lints` warning: ```Rust #[cfg_attr(all(), allow(this_lint_does_not_exist))] fn foo() {} ``` Lint level declarations behind a `cfg_attr` whose condition is not applying are still ignored. So this still won't give a warning: ```Rust #[cfg_attr(any(), allow(this_lint_does_not_exist))] fn foo() {} ``` Furthermore, this PR also makes the weird name lints respect level delcarations for *them* that were hidden by `cfg_attr`, making them consistent to other lints. So this will now not issue a warning: ```Rust #[cfg_attr(all(), allow(unknown_lints))] mod foo { #[allow(does_not_exist)] fn foo() { } } ``` Fixes #97094
-
由 Yuki Okushi 提交于
document expectations for Waker::wake fixes #93961 Opened PR for a discussion on the precise wording.
-
由 bors 提交于
update Miri Fixes https://github.com/rust-lang/rust/issues/97348 r? `@ghost` Cc `@rust-lang/miri`
-
由 Michael Howell 提交于
This format was causing every line in the code examples to have a space at the start.
-
由 wackbyte 提交于
-
由 bors 提交于
Rollup of 4 pull requests Successful merges: - #97288 (Lifetime variance fixes for rustdoc) - #97298 (Parse expression after `else` as a condition if followed by `{`) - #97308 (Stabilize `cell_filter_map`) - #97321 (explain how to turn integers into fn ptrs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
- 24 5月, 2022 29 次提交
-
-
由 Ralf Jung 提交于
-
由 est31 提交于
Previously, we were emitting weird name lints (for renamed or unknown lints) before expansion, most importantly before cfg expansion. This meant that the weird name lints would not fire for lint attributes hidden inside cfg_attr. The same applied for lint level specifications of those lints. By moving the lints for the lint names to the post-expansion phase, these issues are resolved.
-
由 Guillaume Gomez 提交于
-
由 Dylan DPC 提交于
explain how to turn integers into fn ptrs (with an intermediate raw ptr, not a direct transmute) Direct int2ptr transmute, under the semantics I am imagining, will produce a ptr with "invalid" provenance that is invalid to deref or call. We cannot give it the same semantics as int2ptr casts since those do [something complicated](https://www.ralfj.de/blog/2022/04/11/provenance-exposed.html). To my great surprise, that is already what the example in the `transmute` docs does. :) I still added a comment to say that that part is important, and I added a section explicitly talking about this to the `fn()` type docs. With https://github.com/rust-lang/miri/pull/2151, Miri will start complaining about direct int-to-fnptr transmutes (in the sense that it is UB to call the resulting pointer).
-
由 Dylan DPC 提交于
Stabilize `cell_filter_map` FCP has been completed: https://github.com/rust-lang/rust/issues/81061#issuecomment-1081806326 Closes #81061
-
由 Dylan DPC 提交于
Parse expression after `else` as a condition if followed by `{` Fixes #49361. Two things: 1. This wording needs help. I can never find a natural/intuitive phrasing when I write diagnostics
😅 2. Do we even want to show the "wrap in braces" case? I would assume most of the time the "add an `if`" case is the right one. -
由 Dylan DPC 提交于
Lifetime variance fixes for rustdoc #97287 migrates rustc to a `Ty` type that is invariant over its lifetime `'tcx`, so I need to fix a bunch of places that assume that `Ty<'a>` and `Ty<'b>` can be unified by shortening both to some common lifetime. This is doable, since everything is already `'tcx`, so all this PR does is be a bit more explicit that elided lifetimes are actually `'tcx`. Split out from #97287 so the rustdoc team can review independently.
-
由 Guillaume Gomez 提交于
-
由 bors 提交于
Split out the various responsibilities of `rustc_metadata::Lazy` `Lazy<T>` actually acts like three different types -- a pointer in the crate metadata to a single value, a pointer to a list/array of values, and an indexable pointer of a list of values (a table). We currently overload `Lazy<T>` to work differently than `Lazy<[T]>` and the same for `Lazy<Table<I, T>>`. All is well with some helper adapter traits such as [`LazyQueryDecodable`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/decoder/trait.LazyQueryDecodable.html) and [`EncodeContentsForLazy`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/encoder/trait.EncodeContentsForLazy.html). Well, changes in #97287 that make `Lazy` work with the now invariant lifetime `'tcx` make these adapters fall apart because of coherence reasons. So we split out these three types and rework some of the helper traits so it's both 1. more clear to understand, and 2. compatible with the changes later in that PR. Split out from #97287 so it can be reviewed separately, since this PR stands on its own.
-
由 bors 提交于
Avoid double binding of subdiagnostics inside `#[derive(SessionDiagnostic)]` r? `@davidtwco`
-
由 bors 提交于
Refactor call terminator to always include destination place In #71117 people seemed to agree that call terminators should always have a destination place, even if the call was guaranteed to diverge. This implements that. Unsurprisingly, the diff touches a lot of code, but thankfully I had to do almost nothing interesting. The only interesting thing came up in const prop, where the stack frame having no return place was also used to indicate that the layout could not be computed (or similar). I replaced this with a ZST allocation, which should continue to do the right things. cc `@RalfJung` `@EddyB` who were involved in the original conversation r? rust-lang/mir-opt
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97240 (Typo suggestion for a variable with a name similar to struct fields) - #97289 (Lifetime variance fixes for clippy) - #97290 (Turn on `fast_submodules` unconditionally) - #97336 (typo) - #97337 (Fix stabilization version of `Ipv6Addr::to_ipv4_mapped`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Michael Goulet 提交于
-
由 Yuki Okushi 提交于
Fix stabilization version of `Ipv6Addr::to_ipv4_mapped`
-
由 Yuki Okushi 提交于
typo
-
由 Yuki Okushi 提交于
Turn on `fast_submodules` unconditionally I don't know why anyone would turn this off; doing so makes builds much slower (nearly a 60x slowdown according to #49057). Remove the option to do so, which makes bootstrap a little easier to maintain. Bootstrap continues to allow you to manage submodules manually by setting `submodules = false`.
-
由 Yuki Okushi 提交于
Lifetime variance fixes for clippy #97287 migrates rustc to a `Ty` type that is invariant over its lifetime `'tcx`, so I need to fix a bunch of places that assume that `Ty<'a>` and `Ty<'b>` can be shortened to some common lifetime. This is doable, since everything is already `'tcx`, so all this PR does is be a bit more explicit that elided lifetimes are actually `'tcx`. Split out from #97287 so the clippy team can review independently.
-
由 Yuki Okushi 提交于
Typo suggestion for a variable with a name similar to struct fields closes #97133
-
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 Joshua Nelson 提交于
I don't know why anyone would turn this off; doing so makes builds much slower (nearly a 60x slowdown according to #49057). Remove the option to do so, which makes bootstrap a little easier to maintain. Bootstrap continues to allow you to manage submodules manually by setting `submodules = false`.
-
由 bors 提交于
Disallow compare-mode=nll test differences This ensures that new tests don't get added not as revisions if they have nll output. This will make stabilization PR easier. r? `@Mark-Simulacrum`
-
由 Tobias Bucher 提交于
-
由 Jakob Degen 提交于
-
由 Tshepang Lekhonkhobe 提交于
-
由 bors 提交于
Update `rustc` PGO benchmark list I noticed that the `rustc` PGO crates do not contain any crate that would stress the trait system. I tried adding and removing various crates to the PGO benchmark list here. Here's what I found: - Removing [`externs` and `match-stress`](https://perf.rust-lang.org/compare.html?start=c0672870491e84362f76ddecd50fa229f9b06dff&end=b056963e0324fa76c721d79f12658a64cfa4cb5e&stat=instructions:u) regresses these two benchmarks by up to 15 % and removing them doesn't improve anything else, so we should keep them. - Adding [`keccak`](https://perf.rust-lang.org/compare.html?start=52cc7795245347500ddf6dc959cf58a7abe2d935&end=6fd27b23fd7860c79752479173b4a1b877cba490) regresses `diesel`, otherwise it doesn't do much. - Adding [`tt-muncher`](https://perf.rust-lang.org/compare.html?start=c0672870491e84362f76ddecd50fa229f9b06dff&end=2ab5994d9cdfb098344895f7d8d5aee3cf3d6eff&stat=instructions:u) improves it very slightly, not worth it to include it IMO. - Adding just [`diesel`](https://perf.rust-lang.org/compare.html?start=00755e4ca68f12ed200e921276788ab19975e85f&end=cd37706ad459ee8ddfda4631be71120cb7eda19d) improves it by up to 1.5 % and others crate slightly, but regresses `bitmaps`. - Adding [`bitmaps`](https://perf.rust-lang.org/compare.html?start=67a9bcb31b85e87cc8bb327022632e48a0ca64a8&end=0cd80ba74425e6614cd52c4ea2bf6b0191c6dbc4&stat=instructions:u) improves both it and diesel, no other regressions. - Adding [both](https://perf.rust-lang.org/compare.html?start=77972d2d0134fb597249b3b64dcf9510a790c34e&end=f968d7af511d750db96cfdc04f844fb017c079ce) `bitmaps` and `diesel` produces quite nice improvements and almost no regressions. - Adding [ucd](https://perf.rust-lang.org/compare.html?start=b5caa5a8421f84cb7664f999b7635801bcf3f96a&end=327cc09917311f65cf427e6c0bf5f7424af9fd05&stat=instructions:u) did not have a large effect on primary benchmarks. r? `@lqd`
-
由 bors 提交于
rustdoc: Remove fields_stripped fields (and equivalents) Fixes #90588. r? `@camelid`
-
由 Ralf Jung 提交于
-