static String generateRustLiteral(final PrimitiveType type, final String value)
    {
        Verify.notNull(type, "type");
        Verify.notNull(value, "value");
        final String typeName = rustTypeName(type);
        if (typeName == null)
        {
            throw new IllegalArgumentException("Unknown Rust type name found for primitive " + type.primitiveName());
        }

        switch (type)
        {
            case CHAR:
            case INT8:
            case INT16:
            case INT32:
            case INT64:
                return value + '_' + typeName;
            case UINT8:
            case UINT16:
            case UINT32:
            case UINT64:
                return "0x" + Long.toHexString(parseLong(value)) + '_' + typeName;
            case FLOAT:
            case DOUBLE:
                return value.endsWith("NaN") ? typeName + "::NAN" : value + '_' + typeName;

            default:
                throw new IllegalArgumentException("Unsupported literal generation for type: " + type.primitiveName());
        }
    }
@Test
    void generateRustLiteralNullPrimitiveTypeParam()
    {
        assertThrows(NullPointerException.class, () -> generateRustLiteral(null, "65"));
    }