]> git.lizzy.rs Git - rust.git/blob - tests/ui/specialization/issue-52050.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / specialization / issue-52050.rs
1 #![feature(specialization)] //~ WARN the feature `specialization` is incomplete
2
3 // Regression test for #52050: when inserting the blanket impl `I`
4 // into the tree, we had to replace the child node for `Foo`, which
5 // led to the structure of the tree being messed up.
6
7 use std::iter::Iterator;
8
9 trait IntoPyDictPointer { }
10
11 struct Foo { }
12
13 impl Iterator for Foo {
14     type Item = ();
15     fn next(&mut self) -> Option<()> {
16         None
17     }
18 }
19
20 impl IntoPyDictPointer for Foo { }
21
22 impl<I> IntoPyDictPointer for I
23 where
24     I: Iterator,
25 {
26 }
27
28 impl IntoPyDictPointer for () //~ ERROR conflicting implementations
29 {
30 }
31
32 fn main() { }