- 01 2月, 2022 24 次提交
-
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #91343 (Fix suggestion to slice if scrutinee is a `Result` or `Option`) - #93019 (If an integer is entered with an upper-case base prefix (0Xbeef, 0O755, 0B1010), suggest to make it lowercase) - #93090 (`impl Display for io::ErrorKind`) - #93456 (Remove an unnecessary transmute from opaque::Encoder) - #93492 (Hide failed command unless in verbose mode) - #93504 (kmc-solid: Increase the default stack size) - #93513 (Allow any pretty printed line to have at least 60 chars) - #93532 (Update books) - #93533 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Eric Huss 提交于
Update cargo 10 commits in 1c034752de0df744fcd7788fcbca158830b8bf85..25fcb135d02ea897ce894b67ae021f48107d522b 2022-01-25 22:36:53 +0000 to 2022-02-01 01:32:48 +0000 - fix(install): Keep v1 file formatting the same (rust-lang/cargo#10349) - fix(vendor): Use tables for sample config (rust-lang/cargo#10348) - Add bash completion for `cargo clippy` (rust-lang/cargo#10347) - Do not ignore `--features` when `--all-features` is present (rust-lang/cargo#10337) - test: Fix compatibilty with new toml_edit (rust-lang/cargo#10350) - extra-link-arg-etc: support all link types (credit `@davidhewitt)` (rust-lang/cargo#10274) - Make clippy happy (rust-lang/cargo#10340) - Update publishing link for semver rules. (rust-lang/cargo#10338) - Normalize --path when install bin outside current workspace (rust-lang/cargo#10335) - Bump clap to v3.0.13 (rust-lang/cargo#10336)
-
由 Eric Huss 提交于
-
由 Eric Huss 提交于
Update books ## nomicon 4 commits in 66d097d3d80e8f88c288c6879c7c2b909ecf8ad4..9493715a6280a1f74be759c7e1ef9999b5d13e6f 2022-01-05 05:45:21 +0900 to 2022-01-27 19:00:32 -0800 - send-and-sync: it's -> its (rust-lang/nomicon#332) - Clarify the HRTB chapter (rust-lang/nomicon#330) - Clarify repr(transparent) in other-reprs (rust-lang/nomicon#329) - Make C code more recognizably C (rust-lang/nomicon#331) ## reference 10 commits in 4dee6eb63d728ffb9e7a2ed443e9ada9275c69d2..411c2f0d5cebf48453ae2d136ad0c5e611d39aec 2022-01-18 09:26:33 -0800 to 2022-01-30 12:46:37 -0800 - paths.md: update comments of `Canoical paths` section (rust-lang/reference#1146) - Add undocumented outer attributes above StructExpr fields (rust-lang/reference#1150) - (rust-lang/reference#1148) - Fix micro typo in async/unsafe function docs (rust-lang/reference#1145) - Note difference in CTFE timing between associated and free constants (rust-lang/reference#1120) - Update the Preludes chapter for the 2021 edition changes to the standard library prelude (rust-lang/reference#1136) - Link to associated constants section rather than glossary (rust-lang/reference#1141) - functions.md: replace `argument` with `parameter` (rust-lang/reference#1142) - Improve rendering (rust-lang/reference#1143) - (minor) link references and replace wording by syntax definition (rust-lang/reference#1139) ## book 24 commits in f17df27fc14696912c48b8b7a7a8fa49e648088d..98904efaa4fc968db8ff59cf2744d9f7ed158166 2022-01-18 17:46:28 -0500 to 2022-01-29 21:22:31 -0500 - Snapshot of chapter 17 for nostarch - Remove the section on object safety. - Don't put a hyphen in 'object safe'. Fixes rust-lang/book#2960. - Clarify that add_text on Post will work in any state. Fixes rust-lang/book#2159. - Fix incorrect descriptions of what the code is doing. Fixes rust-lang/book#2745. - Fix link style and inclusion in print - Snapshot of ch16 for nostarch - Cut discussion of threading models Rust *doesn't* support. - Update a quote of compiler output - Move transfers between threads, not shares. Fixes rust-lang/book#2843. - Ch20-02 Remove reference to a long-gone "trick" - Clarify translations a bit - Added a mention to the translations appendix - Fix listing number from `8-5` to `9-5` in `ch09-02` - Moving example into blockquote means it can't be extracted to a listing project - Move a link to the end with all the other links - Propagate edits back to ch 9 - Responding to edits in chapter 9 - Update to 1.58 - Snapshot of chapter 15 for nostarch - Change 'only difference' to 'main difference'. Fixes rust-lang/book#1581. - Add a back reference to tuple struct syntax. Fixes rust-lang/book#1916 - Add a link to a section reference - Remove an outdated example that says it won't compile but it does ## rustc-dev-guide 2 commits in 78dd6a4684cf8d6b72275fab6d0429ea40b66338..8763adb62c712df69b1d39ea3e692b6d696cc4d9 2022-01-18 14:44:26 -0300 to 2022-01-26 14:01:40 -0800 - git.md: Expanded a note to try to stress what you need to do if you're playing - Clarify that r? works in comments. ## embedded-book 1 commits in 8c395bdd8073deb20ca67e1ed4b14a3a7e315a37..d5fc1bce3f8eb398f9c25f1b15e0257d7537cd41 2021-11-14 11:38:31 +0000 to 2022-01-24 07:13:31 +0000 - Add link to Japanese translation (rust-embedded/book#311)
-
由 Eric Huss 提交于
-
由 Eric Huss 提交于
Allow any pretty printed line to have at least 60 chars Follow-up to #93155. The rustc AST pretty printer has a tendency to get stuck in "vertical smear mode" when formatting highly nested code, where it puts a linebreak at *every possible* linebreak opportunity once the indentation goes beyond the pretty printer's target line width: ```rust ... ((&([("test" as &str)] as [&str; 1]) as &[&str; 1]), (&([] as [ArgumentV1; 0]) as &[ArgumentV1; 0])) ... ``` ```rust ... [(1 as i32), (2 as i32), (3 as i32)] as [i32; 3] ... ``` This is less common after #93155 because that PR greatly reduced the total amount of indentation, but the "vertical smear mode" failure mode is still just as present when you have deeply nested modules, functions, or trait impls, such as in the case of macro-expanded code from `-Zunpretty=expanded`. Vertical smear mode is never the best way to format highly indented code though. It does not prevent the target line width from being exceeded, and it produces output that is less readable than just a longer line. This PR makes the pretty printing algorithm allow a minimum of 60 chars on every line independent of indentation. So as code gets more indented, the right margin eventually recedes to make room for formatting without vertical smear. ```console ├─────────────────────────────────────┤ ├─────────────────────────────────────┤ ├─────────────────────────────────────┤ ├───────────────────────────────────┤ ├─────────────────────────────────┤ ├───────────────────────────────┤ ├─────────────────────────────┤ ├───────────────────────────┤ ├───────────────────────────┤ ├───────────────────────────┤ ├───────────────────────────┤ ├───────────────────────────┤ ├─────────────────────────────┤ ├───────────────────────────────┤ ├─────────────────────────────────┤ ├───────────────────────────────────┤ ├─────────────────────────────────────┤ ```
-
由 Eric Huss 提交于
kmc-solid: Increase the default stack size This PR increases the default minimum stack size on the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets to 64KiB (Arm) and 128KiB (AArch64). This value was chosen as a middle ground between supporting a relatively complex program (e.g., an application using a full-fledged off-the-shelf web server framework) with no additional configuration and minimizing resource consumption for the embedded platform that doesn't support lazily-allocated pages nor over-commitment (i.e., wasted stack spaces are wasted physical memory). If the need arises, the users can always set the `RUST_MIN_STACK` environmental variable to override the default stack size or use the platform API directly.
-
由 Eric Huss 提交于
Hide failed command unless in verbose mode This is particularly intended for invoking compiletest; the command line there is long (3,350 characters on my system) and takes up a lot of screen real estate for little benefit to the majority of those running bootstrap. This moves printing it to verbose mode (-v must be passed) which means that it's still possible to access when needed for debugging. The main downside is that CI logs will by-default become less usable for debugging (particularly) spurious failures, but it is pretty rare for us to really need the information there -- it's usually fairly obvious what is being run with a little investigation. r? `@ehuss` as you've done some of the spurious failure investigations, so can (hopefully) confirm my intuition that this won't seriously hinder them.
-
由 Eric Huss 提交于
Remove an unnecessary transmute from opaque::Encoder
-
由 Eric Huss 提交于
`impl Display for io::ErrorKind` This avoids having to convert from `ErrorKind` to `Error` just to print the error message.
-
由 Eric Huss 提交于
If an integer is entered with an upper-case base prefix (0Xbeef, 0O755, 0B1010), suggest to make it lowercase The current error for this case isn't really great, it just complains about the whole thing past the `0` being an invalid suffix.
-
由 Eric Huss 提交于
Fix suggestion to slice if scrutinee is a `Result` or `Option` Fixes #91328.
-
由 bors 提交于
rustc_errors: only box the `diagnostic` field in `DiagnosticBuilder`. I happened to need to do the first change (replacing `allow_suggestions` with equivalent functionality on `Diagnostic` itself) as part of a larger change, and noticed that there's only two fields left in `DiagnosticBuilderInner`. So with this PR, instead of a single pointer, `DiagnosticBuilder` is two pointers, which should work just as well for passing *it* by value (and may even work better wrt some operations, though probably not by much). But anything that was already taking advantage of `DiagnosticBuilder` being a single pointer, and wrapping it further (e.g. `Result<T, DiagnosticBuilder>` w/ non-ZST `T`), ~~will probably see a slowdown~~, so I want to do a perf run before even trying to propose this.
-
由 bors 提交于
Check that `#[rustc_must_implement_one_of]` is applied to a trait `#[rustc_must_implement_one_of]` only makes sense when applied to a trait, so it's sensible to emit an error otherwise.
-
由 bors 提交于
Check the number of arguments first in `is_recursive_call`
-
由 Fabian Wolff 提交于
-
由 David Tolnay 提交于
-
由 David Tolnay 提交于
-
由 David Tolnay 提交于
-
由 Fabian Wolff 提交于
-
由 Fabian Wolff 提交于
-
由 bors 提交于
Move overlap_mode into trait level attribute r? `@nikomatsakis` Should fix some performance regressions noted on https://github.com/rust-lang/rust/pull/93175
-
由 5225225 提交于
-
由 bjorn3 提交于
-
- 31 1月, 2022 16 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 bors 提交于
Store def_id_to_hir_id as variant in hir_owner. If hir_owner is Owner(_), the LocalDefId is pointing to an owner, so the ItemLocalId is 0. If the HIR node does not exist, we store Phantom. Otherwise, we store the HirId associated to the LocalDefId. Related to #89278 r? `@oli-obk`
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #90277 (Improve terminology around "after typeck") - #92918 (Allow eliding GATs in expression position) - #93039 (Don't suggest inaccessible fields) - #93155 (Switch pretty printer to block-based indentation) - #93214 (Respect doc(hidden) when suggesting available fields) - #93347 (Make `char::DecodeUtf16::size_hist` more precise) - #93392 (Clarify documentation on char::MAX) - #93444 (Fix some CSS warnings and errors from VS Code) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Tomoaki Kawada 提交于
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #93395 (Improve suggestion for escaping reserved keywords) - #93403 (review the total_cmp documentation) - #93461 (Accommodate yield points in the format_args expansion) - #93462 (Document `SystemTime` platform precision) - #93471 (unix: Use metadata for `DirEntry::file_type` fallback) - #93480 (Remove deprecated and unstable slice_partition_at_index functions) - #93485 (core: Remove some redundant {}s from the sorting code) - #93494 (kmc-solid: Inherit the calling task's base priority in `Thread::new`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
kmc-solid: Inherit the calling task's base priority in `Thread::new` This PR fixes the initial priority calculation of spawned threads on the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. Fixes a spawned task (an RTOS object on top of which threads are implemented for this target; unrelated to async tasks) getting an unexpectedly higher priority if it's spawned by a task whose priority is temporarily boosted by a priority-protection mutex.
-
由 Matthias Krüger 提交于
core: Remove some redundant {}s from the sorting code
-
由 Matthias Krüger 提交于
Remove deprecated and unstable slice_partition_at_index functions They have been deprecated since commit 01ac5a97 which was part of the 1.49.0 release, so from the point of nightly, 11 releases ago.
-
由 Matthias Krüger 提交于
unix: Use metadata for `DirEntry::file_type` fallback When `DirEntry::file_type` fails to match a known `d_type`, we should fall back to `DirEntry::metadata` instead of a bare `lstat`, because this is faster and more reliable on targets with `fstatat`.
-
由 Matthias Krüger 提交于
Document `SystemTime` platform precision Fixes #88822
-
由 Matthias Krüger 提交于
Accommodate yield points in the format_args expansion Fixes #93274. For the case `println!("{} {:?}", "", async {}.await)` in the issue, the expansion before: ```rust ::std::io::_print( ::core::fmt::Arguments::new_v1( &["", " ", "\n"], &[ ::core::fmt::ArgumentV1::new(&"", ::core::fmt::Display::fmt), ::core::fmt::ArgumentV1::new(&async {}.await, ::core::fmt::Debug::fmt), ], ), ); ``` After: ```rust ::std::io::_print( ::core::fmt::Arguments::new_v1( &["", " ", "\n"], &match (&"", &async {}.await) { _args => [ ::core::fmt::ArgumentV1::new(_args.0, ::core::fmt::Display::fmt), ::core::fmt::ArgumentV1::new(_args.1, ::core::fmt::Debug::fmt), ], }, ), ); ```
-
由 Matthias Krüger 提交于
review the total_cmp documentation The documentation has been restructured to split out a brief summary paragraph out from the following elaborating paragraphs. I also attempted my hand at wording improvements and adding articles where I felt them missing, but being non-native english speaker these may need more thorough review. cc https://github.com/rust-lang/rust/issues/72599
-
由 Matthias Krüger 提交于
Improve suggestion for escaping reserved keywords r? `@davidtwco`
-
由 Matthias Krüger 提交于
Fix some CSS warnings and errors from VS Code There's no such CSS rule as `box-shadow-color`, so I instead copied the whole `box-shadow` property to each rule to make it actually apply. r? `@jsha`
-
由 Matthias Krüger 提交于
Clarify documentation on char::MAX As mentioned in https://github.com/rust-lang/rust/issues/91836#issuecomment-994106874, the documentation on `char::MAX` is not quite correct – USVs are not "only ones within a certain range", they are code points _outside_ a certain range. I have corrected this and given the actual numbers as there is no reason to hide them.
-