This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit b8e5ab2
committed
Auto merge of rust-lang#89580 - estebank:trait-bounds-are-tricky, r=nagisa
Point at source of trait bound obligations in more places
Be more thorough in using `ItemObligation` and `BindingObligation` when
evaluating obligations so that we can point at trait bounds that
introduced unfulfilled obligations. We no longer incorrectly point at
unrelated trait bounds (`substs-ppaux.verbose.stderr`).
In particular, we now point at trait bounds on method calls.
We no longer point at "obvious" obligation sources (we no longer have a
note pointing at `Trait` saying "required by a bound in `Trait`", like
in `associated-types-no-suitable-supertrait*`).
We no longer point at associated items (`ImplObligation`), as they didn't
add any user actionable information, they just added noise.
Address part of rust-lang#89418.File tree
221 files changed
+2064
-2739
lines changed- compiler
- rustc_errors/src
- rustc_infer/src/infer/error_reporting
- nice_region_error
- rustc_trait_selection/src/traits
- error_reporting
- rustc_typeck/src
- check
- fn_ctxt
- method
- src/test
- incremental/hashes
- ui
- allocator
- associated-consts
- associated-item
- associated-type-bounds
- associated-types
- async-await
- issues
- attributes
- borrowck
- box
- chalkify
- closures
- cmse-nonsecure
- cmse-nonsecure-call
- cmse-nonsecure-entry
- coherence
- compare-method
- const-generics
- defaults
- generic_const_exprs
- occurs-check
- derives
- did_you_mean
- error-codes
- expr/malformed_closure
- feature-gates
- fmt
- for
- generator
- generic-associated-types
- hrtb
- impl-trait
- inference
- issues
- iterators
- layout
- lifetimes
- marker_trait_attr
- mismatched_types
- missing-trait-bounds
- auxiliary
- never_type
- on-unimplemented
- parser
- range
- regions
- rfc-2497-if-let-chains
- rfc-2632-const-trait-impl
- span
- specialization/defaultimpl
- structs
- str
- suggestions
- lifetimes
- traits
- bound
- inheritance
- negative-impls
- reservation-impl
- vtable
- trivial-bounds
- try-block
- try-trait
- type
- type-check
- ufcs
- union
- unsized
- wf
- where-clauses
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
221 files changed
+2064
-2739
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1266 | 1266 | | |
1267 | 1267 | | |
1268 | 1268 | | |
| 1269 | + | |
1269 | 1270 | | |
1270 | 1271 | | |
1271 | 1272 | | |
| 1273 | + | |
1272 | 1274 | | |
1273 | 1275 | | |
1274 | 1276 | | |
1275 | 1277 | | |
1276 | 1278 | | |
1277 | 1279 | | |
| 1280 | + | |
1278 | 1281 | | |
1279 | 1282 | | |
1280 | 1283 | | |
1281 | 1284 | | |
| 1285 | + | |
1282 | 1286 | | |
1283 | 1287 | | |
1284 | | - | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1285 | 1300 | | |
1286 | 1301 | | |
1287 | 1302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2141 | 2141 | | |
2142 | 2142 | | |
2143 | 2143 | | |
| 2144 | + | |
2144 | 2145 | | |
2145 | 2146 | | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
2146 | 2155 | | |
2147 | | - | |
| 2156 | + | |
2148 | 2157 | | |
2149 | 2158 | | |
2150 | 2159 | | |
| |||
2181 | 2190 | | |
2182 | 2191 | | |
2183 | 2192 | | |
2184 | | - | |
| 2193 | + | |
2185 | 2194 | | |
2186 | 2195 | | |
2187 | 2196 | | |
| |||
2203 | 2212 | | |
2204 | 2213 | | |
2205 | 2214 | | |
2206 | | - | |
| 2215 | + | |
2207 | 2216 | | |
2208 | 2217 | | |
2209 | 2218 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| |||
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1958 | 1958 | | |
1959 | 1959 | | |
1960 | 1960 | | |
1961 | | - | |
1962 | | - | |
1963 | | - | |
1964 | | - | |
1965 | | - | |
1966 | | - | |
1967 | | - | |
1968 | | - | |
1969 | | - | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
1970 | 1964 | | |
1971 | 1965 | | |
1972 | 1966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
237 | 244 | | |
238 | 245 | | |
239 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
713 | 718 | | |
714 | 719 | | |
715 | 720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 213 | + | |
| 214 | + | |
219 | 215 | | |
220 | 216 | | |
221 | 217 | | |
| |||
226 | 222 | | |
227 | 223 | | |
228 | 224 | | |
229 | | - | |
| 225 | + | |
| 226 | + | |
230 | 227 | | |
231 | | - | |
| 228 | + | |
232 | 229 | | |
233 | 230 | | |
234 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
235 | 234 | | |
236 | 235 | | |
237 | 236 | | |
| |||
280 | 279 | | |
281 | 280 | | |
282 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
283 | 288 | | |
284 | 289 | | |
285 | 290 | | |
| |||
1385 | 1390 | | |
1386 | 1391 | | |
1387 | 1392 | | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
1394 | 1400 | | |
1395 | 1401 | | |
1396 | 1402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | 589 | | |
622 | 590 | | |
623 | 591 | | |
| |||
1522 | 1490 | | |
1523 | 1491 | | |
1524 | 1492 | | |
1525 | | - | |
1526 | | - | |
| 1493 | + | |
| 1494 | + | |
1527 | 1495 | | |
1528 | | - | |
| 1496 | + | |
1529 | 1497 | | |
1530 | 1498 | | |
1531 | 1499 | | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
| 1500 | + | |
1539 | 1501 | | |
1540 | 1502 | | |
1541 | 1503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
| 512 | + | |
516 | 513 | | |
517 | 514 | | |
518 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
| |||
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
| 479 | + | |
474 | 480 | | |
475 | 481 | | |
476 | | - | |
477 | | - | |
| 482 | + | |
| 483 | + | |
478 | 484 | | |
479 | 485 | | |
480 | | - | |
481 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
482 | 492 | | |
483 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
484 | 496 | | |
485 | 497 | | |
486 | 498 | | |
| |||
0 commit comments