Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: Failed to normalize <std::option::Option<&std::option::Option<usize>> as std::iter::Iterator>::Item #8662

Closed
irevoire opened this issue Apr 8, 2022 · 15 comments

Comments

@irevoire
Copy link

irevoire commented Apr 8, 2022

Hello, we encounter a ICE with Clippy in our CI.
I can't reproduce the error locally though.
You can look at it here: https://github.com/meilisearch/meilisearch/runs/5883955221?check_suite_focus=true
Hope that helps!

@fasterthanlime
Copy link

fasterthanlime commented Apr 8, 2022

Seeing this in our CI too - ours is a proprietary codebase so I can't share the code, but here's the full error:

cargo clippy --all-targets
    Checking fly-proxy v0.1.0 (/home/amos/work/fly-proxy/crates/fly-proxy)
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:179:90: Failed to normalize > as std::iter::Iterator>::Item, maybe try to call `try_normalize_erasing_regions` instead

thread 'rustc' panicked at 'Box', compiler/rustc_errors/src/lib.rs:1160:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.60 (7737e0b 2022-04-04)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
thread 'rustc' panicked at 'Box', compiler/rustc_errors/src/lib.rs:1160:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.60 (7737e0b 2022-04-04)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `fly-proxy`
warning: build failed, waiting for other jobs to finish...
error: build failed
error: Recipe `check` failed on line 15 with exit code 101

This happens on 1.60, didn't happen on 1.59.

@Jarcho
Copy link
Contributor

Jarcho commented Apr 8, 2022

I think this was fixed with #8602. Can you check once 2022-04-08 is available?

@fasterthanlime
Copy link

fasterthanlime commented Apr 9, 2022

Still seeing a similar error with 2022-04-08:

click for surprise ICE
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:179:90: Failed to normalize > as std::iter::Iterator>::Item, maybe try to call `try_normalize_erasing_regions` instead

thread 'rustc' panicked at 'Box', /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/compiler/rustc_errors/src/lib.rs:1349:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.61 (e745b4d 2022-04-07)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
warning: fly-proxy (lib) generated 1 warning
error: could not compile fly-proxy; 1 warning emitted

full backtrace (RUST_BACKTRACE=1)
thread 'rustc' panicked at 'Box', /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/compiler/rustc_errors/src/lib.rs:1349:9
stack backtrace:
   0: std::panicking::begin_panic::
   1: std::panic::panic_any::
   2: ::bug::<&alloc::string::String>
   3: ::bug::<&alloc::string::String>
   4: rustc_middle::ty::context::tls::with_opt::::{closure#0}, ()>
   5: rustc_middle::util::bug::opt_span_bug_fmt::
   6: rustc_middle::util::bug::bug_fmt
   7: ::fold_ty
   8: clippy_utils::ty::get_associated_type
   9: clippy_lints::methods::iter_overeager_cloned::check
  10: ::check_expr
  11: ::check_expr
  12:  as rustc_hir::intravisit::Visitor>::visit_expr
  13: rustc_hir::intravisit::walk_expr::>
  14:  as rustc_hir::intravisit::Visitor>::visit_expr
  15:  as rustc_hir::intravisit::Visitor>::visit_block
  16:  as rustc_hir::intravisit::Visitor>::visit_expr
  17:  as rustc_hir::intravisit::Visitor>::visit_nested_body
  18:  as rustc_hir::intravisit::Visitor>::visit_fn
  19: rustc_hir::intravisit::walk_impl_item::>
  20:  as rustc_hir::intravisit::Visitor>::visit_nested_impl_item
  21: rustc_hir::intravisit::walk_impl_item_ref::>
  22: rustc_hir::intravisit::walk_item::>
  23:  as rustc_hir::intravisit::Visitor>::visit_nested_item
  24: rustc_hir::intravisit::walk_mod::>
  25:  as rustc_hir::intravisit::Visitor>::visit_mod
  26:  as rustc_hir::intravisit::Visitor>::visit_nested_item
  27: rustc_hir::intravisit::walk_mod::>
  28:  as rustc_hir::intravisit::Visitor>::visit_mod
  29:  as rustc_hir::intravisit::Visitor>::visit_nested_item
  30: rustc_hir::intravisit::walk_mod::>
  31:  as rustc_hir::intravisit::Visitor>::visit_mod
  32: rustc_lint::late::late_lint_pass_crate::
  33: rustc_lint::late::late_lint_crate::
  34: ::time::<(), rustc_lint::late::check_crate::{closure#0}::{closure#0}>
  35: ::time::<(), rustc_interface::passes::analysis::{closure#5}::{closure#0}::{closure#2}::{closure#0}>
  36:  as core::ops::function::FnOnce<()>>::call_once
  37: ::time::<(), rustc_interface::passes::analysis::{closure#5}>
  38: rustc_interface::passes::analysis
  39: >::with_task::>
  40: rustc_query_system::query::plumbing::try_execute_query::>>
  41: rustc_query_system::query::plumbing::get_query::
  42: ::enter::>
  43: ::enter::, rustc_errors::ErrorGuaranteed>>
  44: rustc_span::with_source_map::, rustc_interface::interface::create_compiler_and_run, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  45: >::set::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

irevoire added a commit to meilisearch/meilisearch that referenced this issue Apr 11, 2022
There is currently an issue with clippy that stops us from merging PRs.
rust-lang/rust-clippy#8662 (comment)

We can't use clippy in the CI while that's not merged
bors bot added a commit to meilisearch/meilisearch that referenced this issue Apr 11, 2022
2304: chore(bors): comments clippy out r=curquiza a=irevoire

There is currently an issue with clippy that stops us from merging PRs.
rust-lang/rust-clippy#8662 (comment)

We can't use clippy in the CI while that's not merged


Co-authored-by: Tamo <tamo@meilisearch.com>
@fasterthanlime
Copy link

Update: cargo clippy passes successfully on that same codebase, with Rust nightly 2022-04-12.

kodiakhq bot pushed a commit to Azure/iotedge that referenced this issue Apr 12, 2022
This is our monthly toolchain upgrade to the latest stable version. Since iotedge/edgelet is a binary package, we want to be tracking Rust compiler releases closely in the event a stdlib vulnerability is found. We do not pin to "stable", however, since that has caused pipeline breakage when some code patterns are made illegal (like in the upgrade from 1.47 to 1.48 [^0]) or, more often, clippy lints are added.

- Change from `cloned()` to `copied()` since we can and to work around ICE: rust-lang/rust-clippy#8662

[^0]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#compatibility-notes-11
  Namely, the point on `mem::uninitialized`.

## Azure IoT Edge PR checklist:
@Jarcho
Copy link
Contributor

Jarcho commented Apr 12, 2022

I guess the sync was a day or two late then.

@giraffate
Copy link
Contributor

Thanks for the reports!

I'm closing this because it seems to be resolved in #8662 (comment). If any problems happens about this, feel free to reopen or comment.

damonbarry pushed a commit to damonbarry/iotedge that referenced this issue Apr 15, 2022
This is our monthly toolchain upgrade to the latest stable version. Since iotedge/edgelet is a binary package, we want to be tracking Rust compiler releases closely in the event a stdlib vulnerability is found. We do not pin to "stable", however, since that has caused pipeline breakage when some code patterns are made illegal (like in the upgrade from 1.47 to 1.48 [^0]) or, more often, clippy lints are added.

- Change from `cloned()` to `copied()` since we can and to work around ICE: rust-lang/rust-clippy#8662

[^0]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#compatibility-notes-11
  Namely, the point on `mem::uninitialized`.

## Azure IoT Edge PR checklist:
nimanch added a commit to Azure/iotedge that referenced this issue Apr 19, 2022
* Longhaul: Fix tolerance for broker enabled messaging (#6183) (#6239)

Cherry pick #6183

## Azure IoT Edge PR checklist:

* Move edge-modules/MetricsCollector to test/modules/TestMetricsCollector (#6240)

Move test metrics collector into test directory for clarity and consistency w/ 1.1 branch.

These changes were tested by running a build images pipeline followed by E2E and Connectivity Test pipelines.

## Azure IoT Edge PR checklist:

* [Tools] Addition of libssl1.0 check and refactor the script (#6242)

* Added checks for libssl 1.0 when 1.1 is not present
* Refactored shared lib check to simplify the checks
* Grouped all variables to the top of files
* Grouped all the function's util functions and renamed them
* Removed storage check logic to a separate function so only the names of the function remain in aziotedge_check() for code readability and debug purposes

* [main] Upgrade Rust toolchain (#6206)

This is our monthly toolchain upgrade to the latest stable version. Since iotedge/edgelet is a binary package, we want to be tracking Rust compiler releases closely in the event a stdlib vulnerability is found. We do not pin to "stable", however, since that has caused pipeline breakage when some code patterns are made illegal (like in the upgrade from 1.47 to 1.48 [^0]) or, more often, clippy lints are added.

- Add `#[must_use]` directives on methods returning `Self`
- Change `unwrap_or_else(...::new)` to `unwrap_or_default` where appropriate
- Box `CertIssuanceOptions` in `EdgeCa` enum due to large variant size difference otherwise

## Azure IoT Edge PR checklist:

* Allow apt-get to wait up to 5 minutes on lock. (#6259)

Allow apt-get to wait up to 5 minutes on lock. 
This option should work on apt-get Version 1.9.11 or later,
but experimentation shows this only works for "install" and not "update" so it may not fix all problems

* [main] Add must_use attributes to methods returning Self (#6268)

Satisfy clippy.

## Azure IoT Edge PR checklist:

* Document for IoT edge compatibility script (#6258)

Documentation on usage of Compatibility script.

* E2E: Fix proxy Manifest Trust Setup build step (#6266)

Manifest Trust Setup build step isn't using proxy env vars. Fixing.


## Azure IoT Edge PR checklist:

* [Platform Compatibility] Fix Resource Profiling for IoT Edge (#6271)

Enhancements
1. Always get support bundle logs for analysis
2. Use the Configured Edge Agent Image for Bootstrapping IoT Edge

## Azure IoT Edge PR checklist:

* [main] Device product information (#6262)

Currently, the edge agent encodes some runtime information (e.g. EdgeAgent and .NET versions) as part of the product information connection parameter, which can then be used to examine device characteristics from management interfaces. Some users desire the ability to add system-level properties--such as kernel version--to the product information. This PR adds a configuration option for custom product information strings as well as an automated option which augments the existing runtime information with the following system parameters:
- kernel name, release, architecture
- OS name, release
- system name, version, vendor

Generated files:
- edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2021_12_07/generatedCode/EdgeletHttpClient.cs

Largely duplicated files:
- edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2021_12_07/ModuleManagementHttpClient.cs
- edgelet/api/managementVersion_2021_12_07.yaml

### General Guidelines and Best Practices
- [x] I have read the [contribution guidelines](https://github.com/azure/iotedge#contributing).
- [x] Title of the pull request is clear and informative.
- [x] Description of the pull request includes a concise summary of the enhancement or bug fix.

### Testing Guidelines
- [x] Pull request includes test coverage for the included changes.
- Description of the pull request includes 
	- [ ] concise summary of tests added/modified
	- [x] local testing done.

* [main] Upgrade to latest Rust version (#6278)

This is our monthly toolchain upgrade to the latest stable version. Since iotedge/edgelet is a binary package, we want to be tracking Rust compiler releases closely in the event a stdlib vulnerability is found. We do not pin to "stable", however, since that has caused pipeline breakage when some code patterns are made illegal (like in the upgrade from 1.47 to 1.48 [^0]) or, more often, clippy lints are added.

- Change from `cloned()` to `copied()` since we can and to work around ICE: rust-lang/rust-clippy#8662

[^0]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#compatibility-notes-11
  Namely, the point on `mem::uninitialized`.

## Azure IoT Edge PR checklist:

* Platform Compatibility : Use Docker Socket For Docker Engine API Check (#6281)

A Device may not necessarily support Docker CLI to query Docker Engine API , even though it has a valid docker socket to communicate with. This PR Adds support for querying Docker Engine API from docker socket. 

Also fixes an issue where we were incorrectly querying Client API Version instead of Server API Version.


## Azure IoT Edge PR checklist:

* UI for Platform compatibility script (#6274)

* include cross and checks
* Changing magenta color as it was over powering all the other messages
* changes of certain messaging to debug logs.

* [main] Rust toolchain upgrade fixes (#6283)

Continuation of #6278.

Resolves clippy failures not caught due to pipelines not triggering on changes to `rust-toolchain.toml`.

## Azure IoT Edge PR checklist:

* Documentation on Memory and Storage profiling of IoT edge (#6254)

* Setup of the profiling platform
* Metrics used for profiling
* Summary of the numbers after profiling
* How compatibility scripts uses these metrics for doing memory and storage checks

* Migrate to Dotnet 6 (#6214)

This PR migrates main branch from dotnet 3.1 to dotnet 6.0. This is working off of Damon's prior PR here:
#6185

Code changes on top of the linked PR are minor. Only notable things:
1. Removed symlinks from arm64 dockerfiles that are no longer needed
2. TempfilterFunctions module is still on dotnet 3, as base image doesn't support dotnet 6 for arm32
3. EdgeHub watchdog has to shell out to sleep rather than call `thread::sleep()` to bypass a bug in rust. Logged a bug with rust repo.
4. Various retries added in E2E test code to get around problems caused by dotnet 6. Logged bugs with SDK team where appropriate.
5. Upgrade rust artifact build OS for amd64/arm* platforms to ubuntu 20 (from ubuntu 18).

Passing pipelines:
1. [Build Images](https://dev.azure.com/msazure/One/_build/results?buildId=54001600&view=results)
2. [CI](https://dev.azure.com/msazure/One/_build/results?buildId=53619492&view=results)
6. [E2E](https://dev.azure.com/msazure/One/_build/results?buildId=54004817&view=results)
7. [Nested E2E](https://dev.azure.com/msazure/One/_build/results?buildId=53668874&view=results)
8. [Connectivity](https://dev.azure.com/msazure/One/_build/results?buildId=53834451&view=results)
9. [Build Images Release](https://dev.azure.com/msazure/One/_build/results?buildId=53619579&view=results)



## Azure IoT Edge PR checklist:

* Install .NET 6 in IoT Edge Compatibility Pipeline (#6286)

* Enhance Docker Check

* Use .NET 6

* [Platform Compatibility] Update aka.ms links (#6285)

Update Platform Compatibility Tool and Documentation with correct aka.ms links

## Azure IoT Edge PR checklist:

* [main] Remove failure dependency (#6282)

The `failure` crate is deprecated and has been superseded by `thiserror` and `anyhow`. These changes remove dependencies on `failure` and replace them by `thiserror` and `anyhow` as appropriate.

- Module{,Registry,Runtime}, MakeModuleRuntime no longer have an `Error` type parameter
- Remove unused submodules of edgelet-core

## Azure IoT Edge PR checklist:

* api proxy image update (#6265)

Content:
Updating the API proxy image because of new alpine version.

Tests:
Tested on amd64 in nested pipeline.

Co-authored-by: Andrew Smith <als5ev@virginia.edu>
Co-authored-by: Noel Campbell <7676015+nlcamp@users.noreply.github.com>
Co-authored-by: gaya <33068020+ggjjj@users.noreply.github.com>
Co-authored-by: onalante-msft <89409054+onalante-msft@users.noreply.github.com>
Co-authored-by: David Robson <darobs@microsoft.com>
Co-authored-by: hugues bouvier <33438817+huguesBouvier@users.noreply.github.com>
@irevoire
Copy link
Author

Hello, I don't know if we're supposed to do something specific, but it's still failing in the CI for us with the action-rs thingy;
https://github.com/meilisearch/meilisearch/runs/6097361418?check_suite_focus=true

@Jarcho
Copy link
Contributor

Jarcho commented Apr 20, 2022

The fix is only on nightly, not stable.

@Fuuzetsu
Copy link

Are clippy point-releases a thing or does everyone affected by this that's not using nightly compiler have to wait for Rust 1.61?

@ETKNeil
Copy link

ETKNeil commented May 11, 2022

Minimal code example for my issue

use std::collections::HashMap;

struct Test{
    map:    HashMap<String, Option<u32>>,
}

impl Test{
    pub fn get_or(&self, identity: &String) -> Option<u32> {
        self.map.get(identity).cloned().flatten()
    }
}

@fasterthanlime
Copy link

This is present again in Rust 1.61.0:

$ cargo clippy
(cut)
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:179:90: Failed to normalize <std::option::Option<&std::option::Option<estate::types::app::AppName>> as std::iter::Iterator>::Item, maybe try to call `try_normalize_erasing_regions` instead

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1279:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::bug
   3: <rustc_errors::Handler>::bug
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>
   5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
   6: rustc_middle::util::bug::bug_fmt
   7: <rustc_middle::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_middle::ty::fold::TypeFolder>::fold_ty
   8: clippy_utils::ty::get_associated_type
   9: clippy_lints::methods::iter_overeager_cloned::check
  10: <clippy_lints::methods::Methods as rustc_lint::passes::LateLintPass>::check_expr
  11: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_expr
  12: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  13: rustc_hir::intravisit::walk_local::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  14: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_local
  15: rustc_hir::intravisit::walk_block::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  16: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  17: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  18: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  19: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  20: rustc_hir::intravisit::walk_block::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  21: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  22: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  23: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  24: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  25: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  26: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  27: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  28: rustc_hir::intravisit::walk_block::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  29: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  30: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  31: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  32: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  33: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  34: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  35: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  36: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  37: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  38: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  39: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  40: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_body
  41: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_fn
  42: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  43: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  44: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  45: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  46: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_body
  47: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_fn
  48: rustc_hir::intravisit::walk_impl_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  49: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_impl_item
  50: rustc_hir::intravisit::walk_impl_item_ref::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  51: rustc_hir::intravisit::walk_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  52: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
  53: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  54: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_mod
  55: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
  56: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  57: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_mod
  58: rustc_lint::late::late_lint_pass_crate::<rustc_lint::late::LateLintPassObjects>
  59: rustc_lint::late::late_lint_crate::<rustc_lint::BuiltinCombinedLateLintPass>
  60: <rustc_session::session::Session>::time::<(), rustc_lint::late::check_crate<rustc_lint::BuiltinCombinedLateLintPass, rustc_interface::passes::analysis::{closure#5}::{closure#0}::{closure#2}::{closure#0}::{closure#0}>::{closure#0}::{closure#0}>
  61: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}::{closure#0}::{closure#2}::{closure#0}>
  62: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::analysis::{closure#5}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
  63: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}>
  64: rustc_interface::passes::analysis
  65: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  66: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
  67: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  68: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  69: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  70: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  71: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
  72: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.61 (fe5b13d 2022-05-18)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack

@irevoire
Copy link
Author

Hey @giraffate I don't have the right to re-open the issue, feel free to do it for me 👍

Also, it seems like the bug has been fixed for us (= https://github.com/meilisearch/MeiliSearch), the CI is working again.

@fasterthanlime
Copy link

it seems like the bug has been fixed for us

Yeah so upon further inspection, that bug I'm hitting now looks very similar but it hit different parts of the code than the previous report. And it was only two code paths and I could easily work around it. I should file a separate report with some repro code.

@giraffate
Copy link
Contributor

Thanks for another report!

Does it reproduce in latest nightly? If so, it would be good to file a new issue with reproduction.

irevoire added a commit to meilisearch/meilisearch that referenced this issue May 24, 2022
The issue has been fixed in the latest release of rust. See rust-lang/rust-clippy#8662
Fix #2305
bors bot added a commit to meilisearch/meilisearch that referenced this issue May 24, 2022
2424: Uncomment clippy from the ci check r=curquiza a=irevoire

The issue has been fixed in the latest release of rust. See rust-lang/rust-clippy#8662
Fix #2305


Co-authored-by: Irevoire <tamo@meilisearch.com>
@fasterthanlime
Copy link

Does it reproduce in latest nightly? If so, it would be good to file a new issue with reproduction.

Actually it doesn't! nightly 4cbaac699 / 2022-05-25 doesn't crash there. Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants