Skip to content

Commit 6675913

Browse files
committed
Auto merge of #48806 - alexcrichton:rollup, r=alexcrichton
Rollup of 9 pull requests - Successful merges: #48511, #48549, #48618, #48624, #48651, #48698, #48778, #48787, #48802 - Failed merges: #48669, #48710
2 parents 4cdbac6 + c4d1abe commit 6675913

File tree

52 files changed

+458
-520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+458
-520
lines changed

src/Cargo.lock

+19-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/etc/ziggurat_tables.py

-127
This file was deleted.

src/libcore/option.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -829,14 +829,13 @@ impl<'a, T: Clone> Option<&'a mut T> {
829829
/// # Examples
830830
///
831831
/// ```
832-
/// #![feature(option_ref_mut_cloned)]
833832
/// let mut x = 12;
834833
/// let opt_x = Some(&mut x);
835834
/// assert_eq!(opt_x, Some(&mut 12));
836835
/// let cloned = opt_x.cloned();
837836
/// assert_eq!(cloned, Some(12));
838837
/// ```
839-
#[unstable(feature = "option_ref_mut_cloned", issue = "43738")]
838+
#[stable(since = "1.26.0", feature = "option_ref_mut_cloned")]
840839
pub fn cloned(self) -> Option<T> {
841840
self.map(|t| t.clone())
842841
}

src/librustc/ich/impls_ty.rs

-4
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ impl_stable_hash_for!(enum ty::Visibility {
244244

245245
impl_stable_hash_for!(struct ty::TraitRef<'tcx> { def_id, substs });
246246
impl_stable_hash_for!(struct ty::TraitPredicate<'tcx> { trait_ref });
247-
impl_stable_hash_for!(tuple_struct ty::EquatePredicate<'tcx> { t1, t2 });
248247
impl_stable_hash_for!(struct ty::SubtypePredicate<'tcx> { a_is_expected, a, b });
249248

250249
impl<'gcx, A, B> HashStable<StableHashingContext<'gcx>>
@@ -274,9 +273,6 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for ty::Predicate<'gcx> {
274273
ty::Predicate::Trait(ref pred) => {
275274
pred.hash_stable(hcx, hasher);
276275
}
277-
ty::Predicate::Equate(ref pred) => {
278-
pred.hash_stable(hcx, hasher);
279-
}
280276
ty::Predicate::Subtype(ref pred) => {
281277
pred.hash_stable(hcx, hasher);
282278
}

src/librustc/infer/error_reporting/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,6 @@ impl<'tcx> ObligationCause<'tcx> {
12801280
}),
12811281
IfExpression => Error0308("if and else have incompatible types"),
12821282
IfExpressionWithNoElse => Error0317("if may be missing an else clause"),
1283-
EquatePredicate => Error0308("equality predicate not satisfied"),
12841283
MainFunctionType => Error0580("main function has wrong type"),
12851284
StartFunctionType => Error0308("start function has wrong type"),
12861285
IntrinsicType => Error0308("intrinsic has wrong type"),
@@ -1309,7 +1308,6 @@ impl<'tcx> ObligationCause<'tcx> {
13091308
},
13101309
IfExpression => "if and else have compatible types",
13111310
IfExpressionWithNoElse => "if missing an else returns ()",
1312-
EquatePredicate => "equality where clause is satisfied",
13131311
MainFunctionType => "`main` function has the correct type",
13141312
StartFunctionType => "`start` function has the correct type",
13151313
IntrinsicType => "intrinsic has the correct type",

src/librustc/infer/mod.rs

-17
Original file line numberDiff line numberDiff line change
@@ -943,23 +943,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
943943
self.borrow_region_constraints().make_subregion(origin, a, b);
944944
}
945945

946-
pub fn equality_predicate(&self,
947-
cause: &ObligationCause<'tcx>,
948-
param_env: ty::ParamEnv<'tcx>,
949-
predicate: &ty::PolyEquatePredicate<'tcx>)
950-
-> InferResult<'tcx, ()>
951-
{
952-
self.commit_if_ok(|snapshot| {
953-
let (ty::EquatePredicate(a, b), skol_map) =
954-
self.skolemize_late_bound_regions(predicate, snapshot);
955-
let cause_span = cause.span;
956-
let eqty_ok = self.at(cause, param_env).eq(b, a)?;
957-
self.leak_check(false, cause_span, &skol_map, snapshot)?;
958-
self.pop_skolemized(skol_map, snapshot);
959-
Ok(eqty_ok.unit())
960-
})
961-
}
962-
963946
pub fn subtype_predicate(&self,
964947
cause: &ObligationCause<'tcx>,
965948
param_env: ty::ParamEnv<'tcx>,

src/librustc/infer/outlives/bounds.rs

-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
117117
assert!(!obligation.has_escaping_regions());
118118
match obligation.predicate {
119119
ty::Predicate::Trait(..) |
120-
ty::Predicate::Equate(..) |
121120
ty::Predicate::Subtype(..) |
122121
ty::Predicate::Projection(..) |
123122
ty::Predicate::ClosureKind(..) |
@@ -204,7 +203,6 @@ pub fn explicit_outlives_bounds<'tcx>(
204203
.filter_map(move |predicate| match predicate {
205204
ty::Predicate::Projection(..) |
206205
ty::Predicate::Trait(..) |
207-
ty::Predicate::Equate(..) |
208206
ty::Predicate::Subtype(..) |
209207
ty::Predicate::WellFormed(..) |
210208
ty::Predicate::ObjectSafe(..) |

src/librustc/traits/error_reporting.rs

-11
Original file line numberDiff line numberDiff line change
@@ -631,16 +631,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
631631
span_bug!(span, "subtype requirement gave wrong error: `{:?}`", predicate)
632632
}
633633

634-
ty::Predicate::Equate(ref predicate) => {
635-
let predicate = self.resolve_type_vars_if_possible(predicate);
636-
let err = self.equality_predicate(&obligation.cause,
637-
obligation.param_env,
638-
&predicate).err().unwrap();
639-
struct_span_err!(self.tcx.sess, span, E0278,
640-
"the requirement `{}` is not satisfied (`{}`)",
641-
predicate, err)
642-
}
643-
644634
ty::Predicate::RegionOutlives(ref predicate) => {
645635
let predicate = self.resolve_type_vars_if_possible(predicate);
646636
let err = self.region_outlives_predicate(&obligation.cause,
@@ -1270,7 +1260,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
12701260
ObligationCauseCode::MatchExpressionArm { .. } |
12711261
ObligationCauseCode::IfExpression |
12721262
ObligationCauseCode::IfExpressionWithNoElse |
1273-
ObligationCauseCode::EquatePredicate |
12741263
ObligationCauseCode::MainFunctionType |
12751264
ObligationCauseCode::StartFunctionType |
12761265
ObligationCauseCode::IntrinsicType |

0 commit comments

Comments
 (0)