3 #![feature(custom_inner_attributes)]
4 #![warn(clippy::from_over_into)]
7 // this should throw an error
8 struct StringWrapper(String);
10 impl From<String> for StringWrapper {
11 fn from(val: String) -> Self {
16 struct SelfType(String);
18 impl From<String> for SelfType {
19 fn from(val: String) -> Self {
20 SelfType(String::new())
28 const FOO: &'static str = "a";
33 impl From<X> for SelfKeywords {
34 fn from(val: X) -> Self {
43 struct ExplicitPaths(bool);
45 impl core::convert::From<crate::ExplicitPaths> for bool {
46 fn from(mut val: crate::ExplicitPaths) -> Self {
47 let in_closure = || val.0;
57 impl From<String> for A {
58 fn from(s: String) -> A {
64 #![clippy::msrv = "1.40"]
66 struct FromOverInto<T>(Vec<T>);
68 impl<T> Into<FromOverInto<T>> for Vec<T> {
69 fn into(self) -> FromOverInto<T> {
76 #![clippy::msrv = "1.41"]
78 struct FromOverInto<T>(Vec<T>);
80 impl<T> From<Vec<T>> for FromOverInto<T> {
81 fn from(val: Vec<T>) -> Self {