mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
f36c5af359
This change uses the same "exact" paths as trait implementors and type alias inlining to track items with multiple reachable paths. This way, if you search for `vec`, you get only the `std` exports of it, and not the one from `alloc`. It still includes all the items in the search index so that you can search for them by all available paths. For example, try `core::option` and `std::option`, and notice that the results page doesn't show duplicates, but still shows all the items in their respective crates.
19 lines
363 B
Rust
19 lines
363 B
Rust
// This test enforces that the (renamed) reexports are present in the search results.
|
|
#![crate_name="foo"]
|
|
|
|
pub mod fmt {
|
|
pub struct Subscriber;
|
|
impl Subscriber {
|
|
pub fn dostuff(&self) {}
|
|
}
|
|
}
|
|
mod foo {
|
|
pub struct AnotherOne;
|
|
impl AnotherOne {
|
|
pub fn dostuff(&self) {}
|
|
}
|
|
}
|
|
|
|
pub use foo::AnotherOne;
|
|
pub use fmt::Subscriber;
|