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 7 pull requests #135702

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
de89ffc
CI: split i686-msvc job to two free runners
marcoieni Jan 17, 2025
ffc7b5d
ci: use ghcr ubuntu image for mingw-check-tidy
marcoieni Jan 17, 2025
dfb8162
Drop MIPS glibc 2.23 patches that reside in crosstool-ng now
Gelbpunkt Jan 14, 2025
067cac9
Fix ICE in resolving associated items as non-bindings
frank-king Jan 18, 2025
a14c35c
coverage: Remove the `Site` enum now that we only instrument nodes
Zalathar Jan 17, 2025
4839944
coverage: Move `phys_counter_for_node` into `CoverageCounters`
Zalathar Jan 17, 2025
4170b93
coverage: Flatten top-level counter creation into plain functions
Zalathar Jan 17, 2025
6000d5c
coverage: Remove `BcbCounter` and `BcbExpression`
Zalathar Jan 17, 2025
ea0c86c
coverage: Add a few more comments to counter creation
Zalathar Jan 18, 2025
2a180a9
Get rid of `ToPolyTraitRef`
compiler-errors Jan 18, 2025
ed5f631
use `Reverse` instead of manually doing reverse comparison
yotamofek Jan 18, 2025
a909520
use slice patterns for checking for elements of slice
yotamofek Jan 18, 2025
d4f41b3
Rollup merge of #135616 - marcoieni:split-i686-msvc-job, r=Kobzol
matthiaskrgr Jan 18, 2025
b78d597
Rollup merge of #135623 - marcoieni:mingw-check-tidy-dockerfile, r=Ko…
matthiaskrgr Jan 18, 2025
fd2ec9a
Rollup merge of #135640 - Gelbpunkt:drop-mips-glibc-patches, r=Kobzol
matthiaskrgr Jan 18, 2025
7c3e804
Rollup merge of #135663 - frank-king:fix/135614, r=compiler-errors
matthiaskrgr Jan 18, 2025
9d99f9c
Rollup merge of #135677 - yotamofek:resolve-cleanups2, r=compiler-errors
matthiaskrgr Jan 18, 2025
41ea084
Rollup merge of #135680 - Zalathar:counters-cleanup, r=compiler-errors
matthiaskrgr Jan 18, 2025
1cef579
Rollup merge of #135697 - compiler-errors:poly-trait-ref, r=lqd
matthiaskrgr Jan 18, 2025
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
6 changes: 3 additions & 3 deletions compiler/rustc_infer/src/traits/util.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_data_structures::fx::FxHashSet;
use rustc_middle::ty::{self, ToPolyTraitRef, TyCtxt};
use rustc_middle::ty::{self, TyCtxt};
use rustc_span::{Ident, Span};
pub use rustc_type_ir::elaborate::*;

Expand Down Expand Up @@ -125,8 +125,8 @@ pub fn transitive_bounds_that_define_assoc_item<'tcx>(
.iter_identity_copied()
.map(|(clause, _)| clause.instantiate_supertrait(tcx, trait_ref))
.filter_map(|clause| clause.as_trait_clause())
// FIXME: Negative supertraits are elaborated here lol
.map(|trait_pred| trait_pred.to_poly_trait_ref()),
.filter(|clause| clause.polarity() == ty::PredicatePolarity::Positive)
.map(|clause| clause.map_bound(|clause| clause.trait_ref)),
);

return Some(trait_ref);
Expand Down
8 changes: 2 additions & 6 deletions compiler/rustc_middle/src/mir/coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ impl ConditionId {

/// Enum that can hold a constant zero value, the ID of an physical coverage
/// counter, or the ID of a coverage-counter expression.
///
/// This was originally only used for expression operands (and named `Operand`),
/// but the zero/counter/expression distinction is also useful for representing
/// the value of code/gap mappings, and the true/false arms of branch mappings.
#[derive(Copy, Clone, PartialEq, Eq)]
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[derive(TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable, TypeVisitable)]
pub enum CovTerm {
Zero,
Expand Down Expand Up @@ -171,7 +167,7 @@ impl Op {
}
}

#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable, TypeVisitable)]
pub struct Expression {
pub lhs: CovTerm,
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_middle/src/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ pub use self::predicate::{
PolyExistentialPredicate, PolyExistentialProjection, PolyExistentialTraitRef,
PolyProjectionPredicate, PolyRegionOutlivesPredicate, PolySubtypePredicate, PolyTraitPredicate,
PolyTraitRef, PolyTypeOutlivesPredicate, Predicate, PredicateKind, ProjectionPredicate,
RegionOutlivesPredicate, SubtypePredicate, ToPolyTraitRef, TraitPredicate, TraitRef,
TypeOutlivesPredicate,
RegionOutlivesPredicate, SubtypePredicate, TraitPredicate, TraitRef, TypeOutlivesPredicate,
};
pub use self::region::{
BoundRegion, BoundRegionKind, EarlyParamRegion, LateParamRegion, LateParamRegionKind, Region,
Expand Down
10 changes: 0 additions & 10 deletions compiler/rustc_middle/src/ty/predicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,16 +476,6 @@ impl<'tcx> Clause<'tcx> {
}
}

pub trait ToPolyTraitRef<'tcx> {
fn to_poly_trait_ref(&self) -> PolyTraitRef<'tcx>;
}

impl<'tcx> ToPolyTraitRef<'tcx> for PolyTraitPredicate<'tcx> {
fn to_poly_trait_ref(&self) -> PolyTraitRef<'tcx> {
self.map_bound_ref(|trait_pred| trait_pred.trait_ref)
}
}

impl<'tcx> UpcastFrom<TyCtxt<'tcx>, PredicateKind<'tcx>> for Predicate<'tcx> {
fn upcast_from(from: PredicateKind<'tcx>, tcx: TyCtxt<'tcx>) -> Self {
ty::Binder::dummy(from).upcast(tcx)
Expand Down
Loading
Loading