Please post code as text, not as image. Images can't be copy-pasted so we can't reproduce the error.
Anyway, the code should work as-is. Don't use IDEs while you are learning the language. They often produce misleading or downright wrong errors. Use cargo build to build your code – that'll use the real compiler of which the output you can trust.
Note Rust references are not the same thing as general-purpose storing/passing by reference in other, garbage-collected programming languages. Rust references can't exist on their own.
A &Type means "a view into a Type stored somewhere else already", like in your example the vec is stored in heap_num, and ref1 is a temporary view into the heap_num's value.
You can't make a brand new object that is a temporary reference type. let heap_num: &Vec<i32> = vec! doesn't make sense, because it's not borrowing from a value stored somewhere. That vec! on the right side isn't stored anywhere yet. There is no location to borrow from.