about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-10-19Rollup merge of #103239 - m-ou-se:unstable-abi-fn-impl-check, r=lcnrMatthias Krüger-5/+27
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
2022-10-19Rollup merge of #103237 - GuillaumeGomez:codeblock-tooltip-cleanup, r=notriddleMatthias Krüger-92/+76
Clean up codeblock-tooltip rustdoc-gui test r? ``@notriddle``
2022-10-19Rollup merge of #103223 - compiler-errors:deref-sugg-slow, r=wesleywiserMatthias Krüger-0/+213
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
2022-10-19Rollup merge of #103211 - notriddle:notriddle/dot-location, r=GuillaumeGomezMatthias Krüger-10/+18
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 ![location-before](https://user-images.githubusercontent.com/1593513/196521014-d8730830-c3a2-4ed7-9266-05454cd31e05.png) ## After ![location-after](https://user-images.githubusercontent.com/1593513/196521020-75ec1fa5-b3dc-4c5d-97b6-afccb5fbe00a.png)
2022-10-19Add regression test for item-decl highlightingGuillaume Gomez-5/+98
2022-10-19Fixup a few tests needing asm supportJosh Stone-14/+5
2022-10-19Make ClosureOutlivesRequirement not rely on an unresolved typeMichael Goulet-22/+22
2022-10-19rustdoc: render bounds of cross-crate GAT paramsLeón Orell Valerian Liehr-8/+11
2022-10-19rustdoc: add test case for masked blanket implMichael Howell-0/+5
2022-10-19rustdoc: Do not filter out `Self: Sized` boundsLeón Orell Valerian Liehr-0/+33
2022-10-19resolve: Revert "Set effective visibilities for imports more precisely"Vadim Petrochenkov-1/+8
2022-10-19Allow #[unstable] impl for fn() -> UnstableType.Mara Bos-0/+3
(But not fn() -> !, which is stable.)
2022-10-19Add test for #[unstable] impl for fn() -> !.Mara Bos-1/+13
2022-10-19Auto merge of #103228 - Dylan-DPC:rollup-31yiauw, r=Dylan-DPCbors-44/+135
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
2022-10-19Add test.Mara Bos-4/+11
2022-10-19Clean up codeblock-tooltip rustdoc-gui testGuillaume Gomez-92/+76
2022-10-19Rollup merge of #103216 - cjgillot:issue-103210, r=jackh726Dylan DPC-0/+11
Consider patterns in fn params in an `Elided(Infer)` lifetime rib. Fixes https://github.com/rust-lang/rust/issues/103210
2022-10-19Rollup merge of #103182 - Nilstrieb:query-desc-cleanup, r=oli-obkDylan DPC-12/+12
Clean up query descriptions Use the same tense everywhere and prefer display over debug, as these descriptions are user facing.
2022-10-19Rollup merge of #103034 - nathanwhit:let-chains-rhs-temporaries, r=wesleywiserDylan DPC-6/+18
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.
2022-10-19Rollup merge of #102863 - compiler-errors:call-suggestion-on-unimplemented, ↵Dylan DPC-26/+94
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
2022-10-19Auto merge of #103180 - ferrocene:pa-qemu-user-mode, r=Mark-Simulacrumbors-4/+18
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.
2022-10-19Auto merge of #103225 - matthiaskrgr:rollup-1zkv87y, r=matthiaskrgrbors-5/+56
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
2022-10-19Rollup merge of #103178 - ferrocene:pa-coverage-reports-tests, r=Mark-SimulacrumMatthias Krüger-2/+7
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.
2022-10-19Rollup merge of #103176 - nnethercote:fix-TyKind-is_simple_path, r=spastorinoMatthias Krüger-3/+49
Fix `TyKind::is_simple_path` Fixes #103157. r? `@spastorino`
2022-10-19Use already checked RHS ty for LHS deref suggestionsMichael Goulet-0/+213
2022-10-19instantiate -> constructMichael Goulet-12/+12
2022-10-19fix `SelfVisitor::is_self_ty` ICETakayuki Maeda-0/+16
2022-10-19Generalize call suggestion for unsatisfied predicateMichael Goulet-21/+48
2022-10-19Standardize arg suggestions between typeck and trait selectionMichael Goulet-3/+3
2022-10-19Suggest calling ctor when trait is unimplementedMichael Goulet-0/+41
2022-10-19Implement -Ztrack-diagnosticsmejrs-0/+32
2022-10-18Consider patterns in fn params in an `Elided(Infer)` lifetime rib.Camille GILLOT-0/+11
2022-10-18Rollup merge of #103189 - GuillaumeGomez:clean-up-gui-tests, r=notriddleMatthias Krüger-131/+78
Clean up code-color and headers-color rustdoc GUI tests r? ``@notriddle``
2022-10-18Rollup merge of #103164 - notriddle:notriddle/media-min-width, r=GuillaumeGomezMatthias Krüger-4/+4
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> ![image](https://user-images.githubusercontent.com/1593513/196283804-e946fbe3-d914-4819-ba2d-b4a6a07f190a.png) </details> * The rule for the first example-wrap child should probably apply on mobile. <details><summary>Screenshots</summary> ## Before ![rustdoc-before](https://user-images.githubusercontent.com/1593513/196282813-88b861c7-7b05-4de5-a421-914396f86a04.png) ## After ![rustdoc-after](https://user-images.githubusercontent.com/1593513/196282842-e57760c2-72d5-4dad-94f5-1d7175043326.png) </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.
2022-10-18rustdoc: remove class name `location` from sidebar sibling navMichael Howell-10/+18
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.
2022-10-18Clean up query descriptionsnils-12/+12
Use the same tense everywhere and prefer display over debug, as these descriptions are user facing.
2022-10-18`const_evaluatable_unchecked` to const evallcnr-20/+24
2022-10-18Clean up code-color and headers-color rustdoc GUI testsGuillaume Gomez-131/+78
2022-10-18Rollup merge of #103168 - Amanieu:stable_asm_sym, r=davidtwcoYuki Okushi-86/+53
Stabilize asm_sym Tracking issue #93333 Reference PR: https://github.com/rust-lang/reference/pull/1270
2022-10-18Rollup merge of #103142 - fmease:fix-103052, r=oli-obkYuki Okushi-3/+63
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
2022-10-18Rollup merge of #103023 - andrewpollack:i-fuchsia-finals, r=tmandryYuki Okushi-2/+9
Adding `fuchsia-ignore` and `needs-unwind` to compiler test cases Final tests covering missing privileges r? ``@tmandry`` cc. ``@djkoloski``
2022-10-18handle core dumps output in qemu user modePietro Albini-4/+18
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.
2022-10-18partially fix src/test/run-make/coverage-reports when cross-compilingPietro Albini-2/+7
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.
2022-10-18Auto merge of #102992 - nnethercote:rm-RunCompiler-emitter, r=bjorn3bors-2/+0
Remove `RunCompiler::emitter`. It's no longer used. r? `@bjorn3`
2022-10-18Fix `TyKind::is_simple_path`.Nicholas Nethercote-0/+44
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.
2022-10-18Tweak `deriving-all-codegen.rs`.Nicholas Nethercote-3/+5
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.
2022-10-17rustdoc: change mobile breakpoint to match CSSMichael Howell-4/+4
Since it's possible to have a 700.5px viewport width, the JS needs to not switch to mobile mode in such a setup.
2022-10-18Remove `RunCompiler::emitter`.Nicholas Nethercote-2/+0
It's no longer used.
2022-10-17Stabilize asm_symAmanieu d'Antras-86/+53
2022-10-17Rollup merge of #103152 - GuillaumeGomez:named-arguments, r=notriddleMatthias Krüger-27/+27
Use named arguments to make GUI test more clear As you suggested `@notriddle.` The result looks like this. r? `@notriddle`