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

ICE with impls exported from a non-exported module #2313

Closed
nikomatsakis opened this issue Apr 27, 2012 · 3 comments
Closed

ICE with impls exported from a non-exported module #2313

nikomatsakis opened this issue Apr 27, 2012 · 3 comments
Labels
A-resolve Area: Name resolution
Milestone

Comments

@nikomatsakis
Copy link
Contributor

Here is a test case. The first file a.rs is:

import inner::extensions;

export extensions;

mod inner { impl extensions for uint { fn me() -> uint { self } } }

The second file b.rs is:

use a;
import a::extensions;

fn main() {
  #debug["%u", 3u.me()];
}

The result:

Script started on Fri Apr 27 08:26:09 2012
�[?1034h;rustc --lib a.rs
Running /usr/local/bin/rustc:
�[1;33mwarning:�[0m missing crate link meta 'name', using 'a' as default
�[1;33mwarning:�[0m missing crate link meta 'vers', using '0.0' as default
warning: no debug symbols in executable (-arch x86_64)
;rustc -L b.rs����.b.rs���� b.rs����
Running /usr/local/bin/rustc:
�[1;31merror:�[0m internal compiler error unexpected failure
�[1;32mnote:�[0m The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
;exit

Script done on Fri Apr 27 08:26:19 2012
@ghost ghost assigned marijnh Apr 27, 2012
@nikomatsakis
Copy link
Contributor Author

I tagged this as resolve, but after some thought a more likely suspect is the reachability computation that controls what metadata gets exported. The failure occurs when looking up an item and not finding it in the metadata.

@bstrie
Copy link
Contributor

bstrie commented Jul 16, 2012

This compiles successfully, though I think the commands given in the example look weird. Here's what I used:

$ rustc --lib a.rs
$ rustc -L . b.rs

Should be closable.

@nikomatsakis
Copy link
Contributor Author

Works, no longer relevant.

flip1995 added a commit to flip1995/rust that referenced this issue Jul 14, 2020
unnecessary_sort_by: avoid linting if key borrows

changelog: Avoid linting if key borrows in [`unnecessary_sort_by`]

Fixes rust-lang#5754
Closes rust-lang#2313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name resolution
Projects
None yet
Development

No branches or pull requests

3 participants