Skip to content

Make Ipv6Addr::multicast_scope() exhaustive#154196

Open
Jules-Bertholet wants to merge 1 commit intorust-lang:mainfrom
Jules-Bertholet:ipv6-multicast-discriminant
Open

Make Ipv6Addr::multicast_scope() exhaustive#154196
Jules-Bertholet wants to merge 1 commit intorust-lang:mainfrom
Jules-Bertholet:ipv6-multicast-discriminant

Conversation

@Jules-Bertholet
Copy link
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
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
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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants