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

ices/67552.rs: fixed with errors #390

Merged
merged 1 commit into from
May 31, 2020
Merged

ices/67552.rs: fixed with errors #390

merged 1 commit into from
May 31, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#67552

fn main() {
    rec(Empty);
}

struct Empty;

impl Iterator for Empty {
    type Item = ();
    fn next<'a>(&'a mut self) -> core::option::Option<()> {
        None
    }
}

fn identity<T>(x: T) -> T {
    x
}

fn rec<T>(mut it: T)
where
    T: Iterator,
{
    if () == () {
        T::count(it);
    } else {
        rec(identity(&mut it))
    }
}
=== stdout ===
=== stderr ===
error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut Empty>`
  --> /home/runner/work/glacier/glacier/ices/67552.rs:18:1
   |
18 | / fn rec<T>(mut it: T)
19 | | where
20 | |     T: Iterator,
21 | | {
...  |
26 | |     }
27 | | }
   | |_^

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut Empty>`
  --> /home/runner/work/glacier/glacier/ices/67552.rs:18:1
   |
18 | / fn rec<T>(mut it: T)
19 | | where
20 | |     T: Iterator,
21 | | {
...  |
26 | |     }
27 | | }
   | |_^

error: aborting due to previous error

==============
@JohnTitor JohnTitor merged commit 2436518 into master May 31, 2020
@JohnTitor JohnTitor deleted the autofix/ices/67552.rs branch May 31, 2020 12:17
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