Use `provide_both` link instead of `provide(_extern)`

This commit is contained in:
Yuki Okushi 2020-11-02 22:52:28 +09:00 committed by Who? Me?!
parent cc841a185f
commit 1b43503411
1 changed files with 3 additions and 5 deletions

View File

@ -155,13 +155,11 @@ providers**. Almost all **extern providers** wind up going through the
[`rustc_metadata` crate][rustc_metadata], which loads the information [`rustc_metadata` crate][rustc_metadata], which loads the information
from the crate metadata. But in some cases there are crates that from the crate metadata. But in some cases there are crates that
provide queries for *both* local and external crates, in which case provide queries for *both* local and external crates, in which case
they define both a [`provide`][ext_provide] and a they define both a `provide` and a `provide_extern` function, through
[`provide_extern`][ext_provide_extern] function that `rustc_driver` [`provide_both`][ext_provide_both], that `rustc_driver` can invoke.
can invoke.
[rustc_metadata]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/index.html [rustc_metadata]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/index.html
[ext_provide]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_llvm/attributes/fn.provide.html [ext_provide_both]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_llvm/attributes/fn.provide_both.html
[ext_provide_extern]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_llvm/attributes/fn.provide_extern.html
### Adding a new kind of query ### Adding a new kind of query