-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 5 pull requests #108530
Rollup of 5 pull requests #108530
Commits on Feb 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b379d21 - Browse repository at this point
Copy the full SHA b379d21View commit details
Commits on Feb 23, 2023
-
Lazily compute crate name for consider_optimizing
The extra query is unnecessary in the common case of not having fuel.
Configuration menu - View commit details
-
Copy full SHA for 7ee01b4 - Browse repository at this point
Copy the full SHA 7ee01b4View commit details
Commits on Feb 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6cb3449 - Browse repository at this point
Copy the full SHA 6cb3449View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68f275c - Browse repository at this point
Copy the full SHA 68f275cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1291216 - Browse repository at this point
Copy the full SHA 1291216View commit details
Commits on Feb 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 934c8c2 - Browse repository at this point
Copy the full SHA 934c8c2View commit details -
Implement read_buf for a few more types
Implement read_buf for TcpStream, Stdin, StdinLock, ChildStdout, ChildStderr (and internally for AnonPipe, Handle, Socket), so that it skips buffer initialization. The other provided methods like read_to_string and read_to_end are implemented in terms of read_buf and so benefit from the optimization as well. This commit also implements read_vectored and is_read_vectored where applicable.
Configuration menu - View commit details
-
Copy full SHA for 8ab1a2a - Browse repository at this point
Copy the full SHA 8ab1a2aView commit details -
Rollup merge of rust-lang#99767 - LeSeulArtichaut:stable-target-featu…
…re-11, r=estebank Stabilize `#![feature(target_feature_11)]` ## Stabilization report ### Summary Allows for safe functions to be marked with `#[target_feature]` attributes. Functions marked with `#[target_feature]` are generally considered as unsafe functions: they are unsafe to call, cannot be assigned to safe function pointers, and don't implement the `Fn*` traits. However, calling them from other `#[target_feature]` functions with a superset of features is safe. ```rust // Demonstration function #[target_feature(enable = "avx2")] fn avx2() {} fn foo() { // Calling `avx2` here is unsafe, as we must ensure // that AVX is available first. unsafe { avx2(); } } #[target_feature(enable = "avx2")] fn bar() { // Calling `avx2` here is safe. avx2(); } ``` ### Test cases Tests for this feature can be found in [`src/test/ui/rfcs/rfc-2396-target_feature-11/`](https://github.com/rust-lang/rust/tree/b67ba9ba208ac918228a18321fc3a11a99b1c62b/src/test/ui/rfcs/rfc-2396-target_feature-11/). ### Edge cases - rust-lang#73631 Closures defined inside functions marked with `#[target_feature]` inherit the target features of their parent function. They can still be assigned to safe function pointers and implement the appropriate `Fn*` traits. ```rust #[target_feature(enable = "avx2")] fn qux() { let my_closure = || avx2(); // this call to `avx2` is safe let f: fn() = my_closure; } ``` This means that in order to call a function with `#[target_feature]`, you must show that the target-feature is available while the function executes *and* for as long as whatever may escape from that function lives. ### Documentation - Reference: rust-lang/reference#1181 --- cc tracking issue rust-lang#69098 r? ``@ghost``
Configuration menu - View commit details
-
Copy full SHA for 33af22a - Browse repository at this point
Copy the full SHA 33af22aView commit details -
Rollup merge of rust-lang#104265 - faern:move-ipaddr-to-core, r=josht…
…riplett Move IpAddr, SocketAddr and V4+V6 related types to `core` Implements RFC rust-lang/rfcs#2832. The RFC has completed FCP with disposition merge, but is not yet merged. Moves IP types to `core` as specified in the RFC. The full list of moved types is: `IpAddr`, `Ipv4Addr`, `Ipv6Addr`, `SocketAddr`, `SocketAddrV4`, `SocketAddrV6`, `Ipv6MulticastScope` and `AddrParseError`. Doing this move was one of the main driving arguments behind rust-lang#78802.
Configuration menu - View commit details
-
Copy full SHA for 0b93a27 - Browse repository at this point
Copy the full SHA 0b93a27View commit details -
Rollup merge of rust-lang#108326 - tmiasko:read-buf, r=thomcc
Implement read_buf for a few more types Implement read_buf for TcpStream, Stdin, StdinLock, ChildStdout, ChildStderr (and internally for AnonPipe, Handle, Socket), so that it skips buffer initialization. The other provided methods like read_to_string and read_to_end are implemented in terms of read_buf and so benefit from the optimization as well. This commit also implements read_vectored and is_read_vectored where applicable.
Configuration menu - View commit details
-
Copy full SHA for 4593429 - Browse repository at this point
Copy the full SHA 4593429View commit details -
Rollup merge of rust-lang#108405 - Nilstrieb:lazy-crate-name-optimiza…
…tion-fuel, r=WaffleLapkin Lazily compute crate name for consider_optimizing The extra query is unnecessary in the common case of not having fuel.
Configuration menu - View commit details
-
Copy full SHA for 8d77c03 - Browse repository at this point
Copy the full SHA 8d77c03View commit details -
Rollup merge of rust-lang#108523 - TaKO8Ki:avoid-str-to-string-conver…
…sions, r=Nilstrieb Avoid `&str` to `String` conversions This patch removes some unnecessary `&str` to `String` conversions.
Configuration menu - View commit details
-
Copy full SHA for 18d4a7f - Browse repository at this point
Copy the full SHA 18d4a7fView commit details