-
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 #104187
Rollup of 7 pull requests #104187
Commits on Oct 26, 2022
-
Lukas Markeffsky committed
Oct 26, 2022 Configuration menu - View commit details
-
Copy full SHA for 9e36fd9 - Browse repository at this point
Copy the full SHA 9e36fd9View commit details
Commits on Oct 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8498e3a - Browse repository at this point
Copy the full SHA 8498e3aView commit details
Commits on Nov 3, 2022
-
These have been bugging me for a while. - `literal_text`: `src` is also used and is shorter and better. - `first_char`: used even when "first" doesn't make sense; `c` is shorter and better. - `curr`: `c` is shorter and better. - `unescaped_char`: `result` is also used and is shorter and better. - `second_char`: these have a single use and can be elided.
Configuration menu - View commit details
-
Copy full SHA for f32e678 - Browse repository at this point
Copy the full SHA f32e678View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84ca2c3 - Browse repository at this point
Copy the full SHA 84ca2c3View commit details -
It's passed to numerous places where we just need an `is_byte` bool. Passing the bool avoids the need for some assertions. Also rename `is_bytes()` as `is_byte()`, to better match `Mode::Byte`, `Mode::ByteStr`, and `Mode::RawByteStr`.
Configuration menu - View commit details
-
Copy full SHA for 34b32b0 - Browse repository at this point
Copy the full SHA 34b32b0View commit details
Commits on Nov 4, 2022
-
Make non-ASCII errors more consistent.
There are three kinds of "byte" literals: byte literals, byte string literals, and raw byte string literals. None are allowed to have non-ASCII chars in them. Two `EscapeError` variants exist for when that constraint is violated. - `NonAsciiCharInByte`: used for byte literals and byte string literals. - `NonAsciiCharInByteString`: used for raw byte string literals. As a result, the messages for raw byte string literals use different wording, without good reason. Also, byte string literals are incorrectly described as "byte constants" in some error messages. This commit eliminates `NonAsciiCharInByteString` so the three cases are handled similarly, and described correctly. The `mode` is enough to distinguish them. Note: Some existing error messages mention "byte constants" and some mention "byte literals". I went with the latter here, because it's a more correct name, as used by the Reference.
Configuration menu - View commit details
-
Copy full SHA for 7dbf2c0 - Browse repository at this point
Copy the full SHA 7dbf2c0View commit details -
Remove a low-value comment, remove a duplicate comment, and correct a third comment.
Configuration menu - View commit details
-
Copy full SHA for a21c045 - Browse repository at this point
Copy the full SHA a21c045View commit details -
It deals with eight cases: ints, floats, and the six quoted types (char/byte/strings). For ints and floats we have an early return, and the other six types fall through to the code at the end, which makes the function hard to read. This commit rearranges things to avoid the early returns.
Configuration menu - View commit details
-
Copy full SHA for d963686 - Browse repository at this point
Copy the full SHA d963686View commit details -
Inline and remove
validate_int_literal
.It has a single callsite, and is fairly small. The `Float` match arm already has base-specific checking inline, so this makes things more consistent.
Configuration menu - View commit details
-
Copy full SHA for a203482 - Browse repository at this point
Copy the full SHA a203482View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8e2cef - Browse repository at this point
Copy the full SHA f8e2cefView commit details -
Configuration menu - View commit details
-
Copy full SHA for 57b2290 - Browse repository at this point
Copy the full SHA 57b2290View commit details
Commits on Nov 5, 2022
-
It's easy to just use `unescape_literal` + `byte_from_char`.
Configuration menu - View commit details
-
Copy full SHA for a838952 - Browse repository at this point
Copy the full SHA a838952View commit details -
Configuration menu - View commit details
-
Copy full SHA for 43d21b5 - Browse repository at this point
Copy the full SHA 43d21b5View commit details
Commits on Nov 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8af12eb - Browse repository at this point
Copy the full SHA 8af12ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for f67ee43 - Browse repository at this point
Copy the full SHA f67ee43View commit details
Commits on Nov 8, 2022
-
Simplify
unescape_{char,byte}
.The `usize` isn't needed in the error case.
Configuration menu - View commit details
-
Copy full SHA for d6c97a3 - Browse repository at this point
Copy the full SHA d6c97a3View commit details
Commits on Nov 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f665847 - Browse repository at this point
Copy the full SHA f665847View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6c05eb - Browse repository at this point
Copy the full SHA b6c05ebView commit details -
Rollup merge of rust-lang#103570 - lukas-code:stabilize-ilog, r=scottmcm
Stabilize integer logarithms Stabilizes feature `int_log`. I've also made the functions const stable, because they don't depend on any unstable const features. `rustc_allow_const_fn_unstable` is just there for `Option::expect`, which could be replaced with a `match` and `panic!`. cc `@rust-lang/wg-const-eval` closes rust-lang#70887 (tracking issue) ~~blocked on FCP finishing: rust-lang#70887 (comment) FCP finished: rust-lang#70887 (comment)
Configuration menu - View commit details
-
Copy full SHA for 1c23d6a - Browse repository at this point
Copy the full SHA 1c23d6aView commit details -
Rollup merge of rust-lang#103694 - WaffleLapkin:mask_doc_example, r=s…
…cottmcm Add documentation examples for `pointer::mask` The examples are somewhat convoluted, but I don't know how to make this better :(
Configuration menu - View commit details
-
Copy full SHA for b587010 - Browse repository at this point
Copy the full SHA b587010View commit details -
Rollup merge of rust-lang#103919 - nnethercote:unescaping-cleanups, r…
…=matklad Unescaping cleanups Some code improvements, and some error message improvements. Best reviewed one commit at a time. r? ```@matklad```
Configuration menu - View commit details
-
Copy full SHA for 1a28093 - Browse repository at this point
Copy the full SHA 1a28093View commit details -
Rollup merge of rust-lang#103952 - ehuss:dont-intra-linkcheck-referen…
…ce, r=Mark-Simulacrum Don't intra linkcheck reference This removes the reference from the intra-doc link checks. This causes problems if any of the reference content needs to change, it causes the linkchecker to break. The reference has its own broken link check (https://github.com/rust-lang/reference/tree/master/style-check) which uses pulldown-cmark on the source to find actual broken links (instead of false-positives like this regex does). I think the intra-doc link check could potentially be removed completely, since I think rustdoc is now checking for them well enough. However, it may serve as a decent regression check.
Configuration menu - View commit details
-
Copy full SHA for 41b8f0b - Browse repository at this point
Copy the full SHA 41b8f0bView commit details -
Rollup merge of rust-lang#104095 - flba-eb:test_available_parallelism…
…, r=thomcc Add test for impl of `available_parallelism()` This checks that `std::thread::available_parallelism()` returns `Ok(NonZeroUsize)`. With this test maintainers of targets(OS) can check if they have implemented this function (or decide to ignore it). Not sure how to deal with the ignore list right now: - tier 1's should all implement the feature already ✔️ - tier 2's mostly do as well, but not e.g. `ios`, `wasi` -- should we add them to the ignore list or let the maintainers do that (so that they are informed)? - tier 3's will certainly sometimes not implement it, my suggestion is to not add them to the ignore list - I've added only `vxworks`, `redox` and `l4re` to the ignore list because this is documented already in `library/std/src/sys/unix/thread.rs` ([code](https://github.com/rust-lang/rust/blob/9b735a7132acd58b3bd34c084e9ca5b4ca7450a2/library/std/src/sys/unix/thread.rs#L403)) We could also check the value against e.g. `cat /proc/cpuinfo | grep process or | wc` but I don't know if this is required (how much sense it makes) and if this would play well with e.g. cgroups on Linux. r? `@thomcc`
Configuration menu - View commit details
-
Copy full SHA for 83f8d18 - Browse repository at this point
Copy the full SHA 83f8d18View commit details -
Rollup merge of rust-lang#104111 - yancyribbens:add-mutable-to-the-de…
…scription-for-as-simd-mut, r=scottmcm rustdoc: Add mutable to the description Add mutable the description to differentiate [as_simd](https://github.com/rust-lang/rust/blob/master/library/core/src/slice/mod.rs#L3654) from [as_simd_mut](https://github.com/rust-lang/rust/blob/master/library/core/src/slice/mod.rs#L3654).
Configuration menu - View commit details
-
Copy full SHA for 36d5c6c - Browse repository at this point
Copy the full SHA 36d5c6cView commit details -
Rollup merge of rust-lang#104125 - ink-feather-org:const_cmp_tuples, …
…r=fee1-dead Const Compare for Tuples Makes the impls for Tuples of ~const `PartialEq` types also `PartialEq`, impls for Tuples of ~const `PartialOrd` types also `PartialOrd`, for Tuples of ~const `Ord` types also `Ord`. behind the `#![feature(const_cmp)]` gate. ~~Do not merge before rust-lang#104113 is merged because I want to use this feature to clean up the new test that I added there.~~ r? `@fee1-dead`
Configuration menu - View commit details
-
Copy full SHA for f89a485 - Browse repository at this point
Copy the full SHA f89a485View commit details