Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 19ba219

Browse files
committed
add inherent-method-collision test
1 parent 32408cf commit 19ba219

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Test that we do NOT warn for inherent methods invoked via `T::` form.
2+
//
3+
// check-pass
4+
5+
#![deny(future_prelude_collision)]
6+
7+
pub struct MySeq {}
8+
9+
impl MySeq {
10+
pub fn from_iter(_: impl IntoIterator<Item = u32>) {}
11+
}
12+
13+
fn main() {
14+
MySeq::from_iter(Some(22));
15+
}

0 commit comments

Comments
 (0)