]> git.lizzy.rs Git - rust.git/commit
Auto merge of #3700 - phansch:would_you_like_some_help_with_this_const_fn, r=oli-obk
authorbors <bors@rust-lang.org>
Mon, 28 Jan 2019 14:30:18 +0000 (14:30 +0000)
committerbors <bors@rust-lang.org>
Mon, 28 Jan 2019 14:30:18 +0000 (14:30 +0000)
commit410d5ba6c3bea86632247a559685c2e13dedea91
treed68574c014f3ce953b1a531f5b182d50f52ad037
parent4a2116b30591f06813396fb4b89fd8d23e913164
parent8c416c31975764c97812aa33eaa10c74d521d47e
Auto merge of #3700 - phansch:would_you_like_some_help_with_this_const_fn, r=oli-obk

Prevent incorrect cast_lossless suggestion in const_fn

`::from` is not a const fn, so applying the suggestion of
`cast_lossless` would fail to compile. The fix is to skip the lint if
the cast is found inside a const fn.

Fixes #3656
clippy_lints/src/utils/mod.rs