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

ices/72911.rs: fixed with errors #448

Merged
merged 1 commit into from
Jul 25, 2020
Merged

ices/72911.rs: fixed with errors #448

merged 1 commit into from
Jul 25, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#72911

pub struct Lint {}

impl Lint {}

/// Gathers all files in `src/clippy_lints` and gathers all lints inside
pub fn gather_all() -> impl Iterator<Item = Lint> {
    lint_files().flat_map(|f| gather_from_file(&f))
}

fn gather_from_file(dir_entry: &walkdir::DirEntry) -> impl Iterator<Item = Lint> {
    unimplemented!()
}

/// Collects all .rs files in the `clippy_lints/src` directory
fn lint_files() -> impl Iterator<Item = walkdir::DirEntry> {
    unimplemented!()
}

pub fn main() {}
=== stdout ===
=== stderr ===
error[E0433]: failed to resolve: use of undeclared type or module `walkdir`
  --> /home/runner/work/glacier/glacier/ices/72911.rs:10:33
   |
10 | fn gather_from_file(dir_entry: &walkdir::DirEntry) -> impl Iterator<Item = Lint> {
   |                                 ^^^^^^^ use of undeclared type or module `walkdir`

error[E0433]: failed to resolve: use of undeclared type or module `walkdir`
  --> /home/runner/work/glacier/glacier/ices/72911.rs:15:41
   |
15 | fn lint_files() -> impl Iterator<Item = walkdir::DirEntry> {
   |                                         ^^^^^^^ use of undeclared type or module `walkdir`

error[E0720]: cannot resolve opaque type
  --> /home/runner/work/glacier/glacier/ices/72911.rs:6:24
   |
6  | pub fn gather_all() -> impl Iterator<Item = Lint> {
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
7  |     lint_files().flat_map(|f| gather_from_file(&f))
   |     -----------------------------------------------
   |     |
   |     returning here with type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`
   |     returning here with type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`
...
10 | fn gather_from_file(dir_entry: &walkdir::DirEntry) -> impl Iterator<Item = Lint> {
   |                                                       -------------------------- returning this opaque type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`
...
15 | fn lint_files() -> impl Iterator<Item = walkdir::DirEntry> {
   |                    --------------------------------------- returning this opaque type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0433, E0720.
For more information about an error, try `rustc --explain E0433`.
==============

=== stdout ===
=== stderr ===
error[E0433]: failed to resolve: use of undeclared type or module `walkdir`
  --> /home/runner/work/glacier/glacier/ices/72911.rs:10:33
   |
10 | fn gather_from_file(dir_entry: &walkdir::DirEntry) -> impl Iterator<Item = Lint> {
   |                                 ^^^^^^^ use of undeclared type or module `walkdir`

error[E0433]: failed to resolve: use of undeclared type or module `walkdir`
  --> /home/runner/work/glacier/glacier/ices/72911.rs:15:41
   |
15 | fn lint_files() -> impl Iterator<Item = walkdir::DirEntry> {
   |                                         ^^^^^^^ use of undeclared type or module `walkdir`

error[E0720]: cannot resolve opaque type
  --> /home/runner/work/glacier/glacier/ices/72911.rs:6:24
   |
6  | pub fn gather_all() -> impl Iterator<Item = Lint> {
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
7  |     lint_files().flat_map(|f| gather_from_file(&f))
   |     -----------------------------------------------
   |     |
   |     returning here with type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`
   |     returning here with type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`
...
10 | fn gather_from_file(dir_entry: &walkdir::DirEntry) -> impl Iterator<Item = Lint> {
   |                                                       -------------------------- returning this opaque type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`
...
15 | fn lint_files() -> impl Iterator<Item = walkdir::DirEntry> {
   |                    --------------------------------------- returning this opaque type `std::iter::FlatMap<impl std::iter::Iterator, [type error], [closure@/home/runner/work/glacier/glacier/ices/72911.rs:7:27: 7:51]>`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0433, E0720.
For more information about an error, try `rustc --explain E0433`.
==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ICE no longer happens.

@JohnTitor JohnTitor merged commit 5b0eb47 into master Jul 25, 2020
@JohnTitor JohnTitor deleted the autofix/ices/72911.rs branch July 25, 2020 12:21
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