You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc does not filter correctly doctests when their name contain spaces. #88263
If one run rustdoc main.rs --test --test-args 'Iter<T, P>::len', he will expect that only
the doctest of Iter<T, P>::len will be run. But the two doctests will be run.
Below is the output of rustdoc main.rs --test --test-args 'Iter<T, P>::len'
running 2 tests
test main.rs - Iter<T, P>::len (line 4) ... ok
test main.rs - Iter2<T, P>::len (line 13) ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s
The problem seems to be the space: it looks like, in the example above, rustdoc will run all tests that matches 'P>::len' (in the argument 'Iter<T, P>::len' there is a space between the , and the P).
Meta
This bug is present since at least one year in all releases.
Activity
GuillaumeGomez commentedon Oct 1, 2021
I think that the solution here would be to replace white spaces with dash because we split on white spaces.
Rollup merge of rust-lang#89422 - GuillaumeGomez:doctest-whitespace-n…