about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-10-21Rebase fallout.Camille GILLOT-25/+1
2023-10-21Handle more terminators.Camille GILLOT-6/+24
2023-10-21Do not thread through loop headers.Camille GILLOT-32/+6
2023-10-21Implement JumpThreading pass.Camille GILLOT-0/+1635
2023-10-20Replace all uses of `generator` in markdown documentation with `coroutine`Oli Scherer-12/+12
2023-10-20bless ui-fulldepsOli Scherer-2/+2
2023-10-20Bless coverage mapOli Scherer-3/+3
2023-10-20Rename `generator` folderOli Scherer-0/+0
2023-10-20Rename lots of files that had `generator` in their nameOli Scherer-81/+81
2023-10-20Rename `Gen` to `Coro` in testsOli Scherer-12/+12
2023-10-20s/generator/coroutine/Oli Scherer-734/+734
2023-10-20s/Generator/Coroutine/Oli Scherer-349/+349
2023-10-20Auto merge of #116965 - estebank:issue-65329, r=cjgillotbors-19/+64
Move where doc comment meant as comment check The new place makes more sense and covers more cases beyond individual statements. ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found doc comment `//!foo --> $DIR/doc-comment-in-stmt.rs:25:22 | LL | let y = x.max(1) //!foo | ^^^^^^ expected one of `.`, `;`, `?`, `else`, or an operator | help: add a space before `!` to write a regular comment | LL | let y = x.max(1) // !foo | + ``` Fix #65329.
2023-10-20Auto merge of #116899 - compiler-errors:closure-sig-infer, r=lcnrbors-0/+36
Add a test showing failing closure signature inference in new solver Been thinking a bit about how to make this test pass... but we don't actually have any good tests exercising this behavior in the suite. r? lcnr
2023-10-20Move where doc comment meant as comment checkEsteban Küber-19/+64
The new place makes more sense and covers more cases beyond individual statements. ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found doc comment `//!foo --> $DIR/doc-comment-in-stmt.rs:25:22 | LL | let y = x.max(1) //!foo | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected one of `.`, `;`, `?`, `else`, or an operator | help: add a space before `!` to write a regular comment | LL | let y = x.max(1) // !foo | + ``` Fix #65329.
2023-10-20Auto merge of #116838 - gurry:116836-dup-macro-invoc-diag, r=petrochenkovbors-42/+9
Fix duplicate labels emitted in `render_multispan_macro_backtrace()` This PR replaces the `Vec` used to store labels with an `FxIndexSet` in order to eliminate duplicates Fixes #116836
2023-10-19Auto merge of #115214 - Urgau:rfc-3127-trim-paths, r=compiler-errorsbors-5/+166
Implement rustc part of RFC 3127 trim-paths This PR implements (or at least tries to) [RFC 3127 trim-paths](https://github.com/rust-lang/rust/issues/111540), the rustc part. That is `-Zremap-path-scope` with all of it's components/scopes. `@rustbot` label: +F-trim-paths
2023-10-19FileCheck transmute.Camille GILLOT-2/+44
2023-10-19FileCheck inline_shims.Camille GILLOT-1/+4
2023-10-19FileCheck issue_106141.Camille GILLOT-1/+6
2023-10-19Mention skip in README.Camille GILLOT-0/+2
2023-10-19FileCheck lower_slice_len.Camille GILLOT-2/+3
2023-10-19FileCheck lower_array_len.Camille GILLOT-1/+14
2023-10-19FileCheck lower_intrinsics.Camille GILLOT-1/+87
2023-10-19FileCheck casts.Camille GILLOT-50/+53
2023-10-19FileCheck combine_transmutes.Camille GILLOT-1/+22
2023-10-19FileCheck duplicate_switch_targets.Camille GILLOT-4/+5
2023-10-19FileCheck intrinsic_asserts.Camille GILLOT-37/+46
2023-10-19FileCheck combine_clone_of_primitives.Camille GILLOT-8/+11
2023-10-19FileCheck bool_compare.Camille GILLOT-103/+191
2023-10-19FileCheck combine_array_len.Camille GILLOT-2/+3
2023-10-19Add README.Camille GILLOT-0/+16
2023-10-19FileCheck box_expr.rsCamille GILLOT-145/+104
This check is made `needs-unwind`, as the panic=abort case is a strictly simpler version.
2023-10-19FileCheck basic_assignment.rs.Camille GILLOT-3/+20
2023-10-19FileCheck asm_unwind_panic_abort.rsCamille GILLOT-1/+3
2023-10-19FileCheck array_index_is_temporary.rsCamille GILLOT-1/+7
2023-10-19Run filecheck on reference_prop.rsCamille GILLOT-16/+318
2023-10-19Allow to run filecheck in mir-opt tests.Camille GILLOT-190/+470
2023-10-19Rollup merge of #116896 - cjgillot:single-inline, r=oli-obkMatthias Krüger-0/+19
Only check in a single place if a pass is enabled. Fixes https://github.com/rust-lang/rust/issues/116294
2023-10-19Auto merge of #116037 - wesleywiser:stack_protector_test_windows, r=cuviperbors-1/+821
Add `-Zstack-protector` test for Windows targets Add variants of the `stack-protector-heuristics-effect.rs` test for 32-bit and 64-bit MSVC Windows and update the original test to run on GNU Windows targets. I added two tests instead of trying to modify the original because: - MSVC uses a different function name (`__security_check_cookie` to perform the test rather than doing the test inline and calling `__stack_chk_fail`). - LLVM's stack protection pass doesn't currently support generating checks for [frames with funclet based EH personality](https://github.com/llvm/llvm-project/blob/37fd3c96b917096d8a550038f6e61cdf0fc4174f/llvm/lib/CodeGen/StackProtector.cpp#L103C1-L109C4). - 32-bit Windows uses classic EH while 64-bit Windows uses table-based EH which results in slightly different codegen. [CI run with test passing on {i686,x86_64}-{msvc,mingw}](https://github.com/rust-lang/rust/actions/runs/6275450644/job/17042958375?pr=116037)
2023-10-19Rollup merge of #116908 - estebank:issue-78206, r=compiler-errorsLeón Orell Valerian Liehr-50/+52
Tweak wording of type errors involving type params Fix #78206.
2023-10-19Rollup merge of #116829 - fmease:rust-aint-c, r=compiler-errorsLeón Orell Valerian Liehr-0/+62
Make `#[repr(Rust)]` incompatible with other (non-modifier) representation hints like `C` and `simd` Read more about this change here: https://github.com/rust-lang/rust/pull/116829#issuecomment-1768618240. Fixes [after backport] #116825.
2023-10-19Rollup merge of #116663 - compiler-errors:resolve-regions, r=lcnrLeón Orell Valerian Liehr-0/+28
Don't ICE when encountering unresolved regions in `fully_resolve` We can encounter unresolved regions due to unconstrained impl lifetime arguments because `collect_return_position_impl_trait_in_trait_tys` runs before WF actually checks that the impl is well-formed. Fixes #116525
2023-10-19Fix duplicate labels emitted in `render_multispan_macro_backtrace()`Gurinder Singh-42/+9
Using hash set instead of vec to weed out duplicates
2023-10-18Tweak wording of type errors involving type paramsEsteban Küber-50/+52
Fix #78206.
2023-10-18Auto merge of #116493 - compiler-errors:coinductive-cycle-lint, r=lcnrbors-0/+25
Bump `COINDUCTIVE_OVERLAP_IN_COHERENCE` to deny + warn in deps 1.73 is the first place this shows up in stable (recall that there was only 1 regression), so let's bump this to deny on nightly. r? lcnr
2023-10-18Don't ICE when encountering unresolved regions in fully_resolveMichael Goulet-0/+28
2023-10-18Add a test showing failing closure signature inference in new solverMichael Goulet-0/+36
2023-10-18Bump COINDUCTIVE_OVERLAP_IN_COHERENCEMichael Goulet-0/+25
2023-10-18Auto merge of #116046 - Zalathar:fn-cov-info, r=cjgillotbors-31/+23
coverage: Move most per-function coverage info into `mir::Body` Currently, all of the coverage information collected by the `InstrumentCoverage` pass is smuggled through MIR in the form of individual `StatementKind::Coverage` statements, which must then be reassembled by coverage codegen. That's awkward for a number of reasons: - While some of the coverage statements do care about their specific position in the MIR control-flow graph, many of them don't, and are just tacked onto the function's first BB as metadata carriers. - MIR inlining can result in coverage statements being duplicated, so coverage codegen has to jump through hoops to avoid emitting duplicate mappings. - MIR optimizations that would delete coverage statements need to carefully copy them into the function's first BB so as not to omit them from coverage reports. - The order in which coverage codegen sees coverage statements is dependent on MIR optimizations/inlining, which can cause unnecessary churn in the emitted coverage mappings. - We don't have a good way to annotate MIR-level functions with extra coverage info that doesn't belong in a statement. --- This PR therefore takes most of the per-function coverage info and stores it in a field in `mir::Body` as `Option<Box<FunctionCoverageInfo>>`. (This adds one pointer to the size of `mir::Body`, even when coverage is not enabled.) Coverage statements still need to be injected into MIR in some cases, but only when they actually affect codegen (counters) or are needed to detect code that has been optimized away as unreachable (counters/expressions). --- By the end of this PR, the information stored in `FunctionCoverageInfo` is: - A hash of the function's source code (needed by LLVM's coverage map format) - The number of coverage counters added by coverage instrumentation - A table of coverage expressions, associating each expression ID with its operator (add or subtract) and its two operands - The list of mappings, associating each covered code region with a counter/expression/zero value --- ~~This is built on top of #115301, so I'll rebase and roll a reviewer once that lands.~~ r? `@ghost` `@rustbot` label +A-code-coverage