-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 15 pull requests #55357
Rollup of 15 pull requests #55357
Conversation
This commit is a fix for rust-lang#54408 where on nightly right now whenever generics are inlined the path name listed for the inlined function's debuginfo is a relative path to the cwd, which surely doesn't exist! Previously on beta/stable the debuginfo mentioned an absolute path which still didn't exist, but more predictably didn't exist. The change between stable/nightly is that nightly is now compiled with `--remap-path-prefix` to give a deterministic prefix to all rustc-generated paths in debuginfo. By using `--remap-path-prefix` the previous logic would recognize that the cwd was remapped, causing the original relative path name of the standard library to get emitted. If `--remap-path-prefix` *wasn't* passed in then the logic would create an absolute path name and then create a new source file entry. The fix in this commit is to apply the "recreate the source file entry with an absolute path" logic a bit more aggresively. If the source file's name was remapped then we don't touch it, but otherwise we always take the working dir (which may have been remapped) and then join it to the file to ensure that we process all relative file names as well. The end result is that the standard library should have an absolute path for all file names in debuginfo (using our `--remap-path-prefix` argument) as it does on stable after this patch. Closes rust-lang#54408
The old test was supposed to check for proper html escaping when showing the contents of constants. This was changed as part of rust-lang#53409. The revised test asserts that the contents of the constant is not shown as part of the generated documentation.
"Run" links to the playground are not added to the generated documentation if the unstable `--playground-url` argument is not passed to rustdoc. Therefore, without specifying `--playground-url` as a compile-flag, the test doesn't correctly assert that `#![doc(html_playground_url = "")]` removes playground links.
The `@!has` command does not support specifying just a PATH and an XPATH. That means that the previous test searched for the literal string `//h2[@id="implementations"]` within the generated output, which obviously didn't exist. Even after adding a trait implementation, the test still passed. The correct way to check for the existence of a DOM element with the id `implementations` is to use the `@count` keyword.
Struct names are no longer encapsulated in `<code>` tags, which meant that the test was not correctly verifying that it wasn't being show. I've also added a check to make sure the documentation page for the redirect::Qux struct is not generated at all.
The Auto Trait Implementation section is not wrapped in a `synthetic-implementations` class. In fact, it is wrapped in a `synthetic-implementations` id. However, we can generalize and completely remove the `synthetic-implementations` requirement. We just have to verify that there's no mention of "Auto Trait Implementations" anywhere.
The generated code would look like `<code>impl <a href="...">Foo</a></code>` which the plain text matcher doesn't match. But by using the XPATH notation, the nodes are flattened and we can correctly assert that `impl Foo` does not occur in the generated docs.
The link that is matched against is not the same as would be generated by rustdoc. We should also check that the `foo/private` directory is not generated at all.
The function is called `fn_def_with_doc`, not `fn_def_with`.
…e not quite rvalues (and of course they are not quite statics either). Namely, they *do* have a restricted region (like rvalues), but they also cannot be moved out of (like statics).
…read-local mem category.
This commit removes all jemalloc related submodules, configuration, etc, from the bootstrap, from the standard library, and from the compiler. This will be followed up with a change to use jemalloc specifically as part of rustc on blessed platforms.
This commit adds opt-in support to the compiler to link to `jemalloc` in the compiler. When activated the compiler will depend on `jemalloc-sys`, instruct jemalloc to unprefix its symbols, and then link to it. The feature is activated by default on Linux/OSX compilers for x86_64/i686 platforms, and it's not enabled anywhere else for now. We may be able to opt-in other platforms in the future! Also note that the opt-in only happens on CI, it's otherwise unconditionally turned off by default. Closes rust-lang#36963
`compute_missing_ctors` is called a lot. It produces a vector, which can be reasonably large (e.g. 100+ elements), but the vector is almost always only checked for emptiness. This commit changes `compute_missing_ctors` so it can be called in a cheap way that just indicates if the vector would be empty. If necessary, the function can subsequently be called in an expensive way to compute the full vector. This change reduces instruction counts for several benchmarks up to 2%.
This changes debuginfo generation to add template parameters to generic types. With this change the DWARF now has DW_TAG_template_type_param for types, not just for functions, like: <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type) <40e> DW_AT_name : (indirect string, offset: 0x375): Generic<i32> <412> DW_AT_byte_size : 4 <413> DW_AT_alignment : 4 ... <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param) <420> DW_AT_type : <0x42a> <424> DW_AT_name : (indirect string, offset: 0xa65e): T Closes rust-lang#9224
When inlining a function using the Mir inliner, we shouldn't rerun the various Mir passes on it because the Mir has already been lowered and that wil break various early Mir passes. The issue in rust-lang#50411 is that we've inlined a function with promotions whose Mir has already been lowered. The promotions are then copied into the local function and we begin to run passes on their lowered Mir which causes the ICE. Fixes rust-lang#50411
This can be obtained via the `$mir_phase` value.
As suggested in the feedback for rust-lang#55244. When I replaced the macro with a function, rustc started complaining that there were two unused functions so I also removed those.
We're gonna link to nightly as this didn't make it into the corresponding stable.
Co-Authored-By: steveklabnik <steve@steveklabnik.com>
📌 Commit aec920b has been approved by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors retry (crates.io failure) |
⌛ Testing commit aec920b with merge bf6f91ec74cad2f4fad1189157b4203762c271c7... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
That's a weird llvm error:
|
Successful merges:
UnconditionalRecursion
lint to use MIR #54490 (Rewrite theUnconditionalRecursion
lint to use MIR)@!has
and@!matches
#54824 (Cleanup rustdoc tests with@!has
and@!matches
)compute_missing_ctors
. #55167 (Add a "cheap" mode forcompute_missing_ctors
.)alloc_jemalloc
crate #55238 (Remove thealloc_jemalloc
crate)Failed merges:
r? @ghost