Rollup merge of #104383 - WaffleLapkin:rustc_undiagnostic_item, r=compiler-errors
Remove unused symbols and diagnostic items As the title suggests, this removes unused symbols from `sym::` and `#[rustc_diagnostic_item]` annotations that weren't mentioned anywhere. Originally I tried to use grep, to find symbols and item names that are never mentioned via `sym::name`, however this produced a lot of false positives (?), for example clippy matching on `Symbol::as_str` or macros "implicitly" adding `sym::`. I ended up fixing all these false positives (?) by hand, but tbh I'm not sure if it was worth it...
This commit is contained in:
commit
2c29b05fb2
7 changed files with 7 additions and 79 deletions
|
@ -73,7 +73,6 @@ pub enum IpAddr {
|
|||
/// assert!("0xcb.0x0.0x71.0x00".parse::<Ipv4Addr>().is_err()); // all octets are in hex
|
||||
/// ```
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "Ipv4Addr")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Ipv4Addr {
|
||||
octets: [u8; 4],
|
||||
|
@ -156,7 +155,6 @@ pub struct Ipv4Addr {
|
|||
/// assert_eq!(localhost.is_loopback(), true);
|
||||
/// ```
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "Ipv6Addr")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Ipv6Addr {
|
||||
octets: [u8; 16],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue