Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ee61f09
Add arm64ec-pc-windows-msvc target
dpaoliello Dec 16, 2023
a9907b1
remove Mutex::unlock
HTGAzureX1212 Feb 28, 2024
4996194
Improve error messages for generics with default parameters
veera-sivarajan Feb 21, 2024
3ba50b3
Avoid code duplication
veera-sivarajan Feb 23, 2024
cc13f82
Update item order in test
veera-sivarajan Feb 23, 2024
a7832b1
Make the success arms of `if lhs || rhs` meet up in a separate block
Zalathar Feb 28, 2024
f11713b
Error on stray .stderr/.stdout files for (un-)revisioned tests
jieyouxu Feb 22, 2024
19ee457
Remove stray stdout/stderr files
jieyouxu Feb 22, 2024
721c741
Remove unnecessary `Level::` qualifiers.
nnethercote Feb 29, 2024
7e64163
CFI: Remove unused `typeid_for_fnsig`
rcvalle Feb 29, 2024
44f0043
Handle stashing of delayed bugs.
nnethercote Feb 29, 2024
3898029
Implement missing ABI structures in StableMIR
celinval Feb 29, 2024
2064c19
Remove unused fluent messages
mu001999 Mar 1, 2024
beac5b1
Fix typo in comment
gurry Mar 1, 2024
836ac98
Stop using Bubble in coherence and instead emulate it with an intercr…
oli-obk Feb 28, 2024
70b4784
Rollup merge of #119199 - dpaoliello:arm64ec, r=wesleywiser
matthiaskrgr Mar 1, 2024
4c4ba61
Rollup merge of #121416 - veera-sivarajan:bugfix-120785, r=nnethercote
matthiaskrgr Mar 1, 2024
f8cb5af
Rollup merge of #121475 - jieyouxu:tidy-stderr-check, r=the8472,compi…
matthiaskrgr Mar 1, 2024
10da6c0
Rollup merge of #121736 - HTGAzureX1212:HTGAzureX1212/remove-mutex-un…
matthiaskrgr Mar 1, 2024
5b9fc50
Rollup merge of #121744 - oli-obk:eager_opaque_checks2, r=lcnr
matthiaskrgr Mar 1, 2024
aa2ff4c
Rollup merge of #121784 - Zalathar:if-or-converge, r=Nadrieril
matthiaskrgr Mar 1, 2024
573c198
Rollup merge of #121818 - rcvalle:rust-cfi-remove-unused-typeid-for-f…
matthiaskrgr Mar 1, 2024
7a4a471
Rollup merge of #121819 - nnethercote:fix-121812, r=oli-obk
matthiaskrgr Mar 1, 2024
57ac137
Rollup merge of #121824 - celinval:smir-scalar, r=oli-obk
matthiaskrgr Mar 1, 2024
7fd3f4b
Rollup merge of #121828 - mu001999:clean, r=Nilstrieb
matthiaskrgr Mar 1, 2024
7eaee7e
Rollup merge of #121831 - gurry:fix-typo, r=oli-obk
matthiaskrgr Mar 1, 2024
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
Stop using Bubble in coherence and instead emulate it with an intercr…
…ate check
  • Loading branch information
oli-obk committed Mar 1, 2024
commit 836ac98482ff93853dbf3aeb2d67ce5253f4b2e0
16 changes: 14 additions & 2 deletions compiler/rustc_infer/src/infer/opaque_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ impl<'tcx> InferCtxt<'tcx> {
let process = |a: Ty<'tcx>, b: Ty<'tcx>, a_is_expected| match *a.kind() {
ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) if def_id.is_local() => {
let def_id = def_id.expect_local();
if self.intercrate {
// See comment on `insert_hidden_type` for why this is sufficient in coherence
return Some(self.register_hidden_type(
OpaqueTypeKey { def_id, args },
cause.clone(),
param_env,
b,
a_is_expected,
));
}
match self.defining_use_anchor {
DefiningAnchor::Bind(_) => {
// Check that this is `impl Trait` type is
Expand Down Expand Up @@ -146,8 +156,10 @@ impl<'tcx> InferCtxt<'tcx> {
}
}
DefiningAnchor::Bubble => {}
DefiningAnchor::Error => return None,
};
DefiningAnchor::Error => {
return None;
}
}
if let ty::Alias(ty::Opaque, ty::AliasTy { def_id: b_def_id, .. }) = *b.kind() {
// We could accept this, but there are various ways to handle this situation, and we don't
// want to make a decision on it right now. Likely this case is so super rare anyway, that
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_trait_selection/src/traits/coherence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use rustc_infer::traits::{util, TraitEngine, TraitEngineExt};
use rustc_middle::traits::query::NoSolution;
use rustc_middle::traits::solve::{CandidateSource, Certainty, Goal};
use rustc_middle::traits::specialization_graph::OverlapMode;
use rustc_middle::traits::DefiningAnchor;
use rustc_middle::ty::fast_reject::{DeepRejectCtxt, TreatParams};
use rustc_middle::ty::visit::{TypeVisitable, TypeVisitableExt};
use rustc_middle::ty::{self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitor};
Expand Down Expand Up @@ -190,7 +189,6 @@ fn overlap<'tcx>(

let infcx = tcx
.infer_ctxt()
.with_opaque_type_inference(DefiningAnchor::Bubble)
.skip_leak_check(skip_leak_check.is_yes())
.intercrate(true)
.with_next_trait_solver(tcx.next_trait_solver_in_coherence())
Expand Down