We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 673fd23 commit 9e0c8b6Copy full SHA for 9e0c8b6
tests/rustdoc/source-line-numbers.rs
@@ -0,0 +1,35 @@
1
+// This test ensures that we have the expected number of line generated.
2
+
3
+#![crate_name = "foo"]
4
5
+//@ has 'src/foo/source-line-numbers.rs.html'
6
+//@ count - '//a[@data-nosnippet]' 35
7
+//@ has - '//a[@id="35"]' '35'
8
9
+#[
10
+macro_export
11
+]
12
+macro_rules! bar {
13
+ ($x:ident) => {{
14
+ $x += 2;
15
+ $x *= 2;
16
+ }}
17
+}
18
19
+/*
20
+multi line
21
+comment
22
+*/
23
+fn x(_: u8, _: u8) {}
24
25
+fn foo() {
26
+ let mut y = 0;
27
+ bar!(y);
28
+ println!("
29
+ {y}
30
+ ");
31
+ x(
32
+ 1,
33
+ 2,
34
+ );
35
0 commit comments