When did the update if not exists get compiled

IIRC, the borrowchk did not accept the following code, it is a target of next borrow cheker
But today, I found the code was accepted.

I don't know when the change was made, or else it is just not the exactly piece of the refused code.

use std::collections::HashMap;

pub fn insert_or_update(k: &str, v: i32) {
    let mut hash: HashMap<String, i32> = Default::default();

    match hash.get_mut(k) {
        Some(res) => *res = v,
        None => {
            hash.insert(k.to_owned(), v);
        }
    }
}

You're probably thinking of conditional returns of a borrow. There is no return of a borrow in your code. All it needs is NLL (over 5 years ago).