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 5 pull requests #98088

Closed
wants to merge 11 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ssomers and others added 11 commits June 8, 2022 12:22
Introduce allow-by-default lints for checking whether diagnostics are
written in `SessionDiagnostic`/`AddSubdiagnostic` impls and whether
diagnostics are translatable. These lints can be denied for modules once
they are fully migrated to impls and translation.

Signed-off-by: David Wood <david.wood@huawei.com>
Since rust-lang#97668 was merged, the slice::get function now looks like this:

![image](https://user-images.githubusercontent.com/1593513/173430685-1dd2b275-2439-4392-b7d4-96bcb355a377.png)

That whole thing, `[T]`, is a single link to `primitive.slice.html`. This
definitely fixes it for this case, but it's not obvious what we should do for
slices of concrete types:

![image](https://user-images.githubusercontent.com/1593513/173430968-7eed1aec-b688-4f84-a492-9210aff0037a.png)

There are actually three links in that `[u8]`: the opening brace `[` is a
link to `primitive.slice.html`, the `u8` is a link to `primitive.u8.html`,
and the final `]` is a link to `primitive.slice.html`. This is a serious
[usability bug](https://usability.yale.edu/web-accessibility/articles/links):
the square braces are much too small for anyone who doesn't have perfect
motor control using mouse or touch, provide an excessive number of tab stops
for anyone using keyboard, and no visual indication whatsoever that they're
separate links.

Now that slices of generic types are linked, it seems reasonable to err on
the side of less clutter and stop linking concrete slices to the slice page.
[RFC 2011] Minimal initial implementation

Tracking issue: rust-lang#44838
Third step of rust-lang#96496

Implementation has ~290 LOC with the bare minimum to be in a functional state. Currently only searches for binary operations to mimic what `assert_eq!` and `assert_ne!` already do.

r? ``@oli-obk``
…nts, r=oli-obk

lint: add diagnostic translation migration lints

Introduce allow-by-default lints for checking whether diagnostics are written in
`SessionDiagnostic` or `AddSubdiagnostic` impls and whether diagnostics are translatable. These lints can be denied for modules once they are fully migrated to impls and translation.

These lints are intended to be temporary - once all diagnostics have been changed then we can just change the APIs we have and that will enforce these constraints thereafter.

r? ````@oli-obk````
…hrisDenton

Fix compat_fn option method on miri

This change is required to make `WaitOnAddress` work with rust-lang/miri#2231
…, r=jsha

rustdoc:  remove link on slice brackets

This is rust-lang#91778, take two.

Fixes rust-lang#91173

The reason I'm reevaluating this change is rust-lang#97668, which makes fully-generic slices link to the slice docs page. This fixes some downsides in the original PR, where `Box<[T]>`, for example, was not linked to the primitive.slice.html page. In this PR, the `[T]` inside is still a link.

The other major reason for wanting to reevaluate this is the changed color scheme. When this feature was first introduced in rustdoc, primitives were a different color from structs and enums. This way, eagle-eyed users could figure out that the square brackets were separate links from the structs inside. Now, all types have the same color, so a significant fraction of users won't even know the links are there unless they pay close attention to the status bar or use an accessibility tool that lists all links on the page.
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 14, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jun 14, 2022

📌 Commit d8a54ac has been approved by Dylan-DPC

@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 Jun 14, 2022
@bors
Copy link
Contributor

bors commented Jun 14, 2022

⌛ Testing commit d8a54ac with merge 4316e3a52f24e23c4f9fe2c17b94309f77f710b1...

@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] src/test/ui/wrong-hashset-issue-42918.rs ... ok

failures:

---- [ui] src/test/ui/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs stdout ----
error: test run failed!
status: exit status: 101
status: exit status: 101
command: "/node-v15.14.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code/a.wasm"
stdout: none
--- stderr -------------------------------
RuntimeError: unreachable
    at __rust_start_panic (<anonymous>:wasm-function[69]:0x447b)
    at rust_panic (<anonymous>:wasm-function[67]:0x4467)
    at _ZN3std9panicking20rust_panic_with_hook17h2290fdf1f47a7204E (<anonymous>:wasm-function[66]:0x4437)
    at _ZN3std9panicking11begin_panic28_$u7b$$u7b$closure$u7d$$u7d$17h83100bd4fad592acE (<anonymous>:wasm-function[2]:0x239)
    at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17hc16c211cb2fcc7e2E (<anonymous>:wasm-function[1]:0x1fe)
    at _ZN3std9panicking11begin_panic17hdab6ce0f3d665554E (<anonymous>:wasm-function[5]:0x2bf)
    at _ZN56assert_without_captures_does_not_create_unnecessary_code4main17he508c3fb987653dcE (<anonymous>:wasm-function[10]:0x3a3)
    at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h1c2b04e0f4e8fd60E (<anonymous>:wasm-function[3]:0x245)
    at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h697794cb16f33288E (<anonymous>:wasm-function[4]:0x267)
    at _ZN3std2rt19lang_start_internal17hf6826b7f3fcb1bdfE (<anonymous>:wasm-function[48]:0x33e3)
    at main (<anonymous>:wasm-function[11]:0x3da)
    at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:20:20)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47


---- [ui] src/test/ui/rfc-2011-nicer-assert-messages/all-not-available-cases.rs stdout ----


error: test run failed!
status: exit status: 101
command: "/node-v15.14.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2011-nicer-assert-messages/all-not-available-cases/a.wasm"
stdout: none
--- stderr -------------------------------
RuntimeError: unreachable
    at __rust_start_panic (<anonymous>:wasm-function[63]:0x4392)
    at rust_panic (<anonymous>:wasm-function[61]:0x437e)
    at _ZN3std9panicking20rust_panic_with_hook17h2290fdf1f47a7204E (<anonymous>:wasm-function[60]:0x434e)
    at _ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17h8acfbcdd09f22373E (<anonymous>:wasm-function[49]:0x3a6a)
    at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17h9a85531cfc71f79fE (<anonymous>:wasm-function[48]:0x39a9)
    at rust_begin_unwind (<anonymous>:wasm-function[55]:0x3fe5)
    at _ZN4core9panicking9panic_fmt17h107e9559ed8dc709E (<anonymous>:wasm-function[119]:0x5286)
    at _ZN23all_not_available_cases4main17hf48e2ea726d9473fE (<anonymous>:wasm-function[5]:0x2bf)
    at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h9ebc33799ddf5a20E (<anonymous>:wasm-function[1]:0x1ce)
    at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he9099e1e34fee358E (<anonymous>:wasm-function[2]:0x1f0)
    at _ZN3std2rt19lang_start_internal17hf6826b7f3fcb1bdfE (<anonymous>:wasm-function[43]:0x32ff)
    at main (<anonymous>:wasm-function[6]:0x2f6)
    at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:20:20)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47



---- [ui] src/test/ui/rfc-2011-nicer-assert-messages/all-expr-kinds.rs stdout ----
error: test run failed!
status: exit status: 101
status: exit status: 101
command: "/node-v15.14.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2011-nicer-assert-messages/all-expr-kinds/a.wasm"
stdout: none
--- stderr -------------------------------
RuntimeError: unreachable
    at __rust_start_panic (<anonymous>:wasm-function[63]:0x43e3)
    at rust_panic (<anonymous>:wasm-function[61]:0x43cf)
    at _ZN3std9panicking20rust_panic_with_hook17h2290fdf1f47a7204E (<anonymous>:wasm-function[60]:0x439f)
    at _ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17h8acfbcdd09f22373E (<anonymous>:wasm-function[49]:0x3abb)
    at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17h9a85531cfc71f79fE (<anonymous>:wasm-function[48]:0x39fa)
    at rust_begin_unwind (<anonymous>:wasm-function[55]:0x4036)
    at _ZN4core9panicking9panic_fmt17h107e9559ed8dc709E (<anonymous>:wasm-function[119]:0x52d7)
    at _ZN14all_expr_kinds4main17h5fddb57efaeffef3E (<anonymous>:wasm-function[5]:0x310)
    at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17he43830b7fc38b6e9E (<anonymous>:wasm-function[1]:0x21b)
    at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8a51fceee2737975E (<anonymous>:wasm-function[2]:0x23d)
    at _ZN3std2rt19lang_start_internal17hf6826b7f3fcb1bdfE (<anonymous>:wasm-function[43]:0x3350)
    at main (<anonymous>:wasm-function[6]:0x347)
    at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:20:20)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47



failures:

@bors
Copy link
Contributor

bors commented Jun 14, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 14, 2022
@Dylan-DPC Dylan-DPC closed this Jun 14, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-kbierjq branch June 14, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants