Sign in
android
/
toolchain
/
rustc
/
5139364148b53d79de1b5e778004d41a6a33a4a2
/
.
/
tests
/
ui
/
type
/
type-check
/
point-at-inference-issue-116155.rs
blob: 1e9942d42e86720ebd6b128a43e5b261dc51452b [
file
] [
log
] [
blame
]
struct
S
<
T
>(
T
);
impl
<
T
>
S
<
T
>
{
fn
new
()
->
Self
{
loop
{}
}
fn
constrain
<
F
:
Fn
()
->
T
>(&
self
,
_f
:
F
)
{}
}
fn
main
()
{
let
s
=
S
::
new
();
let
c
=
||
true
;
s
.
constrain
(
c
);
let
_
:
S
<
usize
>
=
s
;
//~^ ERROR mismatched types
}