-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Description
Code
// lib.rs of cargo new project
pub fn hmm() {
let _ = || "}{";
}
Meta
cargo clippy -V
: clippy 0.1.54 (ff2c947 2021-05-25)rustc -Vv
:
rustc 1.54.0-nightly (ff2c947c0 2021-05-25)
binary: rustc
commit-hash: ff2c947c00f867b9f012e28ba88cecfbe556f904
commit-date: 2021-05-25
host: x86_64-apple-darwin
release: 1.54.0-nightly
LLVM version: 12.0.1
Error output
cargo clippy
thread 'rustc' panicked at 'begin <= end (3 <= 1) when slicing `"}{"`', src/tools/clippy/clippy_lints/src/functions/too_many_lines.rs:24:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Backtrace
RUST_BACKTRACE=1 cargo clippy
Checking clippy-ice-breckets v0.1.0 (/Users/cole/story/clippy-ice-breckets)
thread 'rustc' panicked at 'begin <= end (3 <= 1) when slicing `"}{"`', src/tools/clippy/clippy_lints/src/functions/too_many_lines.rs:24:26
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::str::slice_error_fail
3: clippy_lints::functions::too_many_lines::check_fn
4: <clippy_lints::functions::Functions as rustc_lint::passes::LateLintPass>::check_fn
5: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_fn
6: rustc_hir::intravisit::walk_expr
7: rustc_hir::intravisit::walk_local
8: rustc_hir::intravisit::walk_stmt
9: rustc_hir::intravisit::walk_block
10: rustc_hir::intravisit::walk_expr
11: rustc_hir::intravisit::walk_body
12: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_nested_body
13: <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_fn
14: rustc_hir::intravisit::walk_item
15: rustc_hir::intravisit::Visitor::visit_nested_item
16: rustc_hir::intravisit::walk_crate
17: rustc_lint::late::late_lint_pass_crate
18: rustc_lint::late::late_lint_crate
19: rustc_data_structures::sync::join
20: rustc_interface::passes::analysis::{{closure}}::{{closure}}
21: rustc_session::utils::<impl rustc_session::session::Session>::time
22: rustc_interface::passes::analysis
23: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
24: rustc_data_structures::stack::ensure_sufficient_stack
25: rustc_query_system::query::plumbing::force_query_with_job
26: rustc_query_system::query::plumbing::get_query_impl
27: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
28: rustc_interface::passes::QueryContext::enter
29: rustc_span::with_session_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: internal compiler error: unexpected panic
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.54 (9111b8ae 2021-05-26)
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️