Skip to content

[rustdoc] Correctly generate path for non-local items in source code pages #120596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 10, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Add regression test for non local items link generation
  • Loading branch information
GuillaumeGomez committed Feb 9, 2024
commit f3c24833c5af6686e4a1a18a46ed872f27b120ee
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() {}