Skip to content

Commit

Permalink
Lower atoms_exhaustion and unsafe_integer_conversion severities to We…
Browse files Browse the repository at this point in the history
…akWarning

Reviewed By: TheGeorge

Differential Revision: D64237835

fbshipit-source-id: 1cf444d93a57de532179709c0f73cd4512a2f543
  • Loading branch information
robertoaloi authored and facebook-github-bot committed Oct 11, 2024
1 parent cb29661 commit 2598335
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/ide/src/diagnostics/atoms_exhaustion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn make_diagnostic(sema: &Semantic, file_id: FileId, range: TextRange) -> Diagno
let message = "Risk of atoms exhaustion.".to_string();
Diagnostic::new(DiagnosticCode::AtomsExhaustion, message, range)
.experimental()
.with_severity(Severity::Error)
.with_severity(Severity::WeakWarning)
.with_ignore_fix(sema, file_id)
}

Expand All @@ -134,9 +134,9 @@ mod tests {
-export([main/0]).
main() ->
erlang:list_to_atom(foo),
%% ^^^^^^^^^^^^^^^^^^^^^^^^ 💡 error: Risk of atoms exhaustion.
%% ^^^^^^^^^^^^^^^^^^^^^^^^ 💡 weak: Risk of atoms exhaustion.
list_to_atom(foo).
%% ^^^^^^^^^^^^^^^^^ 💡 error: Risk of atoms exhaustion.
%% ^^^^^^^^^^^^^^^^^ 💡 weak: Risk of atoms exhaustion.
//- /opt/lib/stdlib-3.17/src/erlang.erl otp_app:/opt/lib/stdlib-3.17
-module(erlang).
Expand All @@ -155,9 +155,9 @@ mod tests {
-export([main/0]).
main() ->
erlang:binary_to_atom(foo),
%% ^^^^^^^^^^^^^^^^^^^^^^^^^^ 💡 error: Risk of atoms exhaustion.
%% ^^^^^^^^^^^^^^^^^^^^^^^^^^ 💡 weak: Risk of atoms exhaustion.
binary_to_atom(foo).
%% ^^^^^^^^^^^^^^^^^^^ 💡 error: Risk of atoms exhaustion.
%% ^^^^^^^^^^^^^^^^^^^ 💡 weak: Risk of atoms exhaustion.
//- /opt/lib/stdlib-3.17/src/erlang.erl otp_app:/opt/lib/stdlib-3.17
-module(erlang).
Expand Down

0 comments on commit 2598335

Please sign in to comment.