diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-12-11 03:30:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 03:30:42 -0500 |
| commit | fe7fc768353e1ddde4525f12b8b31a5eb5f3946b (patch) | |
| tree | 78842c90bd0116b666e2a881d1266a6dc64660f6 /compiler/rustc_codegen_gcc | |
| parent | 5cf16d8b1f2d7ce3a22995f77767c16fcccbab07 (diff) | |
| parent | 979eb4e98eac8b9888fedd8ebd0a0e354b82fe21 (diff) | |
| download | rust-fe7fc768353e1ddde4525f12b8b31a5eb5f3946b.tar.gz rust-fe7fc768353e1ddde4525f12b8b31a5eb5f3946b.zip | |
Rollup merge of #134136 - estebank:const-trait-default-field-test, r=jieyouxu
Exercise const trait interaction with default fields
Add a test case for using the result of a fn call of an associated function of a `const` trait in a struct default field.
```rust
struct X;
trait Trait {
fn value() -> Self;
}
impl const Trait for X {
fn value() -> Self { X }
}
struct S<T: const Trait> {
a: T = T::value(),
}
```
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
