Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d80ac14
Extend rustdoc-js tester to allow to test multiple queries in one file
GuillaumeGomez Apr 30, 2020
7590c39
Improve doc alias JS code
GuillaumeGomez Apr 30, 2020
cf41b1d
Improve doc alias discovery
GuillaumeGomez Apr 30, 2020
3a0727e
Add more tests for doc aliases
GuillaumeGomez Apr 30, 2020
9697c46
Update std tests
GuillaumeGomez Apr 30, 2020
f581cf7
Merge aliases and search-index
GuillaumeGomez May 4, 2020
ce915f5
remove extra space from crate-level doctest names
euclio May 13, 2020
883c177
Move doc alias discovery into the Attributes struct and some code imp…
GuillaumeGomez May 4, 2020
c4d9318
Make current crate aliases go first
GuillaumeGomez May 7, 2020
e17ac66
* Update aliases data struct from HashMap to BTreeMap to have more de…
GuillaumeGomez May 13, 2020
8954379
make sure even unleashed miri does not do pointer stuff
RalfJung May 14, 2020
e84b379
[const-prop] Don't replace Rvalues that are already constants
wesleywiser Apr 23, 2020
257e377
doc: add links to rotate_(left|right)
tesuji May 15, 2020
00268be
Remove lang_items\(\).*\.unwrap\(\)
cofibrant May 14, 2020
45ee336
Fix {:#?} representation of proc_macro::Literal
dtolnay May 15, 2020
4c4b4c4
Add test of proc_macro::TokenStream's Debug
dtolnay May 15, 2020
bea2c59
Clarify use of format_args in Debug for Literal
dtolnay May 15, 2020
bfdd000
Rollup merge of #71724 - GuillaumeGomez:doc-alias-improvements, r=oll…
Dylan-DPC May 15, 2020
05cf6a1
Rollup merge of #72180 - euclio:rustdoc-test-extra-space, r=Dylan-DPC
Dylan-DPC May 15, 2020
6105499
Rollup merge of #72216 - doctorn:require-lang-item, r=lcnr
Dylan-DPC May 15, 2020
d02484e
Rollup merge of #72218 - RalfJung:test-unleashed-ptrs, r=oli-obk
Dylan-DPC May 15, 2020
ec0fdfc
Rollup merge of #72220 - wesleywiser:const_prop_eval_consts, r=oli-obk
Dylan-DPC May 15, 2020
4a85552
Rollup merge of #72224 - lzutao:links, r=Dylan-DPC
Dylan-DPC May 15, 2020
707625b
Rollup merge of #72233 - dtolnay:literal, r=petrochenkov
Dylan-DPC May 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,11 @@ impl Collector {
}

fn generate_name(&self, line: usize, filename: &FileName) -> String {
format!("{} - {} (line {})", filename, self.names.join("::"), line)
let mut item_path = self.names.join("::");
if !item_path.is_empty() {
item_path.push(' ');
}
format!("{} - {}(line {})", filename, item_path, line)
}

pub fn set_position(&mut self, position: Span) {
Expand Down
15 changes: 15 additions & 0 deletions src/test/rustdoc-ui/doctest-output.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// compile-flags:--test
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
// check-pass

//! ```
//! assert_eq!(1 + 1, 2);
//! ```

pub mod foo {

/// ```
/// assert_eq!(1 + 1, 2);
/// ```
pub fn bar() {}
}
7 changes: 7 additions & 0 deletions src/test/rustdoc-ui/doctest-output.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

running 2 tests
test $DIR/doctest-output.rs - (line 5) ... ok
test $DIR/doctest-output.rs - foo::bar (line 11) ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out