about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
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-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
2023-10-18Only check in a single place if a pass is enabled.Camille GILLOT-0/+19
2023-10-18Make `#[repr(Rust)]` and `#[repr(C)]` incompatible with one anotherLeón Orell Valerian Liehr-0/+62
2023-10-18coverage: Store expression data in function coverage infoZalathar-2/+4
Even though expression details are now stored in the info structure, we still need to inject `ExpressionUsed` statements into MIR, because if one is missing during codegen then we know that it was optimized out and we can remap all of its associated code regions to zero.
2023-10-18coverage: Store all of a function's mappings in function coverage infoZalathar-31/+21
Previously, mappings were attached to individual coverage statements in MIR. That necessitated special handling in MIR optimizations to avoid deleting those statements, since otherwise codegen would be unable to reassemble the original list of mappings. With this change, a function's list of mappings is now attached to its MIR body, and survives intact even if individual statements are deleted by optimizations.
2023-10-18Rollup merge of #116879 - aliemjay:revert-opaque-bubble, r=oli-obkAli MJ Al-Nasrawy-3/+82
revert #114586 Reverts #114586. cc #116877 (not closing until this gets a beta backport) fixes #116684 fixes https://github.com/rust-lang/rust/pull/114586#issuecomment-1751967321 r? `@oli-obk` or `@lcnr`
2023-10-18Rollup merge of #116865 - estebank:issue-46969, r=compiler-errorsAli MJ Al-Nasrawy-0/+44
Suggest constraining assoc types in more cases Fix #46969. ``` error[E0308]: mismatched types --> $DIR/suggest-contraining-assoc-type-because-of-assoc-const.rs:12:21 | LL | const N: C::M = 4u8; | ^^^ expected associated type, found `u8` | = note: expected associated type `<C as O>::M` found type `u8` help: consider constraining the associated type `<C as O>::M` to `u8` | LL | impl<C: O<M = u8>> U<C> for u16 { | ++++++++ ```
2023-10-18Rollup merge of #116856 - oli-obk:no_effects, r=compiler-errorsAli MJ Al-Nasrawy-0/+30
Disable effects in libcore again r? `@fee1-dead` This was accidentally allowed by https://github.com/rust-lang/rust/pull/114776 without feature gates
2023-10-18Rollup merge of #116812 - ↵Ali MJ Al-Nasrawy-0/+25
rmehri01:missing_copy_implementations_non_exhaustive, r=petrochenkov Disable missing_copy_implementations lint on non_exhaustive types Fixes #116766
2023-10-18Auto merge of #116814 - estebank:windows-ice-path, r=petrochenkovbors-0/+6
Use `YYYY-MM-DDTHH_MM_SS` as datetime format for ICE dump files Windows paths do not support `:`, so use a datetime format in ICE dump paths that Windows will accept. CC #116809, fix #115180.
2023-10-18revert rust-lang/rust#114586Ali MJ Al-Nasrawy-3/+82
2023-10-18Auto merge of #116713 - estebank:issue-116703, r=compiler-errorsbors-52/+528
Properly account for self ty in method disambiguation suggestion Fix #116703.
2023-10-17Bless coverage-map testsBen Kimock-6/+23
2023-10-17Automatically enable cross-crate inlining for small functionsBen Kimock-275/+248
2023-10-17Suggest constraining assoc types in more casesEsteban Küber-0/+44
Fix #46969.
2023-10-17Auto merge of #116767 - cjgillot:alloc-normalize, r=oli-obkbors-326/+326
Normalize alloc-id in tests. AllocIds are globally numbered in a rustc invocation. This makes them very sensitive to changes unrelated to what is being tested. This commit normalizes them by renumbering, in order of appearance in the output. The renumbering allows to keep the identity, that a simple `allocN` wouldn't. This is useful when we have memory dumps. cc `@saethlin` r? `@oli-obk`
2023-10-17Disable effects in libcore againOli Scherer-0/+30