]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/issue-31899.rs
Rollup merge of #31441 - gereeter:btree-docs, r=bluss
[rust.git] / src / test / rustdoc / issue-31899.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11
12 // @has issue_31899/index.html
13 // @has - 'Make this line a bit longer.'
14 // @!has - 'rust rust-example-rendered'
15 // @!has - 'use ndarray::arr2'
16 // @!has - 'prohibited'
17
18 /// A tuple or fixed size array that can be used to index an array.
19 /// Make this line a bit longer.
20 ///
21 /// ```
22 /// use ndarray::arr2;
23 ///
24 /// let mut a = arr2(&[[0, 1], [0, 0]]);
25 /// a[[1, 1]] = 1;
26 /// assert_eq!(a[[0, 1]], 1);
27 /// assert_eq!(a[[1, 1]], 1);
28 /// ```
29 ///
30 /// **Note** the blanket implementation that's not visible in rustdoc:
31 /// `impl<D> NdIndex for D where D: Dimension { ... }`
32 pub fn bar() {}
33
34 /// Some line
35 ///
36 /// # prohibited
37 pub fn foo() {}
38
39 /// Some line
40 ///
41 /// 1. prohibited
42 /// 2. bar
43 pub fn baz() {}
44
45 /// Some line
46 ///
47 /// - prohibited
48 /// - bar
49 pub fn qux() {}
50
51 /// Some line
52 ///
53 /// * prohibited
54 /// * bar
55 pub fn quz() {}
56
57 /// Some line
58 ///
59 /// > prohibited
60 /// > bar
61 pub fn qur() {}
62
63 /// Some line
64 ///
65 /// prohibited
66 /// =====
67 ///
68 /// Second
69 /// ------
70 pub fn qut() {}