about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/errors.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-12-11 03:30:42 -0500
committerGitHub <noreply@github.com>2024-12-11 03:30:42 -0500
commitfe7fc768353e1ddde4525f12b8b31a5eb5f3946b (patch)
tree78842c90bd0116b666e2a881d1266a6dc64660f6 /compiler/rustc_trait_selection/src/errors.rs
parent5cf16d8b1f2d7ce3a22995f77767c16fcccbab07 (diff)
parent979eb4e98eac8b9888fedd8ebd0a0e354b82fe21 (diff)
downloadrust-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_trait_selection/src/errors.rs')
0 files changed, 0 insertions, 0 deletions