File 1165-Remove-docs-for-specs-for-functions-in-other-modules.patch of Package erlang

From 975e52ebec615a29ee85309ca3f7df93185b1eba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= <gomoripeti@gmail.com>
Date: Wed, 29 Apr 2020 09:45:41 +0200
Subject: [PATCH] Remove docs for specs for functions in other modules

They are rejected by the compiler/linter since OTP 20 (commit 60e47cba).

See also https://bugs.erlang.org/browse/ERL-845.
---
 system/doc/reference_manual/typespec.xml | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml
index a450f85742..b46cf0e8e8 100644
--- a/system/doc/reference_manual/typespec.xml
+++ b/system/doc/reference_manual/typespec.xml
@@ -476,22 +476,20 @@
       <c>-spec</c> attribute. The general format is as follows:
     </p>
     <pre>
-  -spec Module:Function(ArgType1, ..., ArgTypeN) -> ReturnType.</pre>
-    <p>
-      The arity of the function must match the number of arguments,
-      else a compilation error occurs.
-    </p>
+  -spec Function(ArgType1, ..., ArgTypeN) -> ReturnType.</pre>
     <p>
-      This form can also be used in header files (.hrl) to declare type
-      information for exported functions.
-      Then these header files can be included in files that (implicitly or
-      explicitly) import these functions.
+      An implementation of the function with the same name
+      <c>Function</c> must exist in the current module, and the arity
+      of the function must match the number of arguments, else a
+      compilation error occurs.
     </p>
     <p>
-      Within a given module, the following shorthand suffices in most cases:
+      The following longer format with module name is also valid as
+      long as <c>Module</c> is the name of the current module. This
+      can be useful for documentation purposes.
     </p>
     <pre>
-  -spec Function(ArgType1, ..., ArgTypeN) -> ReturnType.</pre>
+  -spec Module:Function(ArgType1, ..., ArgTypeN) -> ReturnType.</pre>
     <p>
       Also, for documentation purposes, argument names can be given:
     </p>
-- 
2.26.2

openSUSE Build Service is sponsored by