]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-5554.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-5554.rs
1 // run-pass
2 #![allow(dead_code)]
3 // pretty-expanded FIXME #23616
4
5 use std::default::Default;
6
7 pub struct X<T> {
8 a: T,
9 }
10
11 // reordering these bounds stops the ICE
12 //
13 // nmatsakis: This test used to have the bounds Default + PartialEq +
14 // Default, but having duplicate bounds became illegal.
15 impl<T: Default + PartialEq> Default for X<T> {
16 fn default() -> X<T> {
17 X { a: Default::default() }
18 }
19 }
20
21 macro_rules! constants {
22 () => {
23 let _ : X<isize> = Default::default();
24 }
25 }
26
27 pub fn main() {
28 constants!();
29 }