about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-24 18:25:45 +0100
committerGitHub <noreply@github.com>2019-01-24 18:25:45 +0100
commite576c8c06c36f2602b9f3912dd24432e1624c99d (patch)
tree4efd2bfd5730b62ace6418a0e1a3667650a7f50e /src/test/ui/thinlto
parentbea83213f3cf0293b0c7707ff1ddcdb6519e0d64 (diff)
parentb876694734cfc5919b8c12527c287aea1a8d8cfd (diff)
downloadrust-e576c8c06c36f2602b9f3912dd24432e1624c99d.tar.gz
rust-e576c8c06c36f2602b9f3912dd24432e1624c99d.zip
Rollup merge of #57846 - QuietMisdreavus:proc-macro-links, r=GuillaumeGomez
rustdoc: fix ICE from loading proc-macro stubs

Fixes https://github.com/rust-lang/rust/issues/55399

When trying to resolve a macro, rustdoc first tries to load it from the resolver to see whether it's a Macros 2.0 macro, so it can return that Def before looking for any other kind of macro. However, this becomes a problem when you try to load proc-macros: since you can't use a proc-macro inside its own crate, this lookup also fails when attempting to link to it.

However, we have a hint that this lookup will fail: Macros which are actually `ProcMacroStub`s will fail the lookup, so we can use that information to skip loading the macro. Rustdoc will then happily check `resolve.all_macros`, which will return a usable Def that we can link to.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions