]> git.lizzy.rs Git - rust.git/commitdiff
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)
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

1  2 
clippy_lints/src/utils/mod.rs

Simple merge