]>
git.proxmox.com Git - rustc.git/blob - tests/ui/type/type-mismatch.rs
1 #![allow(non_camel_case_types)]
9 struct Foo
<T
, U
: Qux
= A
, V
: Qux
= B
>(T
, U
, V
);
16 fn have_usize(f
: usize) {
17 want
::<foo
>(f
); //~ ERROR mismatched types
18 want
::<bar
>(f
); //~ ERROR mismatched types
19 want
::<Foo
<usize>>(f
); //~ ERROR mismatched types
20 want
::<Foo
<usize, B
>>(f
); //~ ERROR mismatched types
21 want
::<Foo
<foo
>>(f
); //~ ERROR mismatched types
22 want
::<Foo
<foo
, B
>>(f
); //~ ERROR mismatched types
23 want
::<Foo
<bar
>>(f
); //~ ERROR mismatched types
24 want
::<Foo
<bar
, B
>>(f
); //~ ERROR mismatched types
28 want
::<usize>(f
); //~ ERROR mismatched types
29 want
::<bar
>(f
); //~ ERROR mismatched types
30 want
::<Foo
<usize>>(f
); //~ ERROR mismatched types
31 want
::<Foo
<usize, B
>>(f
); //~ ERROR mismatched types
32 want
::<Foo
<foo
>>(f
); //~ ERROR mismatched types
33 want
::<Foo
<foo
, B
>>(f
); //~ ERROR mismatched types
34 want
::<Foo
<bar
>>(f
); //~ ERROR mismatched types
35 want
::<Foo
<bar
, B
>>(f
); //~ ERROR mismatched types
38 fn have_foo_foo(f
: Foo
<foo
>) {
39 want
::<usize>(f
); //~ ERROR mismatched types
40 want
::<foo
>(f
); //~ ERROR mismatched types
41 want
::<bar
>(f
); //~ ERROR mismatched types
42 want
::<Foo
<usize>>(f
); //~ ERROR mismatched types
43 want
::<Foo
<usize, B
>>(f
); //~ ERROR mismatched types
44 want
::<Foo
<foo
, B
>>(f
); //~ ERROR mismatched types
45 want
::<Foo
<bar
>>(f
); //~ ERROR mismatched types
46 want
::<Foo
<bar
, B
>>(f
); //~ ERROR mismatched types
47 want
::<&Foo
<foo
>>(f
); //~ ERROR mismatched types
48 want
::<&Foo
<foo
, B
>>(f
); //~ ERROR mismatched types
51 fn have_foo_foo_b(f
: Foo
<foo
, B
>) {
52 want
::<usize>(f
); //~ ERROR mismatched types
53 want
::<foo
>(f
); //~ ERROR mismatched types
54 want
::<bar
>(f
); //~ ERROR mismatched types
55 want
::<Foo
<usize>>(f
); //~ ERROR mismatched types
56 want
::<Foo
<usize, B
>>(f
); //~ ERROR mismatched types
57 want
::<Foo
<foo
>>(f
); //~ ERROR mismatched types
58 want
::<Foo
<bar
>>(f
); //~ ERROR mismatched types
59 want
::<Foo
<bar
, B
>>(f
); //~ ERROR mismatched types
60 want
::<&Foo
<foo
>>(f
); //~ ERROR mismatched types
61 want
::<&Foo
<foo
, B
>>(f
); //~ ERROR mismatched types
64 fn have_foo_foo_b_a(f
: Foo
<foo
, B
, A
>) {
65 want
::<usize>(f
); //~ ERROR mismatched types
66 want
::<foo
>(f
); //~ ERROR mismatched types
67 want
::<bar
>(f
); //~ ERROR mismatched types
68 want
::<Foo
<usize>>(f
); //~ ERROR mismatched types
69 want
::<Foo
<usize, B
>>(f
); //~ ERROR mismatched types
70 want
::<Foo
<foo
>>(f
); //~ ERROR mismatched types
71 want
::<Foo
<foo
, B
>>(f
); //~ ERROR mismatched types
72 want
::<Foo
<bar
>>(f
); //~ ERROR mismatched types
73 want
::<Foo
<bar
, B
>>(f
); //~ ERROR mismatched types
74 want
::<&Foo
<foo
>>(f
); //~ ERROR mismatched types
75 want
::<&Foo
<foo
, B
>>(f
); //~ ERROR mismatched types