]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-ui/no-run-flag.rs
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / rustdoc-ui / no-run-flag.rs
1 // test the behavior of the --no-run flag
2
3 // check-pass
4 // compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
5 // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
6 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
7
8 /// ```
9 /// let a = true;
10 /// ```
11 /// ```should_panic
12 /// panic!()
13 /// ```
14 /// ```ignore (incomplete-code)
15 /// fn foo() {
16 /// ```
17 /// ```no_run
18 /// loop {
19 ///     println!("Hello, world");
20 /// }
21 /// ```
22 /// fails to compile
23 /// ```compile_fail
24 /// let x = 5;
25 /// x += 2; // shouldn't compile!
26 /// ```
27 /// Ok the test does not run
28 /// ```
29 /// panic!()
30 /// ```
31 /// Ok the test does not run
32 /// ```should_panic
33 /// loop {
34 ///     println!("Hello, world");
35 /// panic!()
36 /// }
37 /// ```
38 pub fn f() {}