-
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 #103461
Rollup of 7 pull requests #103461
Commits on Jul 21, 2022
-
Remove redundant lifetime bound from
impl Borrow for Cow
The lifetime bound `B::Owned: 'a` is redundant and doesn't make a difference, because `Cow<'a, B>` comes with an implicit `B: 'a`, and associated types will outlive lifetimes outlived by the `Self` type (and all the trait's generic parameters, of which there are none in this case), so the implicit `B: 'a` implies `B::Owned: 'a` anyway. The explicit lifetime bound here does however end up in documentation, and that's confusing in my opinion, so let's remove it ^^
Configuration menu - View commit details
-
Copy full SHA for c03d10c - Browse repository at this point
Copy the full SHA c03d10cView commit details
Commits on Oct 2, 2022
-
rustc: Use
unix_sigpipe
instead ofrustc_driver::set_sigpipe_handler
This is the first (known) step towards starting to use `unix_sigpipe` in the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed and all clients can use `unix_sigpipe` instead. For now we just start using `unix_sigpipe` in once place: `rustc` itself. It is easy to manually verify this change. If you remove `#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help | false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears again.
Configuration menu - View commit details
-
Copy full SHA for 093b075 - Browse repository at this point
Copy the full SHA 093b075View commit details
Commits on Oct 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2618f7a - Browse repository at this point
Copy the full SHA 2618f7aView commit details
Commits on Oct 22, 2022
-
Truncate thread names on Linux and Apple targets
These targets have system limits on the thread names, 16 and 64 bytes respectively, and `pthread_setname_np` returns an error if the name is longer. However, we're not in a context that can propagate errors when we call this, and we used to implicitly truncate on Linux with `prctl`, so now we manually truncate these names ahead of time.
Configuration menu - View commit details
-
Copy full SHA for 7280f3d - Browse repository at this point
Copy the full SHA 7280f3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12e4584 - Browse repository at this point
Copy the full SHA 12e4584View commit details -
Configuration menu - View commit details
-
Copy full SHA for 988e75b - Browse repository at this point
Copy the full SHA 988e75bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b614b0e - Browse repository at this point
Copy the full SHA b614b0eView commit details
Commits on Oct 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4bd9844 - Browse repository at this point
Copy the full SHA 4bd9844View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b984e5 - Browse repository at this point
Copy the full SHA 8b984e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15cfeb3 - Browse repository at this point
Copy the full SHA 15cfeb3View commit details
Commits on Oct 24, 2022
-
Rollup merge of rust-lang#95710 - fee1-dead-contrib:stabilize_arbitra…
…ry_enum_discriminant, r=joshtriplett Stabilize arbitrary_enum_discriminant, take 2 Documentation has been updated in rust-lang/reference#1055. cc rust-lang#86860 for previous stabilization report. Not yet marks rust-lang#60553 as done: need documentation in the rust reference.
Configuration menu - View commit details
-
Copy full SHA for 6317611 - Browse repository at this point
Copy the full SHA 6317611View commit details -
Rollup merge of rust-lang#99578 - steffahn:remove_redundant_bound, r=…
…thomcc Remove redundant lifetime bound from `impl Borrow for Cow` The lifetime bound `B::Owned: 'a` is redundant and doesn't make a difference, because `Cow<'a, B>` comes with an implicit `B: 'a`, and associated types will outlive lifetimes outlived by the `Self` type (and all the trait's generic parameters, of which there are none in this case), so the implicit `B: 'a` implies `B::Owned: 'a` anyway. The explicit lifetime bound here does however [end up in documentation](https://doc.rust-lang.org/std/borrow/enum.Cow.html#impl-Borrow%3CB%3E), and that's confusing in my opinion, so let's remove it ^^ _(Documentation right now, compare to `AsRef`, too:)_ ![Screenshot_20220722_014055](https://user-images.githubusercontent.com/3986214/180332665-424d0c05-afb3-40d8-a330-a57a2c9a494b.png)
Configuration menu - View commit details
-
Copy full SHA for 0be42d5 - Browse repository at this point
Copy the full SHA 0be42d5View commit details -
Rollup merge of rust-lang#100452 - ouz-a:issue-93242, r=jackh726
Fake capture closures if typeck results are empty This ICE happens because `closure_min_captures` is empty, the reason it's empty is with the 2021 edition `enable_precise_capture` is set to true, which makes it so that we can't fake capture any information because that result of the `unwrap` is none hence the ICE. Other solution is editing [maybe_read_scrutinee](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/expr_use_visitor.rs.html#453-463) to this since empty slice contains no sub patterns. Fixes rust-lang#93242 ```rust PatKind::Slice(_, ref slice, _) => { if slice.is_none(){ need_to_be_read = true; } } // instead of PatKind::Or(_) | PatKind::Box(_) | PatKind::Slice(..) | PatKind::Ref(..) | PatKind::Wild => {} ```
Configuration menu - View commit details
-
Copy full SHA for 97bf9d6 - Browse repository at this point
Copy the full SHA 97bf9d6View commit details -
Rollup merge of rust-lang#102587 - Enselic:rustc-unix_sigpipe, r=jack…
…h726 rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler` This is the first (known) step towards starting to use `unix_sigpipe` in the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed and all clients can use `unix_sigpipe` instead. For now we just start using `unix_sigpipe` in one place: `rustc` itself. It is easy to manually verify this change. If you remove `#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help | false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears again. PR that added `set_sigpipe_handler`: rust-lang#49606 Tracking issue for `unix_sigpipe`: rust-lang#97889 Not sure exactly how to label this PR. Going with T-libs for now since this is a T-libs feature. `@rustdoc` labels +T-libs
Configuration menu - View commit details
-
Copy full SHA for 4a287d9 - Browse repository at this point
Copy the full SHA 4a287d9View commit details -
Rollup merge of rust-lang#102766 - thomcc:remove-resolv, r=Mark-Simul…
…acrum Don't link to `libresolv` in libstd on Darwin Currently we link `libresolv` into every Rust program on apple targets despite never using it (as of rust-lang#44965). I had thought we needed this for `getaddrinfo` or something, but we do not / cannot safely use it. I'd like to fix this for `libiconv` too (the other library we pull in. that's harder since it's coming in through `libc`, which is rust-lang/libc#2944)). --- This may warrant release notes. I'm not sure but I've added the flag regardless -- It's a change to the list of dylibs every Rust program pulls in, so it's worth mentioning. It's pretty unlikely anybody was relying on this being pulled in, and `std` does not guarantee that it will link (and thus transitively provide access to) any particular system library -- anybody relying on that behavior would already be broken when dynamically linking std. That is, there's an outside chance something will fail to link on macOS and iOS because it was accidentally relying on our unnecessary dependency. (If that *does* happen, that project could be easily fixed by linking libresolv explicitly on those platforms, probably via `#[link(name = "resolv")] extern {}`,` -Crustc-link-lib=resolv`, `println!("cargo:rustc-link-lib=resolv")`, or one of several places in `.config/cargo.toml`) --- I'm also going to preemptively add the nomination for discussing this in the libs meeting. Basically: Do we care about programs that assume we will bring libraries in that we do not use. `libresolv` and `libiconv` on macOS/iOS are in this camp (`libresolv` because we used to use it, and `libiconv` because the `libc` crate was unintentionally(?) pulling it in to every Rust program). I'd like to remove them both, but this may cause link issues programs that are relying on `std` to depend on them transitively. (Relying on std for this does not work in all build configurations, so this seems very fragile, and like a use case we should not support). More generally, IMO we should not guarantee the specific set of system-provided libraries we use (beyond what is implied by an OS version requirement), which means we'd be free to remove this cruft.
Configuration menu - View commit details
-
Copy full SHA for 26a5833 - Browse repository at this point
Copy the full SHA 26a5833View commit details -
Rollup merge of rust-lang#103122 - ouz-a:mir-technical-debt, r=oli-obk
Remove misc_cast and validate types when casting Continuing our work in rust-lang#102675 r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 60f3f07 - Browse repository at this point
Copy the full SHA 60f3f07View commit details -
Rollup merge of rust-lang#103379 - cuviper:truncate-thread-name, r=th…
…omcc Truncate thread names on Linux and Apple targets These targets have system limits on the thread names, 16 and 64 bytes respectively, and `pthread_setname_np` returns an error if the name is longer. However, we're not in a context that can propagate errors when we call this, and we used to implicitly truncate on Linux with `prctl`, so now we manually truncate these names ahead of time. r? `@thomcc`
Configuration menu - View commit details
-
Copy full SHA for 64e66e1 - Browse repository at this point
Copy the full SHA 64e66e1View commit details