about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-04-26Rollup merge of #109379 - flba-eb:108596_fixtest_sigpipe, r=jyn514jyn-3/+7
Replace `yes` command by `while-echo` in test `tests/ui/process/process-sigpipe.rs` The `yes` command is not available on all platforms. Fixes #108596. Inviting `@mvf` as he contributed to this patch. Thanks! This issue has been discussed in https://github.com/rust-lang/rust/pull/106673 but was moved to #108596 to get going. CC `@gh-tr` r? `@workingjubilee` `@rustbot` label +O-neutrino Notes about the comments https://github.com/rust-lang/rust/pull/106673#discussion_r1117324265: - The `echo` command is `/proc/boot/echo` (not built-in) - `/bin/sh` is a symlink to `/proc/boot/ksh` ```sh # ls -l /bin/sh /proc/boot/ksh /proc/boot/echo lrwxrwxrwx 1 root root 14 Mar 20 07:52 /bin/sh -> /proc/boot/ksh -r-xr-xr-x 1 root root 9390 Sep 12 2022 /proc/boot/echo -r-xr-xr-x 1 root root 308114 Sep 12 2022 /proc/boot/ksh ```
2023-04-25Auto merge of #110811 - compiler-errors:vars-are-question-mark, r=WaffleLapkinbors-302/+302
Use `?0` notation for ty/ct/int/float/region vars Aligns the notation for infer vars that T-types and friends most often uses for inference variables with the notation in the compiler (which is kinda a sigil nightmare IMO: `_#`) by adopting `?0` style infer vars. This mostly affects debug output since verbose infer vars shouldn't show up in user-facing places. Does this need an MCP? It's debug output, so I'm thinking no, but happy to open one. :thinking: r? types
2023-04-25vars are ?Michael Goulet-302/+302
2023-04-25Rollup merge of #110671 - compiler-errors:polarity, r=lcnrMatthias Krüger-0/+52
Consider polarity in new solver It's kinda ugly to have a polarity check in all of the builtin impls -- I guess I could consider the polarity at the top of assemble-builtin but that would require adding a polarity fn to `GoalKind`... :shrug: putting this up just so i dont forget, since it's needed to bootstrap core during coherence (this alone does not allow core to bootstrap though, additional work is needed!) r? ``@lcnr``
2023-04-25Auto merge of #110325 - obeis:hir-analysis-migrate-diagnostics-4, r=davidtwcobors-1/+3
Migrate `rustc_hir_analysis` to session diagnostic [Part 4] Part 4: Finishing `check/mod.rs` file r? `@compiler-errors`
2023-04-25Auto merge of #103093 - rytheo:linked-list-alloc-api, r=Mark-Simulacrumbors-2/+2
Add support for allocators in `LinkedList` Allows `LinkedList` to use a custom allocator
2023-04-25Auto merge of #101069 - zhaixiaojuan:loongarch64-inline-asm, r=Amanieubors-0/+196
Add loongarch64 asm! support
2023-04-25Add loongarch64 asm! supportzhaixiaojuan-0/+196
2023-04-25Negative coherence testMichael Goulet-0/+52
2023-04-24Add support for allocators in LinkedListRyan Lowe-2/+2
2023-04-25Revert "Remove #[alloc_error_handler] from the compiler and library"Matthias Krüger-4/+385
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-25Revert "Rename -Zoom=panic to -Zoom=unwind"Matthias Krüger-1/+1
This reverts commit 4b981c26487ebe56de6b3000fcd98713804beefc.
2023-04-25Revert "Adjust expected result for coverage test"Matthias Krüger-3/+3
This reverts commit 4da05e0b88d8b51fc6912da2d0b93edb2780e76b.
2023-04-24Auto merge of #110778 - JohnTitor:rollup-7f51qwk, r=JohnTitorbors-2/+530
Rollup of 10 pull requests Successful merges: - #110480 (Add `known-bug` tests for 11 unsound issues) - #110539 (Move around `{Idx, IndexVec, IndexSlice}` adjacent code) - #110590 (Add some tests around (lack of) object safety of associated types and consts) - #110602 (Ignore src/bootstrap formatting commit in .git-blame-ignore-revs) - #110667 (pointer-auth-link-with-c: Fix cross compilation.) - #110681 (drop few unused crates, gate libc under unix for rustc_codegen_ssa) - #110685 (Some cleanups to DataflowConstProp) - #110744 (bootstrap: update paths cargo-credential crate) - #110750 (Add size asserts for MIR `SourceScopeData` & `VarDebugInfo`) - #110760 (rustdoc: Add regression test for #60522) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-25Rollup merge of #110760 - GuillaumeGomez:regression-60522, r=notriddleYuki Okushi-0/+39
rustdoc: Add regression test for #60522 Fixes https://github.com/rust-lang/rust/issues/60522. r? `@notriddle`
2023-04-25Rollup merge of #110667 - pcc:fix-pointer-auth-link-with-c, r=Mark-SimulacrumYuki Okushi-2/+2
pointer-auth-link-with-c: Fix cross compilation.
2023-04-25Rollup merge of #110590 - oli-obk:object_safe_assoc_types, r=jackh726Yuki Okushi-0/+141
Add some tests around (lack of) object safety of associated types and consts See https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/.60where.20Self.3ASized.60.20on.20assoc.20types/near/351260928 for some discussion around why this isn't allowed. We didn't have any tests for these, so I decided to add them now, even if we don't end up doing anything about it.
2023-04-25Rollup merge of #110480 - whtahy:105107/known-bug-tests-for-unsound-issues, ↵Yuki Okushi-0/+348
r=jackh726 Add `known-bug` tests for 11 unsound issues r? ``@jackh726`` Should tests for other issues be in separate PRs? Thanks. Edit: Partially addresses #105107. This PR adds `known-bug` tests for 11 unsound issues: - #25860 - #49206 - #57893 - #84366 - #84533 - #84591 - #85099 - #98117 - #100041 - #100051 - #104005
2023-04-24Auto merge of #110713 - cjgillot:track-mir-opt, r=scottmcmbors-170/+757
Add mir-opt tests to track MIR quality. cc `@scottmcm` `@saethlin` If you have other ideas, please say so.
2023-04-24Auto merge of #110672 - Ezrashaw:allow-array-simd-in-inline-asm, ↵bors-0/+25
r=workingjubilee allow array-style simd in inline asm Required for [MCP#621](https://github.com/rust-lang/compiler-team/issues/621) to be implemented. r? `@workingjubilee`
2023-04-24Add regression test for #60522Guillaume Gomez-0/+39
2023-04-24Rollup merge of #110706 - scottmcm:transmute_unchecked, r=oli-obkMatthias Krüger-33/+9
Add `intrinsics::transmute_unchecked` This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`. Added to enable experimenting with the request in <https://github.com/rust-lang/rust/pull/106281#issuecomment-1496648190> and because the portable-simd folks might be interested for dependently-sized array-vector conversions. It also simplifies a couple places in `core`. See also https://github.com/rust-lang/rust/pull/108442#issuecomment-1474777273, where `CastKind::Transmute` was added having exactly these semantics before the lang meeting (which I wasn't in) independently expressed interest.
2023-04-24Rollup merge of #110566 - compiler-errors:bad-projection-term, ↵Matthias Krüger-0/+33
r=cjgillot,BoxyUwU Don't create projection ty for const projection Fixes #110549
2023-04-24Rollup merge of #110255 - clubby789:proc-macro-test-help, r=jackh726Matthias Krüger-0/+26
Suggest using integration tests for test crate using own proc-macro cc #110247
2023-04-23Don't create projection ty for const projectionMichael Goulet-0/+33
2023-04-23Rollup merge of #110700 - compiler-errors:fn-ret-fn, r=oli-obkMatthias Krüger-0/+26
Don't infer fn return type to return itself Fixes #110687
2023-04-23Rollup merge of #110661 - notriddle:notriddle/settings-js-handlekey, ↵Matthias Krüger-0/+9
r=GuillaumeGomez rustdoc: clean up settings.css and settings.js `handleKey` was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser-native checkbox was `display: none`, breaking native keyboard accessibility. The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more. [behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics The other, one line change to settings.css is follow-up to #110205
2023-04-23Add mir-opt tests to track MIR quality.Camille GILLOT-170/+757
2023-04-23Auto merge of #110705 - saethlin:ignore-locals-cost, r=cjgillotbors-48/+450
Remove the size of locals heuristic in MIR inlining This heuristic doesn't necessarily correlate to complexity of the MIR Body. In particular, a lot of straight-line code in MIR tends to never reuse a local, even though any optimizer would effectively reuse the storage or just put everything in registers. So it doesn't even necessarily make sense that this would be a stack size heuristic. So... what happens if we just delete the heuristic? The benchmark suite improves significantly. Less heuristics better? r? `@cjgillot`
2023-04-23Auto merge of #108118 - oli-obk:lazy_typeck, r=cjgillotbors-320/+309
Run various queries from other queries instead of explicitly in phases These are just legacy leftovers from when rustc didn't have a query system. While there are more cleanups of this sort that can be done here, I want to land them in smaller steps. This phased order of query invocations was already a lie, as any query that looks at types (e.g. the wf checks run before) can invoke e.g. const eval which invokes borrowck, which invokes typeck, ...
2023-04-23allow array-style simd in inline asmEzra Shaw-0/+25
2023-04-22Add `intrinsics::transmute_unchecked`Scott McMurray-33/+9
This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`. Added to enable experimenting with the request in <https://github.com/rust-lang/rust/pull/106281#issuecomment-1496648190> and because the portable-simd folks might be interested for dependently-sized array-vector conversions. It also simplifies a couple places in `core`.
2023-04-22Remove the size of locals heuristic in MIR inliningBen Kimock-48/+450
2023-04-23Fortify test.Camille GILLOT-7/+15
2023-04-22Turn on ConstDebugInfo pass.Wesley Wiser-74/+68
2023-04-22Don't infer fn return type to return itselfMichael Goulet-0/+26
2023-04-22add known-bug test for unsound issue 104005whtahy-0/+37
2023-04-22add known-bug test for unsound issue 100051whtahy-0/+31
2023-04-22add known-bug test for unsound issue 100041whtahy-0/+19
2023-04-22add known-bug test for unsound issue 98117whtahy-0/+23
2023-04-22Auto merge of #109753 - compiler-errors:replenish-region-constraints, r=aliemjaybors-0/+23
Clone region var origins instead of taking them in borrowck Fixes an issue with the new solver where reporting a borrow-checker error ICEs because it calls `InferCtxt::evaluate_obligation`. This also removes a handful of unnecessary `tcx.infer_ctxt().build()` calls that are only there to mitigate this same exact issue, but with the old solver. Fixes compiler-errors/next-solver-hir-issues#12. ---- This implements `@aliemjay's` solution where we just don't *take* the region constraints, but clone them. This potentially makes it easier to write a bug about taking region constraints twice or never at all, but again, not many folks are touching this code.
2023-04-22Auto merge of #109507 - Amanieu:panic-oom-payload, r=davidtwcobors-389/+8
Report allocation errors as panics OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`. This should be review one commit at a time: - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics. - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API. ACP: https://github.com/rust-lang/libs-team/issues/192 Closes #51540 Closes #51245
2023-04-22Auto merge of #104844 - cjgillot:mention-eval-place, r=jackh726,RalfJungbors-3/+108
Evaluate place expression in `PlaceMention` https://github.com/rust-lang/rust/pull/102256 introduces a `PlaceMention(place)` MIR statement which keep trace of `let _ = place` statements from surface rust, but without semantics. This PR proposes to change the behaviour of `let _ =` patterns with respect to the borrow-checker to verify that the bound place is live. Specifically, consider this code: ```rust let _ = { let a = 5; &a }; ``` This passes borrowck without error on stable. Meanwhile, replacing `_` by `_: _` or `_p` errors with "error[E0597]: `a` does not live long enough", [see playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c448d25a7c205dc95a0967fe96bccce8). This PR *does not* change how `_` patterns behave with respect to initializedness: it remains ok to bind a moved-from place to `_`. The relevant test is `tests/ui/borrowck/let_underscore_temporary.rs`. Crater check found no regression. For consistency, this PR changes miri to evaluate the place found in `PlaceMention`, and report eventual dangling pointers found within it. r? `@RalfJung`
2023-04-22add known-bug test for unsound issue 85099whtahy-0/+68
2023-04-22add known-bug test for unsound issue 84591whtahy-0/+39
2023-04-22add known-bug test for unsound issue 84533whtahy-0/+37
2023-04-22add known-bug test for unsound issue 84366whtahy-0/+15
2023-04-22add known-bug test for unsound issue 57893whtahy-0/+25
2023-04-22add known-bug test for unsound issue 49206whtahy-0/+38
2023-04-22add known-bug test for unsound issue 25860whtahy-0/+16