1 // Unit test for the "user substitutions" that are annotated on each
5 fn method
<U
>(&self, arg
: T
, arg2
: U
) { }
8 impl<T
, U
> Bazoom
<U
> for T
{
15 a
.method(b
, &c
); // OK
18 fn annot_underscore() {
22 a
.method
::<_
>(b
, &c
); // OK
25 fn annot_reference_any_lifetime() {
29 a
.method
::<&u32>(b
, &c
); // OK
32 fn annot_reference_static_lifetime() {
36 a
.method
::<&'
static u32>(b
, &c
); //~ ERROR
39 fn annot_reference_named_lifetime
<'a
>(_d
: &'a
u32) {
43 a
.method
::<&'a
u32>(b
, &c
); //~ ERROR
46 fn annot_reference_named_lifetime_ok
<'a
>(c
: &'a
u32) {
49 a
.method
::<&'a
u32>(b
, c
);
52 fn annot_reference_named_lifetime_in_closure
<'a
>(_
: &'a
u32) {
57 a
.method
::<&'a
u32>(b
, &c
); //~ ERROR
61 fn annot_reference_named_lifetime_in_closure_ok
<'a
>(c
: &'a
u32) {
65 a
.method
::<&'a
u32>(b
, c
);