diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2022-01-22 21:24:11 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2022-01-23 16:38:52 -0300 |
| commit | 7847ca8c61f7dc49775f237efae9c7da007d20af (patch) | |
| tree | 5f45ae358c251333aa36e47b8c5c05109c0cccd9 | |
| parent | e5f2fdb53939dc01ea6cad6e369c36aaa96f6e57 (diff) | |
| download | rust-7847ca8c61f7dc49775f237efae9c7da007d20af.tar.gz rust-7847ca8c61f7dc49775f237efae9c7da007d20af.zip | |
Document OverlapMode
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/coherence.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index f22ca11d1c3..abe51b3fe30 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -137,10 +137,15 @@ fn with_fresh_ty_vars<'cx, 'tcx>( header } +/// What kind of overlap check are we doing -- this exists just for testing and feature-gating +/// purposes. #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] enum OverlapMode { + /// The 1.0 rules (either types fail to unify, or where clauses are not implemented for crate-local types) Stable, + /// Feature-gated test: Stable, *or* there is an explicit negative impl that rules out one of the where-clauses. WithNegative, + /// Just check for negative impls, not for "where clause not implemented": used for testing. Strict, } |
