Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/71546-2.rs: fixed with errors #1027

Merged
merged 1 commit into from
Dec 4, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 4, 2021

Issue: rust-lang/rust#71546

pub fn serialize_as_csv<V>(value: &V) -> Result<String, &str>
where
    V: 'static,
    for<'a> &'a V: IntoIterator,
    for<'a> <&'a V as IntoIterator>::Item: ToString + 'static,
{
    let csv_str: String = value
        .into_iter()
        .map(|elem| elem.to_string())
        .collect::<String>();
    Ok(csv_str)
}

fn main() {}
=== stdout ===
=== stderr ===
error: higher-ranked lifetime error
 --> /home/runner/work/glacier/glacier/ices/71546-2.rs:9:14
  |
9 |         .map(|elem| elem.to_string())
  |              ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: could not prove for<'a> <&'a V as IntoIterator>::Item: 'static

error: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: higher-ranked lifetime error
 --> /home/runner/work/glacier/glacier/ices/71546-2.rs:9:14
  |
9 |         .map(|elem| elem.to_string())
  |              ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: could not prove for<'a> <&'a V as IntoIterator>::Item: 'static

error: aborting due to previous error

==============
@Alexendoo Alexendoo merged commit 3393c9d into master Dec 4, 2021
@Alexendoo Alexendoo deleted the autofix/ices/71546-2.rs branch December 4, 2021 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants