1
Fork 0

Auto merge of #94290 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini

Bump bootstrap to 1.60

This bumps the bootstrap compiler to 1.60 and cleans up cfgs and Span's rustc_pass_by_value (enabled by the bootstrap bump).
This commit is contained in:
bors 2022-02-25 18:34:02 +00:00
commit d981633ed6
63 changed files with 429 additions and 503 deletions

View file

@ -57,7 +57,7 @@
#![feature(unwrap_infallible)]
#![feature(decl_macro)]
#![recursion_limit = "512"]
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate bitflags;

View file

@ -162,6 +162,9 @@ macro_rules! make_mir_visitor {
self.super_constant(constant, location);
}
// The macro results in a false positive of sorts, where &mut Span
// is fine, but &Span is not; just allow the lint.
#[allow(rustc::pass_by_value)]
fn visit_span(&mut self,
span: & $($mutability)? Span) {
self.super_span(span);
@ -869,6 +872,9 @@ macro_rules! make_mir_visitor {
}
}
// The macro results in a false positive of sorts, where &mut Span
// is fine, but &Span is not; just allow the lint.
#[allow(rustc::pass_by_value)]
fn super_span(&mut self, _span: & $($mutability)? Span) {
}

View file

@ -21,7 +21,7 @@ pub use valtree::*;
/// Use this rather than `ConstS`, whenever possible.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct Const<'tcx>(pub Interned<'tcx, ConstS<'tcx>>);
impl<'tcx> fmt::Debug for Const<'tcx> {

View file

@ -970,7 +970,7 @@ pub struct FreeRegionInfo {
/// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/ty.html
#[derive(Copy, Clone)]
#[rustc_diagnostic_item = "TyCtxt"]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct TyCtxt<'tcx> {
gcx: &'tcx GlobalCtxt<'tcx>,
}

View file

@ -433,7 +433,7 @@ static_assert_size!(TyS<'_>, 40);
/// Use this rather than `TyS`, whenever possible.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[rustc_diagnostic_item = "Ty"]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct Ty<'tcx>(Interned<'tcx, TyS<'tcx>>);
// Statics only used for internal testing.
@ -486,7 +486,7 @@ static_assert_size!(PredicateS<'_>, 56);
/// Use this rather than `PredicateS`, whenever possible.
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct Predicate<'tcx>(Interned<'tcx, PredicateS<'tcx>>);
impl<'tcx> Predicate<'tcx> {

View file

@ -1396,7 +1396,7 @@ impl ParamConst {
/// Use this rather than `TyKind`, whenever possible.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
#[rustc_pass_by_value]
pub struct Region<'tcx>(pub Interned<'tcx, RegionKind>);
impl<'tcx> Deref for Region<'tcx> {