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 #87519

Closed
wants to merge 41 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e8165e7
Support -Z unpretty=thir-tree again
syvb Jul 24, 2021
51df26e
Add test for -Z unpretty=thir-tree
syvb Jul 24, 2021
ec76b6e
Add support for tuple structs' fields documentation
GuillaumeGomez Jul 25, 2021
19f30b7
Add test for tuple struct documentation fields
GuillaumeGomez Jul 25, 2021
8350528
move Constness into TraitPredicate
fee1-dead Jul 22, 2021
cae1898
Filter non-const impls when we expect a const one
fee1-dead Jul 22, 2021
3f5e5d6
fmt
fee1-dead Jul 22, 2021
bfd4487
Inherited use constness and assoc change predicate
fee1-dead Jul 24, 2021
4bdfb46
fmt
fee1-dead Jul 24, 2021
7199946
Make selection and evaluation caches use constness
fee1-dead Jul 24, 2021
fe2519b
Relate impl
fee1-dead Jul 24, 2021
3ef7997
Try to fix problem
fee1-dead Jul 24, 2021
25c3534
Pass constness to SelectionContext
fee1-dead Jul 26, 2021
9ddb958
Fix assoc-type test
fee1-dead Jul 26, 2021
266efb5
handle the case when container is not impl
fee1-dead Jul 26, 2021
b1422da
Don't transform predicates in Inherited
fee1-dead Jul 26, 2021
6c5eae4
Fix call-generic-method-nonconst test
fee1-dead Jul 26, 2021
cdbe28e
Fix tests
fee1-dead Jul 26, 2021
5f19f12
Moved ui test
fee1-dead Jul 26, 2021
6b1c8d5
allow incomplete features for now
fee1-dead Jul 26, 2021
2b79094
Add support for tuple struct fields documentation in enums as well
GuillaumeGomez Jul 25, 2021
fbf78e1
Add test for enum item tuple fields documentation
GuillaumeGomez Jul 25, 2021
829bf1d
Make assoc types work with `?const `opt=out
fee1-dead Jul 26, 2021
6821397
Bless test
fee1-dead Jul 26, 2021
624df18
Track caller of Vec::remove()
kornelski Jul 26, 2021
b5e781a
make check less conservative and add explanation
fee1-dead Jul 27, 2021
eb6f2d4
Revert "SGX mutex is movable"
Jul 27, 2021
b518dc7
Add warning to SGX mutex implementation
Jul 27, 2021
c4aa735
Add explanations for why we use Variant::Struct instead of Variant::T…
GuillaumeGomez Jul 27, 2021
1259742
bootstrap.py: remove unused `git log` option
hudson-ayers Jul 27, 2021
5bff842
Use type_alias_impl_trait instead of min in compiler and lib
spastorino Jul 27, 2021
38bdd0e
Make all tests use type_alias_impl_trait feature instead of min
spastorino Jul 26, 2021
66dbeb5
existential_type was removed in favor of type_alias_impl_trait
spastorino Jul 26, 2021
9629d79
Remove min_type_alias_impl_trait feature
spastorino Jul 26, 2021
e5aca25
Rollup merge of #86251 - Smittyvb:thir-tree-again, r=oli-obk
GuillaumeGomez Jul 27, 2021
d87c82e
Rollup merge of #87375 - fee1-dead:move-constness-to-traitpred, r=oli…
GuillaumeGomez Jul 27, 2021
c5e23cf
Rollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514
GuillaumeGomez Jul 27, 2021
1305f88
Rollup merge of #87488 - kornelski:track-remove, r=dtolnay
GuillaumeGomez Jul 27, 2021
d65d9b2
Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obk
GuillaumeGomez Jul 27, 2021
e6f2050
Rollup merge of #87507 - jethrogb:jb/sgx-unmoveable-mutex, r=dtolnay
GuillaumeGomez Jul 27, 2021
dcd8e8e
Rollup merge of #87513 - hudson-ayers:bootstrap-py-fix, r=jyn514
GuillaumeGomez Jul 27, 2021
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
Relate impl
fee1-dead committed Jul 26, 2021

Verified

This commit was signed with the committer’s verified signature.
commit fe2519b1dd1f940901e742c90851e7e1b9870246
13 changes: 13 additions & 0 deletions compiler/rustc_middle/src/ty/relate.rs
Original file line number Diff line number Diff line change
@@ -214,6 +214,19 @@ impl<'tcx> Relate<'tcx> for ast::Constness {
}
}

impl<'tcx, T: Relate<'tcx>> Relate<'tcx> for ty::ConstnessAnd<T> {
fn relate<R: TypeRelation<'tcx>>(
relation: &mut R,
a: ty::ConstnessAnd<T>,
b: ty::ConstnessAnd<T>,
) -> RelateResult<'tcx, ty::ConstnessAnd<T>> {
Ok(ty::ConstnessAnd {
constness: relation.relate(a.constness, b.constness)?,
value: relation.relate(a.value, b.value)?,
})
}
}

impl<'tcx> Relate<'tcx> for ast::Unsafety {
fn relate<R: TypeRelation<'tcx>>(
relation: &mut R,