forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat TAIT equation as always ambiguous in coherence
- Loading branch information
1 parent
f28ec85
commit f711c7e
Showing
2 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,29 @@ | ||
error[E0658]: `impl Trait` in type aliases is unstable | ||
--> $DIR/from_over_into_unfixable.rs:35:15 | ||
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true | ||
--> $DIR/from_over_into_unfixable.rs:11:1 | ||
| | ||
LL | type Opaque = impl Sized; | ||
| ^^^^^^^^^^ | ||
LL | impl Into<InMacro> for String { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information | ||
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable | ||
= help: replace the `Into` implementation with `From<std::string::String>` | ||
= note: `-D clippy::from-over-into` implied by `-D warnings` | ||
|
||
error: aborting due to previous error | ||
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true | ||
--> $DIR/from_over_into_unfixable.rs:19:1 | ||
| | ||
LL | impl Into<WeirdUpperSelf> for &'static [u8] { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: replace the `Into` implementation with `From<&'static [u8]>` | ||
|
||
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true | ||
--> $DIR/from_over_into_unfixable.rs:28:1 | ||
| | ||
LL | impl Into<u8> for ContainsVal { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see | ||
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence | ||
= help: replace the `Into` implementation with `From<ContainsVal>` | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |