Skip to content

Make Ipv6Addr::multicast_scope() exhaustive#154196

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Jules-Bertholet:ipv6-multicast-discriminant
Mar 28, 2026
Merged

Make Ipv6Addr::multicast_scope() exhaustive#154196
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Jules-Bertholet:ipv6-multicast-discriminant

Conversation

@Jules-Bertholet
Copy link
Copy Markdown
Contributor

And make Ipv6MulticastScope exhaustive, with repr(u8) and the proper discriminant values. The variants for the two reserved scopes are gated behind a perma-unstable feature, in order to avoid committing to names for them.

IETF RFC 4291 and IETF RFC 7346 define the list of multicast scopes. The former document says:

scopes labeled "(unassigned)" are available for administrators to define additional multicast regions.

Tracking issue: #27709
@rustbot label A-io

@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 Mar 22, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 22, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @scottmcm, libs
  • @scottmcm, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, scottmcm

@rustbot rustbot added the A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` label Mar 22, 2026
@Jules-Bertholet Jules-Bertholet force-pushed the ipv6-multicast-discriminant branch from 816bc7c to 4ea9c64 Compare March 22, 2026 02:09
@rust-log-analyzer

This comment has been minimized.

@Jules-Bertholet Jules-Bertholet force-pushed the ipv6-multicast-discriminant branch from 4ea9c64 to c34af65 Compare March 22, 2026 02:41
And make `Ipv6MulticastScope` exhaustive,
with `repr(u8)` and the proper discriminant values.
The variants for the two reserved scopes
are gated behind a perma-unstable feature,
in order to avoid committing to names for them.

[IETF RFC 4291](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7)
and [IETF RFC 7346](https://datatracker.ietf.org/doc/html/rfc7346#section-2)
define the list of multicast scopes.
The former document says:

> scopes labeled "(unassigned)" are available for administrators
> to define additional multicast regions.
@Jules-Bertholet Jules-Bertholet force-pushed the ipv6-multicast-discriminant branch from c34af65 to ebb91f7 Compare March 23, 2026 21:46
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2026
@Jules-Bertholet
Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 27, 2026
@Mark-Simulacrum
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 27, 2026

📌 Commit 4ca6328 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Mar 27, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 28, 2026
Rollup of 9 pull requests

Successful merges:

 - #154357 (uefi: extend comment for TcpStream Send impl)
 - #154410 (Clean up the API for opening/checking incremental-compilation files )
 - #154081 (format safety doc of Rc/Arc::from_raw/from_raw_in)
 - #154110 (Change "error finalizing incremental compilation" text and emit it as a note, not a warning)
 - #154196 (Make `Ipv6Addr::multicast_scope()` exhaustive)
 - #154221 (`vec::as_mut_slice()`: use lowercase "isize" in safety comment)
 - #154234 (Use common Timestamp impl in Hermit (attempt 2))
 - #154396 (chore(deps): update rust crate tar to v0.4.45)
 - #154488 (Revert "Unstable book options parser")
rust-bors bot pushed a commit that referenced this pull request Mar 28, 2026
Rollup of 9 pull requests

Successful merges:

 - #154357 (uefi: extend comment for TcpStream Send impl)
 - #154410 (Clean up the API for opening/checking incremental-compilation files )
 - #154081 (format safety doc of Rc/Arc::from_raw/from_raw_in)
 - #154110 (Change "error finalizing incremental compilation" text and emit it as a note, not a warning)
 - #154196 (Make `Ipv6Addr::multicast_scope()` exhaustive)
 - #154221 (`vec::as_mut_slice()`: use lowercase "isize" in safety comment)
 - #154234 (Use common Timestamp impl in Hermit (attempt 2))
 - #154396 (chore(deps): update rust crate tar to v0.4.45)
 - #154488 (Revert "Unstable book options parser")
@rust-bors rust-bors bot merged commit 50fe743 into rust-lang:main Mar 28, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 28, 2026
rust-timer added a commit that referenced this pull request Mar 28, 2026
Rollup merge of #154196 - Jules-Bertholet:ipv6-multicast-discriminant, r=Mark-Simulacrum

Make `Ipv6Addr::multicast_scope()` exhaustive

And make `Ipv6MulticastScope` exhaustive, with `repr(u8)` and the proper discriminant values. The variants for the two reserved scopes are gated behind a perma-unstable feature, in order to avoid committing to names for them.

[IETF RFC 4291](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7) and [IETF RFC 7346](https://datatracker.ietf.org/doc/html/rfc7346#section-2) define the list of multicast scopes. The former document says:

> scopes labeled "(unassigned)" are available for administrators to define additional multicast regions.

Tracking issue: #27709
@rustbot label A-io
@Jules-Bertholet Jules-Bertholet deleted the ipv6-multicast-discriminant branch March 28, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` 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.

4 participants