Not really, Pin says that something behind a pinned reference can't move. Also, if you want to exploit Pin's gaurantees you must use unsafe. So it isn't Rust enforcing pins so much as it is you and some very clever unsafe libraries enforcing pins.
There remains no safe way to create an immovable type. You must use unsafe somewhere down the line and make sure that you type doesn't move manually. This is helped by libraries like pin-utils and pin-project, but they don't help with the fundemental problem.
This idea was considered around the same time that Pin was. It would have been a new trait, Move. But it was discarded because all generics would have to be rewritten to adapt to be compatible with !Move types. Every type would be Move by default, but we would have some way of opting out for compatibility. If we went that route, we would have truly immovable types, and we could have safe self-referential types (after some upgrades in the lifetime checker).
But I don't actually want completely immovable types - I only want the guarantees provided by Pin, right?
Say for example the Vec type - it contains a RawVec, and thus should be movable, right?
However, the actual data that I want to hold references to is stored in the heap - which is never moved.
Pin provides the same guarantees as immovable types (well, almost the same)
If a Vec reallocates, then things do move. But you have stated that the Vec won't be modified so that shouldn't be an issue. Here is the thing, the compile does not verify if the things behind a Pin do in fact remain immovable. Pin just makes it so that it is impossible to get a unique reference into itself via safe code if the pointee is is !Unpin.
I believe that f() returns a temporary value of Extractor that owns the vector, which returns a reference to a slice of that vector when get is called. I thought this would work since I (mistakenly) thought that temporary get dropped at end of the scope. As I tested around a bit more and it seems that temporary value get dropped ASAP. So this would not be a solution except for the most trivial cases.