mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Add more uses of #no_capture
This commit is contained in:
@@ -8,7 +8,7 @@ import "core:fmt"
|
||||
import "core:log"
|
||||
import "core:hash"
|
||||
|
||||
Silent :: proc(pos: xml.Pos, format: string, args: ..any) {}
|
||||
Silent :: proc(pos: xml.Pos, format: string, #no_capture args: ..any) {}
|
||||
|
||||
OPTIONS :: xml.Options{ flags = { .Ignore_Unsupported, .Intern_Comments, },
|
||||
expected_doctype = "",
|
||||
|
||||
@@ -373,7 +373,7 @@ test_odin_value_export :: proc(t: ^testing.T) {
|
||||
}
|
||||
|
||||
@(private)
|
||||
check :: proc(t: ^testing.T, exp: string, format: string, args: ..any, loc := #caller_location) {
|
||||
check :: proc(t: ^testing.T, exp: string, format: string, #no_capture args: ..any, loc := #caller_location) {
|
||||
got := fmt.tprintf(format, ..args)
|
||||
testing.expectf(t, got == exp, "(%q, %v): %q != %q", format, args, got, exp, loc = loc)
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ common_prefix :: proc(strs: []string) -> string {
|
||||
return prefix
|
||||
}
|
||||
|
||||
errorf :: proc(format: string, args: ..any) -> ! {
|
||||
errorf :: proc(format: string, #no_capture args: ..any) -> ! {
|
||||
fmt.eprintf("%s ", os.args[0])
|
||||
fmt.eprintf(format, ..args)
|
||||
fmt.eprintln()
|
||||
|
||||
Reference in New Issue
Block a user