-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Consider the following Rust where implemented items of Foo make use of other implemented items:
pub trait Foo {
const F: u32;
fn a() -> u32;
fn b();
fn c();
}
pub struct Bar;
impl Foo for Bar {
const F: u32 = 1;
fn a() -> u32 {
Self::F
}
fn b() {}
fn c() {
Self::b()
}
}Which, after fixing F for #1903, produces the following Lean instance:
instance Playground.Impl : Playground.Foo Playground.Bar where
F := 1
a := fun (_ : Rust_primitives.Hax.Tuple0) => do
(Playground.Foo.F Playground.Bar)
b := fun (_ : Rust_primitives.Hax.Tuple0) => do
(pure Rust_primitives.Hax.Tuple0.mk)
c := fun (_ : Rust_primitives.Hax.Tuple0) => do
(Playground.Foo.b Playground.Bar Rust_primitives.Hax.Tuple0.mk)Here, Lean complains about using Playground.Foo.F Playground.Bar and Playground.Foo.b Playground.Bar during the instance declaration. What should be the correct generation for this instance?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels