diff options
| author | Michael Howell <michael@notriddle.com> | 2022-05-10 08:59:59 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-05-10 08:59:59 -0700 |
| commit | 6257bd2f4ef748d9bad0c60d0df5201e824f4fde (patch) | |
| tree | 111e5f4dd4261311d629ca25fff1575b42d5a88d /src/test/rustdoc-js | |
| parent | bb4ecc3fd8d0d8c0fa490feba294e300185862e6 (diff) | |
| download | rust-6257bd2f4ef748d9bad0c60d0df5201e824f4fde.tar.gz rust-6257bd2f4ef748d9bad0c60d0df5201e824f4fde.zip | |
rustdoc: clean up method path index
This removes a special case that doesn't seem to do anything any more.
Diffstat (limited to 'src/test/rustdoc-js')
| -rw-r--r-- | src/test/rustdoc-js/foreign-type-path.js | 9 | ||||
| -rw-r--r-- | src/test/rustdoc-js/foreign-type-path.rs | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/rustdoc-js/foreign-type-path.js b/src/test/rustdoc-js/foreign-type-path.js new file mode 100644 index 00000000000..334761badca --- /dev/null +++ b/src/test/rustdoc-js/foreign-type-path.js @@ -0,0 +1,9 @@ +const QUERY = 'MyForeignType::my_method'; + +const EXPECTED = { + 'others': [ + // Test case for https://github.com/rust-lang/rust/pull/96887#pullrequestreview-967154358 + // Validates that the parent path for a foreign type method is correct. + { 'path': 'foreign_type_path::aaaaaaa::MyForeignType', 'name': 'my_method' }, + ], +}; diff --git a/src/test/rustdoc-js/foreign-type-path.rs b/src/test/rustdoc-js/foreign-type-path.rs new file mode 100644 index 00000000000..83400104ea7 --- /dev/null +++ b/src/test/rustdoc-js/foreign-type-path.rs @@ -0,0 +1,13 @@ +#![feature(extern_types)] + +pub mod aaaaaaa { + + extern { + pub type MyForeignType; + } + + impl MyForeignType { + pub fn my_method() {} + } + +} |
