FixedWidthInteger.random
もそうだったなと思って調べたんですが https://github.com/apple/swift/blob/master/stdlib/public/core/Integers.swift.gyb#L2545-L2548func testA(a: RandomNumberGenerator) { } func testB(a: inout RandomNumberGenerator) { print(a.next()) } var r: Random = Random.default testA(a: r) // OK testB(a: &r) // error: cannot pass immutable value as inout argument: implicit conversion from 'Random' to 'RandomNumberGenerator' requires a temporary