Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
impl-trait
/
does-not-live-long-enough.rs
blob: d2a345231eb438687fe02d40b38bc2c9edfca400 [
file
] [
log
] [
blame
]
struct
List
{
data
:
Vec
<
String
>,
}
impl
List
{
fn
started_with
<
'a>(&'
a
self
,
prefix
:
&
'a str) -> impl Iterator<Item=&'
a str
>
{
self
.
data
.
iter
().
filter
(|
s
|
s
.
starts_with
(
prefix
)).
map
(|
s
|
s
.
as_ref
())
//~^ ERROR E0373
}
}
fn
main
()
{}