Rellum Rellum

W0020: function shadows built-in prelude definition

Generated from rellum-diagnostics/src/db.rs.

Explanation

The core prelude defines higher-order functions like map, filter, and fold that are available in every Rellum program. Defining a function with the same name replaces the prelude definition within this module. The shadowing is harmless if intentional, but surprising if accidental.

Common causes

Canonical fixes

Before:

map(arr: [Int], f: Int -> Int) : [Int] = ...

After:

transform(arr: [Int], f: Int -> Int) : [Int] = ...

Code example

map(arr: [Int], f: Int -> Int) : [Int] = ...