This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 17a627f
committed
Auto merge of rust-lang#101682 - compiler-errors:rpitit-encode, r=fee1-dead
Only encode return-position `impl Trait` in trait when parent function has a default body
Semi-blocked on rust-lang#101679, because I can't currently write a test for when we _should_ encode the type of the return-position `impl Trait` in trait, which is when a trait has a default function body, like so:
```rust
trait Foo {
fn bar() -> impl Sized { }
}
```
Though this can land even without rust-lang#101679, since it does prevent ICEs from occuring any time you use `#![feature(return_position_impl_trait_in_trait)]` in a library, which is kind annoying.File tree
2 files changed
+22
-1
lines changed- compiler/rustc_metadata/src/rmeta
- src/test/ui/impl-trait/in-trait
2 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | | - | |
1040 | 1039 | | |
1041 | 1040 | | |
1042 | 1041 | | |
| |||
1047 | 1046 | | |
1048 | 1047 | | |
1049 | 1048 | | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1050 | 1062 | | |
1051 | 1063 | | |
1052 | 1064 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments