X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Ffrom_over_into.fixed;h=1cf49ca45f494d1eca6d0a02785ca04781747755;hb=815876d93f75c4d20c52cdd32f1a521ce306be63;hp=e66dc43b0473edcb17a13b2120552039b48675ef;hpb=b72e451310d65ddf69441a641e2ebd6886c813b8;p=rust.git diff --git a/tests/ui/from_over_into.fixed b/tests/ui/from_over_into.fixed index e66dc43b047..1cf49ca45f4 100644 --- a/tests/ui/from_over_into.fixed +++ b/tests/ui/from_over_into.fixed @@ -1,5 +1,6 @@ // run-rustfix +#![feature(custom_inner_attributes)] #![warn(clippy::from_over_into)] #![allow(unused)] @@ -59,4 +60,28 @@ impl From for A { } } +fn msrv_1_40() { + #![clippy::msrv = "1.40"] + + struct FromOverInto(Vec); + + impl Into> for Vec { + fn into(self) -> FromOverInto { + FromOverInto(self) + } + } +} + +fn msrv_1_41() { + #![clippy::msrv = "1.41"] + + struct FromOverInto(Vec); + + impl From> for FromOverInto { + fn from(val: Vec) -> Self { + FromOverInto(val) + } + } +} + fn main() {}