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

Doctest fails to link #2377

Closed
dragostis opened this issue Feb 10, 2016 · 2 comments
Closed

Doctest fails to link #2377

dragostis opened this issue Feb 10, 2016 · 2 comments

Comments

@dragostis
Copy link

Code runs well in a usual #[test] but fails in a doctest:

note: Undefined symbols for architecture x86_64:
  "mruby::_$LT$impl$GT$::to_bool::hb7390b50b434ef6bida", referenced from:
      main::ha42f3f275405f749gaa in rust_out.0.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error
thread 'mruby::MRuby_0' panicked at 'Box<Any>', src/libsyntax/diagnostic.rs:240

I'm calling to_bool method in the test on a struct called Value. The issue is here. (Don't mind the panic!.)

@alexcrichton
Copy link
Member

Thanks for the report! Looking at the code structure I think that this is unfortunately a duplicate of rust-lang/rust#16734, so I'm going to close in favor of that.

If you mark the mruby module as pub though or reexport the Value type at the top level I think it should make this go away!

@dragostis
Copy link
Author

Works like a charm! Thanks, @alexcrichton.

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

2 participants