kw unsafe
Reserved keyword
The list of words: §1.4
Syntax
Fn = [ "comptime" [ "literal" ] | "unsafe" ] "fn" Ident [ Generics ] "(" [ Params ] ")"
[ "->" Type ] [ Effects ] [ Where ] { Contract } ( Block | "=>" Expr ) ;Primary = Literal | Path | "it" | "self" | "(" Expr { "," Expr } ")" | ListLit | MapLit
| StructLit | Lambda | Block | If | Match | For | While | Loop | Scope | Select | Query
| "spawn" ( Postfix | Block ) | "await" Unary | "atomic" [ "(" Args ")" ] Block
| "return" [ Expr ] | "fail" Expr | "yield" Expr | "respond" Expr | "break" [ Label ] [ Expr ]
| "continue" [ Label ] | "emit" Path "(" Expr ")" | "unsafe" Block | "blocking" Block
| "comptime" Block | "." Ident [ "(" [ Args ] ")" ] ;Grammar: App. A
Defined in
- 7.5 unsafe — Only inside unsafe { …
- 16.1 C — import c reads a header through libclang at compile time.
- 0.1 Normative terms — There is no undefined behaviour in safe code.
- 3.6 Aliases, new types and refined types — distinct T creates a new nominal type with the representation of T.
- 1.4 Keywords — Reserved (cannot be used as names)
Related diagnostics
unsafe-required, ffi-import, refinement-violated