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

Javascript error in rustdoc search #9981

Closed
sfackler opened this issue Oct 20, 2013 · 7 comments · Fixed by #12195
Closed

Javascript error in rustdoc search #9981

sfackler opened this issue Oct 20, 2013 · 7 comments · Fixed by #12195

Comments

@sfackler
Copy link
Member

Trying to search for anything on http://static.rust-lang.org/doc/master/std/index.html results in a Javascript error: Uncaught TypeError: Cannot read property 'name' of undefined on line 313 of main.js. I'm on Chrome 30.0.1599.101 if that matters.

@sfackler
Copy link
Member Author

Weirdly, search results still appear if I search for most things, but not for anything starting with "sle" like "sleep".

@alexcrichton
Copy link
Member

This appears to be dying because of the Death.assert_may_sleep method defined in rt::kill. This shouldn't be showing up in the search because the entire module should be pruned as a result of it being private.

This warrants more investigation...

@adrientetar
Copy link
Contributor

Update: seems like it's not for "any" keyword as the OP states; for example c_str or hello don't trigger any error for me. Eq does for instance.

@heinrich5991
Copy link

drop doesn't work either.

@thehydroimpulse
Copy link
Contributor

Happens to me too.

@ftxqxd
Copy link
Contributor

ftxqxd commented Feb 13, 2014

drop, eq, g, log, ne, og, q, and _ (and all shortened forms e.g. dro, l) don't work for me, but sle does work (i.e. shows results). The error I'm getting (on Firefox Nightly 29.0a1) is TypeError: myparent is undefined.

@lilyball
Copy link
Contributor

The error happens when a trait is implemented on a type that is pruned by one of the passes (strip-private or strip-hidden). The type was pruned but the implementation was not, so the search index included a method that referenced a missing type.

#12195 fixes this.

@bors bors closed this as completed in 718c13f Feb 14, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 1, 2022
Don't lint `unnecessary_operation` in mixed macro contexts

fixes rust-lang#9954

changelog: `unnecessary_operation`: Don't lint in mixed macro contexts.
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

Successfully merging a pull request may close this issue.

7 participants