make the unsafe error a warning for now

pull/2475/head
Alexander Medvednikov 2019-10-21 18:53:55 +03:00
parent 7680d9a23c
commit a29c80ca3d
1 changed files with 1 additions and 1 deletions

View File

@ -644,7 +644,7 @@ fn (p mut Parser) async_fn_call(f Fn, method_ph int, receiver_var, receiver_type
// p.tok == fn_name // p.tok == fn_name
fn (p mut Parser) fn_call(f mut Fn, method_ph int, receiver_var, receiver_type string) { fn (p mut Parser) fn_call(f mut Fn, method_ph int, receiver_var, receiver_type string) {
if f.is_unsafe && !p.builtin_mod && !p.inside_unsafe { if f.is_unsafe && !p.builtin_mod && !p.inside_unsafe {
p.error('you are calling an unsafe function outside of an unsafe block') p.warn('you are calling an unsafe function outside of an unsafe block')
} }
if f.is_deprecated { if f.is_deprecated {
p.warn('$f.name is deprecated') p.warn('$f.name is deprecated')