From bb76410a3d973b5022b69608cbf4fb495d5af01b Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Wed, 10 Aug 2016 03:21:50 -0700 Subject: [PATCH] hash.d: make .ptr @safe --- src/core/internal/hash.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/internal/hash.d b/src/core/internal/hash.d index fc2d88bdd4..f6ef9a2019 100644 --- a/src/core/internal/hash.d +++ b/src/core/internal/hash.d @@ -529,5 +529,5 @@ pure nothrow @safe @nogc unittest enum test_str = "Sample string"; enum size_t hashVal = ctfeHash(test_str); - assert(hashVal == bytesHash(test_str.ptr, test_str.length)); + assert(hashVal == bytesHash(&test_str[0], test_str.length)); }