add inherent-method-collision test
This commit is contained in:
parent
32408cf0d9
commit
19ba219e99
15
src/test/ui/rust-2021/inherent-method-collision.rs
Normal file
15
src/test/ui/rust-2021/inherent-method-collision.rs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Test that we do NOT warn for inherent methods invoked via `T::` form.
|
||||||
|
//
|
||||||
|
// check-pass
|
||||||
|
|
||||||
|
#![deny(future_prelude_collision)]
|
||||||
|
|
||||||
|
pub struct MySeq {}
|
||||||
|
|
||||||
|
impl MySeq {
|
||||||
|
pub fn from_iter(_: impl IntoIterator<Item = u32>) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
MySeq::from_iter(Some(22));
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user