]>
Commit | Line | Data |
---|---|---|
8faf50e0 XL |
1 | // Copyright 2015 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | #![feature(specialization)] | |
12 | ||
13 | // Regression test for #52050: when inserting the blanket impl `I` | |
14 | // into the tree, we had to replace the child node for `Foo`, which | |
0bf4aa26 | 15 | // led to the structure of the tree being messed up. |
8faf50e0 XL |
16 | |
17 | use std::iter::Iterator; | |
18 | ||
19 | trait IntoPyDictPointer { } | |
20 | ||
21 | struct Foo { } | |
22 | ||
23 | impl Iterator for Foo { | |
24 | type Item = (); | |
25 | fn next(&mut self) -> Option<()> { | |
26 | None | |
27 | } | |
28 | } | |
29 | ||
30 | impl IntoPyDictPointer for Foo { } | |
31 | ||
32 | impl<I> IntoPyDictPointer for I | |
33 | where | |
34 | I: Iterator, | |
35 | { | |
36 | } | |
37 | ||
38 | impl IntoPyDictPointer for () //~ ERROR conflicting implementations | |
39 | { | |
40 | } | |
41 | ||
42 | fn main() { } |