about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-09-28Tweak wording of missing angle backets in qualified pathEsteban Küber-25/+147
2023-09-26Auto merge of #116175 - matthiaskrgr:rollup-cwteiwy, r=matthiaskrgrbors-6/+70
Rollup of 5 pull requests Successful merges: - #116099 (Add regression test for issue #79865) - #116131 (Rename `cold_path` to `outline`) - #116151 (Fix typo in rustdoc unstable features doc) - #116153 (Update books) - #116162 (Gate and validate `#[rustc_safe_intrinsic]`) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-26Rollup merge of #116162 - fmease:gate-n-validate-rustc_safe_intrinsic, ↵Matthias Krüger-6/+32
r=Nilstrieb Gate and validate `#[rustc_safe_intrinsic]` Copied over from #116159: > This was added as ungated in https://github.com/rust-lang/rust/pull/100719/files#diff-09c366d3ad3ec9a42125253b610ca83cad6b156aa2a723f6c7e83eddef7b1e8fR502, probably because the author looked at the surrounding attributes, which are ungated because they are gated specially behind the staged_api feature. > > I don't think we need to crater this, the attribute is entirely useless without the intrinsics feature, which is already unstable.. r? ``@Nilstrieb``
2023-09-26Rollup merge of #116099 - eduardosm:issue-79865-regression, r=oli-obkMatthias Krüger-0/+38
Add regression test for issue #79865 Closes https://github.com/rust-lang/rust/issues/79865
2023-09-26Auto merge of #115893 - RalfJung:match-require-partial-eq, r=oli-obkbors-2/+50
lint towards rejecting consts in patterns that do not implement PartialEq I think we definitely don't want to allow such consts, so even while the general plan around structural matching is up in the air, we can start the process of getting non-PartialEq matches out of the ecosystem.
2023-09-26Auto merge of #116125 - RalfJung:const-param-ty-eq, r=compiler-errorsbors-3/+34
ConstParamTy: require Eq as supertrait As discussed with `@BoxyUwu` [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/.60ConstParamTy.60.20and.20.60Eq.60). We want to say that valtree equality on const generic params agrees with `==`, but that only makes sense if `==` actually exists, hence we should have an appropriate bound. Valtree equality is an equivalence relation, so such a type can always be `Eq` and not just `PartialEq`.
2023-09-26Auto merge of #116124 - WaffleLapkin:fix-proc-macro-literal-to-string, ↵bors-0/+149
r=compiler-errors Properly print cstr literals in `proc_macro::Literal::to_string` Previously we printed the contents of the string, rather than the actual string literal (e.g. `the c string` instead of `c"the c string"`). Fixes #112820 cc #105723
2023-09-26Auto merge of #116072 - compiler-errors:rpitit-implied-bounds, r=aliemjaybors-0/+81
Use placeholders to prevent using inferred RPITIT types to imply their own well-formedness The issue here is that we use the same signature to do RPITIT inference as we do to compute implied bounds. To fix this, when gathering the assumed wf types for the method, we replace all of the infer vars (that will be eventually used to infer RPITIT types) with type placeholders, which imply nothing about lifetime bounds. This solution kind of sucks, but I'm not certain there's another feasible way to fix this. If anyone has a better solution, I'd be glad to hear it. My naive first solution was, instead of using placeholders, to replace the signature with the RPITIT projections that it originally started out with. But turns out that we can't just use the unnormalized signature of the trait method in `implied_outlives_bounds` since we normalize during WF computation -- that would cause a query cycle in `collect_return_position_impl_trait_in_trait_tys`. idk who to request review... r? `@lcnr` or `@aliemjay` i guess. Fixes #116060
2023-09-26Auto merge of #116080 - estebank:issue-115905-2, r=compiler-errorsbors-37/+231
Point at more causes of expectation of break value when possible Follow up to #116071. r? `@compiler-errors` Disregard the first commit, which is in the other PR.
2023-09-25Use verbose suggestion for `break` without valueEsteban Küber-48/+72
2023-09-25Auto merge of #116084 - fmease:rustdoc-fix-x-crate-async-fn, r=GuillaumeGomezbors-14/+37
rustdoc: correctly render the return type of cross-crate async fns Fixes #115760.
2023-09-25Handle all arbitrary `loop` nesting in `break` type errorsEsteban Küber-3/+115
2023-09-25Gate and validate #[rustc_safe_intrinsic]León Orell Valerian Liehr-6/+32
2023-09-25Account for more cases of nested `loop`s for `break` type mismatchesEsteban Küber-8/+54
2023-09-25rename lint; add tracking issueRalf Jung-8/+8
2023-09-25Auto merge of #113396 - ↵bors-0/+38
lenko-d:dont_ICE_when_no_bound_vars_for_lifetime_binders, r=compiler-errors Don't ICE when no bound vars found while doing closure hir type check The problem was that we were not visiting the const generic default argument in a bound where predicate when the HIR gets traversed in hir_analysis -> collect -> resolve_bound_vars. Fixes [112574](https://github.com/rust-lang/rust/issues/112574)
2023-09-25Handle yet another case of `break` type mismatchEsteban Küber-1/+4
2023-09-25Point at previous breaks that have the expected typeEsteban Küber-1/+10
2023-09-25rustdoc: correctly render ret ty of cross-crate async fnsLeón Orell Valerian Liehr-14/+37
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-24Added additional visit steps to visit_generic_param() in order to avoid ICE ↵Lenko Donchev-0/+38
on no bound vars.
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-24ConstParamTy: require EqRalf Jung-3/+34
2023-09-24Add a test for printing literals via `proc-macro`Maybe Waffle-0/+149
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-24work towards rejecting consts in patterns that do not implement PartialEqRalf Jung-2/+50
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-23Add regression test for issue #79865Eduardo Sánchez Muñoz-0/+38
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