Skip to content

Rollup of 7 pull requests #89702

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
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
853ffc7
stack overflow handler specific openbsd fix.
devnexen Jul 27, 2021
af83a96
std: Stabilize command_access
lf- Aug 28, 2021
4be574e
Add 'core::array::from_fn' and 'core::array::try_from_fn'
c410-f3r Sep 30, 2021
fdccc7d
Use reference instead of raw pointer
c410-f3r Sep 30, 2021
325025e
Improve previous commit
steffahn Sep 30, 2021
13bfcb7
Merge pull request #2 from steffahn/collect_into_array_fix_ub
c410-f3r Sep 30, 2021
355c7e9
Remove an unnecessary use of unwrap_unchecked
steffahn Sep 30, 2021
91ad91e
Skip platforms without unwinding support
c410-f3r Oct 3, 2021
10f7769
Remove textual span from diagnostic string
oli-obk Oct 5, 2021
64c794c
Use a label instead of a note for member constraint errors
oli-obk Oct 5, 2021
7df32f4
Remove a feature attribute for an accepted feature
oli-obk Oct 5, 2021
b7191b3
Remove explicit -Zborrowck=mir which does not affect test anymore
oli-obk Oct 5, 2021
d3871f5
Re-use logic for adding a suggestion when a lifetime bound is missing…
oli-obk Oct 5, 2021
5e1941c
Apply suggestions from code review
yaahc Oct 5, 2021
e159d42
Redo #81358 in unicode-table-generator
cuviper Oct 6, 2021
6b0b417
Let unicode-table-generator fail gracefully for bitsets
cuviper Oct 7, 2021
459a7e3
Regenerate tables for Unicode 14.0.0
cuviper Oct 7, 2021
6a52fb7
Add documentation to boxed conversions
timClicks Oct 8, 2021
85c4a52
Also cfg flag auxiliar function
c410-f3r Oct 8, 2021
09d1774
Bless nll tests
oli-obk Oct 8, 2021
fa5a212
Simplify wording
timClicks Oct 9, 2021
020ec0a
Remove unnecessary hyphen
timClicks Oct 9, 2021
3214253
Fix invalid HTML generation for higher bounds
GuillaumeGomez Oct 8, 2021
1069985
Rollup merge of #75644 - c410-f3r:array, r=yaahc
GuillaumeGomez Oct 9, 2021
41babca
Rollup merge of #87528 - :stack_overflow_obsd, r=joshtriplett
GuillaumeGomez Oct 9, 2021
d8868d6
Rollup merge of #88436 - lf-:stabilize-command-access, r=yaahc
GuillaumeGomez Oct 9, 2021
3323ba1
Rollup merge of #89555 - oli-obk:nll_member_constraint_diag, r=estebank
GuillaumeGomez Oct 9, 2021
123f07f
Rollup merge of #89614 - cuviper:unicode-14, r=joshtriplett
GuillaumeGomez Oct 9, 2021
b243dcd
Rollup merge of #89664 - timClicks:51430-document-boxed-conversions, …
GuillaumeGomez Oct 9, 2021
4bbd3eb
Rollup merge of #89700 - GuillaumeGomez:fix-rustdoc-higher-bound-html…
GuillaumeGomez Oct 9, 2021
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
std: Stabilize command_access
Tracking issue: #44434
  • Loading branch information
lf- committed Aug 28, 2021
commit af83a9613c00b358b5a969e4bcffd6842f87588d
20 changes: 8 additions & 12 deletions library/std/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ use crate::path::Path;
use crate::str;
use crate::sys::pipe::{read2, AnonPipe};
use crate::sys::process as imp;
#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
pub use crate::sys_common::process::CommandEnvs;
use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};

Expand Down Expand Up @@ -943,13 +943,12 @@ impl Command {
/// # Examples
///
/// ```
/// # #![feature(command_access)]
/// use std::process::Command;
///
/// let cmd = Command::new("echo");
/// assert_eq!(cmd.get_program(), "echo");
/// ```
#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
pub fn get_program(&self) -> &OsStr {
self.inner.get_program()
}
Expand All @@ -963,7 +962,6 @@ impl Command {
/// # Examples
///
/// ```
/// # #![feature(command_access)]
/// use std::ffi::OsStr;
/// use std::process::Command;
///
Expand All @@ -972,7 +970,7 @@ impl Command {
/// let args: Vec<&OsStr> = cmd.get_args().collect();
/// assert_eq!(args, &["first", "second"]);
/// ```
#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
pub fn get_args(&self) -> CommandArgs<'_> {
CommandArgs { inner: self.inner.get_args() }
}
Expand All @@ -992,7 +990,6 @@ impl Command {
/// # Examples
///
/// ```
/// # #![feature(command_access)]
/// use std::ffi::OsStr;
/// use std::process::Command;
///
Expand All @@ -1004,7 +1001,7 @@ impl Command {
/// (OsStr::new("TZ"), None)
/// ]);
/// ```
#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
pub fn get_envs(&self) -> CommandEnvs<'_> {
self.inner.get_envs()
}
Expand All @@ -1016,7 +1013,6 @@ impl Command {
/// # Examples
///
/// ```
/// # #![feature(command_access)]
/// use std::path::Path;
/// use std::process::Command;
///
Expand All @@ -1025,7 +1021,7 @@ impl Command {
/// cmd.current_dir("/bin");
/// assert_eq!(cmd.get_current_dir(), Some(Path::new("/bin")));
/// ```
#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
pub fn get_current_dir(&self) -> Option<&Path> {
self.inner.get_current_dir()
}
Expand Down Expand Up @@ -1057,13 +1053,13 @@ impl AsInnerMut<imp::Command> for Command {
///
/// This struct is created by [`Command::get_args`]. See its documentation for
/// more.
#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
#[derive(Debug)]
pub struct CommandArgs<'a> {
inner: imp::CommandArgs<'a>,
}

#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
impl<'a> Iterator for CommandArgs<'a> {
type Item = &'a OsStr;
fn next(&mut self) -> Option<&'a OsStr> {
Expand All @@ -1074,7 +1070,7 @@ impl<'a> Iterator for CommandArgs<'a> {
}
}

#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
impl<'a> ExactSizeIterator for CommandArgs<'a> {
fn len(&self) -> usize {
self.inner.len()
Expand Down
6 changes: 3 additions & 3 deletions library/std/src/sys_common/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ impl CommandEnv {
/// This struct is created by
/// [`Command::get_envs`][crate::process::Command::get_envs]. See its
/// documentation for more.
#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
#[derive(Debug)]
pub struct CommandEnvs<'a> {
iter: crate::collections::btree_map::Iter<'a, EnvKey, Option<OsString>>,
}

#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
impl<'a> Iterator for CommandEnvs<'a> {
type Item = (&'a OsStr, Option<&'a OsStr>);
fn next(&mut self) -> Option<Self::Item> {
Expand All @@ -123,7 +123,7 @@ impl<'a> Iterator for CommandEnvs<'a> {
}
}

#[unstable(feature = "command_access", issue = "44434")]
#[stable(feature = "command_access", since = "1.56.0")]
impl<'a> ExactSizeIterator for CommandEnvs<'a> {
fn len(&self) -> usize {
self.iter.len()
Expand Down