Skip to content

Commit 9aace67

Browse files
celinvaloli-obk
authored andcommitted
Ensure internal function is safe
The internal function was unsound, it could cause UB in rare cases where the user inadvertly stored the returned object in a location that could outlive the TyCtxt. In order to make it safe, we now take a type context as an argument to the internal fn, and we ensure that interned items are lifted using the provided context. Thus, this change ensures that the compiler can properly enforce that the object does not outlive the type context it was lifted to.
1 parent 61361c1 commit 9aace67

File tree

5 files changed

+296
-200
lines changed

5 files changed

+296
-200
lines changed

0 commit comments

Comments
 (0)