Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

crash: upcall fail 'non-exhaustive match failure', ../src/comp/middle/resolve.rs:528 #1027

Closed
elly opened this issue Oct 12, 2011 · 3 comments

Comments

@elly
Copy link
Contributor

elly commented Oct 12, 2011

Test case at http://www.leptoquark.net/~elly/ncurses-upcall.tar - run 'make' with RUSTC set to the path to rustc.

Stack:
(gdb) bt
#0 upcall_fail (task=0x8378c10, expr=0x82ef0d0 "non-exhaustive match failure",

file=0x82ef0f0 "../src/comp/middle/resolve.rs", line=528) at ../src/rt/rust_upcall.cpp:51

#1 0x08117a1e in middle::resolve::unresolved_err::find_fn_or_mod_scope::_11d8d7a1b3173afd ()
#2 0x08117aa5 in middle::resolve::unresolved_err::_8fe5692fa91c66e7 ()
#3 0x081172b7 in middle::resolve::resolve_import::_3354391b72ff8d30 ()
#4 0x0811c2ae in middle::resolve::lookup_import::_5f11611311b3f85d ()
#5 0x0811e4c7 in middle::resolve::lookup_in_mie::_1af2af89a4dbe2bf ()
#6 0x0811c9d7 in middle::resolve::lookup_in_local_mod::_3a417697f1fecd7e ()
#7 0x08118fa1 in middle::resolve::lookup_in_scope::in_scope::_d22cc8e3a19c1650 ()
#8 0x081198a0 in middle::resolve::lookup_in_scope::_65b0cba70c22e847 ()
#9 0x08118bbc in middle::resolve::lookup_in_scope_strict::_65b0cba70c22e847 ()
#10 0x08115c33 in middle::resolve::follow_import::_5c34ba815afeb3be ()
#11 0x08111f55 in middle::resolve::map_crate::link_glob::_323d45b84af19bac ()
#12 0x082ad217 in middle::resolve::map_crate::thunk2863 ()
#13 0x082c31fb in syntax::visit::default_visitor::thunk5554 ()
#14 0x08112a28 in middle::resolve::map_crate::_e28dd3e647304bf3 ()
#15 0x08111118 in middle::resolve::resolve_crate::_2151ce98ffc834dc ()
#16 0x082e12fd in driver::rustc::compile_input::thunk8520 ()
#17 0x0827370d in driver::rustc::time::_8bcb4789e2c2f57e ()
#18 0x08274cb4 in driver::rustc::compile_input::_9ebee06e8be09320 ()
#19 0x082817bc in driver::rustc::main::_ed54e060591e3a31 ()
#20 0x08281f53 in _rust_main ()
#21 0x082e4aac in _rust_main_wrap ()
#22 0xf6e86a21 in task_start_wrapper (a=0xf6be0010) at ../src/rt/rust_task.cpp:150
#23 0xdeadbeef in ?? ()
#24 0xf6be0010 in ?? ()
#25 0x00000000 in ?? ()

@brson
Copy link
Contributor

brson commented Oct 12, 2011

The problem is in test.rs at `import ncurses::ncurses;'

@brson
Copy link
Contributor

brson commented Oct 12, 2011

Possibly because ncurses is already in scope and we're trying to import something else called ncurses.

@ghost ghost assigned marijnh Oct 14, 2011
@marijnh
Copy link
Contributor

marijnh commented Oct 14, 2011

Note that you still can't import like this. Whether this is something that the language should handle by magically using two meanings for 'ncurses' in the scope or not is a different issue. We're already doing something magical where we resolve 'import x::x' in the scope above the current scope (which was causing this error in the first place). This works in multi-module crates but not in single-mod files like this, since there is no outer scope to fall back to.

coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants