-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 const_sockaddr_setters
#131714
Comments
Unstably add `const` to the `sockaddr_setters` methods. Included API: // core::net impl SocketAddr { pub const fn set_ip(&mut self, new_ip: IpAddr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV4 { pub const fn set_ip(&mut self, new_ip: Ipv4Addr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV6 { pub const fn set_ip(&mut self, new_ip: Ipv6Addr); pub const fn set_port(&mut self, new_port: u16); } Tracking issue: <rust-lang#131714>
… r=Amanieu Add an unstable `const_sockaddr_setters` feature Unstably add `const` to the `sockaddr_setters` methods. Included API: ```rust // core::net impl SocketAddr { pub const fn set_ip(&mut self, new_ip: IpAddr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV4 { pub const fn set_ip(&mut self, new_ip: Ipv4Addr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV6 { pub const fn set_ip(&mut self, new_ip: Ipv6Addr); pub const fn set_port(&mut self, new_port: u16); } ``` Tracking issue: <rust-lang#131714>
Add an unstable `const_sockaddr_setters` feature Unstably add `const` to the `sockaddr_setters` methods. Included API: ```rust // core::net impl SocketAddr { pub const fn set_ip(&mut self, new_ip: IpAddr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV4 { pub const fn set_ip(&mut self, new_ip: Ipv4Addr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV6 { pub const fn set_ip(&mut self, new_ip: Ipv6Addr); pub const fn set_port(&mut self, new_port: u16); } ``` Tracking issue: <rust-lang/rust#131714>
Add an unstable `const_sockaddr_setters` feature Unstably add `const` to the `sockaddr_setters` methods. Included API: ```rust // core::net impl SocketAddr { pub const fn set_ip(&mut self, new_ip: IpAddr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV4 { pub const fn set_ip(&mut self, new_ip: Ipv4Addr); pub const fn set_port(&mut self, new_port: u16); } impl SocketAddrV6 { pub const fn set_ip(&mut self, new_ip: Ipv6Addr); pub const fn set_port(&mut self, new_port: u16); } ``` Tracking issue: <rust-lang/rust#131714>
@rust-lang/libs-api @rust-lang/wg-const-eval these are all fairly simple methods that have long been stable (since Rust 1.9), and I think are ready to be made const-stable. // core::net
impl SocketAddr {
pub const fn set_ip(&mut self, new_ip: IpAddr);
pub const fn set_port(&mut self, new_port: u16);
}
impl SocketAddrV4 {
pub const fn set_ip(&mut self, new_ip: Ipv4Addr);
pub const fn set_port(&mut self, new_port: u16);
}
impl SocketAddrV6 {
pub const fn set_ip(&mut self, new_ip: Ipv6Addr);
pub const fn set_port(&mut self, new_port: u16);
pub const fn set_flowinfo(&mut self, new_flowinfo: u32);
pub const fn set_scope_id(&mut self, new_scope_id: u32);
} |
@rfcbot fcp merge |
Team member @dtolnay 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. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
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. |
…=tgross35 Stabilize const_char_classify, const_sockaddr_setters FCP for const_char_classify: rust-lang#132241 FCP for const_sockaddr_setters: rust-lang#131714 Fixes rust-lang#132241 Fixes rust-lang#131714 Cc `@rust-lang/wg-const-eval`
…=tgross35 Stabilize const_char_classify, const_sockaddr_setters FCP for const_char_classify: rust-lang#132241 FCP for const_sockaddr_setters: rust-lang#131714 Fixes rust-lang#132241 Fixes rust-lang#131714 Cc ```@rust-lang/wg-const-eval```
Rollup merge of rust-lang#138129 - RalfJung:stabilize-const-things, r=tgross35 Stabilize const_char_classify, const_sockaddr_setters FCP for const_char_classify: rust-lang#132241 FCP for const_sockaddr_setters: rust-lang#131714 Fixes rust-lang#132241 Fixes rust-lang#131714 Cc ``@rust-lang/wg-const-eval``
Feature gate:
#![feature(const_sockaddr_setters)]
This is a tracking issue using the
set_ip
andset_port
methods onSocketAddr
types inconst
contexts.Public API
Steps / History
const_sockaddr_setters
feature #131715Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: