Skip to content

Rollup of 9 pull requests #107823

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

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c13669e
Implement `AsFd` and `AsRawFd` for `Rc`
ids1024 Jan 26, 2023
83b05ef
Stabilize feature 'cstr_from_bytes_until_nul'
tgross35 Jan 28, 2023
877e9f5
Change 'from_bytes_until_nul' to const stable
tgross35 Jan 30, 2023
f95b553
Replace a command line flag with an env var to allow tools to initial…
oli-obk Feb 7, 2023
0017822
Do not eagerly recover for bad impl-trait in macros
compiler-errors Feb 8, 2023
a516460
correctly update goals in the cache
lcnr Feb 8, 2023
4c7c5e5
add (currently ICEing) test
lcnr Feb 8, 2023
55330f6
Fix subst issue with object_ty_for_trait
compiler-errors Feb 8, 2023
a447e66
Use elaborated item bounds for alias types
compiler-errors Feb 8, 2023
09f2981
Implement a dummy drop-in-favor-of for the new solver
compiler-errors Feb 8, 2023
caa8ee9
Move winnowing to assembly
compiler-errors Feb 8, 2023
8cb5be9
rustdoc: use [svgo] to shrink `wheel.svg`
notriddle Feb 8, 2023
730470c
Set `rust-analyzer.check.invocationLocation` to `root`
clubby789 Feb 8, 2023
a70d03b
Extend `BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE`.
nnethercote Feb 6, 2023
4212d25
Rollup merge of #107317 - ids1024:asfd-rc, r=dtolnay
compiler-errors Feb 9, 2023
cda1583
Rollup merge of #107429 - tgross35:from-bytes-until-null-stabilizatio…
compiler-errors Feb 9, 2023
3e81dec
Rollup merge of #107713 - nnethercote:extend-BYTE_SLICE_IN_PACKED_STR…
compiler-errors Feb 9, 2023
43dce77
Rollup merge of #107761 - oli-obk:miri_🪵, r=TaKO8Ki
compiler-errors Feb 9, 2023
582c946
Rollup merge of #107786 - compiler-errors:new-solver-some-tweaks, r=lcnr
compiler-errors Feb 9, 2023
16709b0
Rollup merge of #107799 - lcnr:update-provisional-result, r=oli-obk
compiler-errors Feb 9, 2023
3c108ba
Rollup merge of #107813 - compiler-errors:bad-impl-trait-in-macro-is-…
compiler-errors Feb 9, 2023
6905d2c
Rollup merge of #107817 - notriddle:notriddle/wheel-svg, r=GuillaumeG…
compiler-errors Feb 9, 2023
e36673f
Rollup merge of #107819 - clubby789:x-py-root, r=jyn514
compiler-errors Feb 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Implement AsFd and AsRawFd for Rc
Fixes #105931.
  • Loading branch information
ids1024 committed Jan 26, 2023
commit c13669e00b4ba3f353ea1cfa825aecb0bb765f9c
8 changes: 8 additions & 0 deletions library/std/src/os/fd/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,14 @@ impl<T: AsFd> AsFd for crate::sync::Arc<T> {
}
}

#[stable(feature = "asfd_rc", since = "CURRENT_RUSTC_VERSION")]
impl<T: AsFd> AsFd for crate::rc::Rc<T> {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
(**self).as_fd()
}
}

#[stable(feature = "asfd_ptrs", since = "1.64.0")]
impl<T: AsFd> AsFd for Box<T> {
#[inline]
Expand Down
8 changes: 8 additions & 0 deletions library/std/src/os/fd/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ impl<T: AsRawFd> AsRawFd for crate::sync::Arc<T> {
}
}

#[stable(feature = "asfd_rc", since = "CURRENT_RUSTC_VERSION")]
impl<T: AsRawFd> AsRawFd for crate::rc::Rc<T> {
#[inline]
fn as_raw_fd(&self) -> RawFd {
(**self).as_raw_fd()
}
}

#[stable(feature = "asrawfd_ptrs", since = "1.63.0")]
impl<T: AsRawFd> AsRawFd for Box<T> {
#[inline]
Expand Down