1
Fork 0

Auto merge of #95678 - pietroalbini:pa-1.62.0-bootstrap, r=Mark-Simulacrum

Bump bootstrap compiler to 1.61.0 beta

This PR bumps the bootstrap compiler to the 1.61.0 beta. The first commit changes the stage0 compiler, the second commit applies the "mechanical" changes and the third and fourth commits apply changes explained in the relevant comments.

r? `@Mark-Simulacrum`
This commit is contained in:
bors 2022-04-07 07:34:04 +00:00
commit f565016edd
50 changed files with 524 additions and 697 deletions

View file

@ -1,5 +1,4 @@
#![feature(nll)]
#![cfg_attr(bootstrap, feature(native_link_modifiers))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
// NOTE: This crate only exists to allow linking on mingw targets.

View file

@ -58,7 +58,7 @@ pub struct Allocation<Tag = AllocId, Extra = ()> {
/// means that both the inner type (`Allocation`) and the outer type
/// (`ConstAllocation`) are used quite a bit.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct ConstAllocation<'tcx, Tag = AllocId, Extra = ()>(
pub Interned<'tcx, Allocation<Tag, Extra>>,
);

View file

@ -161,7 +161,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for AdtDefData {
}
#[derive(Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, HashStable)]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct AdtDef<'tcx>(pub Interned<'tcx, AdtDefData>);
impl<'tcx> AdtDef<'tcx> {

View file

@ -1262,7 +1262,7 @@ impl<'a> fmt::Debug for LayoutS<'a> {
}
#[derive(Copy, Clone, PartialEq, Eq, Hash, HashStable_Generic)]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct Layout<'a>(pub Interned<'a, LayoutS<'a>>);
impl<'a> fmt::Debug for Layout<'a> {

View file

@ -307,17 +307,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
self.assemble_builtin_bound_candidates(sized_conditions, &mut candidates);
} else if lang_items.unsize_trait() == Some(def_id) {
self.assemble_candidates_for_unsizing(obligation, &mut candidates);
} else if lang_items.drop_trait() == Some(def_id)
&& obligation.predicate.is_const_if_const()
{
// holds to make it easier to transition
// FIXME(fee1-dead): add a note for selection error of `~const Drop`
// when beta is bumped
// FIXME: remove this when beta is bumped
#[cfg(bootstrap)]
{}
candidates.vec.push(SelectionCandidate::ConstDestructCandidate(None))
} else if lang_items.destruct_trait() == Some(def_id) {
self.assemble_const_destruct_candidates(obligation, &mut candidates);
} else {

View file

@ -1106,13 +1106,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
}
let drop_trait = self.tcx().require_lang_item(LangItem::Drop, None);
// FIXME: remove if statement below when beta is bumped
#[cfg(bootstrap)]
{}
if obligation.predicate.skip_binder().def_id() == drop_trait {
return Ok(ImplSourceConstDestructData { nested: vec![] });
}
let tcx = self.tcx();
let self_ty = self.infcx.shallow_resolve(obligation.self_ty());