resolve from_hir_call
FIXME
This commit is contained in:
parent
8c7954dc42
commit
3212734bd7
3 changed files with 24 additions and 2 deletions
|
@ -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() {}
|
Loading…
Add table
Add a link
Reference in a new issue