Skip to content

Commit 52be350

Browse files
committed
Add test for #105025
1 parent 881bd86 commit 52be350

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pub trait Trait {
2+
/// [`Enum::Variant`]
3+
fn method() {}
4+
}
5+
6+
pub enum Enum {
7+
Variant,
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/105025>
2+
// aux-build: enum_variant_in_trait_method.rs
3+
4+
extern crate enum_variant_in_trait_method;
5+
6+
pub struct Local;
7+
8+
/// local impl
9+
impl enum_variant_in_trait_method::Trait for Local {}
10+
11+
// @!has "$.index[*][?(@.name == 'Trait')]"
12+
// @!has "$.index[*][?(@.name == 'method')]"
13+
// @count "$.index[*][?(@.docs == 'local impl')].inner.items[*]" 0

0 commit comments

Comments
 (0)