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 in use_self lints #4742

Closed
tesuji opened this issue Oct 27, 2019 · 3 comments
Closed

ICE in use_self lints #4742

tesuji opened this issue Oct 27, 2019 · 3 comments
Labels
I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@tesuji
Copy link
Contributor

tesuji commented Oct 27, 2019

ICE in https://travis-ci.com/rust-lang/rust-clippy/jobs/249905118#L3505

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: DistinctSources(DistinctSources { begin: (Real("src/lib.rs") BytePos(0)), end: (Real("src/comment.rs"), BytePos(107716)) })', src/libcore/result.rs:1165:5

stack backtrace:

   0:     0x7f0646116054 - backtrace::backtrace::libunwind::trace::h6ab2c103cc6fc063
                               at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/lbunwind.rs:88
   1:     0x7f0646116054 - backtrace::backtrace::trace_unsynchronized::h95032b5e76a90e2c
                               at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/md.rs:66
   2:     0x7f0646116054 - std::sys_common::backtrace::_print_fmt::ha3b1ff83ecbcdb5f
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x7f0646116054 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2733e51e8a6d9b9d
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x7f064614e5cc - core::fmt::write::hc6f7822f638db26f
                               at src/libcore/fmt/mod.rs:1028
   5:     0x7f064610a437 - std::io::Write::write_fmt::ha156ae6cd02f2c84
                               at src/libstd/io/mod.rs:1412
   6:     0x7f064611a87e - std::sys_common::backtrace::_print::h20221e5a6edf398a
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x7f064611a87e - std::sys_common::backtrace::print::h982ab87d128d0fd1
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x7f064611a87e - std::panicking::default_hook::{{closure}}::h61cbb21beda1eee3
                               at src/libstd/panicking.rs:188
   9:     0x7f064611a581 - std::panicking::default_hook::hef981bb6b2fb7e35
                               at src/libstd/panicking.rs:205
  10:     0x7f06465fc133 - rustc_driver::report_ice::h3989a038ce29854d

  11:     0x7f064611b05c - std::panicking::rust_panic_with_hook::hc0f75c1814688ac8
                               at src/libstd/panicking.rs:472
  12:     0x7f064611ab12 - std::panicking::continue_panic_fmt::h4c19cc8a9675594c
                               at src/libstd/panicking.rs:375
  13:     0x7f064611aa06 - rust_begin_unwind
                               at src/libstd/panicking.rs:302
  14:     0x7f064614813a - core::panicking::panic_fmt::h88248d86527ee347
                               at src/libcore/panicking.rs:84
  15:     0x7f0646148377 - core::result::unwrap_failed::h239fa4b3235cb4bf
                               at src/libcore/result.rs:1165
  16:     0x7f06484b7a14 - rustc_errors::emitter::is_case_difference::hc0c96e664bd96574
  17:     0x7f06484ac603 - rustc_errors::emitter::Emitter::primary_span_formatted::h713cfeb3d89d48f0
  18:     0x7f06484ad95b - <rustc_errors::emitter::EmitterWriter as rustc_errors::emitter::Emitter>::emit_diagnostic::h2923ecfd46d99bd9
  19:     0x7f0648330067 - <syntax::json::JsonEmitter as rustc_errors::emitter::Emitter>::emit_diagnostic::h66a9a356fa8770ec
  20:     0x7f06484c41f9 - rustc_errors::HandlerInner::emit_diagnostic::h1eb07d02315b40bd
  21:     0x7f06484922bb - rustc_errors::diagnostic_builder::DiagnosticBuilder::emit::h3792b30815230d9f
  22:     0x5644c01296ff - <clippy_lints::utils::diagnostics::DiagnosticWrapper as core::ops::drop::Drop>::drop::h60e1e4be5ea8cce3
                               at clippy_lints/src/utils/diagnostics.rs:15
  23:     0x5644c00b2a25 - core::ptr::real_drop_in_place::h54a1e5334ec52196
                               at /rustc/cf148a717a275741a35b5f51eab182aa42bd06a6/src/libcore/ptr/mod.rs:175
  24:     0x5644c01509ed - clippy_lints::utils::diagnostics::span_lint_and_then::haf05a40b33ba445d
                               at clippy_lints/src/utils/diagnostics.rs:124
  25:     0x5644c0153ada - clippy_lints::utils::diagnostics::span_lint_and_sugg::haec60d20d3ec9f97
                               at clippy_lints/src/utils/diagnostics.rs:167
  26:     0x5644bfd58f07 - clippy_lints::use_self::span_use_self_lint::he169aa60b50121cf
                               at clippy_lints/src/use_self.rs:67
  27:     0x5644bfd5a472 - <clippy_lints::use_self::UseSelfVisitor as rustc::hir::intravisit::Visitor>::visit_path::hdb008b09016b012f
                               at clippy_lints/src/use_self.rs:239

Originally posted by @lzutao in #4720 (comment)

@tesuji
Copy link
Contributor Author

tesuji commented Oct 27, 2019

cc @llogiq

@flip1995
Copy link
Member

#4671 should have fixed that. this is probably the same error, but doesn't get catched by checking differing_macro_contexts check

@flip1995 flip1995 added the I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ label Oct 27, 2019
matthiaskrgr added a commit to matthiaskrgr/rust-clippy that referenced this issue Oct 28, 2019
matthiaskrgr added a commit to matthiaskrgr/rust-clippy that referenced this issue Oct 28, 2019
@tesuji
Copy link
Contributor Author

tesuji commented Oct 29, 2019

Duplicate of #4727. Closing this issue.

@tesuji tesuji closed this as completed Oct 29, 2019
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue May 5, 2020
Changes:
````
travis: temporarily disable rustfmt ci check until rust-lang#4742 is resolved
rustup rust-lang/rust#65792
Fix ICE rust-lang#4579
Add regression test for ICE rust-lang#4579
Run update_lints for Unicode lint
Re-add false positive check
Add raw string regression test for useless_format lint
Re-factor useless_format lint
Update Unicode lint tests
[Backported] Rustup to rust-lang/rust#59545
````

Fixes ##65888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants