Auto merge of #114852 - GuillaumeGomez:rollup-vjagxjr, r=GuillaumeGomez
Rollup of 10 pull requests Successful merges: - #114711 (Infer `Lld::No` linker hint when the linker stem is a generic compiler driver) - #114772 (Add `{Local}ModDefId` to more strongly type DefIds`) - #114800 (std: add some missing repr(transparent)) - #114820 (Add test for unknown_lints from another file.) - #114825 (Upgrade std to gimli 0.28.0) - #114827 (Only consider object candidates for object-safe dyn types in new solver) - #114828 (Probe when assembling upcast candidates so they don't step on eachother's toes in new solver) - #114829 (Separate `consider_unsize_to_dyn_candidate` from other unsize candidates) - #114830 (Clean up some bad UI testing annotations) - #114831 (Check projection args before substitution in new solver) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
c57393e4f8
56 changed files with 574 additions and 228 deletions
|
@ -82,12 +82,12 @@ use crate::str;
|
|||
#[stable(feature = "core_c_str", since = "1.64.0")]
|
||||
#[rustc_has_incoherent_inherent_impls]
|
||||
#[lang = "CStr"]
|
||||
// FIXME:
|
||||
// `fn from` in `impl From<&CStr> for Box<CStr>` current implementation relies
|
||||
// on `CStr` being layout-compatible with `[u8]`.
|
||||
// When attribute privacy is implemented, `CStr` should be annotated as `#[repr(transparent)]`.
|
||||
// Anyway, `CStr` representation and layout are considered implementation detail, are
|
||||
// not documented and must not be relied upon.
|
||||
// However, `CStr` layout is considered an implementation detail and must not be relied upon. We
|
||||
// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under
|
||||
// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.
|
||||
#[cfg_attr(not(doc), repr(transparent))]
|
||||
pub struct CStr {
|
||||
// FIXME: this should not be represented with a DST slice but rather with
|
||||
// just a raw `c_char` along with some form of marker to make
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue