Skip to content

Commit 601c289

Browse files
MahadMuhammadphilberty
authored andcommitted
gccrs: [E0133] Use of unsafe code outside of unsafe function or block
gcc/rust/ChangeLog: * checks/errors/rust-unsafe-checker.cc (check_unsafe_call): called error function. Signed-off-by: Muhammad Mahad <[email protected]>
1 parent 446ef14 commit 601c289

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gcc/rust/checks/errors/rust-unsafe-checker.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ static void
8686
check_unsafe_call (HIR::Function *fn, Location locus, const std::string &kind)
8787
{
8888
if (fn->get_qualifiers ().is_unsafe ())
89-
rust_error_at (locus, "call to unsafe %s requires unsafe function or block",
89+
rust_error_at (locus, ErrorCode ("E0133"),
90+
"call to unsafe %s requires unsafe function or block",
9091
kind.c_str ());
9192
}
9293

0 commit comments

Comments
 (0)