| Age | Commit message (Collapse) | Author | Lines |
|
Allow #[unstable] impls for fn() with unstable abi.
This allows `#[unstable]` trait impls for `extern "unwind-C" fn()`, based on the fact that that abi and therefore that type is unstable.
See https://github.com/rust-lang/rust/pull/101263#issuecomment-1283099947
|
|
Clean up codeblock-tooltip rustdoc-gui test
r? ``@notriddle``
|
|
Use already checked RHS ty for LHS deref suggestions
There's no reason to do the `check_lhs_assignable` and RHS `check_expr_with_hint` in that order, so invert them and use the typeck results to avoid exponential blowup on error.
Fixes #103219
|
|
rustdoc: remove class name `location` from sidebar sibling nav
Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-location/std/vec/struct.Vec.html
This change tweaks the CSS to apply most of its styles to `.sidebar h2`, cleaning up a few redundant rules from `.mobile-topbar .location` and restoring useful navigation aids in mobile mode.
## Before

## After

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(But not fn() -> !, which is stable.)
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #102863 (Standardize "use parentheses to call" suggestions between typeck and trait selection)
- #103034 (Let expressions on RHS shouldn't be terminating scopes)
- #103127 (Make transpose const and inline)
- #103153 (Allow `Vec::leak` when using `no_global_oom_handling`)
- #103182 (Clean up query descriptions)
- #103216 (Consider patterns in fn params in an `Elided(Infer)` lifetime rib.)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Consider patterns in fn params in an `Elided(Infer)` lifetime rib.
Fixes https://github.com/rust-lang/rust/issues/103210
|
|
Clean up query descriptions
Use the same tense everywhere and prefer display over debug, as these descriptions are user facing.
|
|
Let expressions on RHS shouldn't be terminating scopes
Fixes #100276.
Before this PR, we were unconditionally marking the RHS of short-circuiting binary expressions as a terminating scope.
In the case of a let chain where the `let` expression was on the RHS, this meant that temporaries within the `let` expr would only live until the end of the expression. Since this only affected the RHS, this led to surprising behavior ([example](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d1b0a5d1f01882f9c89c2194a75eb19f)).
After this PR, we only mark the RHS as a terminating scope if it is not a `let` expression.
|
|
r=nagisa
Standardize "use parentheses to call" suggestions between typeck and trait selection
1. Suggest calling constructors, since they're basically `FnDef`s but they have a different def kind and hir representation, so we were leaving them out.
2. Standardize the call suggestions between trait fulfillment errors and type mismatch. In the type mismatch suggestion, we suggest `/* Ty */` as the placeholder for an arg, and not the parameter's name, which is less helpful.
3. Use `predicate_must_hold_modulo_regions` instead of matching on `EvaluationResult` -- this might cause some suggestions to be filtered out, but we really shouldn't be suggesting a call if it "may" hold, only when it "must" hold.
4. Borrow some logic from `extract_callable_info` to generalize this suggestion to fn pointers, type parameters, and opaque types.
Fixes #102852
|
|
Handle core dumps output in QEMU user mode
In addition to the whole-system emulation/virtualization, QEMU also supports user-mode emulation, where the emulation happens as a normal process inside the parent system. This allows running most tests by simply spawning remote-test-server inside user-mode emulation.
Unfortunately, QEMU always writes its own message in addition to the system one when a core dump happens, which breaks a few tests which match on the exact output of the system.
This PR changes those tests to strip the (possible) QEMU output before checking if the output is expected.
|
|
Rollup of 4 pull requests
Successful merges:
- #103166 (Optimize `slice_iter.copied().next_chunk()`)
- #103176 (Fix `TyKind::is_simple_path`)
- #103178 (Partially fix `src/test/run-make/coverage-reports` when cross-compiling)
- #103198 (Update cargo)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Partially fix `src/test/run-make/coverage-reports` when cross-compiling
The test does not work on cross-compiled targets because the --target flag was not passed to rustc inside the test. This commit fixes that by adding the flag to the invocations.
Note that the test still fails on cross-compiled targets using remote-test, as remote-test is not capable (yet) of sending back to the host system the `*.profraw` file generated by the instrumentation.
Because of that, this is only a partial fix, and the test has been ignored on cross-compilation.
|
|
Fix `TyKind::is_simple_path`
Fixes #103157.
r? `@spastorino`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Clean up code-color and headers-color rustdoc GUI tests
r? ``@notriddle``
|
|
rustdoc: remove CSS `@media (min-width: 701px)`
The two rules within it can and should be done without the separate media query:
* There ain't no rule saying a viewport can't be `700.5px` wide, since hardware pixels can be finer than CSS pixels.
<details><summary>Screenshot</summary>

</details>
* The rule for the first example-wrap child should probably apply on mobile.
<details><summary>Screenshots</summary>
## Before

## After

</details>
* The rule for the source sidebar is overriden by the mobile rule setting `max-width: 100vw`, so it can be merged with the rest of the styles.
|
|
This change tweaks the CSS to apply most of its styles to `.sidebar h2`,
cleaning up a few redundant rules from `.mobile-topbar .location` and
restoring useful navigation aids in mobile mode.
|
|
Use the same tense everywhere and prefer display over debug, as these
descriptions are user facing.
|
|
|
|
|
|
Stabilize asm_sym
Tracking issue #93333
Reference PR: https://github.com/rust-lang/reference/pull/1270
|
|
Make diagnostic for unsatisfied `Termination` bounds more precise
Don't blindly emit a diagnostic claiming that “*`main` has an invalid return type*” if we encounter a type that should but doesn't implement `std::process::Termination` and isn't actually the return type of the program entry `main`.
Fixes #103052.
``@rustbot`` label A-diagnostics T-compiler T-libs
r? diagnostics
|
|
Adding `fuchsia-ignore` and `needs-unwind` to compiler test cases
Final tests covering missing privileges
r? ``@tmandry``
cc. ``@djkoloski``
|
|
In addition to the whole-system emulation/virtualization, QEMU also
supports user-mode emulation, where the emulation happens as a normal
process inside the parent system. This allows running most tests by
simply spawning remote-test-server inside user-mode emulation.
Unfortunately, QEMU always writes its own message in addition to the
system one when a core dump happens, which breaks a few tests which
match on the exact output of the system.
This PR changes those tests to strip the (possible) QEMU output before
checking if the output is expected.
|
|
The test does not work on cross-compiled targets because the --target
flag was not passed to rustc inside the test. This commit fixes that by
adding the flag to the invocations.
Note that the test still fails on cross-compiled targets using
remote-test, as remote-test is not capable (yet) of sending back to the
host system the *.profraw file generated by the instrumentation.
Because of that, this is only a partial fix, and the test has been
ignored on cross-compilation.
|
|
Remove `RunCompiler::emitter`.
It's no longer used.
r? `@bjorn3`
|
|
PR #98758 introduced code to avoid redundant assertions in derived code
like this:
```
let _: ::core::clone::AssertParamIsClone<u32>;
let _: ::core::clone::AssertParamIsClone<u32>;
```
But the predicate `is_simple_path` introduced as part of this failed to
account for generic arguments. Therefore the deriving code erroneously
considers types like `Option<bool>` and `Option<f32>` to be the same.
This commit fixes `is_simple_path`.
Fixes #103157.
|
|
To include some `Option<>` fields of different types in a single enum.
The test output is currently buggy, but the next commit will fix that.
|
|
Since it's possible to have a 700.5px viewport width, the JS needs to not
switch to mobile mode in such a setup.
|
|
It's no longer used.
|
|
|
|
Use named arguments to make GUI test more clear
As you suggested `@notriddle.` The result looks like this.
r? `@notriddle`
|