E6015

E6015 — A structurally invalid transfer lowering (impl transfer A -> B { ... }): the same edge implemented twice in one compilation (which one is in force would be load order), or a lowering with no functions (an empty body cannot move anything, and accepting it would make impl transfer an inert annotation rather than code).

What the compiler reports

E6015
declares no functions

The fragments the test suite holds the compiler to. An ellipsis marks text the test does not constrain; the emitted message also carries a source location.

A program that triggers it

// An empty lowering cannot move anything; accepting it would make `impl transfer` an
// inert annotation rather than code (Vx#352).
Topology Dev {
  memory: Memory::L2,
  visible: [Memory::L2, Memory::SMEM],
  transfer Memory::CPU_DRAM -> Memory::L2 : 10 GB/s,
  transfer Memory::L2 -> Memory::SMEM
}
impl Transfer<Memory::L2, Memory::SMEM> for Topology::Dev {
}
fn main() -> i32 {
  return 0;
}

From tests/middle_end/fail/transfer_impl_empty.vx, which asserts this diagnostic on every commit.

Related