Commit 2641353
committed
Auto merge of #150843 - fmease:dyn-ace, r=BoxyUwU
mGCA: Make trait object types with type-level associated consts dyn compatible if all of the latter are specified via bindings
Under feature `min_generic_const_args` (mGCA) (#132980), render traits with non-parametrized type-level associated constants (i.e., `#[type_const]` ones) dyn compatible but force the user to specify all type-level associated consts in the trait object type via bindings (either directly, via supertrait bounds and/or behind trait aliases) just like associated types, their sibling.
Fixes #130300 (feature request).
Fixes #136063 (bug).
Fixes #137260 (bug).
Fixes #137514 (bug).
While I'm accounting for most illegal `Self` references via const projections & params, I'm intentionally ignoring RUST-123140 (and duplicates) in this PR which is to be tackled some other time.
Additional context: Crate `rustc-demangle` had to be updated to fix v0 demangling. I've patched it in PR rust-lang/rustc-demangle#87 which was was released in version 0.1.27 via PR rust-lang/rustc-demangle#88.104 files changed
Lines changed: 1360 additions & 656 deletions
File tree
- compiler
- rustc_hir_analysis
- src
- check
- hir_ty_lowering
- rustc_middle/src
- traits
- ty
- rustc_symbol_mangling
- src
- rustc_trait_selection/src/traits
- src
- doc/rustc/src/symbol-mangling
- librustdoc/clean
- tools/clippy/clippy_utils/src/ty
- tests
- crashes
- ui
- associated-consts
- associated-item
- associated-type-bounds
- associated-types
- async-await/async-fn
- const-generics
- associated-const-bindings
- issues
- consts/static-default-lifetime
- dyn-compatibility
- error-codes
- errors
- generic-associated-types
- generic-const-items
- impl-trait
- issues
- suggestions
- traits
- alias
- object
- type-alias
- type
- wf
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3355 | 3355 | | |
3356 | 3356 | | |
3357 | 3357 | | |
3358 | | - | |
| 3358 | + | |
3359 | 3359 | | |
3360 | | - | |
| 3360 | + | |
3361 | 3361 | | |
3362 | 3362 | | |
3363 | 3363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
| |||
330 | 335 | | |
331 | 336 | | |
332 | 337 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 338 | + | |
| 339 | + | |
351 | 340 | | |
352 | 341 | | |
353 | 342 | | |
354 | | - | |
| 343 | + | |
355 | 344 | | |
356 | 345 | | |
357 | 346 | | |
358 | | - | |
| 347 | + | |
359 | 348 | | |
360 | 349 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | 350 | | |
365 | 351 | | |
366 | 352 | | |
| |||
372 | 358 | | |
373 | 359 | | |
374 | 360 | | |
375 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| |||
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | 486 | | |
488 | 487 | | |
489 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1960 | 1960 | | |
1961 | 1961 | | |
1962 | 1962 | | |
1963 | | - | |
| 1963 | + | |
1964 | 1964 | | |
1965 | 1965 | | |
1966 | 1966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
| 403 | + | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
| 411 | + | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
419 | 448 | | |
420 | 449 | | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
| 450 | + | |
426 | 451 | | |
427 | 452 | | |
428 | | - | |
429 | | - | |
430 | 453 | | |
431 | | - | |
| 454 | + | |
432 | 455 | | |
433 | 456 | | |
434 | 457 | | |
| |||
438 | 461 | | |
439 | 462 | | |
440 | 463 | | |
441 | | - | |
442 | | - | |
| 464 | + | |
| 465 | + | |
443 | 466 | | |
444 | 467 | | |
445 | 468 | | |
446 | 469 | | |
447 | 470 | | |
448 | | - | |
| 471 | + | |
449 | 472 | | |
450 | | - | |
| 473 | + | |
451 | 474 | | |
452 | 475 | | |
453 | 476 | | |
| |||
1609 | 1632 | | |
1610 | 1633 | | |
1611 | 1634 | | |
1612 | | - | |
1613 | | - | |
| 1635 | + | |
| 1636 | + | |
1614 | 1637 | | |
1615 | 1638 | | |
1616 | 1639 | | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1617 | 1643 | | |
1618 | 1644 | | |
1619 | 1645 | | |
| |||
0 commit comments