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 9
9
// with existing impls - at least the `impl<T> From<T> for T` impl. There are
10
10
// 2 ways we thought of for dealing with that conflict:
11
11
//
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.
17
18
// https://github.com/rust-lang/rust/issues/57012#issuecomment-452150775
18
19
//
19
20
// 2. The other way is to notice that `impl From<!> for T` is basically a
26
27
// breaking backwards-compatibility in a fairly painful way. So if we want to
27
28
// go with a known approach, we should go with a "marker trait overlap"-style
28
29
// approach.
30
+ //
31
+ // [ii]: http://smallcultfollowing.com/babysteps/blog/2016/09/24/intersection-impls/
29
32
30
33
#![ feature( rustc_attrs, never_type) ]
31
34
You can’t perform that action at this time.
0 commit comments