Skip to content

Conversation

hkBst
Copy link
Member

@hkBst hkBst commented Jul 2, 2025

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Jul 2, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 2, 2025
@jhpratt
Copy link
Member

jhpratt commented Jul 2, 2025

cc @rust-lang/libs — I'm 99% sure this is acceptable but I'd like to be positive. r=me if that is the case.

@cuviper
Copy link
Member

cuviper commented Jul 2, 2025

Consolidating the Display impl is a positive change.

I have mixed feelings about dropping any existing Error::description though -- it doesn't hurt anything to leave its current static text in place.

@jhpratt
Copy link
Member

jhpratt commented Jul 2, 2025

Hm, I naïvely assumed that description delegated to the Display impl, but that's not the case. I guess because it returns a &str, which is borrowed rather than owned?

@cuviper
Copy link
Member

cuviper commented Jul 2, 2025

Right, Display is more powerful for that reason.

@hkBst
Copy link
Member Author

hkBst commented Jul 3, 2025

I also assumed description would call into Display, but it is actually:

    #[deprecated(since = "1.42.0", note = "use the Display impl or to_string()")]
    fn description(&self) -> &str {
        "description() is deprecated; use Display"
    }

Deprecation happened 46 stable versions ago, or almost 6 years ago.

@cuviper
Copy link
Member

cuviper commented Jul 4, 2025

Deprecation happened 46 stable versions ago, or almost 6 years ago.

Sure, but AFAIK we haven't removed any of the existing overrides. If we're going to do that, I think it should be intentional and en masse.

@hkBst
Copy link
Member Author

hkBst commented Jul 4, 2025

Sure, but AFAIK we haven't removed any of the existing overrides. If we're going to do that, I think it should be intentional and en masse.

Should I open an issue to gauge opinions on that, or do you want to do it? Or do you have a better idea?

@cuviper
Copy link
Member

cuviper commented Jul 5, 2025

Sure, if you're interested/motivated to make that happen, go ahead with an issue.

@hkBst
Copy link
Member Author

hkBst commented Jul 8, 2025

@jieyouxu
Copy link
Member

jieyouxu commented Jul 8, 2025

Hi @hkBst, I believe @cuviper meant an API Change Proposal against the libs-team repo, as this (removing a user-visible deprecated override in core) falls under the purview of the libs-api team and not the compiler team :)

@cuviper
Copy link
Member

cuviper commented Jul 8, 2025

Yes, and sorry, I should have offered that guidance.

@hkBst
Copy link
Member Author

hkBst commented Jul 15, 2025

Given rust-lang/libs-team#615 (comment), perhaps this can now move forward?

@tgross35 tgross35 changed the title remove deprecated from core::ffi::c_str Remove deprecated Error::description impl from c_str::FromBytesWithNulError Jul 15, 2025
@jhpratt
Copy link
Member

jhpratt commented Jul 15, 2025

That's sufficient for me.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 15, 2025

📌 Commit 674724c has been approved by jhpratt

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 15, 2025

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 15, 2025
bors added a commit that referenced this pull request Jul 17, 2025
Rollup of 11 pull requests

Successful merges:

 - #143326 (Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`)
 - #143431 (Use relative visibility when noting sealed trait to reduce false positive)
 - #143550 (resolve: Use interior mutability for extern module map)
 - #143631 (update to literal-escaper-0.0.5)
 - #143793 (Opaque type collection: Guard against endlessly recursing free alias types)
 - #143880 (tests: Test line debuginfo for linebreaked function parameters)
 - #143914 (Reword mismatched-lifetime-syntaxes text based on feedback)
 - #143926 (Remove deprecated fields in bootstrap)
 - #143955 (Make frame spans appear on a separate trace line)
 - #143975 (type_id_eq: check that the hash fully matches the type)
 - #143984 (Fix ice for feature-gated `cfg` attributes applied to the crate)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 08fa971 into rust-lang:master Jul 17, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 17, 2025
rust-timer added a commit that referenced this pull request Jul 17, 2025
Rollup merge of #143326 - hkBst:rm-deprecated-1, r=jhpratt

Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jul 18, 2025
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#143326 (Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`)
 - rust-lang/rust#143431 (Use relative visibility when noting sealed trait to reduce false positive)
 - rust-lang/rust#143550 (resolve: Use interior mutability for extern module map)
 - rust-lang/rust#143631 (update to literal-escaper-0.0.5)
 - rust-lang/rust#143793 (Opaque type collection: Guard against endlessly recursing free alias types)
 - rust-lang/rust#143880 (tests: Test line debuginfo for linebreaked function parameters)
 - rust-lang/rust#143914 (Reword mismatched-lifetime-syntaxes text based on feedback)
 - rust-lang/rust#143926 (Remove deprecated fields in bootstrap)
 - rust-lang/rust#143955 (Make frame spans appear on a separate trace line)
 - rust-lang/rust#143975 (type_id_eq: check that the hash fully matches the type)
 - rust-lang/rust#143984 (Fix ice for feature-gated `cfg` attributes applied to the crate)

r? `@ghost`
`@rustbot` modify labels: rollup
@hkBst hkBst deleted the rm-deprecated-1 branch July 18, 2025 05:54
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Jul 21, 2025
Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Jul 21, 2025
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#143326 (Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`)
 - rust-lang#143431 (Use relative visibility when noting sealed trait to reduce false positive)
 - rust-lang#143550 (resolve: Use interior mutability for extern module map)
 - rust-lang#143631 (update to literal-escaper-0.0.5)
 - rust-lang#143793 (Opaque type collection: Guard against endlessly recursing free alias types)
 - rust-lang#143880 (tests: Test line debuginfo for linebreaked function parameters)
 - rust-lang#143914 (Reword mismatched-lifetime-syntaxes text based on feedback)
 - rust-lang#143926 (Remove deprecated fields in bootstrap)
 - rust-lang#143955 (Make frame spans appear on a separate trace line)
 - rust-lang#143975 (type_id_eq: check that the hash fully matches the type)
 - rust-lang#143984 (Fix ice for feature-gated `cfg` attributes applied to the crate)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 29, 2025
Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants