This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit a03d6da
authored
Rollup merge of rust-lang#86439 - CDirkx:ip-protocol-assignment, r=m-ou-se
Remove `Ipv4Addr::is_ietf_protocol_assignment`
This PR removes the unstable method `Ipv4Addr::is_ietf_protocol_assignment`, as I suggested in rust-lang#85612 (comment). The method was added in rust-lang#60145, as far as I can tell primarily for the implementation of `Ipv4Addr::is_global` (addresses reserved for IETF protocol assignment are not globally reachable unless otherwise specified).
The method was added in 2019, but I haven't been able to find any open-source code using this method so far. I'm also having a hard time coming up with a usecase for specifically this method; knowing that an address is reserved for future protocols doesn't allow you to do much with it, especially since now some of those addresses are indeed assigned to a protocol and have their own behaviour (and might even be defined to be globally reachable, so if that is what you care about it is always more accurate to call `!is_global()`, instead of `is_ietf_protocol_assignment()`).
Because of these reasons, I propose removing the method (or alternatively make it a private helper for `is_global`) and also not introduce `Ipv6Addr::is_ietf_protocol_assignment` and `IpAddr::is_ietf_protocol_assignment` in the future.2 files changed
+6
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
| 489 | + | |
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
| |||
560 | 559 | | |
561 | 560 | | |
562 | 561 | | |
563 | | - | |
| 562 | + | |
| 563 | + | |
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | 592 | | |
627 | 593 | | |
628 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
| |||
397 | 396 | | |
398 | 397 | | |
399 | 398 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | 399 | | |
407 | 400 | | |
408 | 401 | | |
| |||
426 | 419 | | |
427 | 420 | | |
428 | 421 | | |
429 | | - | |
430 | 422 | | |
431 | 423 | | |
432 | 424 | | |
| |||
449 | 441 | | |
450 | 442 | | |
451 | 443 | | |
452 | | - | |
453 | | - | |
454 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
455 | 447 | | |
456 | 448 | | |
457 | 449 | | |
| |||
823 | 815 | | |
824 | 816 | | |
825 | 817 | | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | 818 | | |
830 | 819 | | |
831 | 820 | | |
| |||
0 commit comments