Closed
Description
Seen using rustc from Apr 28 on Ubuntu 14.04 on x86-64
Might be the same as issue #13202
regehr@regehr-M51AC:~/quickcheck/foo/foo2$ cat lib.rs
#![crate_type = "lib"]
mod a {
struct TestResult;
impl TestResult {
fn is_error() { return.is_failure }
}
}
regehr@regehr-M51AC:~/quickcheck/foo/foo2$ rustc lib.rs
lib.rs:5:21: 5:38 error: multiple applicable methods in scope
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~~~~~~~~~~~~
lib.rs:5:21: 5:38 note: candidate #1 is `std::rc::Rc<T>.Deref<T>::deref`
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~~~~~~~~~~~~
lib.rs:5:21: 5:38 note: candidate #2 is `std::cell::Ref<'b, T>.Deref<T>::deref`
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~~~~~~~~~~~~
lib.rs:5:21: 5:38 note: candidate #3 is `std::cell::RefMut<'b, T>.Deref<T>::deref`
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~~~~~~~~~~~~
lib.rs:5:21: 5:38 note: candidate #4 is `std::rt::local_ptr::Borrowed<T>.Deref<T>::deref`
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~~~~~~~~~~~~
lib.rs:5:21: 5:38 error: the type of this value must be known in this context
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~~~~~~~~~~~~
lib.rs:5:21: 5:27 error: multiple applicable methods in scope
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~
lib.rs:5:21: 5:27 note: candidate #1 is `std::cell::RefMut<'b, T>.DerefMut<T>::deref_mut`
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~
lib.rs:5:21: 5:27 note: candidate #2 is `std::rt::local_ptr::Borrowed<T>.DerefMut<T>::deref_mut`
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~
lib.rs:5:21: 5:27 error: internal compiler error: &mut ! was a subtype of &mut std::cell::RefMut<,<generic #8>> but now is not?
lib.rs:5 fn is_error() { return.is_failure }
^~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /home/regehr/rust/src/libsyntax/diagnostic.rs:99
stack backtrace:
1: 0x7fefa1fdaff0 - rt::backtrace::imp::write::h136b9cbd56c2506cMwa::v0.11.pre
2: 0x7fefa1f3a960 - rt::unwind::begin_unwind_inner::h3497e91d7ad8db5eR69::v0.11.pre
3: 0x7fefa0956410 - rt::unwind::begin_unwind::h9302574564411321173::v0.11.pre
4: 0x7fefa0956340 - diagnostic::SpanHandler::span_bug::hc5e60985cdb28780ITb::v0.11.pre
5: 0x7fefa29f12e0 - driver::session::Session::span_bug::h6192694ebf2fa0f4qYg::v0.11.pre
6: 0x7fefa2c220e0 - middle::typeck::check::method::LookupContext<'a>::bug::hc0db9e2df5b80d9a8J6::v0.11.pre
7: 0x7fefa2c221a0 - middle::typeck::check::method::LookupContext<'a>::consider_candidates::h8f9fb184402efba6725::v0.11.pre
8: 0x7fefa2c1f7c0 - middle::typeck::check::method::LookupContext<'a>::search_for_method::h49111f5047e2d3630X5::v0.11.pre
9: 0x7fefa2c20e80 - middle::typeck::check::method::LookupContext<'a>::search_for_some_kind_of_autorefd_method::h8a4cb7ab104ab02esR5::v0.11.pre
10: 0x7fefa2c1a3c0 - middle::typeck::check::method::LookupContext<'a>::search_for_autoptrd_method::h647683d2a6838d345O5::v0.11.pre
11: 0x7fefa2c18a40 - middle::typeck::check::method::LookupContext<'a>::search_step::hd15e63a17c8a0f26s44::v0.11.pre
12: 0x7fefa2c16000 - middle::typeck::check::method::LookupContext<'a>::search::h0ea96b8185aa8367V24::v0.11.pre
13: 0x7fefa2c16fe0 - middle::typeck::check::method::lookup_in_trait::hc04ecbc7b46011583S4::v0.11.pre
14: 0x7fefa2c17d50 - middle::typeck::check::try_overloaded_deref::h8f6a7e95b271d861RP8::v0.11.pre
15: 0x7fefa2c1a5a0 - middle::typeck::check::autoderef::h17792651969169316491::v0.11.pre
16: 0x7fefa2c155c0 - middle::typeck::check::method::lookup::h82d40a3169cb9cc97L4::v0.11.pre
17: 0x7fefa2c68a10 - middle::typeck::check::check_expr_with_unifier::check_field::hfd76eba9be2a5a6bgea::v0.11.pre
18: 0x7fefa2c54190 - middle::typeck::check::check_expr_with_unifier::ha11746da088278681j9::v0.11.pre
19: 0x7fefa2c357f0 - middle::typeck::check::check_block_with_expected::h805f28014cc9d442WEb::v0.11.pre
20: 0x7fefa2c31250 - middle::typeck::check::check_fn::h94bad4d935ed4f62h96::v0.11.pre
21: 0x7fefa2c30ff0 - middle::typeck::check::check_bare_fn::h5c36a49e5fccfdfe8Y6::v0.11.pre
22: 0x7fefa2c3a160 - middle::typeck::check::check_method_body::h88f49d38779a74077F7::v0.11.pre
23: 0x7fefa2c28d50 - middle::typeck::check::check_item::h76bb63cb120ff746vv7::v0.11.pre
24: 0x7fefa2c2a870 - visit::walk_item::h12134269049250110285::v0.11.pre
25: 0x7fefa2c30df0 - middle::typeck::check::check_item_types::hd75ba5625f9aca47qY6::v0.11.pre
26: 0x7fefa2d6bb80 - util::common::time::h6444374424509661037::v0.11.pre
27: 0x7fefa2d6a8d0 - middle::typeck::check_crate::h9011ee56e63b57d6znu::v0.11.pre
28: 0x7fefa31a9330 - driver::driver::phase_3_run_analysis_passes::he6e52dd5c9a56737Daf::v0.11.pre
29: 0x7fefa31af320 - driver::driver::compile_input::h85a843a78d6397c8qAf::v0.11.pre
30: 0x7fefa31d4060 - run_compiler::h264aa4ba7e50875dW4m::v0.11.pre
31: 0x7fefa31ebee0 - main_args::closure.91249
32: 0x7fefa31ea3e0 - monitor::closure.91124
33: 0x7fefa31e5cd0 - task::TaskBuilder::try::closure.90890
34: 0x7fefa4f85950 - task::spawn_opts::closure.7111
35: 0x7fefa1fd6030 - rt::task::Task::run::closure.40120
36: 0x7fefa1fe0f30 - rust_try
37: 0x7fefa1fd5e70 - rt::task::Task::run::hd272e48af74afe0aUW7::v0.11.pre
38: 0x7fefa4f85720 - task::spawn_opts::closure.7084
39: 0x7fefa1fd9b30 - rt::thread::thread_start::hc9411307f5ee01da7B8::v0.11.pre
40: 0x7fefa18f60c0 - start_thread
41: 0x7fefa1c072d9 - __clone
42: 0x0 - <unknown>
regehr@regehr-M51AC:~/quickcheck/foo/foo2$