]>
Commit | Line | Data |
---|---|---|
83c7162d | 1 | #![feature(rustc_attrs)] |
ea8adc8c XL |
2 | |
3 | fn func<#[rustc_synthetic] T>(_: T) {} | |
4 | ||
5 | struct Foo; | |
6 | ||
7 | impl Foo { | |
8 | pub fn func<#[rustc_synthetic] T>(_: T) {} | |
9 | } | |
10 | ||
11 | struct Bar<S> { | |
12 | t: S | |
13 | } | |
14 | ||
15 | impl<S> Bar<S> { | |
16 | pub fn func<#[rustc_synthetic] T>(_: T) {} | |
17 | } | |
18 | ||
19 | fn main() { | |
e74abb32 | 20 | func::<u8>(42); //~ ERROR cannot provide explicit generic arguments |
ea8adc8c XL |
21 | func(42); // Ok |
22 | ||
e74abb32 | 23 | Foo::func::<u8>(42); //~ ERROR cannot provide explicit generic arguments |
ea8adc8c XL |
24 | Foo::func(42); // Ok |
25 | ||
e74abb32 | 26 | Bar::<i8>::func::<u8>(42); //~ ERROR cannot provide explicit generic arguments |
ea8adc8c XL |
27 | Bar::<i8>::func(42); // Ok |
28 | } |