]> git.lizzy.rs Git - rust.git/commitdiff
Remove warning about UB
authorMark Rousskov <mark.simulacrum@gmail.com>
Tue, 21 Apr 2020 13:00:36 +0000 (09:00 -0400)
committerMark Rousskov <mark.simulacrum@gmail.com>
Wed, 6 May 2020 12:14:21 +0000 (08:14 -0400)
src/librustc_typeck/check/demand.rs

index 9e14efb67a94ca5df426bb0fb66bbbfad8662a7e..8ae5ee4c3f9712028ce303404c9281216859c273 100644 (file)
@@ -909,13 +909,6 @@ pub fn check_for_cast(
                             cast_suggestion,
                             Applicability::MaybeIncorrect, // lossy conversion
                         );
-                        err.warn(
-                            "if the rounded value cannot be represented by the target \
-                                integer type, including `Inf` and `NaN`, casting will cause \
-                                undefined behavior \
-                                (see issue #10184 <https://github.com/rust-lang/rust/issues/10184> \
-                                for more information)",
-                        );
                     }
                     true
                 }