about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-01-12Auto merge of #106760 - compiler-errors:rollup-0bogyco, r=compiler-errorsbors-1385/+1676
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-12Auto merge of #106757 - matthiaskrgr:rollup-9j8830g, r=matthiaskrgrbors-337/+860
Rollup of 10 pull requests Successful merges: - #106167 (Fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311) - #106309 (Prefer non-`[type error]` candidates during selection) - #106532 (Allow codegen to unsize `dyn*` to `dyn`) - #106596 (Hide more of long types in E0271) - #106638 (std tests: use __OsLocalKeyInner from realstd) - #106676 (Test that we cannot use trait impl methods arguments as defining uses) - #106702 (Conserve cause of `ImplDerivedObligation` in E0599) - #106732 (rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors.) - #106733 (Revert "warn newer available version of the x tool") - #106748 (Clean up `OnUnimplementedFormatString::verify`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-11Rollup merge of #106739 - WaffleLapkin:astconv, r=estebankMichael Goulet-664/+628
Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)` This removes the need for <>><><><<>> dances and makes the code a bit nicer. Not sure if `astconv` is the best name though, maybe someone has a better idea?
2023-01-11Rollup merge of #106524 - compiler-errors:constructor-note, r=cjgillotMichael Goulet-60/+78
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-72/+249
Tweak E0277 `&`-removal suggestions Fix #64068, fix #84837.
2023-01-11Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, ↵Michael Goulet-4/+4
r=petrochenkov Stabilize f16c_target_feature Resolves https://github.com/rust-lang/stdarch/issues/1234 Library PR for stabilizing corresponding intrinsics: https://github.com/rust-lang/stdarch/pull/1366 See also #44839 tracking issue for target_feature
2023-01-11Rollup merge of #106170 - compiler-errors:autoderef-to-analysis, r=lcnrMichael Goulet-46/+70
Move autoderef to `rustc_hir_analysis` Not sure if this is a change we actually want, but autoderef really is only (functionally) used by `rustc_hir_analysis` and `rustc_hir_typeck`, so it probably should live there. Instead, implement a separate autoderef helper in `TypeErrCtxt` for the one use-case that goes against the ordering of the crate graph..
2023-01-11Rollup merge of #106097 - mejrs:mir_build2, r=oli-obkMichael Goulet-486/+566
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-17/+6
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-11Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-seMichael Goulet-36/+75
doc: rewrite doc for signed int::{carrying_add,borrowing_sub} Reword the documentation for bigint helper methods, signed `int::{carrying_add,borrowing_sub}` (#85532). This change is a follow-up to #101889, which was for the unsigned methods.
2023-01-12Rollup merge of #106748 - clubby789:on-unimplemented-fmt-verify, ↵Matthias Krüger-29/+32
r=compiler-errors Clean up `OnUnimplementedFormatString::verify` Lift the always-allowed symbols to a static array and replace a `match iter().find(...)` with `iter().any(...)`
2023-01-12Rollup merge of #106733 - DebugSteven:revert-104552-warn-newer-x, r=jyn514Matthias Krüger-82/+13
Revert "warn newer available version of the x tool" Reverts rust-lang/rust#104552 Running the x executable directly created an [issue](https://github.com/rust-lang/rust/issues/106469) here. There are other options for warning a user that a newer version of x exists in the issue's discussion as well. r? `@jyn514`
2023-01-12Rollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikicMatthias Krüger-12/+13
rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors. LLVM upstream has deprecated llvm::makeArrayRef and will remove it.
2023-01-12Rollup merge of #106702 - estebank:trait-bounds, r=compiler-errorsMatthias Krüger-83/+165
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 #106638 - RalfJung:realstd, r=thomccMatthias Krüger-7/+15
std tests: use __OsLocalKeyInner from realstd This is basically the same as https://github.com/rust-lang/rust/pull/100201, but for __OsLocalKeyInner: Some std tests are failing in Miri on Windows because [this static](https://github.com/rust-lang/rust/blob/a377893da2cd7124e5a18c7116cbb70e16dd5541/library/std/src/sys/windows/thread_local_key.rs#L234-L239) is getting duplicated, and Miri does not handle that properly -- Miri does not support this magic `.CRT$XLB` linker section, but instead just looks up this particular hard-coded static in the standard library. This PR lets the test suite use the std static instead of having its own copy. Fixes https://github.com/rust-lang/miri/issues/2754 r? `@thomcc`
2023-01-12Rollup merge of #106596 - estebank:verbose-e0271, r=compiler-errorsMatthias Krüger-16/+123
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-3/+21
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-66/+58
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-39/+365
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-12Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514bors-4/+0
Use CI LLVM in `test-various` builder It was disabled because it needs `lld`, but since #104748 was merged it is no longer needed. This will speed this test, since it no longer needs to build LLVM.
2023-01-12Auto merge of #106537 - ↵bors-17/+266
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-11Auto merge of #106743 - matthiaskrgr:rollup-q5dpxms, r=matthiaskrgrbors-109/+452
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-11Clean up `OnUnimplementedFormatString::verify`clubby789-29/+32
2023-01-11Fix invalid syntax in impl Trait parameter type suggestions for E0311yanchen4791-39/+365
2023-01-11Translate `Overlap` eagerlymejrs-12/+19
2023-01-11Some cleanup, oopsmejrs-5/+0
2023-01-11Don't recommend `if let` if `let else` worksmejrs-89/+26
2023-01-11Migrate pattern matchingmejrs-324/+415
2023-01-11Migrate usefulness.rsmejrs-6/+47
2023-01-11Migrate deconstruct_pat.rsmejrs-23/+48
2023-01-11Translate const_to_pat.rsmejrs-138/+122
2023-01-11Stabilize `::{core,std}::pin::pin!`Daniel Henry-Mantilla-17/+6
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-16/+123
Fix #40186.
2023-01-11Use the root trait predicate to determine whether to remove referencesEsteban Küber-1/+76
Fix #84837.
2023-01-11fix rebaseEsteban Küber-2/+1
2023-01-11Account for type paramsEsteban Küber-38/+81
2023-01-11Make `&`-removal suggestion verboseEsteban Küber-53/+113
2023-01-11Move autoderef to rustc_hir_analysisMichael Goulet-46/+70
2023-01-11Rollup merge of #106734 - albertlarsan68:deny-src-tests-in-tidy, r=NilstriebMatthias Krüger-0/+17
Deny having src/test exisiting in tidy Fixes #106724
2023-01-11Rollup merge of #106726 - cmorin6:fix-comment-typos, r=NilstriebMatthias Krüger-9/+9
Fix some typos in code comments.
2023-01-11Rollup merge of #106705 - compiler-errors:new-solver-err-properly, r=lcnrMatthias Krüger-11/+25
Report fulfillment errors in new trait solver Causes fewer ICEs when testing the new solver :smile:
2023-01-11Rollup merge of #106703 - compiler-errors:impl-derived-span, r=estebankMatthias Krüger-68/+200
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-6/+115
Detect out of bounds range pattern value Fix #68972.
2023-01-11Rollup merge of #106620 - estebank:issue-82051, r=davidtwcoMatthias Krüger-15/+86
Detect struct literal needing parentheses Fix #82051.
2023-01-11Filter impl and where-clause candidates that reference errorsMichael Goulet-64/+54
2023-01-11Reuse ErrorGuaranteed during relationMichael Goulet-2/+4
2023-01-11Auto merge of #106660 - saethlin:destprop-move-codegen, r=tmiaskobors-0/+12
Add a regression test for argument copies with DestinationPropagation This example, as a codegen test: https://github.com/rust-lang/rust/pull/105813#issuecomment-1367947793 r? `@tmiasko`
2023-01-11label where constructor is defined and note that it should be calledMichael Goulet-29/+39