Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
traits
/
issue-40085.rs
blob: 22679b20d1604c75ef0e1c5f9a28774e9f9c5bcf [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
use
std
::
ops
::
Index
;
fn
bar
()
{}
static
UNIT
:
()
=
();
struct
S
;
impl
Index
<
fn
()>
for
S
{
type
Output
=
();
fn
index
(&
self
,
_
:
fn
())
->
&()
{
&
UNIT
}
}
fn
main
()
{
S
.
index
(
bar
);
S
[
bar
];
}