Skip to content
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

Tracking Issue for ip_in_core #108443

Closed
3 tasks done
joshtriplett opened this issue Feb 25, 2023 · 18 comments · Fixed by #119276
Closed
3 tasks done

Tracking Issue for ip_in_core #108443

joshtriplett opened this issue Feb 25, 2023 · 18 comments · Fixed by #119276
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@joshtriplett
Copy link
Member

joshtriplett commented Feb 25, 2023

Feature gate: #![feature(ip_in_core)]

This is a tracking issue for RFC rust-lang/rfcs#2832, providing networking types in core::net: IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, Ipv6MulticastScope and AddrParseError.

Steps / History

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

@joshtriplett joshtriplett added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Feb 25, 2023
@elpiel
Copy link

elpiel commented Jun 10, 2023

I guess there's nothing left to do.
Can this feature now move to the the FCP?

@Xiretza
Copy link
Contributor

Xiretza commented Jun 10, 2023

Can this be stabilized before error_in_core (AddrParseError implements core::error::Error)?

@elpiel
Copy link

elpiel commented Jun 13, 2023

Can this be stabilized before error_in_core (AddrParseError implements core::error::Error)?

I believe so.

  • Nothing in ip_addr points or uses core::error::Error:

https://github.com/faern/rust/blob/1291216ac986ccc1432bf0bf2db9545e5251dd24/library/core/src/net/ip_addr.rs
(master) https://github.com/rust-lang/rust/blob/master/library/core/src/net/ip_addr.rs

@Nemo157
Copy link
Member

Nemo157 commented Jun 13, 2023

You can't feature gate a trait implementation. The question would be if it's possible to refer to any of the trait Error methods on the error types without having to activate the feature. I believe not, since you would have to use core::error::Error in order to bring the methods into scope.

@elpiel
Copy link

elpiel commented Jun 15, 2023

Thanks for the explanation @Nemo157 and yes, I agree that it can't be stabilised before Error then.

@a1phyr
Copy link
Contributor

a1phyr commented Sep 13, 2023

I disagree, this feature can be specialized before error_in_core. Nothing will change for std users, and no_std users will merely not be able to use the Error impl.

This is just like all existing errors in core, eg core::fmt::Error (which is arguably stable):

rust/library/core/src/error.rs

Lines 1046 to 1052 in 735bb7e

#[stable(feature = "fmt_error", since = "1.11.0")]
impl Error for crate::fmt::Error {
#[allow(deprecated)]
fn description(&self) -> &str {
"an error occurred when formatting an argument"
}
}

@djc
Copy link
Contributor

djc commented Nov 21, 2023

Ping @rust-lang/libs-api, could this go into FCP?

@elpiel
Copy link

elpiel commented Nov 21, 2023

Yes, please.

@djc

This comment was marked as resolved.

@rustbot
Copy link
Collaborator

rustbot commented Dec 5, 2023

Error: The feature nominate is not enabled in this repository.
To enable it add its section in the triagebot.toml in the root of the repository.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@djc
Copy link
Contributor

djc commented Dec 5, 2023

@rust-lang/libs maybe? Would like to get some confirmation that this is on some list somewhere for discussion.

@ChrisDenton ChrisDenton added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Dec 5, 2023
@ChrisDenton
Copy link
Member

I've added the nomination label so it'll be discussed in a libs-api meeting, though it's possible a libs-api member may decide to remove the label and just fcp it. It'd likely be helpful if someone could provide a summary of the current state of things and why this is ready for stabilization.

@Kixunil
Copy link
Contributor

Kixunil commented Dec 8, 2023

I'm not claiming this bears enough weight to stabilize but I just allowed no_std in a small library that used std::net address types and it went completely smooth.

@joshtriplett
Copy link
Member Author

Starting FCP for stabilization.

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Dec 12, 2023

Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Dec 12, 2023
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Dec 12, 2023
@rfcbot
Copy link

rfcbot commented Dec 12, 2023

🔔 This is now entering its final comment period, as per the review above. 🔔

@Amanieu Amanieu removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Dec 19, 2023
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Dec 22, 2023
@rfcbot
Copy link

rfcbot commented Dec 22, 2023

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@faern
Copy link
Contributor

faern commented Dec 24, 2023

I pushed a stabilization PR: #119276

@dtolnay dtolnay linked a pull request Dec 24, 2023 that will close this issue
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 24, 2023
Stabilize ip_in_core feature

Finally the last stage of rust-lang/rfcs#2832. Since the FCP was [just completed with disposition *merge*](rust-lang#108443 (comment)), I create the stabilization PR for the `ip_in_core` feature. Allowing usage of `core::net` on stable Rust.

The error type `core::net::AddrParseError` itself becomes stable with this PR. However, `core::error::Error` is still unstable, so the `Error` impl for this type is not available on stable rust. Simply because `error_in_core` is not stable yet, but that should be fine!
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 24, 2023
Stabilize ip_in_core feature

Finally the last stage of rust-lang/rfcs#2832. Since the FCP was [just completed with disposition *merge*](rust-lang#108443 (comment)), I create the stabilization PR for the `ip_in_core` feature. Allowing usage of `core::net` on stable Rust.

The error type `core::net::AddrParseError` itself becomes stable with this PR. However, `core::error::Error` is still unstable, so the `Error` impl for this type is not available on stable rust. Simply because `error_in_core` is not stable yet, but that should be fine!
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.