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

Rustdoc freezes then runs out of memory with #[derive(RustcEncodable)] #36863

Closed
tomaka opened this issue Sep 30, 2016 · 1 comment
Closed

Rustdoc freezes then runs out of memory with #[derive(RustcEncodable)] #36863

tomaka opened this issue Sep 30, 2016 · 1 comment

Comments

@tomaka
Copy link
Contributor

tomaka commented Sep 30, 2016

Cargo.toml:

[dependencies]
rustc-serialize = "*"

Lib.rs:

/// ```
/// extern crate rustc_serialize;
///
/// #[derive(RustcEncodable)]
/// struct MyStruct {
///     field1: String,
///     field2: i32,
/// }
///
/// ```
pub fn foo() { }

On Windows if you run cargo test, rustdoc will freeze for about 2 minutes then crash because it ran out of memory. Didn't try Linux.

Removing #[derive(RustcEncodable)] fixes the problem.

Version: nightly from 2016-09-28.

@TimNN
Copy link
Contributor

TimNN commented Oct 1, 2016

Earlier nightlies give the error:

    error[E0433]: failed to resolve. Did you mean `self::rustc_serialize`?
 --> <anon>:4:10
  |
4 | #[derive(RustcEncodable)]
  |          ^^^^^^^^^^^^^^ Did you mean `self::rustc_serialize`?

I already commented a bunch in #36881 (which is a duplicate of this issue), so I'm gonna close this in favour of that one.

@TimNN TimNN closed this as completed Oct 1, 2016
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