Add a test to ensure Fuse stays covariant
This commit is contained in:
parent
d3cba254e4
commit
a3344d1a3a
@ -1,9 +1,10 @@
|
||||
// run-pass
|
||||
|
||||
#![allow(warnings)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use std::iter::Zip;
|
||||
use std::iter::{Fuse, Zip};
|
||||
|
||||
fn fuse_covariant<'a, I>(iter: Fuse<&'static I>) -> Fuse<&'a I> { iter }
|
||||
fn zip_covariant<'a, A, B>(iter: Zip<&'static A, &'static B>) -> Zip<&'a A, &'a B> { iter }
|
||||
|
||||
fn main() { }
|
||||
|
Loading…
Reference in New Issue
Block a user