Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

rustc: "error: internal compiler error: calling transform_self_type_for_method on static method" #5868

Closed
a-p- opened this issue Apr 13, 2013 · 2 comments

Comments

@a-p-
Copy link

a-p- commented Apr 13, 2013

Rust version:

$ /opt/rust-0.6/bin/rustc -v
/opt/rust-0.6/bin/rustc 0.6
host: x86_64-unknown-linux-gnu
$

Code to reproduce:

struct Test;

pub impl Test {
  pub fn new() -> Test {
    return Test;
  }
}

fn main() {
  let test = Test.new();
}

Stack trace:

$ RUST_LOG=rustc=1,::rt::backtrace /opt/rust-0.6/bin/rustc reproduce.ts 
error: internal compiler error: calling transform_self_type_for_method on static method
rust: task failed at 'explicit failure', /tmp/rust-0.6/src/libsyntax/diagnostic.rs:99
/opt/rust-0.6/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f12b4824d1b]
/opt/rust-0.6/bin/../lib/librustrt.so(+0x2c7b9)[0x7f12b48357b9]
/opt/rust-0.6/bin/../lib/librustrt.so(upcall_fail+0x1a0)[0x7f12b4826b00]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a4db)[0x7f12b7b404db]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a482)[0x7f12b7b40482]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(_ZN3sys12begin_unwind17_61fe198059b9e3fc3_06E+0x71)[0x7f12b7a88551]
/opt/rust-0.6/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN10diagnostic14__extensions__9meth_84585fatal15_c79235bb6437b73_06E+0x196)[0x7f12b6fef986]
/opt/rust-0.6/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(_ZN10diagnostic14__extensions__9meth_84813bug15_c79235bb6437b73_06E+0x6f)[0x7f12b6ff011f]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6driver7session14__extensions__10meth_188433bug17_b5f71376f9f489aa3_06E+0x80)[0x7f12b6350880]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check6method30transform_self_type_for_method17_51f0b1aaf3e498fc3_06E+0x192)[0x7f12b66dbc52]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check6method14__extensions__10meth_4855036create_rcvr_ty_and_substs_for_method17_971e65ec50f97c323_06E+0x2a8)[0x7f12b66d99c8]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check6method14__extensions__10meth_4843725push_candidates_from_impl17_9ac8518896a5ac6c3_06E+0x2d1)[0x7f12b66d7fa1]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8c0fb4)[0x7f12b6afafb4]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x4a120c)[0x7f12b66db20c]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x4a105e)[0x7f12b66db05e]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check6method14__extensions__10meth_4842338push_inherent_impl_candidates_for_type16_eeee7bdb4b835d03_06E+0x9e)[0x7f12b66d4d2e]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check6method14__extensions__10meth_4838924push_inherent_candidates16_59939f4aa551e6a3_06E+0x1d3)[0x7f12b66ce403]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check6method14__extensions__10meth_483439do_lookup17_9ecadfb4b1ffaff13_06E+0x610)[0x7f12b66cc660]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check6method6lookup15_35be5e67e7e9ab3_06E+0x1df)[0x7f12b66ca83f]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check23check_expr_with_unifier17_841417e8b97d6e713_06E+0x2a35)[0x7f12b6726755]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check28check_expr_coercable_to_type17_5acee3342c4cd5a23_06E+0x91)[0x7f12b673baa1]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check22check_decl_initializer17_1547d91555c977933_06E+0xb2)[0x7f12b674eb22]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check16check_decl_local16_ac37e3abcfdd7ff3_06E+0x5ea)[0x7f12b674f20a]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8c0fb4)[0x7f12b6afafb4]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x51709a)[0x7f12b675109a]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check10check_stmt17_e63c562496e2808c3_06E+0x26e)[0x7f12b6750b0e]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x517271)[0x7f12b6751271]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check25check_block_with_expected17_b352eb1d2e7639c03_06E+0x21e)[0x7f12b66ec55e]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check8check_fn17_20cad4a150c275a73_06E+0x1089)[0x7f12b66eada9]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check13check_bare_fn14_4fc3abe889a533_06E+0x17e)[0x7f12b66e9a5e]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check10check_item16_f8c9b58265752963_06E+0x43d)[0x7f12b66e889d]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x4ae2b1)[0x7f12b66e82b1]
/opt/rust-0.6/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(+0xe5214)[0x7f12b706b214]
/opt/rust-0.6/bin/../lib/libsyntax-84efebcb12c867a2-0.6.so(+0xe4dba)[0x7f12b706adba]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck5check16check_item_types17_b41350aeb9ad50f23_06E+0x430)[0x7f12b66e8080]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x5e4d55)[0x7f12b681ed55]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6middle6typeck11check_crate17_63c941d6da5d83433_06E+0x2d0)[0x7f12b681d970]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver12compile_rest17_b2b258b84b35f3533_06E+0x1218)[0x7f12b6ab78e8]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8c0fb4)[0x7f12b6afafb4]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver12compile_upto17_12335154b455986e3_06E+0x108)[0x7f12b6abcbf8]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8c0fb4)[0x7f12b6afafb4]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver13compile_input15_bb29edf7a232863_06E+0xca)[0x7f12b6abd03a]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN12run_compiler17_64d52739a36d169c3_06E+0x20aa)[0x7f12b6aec44a]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8bea81)[0x7f12b6af8a81]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8bb2ac)[0x7f12b6af52ac]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8c0fb4)[0x7f12b6afafb4]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0xd2f8e)[0x7f12b7b08f8e]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x152bb4)[0x7f12b7b88bb4]
/opt/rust-0.6/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7f12b4825564]
rust: task failed at 'explicit failure', /tmp/rust-0.6/src/librustc/rustc.rc:357
/opt/rust-0.6/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f12b4824d1b]
/opt/rust-0.6/bin/../lib/librustrt.so(+0x2c7b9)[0x7f12b48357b9]
/opt/rust-0.6/bin/../lib/librustrt.so(upcall_fail+0x1a0)[0x7f12b4826b00]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a4db)[0x7f12b7b404db]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x10a482)[0x7f12b7b40482]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(_ZN3sys12begin_unwind17_61fe198059b9e3fc3_06E+0x71)[0x7f12b7a88551]
/opt/rust-0.6/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x152bb4)[0x7f12b7b88bb4]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN7monitor17_78935df9ff9e1afa3_06E+0x1577)[0x7f12b6aeea77]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(+0x8c0fb4)[0x7f12b6afafb4]
/opt/rust-0.6/bin/../lib/librustc-c84825241471686d-0.6.so(_ZN4main15_c4de63b748e03d3_06E+0x7e)[0x7f12b6afabce]
/opt/rust-0.6/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7f12b4825564]
rust: domain main @0xe073e0 root task failed
$ 
@thestinger
Copy link
Contributor

Still buggy on incoming.

@doy
Copy link
Contributor

doy commented Apr 13, 2013

This is a duplicate of #3707.

@jdm jdm closed this as completed Apr 14, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 11, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#5837 (needless_collect: catch x: Vec<_> = iter.collect(); x.into_iter() ...)
 - rust-lang#5846 (Handle mapping to Option in `map_flatten` lint)
 - rust-lang#5848 (Add derive_ord_xor_partial_ord lint)
 - rust-lang#5852 (Add lint for duplicate methods of trait bounds)
 - rust-lang#5856 (Remove old Symbol reexport)

Failed merges:

r? @ghost

changelog: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants