Add regression test for non local items link generation
This commit is contained in:
parent
f0d002b890
commit
f3c24833c5
1 changed files with 15 additions and 0 deletions
15
tests/rustdoc/jump-to-non-local-method.rs
Normal file
15
tests/rustdoc/jump-to-non-local-method.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// compile-flags: -Zunstable-options --generate-link-to-definition
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
use std::sync::atomic::AtomicIsize;
|
||||
|
||||
// @has 'src/foo/jump-to-non-local-method.rs.html'
|
||||
// @has - '//a[@href="https://doc.rust-lang.org/nightly/core/sync/atomic/struct.AtomicIsize.html#method.new"]' 'AtomicIsize::new'
|
||||
|
||||
pub fn bar() {
|
||||
let _ = AtomicIsize::new(0);
|
||||
b();
|
||||
}
|
||||
|
||||
fn b() {}
|
Loading…
Add table
Reference in a new issue