Skip to content
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 4 pull requests #74518

Merged
merged 30 commits into from
Jul 19, 2020
Merged

Rollup of 4 pull requests #74518

merged 30 commits into from
Jul 19, 2020

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

poliorcetics and others added 30 commits July 14, 2020 18:00
Comparing two array directly helps generate better assert message
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
…-unsafe-fn, r=LukasKalbertodt

Deny unsafe operations in unsafe functions in libstd/alloc.rs

Partial fix of rust-lang#73904.

This encloses `unsafe` operations in `unsafe fn` in `libstd/alloc.rs`.

@rustbot modify labels: F-unsafe-block-in-unsafe-fn
Remove combine function

Comparing two array directly helps generate better assert message.
Resolve https://github.com/rust-lang/rust/pull/74271/files#r454538514
Add a thumbv4t-none-eabi target

(cc @ketsuban, one of the few other Rust users who programs for GBA.)

---

**EDIT:** This is now a more general `thumbv4t-none-eabi` PR! See [this comment](rust-lang#74419 (comment))

---

Now that the PSP officially has an official target within Rust, well as the lead of the `gba` crate I can't _not_ add a GBA target as well.

I know that the [target tier policy](rust-lang/rfcs#2803) isn't ratified and official, but I'll use it as an outline (cc @joshtriplett):
* Designated Developer: Lokathor
* Naming consistent with any existing targets
* Doesn't create Rust project legal issues.
* No license issues
* Uses the standard Apache/mit license.
* Rust tooling users don't have to accept any new licensing requirements
* Does not support hosting rust tooling.
* Doesn't require linking in proprietary code to obtain a functional binary. However, you will need to do some post-build steps to turn the ELF file into a usable GBA ROM (either for an emulator or for the actual hardware).
* This is a `no_std` environment, without even a standard global allocator, so this adds no new code to `alloc` or `std`.
* The process of building for this target is documented in the `gba` crate ([link](https://rust-console.github.io/gba/development-setup.html)). Well, the docs there are currently a little out of date, they're back on using `cargo-xbuild`, but the crate docs there will get updated once this target is available.
* This places no new burden on any other targets
* Does not break any existing targets.

I'm not fully confident in specifying the same linker script for all possible projects, so I'm currently just not giving a linker script at all, and users can continue to select their own linker script by using `-C` to provide a linker arg.

I added the file, and added it to the `supported_targets!` macro usage, and I think that's all there is to do.
More intra-doc links, add explicit exception list to linkchecker

Fixes the broken links behind rust-lang#32553

Progress on rust-lang#32130 and rust-lang#32129 except for a small number of links. Instead of whitelisting entire files, I've changed the code to whitelist specific links in specific files, and added a comment requesting people explain the reasons they add exceptions. I'm not sure if we should close those issues in favor of the already filed intra-doc link issues.
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 19, 2020

📌 Commit 1636961 has been approved by Manishearth

@rustbot rustbot added the rollup A PR which is a rollup label Jul 19, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 19, 2020
@bors
Copy link
Contributor

bors commented Jul 19, 2020

⌛ Testing commit 1636961 with merge d7f9451...

@bors
Copy link
Contributor

bors commented Jul 19, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Manishearth
Pushing d7f9451 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 19, 2020
@bors bors merged commit d7f9451 into rust-lang:master Jul 19, 2020
@nnethercote
Copy link
Contributor

This was a perf loss of up to 6.4% on two rustdoc benchmarks. Presumably #74485 is the cause. @Manishearth, does that sound right? Is the perf loss expected?

@Manishearth
Copy link
Member Author

@nnethercote I'm unsure how that can happen, the PR just added stuff to the stdlib docs, why would serde compile slower?

(maybe it's reexporting these things?)

@jyn514
Copy link
Member

jyn514 commented Jul 21, 2020

(maybe it's reexporting these things?)

Even if that's the case, I'd be shocked to see a regression of this size just from intra-doc-links. I'd expect them to be little slower because rustdoc does name resolution, but not 6% on the whole crate!

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 24, 2020
Add some timing info to rustdoc

There are various improvements, but the main one is to time each pass
that rustdoc performs (`rustdoc::passes`).

Before, these were the top five timings for `cargo doc` on the cargo
repository:

```
+---------------------------------+-----------+-----------------+----------+------------+
| Item                            | Self time | % of total time | Time     | Item count |
+---------------------------------+-----------+-----------------+----------+------------+
| <unknown>                       | 854.70ms  | 20.888          | 2.47s    | 744823     |
+---------------------------------+-----------+-----------------+----------+------------+
| expand_crate                    | 795.29ms  | 19.436          | 848.00ms | 1          |
+---------------------------------+-----------+-----------------+----------+------------+
| metadata_decode_entry           | 256.73ms  | 6.274           | 279.49ms | 518344     |
+---------------------------------+-----------+-----------------+----------+------------+
| resolve_crate                   | 240.56ms  | 5.879           | 242.86ms | 1          |
+---------------------------------+-----------+-----------------+----------+------------+
| hir_lowering                    | 146.79ms  | 3.587           | 146.79ms | 1          |
+---------------------------------+-----------+-----------------+----------+------------+
```

Now the timings are:

```
+---------------------------------+-----------+-----------------+----------+------------+
| Item                            | Self time | % of total time | Time     | Item count |
+---------------------------------+-----------+-----------------+----------+------------+
| <unknown>                       | 1.40s     | 22.662          | 3.73s    | 771430     |
+---------------------------------+-----------+-----------------+----------+------------+
| collect-trait-impls             | 1.34s     | 21.672          | 2.87s    | 1          |
+---------------------------------+-----------+-----------------+----------+------------+
| expand_crate                    | 1.21s     | 19.577          | 1.28s    | 1          |
+---------------------------------+-----------+-----------------+----------+------------+
| build extern trait impl         | 704.66ms  | 11.427          | 1.07s    | 21893      |
+---------------------------------+-----------+-----------------+----------+------------+
| metadata_decode_entry           | 354.84ms  | 5.754           | 391.81ms | 544919     |
+---------------------------------+-----------+-----------------+----------+------------+
```

The goal is to help me debug regressions like rust-lang#74518 (comment) (currently I have _no_ idea what could have gone wrong).

r? @eddyb or @Mark-Simulacrum
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants