Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a2dce77
Start documenting autodiff activities
ZuseZ4 Oct 28, 2025
f4efc37
feat: Add `bit_width` for unsigned `NonZero<T>`
sorairolake Nov 10, 2025
740b8ba
Make SIMD intrinsics available in `const`-contexts
sayantn Nov 3, 2025
47384f7
add check for when span is from macro expansion
Kivooeo Nov 12, 2025
f5892da
add autodiff examples
ZuseZ4 Nov 12, 2025
82ff614
Enable const-testing for the ported SIMD intrinsics
sayantn Nov 16, 2025
754a82d
recommend using a HashMap if a HashSet's second generic parameter doe…
Qelxiros Sep 30, 2025
1cfd0b7
Match <OsString as Debug>::fmt to that of str
tamird Aug 7, 2023
eb84efc
Remove <os::Vars as Debug> workaround
tamird Aug 13, 2023
a25950d
feat: Change return type of `NonZero::bit_width`
sorairolake Nov 18, 2025
0b2e02f
autodiff: update formating, improve examples for the unstable-book
ZuseZ4 Nov 19, 2025
847c422
Rollup merge of #147171 - Qelxiros:hashmap_diag, r=fee1-dead
matthiaskrgr Nov 19, 2025
2cc5bf7
Rollup merge of #147421 - Kivooeo:ice-fix51621, r=chenyukang
matthiaskrgr Nov 19, 2025
714f1ce
Rollup merge of #147521 - sayantn:simd-const-intrinsics, r=madsmtm
matthiaskrgr Nov 19, 2025
3732c3c
Rollup merge of #148201 - ZuseZ4:autodiff-activity-docs, r=oli-obk
matthiaskrgr Nov 19, 2025
8b74790
Rollup merge of #148797 - sorairolake:feature/non-zero-uint-bit-width…
matthiaskrgr Nov 19, 2025
48fa913
Rollup merge of #148798 - tamird:esc-single-quote, r=Amanieu
matthiaskrgr Nov 19, 2025
fd88e61
Rollup merge of #149082 - ZuseZ4:autodiff-unstable-book-fmt, r=chenyu…
matthiaskrgr Nov 19, 2025
File filter

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
Remove <os::Vars as Debug> workaround
  • Loading branch information
tamird committed Nov 17, 2025
commit eb84efc702d55b39cfe83009f61d479351ea68c1
2 changes: 1 addition & 1 deletion library/std/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl Iterator for Vars {
impl fmt::Debug for Vars {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self { inner: VarsOs { inner } } = self;
f.debug_struct("Vars").field("inner", &inner.str_debug()).finish()
f.debug_struct("Vars").field("inner", inner).finish()
}
}

Expand Down
17 changes: 0 additions & 17 deletions library/std/src/sys/env/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,10 @@ pub struct Env {
iter: vec::IntoIter<(OsString, OsString)>,
}

// FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
pub struct EnvStrDebug<'a> {
slice: &'a [(OsString, OsString)],
}

impl fmt::Debug for EnvStrDebug<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_list()
.entries(self.slice.iter().map(|(a, b)| (a.to_str().unwrap(), b.to_str().unwrap())))
.finish()
}
}

impl Env {
pub(super) fn new(env: Vec<(OsString, OsString)>) -> Self {
Env { iter: env.into_iter() }
}

pub fn str_debug(&self) -> impl fmt::Debug + '_ {
EnvStrDebug { slice: self.iter.as_slice() }
}
}

impl fmt::Debug for Env {
Expand Down
7 changes: 0 additions & 7 deletions library/std/src/sys/env/unsupported.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ use crate::{fmt, io};

pub struct Env(!);

impl Env {
// FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
pub fn str_debug(&self) -> impl fmt::Debug + '_ {
self.0
}
}

impl fmt::Debug for Env {
fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0
Expand Down
24 changes: 0 additions & 24 deletions library/std/src/sys/env/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,6 @@ pub struct Env {
iter: EnvIterator,
}

// FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
pub struct EnvStrDebug<'a> {
iter: &'a EnvIterator,
}

impl fmt::Debug for EnvStrDebug<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self { iter } = self;
let iter: EnvIterator = (*iter).clone();
let mut list = f.debug_list();
for (a, b) in iter {
list.entry(&(a.to_str().unwrap(), b.to_str().unwrap()));
}
list.finish()
}
}

impl Env {
pub fn str_debug(&self) -> impl fmt::Debug + '_ {
let Self { base: _, iter } = self;
EnvStrDebug { iter }
}
}

impl fmt::Debug for Env {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self { base: _, iter } = self;
Expand Down
Loading