-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
asm
goto requires labeled blocks, like asm!("...", foo = label { code() });
.
We need to decide whether those labeled blocks are safe by default or whether they require explicitly writing safe
or unsafe
. I'm filing this issue for T-lang to decide which of those we want to go with.
Based on discussion with the Rust for Linux folks, I'm going to propose that these blocks should default to safe, and require an explicit unsafe
if you want them to be unsafe.
I'm also going to propose that you shouldn't need nested braces if you want unsafe here: label unsafe { dangerous_code() }
should work, rather than having to write label { unsafe { dangerous_code() } }
.
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.