about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-12-02 01:39:02 +0800
committerGitHub <noreply@github.com>2017-12-02 01:39:02 +0800
commit3f99b7c9935a9bd6f96d9515844e4c591ec641ac (patch)
tree50c6caa59fd6c95044736bb7bae75e985644a837 /src/libstd/sys/unix/stack_overflow.rs
parentbd5a4af5cd13ddcd0f3ebfa965f3ed3de2431048 (diff)
parent4e74eb5ba0bbf60ab70a0680d1e07d7a0f59d383 (diff)
downloadrust-3f99b7c9935a9bd6f96d9515844e4c591ec641ac.tar.gz
rust-3f99b7c9935a9bd6f96d9515844e4c591ec641ac.zip
Rollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank
rustc: Filter out bogus extern crate warnings

Rustdoc has for some time now used the "everybody loops" pass in the compiler to
avoid typechecking and otherwise avoid looking at implementation details.
In #46115 the placement of this pass was pushed back in the compiler to after
macro expansion to ensure that it works with macro-expanded code as well. This
in turn caused the regression in #46271.

The bug here was that the resolver was producing `def_id` instances for
"possibly unused extern crates" which would then later get processed during
typeck to actually issue lint warnings. The problem was that *after* resolution
these `def_id` nodes were actually removed from the AST by the "everybody loops"
pass. This later, when we tried to take a look at `def_id`, caused the compiler
to panic.

The fix applied here is a bit of a heavy hammer which is to just, in this one
case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
(basically if it looks like the node was removed after resolution). The real
underlying bug here is probably that the "everybody loops" AST pass is being
stressed to much beyond what it was originally intended to do, but this should
at least fix the ICE for now...

Closes #46271
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions