mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: warn if unsafe method called outside unsafe block (#5863)
This commit is contained in:
@@ -1201,11 +1201,14 @@ pub fn (u ustring) at(idx int) string {
|
||||
return u.substr(idx, idx + 1)
|
||||
}
|
||||
|
||||
[unsafe_fn]
|
||||
fn (u &ustring) free() {
|
||||
$if prealloc {
|
||||
return
|
||||
}
|
||||
u.runes.free()
|
||||
unsafe {
|
||||
u.runes.free()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn (c byte) is_digit() bool {
|
||||
|
||||
Reference in New Issue
Block a user