about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-01-13Rollup merge of #106759 - compiler-errors:revert-105255, r=cjgillotYuki Okushi-1/+3
Revert "Make nested RPITIT inherit the parent opaque's generics." This reverts commit e2d41f4c974f0cc09e5aafb02883f222487610f9, and adjusts the `tests/ui/async-await/in-trait/nested-rpit.rs` test. r? `@cjgillot` fixes #106332, manually verified because it had no minimization :/ reopens #105197 cc #106729
2023-01-13Rollup merge of #106741 - GuillaumeGomez:reexport-doc-hidden, r=notriddleYuki Okushi-0/+26
Fix reexport of `doc(hidden)` item Part of #59368. It doesn't fix the `doc(inline)` nor the `doc(hidden)` on macro. I'll do it in a follow-up PR. r? `@notriddle`
2023-01-13Rollup merge of #106740 - petar-dambovaliev:float-iterator-hint, r=NilstriebYuki Okushi-0/+29
Adding a hint on iterator type errors Issue reference https://github.com/rust-lang/rust/issues/106728 - [x] add a case in the attribute - [x] add a test closes #106728
2023-01-13Rollup merge of #106675 - krtab:fix_improper_ctypes, r=davidtwcoYuki Okushi-0/+22
Mark ZST as FFI-safe if all its fields are PhantomData This presents one possible solution to issue: #106629. This is my first (tentative) contribution to the compiler itself. I'm looking forward for comments and feedback Closes: #106629
2023-01-13Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplettYuki Okushi-110/+8
Stabilize `abi_efiapi` feature Tracking issue: https://github.com/rust-lang/rust/issues/65815 Closes #65815
2023-01-12Auto merge of #106773 - Nilstrieb:rollup-sq73pyg, r=Nilstriebbors-32/+306
Rollup of 6 pull requests Successful merges: - #105806 (Support eager subdiagnostics again) - #106322 (Handle inference variables in `CollectAllMismatches` correctly) - #106579 (Suggest making private tuple struct field public) - #106714 (remove unreachable error code `E0490`) - #106751 (Fix rendering 'const' in header for intrinsics) - #106761 (Add `WaffleLapkin` to compiler reviewers) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-12Add test for displayed re-export of `doc(hidden)`Guillaume Gomez-0/+26
2023-01-12Rollup merge of #106751 - clubby789:const-intrinsic, r=GuillaumeGomeznils-0/+25
Fix rendering 'const' in header for intrinsics Fixes #99398
2023-01-12Rollup merge of #106579 - estebank:issue-52144, r=Nilstriebnils-6/+203
Suggest making private tuple struct field public Fix #52144.
2023-01-12Rollup merge of #106322 - compiler-errors:CollectAllMismatches-infer-vars, ↵nils-0/+70
r=oli-obk Handle inference variables in `CollectAllMismatches` correctly 1. Fix #106240 2. Treat int/float type variables correctly (see `src/test/ui/iterators/invalid-iterator-chain-with-int-infer.rs`), so we can point out things like "`Iterator::Item` changed to `{integer}` here"
2023-01-12Rollup merge of #105806 - mejrs:eager2, r=davidtwconils-26/+8
Support eager subdiagnostics again See https://github.com/rust-lang/rust/pull/104941#discussion_r1051135746 I'm not sure how to add a test for this. But I did pick some of the diagnostic structs in the mentioned PR and it works with them.
2023-01-12add note for float iteratorPetar Dambovaliev-0/+29
2023-01-12Auto merge of #105603 - oli-obk:non_repeatable_queries, r=petrochenkovbors-1/+1
Harden the pre-tyctxt query system against accidental recomputation While the current compiler has no issues where we `take` and then compute the query again, in https://github.com/rust-lang/rust/pull/105462 I accidentally introduced such a case. I also took the opportunity to remove `peek_mut`, which is only ever used for `global_tcx` to then invoke `enter`. I added an `enter` method directly on the query.
2023-01-12Mark ZST as FFI-safe if all its fields are PhantomDataArthur Carcano-0/+22
Modify the linting behavior and add the corresponding regression test
2023-01-12Auto merge of #106760 - compiler-errors:rollup-0bogyco, r=compiler-errorsbors-263/+348
Rollup of 8 pull requests Successful merges: - #103236 (doc: rewrite doc for signed int::{carrying_add,borrowing_sub}) - #103800 (Stabilize `::{core,std}::pin::pin!`) - #106097 (Migrate mir_build diagnostics 2 of 3) - #106170 (Move autoderef to `rustc_hir_analysis`) - #106323 (Stabilize f16c_target_feature) - #106360 (Tweak E0277 `&`-removal suggestions) - #106524 (Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch) - #106739 (Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-12Harden the pre-tyctxt query system against accidental recomputationOli Scherer-1/+1
2023-01-11Rollup merge of #106524 - compiler-errors:constructor-note, r=cjgillotMichael Goulet-53/+53
Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch Fixes #106516
2023-01-11Rollup merge of #106360 - estebank:remove-borrow-suggestion, r=compiler-errorsMichael Goulet-38/+155
Tweak E0277 `&`-removal suggestions Fix #64068, fix #84837.
2023-01-11Rollup merge of #106097 - mejrs:mir_build2, r=oli-obkMichael Goulet-167/+137
Migrate mir_build diagnostics 2 of 3 The first three commits are fairly boring, however I've made some changes to the output of the match checking diagnostics.
2023-01-11Rollup merge of #103800 - danielhenrymantilla:stabilize-pin-macro, r=dtolnayMichael Goulet-5/+3
Stabilize `::{core,std}::pin::pin!` As discussed [over here](https://github.com/rust-lang/rust/issues/93178#issuecomment-1295843548), it looks like a decent time to stabilize the `pin!` macro. ### Public API ```rust // in module `core::pin` /// API: `fn pin<T>($value: T) -> Pin<&'local mut T>` pub macro pin($value:expr $(,)?) { … } ``` - Tracking issue: #93178 (now all this needs is an FCP by the proper team?)
2023-01-12Revert "Make nested RPITIT inherit the parent opaque's generics." and adjust ↵Michael Goulet-1/+3
test This reverts commit e2d41f4c974f0cc09e5aafb02883f222487610f9.
2023-01-12Rollup merge of #106702 - estebank:trait-bounds, r=compiler-errorsMatthias Krüger-49/+108
Conserve cause of `ImplDerivedObligation` in E0599 CC #86377.
2023-01-12Rollup merge of #106676 - oli-obk:tait_test, r=dtolnayMatthias Krüger-0/+55
Test that we cannot use trait impl methods arguments as defining uses Addresses https://github.com/rust-lang/rust/issues/63063#issuecomment-1360053614 r? `@dtolnay`
2023-01-12Rollup merge of #106596 - estebank:verbose-e0271, r=compiler-errorsMatthias Krüger-6/+62
Hide more of long types in E0271 Fix #40186.
2023-01-12Rollup merge of #106532 - compiler-errors:dyn-star-to-dyn, r=jackh726Matthias Krüger-0/+20
Allow codegen to unsize `dyn*` to `dyn` `dyn* Trait` is just another type that implements `Trait`, so we should be able to unsize `&dyn* Trait` into `&dyn Trait` perfectly fine, same for `Box` and other unsizeable types. Fixes #106488
2023-01-12Rollup merge of #106309 - compiler-errors:prefer-non-err-candidates, r=oli-obkMatthias Krüger-63/+49
Prefer non-`[type error]` candidates during selection Fixes #102130 Fixes #106351 r? types note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during `match_impl`, I think.
2023-01-12Rollup merge of #106167 - yanchen4791:issue-105544-fix, r=oli-obkMatthias Krüger-22/+288
Fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311 Fixes #105544 The problems: The suggestion given for E0311 has invalid syntax when the synthetic type parameter is used for Trait type in function declaration: ```rust fn foo(d: impl Sized) -> impl Sized ``` instead of explicitly specified like the following: ```rust fn foo<T: Sized>(d: T) -> impl Sized ``` In addition to the syntax error, the suggestions given for E0311 are not complete when multiple elided lifetimes are involved in lifetime bounds, not all involved parameters are given the named lifetime in the suggestions. For the following test case: ``` fn foo(d: impl Sized, p: &mut ()) -> impl Sized + '_ { (d, p) } ``` a good suggestion should add the lifetime 'a to both d and p, instead of d only: ``` fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + '_ { (d, p) } ``` The Solution: Fix the syntax problem in the suggestions when synthetic type parameter is used, and also add lifetimes for all involved parameters.
2023-01-12Fix rendering 'const' for intrinsicsclubby789-0/+25
2023-01-12Auto merge of #106537 - ↵bors-4/+117
fmease:recover-where-clause-before-tuple-struct-body, r=estebank Recover from where clauses placed before tuple struct bodies Open to any suggestions regarding the phrasing of the diagnostic. Fixes #100790. `@rustbot` label A-diagnostics r? diagnostics
2023-01-11Stabilize `abi_efiapi` featureNicholas Bishop-110/+8
Tracking issue: https://github.com/rust-lang/rust/issues/65815
2023-01-11Auto merge of #106743 - matthiaskrgr:rollup-q5dpxms, r=matthiaskrgrbors-64/+241
Rollup of 6 pull requests Successful merges: - #106620 (Detect struct literal needing parentheses) - #106622 (Detect out of bounds range pattern value) - #106703 (Note predicate span on `ImplDerivedObligation`) - #106705 (Report fulfillment errors in new trait solver) - #106726 (Fix some typos in code comments.) - #106734 (Deny having src/test exisiting in tidy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-11Fix invalid syntax in impl Trait parameter type suggestions for E0311yanchen4791-22/+288
2023-01-11Translate `Overlap` eagerlymejrs-0/+1
2023-01-11Don't recommend `if let` if `let else` worksmejrs-40/+8
2023-01-11Migrate pattern matchingmejrs-135/+137
2023-01-11Migrate deconstruct_pat.rsmejrs-1/+0
2023-01-11Support eager subdiagnostics againmejrs-26/+8
2023-01-11Stabilize `::{core,std}::pin::pin!`Daniel Henry-Mantilla-5/+3
2023-01-11Test that we cannot use trait impl methods arguments as defining usesOli Scherer-0/+55
2023-01-11Hide more of long types in E0271Esteban Küber-6/+62
Fix #40186.
2023-01-11Use the root trait predicate to determine whether to remove referencesEsteban Küber-1/+68
Fix #84837.
2023-01-11Account for type paramsEsteban Küber-9/+22
2023-01-11Make `&`-removal suggestion verboseEsteban Küber-29/+66
2023-01-11review comments: Tweak outputEsteban Küber-0/+181
* Account for `struct S(pub(super)Ty);` in suggestion * Suggest changing field visibility in E0603 too
2023-01-11Suggest making private tuple struct field publicEsteban Küber-6/+22
Fix #52144.
2023-01-11Rollup merge of #106703 - compiler-errors:impl-derived-span, r=estebankMatthias Krüger-64/+176
Note predicate span on `ImplDerivedObligation` Seems obvious to point out the where-clause that introduces the `ImplDerivedObligation` :) r? `@estebank`
2023-01-11Rollup merge of #106622 - estebank:issue-68972, r=davidtwcoMatthias Krüger-0/+39
Detect out of bounds range pattern value Fix #68972.
2023-01-11Filter impl and where-clause candidates that reference errorsMichael Goulet-63/+49
2023-01-11Handle inference variables in CollectAllMismatches correctlyMichael Goulet-0/+70
2023-01-11label where constructor is defined and note that it should be calledMichael Goulet-25/+25