diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-02-03 01:28:08 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-02-09 11:29:40 +0100 |
| commit | f3c24833c5af6686e4a1a18a46ed872f27b120ee (patch) | |
| tree | 01d1557c418abe1da27f41c7529b17edc3526752 | |
| parent | f0d002b890a3430e0c61a73cb4708f7fadee94f5 (diff) | |
| download | rust-f3c24833c5af6686e4a1a18a46ed872f27b120ee.tar.gz rust-f3c24833c5af6686e4a1a18a46ed872f27b120ee.zip | |
Add regression test for non local items link generation
| -rw-r--r-- | tests/rustdoc/jump-to-non-local-method.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc/jump-to-non-local-method.rs b/tests/rustdoc/jump-to-non-local-method.rs new file mode 100644 index 00000000000..4f4252a5842 --- /dev/null +++ b/tests/rustdoc/jump-to-non-local-method.rs @@ -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() {} |
