Commit Graph

200316 Commits

Author SHA1 Message Date
Jack Huey
d657d1f4a1 Disallow defaults on type GATs 2022-09-14 13:03:01 -04:00
Deadbeef
eb19a8a620 Compute lint_levels by definition 2022-09-14 19:02:44 +02:00
Michael Howell
44d9b8d070 rustdoc: clean up CSS #titles using flexbox
This commit allows it to stop manually specifying pixel heights for the tabs
on search result pages. There's less messing with manual breakpoints and
less complex CSS selectors.
2022-09-14 09:47:50 -07:00
raldone01
f4ff6860dc Constify PartialEq for Ordering. 2022-09-14 18:31:53 +02:00
b-naber
6af8fb7936 address review again 2022-09-14 17:30:25 +02:00
hanar3
dddfb7db24 Improve error message for unsupported crate 2022-09-14 12:19:42 -03:00
bors
a926696384 Auto merge of #101805 - Dylan-DPC:rollup-mpdlbin, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #101433 (Emit a note that static bounds from HRTBs are a bug)
 - #101684 (smol grammar changes to README.md)
 - #101769 (rustdoc: remove redundant CSS `.out-of-band > span.since { position }`)
 - #101772 (Also replace the placeholder for the stable_features lint)
 - #101773 (rustdoc: remove outdated CSS `.content table` etc)
 - #101779 (Update test output for drop tracking)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-14 15:19:12 +00:00
Nixon Enraght-Moony
f69a6c2a80 jsondoclint: Fix TODO's 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
6e21a28dda jsondoclint: More precise Path checks 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
24c751b2ba Rustdoc-Json: Add test for extern_types 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
393792da8d Remove check_missing_items.py 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
5956b56ab2 jsondoclint: Document validator 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
c98c7cbfa5 Primitives can appear in modules. 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
41d35a97f9 jsondocck: Find path to Id's not in index 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
5f1bc6fc5e jsondocck: Better errors 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
bb1911db39 jsondoclint: Add Kind abstraction 2022-09-14 16:14:15 +01:00
Nixon Enraght-Moony
a7a4fe9ffa jsondoclint: Tree Walk Validator 2022-09-14 16:14:15 +01:00
Bryanskiy
d7b9221405 change AccessLevels representation 2022-09-14 18:11:00 +03:00
Dylan DPC
15a5bc9c52
Rollup merge of #101779 - eholk:drop-tracking-test-output, r=jyn514
Update test output for drop tracking

#97334 has a lot of updates to test outputs that makes the PR larger than it needs to be. This PR pulls those changes out so we can keep the other one as simple as possible.

r? `@jyn514`
2022-09-14 19:26:23 +05:30
Dylan DPC
3cb8806da6
Rollup merge of #101773 - notriddle:notriddle/content-table, r=GuillaumeGomez
rustdoc: remove outdated CSS `.content table` etc

# Screenshot before

![image](https://user-images.githubusercontent.com/1593513/189992665-238aab28-d224-4466-901c-6e35e79182fb.png)

# Screenshot after

![image](https://user-images.githubusercontent.com/1593513/189992762-35c8efe4-e980-40bd-b72c-3ae4cfd6f830.png)

# Description

The `.content table` / `.content td` / `.content tr` family of selectors date back to 4fd061c426, when module indexes and other parts of rustdoc used `<table>` tags for layout and content presentation. The `.content td h1, .content td h2` has only been changed since then to tweak the font size in dd5ff428ed.

4fd061c426/src/rustdoc_ng/html/static/main.css (L155-L162)

This CSS would have affected:

  * search result tables, which were removed in b615c0c854
  * module item tables, which were removed in 6020c79dde
  * docblock tables from markdown, which still exist

It may also have affected a few other tables over the last decade, but they've been gradually replaced with grid layouts and flexbox to make layouts that work better on narrow viewports. For example, 34bd2b845b.

These rules have no affect on the appearance of docblock tables
---------------------------------------------------------------

    .content table {
        border-spacing: 0 5px;
    }

According to MDN, [border-spacing] only has an effect when `border-collapse` is `separate`. However, `border-collapse: collapse` is set globally for all tables, so this rule does nothing.

[border-spacing]: https://developer.mozilla.org/en-US/docs/Web/CSS/border-spacing

    .content td p:first-child { margin-top: 0; }

Tables with paragraphs in them are impossible without dropping down to raw HTML. Also, the rustdoc stylesheet sets paragraphs to have no top margin anyway, so this rule is a no-op.

    .content td h1, .content td h2 { margin-left: 0; font-size: 1.125rem; }

Tables with headers in them are impossible without dropping down to raw HTML. This is considered unlikely, especially since it looks weird right now (`.docblock h2` has an underline that is redundant with the table cell's own border).

    .content tr:first-child td { border-top: 0; }

This has no effect because of border collapsing.

This rule is removed, because tables look fine without it
---------------------------------------------------------

    .content td:first-child { padding-right: 20px; }

By removing this rule, the first cell in each row has the same padding as all other cells in the row.

This rule is kept, and converted to directly target `.docblock`
---------------------------------------------------------------

    .content td { vertical-align: top; }

Removing this rule would cause it to be aligned to the middle instead.
2022-09-14 19:26:22 +05:30
Dylan DPC
94bc08d94f
Rollup merge of #101772 - est31:replace_placeholder_diagnostics, r=jackh726
Also replace the placeholder for the stable_features lint

Follow up of  #101215 and #100591 .

Fixes #101766
2022-09-14 19:26:21 +05:30
Dylan DPC
dce471582a
Rollup merge of #101769 - notriddle:notriddle/out-of-band-span-since, r=GuillaumeGomez
rustdoc: remove redundant CSS `.out-of-band > span.since { position }`

At the time this CSS was added, it was just `span.since`, because the version info could be rendered in two different ways:

 1. `<div class='since'>` was used for associated items like methods. It was absolutely positioned, and the selector in rustdoc.css that targetted it was just `.since`.

    a5a2f2b951/src/librustdoc/html/static/rustdoc.css (L522-L529)

 2. `<span class='since'>` was introduced in a5a2f2b951 for page-global version info, so that it could be laid out alongside the `[-]`/`[+]` button. This CSS rule was added to override the absolute position introduced in (1).

    a5a2f2b951/src/librustdoc/html/static/rustdoc.css (L637-L641)

The selector was changed in 8fc6e420d1 so that everything could use a `<span>` tag, but the dichotomy of the absolutely-positioned version info for associated items and the static positioned item version info remained.

The absolutely positioned `.since` was changed to one nested below a `<div class="rightside">` container in 5de1391b88, so the version information is now always statically-positioned, and, as described in the commit message, "their DOM representation is consistent."
2022-09-14 19:26:20 +05:30
Dylan DPC
706e4d3dd9
Rollup merge of #101684 - zahash:readme-changes, r=jyn514
smol grammar changes to README.md

smol grammar changes to README.md
2022-09-14 19:26:19 +05:30
Dylan DPC
430123164f
Rollup merge of #101433 - jackh726:better-static-placeholder-error, r=compiler-errors
Emit a note that static bounds from HRTBs are a bug

This note isn't perfect, but opening this to either 1) land as is or 2) get some feedback on how to improve it

Let r? `@compiler-errors` and cc. `@nikomatsakis`
2022-09-14 19:26:18 +05:30
onestacked
478c471ce8 Added Tracking Issue number. 2022-09-14 15:10:02 +02:00
y86-dev
9a78faba71 Made from_waker, waker, from_raw const 2022-09-14 14:53:16 +02:00
onestacked
404b60bf6b Constify impl Fn* &(mut) Fn* 2022-09-14 14:19:11 +02:00
Nixon Enraght-Moony
2506aa0394 jsondoclint: New Tool 2022-09-14 12:30:23 +01:00
Oli Scherer
7794ea5854 Prefer explict closure sig types over expected ones 2022-09-14 10:44:56 +00:00
bors
c97922dca5 Auto merge of #99443 - jam1garner:mips-virt-feature, r=nagisa
Add support for MIPS VZ ISA extension

[Link to relevant LLVM line where virt extension is specified](83fab8cee9/llvm/lib/Target/Mips/Mips.td (L172-L173))

This has been tested on mips-unknown-linux-musl with a target-cpu that is >= MIPS32 5 and `target-features=+virt`. The example was checked in a disassembler to ensure the correct assembly sequence was being generated using the virtualization instructions.

Needed additional work:

* MIPS is missing from [the Rust reference CPU feature lists](https://doc.rust-lang.org/reference/attributes/codegen.html#available-features)

Example docs for later:

```md
#### `mips` or `mips64`

This platform requires that `#[target_feature]` is only applied to [`unsafe`
functions][unsafe function]. This target's feature support is currently unstable
and must be enabled by `#![feature(mips_target_feature)]` ([Issue #44839])

[Issue #44839]: https://github.com/rust-lang/rust/issues/44839

Further documentation on these features can be found in the [MIPS Instruction Set
Reference Manual], or elsewhere on [mips.com].

[MIPS Instruction Set Reference Manual]: https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00086-2B-MIPS32BIS-AFP-6.06.pdf
[developer.arm.com]: https://www.mips.com/products/architectures/ase/

Feature        | Implicitly Enables | Description
---------------|--------------------|-------------------
`fp64`         |                    | 64-bit Floating Point
`msa`          |                    | "MIPS SIMD Architecture"
`virt`         |                    | Virtualization instructions (VZ ASE)
```

If the above is good I can also submit a PR for that if there's interest in documenting it while it's still unstable. Otherwise that can be dropped, I just wrote it before realizing it was possibly not a good idea.

Relevant to #44839
2022-09-14 08:21:25 +00:00
yukang
31d53489bc tidy will not check coding style in bootstrap/target 2022-09-14 14:44:42 +08:00
bors
a0d1df4a5d Auto merge of #101709 - nnethercote:simplify-visitors-more, r=cjgillot
Simplify visitors more

A successor to #100392.

r? `@cjgillot`
2022-09-14 05:21:14 +00:00
bors
a5b58addae Auto merge of #101307 - jyn514:simplify-storage, r=cjgillot
Simplify caching and storage for queries

I highly recommend reviewing commit-by-commit; each individual commit is quite small but it can be hard to see looking at the overall diff that the behavior is the same. Each commit depends on the previous.

r? `@cjgillot`
2022-09-14 02:39:51 +00:00
est31
3a38d566bd Also replace the placeholder for the stable_features lint 2022-09-14 03:28:54 +02:00
SparrowLii
bfc4f2e189 add debug assertion for max attr_id 2022-09-14 08:49:12 +08:00
SparrowLii
1a3ecbdb6a make mk_attr_id part of ParseSess 2022-09-14 08:49:10 +08:00
Jack Huey
aae37f8763 Use Predicate ConstraintCategory when normalizing 2022-09-13 20:18:49 -04:00
Jack Huey
c75817b0a7 Better errors for implied static bound 2022-09-13 20:18:04 -04:00
Markus Reiter
db29de7745
Simplify const memchr. 2022-09-14 02:00:18 +02:00
Jack Huey
ff623ffc39 Cleanup retrieve_closure_constraint_info 2022-09-13 19:58:53 -04:00
Jack Huey
2be6301857 Remove unused body args 2022-09-13 19:58:53 -04:00
bors
88a192257c Auto merge of #101776 - weihanglo:update-cargo, r=ehuss
Update cargo

10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63 2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000
- Take priority into account within the pending queue (rust-lang/cargo#11032)
- fix(add): Clarify which version the features are added for (rust-lang/cargo#11075)
- doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079)
- Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023)
- Don't use `for` loop on an `Option` (rust-lang/cargo#11081)
- Remove dead code (rust-lang/cargo#11080)
- Change progress indicator for sparse registries (rust-lang/cargo#11068)
- chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055)
- Cache index files based on contents hash (rust-lang/cargo#11044)
- fix: specifies the max length for crate name (rust-lang/cargo#11051)
2022-09-13 23:58:46 +00:00
Michael Howell
11a52dc61a rustdoc: clean up DOM by removing .dockblock-short p
On https://doc.rust-lang.org/nightly/std/ this reduces the number out of
`document.querySelectorAll("*").length` from 1278 to 1103.
2022-09-13 16:03:11 -07:00
Eric Holk
0faafbf1d9 Update parsing test 2022-09-13 15:32:38 -07:00
Eric Holk
87bb475ae7 Update must_not_suspend/ref.rs 2022-09-13 15:16:19 -07:00
Eric Holk
5671a76119 Update partial-drop-partial-reinit.rs 2022-09-13 15:16:19 -07:00
Eric Holk
b950ae44e0 Update issue-65436-raw-ptr-not-send.rs 2022-09-13 15:16:19 -07:00
Eric Holk
911c178f03 Update issue-70935-complex-spans.rs 2022-09-13 15:16:14 -07:00
Eric Holk
cf04547b0b Address code review comments 2022-09-13 14:50:12 -07:00
Eric Holk
5114cf38b1 Update issue-68114.rs 2022-09-13 14:36:45 -07:00