Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This... is a weird test.
It has two impls:
impl<T> From<Foo<T>> for Box<T>(commented out, more on that later), andimpl<T> Into<Vec<T>> for Foo<T>The idea of that test is to show that the first impl doesn't compile, but the second does, thus
TryFromshould be usingIntoand notFrom(becauseIntois more general, since theFromimpl doesn't compile).However:
BoxvsVec, which is significant b/cBoxis fundamentalHere is a table for compilation of the impls:
VecBoxFromIntogodbolt used to test this
Order of events:
1.28theincoherent_fundamental_implslint becomes deny by default (this is not mentioned in the changelog yay)1.32changed absolutely nothing, even though this version is credited in the testTryFromblanket impl to useIntoinstead ofFrom#56796)1.41coherence was relaxed to allowFrom+Vecto compileTo conclude: since
1.41this test does nothing (and before that it was written in a way which did not detect this change). It looks to me like today (since1.41) we could boundTryFromimpl withFrom(but now it'd be a useless breaking change of course).Am I missing anything? Is there a useful version of this test that could be written?