| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Rollup of 10 pull requests
Successful merges:
- #102113 (OpTy: fix a method taking self rather than &self)
- #102118 (rustdoc: clean up line numbers on code examples)
- #102123 (Add note to clippy::non_expressive_names doc)
- #102125 (rustdoc: remove no-op CSS `.content .item-info { position: relative }`)
- #102127 (Use appropriate variable names)
- #102128 (Const unification is already infallible, remove the error handling logic)
- #102133 (Use valtrees for comparison)
- #102135 (Improve some AllTypes fields name)
- #102144 (Extend const_convert with const {FormResidual, Try} for ControlFlow.)
- #102147 (rustdoc: remove no-op CSS `.location:empty { border: none }`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
This test case actually requires std::process.
|
|
r=nagisa,jyn514
Improve the help message for an invalid calling convention
Fixes https://github.com/rust-lang/rust/issues/93601
I mostly followed the suggestions of `@nagisa` in that issue, ~~however, I wasn't sure how to check stability for the suggestion of "Do not suggest CCs that cannot be used due to them being unstable and feature not being enabled", so I did not implement that point.~~
I haven't contributed to rustc much, please feel free to point out suggestions! For example, the `.map(|s| Symbol::intern(s)).collect::<Vec<_>>()` seems pretty gross performance-wise, but maybe that's OK in error reporting code.
|
|
Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests
This allows the tests to pass even if the user has RUST_BACKTRACE set when running 'x.py'
|
|
r=GuillaumeGomez
rustdoc: remove unnecessary `max-width` on headers
This code was added in 003b2bc1c65251ec2fc80b78ed91c43fb35402ec to prevent these headers from overlapping `.out-of-band` side items. That stopped being a problem when 3f92ff34b5a2fe8dd1a32aa27d437519e63782f0 switched rustdoc over to using `float`, rather than `position: absolute`, to implement this.
|
|
Note if mismatched types have a similar name
If users get a type error between similarly named types, it will point out that these are actually different types, and where they were defined.
|
|
Split out async_fn_in_trait into a separate feature
PR #101224 added support for async fn in trait desuraging behind the `return_position_impl_trait_in_trait` feature.
Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
|
|
Normalize closure signature after construction
Astconv can't normalize inputs or outputs with escaping bound vars ([see this](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/check/fn_ctxt/mod.rs.html#294)), so normalize them after we've wrapped them in a binder.
Fixes #101696
|
|
|
|
|
|
|
|
rustdoc: clean up line numbers on code examples
* First commit switches from `display: inline-flex; width: 100%` to `display: flex`.
`display: inline-flex` was used as part of https://github.com/rust-lang/rust/commit/e961d397cab900c55f8d8c104648852e2b63664e, the original commit that added these line numbers. Does anyone know why it was done this way?
* Second commit makes it so that toggling this checkbox will update the page in real time, just like changing themes does.
Preview: https://notriddle.com/notriddle-rustdoc-test/line-numbers/std/vec/struct.Vec.html
|
|
This reverts commit 2cb9a65684dba47c52de8fa938febf97a73e70a9, reversing
changes made to 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #101598 (Update rustc's information on Android's sanitizers)
- #102036 (Remove use of `io::ErrorKind::Other` in std)
- #102037 (Make cycle errors recoverable)
- #102069 (Skip `Equate` relation in `handle_opaque_type`)
- #102076 (rustc_transmute: fix big-endian discriminants)
- #102107 (Add missing space between notable trait tooltip and where clause)
- #102119 (Fix a typo “pararmeter” in error message)
- #102131 (Added which number is computed in compute_float.)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix a typo “pararmeter” in error message
Issue reported on IRLO: https://internals.rust-lang.org/t/fixing-a-typo/17427
|
|
r=GuillaumeGomez
Add missing space between notable trait tooltip and where clause
This PR add a missing space between the notable trait tooltip and the where clause.
The issue can be seeing on the [BufRead](https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html) page.
Added a simple snapshot regression test in `src/test/rustdoc/where.rs`.
Before:

After:

r? `@GuillaumeGomez`
|
|
Make cycle errors recoverable
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: https://github.com/rust-lang/rust/pull/91430#issuecomment-983997013
> 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.
Helps with https://github.com/rust-lang/rust/issues/81091.
r? ```@lcnr``` cc ```@matthewjasper```
|
|
Normalize opaques w/ bound vars
First, we reenable normalization of opaque types with escaping late bound regions to fix rust-lang/miri#2433. This essentially reverts #89285.
Second, we mitigate the perf regression found in #88862 by simplifying the way that we relate (sub and eq) GeneratorWitness types.
This relies on the fact that we construct these GeneratorWitness types somewhat particularly (with all free regions found in the witness types replaced with late bound regions) -- but those bound regions really should be treated as existential regions, not universal ones. Those two facts leads me to believe that we do not need to use the full `higher_ranked_sub` machinery to relate two generator witnesses. I'm pretty confident that this is correct, but I'm glad to discuss this further.
|
|
Instead of setting them for all primary and additional IDs of the import, only set them for the binding's true ID.
|
|
in different namespaces, one public and another private.
|
|
|
|
r=oli-obk
Require `#[const_trait]` on `Trait` for `impl const Trait`
r? `@oli-obk`
|
|
PR #101224 added support for async fn in trait desuraging behind the
return_position_impl_trait_in_trait feature.
Split this out so that it's behind its own feature gate, since async fn
in trait doesn't need to follow the same stabilization schedule.
|
|
|
|
|
|
Prevent usage of .stab elements to create scrollable areas in doc blocks
Fixes #101874.
You can test it online [here](https://rustdoc.crud.net/imperio/stab-in-doblocks/foo/index.html).
r? `@notriddle`
|
|
Adding needs-unwind for test using panic::catch_unwind
Adding needs-unwind for test using panic::catch_unwind
cc. `@djkoloski`
r? `@tmandry`
|
|
Adding ignore fuchsia tests for execvp
Adding ignore fuchsia tests for execvp
cc. ``@djkoloski``
r? ``@tmandry``
|
|
r=tmandry
Adding needs-unwind for tests testing memory size of Futures/Closures
Adding needs-unwind for tests testing memory size of Futures/Closures
cc. ``@djkoloski``
r? ``@tmandry``
|
|
Unify "all items" page's sidebar with other pages
Currently, the "all types" page's sidebar doesn't list the different categories of type available. This PR fixes it.
Before:

After:

r? `@notriddle`
|
|
Adding needs-unwind to nicer-assert-messages compiler ui tests
Tests where unwind is required for asserting on contents of error message
cc. ``@djkoloski``
r? ``@tmandry``
|
|
Adding ignore fuchsia tests for signal interpretation cases
Tests where Signal interpreting is required. Since Fuchsia currently does not return signals of type `libc::SIGSEGV` etc., instead, use generalized `!status.success()` case.
cc. `@djkoloski`
r? `@tmandry`
|
|
|
|
|
|
|
|
JhonnyBillM:session-diagnostic-to-diagnostic-handler-refactor, r=davidtwco
Move and rename `SessionDiagnostic` & `SessionSubdiagnostic` traits and macros
After PR #101434, we want to:
- [x] Move `SessionDiagnostic` to `rustc_errors`.
- [x] Add `emit_` methods that accept `impl SessionDiagnostic` to `Handler`.
- [x] _(optional)_ Rename trait `SessionDiagnostic` to `DiagnosticHandler`.
- [x] _(optional)_ Rename macro `SessionDiagnostic` to `DiagnosticHandler`.
- [x] Update Rustc Dev Guide and Docs to reflect these changes. https://github.com/rust-lang/rustc-dev-guide/pull/1460
Now I am having build issues getting the compiler to build when trying to rename the macro.
<details>
<summary>See diagnostics errors and context when building.</summary>
```
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
--> compiler/rustc_attr/src/session_diagnostics.rs:13:10
|
13 | #[derive(DiagnosticHandler)]
| ^^^^^^^^^^^^^^^^^ in this derive macro expansion
|
::: /Users/jhonny/.cargo/registry/src/github.com-1ecc6299db9ec823/synstructure-0.12.6/src/macros.rs:94:9
|
94 | / pub fn $derives(
95 | | i: $crate::macros::TokenStream
96 | | ) -> $crate::macros::TokenStream {
| |________________________________________- in this expansion of `#[derive(DiagnosticHandler)]`
|
note: the lint level is defined here
--> compiler/rustc_attr/src/lib.rs:10:9
|
10 | #![deny(rustc::diagnostic_outside_of_impl)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
And also this one:
```
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
--> compiler/rustc_attr/src/session_diagnostics.rs:213:32
|
213 | let mut diag = handler.struct_span_err_with_code(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
```
> **Note**
> Can't find where this message is coming from, because you can see in [this experimental branch](https://github.com/JhonnyBillM/rust/tree/experimental/trying-to-rename-session-diagnostic-macro) that I updated all errors and diags to say:
> error: diagnostics should only be created in **`DiagnosticHandler`**/`AddSubdiagnostic` impls
> and not:
> error: diagnostics should only be created in **`SessionDiagnostic`**/`AddSubdiagnostic` impls
</details>
I tried building the compiler in different ways (playing with the stages etc), but nothing worked.
## Question
**Do we need to build or do something different when renaming a macro and identifiers?**
For context, see experimental commit https://github.com/JhonnyBillM/rust/commit/f2193a98b44db3f2af77a878824b152cdf0d34a5 where the macro and symbols are renamed, but it doesn't compile.
|
|
Rollup of 7 pull requests
Successful merges:
- #89891 (`alloc`: add unstable cfg features `no_rc` and `no_sync`)
- #101995 (Add another example for `uN::carrying_mul`)
- #102031 (Adding ignore fuchsia tests for Backtrace, ErrorKind cases)
- #102041 (Improve `-Zmeta-stats` some more)
- #102045 (fix ConstProp handling of written_only_inside_own_block_locals)
- #102058 (Clarify Path::extension() semantics in docs abstract)
- #102059 (Use rebind instead of dummy binder in `SameTypeModuloInfer` relation)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|