1 struct Example
<const N
: usize>;
3 macro_rules
! external_macro
{
5 //~^ ERROR expected type
11 trait Marker
<const N
: usize> {}
12 impl<const N
: usize> Marker
<N
> for Example
<N
> {}
14 fn make_marker() -> impl Marker
<gimme_a_const
!(marker
)> {
15 //~^ ERROR: type provided when a constant was expected
16 Example
::<gimme_a_const
!(marker
)>
19 fn from_marker(_
: impl Marker
<{
21 macro_rules
! inline { () => {{ 3 }
} }; inline
!()
27 macro_rules
! gimme_a_const
{
28 ($rusty
: ident
) => {{ let $rusty = 3; *&$rusty }
}
29 //~^ ERROR expected type
30 //~| ERROR expected type
35 let _fail
= Example
::<external_macro
!()>;
37 let _fail
= Example
::<gimme_a_const
!()>;
38 //~^ ERROR unexpected end of macro invocation