File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/test/ui/traits/reservation-impls Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 99// with existing impls - at least the `impl<T> From<T> for T` impl. There are
1010// 2 ways we thought of for dealing with that conflict:
1111//
12- // 1. Using specialization and doing some handling for the overlap. The current
13- // thought is for something like "lattice specialization", which means providing
14- // an (higher-priority) impl for the intersection of every 2 conflicting impls
15- // that determines what happens in the intersection case. That's the first
16- // thing we thought about - see e.g.
12+ // 1. Using specialization and doing some handling for the
13+ // overlap. The current thought is to require ["intersection
14+ // impls"][ii], specialization", which means providing an
15+ // (higher-priority) impl for the intersection of every 2 conflicting
16+ // impls that determines what happens in the intersection case. That's
17+ // the first thing we thought about - see e.g.
1718// https://github.com/rust-lang/rust/issues/57012#issuecomment-452150775
1819//
1920// 2. The other way is to notice that `impl From<!> for T` is basically a
2627// breaking backwards-compatibility in a fairly painful way. So if we want to
2728// go with a known approach, we should go with a "marker trait overlap"-style
2829// approach.
30+ //
31+ // [ii]: http://smallcultfollowing.com/babysteps/blog/2016/09/24/intersection-impls/
2932
3033#![ feature( rustc_attrs, never_type) ]
3134
You can’t perform that action at this time.
0 commit comments