Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #93288

Merged
merged 35 commits into from
Jan 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
18c14ad
Add a `try_clone()` function to `OwnedFd`.
sunfishcode Sep 9, 2021
622dfcc
Fix Windows compilation errors.
sunfishcode Sep 9, 2021
c986c6b
Fix more Windows compilation errors.
sunfishcode Sep 9, 2021
2d6a4c8
Fix another Windows compilation error.
sunfishcode Sep 9, 2021
53e072f
Fix compilation on WASI, which doesn't yet support `dup`.
sunfishcode Oct 5, 2021
83aebf8
Use the correct `cvt` for converting socket errors on Windows.
sunfishcode Jan 12, 2022
02f1a56
Properly track `DepNode`s in trait evaluation provisional cache
Aaron1011 Jan 19, 2022
f518827
Use impl1 and impl2 instead of a and b prefixes
spastorino Jan 21, 2022
052b31b
Move auxiliary fns out of overlap_with_probe
spastorino Jan 21, 2022
f4b4294
Remove FIXME and fix inconsistency of local blanket impls by using HI…
CraftSpider Jan 21, 2022
66d056a
Update test to include `self` case
CraftSpider Jan 21, 2022
1a0278e
Work around missing code coverage data causing llvm-cov failures
wesleywiser Jan 21, 2022
b2a45f0
Extract stable_disjoint fn
spastorino Jan 21, 2022
c2890ed
Add overlap mode
spastorino Jan 21, 2022
d2d25a5
Implement stable with negative coherence mode
spastorino Jan 21, 2022
1ec962f
Do not pass OverlapMode down, just create a closure to properly set t…
spastorino Jan 21, 2022
19e3c86
Make strict_disjoint use explicit_disjoint
spastorino Jan 21, 2022
e2567b0
Remove intermediate function doesn't make more sense
spastorino Jan 21, 2022
762bdbf
Change signature of point_at_arg_instead_of_call_if_possible
jackh726 Dec 25, 2021
ce31f68
Move param count error emission to near end of check_argument_types
jackh726 Jan 20, 2022
e5f2fdb
Restructure the code leveraging in abilities more than modes
spastorino Jan 22, 2022
9220631
Add has tests for blanket_with_local trait methods
CraftSpider Jan 23, 2022
7847ca8
Document OverlapMode
spastorino Jan 23, 2022
2693832
Rename strict_check to negative_impl_exists
spastorino Jan 23, 2022
8189bac
FIXME include regions too
spastorino Jan 23, 2022
11b17c6
rustdoc settings: use radio buttons for theme
jsha Jan 23, 2022
e02e958
Use error-on-mismatch policy for PAuth module flags.
jacobbramley Jan 19, 2022
687bb58
Rollup merge of #88794 - sunfishcode:sunfishcode/try-clone, r=joshtri…
matthiaskrgr Jan 25, 2022
cf70411
Rollup merge of #93064 - Aaron1011:provisional-dep-node, r=michaelwoe…
matthiaskrgr Jan 25, 2022
c8ede15
Rollup merge of #93118 - jackh726:param-heuristics-3, r=estebank
matthiaskrgr Jan 25, 2022
8dddc86
Rollup merge of #93144 - wesleywiser:uninhabited_type_code_cov2, r=tm…
matthiaskrgr Jan 25, 2022
677126c
Rollup merge of #93169 - CraftSpider:rustdoc-clean-inconsistency, r=G…
matthiaskrgr Jan 25, 2022
3d6f276
Rollup merge of #93175 - spastorino:negative-traits-coherence-new, r=…
matthiaskrgr Jan 25, 2022
c3ddca6
Rollup merge of #93251 - jsha:theme-radio, r=GuillaumeGomez
matthiaskrgr Jan 25, 2022
13b87d8
Rollup merge of #93269 - jacobbramley:dev/pauth-option-1, r=petrochenkov
matthiaskrgr Jan 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename strict_check to negative_impl_exists
  • Loading branch information
spastorino committed Jan 23, 2022

Verified

This commit was signed with the committer’s verified signature. The key has expired.
spastorino Santiago Pastorino
commit 269383226f8f11e21883590d40270bdd58339477
12 changes: 8 additions & 4 deletions compiler/rustc_trait_selection/src/traits/coherence.rs
Original file line number Diff line number Diff line change
@@ -313,7 +313,9 @@ fn implicit_negative<'cx, 'tcx>(
predicate: p,
})
.chain(obligations)
.find(|o| loose_check(selcx, o) || tcx.features().negative_impls && strict_check(selcx, o));
.find(|o| {
loose_check(selcx, o) || tcx.features().negative_impls && negative_impl_exists(selcx, o)
});
// FIXME: the call to `selcx.predicate_may_hold_fatal` above should be ported
// to the canonical trait query form, `infcx.predicate_may_hold`, once
// the new system supports intercrate mode (which coherence needs).
@@ -377,8 +379,10 @@ fn negative_impl<'cx, 'tcx>(
}
};

let opt_failing_obligation =
obligations.into_iter().chain(more_obligations).find(|o| strict_check(selcx, o));
let opt_failing_obligation = obligations
.into_iter()
.chain(more_obligations)
.find(|o| negative_impl_exists(selcx, o));

if let Some(failing_obligation) = opt_failing_obligation {
debug!("overlap: obligation unsatisfiable {:?}", failing_obligation);
@@ -396,7 +400,7 @@ fn loose_check<'cx, 'tcx>(
!selcx.predicate_may_hold_fatal(o)
}

fn strict_check<'cx, 'tcx>(
fn negative_impl_exists<'cx, 'tcx>(
selcx: &SelectionContext<'cx, 'tcx>,
o: &PredicateObligation<'tcx>,
) -> bool {