|
| 1 | +$DIR/auxiliary/doctest_crate.rs: |
| 2 | + 1| |/// A function run only from within doctests |
| 3 | + 2| 3|pub fn fn_run_in_doctests(conditional: usize) { |
| 4 | + 3| 3| match conditional { |
| 5 | + 4| 1| 1 => assert_eq!(1, 1), // this is run, |
| 6 | + 5| 1| 2 => assert_eq!(1, 1), // this, |
| 7 | + 6| 1| 3 => assert_eq!(1, 1), // and this too |
| 8 | + 7| 0| _ => assert_eq!(1, 2), // however this is not |
| 9 | + 8| | } |
| 10 | + 9| 3|} |
| 11 | + |
1 | 12 | $DIR/doctest.rs:
|
2 | 13 | 1| |//! This test ensures that code from doctests is properly re-mapped.
|
3 | 14 | 2| |//! See <https://github.com/rust-lang/rust/issues/79417> for more info.
|
@@ -102,14 +113,3 @@ $DIR/doctest.rs:
|
102 | 113 | 98| |// what affect it might have on diagnostic messages from the compiler, and whether anyone would care
|
103 | 114 | 99| |// if the indentation changed. I don't know if there is a more viable solution.
|
104 | 115 |
|
105 |
| -$DIR/auxiliary/doctest_crate.rs: |
106 |
| - 1| |/// A function run only from within doctests |
107 |
| - 2| 3|pub fn fn_run_in_doctests(conditional: usize) { |
108 |
| - 3| 3| match conditional { |
109 |
| - 4| 1| 1 => assert_eq!(1, 1), // this is run, |
110 |
| - 5| 1| 2 => assert_eq!(1, 1), // this, |
111 |
| - 6| 1| 3 => assert_eq!(1, 1), // and this too |
112 |
| - 7| 0| _ => assert_eq!(1, 2), // however this is not |
113 |
| - 8| | } |
114 |
| - 9| 3|} |
115 |
| - |
0 commit comments