{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rust-clippy/issues/3151","repository_url":"https://api.github.com/repos/rust-lang-nursery/rust-clippy","labels_url":"https://api.github.com/repos/rust-lang-nursery/rust-clippy/issues/3151/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rust-clippy/issues/3151/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rust-clippy/issues/3151/events","html_url":"https://github.com/rust-lang-nursery/rust-clippy/issues/3151","id":358291773,"node_id":"MDU6SXNzdWUzNTgyOTE3NzM=","number":3151,"title":"'rustc' panicked at 'failed to create span for type arguments'","user":{"login":"PSeitz","id":1109503,"node_id":"MDQ6VXNlcjExMDk1MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1109503?v=4","gravatar_id":"","url":"https://api.github.com/users/PSeitz","html_url":"https://github.com/PSeitz","followers_url":"https://api.github.com/users/PSeitz/followers","following_url":"https://api.github.com/users/PSeitz/following{/other_user}","gists_url":"https://api.github.com/users/PSeitz/gists{/gist_id}","starred_url":"https://api.github.com/users/PSeitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PSeitz/subscriptions","organizations_url":"https://api.github.com/users/PSeitz/orgs","repos_url":"https://api.github.com/users/PSeitz/repos","events_url":"https://api.github.com/users/PSeitz/events{/privacy}","received_events_url":"https://api.github.com/users/PSeitz/received_events","type":"User","site_admin":false},"labels":[{"id":884791444,"node_id":"MDU6TGFiZWw4ODQ3OTE0NDQ=","url":"https://api.github.com/repos/rust-lang-nursery/rust-clippy/labels/L-crash%20:boom:","name":"L-crash :boom:","color":"e559c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-08T12:35:36Z","updated_at":"2018-09-10T11:44:52Z","closed_at":"2018-09-10T11:44:52Z","author_association":"NONE","body":"Hi,\r\nthis code leads to a panic in a clippy lint:\r\n\r\n```rust\r\n#[derive(Clone)]\r\npub struct HashMap<V, S> {\r\n    hash_builder: S,\r\n    table: RawTable<V>,\r\n}\r\n\r\n#[derive(Clone)]\r\npub struct RawTable<V> {\r\n    size: usize,\r\n    val: V\r\n}\r\n```\r\n\r\nI did put the code in a small repo:\r\n\r\n    git clone https://github.com/PSeitz/span_err\r\n\r\n\r\nStacktrace:\r\n\r\n```\r\nthread 'rustc' panicked at 'failed to create span for type arguments', libcore/option.rs:1000:5\r\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49\r\n   1: std::sys_common::backtrace::print\r\n             at libstd/sys_common/backtrace.rs:71\r\n             at libstd/sys_common/backtrace.rs:59\r\n   2: std::panicking::default_hook::{{closure}}\r\n             at libstd/panicking.rs:211\r\n   3: std::panicking::default_hook\r\n             at libstd/panicking.rs:227\r\n   4: rustc::util::common::panic_hook\r\n   5: std::panicking::rust_panic_with_hook\r\n             at libstd/panicking.rs:481\r\n   6: std::panicking::continue_panic_fmt\r\n             at libstd/panicking.rs:391\r\n   7: rust_begin_unwind\r\n             at libstd/panicking.rs:326\r\n   8: core::panicking::panic_fmt\r\n             at libcore/panicking.rs:77\r\n   9: core::option::expect_failed\r\n             at libcore/option.rs:1000\r\n  10: <clippy_lints::types::ImplicitHasher as rustc::lint::LateLintPass<'a, 'tcx>>::check_item\r\n  11: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item\r\n  12: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod\r\n  13: rustc::hir::intravisit::walk_crate\r\n  14: rustc::lint::context::check_crate\r\n  15: rustc::util::common::time\r\n  16: rustc::ty::context::tls::enter_context\r\n  17: <std::thread::local::LocalKey<T>>::with\r\n  18: rustc::ty::context::TyCtxt::create_and_enter\r\n  19: rustc_driver::driver::compile_input\r\n  20: rustc_driver::run_compiler_with_pool\r\n  21: <scoped_tls::ScopedKey<T>>::set\r\n  22: rustc_driver::run_compiler\r\n  23: <scoped_tls::ScopedKey<T>>::set\r\n```\r\n\r\nThis block seems to be the issue:\r\nhttps://github.com/rust-lang-nursery/rust-clippy/blob/fdd830f52c082b83db0dac3e0066c0cf114050d2/clippy_lints/src/types.rs#L1811-L1816\r\n\r\nRelated, but seems to be a different error cause (no check_item in the stacktrace): rust-lang-nursery/rust-clippy#2306"}}
{"actor":{"display_login":"oli-obk"}}