From b88d0bfb3b33e948755dc1d0b58b6e879ecd14be Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Mon, 24 Jan 2022 14:57:07 +0100 Subject: [PATCH] Fix a recent deprecation E.g., with LDC v1.28.1: src/std/io/internal/iovec.d(52): Deprecation: returning `this._ptr is cast(iovec*)18446744073709551615LU ? &this.stack : this._ptr` escapes a reference to parameter `this` src/std/io/internal/iovec.d(52): perhaps remove `scope` parameter annotation so `return` applies to `ref` --- src/std/io/internal/iovec.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/std/io/internal/iovec.d b/src/std/io/internal/iovec.d index 69e6f74..b83f515 100644 --- a/src/std/io/internal/iovec.d +++ b/src/std/io/internal/iovec.d @@ -47,7 +47,7 @@ struct TempIOVecs _ptr = null; } - @property inout(iovec*) ptr() inout return scope + @property inout(iovec*) ptr() inout return { return _ptr is useStack ? stack.ptr : _ptr; }