]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-28936.rs
2 pub type Session
= i32;
3 pub struct StreamParser
<'a
, T
> {
5 _session
: &'a
mut Session
,
8 impl<'a
, T
> StreamParser
<'a
, T
> {
9 pub fn thing(&mut self) -> bool { true }
12 pub fn parse_stream
<T
: Iterator
<Item
=i32>, U
, F
>(
13 _session
: &mut Session
, _tokens
: T
, _f
: F
) -> U
14 where F
: Fn(&mut StreamParser
<T
>) -> U { panic!(); }
16 pub fn thing(session
: &mut Session
) {
17 let mut stream
= vec
![1, 2, 3].into_iter();
19 let _b
= parse_stream(session
,
21 // replacing the above with the following fixes it