-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 7 pull requests #120436
Rollup of 7 pull requests #120436
Commits on Oct 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a208662 - Browse repository at this point
Copy the full SHA a208662View commit details
Commits on Oct 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4f0192a - Browse repository at this point
Copy the full SHA 4f0192aView commit details -
Update library/core/src/primitive_docs.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
Configuration menu - View commit details
-
Copy full SHA for 39660c4 - Browse repository at this point
Copy the full SHA 39660c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55487e2 - Browse repository at this point
Copy the full SHA 55487e2View commit details
Commits on Nov 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1a0309a - Browse repository at this point
Copy the full SHA 1a0309aView commit details
Commits on Jan 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e95c640 - Browse repository at this point
Copy the full SHA e95c640View commit details
Commits on Jan 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a13fbaa - Browse repository at this point
Copy the full SHA a13fbaaView commit details
Commits on Jan 23, 2024
-
Improve documentation for [A]Rc::into_inner
General improvements, and also aims to better encourage the reader to actually check out Arc::try_unwrap.
Configuration menu - View commit details
-
Copy full SHA for ab938b9 - Browse repository at this point
Copy the full SHA ab938b9View commit details -
Add support for custom JSON targets when using build-std.
Currently, when building with `build-std`, some library build scripts check properties of the target by inspecting the target triple at `env::TARGET`, which is simply set to the filename of the JSON file when using JSON target files. This patch alters these build scripts to use `env::CARGO_CFG_*` to fetch target information instead, allowing JSON target files describing platforms without `restricted_std` to build correctly when using `-Z build-std`. Fixes wg-cargo-std-aware/rust-lang#60.
Configuration menu - View commit details
-
Copy full SHA for 797cf59 - Browse repository at this point
Copy the full SHA 797cf59View commit details
Commits on Jan 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c2c6e33 - Browse repository at this point
Copy the full SHA c2c6e33View commit details
Commits on Jan 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3269513 - Browse repository at this point
Copy the full SHA 3269513View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f89e57 - Browse repository at this point
Copy the full SHA 8f89e57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2241d16 - Browse repository at this point
Copy the full SHA 2241d16View commit details
Commits on Jan 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e26f213 - Browse repository at this point
Copy the full SHA e26f213View commit details -
Configuration menu - View commit details
-
Copy full SHA for 018bf30 - Browse repository at this point
Copy the full SHA 018bf30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d708e5 - Browse repository at this point
Copy the full SHA 8d708e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b867c7c - Browse repository at this point
Copy the full SHA b867c7cView commit details
Commits on Jan 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 75f889b - Browse repository at this point
Copy the full SHA 75f889bView commit details -
Rollup merge of rust-lang#116677 - joshlf:patch-11, r=RalfJung
References refer to allocated objects Partially addresses rust-lang/unsafe-code-guidelines#465
Configuration menu - View commit details
-
Copy full SHA for 674d4f6 - Browse repository at this point
Copy the full SHA 674d4f6View commit details -
Rollup merge of rust-lang#118533 - chenyukang:yukang-fix-118455, r=pe…
…trochenkov Suppress unhelpful diagnostics for unresolved top level attributes Fixes rust-lang#118455, unresolved top level attribute error didn't imported prelude and already have emitted an error, report builtin macro and attributes error by the way, so `check_invalid_crate_level_attr` in can ignore them. Also fixes rust-lang#89566, fixes rust-lang#67107. r? `@petrochenkov`
Configuration menu - View commit details
-
Copy full SHA for 173b666 - Browse repository at this point
Copy the full SHA 173b666View commit details -
Rollup merge of rust-lang#118625 - ShE3py:expr-in-pats, r=WaffleLapkin
Improve handling of expressions in patterns Closes rust-lang#112593. Methodcalls' dots in patterns are silently recovered as commas (e.g. `Foo("".len())` -> `Foo("", len())`) so extra diagnostics are emitted: ```rs struct Foo(u8, String, u8); fn bar(foo: Foo) -> bool { match foo { Foo(4, "yippee".yeet(), 7) => true, _ => false } } ``` ``` error: expected one of `)`, `,`, `...`, `..=`, `..`, or `|`, found `.` --> main.rs:5:24 | 5 | Foo(4, "yippee".yeet(), 7) => true, | ^ | | | expected one of `)`, `,`, `...`, `..=`, `..`, or `|` | help: missing `,` error[E0531]: cannot find tuple struct or tuple variant `yeet` in this scope --> main.rs:5:25 | 5 | Foo(4, "yippee".yeet(), 7) => true, | ^^^^ not found in this scope error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields --> main.rs:5:13 | 1 | struct Foo(u8, String, u8); | -- ------ -- tuple struct has 3 fields ... 5 | Foo(4, "yippee".yeet(), 7) => true, | ^ ^^^^^^^^ ^^^^^^ ^ expected 3 fields, found 4 error: aborting due to 3 previous errors ``` This PR checks for patterns that ends with a dot and a lowercase ident (as structs/variants should be uppercase): ``` error: expected a pattern, found a method call --> main.rs:5:16 | 5 | Foo(4, "yippee".yeet(), 7) => true, | ^^^^^^^^^^^^^^^ method calls are not allowed in patterns error: aborting due to 1 previous error ``` Also check for expressions: ```rs fn is_idempotent(x: f32) -> bool { match x { x * x => true, _ => false, } } fn main() { let mut t: [i32; 5]; let t[0] = 1; } ``` ``` error: expected a pattern, found an expression --> main.rs:3:9 | 3 | x * x => true, | ^^^^^ arbitrary expressions are not allowed in patterns error: expected a pattern, found an expression --> main.rs:10:9 | 10 | let t[0] = 1; | ^^^^ arbitrary expressions are not allowed in patterns ``` Would be cool if the compiler could suggest adding a guard for `match`es, but I've no idea how to do it. --- `@rustbot` label +A-diagnostics +A-parser +A-patterns +C-enhancement
Configuration menu - View commit details
-
Copy full SHA for 390f768 - Browse repository at this point
Copy the full SHA 390f768View commit details -
Rollup merge of rust-lang#120232 - c272:json-buildstd, r=Mark-Simulacrum
Add support for custom JSON targets when using build-std. Currently, when building with `build-std`, some library build scripts check properties of the target by inspecting the target triple at `env::TARGET`, which is simply set to the filename of the JSON file when using JSON target files. This patch alters these build scripts to use `env::CARGO_CFG_*` to fetch target information instead, allowing JSON target files describing platforms without `restricted_std` to build correctly when using `-Z build-std`. There are some weak assertions here (for example, `nintendo && newlib`), however this seems at least a marginal improvement on the existing solution. Fixes rust-lang/wg-cargo-std-aware#60.
Configuration menu - View commit details
-
Copy full SHA for 6b20baa - Browse repository at this point
Copy the full SHA 6b20baaView commit details -
Rollup merge of rust-lang#120238 - joboet:always_confirm_lock_success…
…, r=Mark-Simulacrum Always check the result of `pthread_mutex_lock` Fixes rust-lang#120147. Instead of manually adding a list of "good" platforms, I've simply made the check unconditional. pthread's mutex is already quite slow on most platforms, so one single well-predictable branch shouldn't hurt performance too much.
Configuration menu - View commit details
-
Copy full SHA for d2f83ef - Browse repository at this point
Copy the full SHA d2f83efView commit details -
Rollup merge of rust-lang#120266 - steffahn:a_rc_into_inner_docs, r=M…
…ark-Simulacrum Improve documentation for [A]Rc::into_inner General improvements, and also aims to better encourage the reader to actually check out Arc::try_unwrap. This addresses concerns from rust-lang#106894 (comment). Rendered: ![Screenshot_20240123_114436](https://github.com/rust-lang/rust/assets/3986214/68896d62-13e0-4f3a-8073-91d8e77c5554) ![Screenshot_20240123_114455](https://github.com/rust-lang/rust/assets/3986214/dc58e4bd-dd7f-40b1-bc50-fd6200dde593)
Configuration menu - View commit details
-
Copy full SHA for bd1faf9 - Browse repository at this point
Copy the full SHA bd1faf9View commit details -
Rollup merge of rust-lang#120373 - HTGAzureX1212:HTGAzureX1212/issue-…
…120040, r=ChrisDenton Adjust Behaviour of `read_dir` and `ReadDir` in Windows Implementation: Check Whether Path to Search In Exists This pull request changes the `read_dir` function's and the `ReadDir` structure's internal implementations for the Windows operating system to make its behaviour more accurate. It should be noted that `ERROR_FILE_NOT_FOUND` is returned by the `FindFirstFileW` function when *no matching files can be found*, not necessarily that the path to search in does not exist in the first place. Therefore, directly returning the "The system cannot find the file specified." may not be accurate. An extra check for whether the path to search in exists is added, returning a constructed `ReadDir` iterator with its handle being an `INVALID_HANDLE_VALUE` returned by the `FindFirstFileW` function if `ERROR_FILE_NOT_FOUND` is indeed the last OS error. The `ReadDir` implementation for the Windows operating system is correspondingly updated to always return `None` if the handle it has is an `INVALID_HANDLE_VALUE` which can only be the case if and only if specifically constructed by the `read_dir` function in the aforementioned conditions. It should also be noted that `FindFirstFileW` would have returned `ERROR_PATH_NOT_FOUND` if the path to search in does not exist in the first place. Presumably fixes rust-lang#120040.
Configuration menu - View commit details
-
Copy full SHA for 54c7a7b - Browse repository at this point
Copy the full SHA 54c7a7bView commit details