diff --git a/src/normalize.rs b/src/normalize.rs index 75431ea..b5493af 100644 --- a/src/normalize.rs +++ b/src/normalize.rs @@ -149,6 +149,10 @@ impl<'a> Filter<'a> { // ::: $RUST/src/libstd/net/ip.rs:83:1 line.replace_range(line.find("::: ").unwrap() + 4..pos + 17, "$RUST"); other_crate = true; + } else if let Some(pos) = line.find("/rustlib/src/rust/library/") { + // ::: $RUST/std/src/net/ip.rs:83:1 + line.replace_range(line.find("::: ").unwrap() + 4..pos + 25, "$RUST"); + other_crate = true; } } if other_crate && self.normalization >= WorkspaceLines { diff --git a/src/tests.rs b/src/tests.rs index 0c881ce..38d40a7 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -54,6 +54,13 @@ error[E0599]: no method named `quote_into_iter` found for struct `std::net::Ipv4 | ::: /rustlib/src/rust/src/libstd/net/ip.rs:83:1 | +83 | pub struct Ipv4Addr { + | ------------------- + | | + | doesn't satisfy `std::net::Ipv4Addr: quote::to_tokens::ToTokens` + | + ::: /rustlib/src/rust/library/std/src/net/ip.rs:83:1 + | 83 | pub struct Ipv4Addr { | ------------------- | | @@ -71,6 +78,13 @@ error[E0599]: no method named `quote_into_iter` found for struct `std::net::Ipv4 | ------------------- | | | doesn't satisfy `std::net::Ipv4Addr: quote::to_tokens::ToTokens` + | + ::: $RUST/std/src/net/ip.rs + | + | pub struct Ipv4Addr { + | ------------------- + | | + | doesn't satisfy `std::net::Ipv4Addr: quote::to_tokens::ToTokens` "} test_normalize! {test_type_dir_backslash "