Implement #2 in rust but untestable because of old rust.