]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc-ui/intra-doc/ambiguity.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / rustdoc-ui / intra-doc / ambiguity.rs
1 #![deny(rustdoc::broken_intra_doc_links)]
2 #![allow(non_camel_case_types)]
3 #![allow(non_upper_case_globals)]
4
5 pub fn ambiguous() {}
6
7 pub struct ambiguous {}
8
9 #[macro_export]
10 macro_rules! multi_conflict { () => {} }
11
12 #[allow(non_camel_case_types)]
13 pub struct multi_conflict {}
14
15 pub fn multi_conflict() {}
16
17 pub mod type_and_value {}
18
19 pub const type_and_value: i32 = 0;
20
21 pub mod foo {
22 pub enum bar {}
23
24 pub fn bar() {}
25 }
26
27 /// [`ambiguous`] is ambiguous. //~ERROR `ambiguous`
28 ///
29 /// [ambiguous] is ambiguous. //~ERROR ambiguous
30 ///
31 /// [`multi_conflict`] is a three-way conflict. //~ERROR `multi_conflict`
32 ///
33 /// Ambiguous [type_and_value]. //~ERROR type_and_value
34 ///
35 /// Ambiguous non-implied shortcut link [`foo::bar`]. //~ERROR `foo::bar`
36 pub struct Docs {}
37
38 /// [true] //~ ERROR `true` is both a module and a builtin type
39 /// [primitive@true]
40 pub mod r#true {}