Skip to content
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 8 pull requests #127898

Merged
merged 20 commits into from
Jul 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
538b31e
Make language around `ToOwned` for `BorrowedFd` more precise
tbu- Jun 28, 2024
2162f3f
Mention how you can go from `BorrowedFd` to `OwnedFd` and back
tbu- Jun 28, 2024
a651050
lift_to_tcx -> lift_to_interner
compiler-errors Jul 16, 2024
8d90f44
tcx -> cx in rustc_type_ir
compiler-errors Jul 16, 2024
0b5ce54
Fix relations
compiler-errors Jul 16, 2024
b84e2b7
Put the dots back
compiler-errors Jul 15, 2024
a9e1466
Add `llvm_components_contain` to `run-make-support`
Rejyr Jul 15, 2024
a8b6e3f
Migrate `atomic-lock-free` to `rmake`
Rejyr Jul 15, 2024
e38032f
Fix associated item removal suggestion
estebank Jul 9, 2024
8eb5185
Accurate `use` rename suggestion span
estebank Jul 10, 2024
be9d961
More accurate span for type parameter suggestion
estebank Jul 10, 2024
f6c4679
More accurate span for anonymous argument suggestion
estebank Jul 10, 2024
3aafbd2
Rollup merge of #127077 - tbu-:pr_doc_fd_to_owned, r=workingjubilee
matthiaskrgr Jul 18, 2024
97d5edf
Rollup merge of #127783 - compiler-errors:rtn-pretty, r=fee1-dead
matthiaskrgr Jul 18, 2024
2013bf9
Rollup merge of #127787 - Rejyr:migrate-atomic-lock-free-rmake, r=jie…
matthiaskrgr Jul 18, 2024
b2b14de
Rollup merge of #127810 - compiler-errors:less-tcx, r=lcnr
matthiaskrgr Jul 18, 2024
a13d7db
Rollup merge of #127878 - estebank:assoc-item-removal, r=fmease
matthiaskrgr Jul 18, 2024
b52883d
Rollup merge of #127886 - estebank:as-rename-suggestion, r=compiler-e…
matthiaskrgr Jul 18, 2024
d78be31
Rollup merge of #127888 - estebank:type-param-sugg, r=compiler-errors
matthiaskrgr Jul 18, 2024
77e5bbf
Rollup merge of #127889 - estebank:anon-arg-sugg, r=compiler-errors
matthiaskrgr Jul 18, 2024
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
Prev Previous commit
Next Next commit
Mention how you can go from BorrowedFd to OwnedFd and back
  • Loading branch information
tbu- committed Jul 17, 2024
commit 2162f3f34b2b4f9a7d603ab05bec4246a7b855c0
5 changes: 5 additions & 0 deletions library/std/src/os/fd/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ use crate::sys_common::{AsInner, FromInner, IntoInner};
/// it on `&BorrowedFd` and use `Clone::clone()` like `ToOwned` does for all
/// types implementing `Clone`. The result will be descriptor borrowed under
/// the same lifetime.
///
/// To obtain an [`OwnedFd`], you can use [`BorrowedFd::try_clone_to_owned`]
/// instead, but this is not supported on all platforms.
#[derive(Copy, Clone)]
#[repr(transparent)]
#[rustc_layout_scalar_valid_range_start(0)]
Expand All @@ -52,6 +55,8 @@ pub struct BorrowedFd<'fd> {
/// descriptor, so it can be used in FFI in places where a file descriptor is
/// passed as a consumed argument or returned as an owned value, and it never
/// has the value `-1`.
///
/// You can use [`AsFd::as_fd`] to obtain a [`BorrowedFd`].
#[repr(transparent)]
#[rustc_layout_scalar_valid_range_start(0)]
// libstd/os/raw/mod.rs assures me that every libstd-supported platform has a
Expand Down
Loading