← All lints

turbofish_type_args

L0204Stylewarn

Turbofish ::<...> on generic call

f::<T>(...): canonical generic call spelling is f<T>(...)

Flagged
let x = read::<Int>()
print(x)
Write instead
let x = read<Int>()
print(x)

Why

Generic calls write type arguments directly as f<T>(...) without ::. cpl fix (or cpl lint --fix) removes the legacy ::.

The practice it serves

Spelling that hides what the code means. Family: H. C++ habits.

Not flagged

A near miss: close to the pattern, but not it.

Near miss
let x = read<Int>()
print(x)

Turn it off

For one block, wrap it in with lint(turbofish_type_args: allow):. For a project, add turbofish_type_args = "allow" under [lints] in cp.toml.

Generated from spec/lints/turbofish_type_args, the same record the linter is built from.