Improve error for when query is unsupported by crate
This is an improvement to the error message mentioned on #101666. It seems like a good idea to also add [this link to the rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/query.html), if explaining the query system in detail is a concern here, but I'm unsure if there is any restrictions on adding links to error messages.
State up-front and center what shape the returned extension will have, without
making the user read through the description and examples.
Rationale: Various frameworks and libraries for different platforms have their
different conventions as to whether an "extension" is ".ext" or just "ext" and
anyone that's had to deal with this ambiguity in the past is always double- or
triple-checking to make sure the function call returns an extension that matches
the expected semantics. Offer the answer to this important question right off
the bat instead of making them dig to find it.
remove Windows TERM env var hack and -Zmiri-env-exclude
The hack should not be needed any more since https://github.com/rust-lang/rust/pull/100206. And that also mostly removes the need for `-Zmiri-env-exclude` -- if needed, users can still achieve the same by running `(unset VAR; cargo miri test)`.
I am keeping `-Zmiri-env-forward` since it is still useful, e.g. to have RUST_BACKTRACE=full set in an otherwise deterministic execution.
`@rust-lang/miri` any objections to removing `-Zmiri-env-exclude`?
avoid thread-local var indirection for non-halting diagnostics
This hack used to be necessary because Stacked Borrows did not have access to enough parts of the machine. But that got fixed a while ago, so now we can just emit diagnostics directly, which is a lot more reliable.
Needs https://github.com/rust-lang/rust/pull/101985
Fixes https://github.com/rust-lang/miri/issues/2538
`.into_iter()` on arrays was slower than it needed to be (especially compared to slice iterator) since it uses `Range<usize>`, which needs to handle degenerate ranges like `10..4`.
This PR adds an internal `IndexRange` type that's like `Range<usize>` but with a safety invariant that means it doesn't need to worry about those cases -- it only handles `start <= end` -- and thus can give LLVM more information to optimize better.
I added one simple demonstration of the improvement as a codegen test.
Since https://github.com/rust-lang/rust/pull/88679, rustdoc doesn't load crates eagerly.
Add an explicit `extern crate` item to make sure the crate is loaded and the bug reproduces.
You can verify this fix by adding `// compile-flags: -Znormalizing-docs` and running the test.
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation.
In the past, `@jackh726` has said we need to be careful about overflow errors:
> Off the top of my head, we definitely should be careful about treating overflow errors the same as
"not implemented for some reason" errors. Otherwise, you could end up with behavior that is
different depending on recursion depth. But, that might be context-dependent.
But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
For this rule to have an actual effect, the border-bottom width needs
specified, elsewhere, without also specifying the color. This doesn't
happen. Ever since 88b137d5fe, every spot
where headers get a border assigned to them also assigns the color.
Rollup of 11 pull requests
Successful merges:
- #101389 (Tone down explanation on RefCell::get_mut)
- #101798 (Make `from_waker`, `waker` and `from_raw` unstably `const`)
- #101881 (Remove an unused struct field `late_bound`)
- #101904 (Add help for invalid inline argument)
- #101966 (Add unit test for identifier Unicode emoji diagnostics)
- #101979 (Update release notes for 1.64)
- #101985 (interpret: expose generate_stacktrace without full InterpCx)
- #102004 (Try to clarify what's new in 1.64.0 ffi types)
- #102005 (rustdoc: remove unused CSS `td.summary-column`)
- #102017 (Add all submodules to the list of directories tidy skips)
- #102019 (Remove backed off PRs from relnotes)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
This class was originally added in 73b97c7e7c
to support hiding and showing the item, because `main.js` went through all
`docblock` elements in the DOM and added toggles to them.
73b97c7e7c/src/librustdoc/html/static/main.js (L1856-L1867)
The `item-decl` is no longer auto-hidden since
c96f86de30 removed it.
`item-decl` used to be called `type-decl`: that name was changed in
8b7a2dd462.
The `docblock` class is no longer used for implementing toggles, since
rustdoc switched to using `<details>` elements.
Avoid duplicating StorageLive in let-else
cc `@est31`
Fix#101867Fix#101932#101410 introduced directives to activate storages of bindings in let-else earlier. However, since it is using the machinery of `match` and friends for pattern matching and binding, those storages are activated for the second time. This PR adjusts this behavior and avoid the duplicated activation for let-else statements.
Add all submodules to the list of directories tidy skips
Tidy contains a blacklist of directories that it is not visiting. This list is also used by the `replace-version-placeholder` tool added by #100591 , to determine the directories to do its replacement from. Generally, tidy does not check submodules, but this is not done consistently for all submodules. This PR adds the submodules that were previously missing, so that the `replace-version-placeholder` tool does not attempt to change content of the books. This was needed because `rustc-dev-guide` contains the placeholder, leading to #102014.
Fixes#102014