diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-03-18 23:27:36 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-03-23 12:53:30 +0100 |
| commit | c8c342c07276e5b1864780ac70b55b52afa3ed60 (patch) | |
| tree | 7b042fd61aa26b7e7acba76abcf13d0911d0bf28 | |
| parent | 1dad788d8d18672e79d20c832c9219967421f11d (diff) | |
| download | rust-c8c342c07276e5b1864780ac70b55b52afa3ed60.tar.gz rust-c8c342c07276e5b1864780ac70b55b52afa3ed60.zip | |
Add regression test for #109282
| -rw-r--r-- | tests/rustdoc-ui/issue-109282-import-inline-merge.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/issue-109282-import-inline-merge.rs b/tests/rustdoc-ui/issue-109282-import-inline-merge.rs new file mode 100644 index 00000000000..0ec8523222f --- /dev/null +++ b/tests/rustdoc-ui/issue-109282-import-inline-merge.rs @@ -0,0 +1,14 @@ +// Regression test for <https://github.com/rust-lang/rust/issues/109282>. +// Import for `ValueEnum` is inlined and doc comments on the import and `ValueEnum` itself are +// merged. After the merge they still have correct parent scopes to resolve both `[ValueEnum]`. + +// check-pass + +mod m { + pub enum ValueEnum {} +} +mod m2 { + /// [`ValueEnum`] + pub use crate::m::ValueEnum; +} +pub use m2::ValueEnum; |
