Commit 24c190c
authored
Rollup merge of #158390 - Jamesbarford:fix/trait-solver-const-bounds, r=fmease
Fix: auto trait, const trait bound
Split from #158346. I was fiddling about with the code to understand the behaviour of the snippet below, got confused, and somehow fixed something 🤷
```rust
#![feature(const_trait_impl)]
pub struct Outer<T>(Inner<T>);
struct Inner<T>(T);
impl<T> Unpin for Inner<T>
where
T: const std::default::Default,
{}
```
Fixes #1492812 files changed
Lines changed: 21 additions & 2 deletions
File tree
- compiler/rustc_trait_selection/src/traits
- tests/rustdoc-ui/synthetic-auto-trait-impls
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
610 | 616 | | |
611 | 617 | | |
612 | 618 | | |
| |||
811 | 817 | | |
812 | 818 | | |
813 | 819 | | |
814 | | - | |
815 | | - | |
| 820 | + | |
816 | 821 | | |
817 | 822 | | |
818 | 823 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments