Skip to content

Commit

Permalink
nit: update error text to cite tracking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis authored and arielb1 committed Sep 24, 2019
1 parent da60c53 commit 167ab04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/libcore/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,8 @@ impl<T> From<T> for T {

#[stable(feature = "convert_infallible", since = "1.34.0")]
#[cfg(not(boostrap_stdarch_ignore_this))]
#[rustc_reservation_impl="a future version of Rust might implement `From<!>` for \
all types. \
However, it is OK to implement `From<!>` for types you own - \
when the blanket impl will be added, coherence will be changed \
to make these impls not be an error."
]
#[rustc_reservation_impl="permitting this impl would forbid us from adding \
`impl<T> From<!> for T` later; see rust-lang/rust#64715 for details"]
impl<T> From<!> for T {
fn from(t: !) -> T { t }
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/never-from-impl-is-reserved.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | // This will conflict with the first impl if we impl `for<T> T: From<!>`.
LL | impl<T> MyTrait for T where T: From<!> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyFoo`
|
= note: a future version of Rust might implement `From<!>` for all types. However, it is OK to implement `From<!>` for types you own - when the blanket impl will be added, coherence will be changed to make these impls not be an error.
= note: permitting this impl would forbid us from adding `impl<T> From<!> for T` later; see rust-lang/rust#64715 for details

error: aborting due to previous error

Expand Down

0 comments on commit 167ab04

Please sign in to comment.