Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
2
fn identity<T>(x: T) -> T {
3
x
4
}
5
6
// Generic function with two parameters
7
fn swap<T, U>(a: T, b: U) -> (U, T) {
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected