Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
generic-associated-types
/
issue-68649-pass.rs
blob: 9e4384b1a54b1ae65bd1528f95417f92910bb991 [
file
] [
log
] [
blame
]
//@ check-pass
trait
Fun
{
type
F
<
'
a
>;
fn
identity
<
'a>(t: Self::F<'
a
>)
->
Self
::
F
<
'
a
>
{
t
}
}
impl
<
T
>
Fun
for
T
{
type
F
<
'
a
>
=
Self
;
}
fn
bug
<
'a, T: Fun<F<'
a
>
=
T
>>(
t
:
T
)
->
T
::
F
<
'
a
>
{
T
::
identity
(
t
)
}
fn
main
()
{
let
x
=
10
;
bug
(
x
);
}