Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
issues
/
issue-17068.rs
blob: af565da3366b94ea88fe767e3843f924dc3100bd [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
// Test that regionck creates the right region links in the pattern
// binding of a for loop
fn
foo
<
'a>(v: &'
a
[
usize
])
->
&
'
a usize
{
for
&
ref
x in v
{
return
x
;
}
unreachable
!()
}
fn
main
()
{
assert_eq
!(
foo
(&[
0
]),
&
0
);
}