Commit Graph

19 Commits

Author SHA1 Message Date
Matthias Krüger b22c48ed6e
Rollup merge of #128438 - Bryanskiy:empty-array-dropck, r=lcnr
Add special-case for [T, 0] in dropck_outlives

implements/fixes #110288.

r? `@lcnr`
2024-07-31 23:20:12 +02:00
Bryanskiy 34fcf92ea0 Add special-case for [T, 0] in dropck 2024-07-31 16:15:05 +03:00
Michael Goulet 91acacf85b Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck 2024-07-26 14:41:56 -04:00
Boxy 6a00008276 Rewrite dropck 2024-07-02 02:30:38 +01:00
Boxy 1f41fbe0ef introduce tests 2024-07-01 20:51:05 +01:00
Esteban Küber fa2fc3ab96 Suggest `.clone()` when moved while borrowed 2024-04-11 16:41:41 +00:00
许杰友 Jieyou Xu (Joe) ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
Jake Goulding 53eca9fa87 Adjust compiler tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Nilstrieb e5c330ac48 Note about object lifetime defaults in does not live long enough error
This is a aspect of Rust that frequently trips up people who are not
aware of it yet. This diagnostic attempts to explain what's happening
and why the lifetime constraint, that was never mentioned in the source,
arose.
2023-11-12 13:51:16 +01:00
lcnr dda5e32ab0 review + add tests 2023-11-02 18:16:37 +01:00
Matthias Krüger 0ed5f091a6
Rollup merge of #112508 - compiler-errors:trait-sig-lifetime-sugg-ice, r=cjgillot
Tweak spans for self arg, fix borrow suggestion for signature mismatch

1. Adjust a suggestion message that was annoying me
2. Fix #112503 by recording the right spans for the `self` part of the `&self` 0th argument
3. Remove the suggestion for adjusting a trait signature on type mismatch, bc that's gonna probably break all the other impls of the trait even if it fixes its one usage 😅
2023-07-22 19:57:35 +02:00
Michael Goulet fe870424a7 Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
Michael Goulet 0f7ef1a202 Adjust inner span of implicit self ref argument 2023-06-28 17:51:01 +00:00
Michael Goulet 2e346b6f3f Even more tests 2023-05-04 18:06:07 +00:00
Michael Goulet bd146c72ac Explicitly reject negative and reservation drop impls 2023-04-27 17:02:17 +00:00
Esteban Küber 7b8251e188 Account for method call and indexing when looking for inner-most path in expression 2023-01-17 02:52:43 +00:00
Esteban Küber 656db98bd9 Tweak E0597
CC #99430
2023-01-15 19:46:20 +00:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00