Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0110-Fixup-erl_lint-format_error-1-deprecation-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0110-Fixup-erl_lint-format_error-1-deprecation-clause.patch of Package erlang
From b9c1bc8adf66dea91e3b01c5b88ef428cce91ddc Mon Sep 17 00:00:00 2001 From: Bryan Paxton <starbelly@pobox.com> Date: Mon, 25 May 2020 16:43:13 -0500 Subject: [PATCH] Fixup erl_lint:format_error/1 deprecation clause In the case of deprecation warnings erl_lint:format_error/1 would include the word `use` while all `-deprecated/1` calls included the word `use` resulting in `use use` as part of the warning message. - remove `use` from erl_lint:format_error/1 deprecated clause - Add `use` for erl_scan:attributes_info/_ and erl_scan:token_info/_ in `-removed()` in erl_scan per the change to erl_lint:format_error/1 --- lib/stdlib/src/erl_lint.erl | 2 +- lib/stdlib/src/erl_scan.erl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 7c717e47d1..8ae46db9f3 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -249,7 +249,7 @@ format_error({redefine_bif_import,{F,A}}) -> io_lib:format("import directive overrides auto-imported BIF ~w/~w~n" " - use \"-compile({no_auto_import,[~w/~w]}).\" to resolve name clash", [F,A,F,A]); format_error({deprecated, MFA, String, Rel}) -> - io_lib:format("~s is deprecated and will be removed in ~s; use ~s", + io_lib:format("~s is deprecated and will be removed in ~s; ~s", [format_mfa(MFA), Rel, String]); format_error({deprecated, MFA, String}) when is_list(String) -> io_lib:format("~s is deprecated; ~s", [format_mfa(MFA), String]); diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl index 0854e15177..312b040002 100644 --- a/lib/stdlib/src/erl_scan.erl +++ b/lib/stdlib/src/erl_scan.erl @@ -69,9 +69,9 @@ %% Removed functions and types -removed([{set_attribute,3,"use erl_anno:set_line/2 instead"}, {attributes_info,'_', - "erl_anno:{column,line,location,text}/1 instead"}, + "use erl_anno:{column,line,location,text}/1 instead"}, {token_info,'_', - "erl_scan:{category,column,line,location,symbol,text}/1 instead"}]). + "use erl_scan:{category,column,line,location,symbol,text}/1 instead"}]). -removed_type([{column,0,"use erl_anno:column() instead"}, {line,0,"use erl_anno:line() instead"}, -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor