1 #![deny(intra_doc_link_resolution_failure)]
3 /// [`std::collections::BTreeMap::into_iter`]
4 /// [`String::from`] is ambiguous as to which `From` impl
5 /// [Vec::into_iter()] uses a disambiguator
6 // @has 'associated_items/fn.foo.html' '//a[@href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html#method.into_iter"]' 'std::collections::BTreeMap::into_iter'
7 // @has 'associated_items/fn.foo.html' '//a[@href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.from"]' 'String::from'
8 // @has 'associated_items/fn.foo.html' '//a[@href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html#method.into_iter"]' 'Vec::into_iter'
11 /// Link to [MyStruct], [link from struct][MyStruct::method], [MyStruct::clone], [MyStruct::Input]
12 // @has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html"]' 'MyStruct'
13 // @has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#method.method"]' 'link from struct'
14 // @has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#method.clone"]' 'MyStruct::clone'
15 // @has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#associatedtype.Input"]' 'MyStruct::Input'
16 pub struct MyStruct { foo: () }
18 impl Clone for MyStruct {
19 fn clone(&self) -> Self {
26 fn method(i: Self::Input);
32 /// [link from method][MyStruct::method] on method
33 // @has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#method.method"]' 'link from method'
38 /// Ambiguity between which trait to use
40 fn ambiguous_method();
44 fn ambiguous_method();
47 /// Link to [S::ambiguous_method]
48 // FIXME: there is no way to disambiguate these.
49 // Since we have `#[deny(intra_doc_failure)]`, we still know it was one or the other.
53 fn ambiguous_method() {}
57 fn ambiguous_method() {}