resolve from_hir_call
FIXME
This commit is contained in:
parent
8c7954dc42
commit
3212734bd7
@ -337,7 +337,6 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
|
||||
// `<T as Trait>::ASSOC` as well as `12`
|
||||
&ExprKind::Literal { literal, .. } => self.nodes.push(Node::Leaf(literal)),
|
||||
|
||||
// FIXME(generic_const_exprs): Handle `from_hir_call` field
|
||||
ExprKind::Call { fun, args, .. } => {
|
||||
let fun = self.recurse_build(*fun)?;
|
||||
|
||||
|
@ -8,4 +8,4 @@ fn foo<const N: u8>(a: [(); N as usize]) {
|
||||
|
||||
fn bar<const N: usize>() {}
|
||||
|
||||
fn main() {}
|
||||
fn main() {}
|
||||
|
@ -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…
x
Reference in New Issue
Block a user