You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a catch block, if a thrown type has a non-trivial copy constructor, cpy isn't passively invoked for the user. See: https://godbolt.org/z/vfxPx5cWb
In the case of throwing a constructed object, the static constraint on references prevents this code from compiling as well: https://godbolt.org/z/T5o6TbWPz
The text was updated successfully, but these errors were encountered:
Yes, need to specify how to support both cpy and other bindincs in the [safety] feature.
An inaccurate error message but not a borrow checker bug. The exception object doesn't have static storage duration, so we can't bind static borrows to the exception object. I don't know what to do here. Maybe there needs to be a /throw lifetime? The exception object doesn't live on the stack, and it's not static... Is it sufficient to treat it as if it has automatic storage duration? I'd have to do some experiments to see if the __cxa_free_exception can occur prior to the closing brace of a catch-handler.
In a catch block, if a thrown type has a non-trivial copy constructor,
cpy
isn't passively invoked for the user. See: https://godbolt.org/z/vfxPx5cWbIn the case of throwing a constructed object, the static constraint on references prevents this code from compiling as well: https://godbolt.org/z/T5o6TbWPz
The text was updated successfully, but these errors were encountered: