Skip to content

Commit

Permalink
Merge pull request #88 from dtolnay/library
Browse files Browse the repository at this point in the history
Recognize new standard library directory structure
  • Loading branch information
dtolnay authored Aug 26, 2020
2 parents f6407d0 + f9f9f88 commit e991940
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 14 additions & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
| -------------------
| |
Expand All @@ -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 "
Expand Down

0 comments on commit e991940

Please sign in to comment.