<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustc_metadata, branch try-perf</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try-perf</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try-perf'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-08-30T15:45:07+00:00</updated>
<entry>
<title>mv compiler to compiler/</title>
<updated>2020-08-30T15:45:07+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-08-28T03:58:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9e5f7d5631b8f4009ac1c693e585d4b7108d4275'/>
<id>urn:sha1:9e5f7d5631b8f4009ac1c693e585d4b7108d4275</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #75176 - jyn514:impl-link, r=GuillaumeGomez,petrochenkov</title>
<updated>2020-08-30T13:16:38+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-08-30T13:16:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=db534b3ac286cf45688c3bbae6aa6e77439e52d2'/>
<id>urn:sha1:db534b3ac286cf45688c3bbae6aa6e77439e52d2</id>
<content type='text'>
Fix intra-doc links for cross-crate re-exports of default trait methods

The original fix for this was very simple: https://github.com/rust-lang/rust/pull/58972 ignored `extern_traits` because before https://github.com/rust-lang/rust/issues/65983 was fixed, they would always fail to resolve, giving spurious warnings. So the first commit just undoes that change, so extern traits are now seen by the `collect_intra_doc_links` pass. There are also some minor changes in `librustdoc/fold.rs` to avoid borrowing the `extern_traits` RefCell more than once at a time.

However, that brought up a much more thorny problem. `rustc_resolve` started giving 'error: cannot find a built-in macro with name `cfg`' when documenting `libproc_macro` (I still haven't been able to reproduce on anything smaller than the full standard library). The chain of events looked like this (thanks @eddyb for the help debugging!):

0. `x.py build --stage 1` builds the standard library and creates a sysroot
1. `cargo doc` does something like `cargo check` to create `rmeta`s for all the crates (unrelated to what was built above)
2. the `cargo check`-like `libcore-*.rmeta` is loaded as a transitive dependency *and claims ownership* of builtin macros
3. `rustdoc` later tries to resolve some path in a doc link
4. suggestion logic fires and loads "extern prelude" crates by name
5. the sysroot `libcore-*.rlib` is loaded and *fails to claim ownership* of builtin macros

`rustc_resolve` gives the error after step 5. However, `rustdoc` doesn't need suggestions at all - `resolve_str_path_error` completely discards the `ResolutionError`! The fix implemented in this PR is to skip the suggestion logic for `resolve_ast_path`: pass `record_used: false` and skip `lookup_import_candidates` when `record_used` isn't set.

It's possible that if/when https://github.com/rust-lang/rust/issues/74207 is implemented this will need a more in-depth fix which returns a `ResolutionError` from `compile_macro`, to allow rustdoc to reuse the suggestions from rustc_resolve. However, that's a much larger change and there's no need for it yet, so I haven't implemented it here.

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

r? @GuillaumeGomez
</content>
</entry>
<entry>
<title>rustdoc,metadata: Debugging</title>
<updated>2020-08-30T12:14:55+00:00</updated>
<author>
<name>Joshua Nelson</name>
<email>jyn514@gmail.com</email>
</author>
<published>2020-08-09T03:47:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a1c71a17090cd5ef732d852ee878114375ff9254'/>
<id>urn:sha1:a1c71a17090cd5ef732d852ee878114375ff9254</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #75754 - joshtriplett:wip-perf-snappy, r=Mark-Simulacrum</title>
<updated>2020-08-29T16:59:39+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-08-29T16:59:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7fc048f0712ba515ca11fac204921b9ad8a0c5a3'/>
<id>urn:sha1:7fc048f0712ba515ca11fac204921b9ad8a0c5a3</id>
<content type='text'>
Switch to Snappy compression for metadata
</content>
</entry>
<entry>
<title>Auto merge of #75811 - ecstatic-morse:better-dlerror, r=nagisa</title>
<updated>2020-08-26T01:40:26+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-08-26T01:40:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3e98860425447e30e967e83a738f7c54b7fe8273'/>
<id>urn:sha1:3e98860425447e30e967e83a738f7c54b7fe8273</id>
<content type='text'>
Refactor dynamic library error checking on *nix

The old code was checking `dlerror` more often than necessary, since (unlike `dlsym`) checking the return value of [`dlopen`](https://www.man7.org/linux/man-pages/man3/dlopen.3.html) is enough to indicate whether an error occurred. In the first commit, I've refactored the code to minimize the number of system calls needed. It should be strictly better than the old version.

The second commit is an optional addendum which fixes the issue observed on illumos in #74469, a PR I reviewed that was ultimately closed due to inactivity. I'm not sure how hard we try to work around platform-specific bugs like this, and I believe that, due to the way that `dlerror` is specified in the POSIX standard, libc implementations that want to run on conforming systems cannot call `dlsym` in multi-threaded programs.
</content>
</entry>
<entry>
<title>Explicitly pass `RTLD_LOCAL` to `dlopen`</title>
<updated>2020-08-25T19:11:30+00:00</updated>
<author>
<name>Dylan MacKenzie</name>
<email>ecstaticmorse@gmail.com</email>
</author>
<published>2020-08-25T19:11:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aae6c0fbfe3051e5539f47d0e9d84ddee53f72bd'/>
<id>urn:sha1:aae6c0fbfe3051e5539f47d0e9d84ddee53f72bd</id>
<content type='text'>
This happens to be the default on Linux, but the default is unspecified
in the POSIX standard. Also switches to `cast` to keep line lengths in
check.
</content>
</entry>
<entry>
<title>Always treat `dlsym` returning NULL as an error</title>
<updated>2020-08-25T19:02:21+00:00</updated>
<author>
<name>Dylan MacKenzie</name>
<email>ecstaticmorse@gmail.com</email>
</author>
<published>2020-08-25T19:02:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f07011bad8a4ca3bd65ce1ed236f017f55108816'/>
<id>urn:sha1:f07011bad8a4ca3bd65ce1ed236f017f55108816</id>
<content type='text'>
This simplifies the code somewhat. Also updates comments to reflect
notes from reviw about thread-safety of `dlerror`.
</content>
</entry>
<entry>
<title>rustc_metadata: Move some code around to merge impls of `CrateMetadataRef`</title>
<updated>2020-08-22T18:38:56+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-08-22T18:38:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a5e6572cbc6ad3260eb454e3505c85631d38e87'/>
<id>urn:sha1:6a5e6572cbc6ad3260eb454e3505c85631d38e87</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not forget capacity when collecting def path hashes</title>
<updated>2020-08-22T18:36:34+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-08-22T18:36:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=15643d5d90af8b288156be604baa2d4eef7209a4'/>
<id>urn:sha1:15643d5d90af8b288156be604baa2d4eef7209a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Lazy decoding of DefPathTable from crate metadata (non-incremental case)</title>
<updated>2020-08-22T18:19:47+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2020-07-29T16:26:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=df57e28685f7fd3a9961f640a648d526ffa19d91'/>
<id>urn:sha1:df57e28685f7fd3a9961f640a648d526ffa19d91</id>
<content type='text'>
</content>
</entry>
</feed>
