Skip to content

(Preliminary) Results of building rust with clippy #278

Closed
@llogiq

Description

@llogiq

I was able to check the libfmt_macros crate with clippy and found one str_to_string, one while_let_loop and a few unneeded_return_statements.

Checking the libsyntax crate failed with the following stack trace:

thread '<unnamed>' panicked at 'index out of bounds: the len is 60 but the index is 190', src/libcollections/vec.rs:1047
stack backtrace:
   1:     0x7f21e6fc67c9 - sys::backtrace::tracing::imp::write::h9d995b4e2eebc457Mns
   2:     0x7f21e6fce74c - panicking::on_panic::h0af95cd615077cb32ox
   3:     0x7f21e6f925de - rt::unwind::begin_unwind_inner::ha19c9fa5f9b03821GRw
   4:     0x7f21e6f93327 - rt::unwind::begin_unwind_fmt::hff85cd541f1ded16MQw
   5:     0x7f21e6fce0e1 - rust_begin_unwind
   6:     0x7f21e701fbbf - panicking::panic_fmt::hd2a7f20260b38c91J7E
   7:     0x7f21e7019ed2 - panicking::panic_bounds_check::h270e000900cee620P6E
   8:     0x7f21e7531999 - parse::token::InternedString::new_from_name::h133415336b0a3dbbomT
   9:     0x7f21e88547ad - ast::Name.PartialEq<T>::eq::h8722861357916141903
  10:     0x7f21e886f3a3 - len_zero::LenZero.LintPass::check_item::h98dc7c5e93c3cd56WYc
  11:     0x7f21f47be707 - lint::context::Context<'a, 'tcx>::with_lint_attrs::h15905335786845705409
  12:     0x7f21f47c3a1e - lint::context::Context<'a, 'tcx>.Visitor<'v>::visit_mod::hbe9f346fd6f42bffkaw
  13:     0x7f21f47bedb4 - lint::context::Context<'a, 'tcx>::with_lint_attrs::h15905335786845705409
  14:     0x7f21f47c3a1e - lint::context::Context<'a, 'tcx>.Visitor<'v>::visit_mod::hbe9f346fd6f42bffkaw
  15:     0x7f21f47bedb4 - lint::context::Context<'a, 'tcx>::with_lint_attrs::h15905335786845705409
  16:     0x7f21f47c3a1e - lint::context::Context<'a, 'tcx>.Visitor<'v>::visit_mod::hbe9f346fd6f42bffkaw
  17:     0x7f21f47d0f09 - lint::context::check_crate::hf80c5adb00775b2ejuw
  18:     0x7f21f403a299 - driver::phase_3_run_analysis_passes::closure.20670
  19:     0x7f21f4034d8e - middle::ty::ctxt<'tcx>::create_and_enter::h18281789251420907216
  20:     0x7f21f402fd81 - driver::phase_3_run_analysis_passes::h17232049417500553259
  21:     0x7f21f4014440 - driver::compile_input::h37859d56374280caTba
  22:     0x7f21f40f4946 - run_compiler::h86a39f47860f70c7C7b
  23:     0x7f21f40f26c9 - boxed::F.FnBox<A>::call_box::h15702049526784006720
  24:     0x7f21f40f20a4 - rt::unwind::try::try_fn::h2747471524830943407
  25:     0x7f21f5b6e308 - __rust_try
  26:     0x7f21f5b60bc2 - rt::unwind::try::inner_try::ha3b130acdaf96544aWw
  27:     0x7f21f40f2248 - boxed::F.FnBox<A>::call_box::h2060115051421633638
  28:     0x7f21f5b6d6f3 - sys::thread::Thread::new::thread_start::h3819a1565b813297A5v
  29:     0x7f21f3a4a6a9 - start_thread
  30:     0x7f21f2e55eec - clone
  31:                0x0 - <unknown>

This may be due to a mismatch between the stage0 compiler and the compiler with which I built clippy, but I'm not sure.

Trying to check librustc with clippy causes a Segmentation fault on my system.

I'll try to check other rustc/std crates with clippy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-discussionStatus: Needs further discussion before merging or work can be started

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions