{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/49097","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/49097/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/49097/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/49097/events","html_url":"https://github.com/rust-lang/rust/issues/49097","id":306101647,"number":49097,"title":"unexpected panic `Option::unwrap()` on a `None` value' with NLL","user":{"login":"estokes","id":7115692,"avatar_url":"https://avatars3.githubusercontent.com/u/7115692?v=4","gravatar_id":"","url":"https://api.github.com/users/estokes","html_url":"https://github.com/estokes","followers_url":"https://api.github.com/users/estokes/followers","following_url":"https://api.github.com/users/estokes/following{/other_user}","gists_url":"https://api.github.com/users/estokes/gists{/gist_id}","starred_url":"https://api.github.com/users/estokes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estokes/subscriptions","organizations_url":"https://api.github.com/users/estokes/orgs","repos_url":"https://api.github.com/users/estokes/repos","events_url":"https://api.github.com/users/estokes/events{/privacy}","received_events_url":"https://api.github.com/users/estokes/received_events","type":"User","site_admin":false},"labels":[{"id":604489711,"url":"https://api.github.com/repos/rust-lang/rust/labels/A-NLL","name":"A-NLL","color":"d7e102","default":false},{"id":9618520,"url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02","default":false},{"id":867465703,"url":"https://api.github.com/repos/rust-lang/rust/labels/NLL-complete","name":"NLL-complete","color":"f799ea","default":false},{"id":693557751,"url":"https://api.github.com/repos/rust-lang/rust/labels/WG-compiler-nll","name":"WG-compiler-nll","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-16T23:07:18Z","updated_at":"2018-04-30T11:04:01Z","closed_at":null,"author_association":"NONE","body":"This code blows up rustc 1.26.0-nightly (392645394 2018-03-15) with NLL enabled\r\n\r\n```\r\n    if let Some(ref mut txn) = t.model.txn {\r\n        let id = &txn.clone().borrow().id;\r\n        *txn = t.model.db.txnsc.get_from_db(id).expect(\"failed to find txn\");\r\n    }\r\n\r\n```\r\ntxn is an Rc<RefCell<...>>\r\n\r\nthe project is using the following gated features\r\n\r\n#![feature(conservative_impl_trait, nll)]\r\n\r\nthe backtrace from rustc is\r\n\r\n```\r\nthread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:335:21\r\nstack backtrace:\r\n   0:     0x7f4027fcedf3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h6a0bc5605dce4433\r\n                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49\r\n   1:     0x7f4027fc5ca4 - std::sys_common::backtrace::_print::h221d36b236e12e74\r\n                               at libstd/sys_common/backtrace.rs:71\r\n   2:     0x7f4027fcb68d - std::panicking::default_hook::{{closure}}::h6e8674dc74aeedd4\r\n                               at libstd/sys_common/backtrace.rs:59\r\n                               at libstd/panicking.rs:207\r\n   3:     0x7f4027fcb389 - std::panicking::default_hook::h746ce9d1b7bb055c\r\n                               at libstd/panicking.rs:223\r\n   4:     0x7f40249dd61d - core::ops::function::Fn::call::hb510ff0d959ce38b\r\n   5:     0x7f4027fcbb29 - std::panicking::rust_panic_with_hook::h9a379049fd32d0d9\r\n                               at libstd/panicking.rs:403\r\n   6:     0x7f4027fcb912 - std::panicking::begin_panic_fmt::h3a9c0b8dcf649e5d\r\n                               at libstd/panicking.rs:349\r\n   7:     0x7f4027fcb842 - rust_begin_unwind\r\n                               at libstd/panicking.rs:325\r\n   8:     0x7f4028031480 - core::panicking::panic_fmt::he867bbf1a3a32159\r\n                               at libcore/panicking.rs:72\r\n   9:     0x7f40280313a6 - core::panicking::panic::ha7e5c9ba9460cc84\r\n                               at libcore/panicking.rs:51\r\n  10:     0x7f402568fea2 - rustc_mir::borrow_check::nll::explain_borrow::<impl rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx>>::explain_why_borrow_contains_point::hda8c0fdc10302073\r\n  11:     0x7f4025689365 - rustc_mir::borrow_check::error_reporting::<impl rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx>>::report_borrowed_value_does_not_live_long_enough::h296b170aed634afd\r\n  12:     0x7f40256c56e3 - rustc_mir::borrow_check::MirBorrowckCtxt::access_place::h46ab124bb5de083e\r\n  13:     0x7f40256c364e - rustc_mir::borrow_check::MirBorrowckCtxt::visit_terminator_drop::h00e9df3f184c2630\r\n  14:     0x7f40256c2b36 - <rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx> as rustc_mir::dataflow::DataflowResultsConsumer<'cx, 'tcx>>::visit_terminator_entry::h5188b3507c6a381e\r\n  15:     0x7f40256c0665 - rustc_mir::borrow_check::do_mir_borrowck::h84250250ee04df6a\r\n  16:     0x7f40256bb68d - rustc_mir::borrow_check::mir_borrowck::h7dcf927a572eee42\r\n  17:     0x7f4024b84a95 - rustc::dep_graph::graph::DepGraph::with_task_impl::haea844def1a03399\r\n  18:     0x7f4024e81d64 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::force::h45ae777ea5b916a7\r\n  19:     0x7f4024e82f54 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::try_get::h43b49267cb704a24\r\n  20:     0x7f4024f815ee - rustc::ty::maps::TyCtxtAt::mir_borrowck::h7ee37d9d8ca6f8ff\r\n  21:     0x7f4024f7dda8 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_borrowck::h2b72e46bb833670b\r\n  22:     0x7f40283978e6 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::{{closure}}::hd81e6c8ab5e99db4\r\n  23:     0x7f402831ba80 - rustc::ty::context::TyCtxt::create_and_enter::h0c78163ea978eb0d\r\n  24:     0x7f402838e401 - rustc_driver::driver::compile_input::haf2922d1e945b5b0\r\n  25:     0x7f40283ab5e5 - rustc_driver::run_compiler::h884712936ee0cb5b\r\n  26:     0x7f40282d3810 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb9742e754f1ab532\r\n  27:     0x7f4027fe498e - __rust_maybe_catch_panic\r\n                               at libpanic_unwind/lib.rs:102\r\n  28:     0x7f402830ea86 - <F as alloc::boxed::FnBox<A>>::call_box::h0248c1537f35c894\r\n  29:     0x7f4027fdbbeb - std::sys::unix::thread::Thread::new::thread_start::h9e86927e52b61050\r\n                               at /checkout/src/liballoc/boxed.rs:793\r\n                               at libstd/sys_common/thread.rs:24\r\n                               at libstd/sys/unix/thread.rs:90\r\n  30:     0x7f4022e527fb - start_thread\r\n  31:     0x7f4027c8fb5e - clone\r\n  32:                0x0 - <unknown>\r\n\r\nerror: internal compiler error: unexpected panic\r\n\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\n\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\n\r\nnote: rustc 1.26.0-nightly (392645394 2018-03-15) running on x86_64-unknown-linux-gnu\r\n\r\nnote: compiler flags: -C debuginfo=2 -C incremental --crate-type bin\r\n\r\nnote: some of the compiler flags provided by cargo are hidden\r\n\r\nerror: Could not compile `tadbgui`.\r\n\r\nCaused by:\r\n  process didn't exit successfully: `rustc --crate-name tadbgui src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=b3b5d6852c4b504f -C extra-filename=-b3b5d6852c4b504f --out-dir home/eric/proj/tadb/tadbgui/target/debug/deps -C incremental=/home/eric/proj/tadb/tadbgui/target/debug/incremental -L dependency=/home/eric/proj/tadb/tadbgui/target/debug/deps --extern mongodb=/home/eric/roj/tadb/tadbgui/target/debug/deps/libmongodb-178b4c7d3b576f52.rlib --extern gtk=/home/eric/proj/tadb/tadbgui/target/debug/deps/libgtk-010a9dc2a7158079.rlib --extern relm=/home/eric/proj/tadb/tadbgui/targt/debug/deps/librelm-e9cb1c98ca20258c.rlib --extern relm_core=/home/eric/proj/tadb/tadbgui/target/debug/deps/librelm_core-331b04e326362724.rlib --extern relm_derive=/home/eric/proj/tadb/tadbgui/target/debg/deps/librelm_derive-fd5648f9c26a756b.so --extern serde_json=/home/eric/proj/tadb/tadbgui/target/debug/deps/libserde_json-84233fa657858fc6.rlib --extern serde_derive=/home/eric/proj/tadb/tadbgui/target/dbug/deps/libserde_derive-4cb8e80d9a73c0be.so --extern serde=/home/eric/proj/tadb/tadbgui/target/debug/deps/libserde-4d70d3b601415d97.rlib --extern futures=/home/eric/proj/tadb/tadbgui/target/debug/deps/lifutures-b43c1d1babca1d76.rlib --extern tadb=/home/eric/proj/tadb/tadbgui/target/debug/deps/libtadb-5dac310c6669872d.rlib --extern error_chain=/home/eric/proj/tadb/tadbgui/target/debug/deps/liberror_chain-8dd17db3364ab0f.rlib --extern bson=/home/eric/proj/tadb/tadbgui/target/debug/deps/libbson-d8225d9ce9d15391.rlib --extern gio=/home/eric/proj/tadb/tadbgui/target/debug/deps/libgio-4996795684e03b71.rlib --etern `glib=/home/eric/proj/tadb/tadbgui/target/debug/deps/libglib-6c140c79d8d74ae9.rlib` --extern chrono=/home/eric/proj/tadb/tadbgui/target/debug/deps/libchrono-262b1c95940ee36b.rlib --extern lazy_static=/ome/eric/proj/tadb/tadbgui/target/debug/deps/liblazy_static-52590beae2f98da0.rlib -L native=/home/eric/proj/tadb/tadbgui/target/debug/build/rust-crypto-2d655f3e8c1c0955/out -L native=/home/eric/proj/tadb/adbgui/target/debug/build/backtrace-sys-0ebacfb9bbb32a44/out/.libs -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linx-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu` (exit code: 101)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/385367911","html_url":"https://github.com/rust-lang/rust/issues/49097#issuecomment-385367911","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/49097","id":385367911,"user":{"login":"KiChjang","id":3248587,"avatar_url":"https://avatars0.githubusercontent.com/u/3248587?v=4","gravatar_id":"","url":"https://api.github.com/users/KiChjang","html_url":"https://github.com/KiChjang","followers_url":"https://api.github.com/users/KiChjang/followers","following_url":"https://api.github.com/users/KiChjang/following{/other_user}","gists_url":"https://api.github.com/users/KiChjang/gists{/gist_id}","starred_url":"https://api.github.com/users/KiChjang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KiChjang/subscriptions","organizations_url":"https://api.github.com/users/KiChjang/orgs","repos_url":"https://api.github.com/users/KiChjang/repos","events_url":"https://api.github.com/users/KiChjang/events{/privacy}","received_events_url":"https://api.github.com/users/KiChjang/received_events","type":"User","site_admin":false},"created_at":"2018-04-30T11:04:01Z","updated_at":"2018-04-30T11:04:01Z","author_association":"MEMBER","body":"@estokes Any chance in producing a reduced test case?"}}
{"actor":{"display_login":"KiChjang"}}