1
Fork 0

resolve from_hir_call FIXME

This commit is contained in:
Ellen 2021-09-07 13:36:50 +01:00
parent 8c7954dc42
commit 3212734bd7
3 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,23 @@
#![feature(generic_const_exprs, adt_const_params, const_trait_impl)]
#![allow(incomplete_features)]
#[derive(PartialEq, Eq)]
struct Foo(u8);
impl const std::ops::Add for Foo {
type Output = Self;
fn add(self, rhs: Self) -> Self::Output {
self
}
}
struct Evaluatable<const N: Foo>;
fn foo<const N: Foo>(a: Evaluatable<{ N + N }>) {
bar::<{ std::ops::Add::add(N, N) }>();
}
fn bar<const N: Foo>() {}
fn main() {}