about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-09-25Add test for enum variant value displayGuillaume Gomez-0/+15
2023-09-25Auto merge of #116078 - eduardosm:closure-inherit-target-feature, ↵bors-0/+58
r=Mark-Simulacrum Add assembly test to make sure that inlining works as expected when closures inherit target features Closes https://github.com/rust-lang/rust/issues/108338 (the added test proves that it is working correctly)
2023-09-24Auto merge of #116117 - cjgillot:drop-tracking-mir-noscope, r=compiler-errorsbors-15/+15
Remove dead diagnostic code for generators This code has become unreachable with #107421.
2023-09-24Auto merge of #116120 - GuillaumeGomez:regression-102467, r=compiler-errorsbors-0/+24
Add regression test for #102467 Fixes #102467. r? `@compiler-errors`
2023-09-24Add assembly test to make sure that inlining works as expected when closures ↵Eduardo Sánchez Muñoz-0/+58
inherit target features
2023-09-24Add regression test for #102467Guillaume Gomez-0/+24
2023-09-24Remove span from BrAnon.Camille GILLOT-15/+15
2023-09-24Auto merge of #115794 - cjgillot:aggregate-no-box, r=davidtwcobors-0/+953
Do not create a DerefLen place for `Box<[T]>`. Fixes https://github.com/rust-lang/rust/issues/115789
2023-09-24Auto merge of #104385 - BlackHoleFox:apple-minimum-bumps, r=petrochenkovbors-8/+8
Raise minimum supported Apple OS versions This implements the proposal to raise the minimum supported Apple OS versions as laid out in the now-completed MCP (https://github.com/rust-lang/compiler-team/issues/556). As of this PR, rustc and the stdlib now support these versions as the baseline: - macOS: 10.12 Sierra - iOS: 10 - tvOS: 10 - watchOS: 5 (Unchanged) In addition to everything this breaks indirectly, these changes also erase the `armv7-apple-ios` target (currently tier 3) because the oldest supported iOS device now uses ARMv7s. Not sure what the policy around tier3 target removal is but shimming it is not an option due to the linker refusing. [Per comment](https://github.com/rust-lang/compiler-team/issues/556#issuecomment-1297175073), this requires a FCP to merge. cc `@wesleywiser.`
2023-09-24Auto merge of #116112 - matthiaskrgr:rollup-s3cm2f7, r=matthiaskrgrbors-22/+103
Rollup of 5 pull requests Successful merges: - #116073 (Allow higher-ranked fn sigs in `ValuePairs`) - #116082 (Tweak expected message to explain what it's actually signifying) - #116086 (More accurate suggestion for `self.` and `Self::`) - #116104 (Reuse calculate_debuginfo_offset for fragments.) - #116106 (Migrate GUI colors test to original CSS color format) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-23Raise minimum supported macOS to 10.12BlackHoleFox-8/+8
2023-09-24Rollup merge of #116106 - GuillaumeGomez:migrate-gui-test-color-42, r=notriddleMatthias Krüger-1/+1
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. And with this one I'm finally done with this migration. r? ``@notriddle``
2023-09-24Rollup merge of #116086 - estebank:issue-115992, r=compiler-errorsMatthias Krüger-11/+92
More accurate suggestion for `self.` and `Self::` Detect that we can't suggest `self.` in an associated function without `&self` receiver. Partially address #115992. r? ``@compiler-errors``
2023-09-24Rollup merge of #116082 - compiler-errors:default-assoc-ty-msg, r=estebankMatthias Krüger-3/+3
Tweak expected message to explain what it's actually signifying r? ``@estebank`` since you added this
2023-09-24Rollup merge of #116073 - compiler-errors:poly-sigs, r=b-naberMatthias Krüger-7/+7
Allow higher-ranked fn sigs in `ValuePairs` For better bookkeeping -- only affects diagnostic path. Allow reporting signature mismatches like "signature"s and not "fn pointer"s. Improves https://github.com/rust-lang/rust/pull/115897#discussion_r1331940846
2023-09-23Auto merge of #112711 - Emilgardis:lit_byte_char, r=dtolnaybors-0/+27
implement Literal::byte_character without this, the only way to create a `LitKind::Byte` is by doing `"b'a'".parse::<Literal>()`, this solves that by enabling `Literal::byte_character(b'a')` cc #71358 The tracking issue is #115268
2023-09-23implement Literal::byte_characterEmil Gardström-0/+27
without this, the only way to create a `LitKind::Byte` is by doing `"b'a'".parse::<Literal>()`, this solves that by enabling `Literal::byte_character(b'a')`
2023-09-23Auto merge of #107421 - cjgillot:drop-tracking-mir, r=oli-obkbors-5378/+514
Enable -Zdrop-tracking-mir by default This PR enables the `drop-tracking-mir` flag by default. This flag was initially implemented in https://github.com/rust-lang/rust/pull/101692. This flag computes auto-traits on generators based on their analysis MIR, instead of trying to compute on the HIR body. This removes the need for HIR-based drop-tracking, as we can now reuse the same code to compute generator witness types and to compute generator interior fields.
2023-09-23Migrate GUI colors test to original CSS color formatGuillaume Gomez-1/+1
2023-09-23Auto merge of #116047 - a-lafrance:I80836-codegen-test, r=Mark-Simulacrumbors-0/+17
Add codegen test to guard against VecDeque optimization regression Very small PR that adds a codegen test to guard against regression for the `VecDeque` optimization addressed in #80836. Ensures that Rustc optimizes away the panic when unwrapping the result of `.get(0)` because of the `!is_empty()` condition.
2023-09-23Make test more robust to opts.Camille GILLOT-6/+4
2023-09-23Remove GeneratorWitness and rename GeneratorWitnessMIR.Camille GILLOT-24/+17
2023-09-23Bless mir-optCamille GILLOT-61/+90
2023-09-23Bless tests.Camille GILLOT-918/+486
2023-09-23Revert duplication of tests.Camille GILLOT-4891/+439
2023-09-23Auto merge of #116081 - compiler-errors:closure-captures-sized, r=cjgillotbors-0/+217
Check that closure/generator's interior/capture types are sized check that closure upvars and generator interiors are sized. this check is only necessary when `unsized_fn_params` or `unsized_locals` is enabled, so only check if those are active. Fixes #93622 Fixes #61335 Fixes #68543
2023-09-23Auto merge of #116045 - notriddle:notriddle/issue-83556, r=cjgillotbors-0/+12
diagnostics: avoid mismatch between variance index and hir generic This happens because variances are constructed from ty generics, and ty generics are always constructed with lifetimes first. https://github.com/rust-lang/rust/blob/b3aa8e7168a3d940122db3561289ffbf3f587262/compiler/rustc_hir_analysis/src/collect/generics_of.rs#L248-L269 Fixes #83556
2023-09-23Auto merge of #116071 - estebank:issue-115905, r=compiler-errorsbors-1/+24
Point at cause of expectation of `break` value when possible When encountering a type error within the value of a `break` statement, climb the HIR tree to identify if the expectation comes from an assignment or a return type (if the loop is the tail expression of a `fn`). Fix #115905.
2023-09-22diagnostics: simpler 83556 handling by bailing outMichael Howell-12/+1
2023-09-23Auto merge of #116052 - oli-obk:ceci_nest_pas_une_query, r=WaffleLapkinbors-2/+2
Add a way to decouple the implementation and the declaration of a TyCtxt method. properly addresses https://github.com/rust-lang/rust/pull/115819 accepted MCP: https://github.com/rust-lang/compiler-team/issues/395
2023-09-23Check types live across yields in generators tooMichael Goulet-0/+183
2023-09-23Check that closure's by-value captures are sizedMichael Goulet-0/+34
2023-09-23Add testEsteban Küber-0/+36
2023-09-23Tweak wording and logicEsteban Küber-10/+10
2023-09-23When encountering method on `Self` that we can't suggest, mention itEsteban Küber-0/+3
2023-09-23More accurate suggestion for `self.` and `Self::`Esteban Küber-3/+45
Fix #115992.
2023-09-23Tweak expected message to explain what it's actually signifyingMichael Goulet-3/+3
2023-09-23Auto merge of #115695 - tmiasko:compiletest-supported-sanitizers, r=oli-obkbors-11/+16
compiletest: load supported sanitizers from target spec
2023-09-22Point at cause of expectation of `break` value when possibleEsteban Küber-1/+24
Fix #115905.
2023-09-22Auto merge of #116077 - matthiaskrgr:rollup-2y1buzg, r=matthiaskrgrbors-15/+195
Rollup of 6 pull requests Successful merges: - #115770 (Match on elem first while building move paths) - #115999 (Capture scrutinee of if let guards correctly) - #116056 (Make unsized casts illegal) - #116061 (Remove TaKO8Ki from review rotation) - #116062 (Change `start` to `#[start]` in some diagnosis) - #116067 (Open the FileEncoder file for reading and writing) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-22Rollup merge of #116067 - saethlin:meta-stats-ice, r=WaffleLapkinMatthias Krüger-0/+7
Open the FileEncoder file for reading and writing Maybe I just don't know `File` well enough, but the previous comment didn't make it clear enough to me that we can't use `File::create`. This one does. Fixes https://github.com/rust-lang/rust/issues/116055 r? `@WaffleLapkin`
2023-09-22Rollup merge of #116062 - eduardosm:start-fn-diag, r=WaffleLapkinMatthias Krüger-15/+15
Change `start` to `#[start]` in some diagnosis They refer to a function with the `start` attribute, but not necessarily named `start`.
2023-09-22Rollup merge of #116056 - ouz-a:wide_ice, r=compiler-errorsMatthias Krüger-0/+15
Make unsized casts illegal Weirdly enough this https://github.com/rust-lang/rust/issues/115998 issue seems to exist since Rust 1.0 (couldn't check before that) but it's only recently been noticed. This change makes those casts illegal. Fixes https://github.com/rust-lang/rust/issues/115998
2023-09-22Rollup merge of #115999 - matthewjasper:closure-capture-let-guards, r=b-naberMatthias Krüger-0/+158
Capture scrutinee of if let guards correctly Previously we were always capturing by value. cc #51114
2023-09-22Merge `ExternProviders` into the general `Providers` structOli Scherer-2/+2
2023-09-22Open the FileEncoder file for reading and writingBen Kimock-0/+7
2023-09-22Auto merge of #116001 - fmease:validate-crate-name-extern-cli-opt, r=est31bors-17/+29
[breaking change] Validate crate name in `--extern` [MCP 650] Reject non-ASCII-identifier crate names passed to the CLI option `--extern` (`rustc`, `rustdoc`). Implements [MCP 650](https://github.com/rust-lang/compiler-team/issues/650) (except that we only allow ASCII identifiers not arbitrary Rust identifiers). Fixes #113035. [As mentioned on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Disallow.20non-identifier-valid.20--extern.20cr.E2.80.A6.20compiler-team.23650/near/376826988), doing a crater run probably doesn't make sense since it wouldn't yield anything. Most users don't interact with `rustc` directly but only ever through Cargo which always passes a valid crate name to `--extern` when it invokes `rustc` and `rustdoc`. In any case, the user wouldn't be able to use such a crate name in the source code anyway. Note that I'm not using [`rustc_session::output::validate_crate_name`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_session/output/fn.validate_crate_name.html) (used for `--crate-name` and `#![crate_name]`) since the latter doesn't reject non-ASCII crate names and ones that start with a digit. As an aside, I've also thought about getting rid of `validate_crate_name` entirely in a separate PR (with another MCP) in favor of `is_ascii_ident` to reject more weird `--crate-name`s, `#![crate_name]`s and file names but I think that would lead to a lot of actual breakage, namely because of file names starting with a digit. In `tests/ui` 9 tests would be impacted for example. CC `@estebank` r? `@est31`
2023-09-22Allow higher-ranked fn sigs in ValuePairsMichael Goulet-7/+7
2023-09-22Fix test on targets with crt-static defaultTomasz Miąsko-11/+16
2023-09-22make unsized cast illegalouz-a-0/+15