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 15 pull requests #78303

Closed
wants to merge 55 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
16e10bf
Revert "Allow dynamic linking for iOS/tvOS targets."
francesca64 Oct 7, 2020
16d65d0
revise Hermit's mutex interface to support the behaviour of StaticMutex
stlankes Oct 6, 2020
98fcc3f
using the latest version of libhermit-rs
stlankes Oct 6, 2020
d560b50
revise code to pass the format check
stlankes Oct 6, 2020
986c1fc
revise comments and descriptions of the helper functions
stlankes Oct 7, 2020
d6e955f
fix typos in new method
stlankes Oct 9, 2020
530f575
revise code to pass the format check
stlankes Oct 9, 2020
8d8a290
add hermit to the list of omit OS
stlankes Oct 9, 2020
33fd08b
remove obsolete function diverge
stlankes Oct 12, 2020
30c3dad
reuse implementation of the system provider "unsupported"
stlankes Oct 12, 2020
1741e5b
define required type 'MovableMutex'
stlankes Oct 12, 2020
bc6b2ac
move __rg_oom to the libos to avoid duplicated symbols
stlankes Oct 13, 2020
77d9831
minor changes to pass the format check
stlankes Oct 13, 2020
bf268fe
box mutex to get a movable mutex
stlankes Oct 13, 2020
d3467fe
`#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi
Aug 2, 2020
b62b352
Check for exhaustion in RangeInclusive::contains
cuviper Oct 19, 2020
9fd79a3
make exhausted RangeInclusive::end_bound return Excluded(end)
cuviper Oct 19, 2020
a9470d0
Simplify assert terminator only if condition evaluates to expected value
tmiasko Oct 21, 2020
9202fbd
Check for exhaustion in SliceIndex for RangeInclusive
cuviper Oct 21, 2020
0a4d948
Remove unused ProfileCategory.
cjgillot Jun 7, 2020
de76370
Remove unused category from macros.
cjgillot Oct 11, 2020
de7da7f
Unify query name and node name.
cjgillot Oct 11, 2020
e853cc0
Retire rustc_dep_node_force.
cjgillot Oct 11, 2020
57ba8ed
Retire rustc_dep_node_try_load_from_on_disk_cache.
cjgillot Oct 11, 2020
40ab18d
improve const infer error
lcnr Oct 22, 2020
9775ac6
Document inline-const in the Unstable Book
camelid Oct 22, 2020
09135e4
Add regression test for issue-77475
JohnTitor Oct 23, 2020
e1c524c
review
lcnr Oct 23, 2020
50e34d6
Do not try to report on closures to avoid ICE
JohnTitor Oct 23, 2020
9b90e17
add `insert` and `insert_with` to `Option`
Canop Oct 1, 2020
e8df2a4
remove `option.insert_with`
Canop Oct 1, 2020
60a96ca
more tests in option.insert, code cleaning in option
Canop Oct 1, 2020
cc8b77a
fix naming unconsistency between function doc and prototype
Canop Oct 3, 2020
3955779
Update library/core/src/option.rs
Canop Oct 23, 2020
415a8e5
Update library/core/src/option.rs
Canop Oct 23, 2020
216d0fe
add tracking issue number to option_insert feature gate
Canop Oct 23, 2020
efedcb2
Update description of Empty Enum for accuracy
Enet4 Oct 23, 2020
972d9e8
move `visit_predicate` into `TypeVisitor`
lcnr Oct 23, 2020
a0ce1e0
Always store Rustdoc theme when it's changed
nasso Oct 23, 2020
929f80e
Add a spin loop hint for Arc::downgrade
nicbn Sep 12, 2020
eccd04c
Rollup merge of #75115 - chansuke:sys-cloudabi-unsafe, r=KodrAus
jonas-schievink Oct 23, 2020
52c9f0f
Rollup merge of #76649 - nicbn:arc-spin-loop-hint, r=m-ou-se
jonas-schievink Oct 23, 2020
39b3f6b
Rollup merge of #77392 - Canop:option_insert, r=m-ou-se
jonas-schievink Oct 23, 2020
b0c018d
Rollup merge of #77610 - hermitcore:dtors, r=m-ou-se
jonas-schievink Oct 23, 2020
b92f3c8
Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jo…
jonas-schievink Oct 23, 2020
0647b99
Rollup merge of #77830 - cjgillot:remacro, r=oli-obk
jonas-schievink Oct 23, 2020
e8dbd9d
Rollup merge of #78109 - cuviper:exhausted-rangeinc, r=dtolnay
jonas-schievink Oct 23, 2020
79afa04
Rollup merge of #78198 - tmiasko:assert, r=davidtwco
jonas-schievink Oct 23, 2020
0ec32ef
Rollup merge of #78249 - lcnr:ct-infer-origin, r=varkor
jonas-schievink Oct 23, 2020
58855f9
Rollup merge of #78250 - camelid:document-inline-const, r=spastorino
jonas-schievink Oct 23, 2020
ba91d8e
Rollup merge of #78264 - JohnTitor:macro-test, r=petrochenkov
jonas-schievink Oct 23, 2020
09d589e
Rollup merge of #78268 - JohnTitor:issue-78262, r=estebank
jonas-schievink Oct 23, 2020
411bef6
Rollup merge of #78274 - Enet4:patch-1, r=jonas-schievink
jonas-schievink Oct 23, 2020
49dc5ec
Rollup merge of #78278 - lcnr:predicate-visit, r=matthewjasper
jonas-schievink Oct 23, 2020
9a132f5
Rollup merge of #78293 - nasso:master, r=GuillaumeGomez
jonas-schievink Oct 23, 2020
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
review
  • Loading branch information
lcnr committed Oct 23, 2020
commit e1c524cd457bd02435a47214052320f8d4bfa999
21 changes: 9 additions & 12 deletions compiler/rustc_middle/src/infer/unify_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,15 @@ impl<'tcx> UnifyKey for ty::ConstVid<'tcx> {
impl<'tcx> UnifyValue for ConstVarValue<'tcx> {
type Error = (&'tcx ty::Const<'tcx>, &'tcx ty::Const<'tcx>);

fn unify_values(value1: &Self, value2: &Self) -> Result<Self, Self::Error> {
let (val, origin) = match (value1.val, value2.val) {
fn unify_values(&value1: &Self, &value2: &Self) -> Result<Self, Self::Error> {
Ok(match (value1.val, value2.val) {
(ConstVariableValue::Known { .. }, ConstVariableValue::Known { .. }) => {
bug!("equating two const variables, both of which have known values")
}

// If one side is known, prefer that one.
(ConstVariableValue::Known { .. }, ConstVariableValue::Unknown { .. }) => {
(value1.val, value1.origin)
}
(ConstVariableValue::Unknown { .. }, ConstVariableValue::Known { .. }) => {
(value2.val, value2.origin)
}
(ConstVariableValue::Known { .. }, ConstVariableValue::Unknown { .. }) => value1,
(ConstVariableValue::Unknown { .. }, ConstVariableValue::Known { .. }) => value2,

// If both sides are *unknown*, it hardly matters, does it?
(
Expand All @@ -200,11 +196,12 @@ impl<'tcx> UnifyValue for ConstVarValue<'tcx> {
// universe is the minimum of the two universes, because that is
// the one which contains the fewest names in scope.
let universe = cmp::min(universe1, universe2);
(ConstVariableValue::Unknown { universe }, value1.origin)
ConstVarValue {
val: ConstVariableValue::Unknown { universe },
origin: value1.origin,
}
}
};

Ok(ConstVarValue { origin, val })
})
}
}

Expand Down