MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / identity

Function identity

tests/binary/generics/src/main.rs:2–4  ·  view source on GitHub ↗

Generic identity function

(x: T)

Source from the content-addressed store, hash-verified

1// Generic identity function
2fn identity<T>(x: T) -> T {
3 x
4}
5
6// Generic function with two parameters
7fn swap<T, U>(a: T, b: U) -> (U, T) {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected