Pre-RFC - Add alignment niches for references

I like the idea of guaranteeing such niches, it would also make tagged pointers more reliable if someone were to need them. So overall, I support this proposal.

The only thing I strongly disagree with is special casing even more library types. Presumably Rc, Arc and Vec will always have to store a pointer to the allocation somewhere, so instead of baking these types into the language, why not generalize this mechanism in a way that it works across recusively contained types?

Also, I'm not sure if it is implied by &T/&mut T, but it seems to me that slices should also be eligible for this.

2 Likes