Commit graph

20 commits

Author SHA1 Message Date
Dylan DPC f748bb1402
Rollup merge of #111252 - matthewjasper:min-spec-improvements, r=compiler-errors
Min specialization improvements

- Don't allow specialization impls with no items, such implementations are probably not correct and only occur as mistakes in the compiler and standard library
- Fix a missing normalization call
- Adds spans for lifetime errors from overly general specializations

Closes #79457
Closes #109815
2023-05-09 12:33:46 +05:30
Matthew Jasper f46eabb9e5 Report nicer lifetime errors for specialization
Add an obligation cause for these error so that the error points to the
implementations that caused the error.
2023-05-05 22:19:56 +01:00
Matthew Jasper fafe9e71d5 Normalize consistently for specializations 2023-05-05 16:19:18 +01:00
Matthew Jasper bd928a0b5e Disallow (min) specialization imps with no items
Such implementations are usually mistakes and are not used in the
compiler or standard library (after this commit) so forbid them with
`min_specialization`.
2023-05-05 16:19:18 +01:00
Takayuki Maeda 0a64dac604 remove unnecessary attribute from a diagnostic 2023-05-05 17:28:52 +09:00
whtahy fcf8468efc add known-bug test for unsound issue 105782 2023-04-26 22:34:39 -04:00
whtahy bfdd1c4e35 add known-bug test for unsound issue 40582 2023-04-26 22:34:29 -04:00
Deadbeef 4c6ddc036b fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
Esteban Küber 5b40aa5eb4 Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
Michael Goulet 6c6bd01421 Note type mismatch on ConstArgHasType 2023-03-23 19:09:34 +00:00
Michael Goulet 9174edbae9 Delay overlap errors if errors are involved 2023-03-19 03:45:47 +00:00
Michael Goulet 322c7b6269 Constrain const vars to error if const types are mismatched 2023-03-19 03:45:47 +00:00
Michael Goulet 9574f39c2d Use param's real type in try_eval_lit_or_param 2023-03-09 20:49:11 +00:00
Camille GILLOT facecf6e1b Fetch less HIR in signature check. 2023-02-14 20:26:03 +00:00
Esteban Küber 62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00
Michael Goulet 5924c2511e Only point at impl self ty in WF if trait predicate shares self ty 2023-01-12 22:25:30 +00:00
Michael Goulet 2aabb0fd5d Point at impl self type for impl wf obligations 2023-01-12 20:44:47 +00:00
Michael Goulet d76e168f01 Point at HIR types when impl trait ref doesn't normalize 2023-01-12 20:44:47 +00:00
Michael Goulet 9a39d7e441 Note predicate span on ImplDerivedObligation 2023-01-11 19:46:45 +00:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00