Skip to content

Commit

Permalink
Add regression test for non local items link generation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 5, 2024
1 parent b6aea72 commit 7251120
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/rustdoc/jump-to-non-local-method.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 7251120

Please sign in to comment.