]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-71546.rs
Rollup merge of #98429 - b-naber:use-correct-substs-discriminant-cast, r=lcnr
[rust.git] / src / test / ui / borrowck / issue-71546.rs
1 // Regression test for #71546.
2 //
3 // Made to pass as part of fixing #98095.
4 //
5 // check-pass
6
7 pub fn serialize_as_csv<V>(value: &V) -> Result<String, &str>
8 where
9     V: 'static,
10     for<'a> &'a V: IntoIterator,
11     for<'a> <&'a V as IntoIterator>::Item: ToString + 'static,
12 {
13     let csv_str: String = value.into_iter().map(|elem| elem.to_string()).collect::<String>();
14     Ok(csv_str)
15 }
16
17 fn main() {}