Rollup merge of #128046 - GrigorenkoPV:90435, r=tgross35 · model-checking/verify-rust-std@a4c88bc

7 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -506,7 +506,7 @@ where

506506

/// ```

507507

///

508508

#[unstable(feature = "error_generic_member_access", issue = "99301")]

509-

#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/90435

509+

#[repr(transparent)]

510510

pub struct Request<'a>(Tagged<dyn Erased<'a> + 'a>);

511511
512512

impl<'a> Request<'a> {

Original file line numberDiff line numberDiff line change

@@ -103,7 +103,7 @@ use crate::str;

103103

// However, `CStr` layout is considered an implementation detail and must not be relied upon. We

104104

// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under

105105

// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.

106-

#[cfg_attr(not(doc), repr(transparent))]

106+

#[repr(transparent)]

107107

#[allow(clippy::derived_hash_with_manual_eq)]

108108

pub struct CStr {

109109

// FIXME: this should not be represented with a DST slice but rather with

Original file line numberDiff line numberDiff line change

@@ -191,7 +191,7 @@ mod c_long_definition {

191191

// be UB.

192192

#[doc = include_str!("c_void.md")]

193193

#[lang = "c_void"]

194-

#[cfg_attr(not(doc), repr(u8))] // work around https://github.com/rust-lang/rust/issues/90435

194+

#[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc

195195

#[stable(feature = "core_c_void", since = "1.30.0")]

196196

pub enum c_void {

197197

#[unstable(

Original file line numberDiff line numberDiff line change

@@ -23,7 +23,7 @@ use crate::ops::{Deref, DerefMut};

2323

target_os = "uefi",

2424

windows,

2525

))]

26-

#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/90435

26+

#[repr(transparent)]

2727

#[lang = "va_list"]

2828

pub struct VaListImpl<'f> {

2929

ptr: *mut c_void,

@@ -115,7 +115,7 @@ pub struct VaListImpl<'f> {

115115

}

116116
117117

/// A wrapper for a `va_list`

118-

#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/90435

118+

#[repr(transparent)]

119119

#[derive(Debug)]

120120

pub struct VaList<'a, 'f: 'a> {

121121

#[cfg(any(

Original file line numberDiff line numberDiff line change

@@ -428,7 +428,7 @@ impl<'a> ContextBuilder<'a> {

428428

/// [`Future::poll()`]: core::future::Future::poll

429429

/// [`Poll::Pending`]: core::task::Poll::Pending

430430

/// [`Wake`]: ../../alloc/task/trait.Wake.html

431-

#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/66401

431+

#[repr(transparent)]

432432

#[stable(feature = "futures_api", since = "1.36.0")]

433433

pub struct Waker {

434434

waker: RawWaker,

@@ -692,7 +692,7 @@ impl fmt::Debug for Waker {

692692

/// [`Poll::Pending`]: core::task::Poll::Pending

693693

/// [`local_waker`]: core::task::Context::local_waker

694694

#[unstable(feature = "local_waker", issue = "118959")]

695-

#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/66401

695+

#[repr(transparent)]

696696

pub struct LocalWaker {

697697

waker: RawWaker,

698698

}

Original file line numberDiff line numberDiff line change

@@ -115,10 +115,8 @@ impl crate::sealed::Sealed for OsString {}

115115

#[stable(feature = "rust1", since = "1.0.0")]

116116

// `OsStr::from_inner` current implementation relies

117117

// on `OsStr` being layout-compatible with `Slice`.

118-

// However, `OsStr` layout is considered an implementation detail and must not be relied upon. We

119-

// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under

120-

// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.

121-

#[cfg_attr(not(doc), repr(transparent))]

118+

// However, `OsStr` layout is considered an implementation detail and must not be relied upon.

119+

#[repr(transparent)]

122120

pub struct OsStr {

123121

inner: Slice,

124122

}

Original file line numberDiff line numberDiff line change

@@ -2079,10 +2079,8 @@ impl AsRef<OsStr> for PathBuf {

20792079

#[stable(feature = "rust1", since = "1.0.0")]

20802080

// `Path::new` current implementation relies

20812081

// on `Path` being layout-compatible with `OsStr`.

2082-

// However, `Path` layout is considered an implementation detail and must not be relied upon. We

2083-

// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under

2084-

// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.

2085-

#[cfg_attr(not(doc), repr(transparent))]

2082+

// However, `Path` layout is considered an implementation detail and must not be relied upon.

2083+

#[repr(transparent)]

20862084

pub struct Path {

20872085

inner: OsStr,

20882086

}