Introduce a new raw_ptr
type a disallow it to be returned from scripts
#2551
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler: parser
Everything to do with the parser
compiler: ui
Mostly compiler messages
language feature
Core language features visible to end users
Needs RFC
Features that require an RFC before proceeding with an implementation
P: critical
Should be looked at before anything else
For example:
The immediate benefit of this is preventing
RawVec<T>
(and by extensionVec<T>
) from being returned from a script because when we cross the script boundary, theptr
value is not meaningful.This annotation may have future uses as well.
An alliterative is to introduce pointer/reference types (other than
mut ref
function parameters) but that's a rabbit hole we probably don't want to explore.Edit: The above proposal has been voted against and the preferred way of doing this seems to be to introduce a
raw_ptr
type as @canndrew as described in #2699The text was updated successfully, but these errors were encountered: