about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2024-07-14Rollup merge of #127711 - BoxyUwU:add_effects_test, r=fee1-deadMatthias Krüger-0/+88
Add regression test for a gce + effects ICE Fixes #125770 I'm not *exactly* sure why this stopped ICEing, I assume its something to do with the fact that there used to be a generic parameter on `Add` for the host generic and we have mismatched args here, which #125608 made no longer later cause issues. But now the desugaring is also different so? :woman_shrugging: r? `@fee1-dead`
2024-07-14Auto merge of #127670 - compiler-errors:no-type-length-limit, r=jackh726bors-57/+49
Gate the type length limit check behind a nightly flag Effectively disables the type length limit by introducing a `-Zenforce-type-length-limit` which defaults to **`false`**, since making the length limit actually be enforced ended up having a worse fallout than expected. We still keep the code around, but the type length limit attr is now a noop (except for its usage in some diagnostics code?). r? `@lcnr` -- up to you to decide what team consensus we need here since this reverses an FCP decision. Reopens #125460 (if we decide to reopen it or keep it closed) Effectively reverses the decision FCP'd in #125507 Closes #127346
2024-07-14Auto merge of #127087 - cjgillot:small-map, r=oli-obkbors-139/+403
Only track mentioned places for jump threading This PR aims to reduce the state space size in jump threading and dataflow const-prop opts. The current implementation walks the types of all locals, and creates a place for each possible projection. This can easily lead to a large number of places and tracked values, most being useless to the actual pass. With this PR, we instead collect places that appear syntactically in the MIR (first commit). However, this is not sufficient (second commit), and we miss places that we could track in aggregate assignments. The third commit tracks such assignments to mirror place projections, see the inline comment. This is complementary to https://github.com/rust-lang/rust/pull/127036 r? `@oli-obk`
2024-07-14add_effects_testBoxy-0/+88
2024-07-13Rollup merge of #127671 - notriddle:notriddle/issue-d, r=Mark-SimulacrumJubilee-16/+40
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 8) Follow up * https://github.com/rust-lang/rust/pull/116214 * https://github.com/rust-lang/rust/pull/116432 * https://github.com/rust-lang/rust/pull/116824 * https://github.com/rust-lang/rust/pull/118105 * https://github.com/rust-lang/rust/pull/119561 * https://github.com/rust-lang/rust/pull/123574 * https://github.com/rust-lang/rust/pull/125382 As always, it's easier to review the commits one at a time. Don't use the Files Changed tab. It's confusing.
2024-07-13Rollup merge of #122300 - CastilloDel:master, r=cjgillotJubilee-6/+48
Add FileCheck annotations to mir-opt/dest-prop tests Part of https://github.com/rust-lang/rust/issues/116971, adds FileCheck annotations to MIR-opt tests in tests/mir-opt/dest-prop. I would like some feedback. Also, I don't know how to approach `union.rs`. I couldn't figure out what it is testing. r? cjgillot
2024-07-13Auto merge of #127435 - GrigorenkoPV:tests-for-112905, r=cjgillotbors-0/+92
Add tests for #112905 This is a part of #105107. Adds the tests from the OP in #112905.
2024-07-13Bless coverage.Camille GILLOT-7/+9
2024-07-13Propagate places through assignments.Camille GILLOT-23/+64
2024-07-13Add test for copying aggregates.Camille GILLOT-0/+221
2024-07-13Create mapped places upon seeing them in the body.Camille GILLOT-141/+141
2024-07-13Auto merge of #127397 - jyn514:multi-thread-panic-hook, r=workingjubileebors-0/+22
fix interleaved output in the default panic hook when multiple threads panic simultaneously previously, we only held a lock for printing the backtrace itself. since all threads were printing to the same file descriptor, that meant random output in the default panic hook from one thread would be interleaved with the backtrace from another. now, we hold the lock for the full duration of the hook, and the output is ordered. --- i noticed some odd things while working on this you may or may not already be aware of. - libbacktrace is included as a submodule instead of a normal rustc crate, and as a result uses `cfg(backtrace_in_std)` instead of a more normal `cfg(feature = "rustc-dep-of-std")`. probably this is left over from before rust used a cargo-based build system? - the default panic handler uses `trace_unsynchronized`, etc, in `sys::backtrace::print`. as a result, the lock only applies to concurrent *panic handlers*, not concurrent *threads*. in other words, if another, non-panicking, thread tried to print a backtrace at the same time as the panic handler, we may have UB, especially on windows. - we have the option of changing backtrace to enable locking when `backtrace_in_std` is set so we can reuse their lock instead of trying to add our own.
2024-07-12Move assertion-free rustdoc ice tests to rustdoc-uiMichael Howell-0/+2
2024-07-12Gate the type length limit check behind a nightly flagMichael Goulet-57/+49
2024-07-12rustdoc: rename `issue-\d+.rs` tests to have meaningful namesMichael Howell-0/+0
2024-07-12Add URL and crate_name to test casesMichael Howell-4/+26
2024-07-12Auto merge of #127665 - workingjubilee:rollup-g90yr21, r=workingjubileebors-547/+895
Rollup of 11 pull requests Successful merges: - #126502 (Ignore allocation bytes in some mir-opt tests) - #126922 (add lint for inline asm labels that look like binary) - #127209 (Added the `xop` target-feature and the `xop_target_feature` feature gate) - #127310 (Fix import suggestion ice) - #127338 (Migrate `extra-filename-with-temp-outputs` and `issue-85019-moved-src-dir` `run-make` tests to rmake) - #127381 (Migrate `issue-83045`, `rustc-macro-dep-files` and `env-dep-info` `run-make` tests to rmake) - #127535 (Fire unsafe_code lint on unsafe extern blocks) - #127619 (Suggest using precise capturing for hidden type that captures region) - #127631 (Remove `fully_normalize`) - #127632 (Implement `precise_capturing` support for rustdoc) - #127660 (Rename the internal `const_strlen` to just `strlen`) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-12Rollup merge of #127632 - compiler-errors:precise-capturing-rustdoc, r=fmeaseJubilee-0/+20
Implement `precise_capturing` support for rustdoc Implements rustdoc (+json) support for local (i.e. non-cross-crate-inlined) RPITs with `use<...>` precise capturing syntax. Tests kinda suck. They're really hard to write 😰 r? `@fmease` or re-roll if you're too busy! also cc `@aDotInTheVoid` for the json side Tracking: * https://github.com/rust-lang/rust/issues/127228#issuecomment-2201443216 (not fully fixed for cross-crate-inlined opaques) * https://github.com/rust-lang/rust/issues/123432
2024-07-12Rollup merge of #127619 - compiler-errors:precise-capturing-better-sugg, ↵Jubilee-3/+100
r=oli-obk Suggest using precise capturing for hidden type that captures region Adjusts the "add `+ '_`" suggestion for opaques to instead suggest adding or reusing the `+ use<>` in the opaque. r? oli-obk or please re-roll if you're busy!
2024-07-12Rollup merge of #127535 - spastorino:unsafe_code-unsafe_extern_blocks, r=oli-obkJubilee-0/+31
Fire unsafe_code lint on unsafe extern blocks Fixes #126738
2024-07-12Rollup merge of #127381 - Oneirical:testalt-consciousness, r=jieyouxuJubilee-63/+90
Migrate `issue-83045`, `rustc-macro-dep-files` and `env-dep-info` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try on musl. try-job: dist-x86_64-musl
2024-07-12Rollup merge of #127338 - Oneirical:ready-your-arbatests, r=jieyouxuJubilee-35/+59
Migrate `extra-filename-with-temp-outputs` and `issue-85019-moved-src-dir` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: try-job: armhf-gnu // try-job: test-various // already tried try-job: x86_64-msvc try-job: aarch64-apple
2024-07-12Rollup merge of #127310 - chenyukang:yukang-fix-suggest-import-ice, r=estebankJubilee-1/+120
Fix import suggestion ice Fixes #127302 #127302 only crash in edition 2015 #120074 can only reproduced in edition 2021 so I added revisions in test file.
2024-07-12Rollup merge of #127209 - sayantn:xop, r=AmanieuJubilee-2/+21
Added the `xop` target-feature and the `xop_target_feature` feature gate This is an effort towards #127208. This adds the `xop` target feature gated by `xop_target_feature`.
2024-07-12Rollup merge of #126922 - asquared31415:asm_binary_label, r=estebankJubilee-53/+255
add lint for inline asm labels that look like binary fixes #94426 Due to a bug/feature in LLVM, labels composed of only the digits `0` and `1` can sometimes be confused with binary literals, even if a binary literal would not be valid in that position. This PR adds detection for such labels and also as a drive-by change, adds a note to cases such as `asm!(include_str!("file"))` that the label that it found came from an expansion of a macro, it wasn't found in the source code. I expect this PR to upset some people that were using labels `0:` or `1:` without issue because they never hit the case where LLVM got it wrong, but adding a heuristic to the lint to prevent this is not feasible - it would involve writing a whole assembly parser for every target that we have assembly support for. [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-06-20/near/445870628) r? ``@estebank``
2024-07-12Rollup merge of #126502 - cuviper:dump-mir-exclude-alloc-bytes, r=estebankJubilee-390/+199
Ignore allocation bytes in some mir-opt tests This adds `rustc -Zdump-mir-exclude-alloc-bytes` to skip writing allocation bytes in MIR dumps, and applies it to tests that were failing on s390x due to its big-endian byte order. Fixes #126261
2024-07-12Auto merge of #123351 - beetrees:x86-ret-snan-rust, r=nikic,workingjubileebors-8/+423
Ensure floats are returned losslessly by the Rust ABI on 32-bit x86 Solves #115567 for the (default) `"Rust"` ABI. When compiling for 32-bit x86, this PR changes the `"Rust"` ABI to return floats indirectly instead of in x87 registers (with the exception of single `f32`s, which this PR returns in general purpose registers as they are small enough to fit in one). No change is made to the `"C"` ABI as that ABI requires x87 register usage and therefore will need a different solution.
2024-07-12Added the `xop` target feature and `xop_target_feature` gatesayantn-2/+21
2024-07-12fix interleaved panic outputjyn-4/+6
previously, we only held a lock for printing the backtrace itself. since all threads were printing to the same file descriptor, that meant random output in the default panic hook would be interleaved with the backtrace. now, we hold the lock for the full duration of the hook, and the output is ordered.
2024-07-12rewrite env-dep-info to rmakeOneirical-22/+41
2024-07-12rewrite rustc-macro-dep-files to rmakeOneirical-11/+13
2024-07-12rewrite and rename issue-83045 to rmakeOneirical-33/+39
2024-07-12rewrite and rename issue-85019-moved-src-dir to rmakeOneirical-30/+38
2024-07-12rewrite extra-filename-with-temp-outputs to rmakeOneirical-7/+23
2024-07-12Rollup merge of #126639 - sayantn:amx, r=AmanieuMatthias Krüger-2/+21
Add AMX target-features and `x86_amx_intrinsics` feature flag This is an effort towards #126622. This adds support for all 5 target-features for `AMX`, and introduces the feature flag `x86_amx_intrinsics`, which would gate these target-features and the yet-to-be-implemented amx intrinsics in stdarch.
2024-07-12Adjust tests for x86 "Rust" ABI changesbeetrees-8/+34
2024-07-12Add rustdoc-json support for use<>Michael Goulet-0/+6
2024-07-12Add rustdoc support for use<> in (local) RPITsMichael Goulet-0/+14
2024-07-12Auto merge of #127635 - matthiaskrgr:rollup-foopajr, r=matthiaskrgrbors-350/+294
Rollup of 6 pull requests Successful merges: - #127164 (match lowering: Clarify the main loop of the algorithm) - #127422 (as_simd: fix doc comment to be in line with align_to) - #127596 (More suggestion for converting `Option<&Vec<T>>` to `Option<&[T]>`) - #127607 (compiletest: Better error message for bad `normalize-*` headers) - #127622 (Mark `builtin_syntax` as internal) - #127625 (Revert accidental comment deletion) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-11Add the feature gate and target-featuressayantn-2/+21
2024-07-12Rollup merge of #127596 - tesuji:help-unwrap-or, r=compiler-errorsMatthias Krüger-0/+24
More suggestion for converting `Option<&Vec<T>>` to `Option<&[T]>` Please review commit-by-commit.
2024-07-12Rollup merge of #127164 - Nadrieril:clean-lowering-loop, r=matthewjasperMatthias Krüger-350/+270
match lowering: Clarify the main loop of the algorithm Now that we expand or-patterns in a single place in the algorithm, we can move it (back) to the main part of the loop. This makes the call-graph of the main loop rather simple: `match_candidates` has three branches that each call back to `match_candidates`. The remaining tricky part is `finalize_or_candidate`. I also factored out the whole "process a prefix of the candidates then process the rest" thing which I think helps legibility. The first two commits are a fix for an indexing mistake I introduced in https://github.com/rust-lang/rust/pull/126553, already sumitted in https://github.com/rust-lang/rust/pull/127028 but feel free to merge this first. r? `@matthewjasper`
2024-07-12Auto merge of #127382 - estebank:const-let, r=compiler-errorsbors-103/+189
Use verbose style when suggesting changing `const` with `let`
2024-07-11Add suggestion for `Option<&Vec<T>> -> Option<&[T]`Lzu Tao-0/+4
2024-07-11Add regression test for issue 127545Lzu Tao-0/+20
2024-07-11Fix aarch64 testEsteban Küber-24/+40
2024-07-11Account for `let foo = expr`; to suggest `const foo: Ty = expr;`Esteban Küber-34/+34
2024-07-11Use verbose style when suggesting changing `const` with `let`Esteban Küber-77/+147
2024-07-11Suggest using precise capturing for hidden type that captures regionMichael Goulet-3/+100
2024-07-11Rollup merge of #127605 - nikic:remove-extern-wasm, r=oli-obkMatthias Krüger-323/+63
Remove extern "wasm" ABI Remove the unstable `extern "wasm"` ABI (`wasm_abi` feature tracked in #83788). As discussed in https://github.com/rust-lang/rust/pull/127513#issuecomment-2220410679 and following, this ABI is a failed experiment that did not end up being used for anything. Keeping support for this ABI in LLVM 19 would require us to switch wasm targets to the `experimental-mv` ABI, which we do not want to do. It should be noted that `Abi::Wasm` was internally used for two things: The `-Z wasm-c-abi=legacy` ABI that is still used by default on some wasm targets, and the `extern "wasm"` ABI. Despite both being `Abi::Wasm` internally, they were not the same. An explicit `extern "wasm"` additionally enabled the `+multivalue` feature. I've opted to remove `Abi::Wasm` in this patch entirely, instead of keeping it as an ABI with only internal usage. Both `-Z wasm-c-abi` variants are now treated as part of the normal C ABI, just with different different treatment in adjust_for_foreign_abi.