Do not suggest using a const parameter when there are bounds on an unused type parameter
The user wrote the bound, so it's obvious they want a type.
"rustc_hir",
"rustc_index",
"rustc_llvm",
+ "rustc_macros",
"rustc_metadata",
"rustc_middle",
"rustc_query_system",
Language
--------
-- [Stabilize default arguments for const generics][90207]
+- [Stabilize default arguments for const parameters and remove the ordering restriction for type and const parameters][90207]
- [Stabilize destructuring assignment][90521]
- [Relax private in public lint on generic bounds and where clauses of trait impls][90586]
- [Stabilize asm! and global_asm! for x86, x86_64, ARM, Aarch64, and RISC-V][91728]
- [Warn when a `#[test]`-like built-in attribute macro is present multiple times.][91172]
- [Add support for riscv64gc-unknown-freebsd][91284]
- [Stabilize `-Z emit-future-incompat` as `--json future-incompat`][91535]
+- [Soft disable incremental compilation][94124]
+
+This release disables incremental compilation, unless the user has explicitly
+opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
+This is due to a known and relatively frequently occurring bug in incremental
+compilation, which causes builds to issue internal compiler errors. This
+particular bug is already fixed on nightly, but that fix has not yet rolled out
+to stable and is deemed too risky for a direct stable backport.
+
+As always, we encourage users to test with nightly and report bugs so that we
+can track failures and fix issues earlier.
+
+See [94124] for more details.
+
+[94124]: https://github.com/rust-lang/rust/issues/94124
Libraries
---------
- [`NonZeroU32::is_power_of_two`][is_power_of_two32]
- [`NonZeroU64::is_power_of_two`][is_power_of_two64]
- [`NonZeroU128::is_power_of_two`][is_power_of_two128]
+- [`NonZeroUsize::is_power_of_two`][is_power_of_two_usize]
- [`DoubleEndedIterator for ToLowercase`][lowercase]
- [`DoubleEndedIterator for ToUppercase`][uppercase]
- [`TryFrom<&mut [T]> for [T; N]`][tryfrom_ref_arr]
- [Weaken guarantee around advancing underlying iterators in zip][83791]
- [Make split_inclusive() on an empty slice yield an empty output][89825]
- [Update std::env::temp_dir to use GetTempPath2 on Windows when available.][89999]
+- [unreachable! was updated to match other formatting macro behavior on Rust 2021][92137]
Internal Changes
----------------
[91984]: https://github.com/rust-lang/rust/pull/91984/
[92020]: https://github.com/rust-lang/rust/pull/92020/
[92034]: https://github.com/rust-lang/rust/pull/92034/
+[92137]: https://github.com/rust-lang/rust/pull/92137/
[92483]: https://github.com/rust-lang/rust/pull/92483/
[cargo/10088]: https://github.com/rust-lang/cargo/pull/10088/
[cargo/10133]: https://github.com/rust-lang/cargo/pull/10133/
[is_power_of_two32]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU32.html#method.is_power_of_two
[is_power_of_two64]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU64.html#method.is_power_of_two
[is_power_of_two128]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU128.html#method.is_power_of_two
+[is_power_of_two_usize]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroUsize.html#method.is_power_of_two
[stdarch/1266]: https://github.com/rust-lang/stdarch/pull/1266
Version 1.58.1 (2022-01-19)
#![feature(let_else)]
#![feature(never_type)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
use rustc_ast::token::{self, Token};
use rustc_ast::tokenstream::{CanSynthesizeMissingTokens, TokenStream, TokenTree};
/// indicate whether or not we're in a place where new lifetimes will result
/// in in-band lifetime definitions, such a function or an impl header,
/// including implicit lifetimes from `impl_header_lifetime_elision`.
- is_collecting_in_band_lifetimes: bool,
+ is_collecting_anonymous_lifetimes: bool,
/// Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.
- /// When `is_collecting_in_band_lifetimes` is true, each lifetime is checked
- /// against this list to see if it is already in-scope, or if a definition
- /// needs to be created for it.
- ///
/// We always store a `normalize_to_macros_2_0()` version of the param-name in this
/// vector.
in_scope_lifetimes: Vec<ParamName>,
task_context: None,
current_item: None,
lifetimes_to_define: Vec::new(),
- is_collecting_in_band_lifetimes: false,
+ is_collecting_anonymous_lifetimes: false,
in_scope_lifetimes: Vec::new(),
allow_try_trait: Some([sym::try_trait_v2][..].into()),
allow_gen_future: Some([sym::gen_future][..].into()),
&mut self,
f: impl FnOnce(&mut Self) -> T,
) -> (Vec<(Span, ParamName)>, T) {
- let was_collecting = std::mem::replace(&mut self.is_collecting_in_band_lifetimes, true);
+ let was_collecting = std::mem::replace(&mut self.is_collecting_anonymous_lifetimes, true);
let len = self.lifetimes_to_define.len();
let res = f(self);
let lifetimes_to_define = self.lifetimes_to_define.split_off(len);
- self.is_collecting_in_band_lifetimes = was_collecting;
+ self.is_collecting_anonymous_lifetimes = was_collecting;
(lifetimes_to_define, res)
}
// that collisions are ok here and this shouldn't
// really show up for end-user.
let (str_name, kind) = match hir_name {
- ParamName::Plain(ident) => (ident.name, hir::LifetimeParamKind::InBand),
+ ParamName::Plain(ident) => (ident.name, hir::LifetimeParamKind::Explicit),
ParamName::Fresh(_) => (kw::UnderscoreLifetime, hir::LifetimeParamKind::Elided),
ParamName::Error => (kw::UnderscoreLifetime, hir::LifetimeParamKind::Error),
};
}
}
- /// When there is a reference to some lifetime `'a`, and in-band
- /// lifetimes are enabled, then we want to push that lifetime into
- /// the vector of names to define later. In that case, it will get
- /// added to the appropriate generics.
- fn maybe_collect_in_band_lifetime(&mut self, ident: Ident) {
- if !self.is_collecting_in_band_lifetimes {
- return;
- }
-
- if !self.sess.features_untracked().in_band_lifetimes {
- return;
- }
-
- if self.in_scope_lifetimes.contains(&ParamName::Plain(ident.normalize_to_macros_2_0())) {
- return;
- }
-
- let hir_name = ParamName::Plain(ident);
-
- if self.lifetimes_to_define.iter().any(|(_, lt_name)| {
- lt_name.normalize_to_macros_2_0() == hir_name.normalize_to_macros_2_0()
- }) {
- return;
- }
-
- self.lifetimes_to_define.push((ident.span, hir_name));
- }
-
/// When we have either an elided or `'_` lifetime in an impl
/// header, we convert it to an in-band lifetime.
- fn collect_fresh_in_band_lifetime(&mut self, span: Span) -> ParamName {
- assert!(self.is_collecting_in_band_lifetimes);
+ fn collect_fresh_anonymous_lifetime(&mut self, span: Span) -> ParamName {
+ assert!(self.is_collecting_anonymous_lifetimes);
let index = self.lifetimes_to_define.len() + self.in_scope_lifetimes.len();
let hir_name = ParamName::Fresh(index);
self.lifetimes_to_define.push((span, hir_name));
}
ident if ident.name == kw::UnderscoreLifetime => match self.anonymous_lifetime_mode {
AnonymousLifetimeMode::CreateParameter => {
- let fresh_name = self.collect_fresh_in_band_lifetime(span);
+ let fresh_name = self.collect_fresh_anonymous_lifetime(span);
self.new_named_lifetime(l.id, span, hir::LifetimeName::Param(fresh_name))
}
AnonymousLifetimeMode::ReportError => self.new_error_lifetime(Some(l.id), span),
},
ident => {
- self.maybe_collect_in_band_lifetime(ident);
let param_name = ParamName::Plain(self.lower_ident(ident));
self.new_named_lifetime(l.id, span, hir::LifetimeName::Param(param_name))
}
let (name, kind) = match param.kind {
GenericParamKind::Lifetime => {
- let was_collecting_in_band = self.is_collecting_in_band_lifetimes;
- self.is_collecting_in_band_lifetimes = false;
+ let was_collecting_in_band = self.is_collecting_anonymous_lifetimes;
+ self.is_collecting_anonymous_lifetimes = false;
let lt = self
.with_anonymous_lifetime_mode(AnonymousLifetimeMode::ReportError, |this| {
let kind =
hir::GenericParamKind::Lifetime { kind: hir::LifetimeParamKind::Explicit };
- self.is_collecting_in_band_lifetimes = was_collecting_in_band;
+ self.is_collecting_anonymous_lifetimes = was_collecting_in_band;
(param_name, kind)
}
// Hence `impl Foo for &u32` becomes `impl<'f> Foo for &'f u32` for some fresh
// `'f`.
AnonymousLifetimeMode::CreateParameter => {
- let fresh_name = self.collect_fresh_in_band_lifetime(span);
+ let fresh_name = self.collect_fresh_anonymous_lifetime(span);
hir::Lifetime {
hir_id: self.next_id(),
span: self.lower_span(span),
#![feature(box_patterns)]
#![feature(let_else)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
pub mod ast_validation;
pub mod feature_gate;
#![feature(trusted_step)]
#![feature(try_blocks)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_middle;
move_data,
elements,
upvars,
+ use_polonius,
);
if let Some(all_facts) = &mut all_facts {
flow_inits: &mut ResultsCursor<'mir, 'tcx, MaybeInitializedPlaces<'mir, 'tcx>>,
move_data: &MoveData<'tcx>,
location_table: &LocationTable,
+ use_polonius: bool,
) {
debug!("liveness::generate");
&typeck.borrowck_context.constraints.outlives_constraints,
);
let live_locals = compute_live_locals(typeck.tcx(), &free_regions, &body);
- let facts_enabled = AllFacts::enabled(typeck.tcx());
+ let facts_enabled = use_polonius || AllFacts::enabled(typeck.tcx());
let polonius_drop_used = if facts_enabled {
let mut drop_used = Vec::new();
move_data: &MoveData<'tcx>,
elements: &Rc<RegionValueElements>,
upvars: &[Upvar<'tcx>],
+ use_polonius: bool,
) -> MirTypeckResults<'tcx> {
let implicit_region_bound = infcx.tcx.mk_region(ty::ReVar(universal_regions.fr_fn_body));
let mut universe_causes = FxHashMap::default();
&mut borrowck_context,
|mut cx| {
cx.equate_inputs_and_outputs(&body, universal_regions, &normalized_inputs_and_output);
- liveness::generate(&mut cx, body, elements, flow_inits, move_data, location_table);
+ liveness::generate(
+ &mut cx,
+ body,
+ elements,
+ flow_inits,
+ move_data,
+ location_table,
+ use_polonius,
+ );
translate_outlives_facts(&mut cx);
let opaque_type_values = mem::take(&mut infcx.inner.borrow_mut().opaque_types);
#![feature(proc_macro_internals)]
#![feature(proc_macro_quote)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
extern crate proc_macro;
"ignore",
cx.expr_bool(sp, should_ignore(&cx.sess, &item)),
),
+ // ignore_message: Some("...") | None
+ field(
+ "ignore_message",
+ if let Some(msg) = should_ignore_message(cx, &item) {
+ cx.expr_some(sp, cx.expr_str(sp, msg))
+ } else {
+ cx.expr_none(sp)
+ },
+ ),
// compile_fail: true | false
field("compile_fail", cx.expr_bool(sp, false)),
// no_run: true | false
sess.contains_name(&i.attrs, sym::ignore)
}
+fn should_ignore_message(cx: &ExtCtxt<'_>, i: &ast::Item) -> Option<Symbol> {
+ match cx.sess.find_by_name(&i.attrs, sym::ignore) {
+ Some(attr) => {
+ match attr.meta_item_list() {
+ // Handle #[ignore(bar = "foo")]
+ Some(_) => None,
+ // Handle #[ignore] and #[ignore = "message"]
+ None => attr.value_str(),
+ }
+ }
+ None => None,
+ }
+}
+
fn should_panic(cx: &ExtCtxt<'_>, i: &ast::Item) -> ShouldPanic {
match cx.sess.find_by_name(&i.attrs, sym::should_panic) {
Some(attr) => {
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
rustc_llvm = { path = "../rustc_llvm" }
+rustc_macros = { path = "../rustc_macros" }
rustc_metadata = { path = "../rustc_metadata" }
rustc_query_system = { path = "../rustc_query_system" }
rustc_session = { path = "../rustc_session" }
use crate::common::CodegenCx;
use crate::debuginfo;
use crate::llvm::{self, True};
+use crate::llvm_util;
use crate::type_::Type;
use crate::type_of::LayoutLlvmExt;
use crate::value::Value;
alloc: &'a Allocation,
range: Range<usize>,
) {
- let mut chunks = alloc
+ let chunks = alloc
.init_mask()
.range_as_init_chunks(Size::from_bytes(range.start), Size::from_bytes(range.end));
}
};
- // Generating partially-uninit consts inhibits optimizations, so it is disabled by default.
- // See https://github.com/rust-lang/rust/issues/84565.
- let allow_partially_uninit =
- match cx.sess().opts.debugging_opts.partially_uninit_const_threshold {
- Some(max) => range.len() <= max,
- None => false,
- };
+ // Generating partially-uninit consts is limited to small numbers of chunks,
+ // to avoid the cost of generating large complex const expressions.
+ // For example, `[(u32, u8); 1024 * 1024]` contains uninit padding in each element,
+ // and would result in `{ [5 x i8] zeroinitializer, [3 x i8] undef, ...repeat 1M times... }`.
+ let max = if llvm_util::get_version() < (14, 0, 0) {
+ // Generating partially-uninit consts inhibits optimizations in LLVM < 14.
+ // See https://github.com/rust-lang/rust/issues/84565.
+ 1
+ } else {
+ cx.sess().opts.debugging_opts.uninit_const_chunk_threshold
+ };
+ let allow_uninit_chunks = chunks.clone().take(max.saturating_add(1)).count() <= max;
- if allow_partially_uninit {
+ if allow_uninit_chunks {
llvals.extend(chunks.map(chunk_to_llval));
} else {
- let llval = match (chunks.next(), chunks.next()) {
- (Some(chunk), None) => {
- // exactly one chunk, either fully init or fully uninit
- chunk_to_llval(chunk)
- }
- _ => {
- // partially uninit, codegen as if it was initialized
- // (using some arbitrary value for uninit bytes)
- let bytes = alloc.inspect_with_uninit_and_ptr_outside_interpreter(range);
- cx.const_bytes(bytes)
- }
- };
- llvals.push(llval);
+ // If this allocation contains any uninit bytes, codegen as if it was initialized
+ // (using some arbitrary value for uninit bytes).
+ let bytes = alloc.inspect_with_uninit_and_ptr_outside_interpreter(range);
+ llvals.push(cx.const_bytes(bytes));
}
}
use rustc_codegen_ssa::debuginfo::type_names::cpp_like_debuginfo;
use rustc_codegen_ssa::debuginfo::type_names::VTableNameKind;
use rustc_codegen_ssa::traits::*;
-use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::FxHashMap;
-use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_fs_util::path_to_c_string;
use rustc_hir::def::CtorKind;
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_middle::ty::{
self, AdtKind, GeneratorSubsts, Instance, ParamEnv, Ty, TyCtxt, COMMON_VTABLE_ENTRIES,
};
-use rustc_query_system::ich::NodeIdHashingMode;
use rustc_session::config::{self, DebugInfo};
use rustc_span::symbol::Symbol;
use rustc_span::FileNameDisplayPreference;
use rustc_target::abi::{Abi, Align, HasDataLayout, Integer, TagEncoding};
use rustc_target::abi::{Int, Pointer, F32, F64};
use rustc_target::abi::{Primitive, Size, VariantIdx, Variants};
+use smallvec::SmallVec;
use tracing::debug;
use libc::{c_longlong, c_uint};
+use std::cell::RefCell;
use std::collections::hash_map::Entry;
use std::fmt::{self, Write};
use std::hash::{Hash, Hasher};
pub const NO_SCOPE_METADATA: Option<&DIScope> = None;
mod unique_type_id {
- use super::*;
- use rustc_arena::DroplessArena;
-
- #[derive(Copy, Hash, Eq, PartialEq, Clone)]
- pub(super) struct UniqueTypeId(u32);
+ use rustc_data_structures::{
+ fingerprint::Fingerprint,
+ stable_hasher::{HashStable, NodeIdHashingMode, StableHasher},
+ };
+ use rustc_middle::ty::{ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt};
+ use rustc_target::abi::VariantIdx;
+
+ // This type cannot be constructed outside of this module because
+ // it has a private field. We make use of this in order to prevent
+ // `UniqueTypeId` from being constructed directly, without asserting
+ // the preconditions.
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, HashStable)]
+ pub struct HiddenZst {
+ _inaccessible: (),
+ }
- // The `&'static str`s in this type actually point into the arena.
- //
- // The `FxHashMap`+`Vec` pair could be replaced by `FxIndexSet`, but #75278
- // found that to regress performance up to 2% in some cases. This might be
- // revisited after further improvements to `indexmap`.
- #[derive(Default)]
- pub(super) struct TypeIdInterner {
- arena: DroplessArena,
- names: FxHashMap<&'static str, UniqueTypeId>,
- strings: Vec<&'static str>,
+ /// A unique identifier for anything that we create a debuginfo node for.
+ /// The types it contains are expected to already be normalized (which
+ /// is debug_asserted in the constructors).
+ ///
+ /// Note that there are some things that only show up in debuginfo, like
+ /// the separate type descriptions for each enum variant. These get an ID
+ /// too because they have their own debuginfo node in LLVM IR.
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, HashStable)]
+ pub(super) enum UniqueTypeId<'tcx> {
+ /// The ID of a regular type as it shows up at the language level.
+ Ty(Ty<'tcx>, HiddenZst),
+ /// The ID for the artificial struct type describing a single enum variant.
+ Variant(Ty<'tcx>, VariantIdx, HiddenZst),
+ /// The ID for the single DW_TAG_variant_part nested inside the top-level
+ /// DW_TAG_structure_type that describes enums and generators.
+ VariantPart(Ty<'tcx>, HiddenZst),
+ /// The ID of the artificial type we create for VTables.
+ VTableTy(Ty<'tcx>, Option<PolyExistentialTraitRef<'tcx>>, HiddenZst),
}
- impl TypeIdInterner {
- #[inline]
- pub(super) fn intern(&mut self, string: &str) -> UniqueTypeId {
- if let Some(&name) = self.names.get(string) {
- return name;
- }
+ impl<'tcx> UniqueTypeId<'tcx> {
+ pub fn for_ty(tcx: TyCtxt<'tcx>, t: Ty<'tcx>) -> Self {
+ debug_assert_eq!(t, tcx.normalize_erasing_regions(ParamEnv::reveal_all(), t));
+ UniqueTypeId::Ty(t, HiddenZst { _inaccessible: () })
+ }
+
+ pub fn for_enum_variant(
+ tcx: TyCtxt<'tcx>,
+ enum_ty: Ty<'tcx>,
+ variant_idx: VariantIdx,
+ ) -> Self {
+ debug_assert_eq!(
+ enum_ty,
+ tcx.normalize_erasing_regions(ParamEnv::reveal_all(), enum_ty)
+ );
+ UniqueTypeId::Variant(enum_ty, variant_idx, HiddenZst { _inaccessible: () })
+ }
- let name = UniqueTypeId(self.strings.len() as u32);
-
- // `from_utf8_unchecked` is safe since we just allocated a `&str` which is known to be
- // UTF-8.
- let string: &str =
- unsafe { std::str::from_utf8_unchecked(self.arena.alloc_slice(string.as_bytes())) };
- // It is safe to extend the arena allocation to `'static` because we only access
- // these while the arena is still alive.
- let string: &'static str = unsafe { &*(string as *const str) };
- self.strings.push(string);
- self.names.insert(string, name);
- name
+ pub fn for_enum_variant_part(tcx: TyCtxt<'tcx>, enum_ty: Ty<'tcx>) -> Self {
+ debug_assert_eq!(
+ enum_ty,
+ tcx.normalize_erasing_regions(ParamEnv::reveal_all(), enum_ty)
+ );
+ UniqueTypeId::VariantPart(enum_ty, HiddenZst { _inaccessible: () })
}
- // Get the symbol as a string. `Symbol::as_str()` should be used in
- // preference to this function.
- pub(super) fn get(&self, symbol: UniqueTypeId) -> &str {
- self.strings[symbol.0 as usize]
+ pub fn for_vtable_ty(
+ tcx: TyCtxt<'tcx>,
+ self_type: Ty<'tcx>,
+ implemented_trait: Option<PolyExistentialTraitRef<'tcx>>,
+ ) -> Self {
+ debug_assert_eq!(
+ self_type,
+ tcx.normalize_erasing_regions(ParamEnv::reveal_all(), self_type)
+ );
+ debug_assert_eq!(
+ implemented_trait,
+ tcx.normalize_erasing_regions(ParamEnv::reveal_all(), implemented_trait)
+ );
+ UniqueTypeId::VTableTy(self_type, implemented_trait, HiddenZst { _inaccessible: () })
+ }
+
+ /// Generates a string version of this [UniqueTypeId], which can be used as the `UniqueId`
+ /// argument of the various `LLVMRustDIBuilderCreate*Type()` methods.
+ ///
+ /// Right now this takes the form of a hex-encoded opaque hash value.
+ pub fn generate_unique_id_string(&self, tcx: TyCtxt<'tcx>) -> String {
+ let mut hasher = StableHasher::new();
+ let mut hcx = tcx.create_stable_hashing_context();
+ hcx.while_hashing_spans(false, |hcx| {
+ hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
+ self.hash_stable(hcx, &mut hasher);
+ });
+ });
+ hasher.finish::<Fingerprint>().to_hex()
}
}
}
use unique_type_id::*;
-/// The `TypeMap` is where the `CrateDebugContext` holds the type metadata nodes
-/// created so far. The metadata nodes are indexed by `UniqueTypeId`, and, for
-/// faster lookup, also by `Ty`. The `TypeMap` is responsible for creating
-/// `UniqueTypeId`s.
+/// The `TypeMap` is where the debug context holds the type metadata nodes
+/// created so far. The metadata nodes are indexed by `UniqueTypeId`.
#[derive(Default)]
pub struct TypeMap<'ll, 'tcx> {
- /// The `UniqueTypeId`s created so far.
- unique_id_interner: TypeIdInterner,
- /// A map from `UniqueTypeId` to debuginfo metadata for that type. This is a 1:1 mapping.
- unique_id_to_metadata: FxHashMap<UniqueTypeId, &'ll DIType>,
- /// A map from types to debuginfo metadata. This is an N:1 mapping.
- type_to_metadata: FxHashMap<Ty<'tcx>, &'ll DIType>,
- /// A map from types to `UniqueTypeId`. This is an N:1 mapping.
- type_to_unique_id: FxHashMap<Ty<'tcx>, UniqueTypeId>,
+ unique_id_to_metadata: RefCell<FxHashMap<UniqueTypeId<'tcx>, &'ll DIType>>,
}
impl<'ll, 'tcx> TypeMap<'ll, 'tcx> {
- /// Adds a Ty to metadata mapping to the TypeMap. The method will fail if
- /// the mapping already exists.
- fn register_type_with_metadata(&mut self, type_: Ty<'tcx>, metadata: &'ll DIType) {
- if self.type_to_metadata.insert(type_, metadata).is_some() {
- bug!("type metadata for `Ty` '{}' is already in the `TypeMap`!", type_);
- }
- }
-
- /// Removes a `Ty`-to-metadata mapping.
- /// This is useful when computing the metadata for a potentially
- /// recursive type (e.g., a function pointer of the form:
- ///
- /// fn foo() -> impl Copy { foo }
- ///
- /// This kind of type cannot be properly represented
- /// via LLVM debuginfo. As a workaround,
- /// we register a temporary Ty to metadata mapping
- /// for the function before we compute its actual metadata.
- /// If the metadata computation ends up recursing back to the
- /// original function, it will use the temporary mapping
- /// for the inner self-reference, preventing us from
- /// recursing forever.
- ///
- /// This function is used to remove the temporary metadata
- /// mapping after we've computed the actual metadata.
- fn remove_type(&mut self, ty: Ty<'tcx>) {
- if self.type_to_metadata.remove(&ty).is_none() {
- bug!("type metadata `Ty` '{}' is not in the `TypeMap`!", ty);
- }
- }
-
/// Adds a `UniqueTypeId` to metadata mapping to the `TypeMap`. The method will
/// fail if the mapping already exists.
fn register_unique_id_with_metadata(
- &mut self,
- unique_type_id: UniqueTypeId,
+ &self,
+ unique_type_id: UniqueTypeId<'tcx>,
metadata: &'ll DIType,
) {
- if self.unique_id_to_metadata.insert(unique_type_id, metadata).is_some() {
- bug!(
- "type metadata for unique ID '{}' is already in the `TypeMap`!",
- self.get_unique_type_id_as_string(unique_type_id)
- );
+ if self.unique_id_to_metadata.borrow_mut().insert(unique_type_id, metadata).is_some() {
+ bug!("type metadata for unique ID '{:?}' is already in the `TypeMap`!", unique_type_id);
}
}
- fn find_metadata_for_type(&self, type_: Ty<'tcx>) -> Option<&'ll DIType> {
- self.type_to_metadata.get(&type_).cloned()
- }
-
- fn find_metadata_for_unique_id(&self, unique_type_id: UniqueTypeId) -> Option<&'ll DIType> {
- self.unique_id_to_metadata.get(&unique_type_id).cloned()
- }
-
- /// Gets the string representation of a `UniqueTypeId`. This method will fail if
- /// the ID is unknown.
- fn get_unique_type_id_as_string(&self, unique_type_id: UniqueTypeId) -> &str {
- self.unique_id_interner.get(unique_type_id)
- }
-
- /// Gets the `UniqueTypeId` for the given type. If the `UniqueTypeId` for the given
- /// type has been requested before, this is just a table lookup. Otherwise, an
- /// ID will be generated and stored for later lookup.
- fn get_unique_type_id_of_type<'a>(
- &mut self,
- cx: &CodegenCx<'a, 'tcx>,
- type_: Ty<'tcx>,
- ) -> UniqueTypeId {
- // Let's see if we already have something in the cache.
- if let Some(unique_type_id) = self.type_to_unique_id.get(&type_).cloned() {
- return unique_type_id;
- }
- // If not, generate one.
-
- // The hasher we are using to generate the UniqueTypeId. We want
- // something that provides more than the 64 bits of the DefaultHasher.
- let mut hasher = StableHasher::new();
- let mut hcx = cx.tcx.create_stable_hashing_context();
- let type_ = cx.tcx.erase_regions(type_);
- hcx.while_hashing_spans(false, |hcx| {
- hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
- type_.hash_stable(hcx, &mut hasher);
- });
- });
- let unique_type_id = hasher.finish::<Fingerprint>().to_hex();
-
- let key = self.unique_id_interner.intern(&unique_type_id);
- self.type_to_unique_id.insert(type_, key);
-
- key
- }
-
- /// Gets the `UniqueTypeId` for an enum variant. Enum variants are not really
- /// types of their own, so they need special handling. We still need a
- /// `UniqueTypeId` for them, since to debuginfo they *are* real types.
- fn get_unique_type_id_of_enum_variant<'a>(
- &mut self,
- cx: &CodegenCx<'a, 'tcx>,
- enum_type: Ty<'tcx>,
- variant_name: &str,
- ) -> UniqueTypeId {
- let enum_type_id = self.get_unique_type_id_of_type(cx, enum_type);
- let enum_variant_type_id =
- format!("{}::{}", self.get_unique_type_id_as_string(enum_type_id), variant_name);
- let interner_key = self.unique_id_interner.intern(&enum_variant_type_id);
- interner_key
- }
-
- /// Gets the unique type ID string for an enum variant part.
- /// Variant parts are not types and shouldn't really have their own ID,
- /// but it makes `set_members_of_composite_type()` simpler.
- fn get_unique_type_id_str_of_enum_variant_part(
- &mut self,
- enum_type_id: UniqueTypeId,
- ) -> String {
- format!("{}_variant_part", self.get_unique_type_id_as_string(enum_type_id))
- }
-
- /// Gets the `UniqueTypeId` for the type of a vtable.
- fn get_unique_type_id_of_vtable_type(&mut self, vtable_type_name: &str) -> UniqueTypeId {
- let interner_key = self.unique_id_interner.intern(vtable_type_name);
- interner_key
+ fn find_metadata_for_unique_id(
+ &self,
+ unique_type_id: UniqueTypeId<'tcx>,
+ ) -> Option<&'ll DIType> {
+ self.unique_id_to_metadata.borrow().get(&unique_type_id).cloned()
}
}
enum RecursiveTypeDescription<'ll, 'tcx> {
UnfinishedMetadata {
unfinished_type: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
metadata_stub: &'ll DICompositeType,
member_holding_stub: &'ll DICompositeType,
member_description_factory: MemberDescriptionFactory<'ll, 'tcx>,
fn create_and_register_recursive_type_forward_declaration<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
unfinished_type: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
metadata_stub: &'ll DICompositeType,
member_holding_stub: &'ll DICompositeType,
member_description_factory: MemberDescriptionFactory<'ll, 'tcx>,
) -> RecursiveTypeDescription<'ll, 'tcx> {
// Insert the stub into the `TypeMap` in order to allow for recursive references.
- let mut type_map = debug_context(cx).type_map.borrow_mut();
- type_map.register_unique_id_with_metadata(unique_type_id, metadata_stub);
- type_map.register_type_with_metadata(unfinished_type, metadata_stub);
+ debug_context(cx).type_map.register_unique_id_with_metadata(unique_type_id, metadata_stub);
UnfinishedMetadata {
unfinished_type,
// `create_and_register_recursive_type_forward_declaration()`
// function.
{
- let type_map = debug_context(cx).type_map.borrow();
- if type_map.find_metadata_for_unique_id(unique_type_id).is_none()
- || type_map.find_metadata_for_type(unfinished_type).is_none()
+ if debug_context(cx)
+ .type_map
+ .find_metadata_for_unique_id(unique_type_id)
+ .is_none()
{
bug!(
"Forward declaration of potentially recursive type \
macro_rules! return_if_metadata_created_in_meantime {
($cx: expr, $unique_type_id: expr) => {
if let Some(metadata) =
- debug_context($cx).type_map.borrow().find_metadata_for_unique_id($unique_type_id)
+ debug_context($cx).type_map.find_metadata_for_unique_id($unique_type_id)
{
return MetadataCreationResult::new(metadata, true);
}
/// For slices (that is, "arrays" of unknown size) use [slice_type_metadata].
fn fixed_size_array_metadata<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
array_type: Ty<'tcx>,
) -> MetadataCreationResult<'ll> {
let ty::Array(element_type, len) = array_type.kind() else {
cx: &CodegenCx<'ll, 'tcx>,
ptr_type: Ty<'tcx>,
pointee_type: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
) -> MetadataCreationResult<'ll> {
let pointee_type_metadata = type_metadata(cx, pointee_type);
fn subroutine_type_metadata<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
- unique_type_id: UniqueTypeId,
- signature: ty::PolyFnSig<'tcx>,
+ unique_type_id: UniqueTypeId<'tcx>,
) -> MetadataCreationResult<'ll> {
- let signature =
- cx.tcx.normalize_erasing_late_bound_regions(ty::ParamEnv::reveal_all(), signature);
+ // It's possible to create a self-referential
+ // type in Rust by using 'impl trait':
+ //
+ // fn foo() -> impl Copy { foo }
+ //
+ // Unfortunately LLVM's API does not allow us to create recursive subroutine types.
+ // In order to work around that restriction we place a marker type in the type map,
+ // before creating the actual type. If the actual type is recursive, it will hit the
+ // marker type. So we end up with a type that looks like
+ //
+ // fn foo() -> <recursive_type>
+ //
+ // Once that is created, we replace the marker in the typemap with the actual type.
+ debug_context(cx)
+ .type_map
+ .unique_id_to_metadata
+ .borrow_mut()
+ .insert(unique_type_id, recursion_marker_type(cx));
+
+ let UniqueTypeId::Ty(fn_ty, _) = unique_type_id else {
+ bug!("subroutine_type_metadata() called with unexpected input type: {:?}", unique_type_id)
+ };
- let signature_metadata: Vec<_> = iter::once(
+ let signature = cx
+ .tcx
+ .normalize_erasing_late_bound_regions(ty::ParamEnv::reveal_all(), fn_ty.fn_sig(cx.tcx));
+
+ let signature_metadata: SmallVec<[_; 32]> = iter::once(
// return type
match signature.output().kind() {
- ty::Tuple(tys) if tys.is_empty() => None,
+ ty::Tuple(tys) if tys.is_empty() => {
+ // this is a "void" function
+ None
+ }
_ => Some(type_metadata(cx, signature.output())),
},
)
)
.collect();
- return_if_metadata_created_in_meantime!(cx, unique_type_id);
+ debug_context(cx).type_map.unique_id_to_metadata.borrow_mut().remove(&unique_type_id);
- MetadataCreationResult::new(
- unsafe {
- llvm::LLVMRustDIBuilderCreateSubroutineType(
- DIB(cx),
- create_DIArray(DIB(cx), &signature_metadata[..]),
- )
- },
- false,
- )
+ let fn_metadata = unsafe {
+ llvm::LLVMRustDIBuilderCreateSubroutineType(
+ DIB(cx),
+ create_DIArray(DIB(cx), &signature_metadata[..]),
+ )
+ };
+
+ // This is actually a function pointer, so wrap it in pointer DI.
+ let name = compute_debuginfo_type_name(cx.tcx, fn_ty, false);
+ let metadata = unsafe {
+ llvm::LLVMRustDIBuilderCreatePointerType(
+ DIB(cx),
+ fn_metadata,
+ cx.tcx.data_layout.pointer_size.bits(),
+ cx.tcx.data_layout.pointer_align.abi.bits() as u32,
+ 0, // Ignore DWARF address space.
+ name.as_ptr().cast(),
+ name.len(),
+ )
+ };
+
+ MetadataCreationResult::new(metadata, false)
}
/// Create debuginfo for `dyn SomeTrait` types. Currently these are empty structs
fn dyn_type_metadata<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
dyn_type: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
) -> &'ll DIType {
if let ty::Dynamic(..) = dyn_type.kind() {
let type_name = compute_debuginfo_type_name(cx.tcx, dyn_type, true);
fn slice_type_metadata<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
slice_type: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
) -> MetadataCreationResult<'ll> {
let element_type = match slice_type.kind() {
ty::Slice(element_type) => *element_type,
}
pub fn type_metadata<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll DIType {
- // Get the unique type ID of this type.
- let unique_type_id = {
- let mut type_map = debug_context(cx).type_map.borrow_mut();
- // First, try to find the type in `TypeMap`. If we have seen it before, we
- // can exit early here.
- match type_map.find_metadata_for_type(t) {
- Some(metadata) => {
- return metadata;
- }
- None => {
- // The Ty is not in the `TypeMap` but maybe we have already seen
- // an equivalent type (e.g., only differing in region arguments).
- // In order to find out, generate the unique type ID and look
- // that up.
- let unique_type_id = type_map.get_unique_type_id_of_type(cx, t);
- match type_map.find_metadata_for_unique_id(unique_type_id) {
- Some(metadata) => {
- // There is already an equivalent type in the TypeMap.
- // Register this Ty as an alias in the cache and
- // return the cached metadata.
- type_map.register_type_with_metadata(t, metadata);
- return metadata;
- }
- None => {
- // There really is no type metadata for this type, so
- // proceed by creating it.
- unique_type_id
- }
- }
- }
- }
- };
+ let unique_type_id = UniqueTypeId::for_ty(cx.tcx, t);
+
+ if let Some(metadata) = debug_context(cx).type_map.find_metadata_for_unique_id(unique_type_id) {
+ return metadata;
+ }
debug!("type_metadata: {:?}", t);
ty::Adt(def, _) if def.is_box() => {
pointer_or_reference_metadata(cx, t, t.boxed_ty(), unique_type_id)
}
- ty::FnDef(..) | ty::FnPtr(_) => {
- if let Some(metadata) =
- debug_context(cx).type_map.borrow().find_metadata_for_unique_id(unique_type_id)
- {
- return metadata;
- }
-
- // It's possible to create a self-referential
- // type in Rust by using 'impl trait':
- //
- // fn foo() -> impl Copy { foo }
- //
- // See `TypeMap::remove_type` for more detals
- // about the workaround.
-
- let temp_type = {
- unsafe {
- // The choice of type here is pretty arbitrary -
- // anything reading the debuginfo for a recursive
- // type is going to see *something* weird - the only
- // question is what exactly it will see.
- let name = "<recur_type>";
- llvm::LLVMRustDIBuilderCreateBasicType(
- DIB(cx),
- name.as_ptr().cast(),
- name.len(),
- cx.size_of(t).bits(),
- DW_ATE_unsigned,
- )
- }
- };
-
- let type_map = &debug_context(cx).type_map;
- type_map.borrow_mut().register_type_with_metadata(t, temp_type);
-
- let fn_metadata =
- subroutine_type_metadata(cx, unique_type_id, t.fn_sig(cx.tcx)).metadata;
-
- type_map.borrow_mut().remove_type(t);
-
- // This is actually a function pointer, so wrap it in pointer DI.
- let (pointer_size, pointer_align) =
- cx.size_and_align_of(cx.tcx.mk_imm_ptr(cx.tcx.mk_unit()));
- let name = compute_debuginfo_type_name(cx.tcx, t, false);
- let md = unsafe {
- llvm::LLVMRustDIBuilderCreatePointerType(
- DIB(cx),
- fn_metadata,
- pointer_size.bits(),
- pointer_align.bits() as u32,
- 0, // Ignore DWARF address space.
- name.as_ptr().cast(),
- name.len(),
- )
- };
-
- MetadataCreationResult::new(md, false)
- }
+ ty::FnDef(..) | ty::FnPtr(_) => subroutine_type_metadata(cx, unique_type_id),
ty::Closure(def_id, substs) => {
let upvar_tys: Vec<_> = substs.as_closure().upvar_tys().collect();
let containing_scope = get_namespace_for_item(cx, def_id);
};
{
- let mut type_map = debug_context(cx).type_map.borrow_mut();
-
if already_stored_in_typemap {
- // Also make sure that we already have a `TypeMap` entry for the unique type ID.
- let Some(metadata_for_uid) = type_map.find_metadata_for_unique_id(unique_type_id) else {
- bug!(
- "expected type metadata for unique \
- type ID '{}' to already be in \
- the `debuginfo::TypeMap` but it \
- was not. (Ty = {})",
- type_map.get_unique_type_id_as_string(unique_type_id),
- t
- );
- };
-
- match type_map.find_metadata_for_type(t) {
- Some(metadata) => {
- if metadata != metadata_for_uid {
+ // Make sure that we really do have a `TypeMap` entry for the unique type ID.
+ let metadata_for_uid =
+ match debug_context(cx).type_map.find_metadata_for_unique_id(unique_type_id) {
+ Some(metadata) => metadata,
+ None => {
bug!(
- "mismatch between `Ty` and \
- `UniqueTypeId` maps in \
- `debuginfo::TypeMap`. \
- UniqueTypeId={}, Ty={}",
- type_map.get_unique_type_id_as_string(unique_type_id),
- t
+ "expected type metadata for unique \
+ type ID '{:?}' to already be in \
+ the `debuginfo::TypeMap` but it \
+ was not.",
+ unique_type_id,
);
}
- }
- None => {
- type_map.register_type_with_metadata(t, metadata);
- }
- }
+ };
+
+ debug_assert_eq!(metadata_for_uid as *const _, metadata as *const _);
} else {
- type_map.register_type_with_metadata(t, metadata);
- type_map.register_unique_id_with_metadata(unique_type_id, metadata);
+ debug_context(cx).type_map.register_unique_id_with_metadata(unique_type_id, metadata);
}
}
metadata
}
+fn recursion_marker_type<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) -> &'ll DIType {
+ *debug_context(cx).recursion_marker_type.get_or_init(move || {
+ unsafe {
+ // The choice of type here is pretty arbitrary -
+ // anything reading the debuginfo for a recursive
+ // type is going to see *something* weird - the only
+ // question is what exactly it will see.
+ //
+ // FIXME: the name `<recur_type>` does not fit the naming scheme
+ // of other types.
+ //
+ // FIXME: it might make sense to use an actual pointer type here
+ // so that debuggers can show the address.
+ let name = "<recur_type>";
+ llvm::LLVMRustDIBuilderCreateBasicType(
+ DIB(cx),
+ name.as_ptr().cast(),
+ name.len(),
+ cx.tcx.data_layout.pointer_size.bits(),
+ DW_ATE_unsigned,
+ )
+ }
+ })
+}
+
fn hex_encode(data: &[u8]) -> String {
let mut hex_string = String::with_capacity(data.len() * 2);
for byte in data.iter() {
fn foreign_type_metadata<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
t: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
) -> &'ll DIType {
debug!("foreign_type_metadata: {:?}", t);
fn prepare_struct_metadata<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
struct_type: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
) -> RecursiveTypeDescription<'ll, 'tcx> {
let struct_name = compute_debuginfo_type_name(cx.tcx, struct_type, false);
cx: &CodegenCx<'ll, 'tcx>,
tuple_type: Ty<'tcx>,
component_types: &[Ty<'tcx>],
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
containing_scope: Option<&'ll DIScope>,
) -> RecursiveTypeDescription<'ll, 'tcx> {
let (size, align) = cx.size_and_align_of(tuple_type);
fn prepare_union_metadata<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
union_type: Ty<'tcx>,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
) -> RecursiveTypeDescription<'ll, 'tcx> {
let union_name = compute_debuginfo_type_name(cx.tcx, union_type, false);
};
let variant_info_for = |index: VariantIdx| match *self.enum_type.kind() {
- ty::Adt(adt, _) => VariantInfo::Adt(&adt.variants[index]),
+ ty::Adt(adt, _) => VariantInfo::Adt(&adt.variants[index], index),
ty::Generator(def_id, _, _) => {
let (generator_layout, generator_saved_local_names) =
generator_variant_info_data.as_ref().unwrap();
#[derive(Copy, Clone)]
enum VariantInfo<'a, 'tcx> {
- Adt(&'tcx ty::VariantDef),
+ Adt(&'tcx ty::VariantDef, VariantIdx),
Generator {
def_id: DefId,
generator_layout: &'tcx GeneratorLayout<'tcx>,
}
impl<'tcx> VariantInfo<'_, 'tcx> {
+ fn variant_idx(&self) -> VariantIdx {
+ match self {
+ VariantInfo::Adt(_, variant_index) | VariantInfo::Generator { variant_index, .. } => {
+ *variant_index
+ }
+ }
+ }
+
fn map_struct_name<R>(&self, f: impl FnOnce(&str) -> R) -> R {
match self {
- VariantInfo::Adt(variant) => f(variant.name.as_str()),
+ VariantInfo::Adt(variant, _) => f(variant.name.as_str()),
VariantInfo::Generator { variant_index, .. } => {
f(&GeneratorSubsts::variant_name(*variant_index))
}
fn variant_name(&self) -> String {
match self {
- VariantInfo::Adt(variant) => variant.name.to_string(),
+ VariantInfo::Adt(variant, _) => variant.name.to_string(),
VariantInfo::Generator { variant_index, .. } => {
// Since GDB currently prints out the raw discriminant along
// with every variant, make each variant name be just the value
fn field_name(&self, i: usize) -> String {
let field_name = match *self {
- VariantInfo::Adt(variant) if variant.ctor_kind != CtorKind::Fn => {
+ VariantInfo::Adt(variant, _) if variant.ctor_kind != CtorKind::Fn => {
Some(variant.fields[i].name)
}
VariantInfo::Generator {
containing_scope: &'ll DIScope,
) -> (&'ll DICompositeType, MemberDescriptionFactory<'ll, 'tcx>) {
let metadata_stub = variant.map_struct_name(|variant_name| {
- let unique_type_id = debug_context(cx)
- .type_map
- .borrow_mut()
- .get_unique_type_id_of_enum_variant(cx, layout.ty, variant_name);
+ let unique_type_id =
+ UniqueTypeId::for_enum_variant(cx.tcx, layout.ty, variant.variant_idx());
let (size, align) = cx.size_and_align_of(layout.ty);
cx: &CodegenCx<'ll, 'tcx>,
enum_type: Ty<'tcx>,
enum_def_id: DefId,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
outer_field_tys: Vec<Ty<'tcx>>,
) -> RecursiveTypeDescription<'ll, 'tcx> {
let tcx = cx.tcx;
};
let enum_metadata = {
- let type_map = debug_context(cx).type_map.borrow();
- let unique_type_id_str = type_map.get_unique_type_id_as_string(unique_type_id);
+ let unique_type_id_str = unique_type_id.generate_unique_id_string(tcx);
unsafe {
llvm::LLVMRustDIBuilderCreateUnionType(
}
};
- let variant_part_unique_type_id_str = debug_context(cx)
- .type_map
- .borrow_mut()
- .get_unique_type_id_str_of_enum_variant_part(unique_type_id);
+ let variant_part_unique_type_id_str =
+ UniqueTypeId::for_enum_variant_part(tcx, enum_type).generate_unique_id_string(tcx);
+
let empty_array = create_DIArray(DIB(cx), &[]);
let name = "";
let variant_part = unsafe {
// an equivalent layout but offers us much better integration with
// debuggers.
let type_array = create_DIArray(DIB(cx), &[Some(variant_part)]);
-
- let type_map = debug_context(cx).type_map.borrow();
- let unique_type_id_str = type_map.get_unique_type_id_as_string(unique_type_id);
+ let unique_type_id_str = unique_type_id.generate_unique_id_string(tcx);
unsafe {
llvm::LLVMRustDIBuilderCreateStructType(
cx: &CodegenCx<'ll, 'tcx>,
composite_type: Ty<'tcx>,
composite_type_name: &str,
- composite_type_unique_id: UniqueTypeId,
+ composite_type_unique_id: UniqueTypeId<'tcx>,
member_descriptions: Vec<MemberDescription<'ll>>,
containing_scope: Option<&'ll DIScope>,
) -> &'ll DICompositeType {
size: Size,
align: Align,
type_name: &str,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
containing_scope: Option<&'ll DIScope>,
flags: DIFlags,
vtable_holder: Option<&'ll DIType>,
) -> &'ll DICompositeType {
- let type_map = debug_context(cx).type_map.borrow();
- let unique_type_id = type_map.get_unique_type_id_as_string(unique_type_id);
+ let unique_type_id = unique_type_id.generate_unique_id_string(cx.tcx);
let metadata_stub = unsafe {
// `LLVMRustDIBuilderCreateStructType()` wants an empty array. A null
cx: &CodegenCx<'ll, 'tcx>,
union_type: Ty<'tcx>,
union_type_name: &str,
- unique_type_id: UniqueTypeId,
+ unique_type_id: UniqueTypeId<'tcx>,
containing_scope: &'ll DIScope,
) -> &'ll DICompositeType {
let (union_size, union_align) = cx.size_and_align_of(union_type);
-
- let type_map = debug_context(cx).type_map.borrow();
- let unique_type_id = type_map.get_unique_type_id_as_string(unique_type_id);
+ let unique_type_id = unique_type_id.generate_unique_id_string(cx.tcx);
let metadata_stub = unsafe {
// `LLVMRustDIBuilderCreateUnionType()` wants an empty array. A null
let vtable_type_name =
compute_debuginfo_vtable_name(cx.tcx, ty, poly_trait_ref, VTableNameKind::Type);
- let unique_type_id = debug_context(cx)
- .type_map
- .borrow_mut()
- .get_unique_type_id_of_vtable_type(&vtable_type_name);
+ let unique_type_id = UniqueTypeId::for_vtable_ty(tcx, ty, poly_trait_ref);
let size = pointer_size * vtable_entries.len() as u64;
// This gets mapped to a DW_AT_containing_type attribute which allows GDB to correlate
use smallvec::SmallVec;
use std::cell::RefCell;
use std::iter;
+use std::lazy::OnceCell;
use tracing::debug;
mod create_scope_map;
created_files: RefCell<FxHashMap<(Option<String>, Option<String>), &'a DIFile>>,
created_enum_disr_types: RefCell<FxHashMap<(DefId, Primitive), &'a DIType>>,
- type_map: RefCell<TypeMap<'a, 'tcx>>,
+ type_map: TypeMap<'a, 'tcx>,
namespace_map: RefCell<DefIdMap<&'a DIScope>>,
+ recursion_marker_type: OnceCell<&'a DIType>,
+
// This collection is used to assert that composite types (structs, enums,
// ...) have their members only set once:
composite_types_completed: RefCell<FxHashSet<&'a DIType>>,
created_enum_disr_types: Default::default(),
type_map: Default::default(),
namespace_map: RefCell::new(Default::default()),
+ recursion_marker_type: OnceCell::new(),
composite_types_completed: Default::default(),
}
}
#![feature(crate_visibility_modifier)]
#![feature(let_else)]
#![feature(extern_types)]
+#![feature(once_cell)]
#![feature(nll)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
+
+#[macro_use]
+extern crate rustc_macros;
use back::write::{create_informational_target_machine, create_target_machine};
#![feature(nll)]
#![feature(associated_type_bounds)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
//! This crate contains codegen code that is used by all codegen backends (LLVM and others).
//! The backend-agnostic functions of this crate use functions defined in various traits that
// Comparisons of abstract pointers with null pointers are known if the pointer
// is in bounds, because if they are in bounds, the pointer can't be null.
// Inequality with integers other than null can never be known for sure.
- (Scalar::Int(int), Scalar::Ptr(ptr, _)) | (Scalar::Ptr(ptr, _), Scalar::Int(int)) => {
- int.is_null() && !self.memory.ptr_may_be_null(ptr.into())
+ (Scalar::Int(int), ptr @ Scalar::Ptr(..))
+ | (ptr @ Scalar::Ptr(..), Scalar::Int(int)) => {
+ int.is_null() && !self.scalar_may_be_null(ptr)
}
// FIXME: return `true` for at least some comparisons where we can reliably
// determine the result of runtime inequality tests at compile-time.
use rustc_target::abi::{call::FnAbi, Align, HasDataLayout, Size, TargetDataLayout};
use super::{
- AllocId, GlobalId, Immediate, InterpErrorInfo, InterpResult, MPlaceTy, Machine, MemPlace,
- MemPlaceMeta, Memory, MemoryKind, Operand, Place, PlaceTy, Pointer, Provenance, Scalar,
- ScalarMaybeUninit, StackPopJump,
+ AllocCheck, AllocId, GlobalId, Immediate, InterpErrorInfo, InterpResult, MPlaceTy, Machine,
+ MemPlace, MemPlaceMeta, Memory, MemoryKind, Operand, Place, PlaceTy, Pointer, Provenance,
+ Scalar, ScalarMaybeUninit, StackPopJump,
};
use crate::transform::validate::equal_up_to_regions;
self.memory.scalar_to_ptr(scalar)
}
+ /// Test if this value might be null.
+ /// If the machine does not support ptr-to-int casts, this is conservative.
+ pub fn scalar_may_be_null(&self, scalar: Scalar<M::PointerTag>) -> bool {
+ match scalar.try_to_int() {
+ Ok(int) => int.is_null(),
+ Err(_) => {
+ let ptr = self.scalar_to_ptr(scalar);
+ match self.memory.ptr_try_get_alloc(ptr) {
+ Ok((alloc_id, offset, _)) => {
+ let (size, _align) = self
+ .memory
+ .get_size_and_align(alloc_id, AllocCheck::MaybeDead)
+ .expect("alloc info with MaybeDead cannot fail");
+ // If the pointer is out-of-bounds, it may be null.
+ // Note that one-past-the-end (offset == size) is still inbounds, and never null.
+ offset > size
+ }
+ Err(offset) => offset == 0,
+ }
+ }
+ }
+ }
+
/// Call this to turn untagged "global" pointers (obtained via `tcx`) into
/// the machine pointer to the allocation. Must never be used
/// for any other pointers, nor for TLS statics.
}
})
}
-
- /// Test if the pointer might be null.
- pub fn ptr_may_be_null(&self, ptr: Pointer<Option<M::PointerTag>>) -> bool {
- match self.ptr_try_get_alloc(ptr) {
- Ok((alloc_id, offset, _)) => {
- let (size, _align) = self
- .get_size_and_align(alloc_id, AllocCheck::MaybeDead)
- .expect("alloc info with MaybeDead cannot fail");
- // If the pointer is out-of-bounds, it may be null.
- // Note that one-past-the-end (offset == size) is still inbounds, and never null.
- offset > size
- }
- Err(offset) => offset == 0,
- }
- }
}
/// Allocation accessors
Err(dbg_val) => {
// So this is a pointer then, and casting to an int failed.
// Can only happen during CTFE.
- let ptr = self.scalar_to_ptr(tag_val);
// The niche must be just 0, and the ptr not null, then we know this is
// okay. Everything else, we conservatively reject.
let ptr_valid = niche_start == 0
&& variants_start == variants_end
- && !self.memory.ptr_may_be_null(ptr);
+ && !self.scalar_may_be_null(tag_val);
if !ptr_valid {
throw_ub!(InvalidTag(dbg_val))
}
err_unsup!(ReadPointerAsBytes) => { "part of a pointer" } expected { "a proper pointer or integer value" },
err_ub!(InvalidUninitBytes(None)) => { "uninitialized bytes" } expected { "a proper pointer or integer value" },
);
- let ptr = self.ecx.scalar_to_ptr(value);
- // Ensure the pointer is non-null.
- if self.ecx.memory.ptr_may_be_null(ptr) {
- throw_validation_failure!(self.path, { "a potentially null function pointer" });
- }
+
// If we check references recursively, also check that this points to a function.
if let Some(_) = self.ref_tracking {
+ let ptr = self.ecx.scalar_to_ptr(value);
let _fn = try_validation!(
self.ecx.memory.get_fn(ptr),
self.path,
+ err_ub!(DanglingIntPointer(0, _)) =>
+ { "a null function pointer" },
err_ub!(DanglingIntPointer(..)) |
err_ub!(InvalidFunctionPointer(..)) =>
{ "{:x}", value } expected { "a function pointer" },
);
// FIXME: Check if the signature matches
+ } else {
+ // Otherwise (for standalone Miri), we have to still check it to be non-null.
+ if self.ecx.scalar_may_be_null(value) {
+ throw_validation_failure!(self.path, { "a null function pointer" });
+ }
}
Ok(true)
}
Err(_) => {
// So this is a pointer then, and casting to an int failed.
// Can only happen during CTFE.
- let ptr = self.ecx.scalar_to_ptr(value);
if start == 1 && end == max_value {
// Only null is the niche. So make sure the ptr is NOT null.
- if self.ecx.memory.ptr_may_be_null(ptr) {
+ if self.ecx.scalar_may_be_null(value) {
throw_validation_failure!(self.path,
{ "a potentially null pointer" }
expected {
fn visit_value(&mut self, op: &OpTy<'tcx, M::PointerTag>) -> InterpResult<'tcx> {
trace!("visit_value: {:?}, {:?}", *op, op.layout);
- // Check primitive types -- the leafs of our recursive descend.
+ // Check primitive types -- the leaves of our recursive descent.
if self.try_visit_primitive(op)? {
return Ok(());
}
#![feature(trusted_step)]
#![feature(try_blocks)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
/// but you can only construct a `Interned` with `new_unchecked`, and not
/// directly.
#[derive(Debug)]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
pub struct Interned<'a, T>(pub &'a T, pub private::PrivateZst);
impl<'a, T> Interned<'a, T> {
#![feature(vec_into_raw_parts)]
#![allow(rustc::default_hash_types)]
#![deny(unaligned_references)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
#![feature(let_else)]
#![feature(once_cell)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
+#### Note: this error code is no longer emitted by the compiler.
+
In-band lifetimes cannot be used in `fn`/`Fn` syntax.
Erroneous code examples:
-```compile_fail,E0687
+```ignore (feature got removed)
#![feature(in_band_lifetimes)]
fn foo(x: fn(&'a u32)) {} // error!
+#### Note: this error code is no longer emitted by the compiler.
+
In-band lifetimes were mixed with explicit lifetime binders.
Erroneous code example:
-```compile_fail,E0688
+```ignore (feature got removed)
#![feature(in_band_lifetimes)]
fn foo<'a>(x: &'a u32, y: &'b u32) {} // error!
#![feature(if_let_guard)]
#![feature(let_else)]
#![feature(nll)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
#![feature(adt_const_params)]
#![allow(incomplete_features)]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_macros;
self.expr_call_global(sp, some, vec![expr])
}
+ pub fn expr_none(&self, sp: Span) -> P<ast::Expr> {
+ let none = self.std_path(&[sym::option, sym::Option, sym::None]);
+ self.expr_path(self.path_global(sp, none))
+ }
pub fn expr_tuple(&self, sp: Span, exprs: Vec<P<ast::Expr>>) -> P<ast::Expr> {
self.expr(sp, ast::ExprKind::Tup(exprs))
}
#![feature(proc_macro_span)]
#![feature(try_blocks)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_macros;
(active, if_let_guard, "1.47.0", Some(51114), None),
/// Allows using imported `main` function
(active, imported_main, "1.53.0", Some(28937), None),
- /// Allows in-band quantification of lifetime bindings (e.g., `fn foo(x: &'a u8) -> &'a u8`).
- (active, in_band_lifetimes, "1.23.0", Some(44524), None),
/// Allows inferring `'static` outlives requirements (RFC 2093).
(active, infer_static_outlives_requirements, "1.26.0", Some(54185), None),
/// Allows associated types in inherent impls.
(removed, impl_trait_in_bindings, "1.55.0", Some(63065), None,
Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),
(removed, import_shadowing, "1.0.0", None, None, None),
+ /// Allows in-band quantification of lifetime bindings (e.g., `fn foo(x: &'a u8) -> &'a u8`).
+ (removed, in_band_lifetimes, "1.23.0", Some(44524), None,
+ Some("removed due to unsolved ergonomic questions and added lifetime resolution complexity")),
/// Lazily evaluate constants. This allows constants to depend on type parameters.
(removed, lazy_normalization_consts, "1.46.0", Some(72219), None, Some("superseded by `generic_const_exprs`")),
/// Allows using the `#[link_args]` attribute.
// `fn foo<'a>(x: &'a u8) -> &'a u8 { x }`).
Explicit,
- // Indicates that the lifetime definition was synthetically added
- // as a result of an in-band lifetime usage (e.g., in
- // `fn foo(x: &'a u8) -> &'a u8 { x }`).
- InBand,
-
// Indication that the lifetime was elided (e.g., in both cases in
// `fn foo(x: &u8) -> &'_ u8 { x }`).
Elided,
#![feature(let_else)]
#![feature(nll)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_middle;
pub mod interval;
pub mod vec;
+pub use rustc_macros::newtype_index;
+
/// Type size assertion. The first argument is a type and the second argument is its expected size.
#[macro_export]
macro_rules! static_assert_size {
}
}
-/// Creates a struct type `S` that can be used as an index with
-/// `IndexVec` and so on.
-///
-/// There are two ways of interacting with these indices:
-///
-/// - The `From` impls are the preferred way. So you can do
-/// `S::from(v)` with a `usize` or `u32`. And you can convert back
-/// to an integer with `u32::from(s)`.
-///
-/// - Alternatively, you can use the methods `S::new(v)` and `s.index()`
-/// to create/return a value.
-///
-/// Internally, the index uses a u32, so the index must not exceed
-/// `u32::MAX`. You can also customize things like the `Debug` impl,
-/// what traits are derived, and so forth via the macro.
-#[macro_export]
-#[allow_internal_unstable(step_trait, rustc_attrs, trusted_step)]
-macro_rules! newtype_index {
- // ---- public rules ----
-
- // Use default constants
- ($(#[$attrs:meta])* $v:vis struct $name:ident { .. }) => (
- $crate::newtype_index!(
- // Leave out derives marker so we can use its absence to ensure it comes first
- @attrs [$(#[$attrs])*]
- @type [$name]
- // shave off 256 indices at the end to allow space for packing these indices into enums
- @max [0xFFFF_FF00]
- @vis [$v]
- @debug_format ["{}"]);
- );
-
- // Define any constants
- ($(#[$attrs:meta])* $v:vis struct $name:ident { $($tokens:tt)+ }) => (
- $crate::newtype_index!(
- // Leave out derives marker so we can use its absence to ensure it comes first
- @attrs [$(#[$attrs])*]
- @type [$name]
- // shave off 256 indices at the end to allow space for packing these indices into enums
- @max [0xFFFF_FF00]
- @vis [$v]
- @debug_format ["{}"]
- $($tokens)+);
- );
-
- // ---- private rules ----
-
- // Base case, user-defined constants (if any) have already been defined
- (@derives [$($derives:ident,)*]
- @attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]) => (
- $(#[$attrs])*
- #[derive(Copy, PartialEq, Eq, Hash, PartialOrd, Ord, $($derives),*)]
- #[rustc_layout_scalar_valid_range_end($max)]
- $v struct $type {
- private: u32
- }
-
- impl Clone for $type {
- #[inline]
- fn clone(&self) -> Self {
- *self
- }
- }
-
- impl $type {
- /// Maximum value the index can take, as a `u32`.
- $v const MAX_AS_U32: u32 = $max;
-
- /// Maximum value the index can take.
- $v const MAX: Self = Self::from_u32($max);
-
- /// Creates a new index from a given `usize`.
- ///
- /// # Panics
- ///
- /// Will panic if `value` exceeds `MAX`.
- #[inline]
- $v const fn from_usize(value: usize) -> Self {
- assert!(value <= ($max as usize));
- // SAFETY: We just checked that `value <= max`.
- unsafe {
- Self::from_u32_unchecked(value as u32)
- }
- }
-
- /// Creates a new index from a given `u32`.
- ///
- /// # Panics
- ///
- /// Will panic if `value` exceeds `MAX`.
- #[inline]
- $v const fn from_u32(value: u32) -> Self {
- assert!(value <= $max);
- // SAFETY: We just checked that `value <= max`.
- unsafe {
- Self::from_u32_unchecked(value)
- }
- }
-
- /// Creates a new index from a given `u32`.
- ///
- /// # Safety
- ///
- /// The provided value must be less than or equal to the maximum value for the newtype.
- /// Providing a value outside this range is undefined due to layout restrictions.
- ///
- /// Prefer using `from_u32`.
- #[inline]
- $v const unsafe fn from_u32_unchecked(value: u32) -> Self {
- Self { private: value }
- }
-
- /// Extracts the value of this index as a `usize`.
- #[inline]
- $v const fn index(self) -> usize {
- self.as_usize()
- }
-
- /// Extracts the value of this index as a `u32`.
- #[inline]
- $v const fn as_u32(self) -> u32 {
- self.private
- }
-
- /// Extracts the value of this index as a `usize`.
- #[inline]
- $v const fn as_usize(self) -> usize {
- self.as_u32() as usize
- }
- }
-
- impl std::ops::Add<usize> for $type {
- type Output = Self;
-
- fn add(self, other: usize) -> Self {
- Self::from_usize(self.index() + other)
- }
- }
-
- impl $crate::vec::Idx for $type {
- #[inline]
- fn new(value: usize) -> Self {
- Self::from_usize(value)
- }
-
- #[inline]
- fn index(self) -> usize {
- self.as_usize()
- }
- }
-
- impl ::std::iter::Step for $type {
- #[inline]
- fn steps_between(start: &Self, end: &Self) -> Option<usize> {
- <usize as ::std::iter::Step>::steps_between(
- &Self::index(*start),
- &Self::index(*end),
- )
- }
-
- #[inline]
- fn forward_checked(start: Self, u: usize) -> Option<Self> {
- Self::index(start).checked_add(u).map(Self::from_usize)
- }
-
- #[inline]
- fn backward_checked(start: Self, u: usize) -> Option<Self> {
- Self::index(start).checked_sub(u).map(Self::from_usize)
- }
- }
-
- // Safety: The implementation of `Step` upholds all invariants.
- unsafe impl ::std::iter::TrustedStep for $type {}
-
- impl From<$type> for u32 {
- #[inline]
- fn from(v: $type) -> u32 {
- v.as_u32()
- }
- }
-
- impl From<$type> for usize {
- #[inline]
- fn from(v: $type) -> usize {
- v.as_usize()
- }
- }
-
- impl From<usize> for $type {
- #[inline]
- fn from(value: usize) -> Self {
- Self::from_usize(value)
- }
- }
-
- impl From<u32> for $type {
- #[inline]
- fn from(value: u32) -> Self {
- Self::from_u32(value)
- }
- }
-
- $crate::newtype_index!(
- @handle_debug
- @derives [$($derives,)*]
- @type [$type]
- @debug_format [$debug_format]);
- );
-
- // base case for handle_debug where format is custom. No Debug implementation is emitted.
- (@handle_debug
- @derives [$($_derives:ident,)*]
- @type [$type:ident]
- @debug_format [custom]) => ();
-
- // base case for handle_debug, no debug overrides found, so use default
- (@handle_debug
- @derives []
- @type [$type:ident]
- @debug_format [$debug_format:tt]) => (
- impl ::std::fmt::Debug for $type {
- fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- write!(fmt, $debug_format, self.as_u32())
- }
- }
- );
-
- // Debug is requested for derive, don't generate any Debug implementation.
- (@handle_debug
- @derives [Debug, $($derives:ident,)*]
- @type [$type:ident]
- @debug_format [$debug_format:tt]) => ();
-
- // It's not Debug, so just pop it off the front of the derives stack and check the rest.
- (@handle_debug
- @derives [$_derive:ident, $($derives:ident,)*]
- @type [$type:ident]
- @debug_format [$debug_format:tt]) => (
- $crate::newtype_index!(
- @handle_debug
- @derives [$($derives,)*]
- @type [$type]
- @debug_format [$debug_format]);
- );
-
- // Append comma to end of derives list if it's missing
- (@attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- derive [$($derives:ident),*]
- $($tokens:tt)*) => (
- $crate::newtype_index!(
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- derive [$($derives,)*]
- $($tokens)*);
- );
-
- // By not including the @derives marker in this list nor in the default args, we can force it
- // to come first if it exists. When encodable is custom, just use the derives list as-is.
- (@attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- derive [$($derives:ident,)+]
- ENCODABLE = custom
- $($tokens:tt)*) => (
- $crate::newtype_index!(
- @attrs [$(#[$attrs])*]
- @derives [$($derives,)+]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $($tokens)*);
- );
-
- // By not including the @derives marker in this list nor in the default args, we can force it
- // to come first if it exists. When encodable isn't custom, add serialization traits by default.
- (@attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- derive [$($derives:ident,)+]
- $($tokens:tt)*) => (
- $crate::newtype_index!(
- @derives [$($derives,)+]
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $($tokens)*);
- $crate::newtype_index!(@serializable $type);
- );
-
- // The case where no derives are added, but encodable is overridden. Don't
- // derive serialization traits
- (@attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- ENCODABLE = custom
- $($tokens:tt)*) => (
- $crate::newtype_index!(
- @derives []
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $($tokens)*);
- );
-
- // The case where no derives are added, add serialization derives by default
- (@attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- $($tokens:tt)*) => (
- $crate::newtype_index!(
- @derives []
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $($tokens)*);
- $crate::newtype_index!(@serializable $type);
- );
-
- (@serializable $type:ident) => (
- impl<D: ::rustc_serialize::Decoder> ::rustc_serialize::Decodable<D> for $type {
- fn decode(d: &mut D) -> Self {
- Self::from_u32(d.read_u32())
- }
- }
- impl<E: ::rustc_serialize::Encoder> ::rustc_serialize::Encodable<E> for $type {
- fn encode(&self, e: &mut E) -> Result<(), E::Error> {
- e.emit_u32(self.private)
- }
- }
- );
-
- // Rewrite final without comma to one that includes comma
- (@derives [$($derives:ident,)*]
- @attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- $name:ident = $constant:expr) => (
- $crate::newtype_index!(
- @derives [$($derives,)*]
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $name = $constant,);
- );
-
- // Rewrite final const without comma to one that includes comma
- (@derives [$($derives:ident,)*]
- @attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- $(#[doc = $doc:expr])*
- const $name:ident = $constant:expr) => (
- $crate::newtype_index!(
- @derives [$($derives,)*]
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $(#[doc = $doc])* const $name = $constant,);
- );
-
- // Replace existing default for max
- (@derives [$($derives:ident,)*]
- @attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$_max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- MAX = $max:expr,
- $($tokens:tt)*) => (
- $crate::newtype_index!(
- @derives [$($derives,)*]
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $($tokens)*);
- );
-
- // Replace existing default for debug_format
- (@derives [$($derives:ident,)*]
- @attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$_debug_format:tt]
- DEBUG_FORMAT = $debug_format:tt,
- $($tokens:tt)*) => (
- $crate::newtype_index!(
- @derives [$($derives,)*]
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $($tokens)*);
- );
-
- // Assign a user-defined constant
- (@derives [$($derives:ident,)*]
- @attrs [$(#[$attrs:meta])*]
- @type [$type:ident]
- @max [$max:expr]
- @vis [$v:vis]
- @debug_format [$debug_format:tt]
- $(#[doc = $doc:expr])*
- const $name:ident = $constant:expr,
- $($tokens:tt)*) => (
- $(#[doc = $doc])*
- $v const $name: $type = $type::from_u32($constant);
- $crate::newtype_index!(
- @derives [$($derives,)*]
- @attrs [$(#[$attrs])*]
- @type [$type]
- @max [$max]
- @vis [$v]
- @debug_format [$debug_format]
- $($tokens)*);
- );
-}
-
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct IndexVec<I: Idx, T> {
pub raw: Vec<T>,
#![allow(dead_code)]
-newtype_index!(struct MyIdx { MAX = 0xFFFF_FFFA });
+
+// Allows the macro invocation below to work
+use crate as rustc_index;
+
+rustc_macros::newtype_index!(struct MyIdx { MAX = 0xFFFF_FFFA });
#[test]
fn index_size_is_optimized() {
// Find the index of the named region that was part of the
// error. We will then search the function parameters for a bound
// region at the right depth with the same index
- (Some(rl::Region::EarlyBound(_, id, _)), ty::BrNamed(def_id, _)) => {
+ (Some(rl::Region::EarlyBound(_, id)), ty::BrNamed(def_id, _)) => {
debug!("EarlyBound id={:?} def_id={:?}", id, def_id);
if id == def_id {
self.found_type = Some(arg);
// error. We will then search the function parameters for a bound
// region at the right depth with the same index
(
- Some(rl::Region::LateBound(debruijn_index, _, id, _)),
+ Some(rl::Region::LateBound(debruijn_index, _, id)),
ty::BrNamed(def_id, _),
) => {
debug!(
Some(
rl::Region::Static
| rl::Region::Free(_, _)
- | rl::Region::EarlyBound(_, _, _)
- | rl::Region::LateBound(_, _, _, _)
+ | rl::Region::EarlyBound(_, _)
+ | rl::Region::LateBound(_, _, _)
| rl::Region::LateBoundAnon(_, _, _),
)
| None,
}
}
- (Some(rl::Region::EarlyBound(_, id, _)), ty::BrNamed(def_id, _)) => {
+ (Some(rl::Region::EarlyBound(_, id)), ty::BrNamed(def_id, _)) => {
debug!("EarlyBound id={:?} def_id={:?}", id, def_id);
if id == def_id {
self.found_it = true;
}
}
- (Some(rl::Region::LateBound(debruijn_index, _, id, _)), ty::BrNamed(def_id, _)) => {
+ (Some(rl::Region::LateBound(debruijn_index, _, id)), ty::BrNamed(def_id, _)) => {
debug!("FindNestedTypeVisitor::visit_ty: LateBound depth = {:?}", debruijn_index,);
debug!("id={:?}", id);
debug!("def_id={:?}", def_id);
(
Some(
rl::Region::Static
- | rl::Region::EarlyBound(_, _, _)
- | rl::Region::LateBound(_, _, _, _)
+ | rl::Region::EarlyBound(_, _)
+ | rl::Region::LateBound(_, _, _)
| rl::Region::LateBoundAnon(_, _, _)
| rl::Region::Free(_, _),
)
#![feature(min_specialization)]
#![feature(label_break_value)]
#![recursion_limit = "512"] // For rustdoc
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_macros;
#![feature(nll)]
#![feature(once_cell)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
mod callbacks;
pub mod interface;
tracked!(osx_rpath_install_name, true);
tracked!(panic_abort_tests, true);
tracked!(panic_in_drop, PanicStrategy::Abort);
- tracked!(partially_uninit_const_threshold, Some(123));
tracked!(pick_stable_methods_before_any_unstable, false);
tracked!(plt, Some(true));
tracked!(polonius, true);
tracked!(trap_unreachable, Some(false));
tracked!(treat_err_as_bug, NonZeroUsize::new(1));
tracked!(tune_cpu, Some(String::from("abc")));
+ tracked!(uninit_const_chunk_threshold, 123);
tracked!(unleash_the_miri_inside_of_you, true);
tracked!(use_ctors_section, Some(true));
tracked!(verify_llvm_ir, true);
&'t self,
) -> impl Iterator<Item = (&'static str, Vec<LintId>, bool)> + 't {
// This function is not used in a way which observes the order of lints.
- #[cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+ #[allow(rustc::potential_query_instability)]
self.lint_groups
.iter()
.filter(|(_, LintGroup { depr, .. })| {
#![feature(nll)]
#![feature(control_flow_enum)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_middle;
}
ty::Tuple(ref tys) => {
let mut has_emitted = false;
- let spans = if let hir::ExprKind::Tup(comps) = &expr.kind {
+ let comps = if let hir::ExprKind::Tup(comps) = expr.kind {
debug_assert_eq!(comps.len(), tys.len());
- comps.iter().map(|e| e.span).collect()
+ comps
} else {
- vec![]
+ &[]
};
for (i, ty) in tys.iter().enumerate() {
let descr_post = &format!(" in tuple element {}", i);
- let span = *spans.get(i).unwrap_or(&span);
- if check_must_use_ty(cx, ty, expr, span, descr_pre, descr_post, plural_len)
- {
+ let e = comps.get(i).unwrap_or(expr);
+ let span = e.span;
+ if check_must_use_ty(cx, ty, e, span, descr_pre, descr_post, plural_len) {
has_emitted = true;
}
}
#![feature(proc_macro_diagnostic)]
+#![feature(allow_internal_unstable)]
#![allow(rustc::default_hash_types)]
#![recursion_limit = "128"]
mod hash_stable;
mod lift;
+mod newtype;
mod query;
mod serialize;
mod session_diagnostic;
symbols::symbols(input.into()).into()
}
+/// Creates a struct type `S` that can be used as an index with
+/// `IndexVec` and so on.
+///
+/// There are two ways of interacting with these indices:
+///
+/// - The `From` impls are the preferred way. So you can do
+/// `S::from(v)` with a `usize` or `u32`. And you can convert back
+/// to an integer with `u32::from(s)`.
+///
+/// - Alternatively, you can use the methods `S::new(v)` and `s.index()`
+/// to create/return a value.
+///
+/// Internally, the index uses a u32, so the index must not exceed
+/// `u32::MAX`. You can also customize things like the `Debug` impl,
+/// what traits are derived, and so forth via the macro.
+#[proc_macro]
+#[allow_internal_unstable(step_trait, rustc_attrs, trusted_step)]
+pub fn newtype_index(input: TokenStream) -> TokenStream {
+ newtype::newtype(input).into()
+}
+
decl_derive!([HashStable, attributes(stable_hasher)] => hash_stable::hash_stable_derive);
decl_derive!(
[HashStable_Generic, attributes(stable_hasher)] =>
--- /dev/null
+use proc_macro2::{Span, TokenStream};
+use quote::quote;
+use syn::parse::*;
+use syn::punctuated::Punctuated;
+use syn::*;
+
+mod kw {
+ syn::custom_keyword!(derive);
+ syn::custom_keyword!(DEBUG_FORMAT);
+ syn::custom_keyword!(MAX);
+ syn::custom_keyword!(ENCODABLE);
+ syn::custom_keyword!(custom);
+}
+
+#[derive(Debug)]
+enum DebugFormat {
+ // The user will provide a custom `Debug` impl, so we shouldn't generate
+ // one
+ Custom,
+ // Use the specified format string in the generated `Debug` impl
+ // By default, this is "{}"
+ Format(String),
+}
+
+// We parse the input and emit the output in a single step.
+// This field stores the final macro output
+struct Newtype(TokenStream);
+
+impl Parse for Newtype {
+ fn parse(input: ParseStream<'_>) -> Result<Self> {
+ let attrs = input.call(Attribute::parse_outer)?;
+ let vis: Visibility = input.parse()?;
+ input.parse::<Token![struct]>()?;
+ let name: Ident = input.parse()?;
+
+ let body;
+ braced!(body in input);
+
+ // Any additional `#[derive]` macro paths to apply
+ let mut derive_paths: Vec<Path> = Vec::new();
+ let mut debug_format: Option<DebugFormat> = None;
+ let mut max = None;
+ let mut consts = Vec::new();
+ let mut encodable = true;
+
+ // Parse an optional trailing comma
+ let try_comma = || -> Result<()> {
+ if body.lookahead1().peek(Token![,]) {
+ body.parse::<Token![,]>()?;
+ }
+ Ok(())
+ };
+
+ if body.lookahead1().peek(Token![..]) {
+ body.parse::<Token![..]>()?;
+ } else {
+ loop {
+ if body.lookahead1().peek(kw::derive) {
+ body.parse::<kw::derive>()?;
+ let derives;
+ bracketed!(derives in body);
+ let derives: Punctuated<Path, Token![,]> =
+ derives.parse_terminated(Path::parse)?;
+ try_comma()?;
+ derive_paths.extend(derives);
+ continue;
+ }
+ if body.lookahead1().peek(kw::DEBUG_FORMAT) {
+ body.parse::<kw::DEBUG_FORMAT>()?;
+ body.parse::<Token![=]>()?;
+ let new_debug_format = if body.lookahead1().peek(kw::custom) {
+ body.parse::<kw::custom>()?;
+ DebugFormat::Custom
+ } else {
+ let format_str: LitStr = body.parse()?;
+ DebugFormat::Format(format_str.value())
+ };
+ try_comma()?;
+ if let Some(old) = debug_format.replace(new_debug_format) {
+ panic!("Specified multiple debug format options: {:?}", old);
+ }
+ continue;
+ }
+ if body.lookahead1().peek(kw::MAX) {
+ body.parse::<kw::MAX>()?;
+ body.parse::<Token![=]>()?;
+ let val: Lit = body.parse()?;
+ try_comma()?;
+ if let Some(old) = max.replace(val) {
+ panic!("Specified multiple MAX: {:?}", old);
+ }
+ continue;
+ }
+ if body.lookahead1().peek(kw::ENCODABLE) {
+ body.parse::<kw::ENCODABLE>()?;
+ body.parse::<Token![=]>()?;
+ body.parse::<kw::custom>()?;
+ try_comma()?;
+ encodable = false;
+ continue;
+ }
+
+ // We've parsed everything that the user provided, so we're done
+ if body.is_empty() {
+ break;
+ }
+
+ // Otherwise, we are parsng a user-defined constant
+ let const_attrs = body.call(Attribute::parse_outer)?;
+ body.parse::<Token![const]>()?;
+ let const_name: Ident = body.parse()?;
+ body.parse::<Token![=]>()?;
+ let const_val: Expr = body.parse()?;
+ try_comma()?;
+ consts.push(quote! { #(#const_attrs)* #vis const #const_name: #name = #name::from_u32(#const_val); });
+ }
+ }
+
+ let debug_format = debug_format.unwrap_or(DebugFormat::Format("{}".to_string()));
+ // shave off 256 indices at the end to allow space for packing these indices into enums
+ let max = max.unwrap_or_else(|| Lit::Int(LitInt::new("0xFFFF_FF00", Span::call_site())));
+
+ let encodable_impls = if encodable {
+ quote! {
+ impl<D: ::rustc_serialize::Decoder> ::rustc_serialize::Decodable<D> for #name {
+ fn decode(d: &mut D) -> Self {
+ Self::from_u32(d.read_u32())
+ }
+ }
+ impl<E: ::rustc_serialize::Encoder> ::rustc_serialize::Encodable<E> for #name {
+ fn encode(&self, e: &mut E) -> Result<(), E::Error> {
+ e.emit_u32(self.private)
+ }
+ }
+ }
+ } else {
+ quote! {}
+ };
+
+ let debug_impl = match debug_format {
+ DebugFormat::Custom => quote! {},
+ DebugFormat::Format(format) => {
+ quote! {
+ impl ::std::fmt::Debug for #name {
+ fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+ write!(fmt, #format, self.as_u32())
+ }
+ }
+ }
+ }
+ };
+
+ Ok(Self(quote! {
+ #(#attrs)*
+ #[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, #(#derive_paths),*)]
+ #[rustc_layout_scalar_valid_range_end(#max)]
+ #vis struct #name {
+ private: u32,
+ }
+
+ #(#consts)*
+
+ impl #name {
+ /// Maximum value the index can take, as a `u32`.
+ #vis const MAX_AS_U32: u32 = #max;
+
+ /// Maximum value the index can take.
+ #vis const MAX: Self = Self::from_u32(#max);
+
+ /// Creates a new index from a given `usize`.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `value` exceeds `MAX`.
+ #[inline]
+ #vis const fn from_usize(value: usize) -> Self {
+ assert!(value <= (#max as usize));
+ // SAFETY: We just checked that `value <= max`.
+ unsafe {
+ Self::from_u32_unchecked(value as u32)
+ }
+ }
+
+ /// Creates a new index from a given `u32`.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `value` exceeds `MAX`.
+ #[inline]
+ #vis const fn from_u32(value: u32) -> Self {
+ assert!(value <= #max);
+ // SAFETY: We just checked that `value <= max`.
+ unsafe {
+ Self::from_u32_unchecked(value)
+ }
+ }
+
+ /// Creates a new index from a given `u32`.
+ ///
+ /// # Safety
+ ///
+ /// The provided value must be less than or equal to the maximum value for the newtype.
+ /// Providing a value outside this range is undefined due to layout restrictions.
+ ///
+ /// Prefer using `from_u32`.
+ #[inline]
+ #vis const unsafe fn from_u32_unchecked(value: u32) -> Self {
+ Self { private: value }
+ }
+
+ /// Extracts the value of this index as a `usize`.
+ #[inline]
+ #vis const fn index(self) -> usize {
+ self.as_usize()
+ }
+
+ /// Extracts the value of this index as a `u32`.
+ #[inline]
+ #vis const fn as_u32(self) -> u32 {
+ self.private
+ }
+
+ /// Extracts the value of this index as a `usize`.
+ #[inline]
+ #vis const fn as_usize(self) -> usize {
+ self.as_u32() as usize
+ }
+ }
+
+ impl std::ops::Add<usize> for #name {
+ type Output = Self;
+
+ fn add(self, other: usize) -> Self {
+ Self::from_usize(self.index() + other)
+ }
+ }
+
+ impl rustc_index::vec::Idx for #name {
+ #[inline]
+ fn new(value: usize) -> Self {
+ Self::from_usize(value)
+ }
+
+ #[inline]
+ fn index(self) -> usize {
+ self.as_usize()
+ }
+ }
+
+ impl ::std::iter::Step for #name {
+ #[inline]
+ fn steps_between(start: &Self, end: &Self) -> Option<usize> {
+ <usize as ::std::iter::Step>::steps_between(
+ &Self::index(*start),
+ &Self::index(*end),
+ )
+ }
+
+ #[inline]
+ fn forward_checked(start: Self, u: usize) -> Option<Self> {
+ Self::index(start).checked_add(u).map(Self::from_usize)
+ }
+
+ #[inline]
+ fn backward_checked(start: Self, u: usize) -> Option<Self> {
+ Self::index(start).checked_sub(u).map(Self::from_usize)
+ }
+ }
+
+ // Safety: The implementation of `Step` upholds all invariants.
+ unsafe impl ::std::iter::TrustedStep for #name {}
+
+ impl From<#name> for u32 {
+ #[inline]
+ fn from(v: #name) -> u32 {
+ v.as_u32()
+ }
+ }
+
+ impl From<#name> for usize {
+ #[inline]
+ fn from(v: #name) -> usize {
+ v.as_usize()
+ }
+ }
+
+ impl From<usize> for #name {
+ #[inline]
+ fn from(value: usize) -> Self {
+ Self::from_usize(value)
+ }
+ }
+
+ impl From<u32> for #name {
+ #[inline]
+ fn from(value: u32) -> Self {
+ Self::from_u32(value)
+ }
+ }
+
+ #encodable_impls
+ #debug_impl
+ }))
+ }
+}
+
+pub fn newtype(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
+ let input = parse_macro_input!(input as Newtype);
+ input.0.into()
+}
#![feature(try_blocks)]
#![feature(never_type)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
extern crate proc_macro;
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_data_structures::sync::{join, par_iter, Lrc, ParallelIterator};
use rustc_hir as hir;
-use rustc_hir::def::{CtorOf, DefKind};
+use rustc_hir::def::DefKind;
use rustc_hir::def_id::{
CrateNum, DefId, DefIndex, LocalDefId, CRATE_DEF_ID, CRATE_DEF_INDEX, LOCAL_CRATE,
};
let def_id = local_id.to_def_id();
let def_kind = tcx.opt_def_kind(local_id);
let Some(def_kind) = def_kind else { continue };
- record!(self.tables.opt_def_kind[def_id] <- match def_kind {
- // Replace Ctor by the enclosing object to avoid leaking details in children crates.
- DefKind::Ctor(CtorOf::Struct, _) => DefKind::Struct,
- DefKind::Ctor(CtorOf::Variant, _) => DefKind::Variant,
- def_kind => def_kind,
- });
+ record!(self.tables.opt_def_kind[def_id] <- def_kind);
record!(self.tables.def_span[def_id] <- tcx.def_span(def_id));
record!(self.tables.attributes[def_id] <- tcx.get_attrs(def_id));
record!(self.tables.expn_that_defined[def_id] <- self.tcx.expn_that_defined(def_id));
#![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;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_hir::def_id::{DefId, LocalDefId};
-use rustc_hir::{GenericParam, ItemLocalId};
-use rustc_hir::{GenericParamKind, LifetimeParamKind};
+use rustc_hir::ItemLocalId;
use rustc_macros::HashStable;
-/// The origin of a named lifetime definition.
-///
-/// This is used to prevent the usage of in-band lifetimes in `Fn`/`fn` syntax.
-#[derive(Copy, Clone, PartialEq, Eq, Hash, TyEncodable, TyDecodable, Debug, HashStable)]
-pub enum LifetimeDefOrigin {
- // Explicit binders like `fn foo<'a>(x: &'a u8)` or elided like `impl Foo<&u32>`
- ExplicitOrElided,
- // In-band declarations like `fn foo(x: &'a u8)`
- InBand,
- // Some kind of erroneous origin
- Error,
-}
-
-impl LifetimeDefOrigin {
- pub fn from_param(param: &GenericParam<'_>) -> Self {
- match param.kind {
- GenericParamKind::Lifetime { kind } => match kind {
- LifetimeParamKind::InBand => LifetimeDefOrigin::InBand,
- LifetimeParamKind::Explicit => LifetimeDefOrigin::ExplicitOrElided,
- LifetimeParamKind::Elided => LifetimeDefOrigin::ExplicitOrElided,
- LifetimeParamKind::Error => LifetimeDefOrigin::Error,
- },
- _ => bug!("expected a lifetime param"),
- }
- }
-}
-
#[derive(Clone, Copy, PartialEq, Eq, Hash, TyEncodable, TyDecodable, Debug, HashStable)]
pub enum Region {
Static,
- EarlyBound(/* index */ u32, /* lifetime decl */ DefId, LifetimeDefOrigin),
- LateBound(
- ty::DebruijnIndex,
- /* late-bound index */ u32,
- /* lifetime decl */ DefId,
- LifetimeDefOrigin,
- ),
+ EarlyBound(/* index */ u32, /* lifetime decl */ DefId),
+ LateBound(ty::DebruijnIndex, /* late-bound index */ u32, /* lifetime decl */ DefId),
LateBoundAnon(ty::DebruijnIndex, /* late-bound index */ u32, /* anon index */ u32),
Free(DefId, /* lifetime decl */ DefId),
}
}
/// Yields [`InitChunk`]s. See [`InitMask::range_as_init_chunks`].
+#[derive(Clone)]
pub struct InitChunkIter<'a> {
init_mask: &'a InitMask,
/// Whether the next chunk we will return is initialized.
/// rustc can identify that a field projection refers to either two different regions of memory
/// or the same one between the base and the 'projection element'.
/// Read more about projections in the [rustc-dev-guide][mir-datatypes]
+ ///
/// [wrapper]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html#newtype
/// [CFG]: https://rustc-dev-guide.rust-lang.org/appendix/background.html#cfg
/// [mir-datatypes]: https://rustc-dev-guide.rust-lang.org/mir/index.html#mir-data-types
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);
}
}
+ // 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) {
}
/// 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> {
/// [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>,
}
/// 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.
/// 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> {
}
}
ty::Error(_) => p!("[type error]"),
- ty::Param(ref param_ty) => p!(write("{}", param_ty)),
+ ty::Param(ref param_ty) => p!(print(param_ty)),
ty::Bound(debruijn, bound_ty) => match bound_ty.kind {
ty::BoundTyKind::Anon => self.pretty_print_bound_var(debruijn, bound_ty.var)?,
ty::BoundTyKind::Param(p) => p!(write("{}", p)),
} else if let Some(n) = sz.val().try_to_bits(self.tcx().data_layout.pointer_size) {
p!(write("{}", n));
} else if let ty::ConstKind::Param(param) = sz.val() {
- p!(write("{}", param));
+ p!(print(param));
} else {
p!("_");
}
/// 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> {
// a Coverage code region can be generated, `continue` needs no `Assign`; but
// without one, the `InstrumentCoverage` MIR pass cannot generate a code region for
// `continue`. Coverage will be missing unless we add a dummy `Assign` to MIR.
- self.add_dummy_assignment(&span, block, source_info);
+ self.add_dummy_assignment(span, block, source_info);
}
}
// Add a dummy `Assign` statement to the CFG, with the span for the source code's `continue`
// statement.
- fn add_dummy_assignment(&mut self, span: &Span, block: BasicBlock, source_info: SourceInfo) {
- let local_decl = LocalDecl::new(self.tcx.mk_unit(), *span).internal();
+ fn add_dummy_assignment(&mut self, span: Span, block: BasicBlock, source_info: SourceInfo) {
+ let local_decl = LocalDecl::new(self.tcx.mk_unit(), span).internal();
let temp_place = Place::from(self.local_decls.push(local_decl));
self.cfg.push_assign_unit(block, source_info, temp_place, self.tcx);
}
#![feature(once_cell)]
#![feature(min_specialization)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
block: &'mir mir::BasicBlockData<'tcx>,
switch_on: mir::Place<'tcx>,
) -> Option<(mir::Place<'tcx>, &'tcx ty::AdtDef)> {
- match block.statements.last().map(|stmt| &stmt.kind) {
- Some(mir::StatementKind::Assign(box (lhs, mir::Rvalue::Discriminant(discriminated))))
- if *lhs == switch_on =>
- {
- match &discriminated.ty(body, tcx).ty.kind() {
- ty::Adt(def, _) => Some((*discriminated, def)),
-
- // `Rvalue::Discriminant` is also used to get the active yield point for a
- // generator, but we do not need edge-specific effects in that case. This may
- // change in the future.
- ty::Generator(..) => None,
-
- t => bug!("`discriminant` called on unexpected type {:?}", t),
+ for statement in block.statements.iter().rev() {
+ match &statement.kind {
+ mir::StatementKind::Assign(box (lhs, mir::Rvalue::Discriminant(discriminated)))
+ if *lhs == switch_on =>
+ {
+ match &discriminated.ty(body, tcx).ty.kind() {
+ ty::Adt(def, _) => return Some((*discriminated, def)),
+
+ // `Rvalue::Discriminant` is also used to get the active yield point for a
+ // generator, but we do not need edge-specific effects in that case. This may
+ // change in the future.
+ ty::Generator(..) => return None,
+
+ t => bug!("`discriminant` called on unexpected type {:?}", t),
+ }
}
+ mir::StatementKind::Coverage(_) => continue,
+ _ => return None,
}
-
- _ => None,
}
+ None
}
struct OnMutBorrow<F>(F);
}
rustc_index::newtype_index! {
- /// A node in the [control-flow graph][CFG] of CoverageGraph.
+ /// A node in the control-flow graph of CoverageGraph.
pub(super) struct BasicCoverageBlock {
DEBUG_FORMAT = "bcb{}",
const START_BCB = 0,
}
}
- pub fn span(&self) -> &Span {
+ pub fn span(&self) -> Span {
match self {
- Self::Statement(_, span, _) | Self::Terminator(_, span) => span,
+ Self::Statement(_, span, _) | Self::Terminator(_, span) => *span,
}
}
}
//! It must also not contain any indexing projections, since those take an arbitrary `Local` as
//! the index, and that local might only be initialized shortly before `dest` is used.
//!
-//! Subtle case: If `dest` is a, or projects through a union, then we have to make sure that there
-//! remains an assignment to it, since that sets the "active field" of the union. But if `src` is
-//! a ZST, it might not be initialized, so there might not be any use of it before the assignment,
-//! and performing the optimization would simply delete the assignment, leaving `dest`
-//! uninitialized.
-//!
//! * `src` must be a bare `Local` without any indirections or field projections (FIXME: Is this a
//! fundamental restriction or just current impl state?). It can be copied or moved by the
//! assignment.
bit_set::{BitMatrix, BitSet},
vec::IndexVec,
};
-use rustc_middle::mir::tcx::PlaceTy;
use rustc_middle::mir::visit::{MutVisitor, PlaceContext, Visitor};
use rustc_middle::mir::{dump_mir, PassWhere};
use rustc_middle::mir::{
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
let def_id = body.source.def_id();
- let candidates = find_candidates(tcx, body);
+ let candidates = find_candidates(body);
if candidates.is_empty() {
debug!("{:?}: no dest prop candidates, done", def_id);
return;
/// comment) and also throw out assignments that involve a local that has its address taken or is
/// otherwise ineligible (eg. locals used as array indices are ignored because we cannot propagate
/// arbitrary places into array indices).
-fn find_candidates<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) -> Vec<CandidateAssignment<'tcx>> {
+fn find_candidates<'tcx>(body: &Body<'tcx>) -> Vec<CandidateAssignment<'tcx>> {
let mut visitor = FindAssignments {
- tcx,
body,
candidates: Vec::new(),
ever_borrowed_locals: ever_borrowed_locals(body),
}
struct FindAssignments<'a, 'tcx> {
- tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
candidates: Vec<CandidateAssignment<'tcx>>,
ever_borrowed_locals: BitSet<Local>,
return;
}
- // Can't optimize if both locals ever have their address taken (can introduce
- // aliasing).
- // FIXME: This can be smarter and take `StorageDead` into account (which
- // invalidates borrows).
+ // Can't optimize if either local ever has their address taken. This optimization does
+ // liveness analysis only based on assignments, and a local can be live even if its
+ // never assigned to again, because a reference to it might be live.
+ // FIXME: This can be smarter and take `StorageDead` into account (which invalidates
+ // borrows).
if self.ever_borrowed_locals.contains(dest.local)
|| self.ever_borrowed_locals.contains(src.local)
{
return;
}
- // Handle the "subtle case" described above by rejecting any `dest` that is or
- // projects through a union.
- let mut place_ty = PlaceTy::from_ty(self.body.local_decls[dest.local].ty);
- if place_ty.ty.is_union() {
- return;
- }
for elem in dest.projection {
if let PlaceElem::Index(_) = elem {
// `dest` contains an indexing projection.
return;
}
-
- place_ty = place_ty.projection_ty(self.tcx, elem);
- if place_ty.ty.is_union() {
- return;
- }
}
self.candidates.push(CandidateAssignment {
#![feature(trusted_step)]
#![feature(try_blocks)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
#![feature(control_flow_enum)]
#![feature(let_else)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
self.sess.ambiguous_block_expr_parse.borrow_mut().insert(sp, lhs.span);
false
}
- (true, Some(AssocOp::LAnd)) => {
+ (true, Some(AssocOp::LAnd)) |
+ (true, Some(AssocOp::LOr)) |
+ (true, Some(AssocOp::BitOr)) => {
// `{ 42 } &&x` (#61475) or `{ 42 } && if x { 1 } else { 0 }`. Separated from the
// above due to #74233.
// These cases are ambiguous and can't be identified in the parser alone.
+ //
+ // Bitwise AND is left out because guessing intent is hard. We can make
+ // suggestions based on the assumption that double-refs are rarely intentional,
+ // and closures are distinct enough that they don't get mixed up with their
+ // return value.
let sp = self.sess.source_map().start_point(self.token.span);
self.sess.ambiguous_block_expr_parse.borrow_mut().insert(sp, lhs.span);
false
} else if self.check(&token::OpenDelim(token::Brace)) {
self.parse_block_expr(None, lo, BlockCheckMode::Default, attrs)
} else if self.check(&token::BinOp(token::Or)) || self.check(&token::OrOr) {
- self.parse_closure_expr(attrs)
+ self.parse_closure_expr(attrs).map_err(|mut err| {
+ // If the input is something like `if a { 1 } else { 2 } | if a { 3 } else { 4 }`
+ // then suggest parens around the lhs.
+ if let Some(sp) = self.sess.ambiguous_block_expr_parse.borrow().get(&lo) {
+ self.sess.expr_parentheses_needed(&mut err, *sp);
+ }
+ err
+ })
} else if self.check(&token::OpenDelim(token::Bracket)) {
self.parse_array_or_repeat_expr(attrs, token::Bracket)
} else if self.check_path() {
fn check_used(&self, attrs: &[Attribute], target: Target) {
let mut used_linker_span = None;
let mut used_compiler_span = None;
- for attr in attrs {
- if attr.has_name(sym::used) && target != Target::Static {
+ for attr in attrs.iter().filter(|attr| attr.has_name(sym::used)) {
+ if target != Target::Static {
self.tcx
.sess
.span_err(attr.span, "attribute must be applied to a `static` variable");
#![feature(nll)]
#![feature(try_blocks)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_middle;
#![feature(try_blocks)]
#![feature(associated_type_defaults)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
use rustc_ast::MacroDef;
use rustc_attr as attr;
#![feature(once_cell)]
#![feature(rustc_attrs)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_macros;
#![feature(let_else)]
#![feature(min_specialization)]
#![feature(extern_types)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
lifetime_ref
);
err.span_label(lifetime_ref.span, "undeclared lifetime");
- let mut suggests_in_band = false;
let mut suggested_spans = vec![];
for missing in &self.missing_named_lifetime_spots {
match missing {
}) {
(param.span.shrink_to_lo(), format!("{}, ", lifetime_ref))
} else {
- suggests_in_band = true;
(generics.span, format!("<{}>", lifetime_ref))
};
if suggested_spans.contains(&span) {
_ => {}
}
}
- if self.tcx.sess.is_nightly_build()
- && !self.tcx.features().in_band_lifetimes
- && suggests_in_band
- {
- err.help(
- "if you want to experiment with in-band lifetime bindings, \
- add `#![feature(in_band_lifetimes)]` to the crate attributes",
- );
- }
err.emit();
}
-// ignore-tidy-filelength
//! Name resolution for lifetimes.
//!
//! Name resolution for lifetimes follows *much* simpler rules than the
use rustc_hir::hir_id::ItemLocalId;
use rustc_hir::intravisit::{self, Visitor};
use rustc_hir::{GenericArg, GenericParam, LifetimeName, Node, ParamName, QPath};
-use rustc_hir::{GenericParamKind, HirIdMap, HirIdSet, LifetimeParamKind};
+use rustc_hir::{GenericParamKind, HirIdMap, HirIdSet};
use rustc_middle::hir::map::Map;
use rustc_middle::hir::nested_filter;
use rustc_middle::middle::resolve_lifetime::*;
let i = *index;
*index += 1;
let def_id = hir_map.local_def_id(param.hir_id);
- let origin = LifetimeDefOrigin::from_param(param);
debug!("Region::early: index={} def_id={:?}", i, def_id);
- (param.name.normalize_to_macros_2_0(), Region::EarlyBound(i, def_id.to_def_id(), origin))
+ (param.name.normalize_to_macros_2_0(), Region::EarlyBound(i, def_id.to_def_id()))
}
fn late(idx: u32, hir_map: Map<'_>, param: &GenericParam<'_>) -> (ParamName, Region) {
let depth = ty::INNERMOST;
let def_id = hir_map.local_def_id(param.hir_id);
- let origin = LifetimeDefOrigin::from_param(param);
debug!(
- "Region::late: idx={:?}, param={:?} depth={:?} def_id={:?} origin={:?}",
- idx, param, depth, def_id, origin,
+ "Region::late: idx={:?}, param={:?} depth={:?} def_id={:?}",
+ idx, param, depth, def_id,
);
- (
- param.name.normalize_to_macros_2_0(),
- Region::LateBound(depth, idx, def_id.to_def_id(), origin),
- )
+ (param.name.normalize_to_macros_2_0(), Region::LateBound(depth, idx, def_id.to_def_id()))
}
fn late_anon(named_late_bound_vars: u32, index: &Cell<u32>) -> Region {
match *self {
Region::Static | Region::LateBoundAnon(..) => None,
- Region::EarlyBound(_, id, _) | Region::LateBound(_, _, id, _) | Region::Free(_, id) => {
+ Region::EarlyBound(_, id) | Region::LateBound(_, _, id) | Region::Free(_, id) => {
Some(id)
}
}
fn shifted(self, amount: u32) -> Region {
match self {
- Region::LateBound(debruijn, idx, id, origin) => {
- Region::LateBound(debruijn.shifted_in(amount), idx, id, origin)
+ Region::LateBound(debruijn, idx, id) => {
+ Region::LateBound(debruijn.shifted_in(amount), idx, id)
}
Region::LateBoundAnon(debruijn, index, anon_index) => {
Region::LateBoundAnon(debruijn.shifted_in(amount), index, anon_index)
fn shifted_out_to_binder(self, binder: ty::DebruijnIndex) -> Region {
match self {
- Region::LateBound(debruijn, index, id, origin) => {
- Region::LateBound(debruijn.shifted_out_to_binder(binder), index, id, origin)
+ Region::LateBound(debruijn, index, id) => {
+ Region::LateBound(debruijn.shifted_out_to_binder(binder), index, id)
}
Region::LateBoundAnon(debruijn, index, anon_index) => {
Region::LateBoundAnon(debruijn.shifted_out_to_binder(binder), index, anon_index)
where
L: Iterator<Item = &'a hir::Lifetime>,
{
- if let Region::EarlyBound(index, _, _) = self {
+ if let Region::EarlyBound(index, _) = self {
params.nth(index as usize).and_then(|lifetime| map.defs.get(&lifetime.hir_id).cloned())
} else {
Some(self)
fn late_region_as_bound_region<'tcx>(tcx: TyCtxt<'tcx>, region: &Region) -> ty::BoundVariableKind {
match region {
- Region::LateBound(_, _, def_id, _) => {
+ Region::LateBound(_, _, def_id) => {
let name = tcx.hir().name(tcx.hir().local_def_id_to_hir_id(def_id.expect_local()));
ty::BoundVariableKind::Region(ty::BrNamed(*def_id, name))
}
// well-supported at the moment, so this doesn't work.
// In the future, this should be fixed and this error should be removed.
let def = self.map.defs.get(&lifetime.hir_id).cloned();
- let Some(Region::LateBound(_, _, def_id, _)) = def else {
+ let Some(Region::LateBound(_, _, def_id)) = def else {
continue
};
let Some(def_id) = def_id.as_local() else {
match param.kind {
GenericParamKind::Lifetime { .. } => {
let (name, reg) = Region::early(self.tcx.hir(), &mut index, ¶m);
- let Region::EarlyBound(_, def_id, _) = reg else {
+ let Region::EarlyBound(_, def_id) = reg else {
bug!();
};
// We cannot predict what lifetimes are unused in opaque type.
}
fn visit_generics(&mut self, generics: &'tcx hir::Generics<'tcx>) {
- if !self.trait_definition_only {
- check_mixed_explicit_and_in_band_defs(self.tcx, &generics.params);
- }
let scope = Scope::TraitRefBoundary { s: self.scope };
self.with(scope, |_, this| {
for param in generics.params {
}
}
-fn check_mixed_explicit_and_in_band_defs(tcx: TyCtxt<'_>, params: &[hir::GenericParam<'_>]) {
- let lifetime_params: Vec<_> = params
- .iter()
- .filter_map(|param| match param.kind {
- GenericParamKind::Lifetime { kind, .. } => Some((kind, param.span)),
- _ => None,
- })
- .collect();
- let explicit = lifetime_params.iter().find(|(kind, _)| *kind == LifetimeParamKind::Explicit);
- let in_band = lifetime_params.iter().find(|(kind, _)| *kind == LifetimeParamKind::InBand);
-
- if let (Some((_, explicit_span)), Some((_, in_band_span))) = (explicit, in_band) {
- struct_span_err!(
- tcx.sess,
- *in_band_span,
- E0688,
- "cannot mix in-band and explicit lifetime definitions"
- )
- .span_label(*in_band_span, "in-band lifetime definition here")
- .span_label(*explicit_span, "explicit lifetime definition here")
- .emit();
- }
-}
-
fn signal_shadowing_problem(tcx: TyCtxt<'_>, name: Symbol, orig: Original, shadower: Shadower) {
let mut err = if let (ShadowKind::Lifetime, ShadowKind::Lifetime) = (orig.kind, shadower.kind) {
// lifetime/lifetime shadowing is an error
.map(|set| match *set {
Set1::Empty => "BaseDefault".into(),
Set1::One(Region::Static) => "'static".into(),
- Set1::One(Region::EarlyBound(mut i, _, _)) => generics
+ Set1::One(Region::EarlyBound(mut i, _)) => generics
.params
.iter()
.find_map(|param| match param.kind {
.params
.iter()
.filter_map(|param| match param.kind {
- GenericParamKind::Lifetime { .. } => Some((
- param.hir_id,
- hir::LifetimeName::Param(param.name),
- LifetimeDefOrigin::from_param(param),
- )),
+ GenericParamKind::Lifetime { .. } => {
+ Some((param.hir_id, hir::LifetimeName::Param(param.name)))
+ }
_ => None,
})
.enumerate()
- .find(|&(_, (_, lt_name, _))| lt_name == name)
- .map_or(Set1::Many, |(i, (id, _, origin))| {
+ .find(|&(_, (_, lt_name))| lt_name == name)
+ .map_or(Set1::Many, |(i, (id, _))| {
let def_id = tcx.hir().local_def_id(id);
- Set1::One(Region::EarlyBound(i as u32, def_id.to_def_id(), origin))
+ Set1::One(Region::EarlyBound(i as u32, def_id.to_def_id()))
})
}
}
fn lifetime_deletion_span(&self, name: Ident, generics: &hir::Generics<'_>) -> Option<Span> {
generics.params.iter().enumerate().find_map(|(i, param)| {
if param.name.ident() == name {
- let in_band = matches!(
- param.kind,
- hir::GenericParamKind::Lifetime { kind: hir::LifetimeParamKind::InBand }
- );
- if in_band {
- Some(param.span)
- } else if generics.params.len() == 1 {
+ if generics.params.len() == 1 {
// if sole lifetime, remove the entire `<>` brackets
Some(generics.span)
} else {
let def_ids: Vec<_> = defined_by
.values()
.flat_map(|region| match region {
- Region::EarlyBound(_, def_id, _)
- | Region::LateBound(_, _, def_id, _)
+ Region::EarlyBound(_, def_id)
+ | Region::LateBound(_, _, def_id)
| Region::Free(_, def_id) => Some(*def_id),
Region::LateBoundAnon(..) | Region::Static => None,
}
}
- // Check for fn-syntax conflicts with in-band lifetime definitions
- if !self.trait_definition_only && self.is_in_fn_syntax {
- match def {
- Region::EarlyBound(_, _, LifetimeDefOrigin::InBand)
- | Region::LateBound(_, _, _, LifetimeDefOrigin::InBand) => {
- struct_span_err!(
- self.tcx.sess,
- lifetime_ref.span,
- E0687,
- "lifetimes used in `fn` or `Fn` syntax must be \
- explicitly declared using `<...>` binders"
- )
- .span_label(lifetime_ref.span, "in-band lifetime definition")
- .emit();
- }
-
- Region::Static
- | Region::EarlyBound(
- _,
- _,
- LifetimeDefOrigin::ExplicitOrElided | LifetimeDefOrigin::Error,
- )
- | Region::LateBound(
- _,
- _,
- _,
- LifetimeDefOrigin::ExplicitOrElided | LifetimeDefOrigin::Error,
- )
- | Region::LateBoundAnon(..)
- | Region::Free(..) => {}
- }
- }
-
self.insert_lifetime(lifetime_ref, def);
} else {
self.emit_undeclared_lifetime_error(lifetime_ref);
fn visit_lifetime(&mut self, lifetime_ref: &hir::Lifetime) {
if let Some(&lifetime) = self.map.defs.get(&lifetime_ref.hir_id) {
match lifetime {
- Region::LateBound(debruijn, _, _, _)
+ Region::LateBound(debruijn, _, _)
| Region::LateBoundAnon(debruijn, _, _)
if debruijn < self.outer_index =>
{
}
Region::Free(_, def_id)
- | Region::LateBound(_, _, def_id, _)
- | Region::EarlyBound(_, def_id, _) => {
+ | Region::LateBound(_, _, def_id)
+ | Region::EarlyBound(_, def_id) => {
// A lifetime declared by the user.
let track_lifetime_uses = self.track_lifetime_uses();
debug!(?track_lifetime_uses);
#![feature(nll)]
#![recursion_limit = "256"]
#![allow(rustdoc::private_intra_doc_links)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
#![feature(nll)]
#![feature(let_else)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
mod dump_visitor;
mod dumper;
#![feature(min_specialization)]
#![feature(once_cell)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_macros;
"panic strategy for panics in drops"),
parse_only: bool = (false, parse_bool, [UNTRACKED],
"parse only; do not compile, assemble, or link (default: no)"),
- partially_uninit_const_threshold: Option<usize> = (None, parse_opt_number, [TRACKED],
- "allow generating const initializers with mixed init/uninit bytes, \
- and set the maximum total size of a const allocation for which this is allowed (default: never)"),
perf_stats: bool = (false, parse_bool, [UNTRACKED],
"print some performance-related statistics (default: no)"),
pick_stable_methods_before_any_unstable: bool = (true, parse_bool, [TRACKED],
"in diagnostics, use heuristics to shorten paths referring to items"),
ui_testing: bool = (false, parse_bool, [UNTRACKED],
"emit compiler diagnostics in a form suitable for UI testing (default: no)"),
+ uninit_const_chunk_threshold: usize = (16, parse_number, [TRACKED],
+ "allow generating const initializers with mixed init/uninit chunks, \
+ and set the maximum number of chunks for which this is allowed (default: 16)"),
unleash_the_miri_inside_of_you: bool = (false, parse_bool, [TRACKED],
"take the brakes off const evaluation. NOTE: this is unsound (default: no)"),
unpretty: Option<String> = (None, parse_unpretty, [UNTRACKED],
#![feature(negative_impls)]
#![feature(nll)]
#![feature(min_specialization)]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![feature(rustc_attrs)]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_macros;
/// using the callback `SPAN_TRACK` to access the query engine.
///
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
-// FIXME(@lcnr): Enable this attribute once the bootstrap
-// compiler knows of `rustc_pass_by_value`.
-//
-// Right now, this lint would only trigger when compiling the
-// stage 2 compiler, which is fairly annoying as there are
-// a lot of places using `&Span` right now. After the next bootstrap bump,
-// the lint will already trigger when using stage 1, which is a lot less annoying.
-//
-// #[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
pub struct Span {
base_or_index: u32,
len_or_tag: u16,
#![feature(never_type)]
#![feature(nll)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_middle;
#![feature(crate_visibility_modifier)]
#![feature(control_flow_enum)]
#![recursion_limit = "512"] // For rustdoc
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate rustc_macros;
let r = match tcx.named_region(lifetime.hir_id) {
Some(rl::Region::Static) => tcx.lifetimes.re_static,
- Some(rl::Region::LateBound(debruijn, index, def_id, _)) => {
+ Some(rl::Region::LateBound(debruijn, index, def_id)) => {
let name = lifetime_name(def_id.expect_local());
let br = ty::BoundRegion {
var: ty::BoundVar::from_u32(index),
tcx.mk_region(ty::ReLateBound(debruijn, br))
}
- Some(rl::Region::EarlyBound(index, id, _)) => {
+ Some(rl::Region::EarlyBound(index, id)) => {
let name = lifetime_name(id.expect_local());
tcx.mk_region(ty::ReEarlyBound(ty::EarlyBoundRegion { def_id: id, index, name }))
}
use rustc_infer::infer::{RegionVariableOrigin, TyCtxtInferExt};
use rustc_middle::hir::nested_filter;
use rustc_middle::ty::fold::TypeFoldable;
-use rustc_middle::ty::layout::MAX_SIMD_LANES;
+use rustc_middle::ty::layout::{LayoutError, MAX_SIMD_LANES};
use rustc_middle::ty::subst::GenericArgKind;
use rustc_middle::ty::util::{Discr, IntTypeExt};
use rustc_middle::ty::{self, OpaqueTypeKey, ParamEnv, Ty, TyCtxt};
// have UB during initialization if they are uninhabited, but there also seems to be no good
// reason to allow any statics to be uninhabited.
let ty = tcx.type_of(def_id);
- let Ok(layout) = tcx.layout_of(ParamEnv::reveal_all().and(ty)) else {
+ let layout = match tcx.layout_of(ParamEnv::reveal_all().and(ty)) {
+ Ok(l) => l,
+ // Foreign statics that overflow their allowed size should emit an error
+ Err(LayoutError::SizeOverflow(_))
+ if {
+ let node = tcx.hir().get_by_def_id(def_id);
+ matches!(
+ node,
+ hir::Node::ForeignItem(hir::ForeignItem {
+ kind: hir::ForeignItemKind::Static(..),
+ ..
+ })
+ )
+ } =>
+ {
+ tcx.sess
+ .struct_span_err(span, "extern static is too large for the current architecture")
+ .emit();
+ return;
+ }
// Generic statics are rejected, but we still reach this case.
- tcx.sess.delay_span_bug(span, "generic static must be rejected");
- return;
+ Err(e) => {
+ tcx.sess.delay_span_bug(span, &e.to_string());
+ return;
+ }
};
if layout.abi.is_uninhabited() {
tcx.struct_span_lint_hir(
ExprKind::Box(subexpr) => self.check_expr_box(subexpr, expected),
ExprKind::Lit(ref lit) => self.check_lit(&lit, expected),
ExprKind::Binary(op, lhs, rhs) => self.check_binop(expr, op, lhs, rhs),
- ExprKind::Assign(lhs, rhs, ref span) => {
+ ExprKind::Assign(lhs, rhs, span) => {
self.check_expr_assign(expr, expected, lhs, rhs, span)
}
ExprKind::AssignOp(op, lhs, rhs) => self.check_binop_assign(expr, op, lhs, rhs),
expected: Expectation<'tcx>,
lhs: &'tcx hir::Expr<'tcx>,
rhs: &'tcx hir::Expr<'tcx>,
- span: &Span,
+ span: Span,
) -> Ty<'tcx> {
let expected_ty = expected.coercion_target_type(self, expr.span);
if expected_ty == self.tcx.types.bool {
}
if eq {
err.span_suggestion_verbose(
- *span,
+ span,
"you might have meant to compare for equality",
"==".to_string(),
applicability,
return self.tcx.ty_error();
}
- self.check_lhs_assignable(lhs, "E0070", *span);
+ self.check_lhs_assignable(lhs, "E0070", span);
let lhs_ty = self.check_expr_with_needs(&lhs, Needs::MutPlace);
let rhs_ty = self.check_expr_coercable_to_type(&rhs, lhs_ty, Some(lhs));
) => {
// A reborrow has no effect before a dereference.
}
+ // Catch cases which have Deref(None)
+ // having them slip to bug! causes ICE
+ // see #94291 for more info
+ (&[Adjustment { kind: Adjust::Deref(None), .. }], _) => {
+ self.tcx.sess.delay_span_bug(
+ DUMMY_SP,
+ &format!("Can't compose Deref(None) expressions"),
+ )
+ }
// FIXME: currently we never try to compose autoderefs
// and ReifyFnPointer/UnsafeFnPointer, but we could.
_ => bug!(
})
.collect::<Result<Vec<_>, _>>();
- let Ok(where_predicates) = where_predicates else { return };
+ let Ok(where_predicates) = where_predicates else { return };
// now get all predicates in the same types as the where bounds, so we can chain them
let predicates_from_where =
fn borrow(
&mut self,
place_with_id: &expr_use_visitor::PlaceWithHirId<'tcx>,
- _diag_expr_id: HirId,
+ diag_expr_id: HirId,
_bk: rustc_middle::ty::BorrowKind,
) {
+ debug!("borrow {:?}; diag_expr_id={:?}", place_with_id, diag_expr_id);
self.places
.borrowed
.insert(TrackedValue::from_place_with_projections_allowed(place_with_id));
fn mutate(
&mut self,
- _assignee_place: &expr_use_visitor::PlaceWithHirId<'tcx>,
- _diag_expr_id: HirId,
+ assignee_place: &expr_use_visitor::PlaceWithHirId<'tcx>,
+ diag_expr_id: HirId,
) {
+ debug!("mutate {:?}; diag_expr_id={:?}", assignee_place, diag_expr_id);
+ // Count mutations as a borrow.
+ self.places
+ .borrowed
+ .insert(TrackedValue::from_place_with_projections_allowed(assignee_place));
}
fn fake_read(
let ty =
if !lhs_ty.is_ty_var() && !rhs_ty.is_ty_var() && is_builtin_binop(lhs_ty, rhs_ty, op) {
- self.enforce_builtin_binop_types(&lhs.span, lhs_ty, &rhs.span, rhs_ty, op);
+ self.enforce_builtin_binop_types(lhs.span, lhs_ty, rhs.span, rhs_ty, op);
self.tcx.mk_unit()
} else {
return_ty
&& is_builtin_binop(lhs_ty, rhs_ty, op)
{
let builtin_return_ty = self.enforce_builtin_binop_types(
- &lhs_expr.span,
+ lhs_expr.span,
lhs_ty,
- &rhs_expr.span,
+ rhs_expr.span,
rhs_ty,
op,
);
fn enforce_builtin_binop_types(
&self,
- lhs_span: &Span,
+ lhs_span: Span,
lhs_ty: Ty<'tcx>,
- rhs_span: &Span,
+ rhs_span: Span,
rhs_ty: Ty<'tcx>,
op: hir::BinOp,
) -> Ty<'tcx> {
let tcx = self.tcx;
match BinOpCategory::from(op) {
BinOpCategory::Shortcircuit => {
- self.demand_suptype(*lhs_span, tcx.types.bool, lhs_ty);
- self.demand_suptype(*rhs_span, tcx.types.bool, rhs_ty);
+ self.demand_suptype(lhs_span, tcx.types.bool, lhs_ty);
+ self.demand_suptype(rhs_span, tcx.types.bool, rhs_ty);
tcx.types.bool
}
BinOpCategory::Math | BinOpCategory::Bitwise => {
// both LHS and RHS and result will have the same type
- self.demand_suptype(*rhs_span, lhs_ty, rhs_ty);
+ self.demand_suptype(rhs_span, lhs_ty, rhs_ty);
lhs_ty
}
BinOpCategory::Comparison => {
// both LHS and RHS and result will have the same type
- self.demand_suptype(*rhs_span, lhs_ty, rhs_ty);
+ self.demand_suptype(rhs_span, lhs_ty, rhs_ty);
tcx.types.bool
}
}
match self.tcx.named_region(lt.hir_id) {
Some(rl::Region::Static | rl::Region::EarlyBound(..)) => {}
Some(
- rl::Region::LateBound(debruijn, _, _, _)
+ rl::Region::LateBound(debruijn, _, _)
| rl::Region::LateBoundAnon(debruijn, _, _),
) if debruijn < self.outer_index => {}
Some(
#![feature(hash_drain_filter)]
#![feature(once_cell)]
#![recursion_limit = "256"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
use std::panic::{catch_unwind, AssertUnwindSafe};
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
-// Capacity of a tree with a single level,
-// i.e., a tree who's root is a leaf node at height 0.
-const NODE_CAPACITY: usize = node::CAPACITY;
-
// Minimum number of elements to insert, to guarantee a tree with 2 levels,
// i.e., a tree who's root is an internal node at height 1, with edges to leaf nodes.
// It's not the minimum size: removing an element from such a tree does not always reduce height.
-const MIN_INSERTS_HEIGHT_1: usize = NODE_CAPACITY + 1;
+const MIN_INSERTS_HEIGHT_1: usize = node::CAPACITY + 1;
// Minimum number of elements to insert in ascending order, to guarantee a tree with 3 levels,
// i.e., a tree who's root is an internal node at height 2, with edges to more internal nodes.
#[should_panic]
fn test_check_ord_chaos() {
let gov = Governor::new();
- let map: BTreeMap<_, _> = (0..2).map(|i| (Governed(i, &gov), ())).collect();
+ let map = BTreeMap::from([(Governed(1, &gov), ()), (Governed(2, &gov), ())]);
gov.flip();
map.check();
}
#[test]
fn test_check_invariants_ord_chaos() {
let gov = Governor::new();
- let map: BTreeMap<_, _> = (0..2).map(|i| (Governed(i, &gov), ())).collect();
+ let map = BTreeMap::from([(Governed(1, &gov), ()), (Governed(2, &gov), ())]);
gov.flip();
map.check_invariants();
}
fn test_iter() {
// Miri is too slow
let size = if cfg!(miri) { 200 } else { 10000 };
-
- let mut map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
+ let mut map = BTreeMap::from_iter((0..size).map(|i| (i, i)));
fn test<T>(size: usize, mut iter: T)
where
fn test_iter_rev() {
// Miri is too slow
let size = if cfg!(miri) { 200 } else { 10000 };
-
- let mut map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
+ let mut map = BTreeMap::from_iter((0..size).map(|i| (i, i)));
fn test<T>(size: usize, mut iter: T)
where
<T as TryFrom<usize>>::Error: Debug,
{
let zero = T::try_from(0).unwrap();
- let mut map: BTreeMap<T, T> = (0..size).map(|i| (T::try_from(i).unwrap(), zero)).collect();
+ let mut map = BTreeMap::from_iter((0..size).map(|i| (T::try_from(i).unwrap(), zero)));
// Forward and backward iteration sees enough pairs (also tested elsewhere)
assert_eq!(map.iter_mut().count(), size);
#[test]
fn test_values_mut() {
- let mut a: BTreeMap<_, _> = (0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i)).collect();
+ let mut a = BTreeMap::from_iter((0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i)));
test_all_refs(&mut 13, a.values_mut());
a.check();
}
value.push_str("!");
}
- let values: Vec<String> = a.values().cloned().collect();
+ let values = Vec::from_iter(a.values().cloned());
assert_eq!(values, [String::from("hello!"), String::from("goodbye!")]);
a.check();
}
#[test]
fn test_iter_entering_root_twice() {
- let mut map: BTreeMap<_, _> = (0..2).map(|i| (i, i)).collect();
+ let mut map = BTreeMap::from([(0, 0), (1, 1)]);
let mut it = map.iter_mut();
let front = it.next().unwrap();
let back = it.next_back().unwrap();
#[test]
fn test_iter_descending_to_same_node_twice() {
- let mut map: BTreeMap<_, _> = (0..MIN_INSERTS_HEIGHT_1).map(|i| (i, i)).collect();
+ let mut map = BTreeMap::from_iter((0..MIN_INSERTS_HEIGHT_1).map(|i| (i, i)));
let mut it = map.iter_mut();
// Descend into first child.
let front = it.next().unwrap();
// Miri is too slow
let size = if cfg!(miri) { 200 } else { 10000 };
- let mut map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
+ let mut map = BTreeMap::from_iter((0..size).map(|i| (i, i)));
fn test<T>(size: usize, mut iter: T)
where
}
fn range_keys(map: &BTreeMap<i32, i32>, range: impl RangeBounds<i32>) -> Vec<i32> {
- map.range(range)
- .map(|(&k, &v)| {
- assert_eq!(k, v);
- k
- })
- .collect()
+ Vec::from_iter(map.range(range).map(|(&k, &v)| {
+ assert_eq!(k, v);
+ k
+ }))
}
#[test]
fn test_range_small() {
let size = 4;
- let map: BTreeMap<_, _> = (1..=size).map(|i| (i, i)).collect();
- let all: Vec<_> = (1..=size).collect();
+ let all = Vec::from_iter(1..=size);
let (first, last) = (vec![all[0]], vec![all[size as usize - 1]]);
+ let map = BTreeMap::from_iter(all.iter().copied().map(|i| (i, i)));
assert_eq!(range_keys(&map, (Excluded(0), Excluded(size + 1))), all);
assert_eq!(range_keys(&map, (Excluded(0), Included(size + 1))), all);
#[test]
fn test_range_height_1() {
- // Tests tree with a root and 2 leaves. The single key in the root node is
- // close to the middle among the keys.
-
- let map: BTreeMap<_, _> = (0..MIN_INSERTS_HEIGHT_1 as i32).map(|i| (i, i)).collect();
+ // Tests tree with a root and 2 leaves. We test around the middle of the
+ // keys because one of those is the single key in the root node.
+ let map = BTreeMap::from_iter((0..MIN_INSERTS_HEIGHT_1 as i32).map(|i| (i, i)));
let middle = MIN_INSERTS_HEIGHT_1 as i32 / 2;
for root in middle - 2..=middle + 2 {
assert_eq!(range_keys(&map, (Excluded(root), Excluded(root + 1))), vec![]);
fn test_range_large() {
let size = 200;
- let map: BTreeMap<_, _> = (1..=size).map(|i| (i, i)).collect();
- let all: Vec<_> = (1..=size).collect();
+ let all = Vec::from_iter(1..=size);
let (first, last) = (vec![all[0]], vec![all[size as usize - 1]]);
+ let map = BTreeMap::from_iter(all.iter().copied().map(|i| (i, i)));
assert_eq!(range_keys(&map, (Excluded(0), Excluded(size + 1))), all);
assert_eq!(range_keys(&map, (Excluded(0), Included(size + 1))), all);
L: IntoIterator<Item = (&'a i32, &'a i32)>,
R: IntoIterator<Item = (&'a i32, &'a i32)>,
{
- let lhs: Vec<_> = lhs.into_iter().collect();
- let rhs: Vec<_> = rhs.into_iter().collect();
- assert_eq!(lhs, rhs);
+ assert_eq!(Vec::from_iter(lhs), Vec::from_iter(rhs));
}
check(map.range(..=100), map.range(..101));
#[test]
fn test_range_inclusive_max_value() {
let max = usize::MAX;
- let map: BTreeMap<_, _> = [(max, 0)].into_iter().collect();
-
- assert_eq!(map.range(max..=max).collect::<Vec<_>>(), &[(&max, &0)]);
+ let map = BTreeMap::from([(max, 0)]);
+ assert_eq!(Vec::from_iter(map.range(max..=max)), &[(&max, &0)]);
}
#[test]
fn test_range_equal_empty_cases() {
- let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..5).map(|i| (i, i)));
assert_eq!(map.range((Included(2), Excluded(2))).next(), None);
assert_eq!(map.range((Excluded(2), Included(2))).next(), None);
}
#[test]
#[should_panic]
fn test_range_equal_excluded() {
- let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..5).map(|i| (i, i)));
let _ = map.range((Excluded(2), Excluded(2)));
}
#[test]
#[should_panic]
fn test_range_backwards_1() {
- let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..5).map(|i| (i, i)));
let _ = map.range((Included(3), Included(2)));
}
#[test]
#[should_panic]
fn test_range_backwards_2() {
- let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..5).map(|i| (i, i)));
let _ = map.range((Included(3), Excluded(2)));
}
#[test]
#[should_panic]
fn test_range_backwards_3() {
- let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..5).map(|i| (i, i)));
let _ = map.range((Excluded(3), Included(2)));
}
#[test]
#[should_panic]
fn test_range_backwards_4() {
- let map: BTreeMap<_, _> = (0..5).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..5).map(|i| (i, i)));
let _ = map.range((Excluded(3), Excluded(2)));
}
}
}
- let map = (0..12).map(|i| (CompositeKey(i, EvilTwin(i)), ())).collect::<BTreeMap<_, _>>();
+ let map = BTreeMap::from_iter((0..12).map(|i| (CompositeKey(i, EvilTwin(i)), ())));
let _ = map.range(EvilTwin(5)..=EvilTwin(7));
}
fn test_range_1000() {
// Miri is too slow
let size = if cfg!(miri) { MIN_INSERTS_HEIGHT_2 as u32 } else { 1000 };
- let map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..size).map(|i| (i, i)));
fn test(map: &BTreeMap<u32, u32>, size: u32, min: Bound<&u32>, max: Bound<&u32>) {
let mut kvs = map.range((min, max)).map(|(&k, &v)| (k, v));
let size = 200;
// Miri is too slow
let step = if cfg!(miri) { 66 } else { 1 };
- let map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
+ let map = BTreeMap::from_iter((0..size).map(|i| (i, i)));
for i in (0..size).step_by(step) {
for j in (i..size).step_by(step) {
let size = 200;
// Miri is too slow
let step = if cfg!(miri) { 66 } else { 1 };
- let mut map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
+ let mut map = BTreeMap::from_iter((0..size).map(|i| (i, i)));
for i in (0..size).step_by(step) {
for j in (i..size).step_by(step) {
#[test]
fn test_retain() {
- let mut map: BTreeMap<i32, i32> = (0..100).map(|x| (x, x * 10)).collect();
+ let mut map = BTreeMap::from_iter((0..100).map(|x| (x, x * 10)));
map.retain(|&k, _| k % 2 == 0);
assert_eq!(map.len(), 50);
#[test]
fn consumed_keeping_all() {
let pairs = (0..3).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let mut map = BTreeMap::from_iter(pairs);
assert!(map.drain_filter(|_, _| false).eq(iter::empty()));
map.check();
}
#[test]
fn consumed_removing_all() {
let pairs = (0..3).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let mut map = BTreeMap::from_iter(pairs.clone());
assert!(map.drain_filter(|_, _| true).eq(pairs));
assert!(map.is_empty());
map.check();
#[test]
fn mutating_and_keeping() {
let pairs = (0..3).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let mut map = BTreeMap::from_iter(pairs);
assert!(
map.drain_filter(|_, v| {
*v += 6;
#[test]
fn mutating_and_removing() {
let pairs = (0..3).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let mut map = BTreeMap::from_iter(pairs);
assert!(
map.drain_filter(|_, v| {
*v += 6;
#[test]
fn underfull_keeping_all() {
let pairs = (0..3).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let mut map = BTreeMap::from_iter(pairs);
map.drain_filter(|_, _| false);
assert!(map.keys().copied().eq(0..3));
map.check();
fn underfull_removing_one() {
let pairs = (0..3).map(|i| (i, i));
for doomed in 0..3 {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i == doomed);
assert_eq!(map.len(), 2);
map.check();
fn underfull_keeping_one() {
let pairs = (0..3).map(|i| (i, i));
for sacred in 0..3 {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i != sacred);
assert!(map.keys().copied().eq(sacred..=sacred));
map.check();
#[test]
fn underfull_removing_all() {
let pairs = (0..3).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let mut map = BTreeMap::from_iter(pairs);
map.drain_filter(|_, _| true);
assert!(map.is_empty());
map.check();
#[test]
fn height_0_keeping_all() {
- let pairs = (0..NODE_CAPACITY).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let pairs = (0..node::CAPACITY).map(|i| (i, i));
+ let mut map = BTreeMap::from_iter(pairs);
map.drain_filter(|_, _| false);
- assert!(map.keys().copied().eq(0..NODE_CAPACITY));
+ assert!(map.keys().copied().eq(0..node::CAPACITY));
map.check();
}
#[test]
fn height_0_removing_one() {
- let pairs = (0..NODE_CAPACITY).map(|i| (i, i));
- for doomed in 0..NODE_CAPACITY {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let pairs = (0..node::CAPACITY).map(|i| (i, i));
+ for doomed in 0..node::CAPACITY {
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i == doomed);
- assert_eq!(map.len(), NODE_CAPACITY - 1);
+ assert_eq!(map.len(), node::CAPACITY - 1);
map.check();
}
}
#[test]
fn height_0_keeping_one() {
- let pairs = (0..NODE_CAPACITY).map(|i| (i, i));
- for sacred in 0..NODE_CAPACITY {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let pairs = (0..node::CAPACITY).map(|i| (i, i));
+ for sacred in 0..node::CAPACITY {
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i != sacred);
assert!(map.keys().copied().eq(sacred..=sacred));
map.check();
#[test]
fn height_0_removing_all() {
- let pairs = (0..NODE_CAPACITY).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let pairs = (0..node::CAPACITY).map(|i| (i, i));
+ let mut map = BTreeMap::from_iter(pairs);
map.drain_filter(|_, _| true);
assert!(map.is_empty());
map.check();
#[test]
fn height_0_keeping_half() {
- let mut map: BTreeMap<_, _> = (0..16).map(|i| (i, i)).collect();
+ let mut map = BTreeMap::from_iter((0..16).map(|i| (i, i)));
assert_eq!(map.drain_filter(|i, _| *i % 2 == 0).count(), 8);
assert_eq!(map.len(), 8);
map.check();
#[test]
fn height_1_removing_all() {
let pairs = (0..MIN_INSERTS_HEIGHT_1).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let mut map = BTreeMap::from_iter(pairs);
map.drain_filter(|_, _| true);
assert!(map.is_empty());
map.check();
fn height_1_removing_one() {
let pairs = (0..MIN_INSERTS_HEIGHT_1).map(|i| (i, i));
for doomed in 0..MIN_INSERTS_HEIGHT_1 {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i == doomed);
assert_eq!(map.len(), MIN_INSERTS_HEIGHT_1 - 1);
map.check();
fn height_1_keeping_one() {
let pairs = (0..MIN_INSERTS_HEIGHT_1).map(|i| (i, i));
for sacred in 0..MIN_INSERTS_HEIGHT_1 {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i != sacred);
assert!(map.keys().copied().eq(sacred..=sacred));
map.check();
fn height_2_removing_one() {
let pairs = (0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i));
for doomed in (0..MIN_INSERTS_HEIGHT_2).step_by(12) {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i == doomed);
assert_eq!(map.len(), MIN_INSERTS_HEIGHT_2 - 1);
map.check();
fn height_2_keeping_one() {
let pairs = (0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i));
for sacred in (0..MIN_INSERTS_HEIGHT_2).step_by(12) {
- let mut map: BTreeMap<_, _> = pairs.clone().collect();
+ let mut map = BTreeMap::from_iter(pairs.clone());
map.drain_filter(|i, _| *i != sacred);
assert!(map.keys().copied().eq(sacred..=sacred));
map.check();
#[test]
fn height_2_removing_all() {
let pairs = (0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i));
- let mut map: BTreeMap<_, _> = pairs.collect();
+ let mut map = BTreeMap::from_iter(pairs);
map.drain_filter(|_, _| true);
assert!(map.is_empty());
map.check();
fn test_entry() {
let xs = [(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)];
- let mut map: BTreeMap<_, _> = xs.iter().cloned().collect();
+ let mut map = BTreeMap::from(xs);
// Existing key (insert)
match map.entry(1) {
#[test]
fn test_clear() {
let mut map = BTreeMap::new();
- for &len in &[MIN_INSERTS_HEIGHT_1, MIN_INSERTS_HEIGHT_2, 0, NODE_CAPACITY] {
+ for &len in &[MIN_INSERTS_HEIGHT_1, MIN_INSERTS_HEIGHT_2, 0, node::CAPACITY] {
for i in 0..len {
map.insert(i, ());
}
}
// Test a tree with 2 semi-full levels and a tree with 3 levels.
- map = (1..MIN_INSERTS_HEIGHT_2).map(|i| (i, i)).collect();
+ map = BTreeMap::from_iter((1..MIN_INSERTS_HEIGHT_2).map(|i| (i, i)));
assert_eq!(map.len(), MIN_INSERTS_HEIGHT_2 - 1);
assert_eq!(map, map.clone());
map.insert(0, 0);
fn test_clone_panic_leak(size: usize) {
for i in 0..size {
- let dummies: Vec<CrashTestDummy> = (0..size).map(|id| CrashTestDummy::new(id)).collect();
- let map: BTreeMap<_, ()> = dummies
- .iter()
- .map(|dummy| {
- let panic = if dummy.id == i { Panic::InClone } else { Panic::Never };
- (dummy.spawn(panic), ())
- })
- .collect();
+ let dummies = Vec::from_iter((0..size).map(|id| CrashTestDummy::new(id)));
+ let map = BTreeMap::from_iter(dummies.iter().map(|dummy| {
+ let panic = if dummy.id == i { Panic::InClone } else { Panic::Never };
+ (dummy.spawn(panic), ())
+ }));
catch_unwind(|| map.clone()).unwrap_err();
for d in &dummies {
#[test]
fn test_insert_into_full_height_0() {
- let size = NODE_CAPACITY;
+ let size = node::CAPACITY;
for pos in 0..=size {
- let mut map: BTreeMap<_, _> = (0..size).map(|i| (i * 2 + 1, ())).collect();
+ let mut map = BTreeMap::from_iter((0..size).map(|i| (i * 2 + 1, ())));
assert!(map.insert(pos * 2, ()).is_none());
map.check();
}
#[test]
fn test_insert_into_full_height_1() {
- let size = NODE_CAPACITY + 1 + NODE_CAPACITY;
+ let size = node::CAPACITY + 1 + node::CAPACITY;
for pos in 0..=size {
- let mut map: BTreeMap<_, _> = (0..size).map(|i| (i * 2 + 1, ())).collect();
+ let mut map = BTreeMap::from_iter((0..size).map(|i| (i * 2 + 1, ())));
map.compact();
let root_node = map.root.as_ref().unwrap().reborrow();
assert_eq!(root_node.len(), 1);
- assert_eq!(root_node.first_leaf_edge().into_node().len(), NODE_CAPACITY);
- assert_eq!(root_node.last_leaf_edge().into_node().len(), NODE_CAPACITY);
+ assert_eq!(root_node.first_leaf_edge().into_node().len(), node::CAPACITY);
+ assert_eq!(root_node.last_leaf_edge().into_node().len(), node::CAPACITY);
assert!(map.insert(pos * 2, ()).is_none());
map.check();
#[test]
fn test_split_off_tiny_left_height_2() {
let pairs = (0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i));
- let mut left: BTreeMap<_, _> = pairs.clone().collect();
+ let mut left = BTreeMap::from_iter(pairs.clone());
let right = left.split_off(&1);
left.check();
right.check();
fn test_split_off_tiny_right_height_2() {
let pairs = (0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i));
let last = MIN_INSERTS_HEIGHT_2 - 1;
- let mut left: BTreeMap<_, _> = pairs.clone().collect();
+ let mut left = BTreeMap::from_iter(pairs.clone());
assert_eq!(*left.last_key_value().unwrap().0, last);
let right = left.split_off(&last);
left.check();
#[test]
fn test_split_off_halfway() {
let mut rng = DeterministicRng::new();
- for &len in &[NODE_CAPACITY, 25, 50, 75, 100] {
+ for &len in &[node::CAPACITY, 25, 50, 75, 100] {
let mut data = Vec::from_iter((0..len).map(|_| (rng.next(), ())));
// Insertion in non-ascending order creates some variation in node length.
let mut map = BTreeMap::from_iter(data.iter().copied());
fn test_into_iter_drop_leak_height_1() {
let size = MIN_INSERTS_HEIGHT_1;
for panic_point in vec![0, 1, size - 2, size - 1] {
- let dummies: Vec<_> = (0..size).map(|i| CrashTestDummy::new(i)).collect();
- let map: BTreeMap<_, _> = (0..size)
- .map(|i| {
- let panic = if i == panic_point { Panic::InDrop } else { Panic::Never };
- (dummies[i].spawn(Panic::Never), dummies[i].spawn(panic))
- })
- .collect();
+ let dummies = Vec::from_iter((0..size).map(|i| CrashTestDummy::new(i)));
+ let map = BTreeMap::from_iter((0..size).map(|i| {
+ let panic = if i == panic_point { Panic::InDrop } else { Panic::Never };
+ (dummies[i].spawn(Panic::Never), dummies[i].spawn(panic))
+ }));
catch_unwind(move || drop(map.into_iter())).unwrap_err();
for i in 0..size {
assert_eq!(dummies[i].dropped(), 2);
#[test]
fn test_into_keys() {
- let vec = [(1, 'a'), (2, 'b'), (3, 'c')];
- let map: BTreeMap<_, _> = vec.into_iter().collect();
- let keys: Vec<_> = map.into_keys().collect();
+ let map = BTreeMap::from([(1, 'a'), (2, 'b'), (3, 'c')]);
+ let keys = Vec::from_iter(map.into_keys());
assert_eq!(keys.len(), 3);
assert!(keys.contains(&1));
#[test]
fn test_into_values() {
- let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')];
- let map: BTreeMap<_, _> = vec.into_iter().collect();
- let values: Vec<_> = map.into_values().collect();
+ let map = BTreeMap::from([(1, 'a'), (2, 'b'), (3, 'c')]);
+ let values = Vec::from_iter(map.into_values());
assert_eq!(values.len(), 3);
assert!(values.contains(&'a'));
fn size_hint(&self) -> (usize, Option<usize>) {
let (a_len, b_len) = self.0.lens();
// No checked_add, because even if a and b refer to the same set,
- // and T is an empty type, the storage overhead of sets limits
+ // and T is a zero-sized type, the storage overhead of sets limits
// the number of elements to less than half the range of usize.
(0, Some(a_len + b_len))
}
return;
}
- let large = (0..100).collect::<Vec<_>>();
+ let large = Vec::from_iter(0..100);
check_intersection(&[], &large, &[]);
check_intersection(&large, &[], &[]);
check_intersection(&[-1], &large, &[]);
#[test]
fn test_intersection_size_hint() {
- let x: BTreeSet<i32> = [3, 4].iter().copied().collect();
- let y: BTreeSet<i32> = [1, 2, 3].iter().copied().collect();
+ let x = BTreeSet::from([3, 4]);
+ let y = BTreeSet::from([1, 2, 3]);
let mut iter = x.intersection(&y);
assert_eq!(iter.size_hint(), (1, Some(1)));
assert_eq!(iter.next(), Some(&3));
return;
}
- let large = (0..100).collect::<Vec<_>>();
+ let large = Vec::from_iter(0..100);
check_difference(&[], &large, &[]);
check_difference(&[-1], &large, &[-1]);
check_difference(&[0], &large, &[]);
#[test]
fn test_difference_size_hint() {
- let s246: BTreeSet<i32> = [2, 4, 6].iter().copied().collect();
- let s23456: BTreeSet<i32> = (2..=6).collect();
+ let s246 = BTreeSet::from([2, 4, 6]);
+ let s23456 = BTreeSet::from_iter(2..=6);
let mut iter = s246.difference(&s23456);
assert_eq!(iter.size_hint(), (0, Some(3)));
assert_eq!(iter.next(), None);
- let s12345: BTreeSet<i32> = (1..=5).collect();
+ let s12345 = BTreeSet::from_iter(1..=5);
iter = s246.difference(&s12345);
assert_eq!(iter.size_hint(), (0, Some(3)));
assert_eq!(iter.next(), Some(&6));
assert_eq!(iter.size_hint(), (0, Some(0)));
assert_eq!(iter.next(), None);
- let s34567: BTreeSet<i32> = (3..=7).collect();
+ let s34567 = BTreeSet::from_iter(3..=7);
iter = s246.difference(&s34567);
assert_eq!(iter.size_hint(), (0, Some(3)));
assert_eq!(iter.next(), Some(&2));
assert_eq!(iter.size_hint(), (0, Some(2)));
assert_eq!(iter.next(), None);
- let s1: BTreeSet<i32> = (-9..=1).collect();
+ let s1 = BTreeSet::from_iter(-9..=1);
iter = s246.difference(&s1);
assert_eq!(iter.size_hint(), (3, Some(3)));
- let s2: BTreeSet<i32> = (-9..=2).collect();
+ let s2 = BTreeSet::from_iter(-9..=2);
iter = s246.difference(&s2);
assert_eq!(iter.size_hint(), (2, Some(2)));
assert_eq!(iter.next(), Some(&4));
assert_eq!(iter.size_hint(), (1, Some(1)));
- let s23: BTreeSet<i32> = (2..=3).collect();
+ let s23 = BTreeSet::from([2, 3]);
iter = s246.difference(&s23);
assert_eq!(iter.size_hint(), (1, Some(3)));
assert_eq!(iter.next(), Some(&4));
assert_eq!(iter.size_hint(), (1, Some(1)));
- let s4: BTreeSet<i32> = (4..=4).collect();
+ let s4 = BTreeSet::from([4]);
iter = s246.difference(&s4);
assert_eq!(iter.size_hint(), (2, Some(3)));
assert_eq!(iter.next(), Some(&2));
assert_eq!(iter.size_hint(), (0, Some(0)));
assert_eq!(iter.next(), None);
- let s56: BTreeSet<i32> = (5..=6).collect();
+ let s56 = BTreeSet::from([5, 6]);
iter = s246.difference(&s56);
assert_eq!(iter.size_hint(), (1, Some(3)));
assert_eq!(iter.next(), Some(&2));
assert_eq!(iter.size_hint(), (0, Some(2)));
- let s6: BTreeSet<i32> = (6..=19).collect();
+ let s6 = BTreeSet::from_iter(6..=19);
iter = s246.difference(&s6);
assert_eq!(iter.size_hint(), (2, Some(2)));
assert_eq!(iter.next(), Some(&2));
assert_eq!(iter.size_hint(), (1, Some(1)));
- let s7: BTreeSet<i32> = (7..=19).collect();
+ let s7 = BTreeSet::from_iter(7..=19);
iter = s246.difference(&s7);
assert_eq!(iter.size_hint(), (3, Some(3)));
}
#[test]
fn test_symmetric_difference_size_hint() {
- let x: BTreeSet<i32> = [2, 4].iter().copied().collect();
- let y: BTreeSet<i32> = [1, 2, 3].iter().copied().collect();
+ let x = BTreeSet::from([2, 4]);
+ let y = BTreeSet::from([1, 2, 3]);
let mut iter = x.symmetric_difference(&y);
assert_eq!(iter.size_hint(), (0, Some(5)));
assert_eq!(iter.next(), Some(&1));
#[test]
fn test_union_size_hint() {
- let x: BTreeSet<i32> = [2, 4].iter().copied().collect();
- let y: BTreeSet<i32> = [1, 2, 3].iter().copied().collect();
+ let x = BTreeSet::from([2, 4]);
+ let y = BTreeSet::from([1, 2, 3]);
let mut iter = x.union(&y);
assert_eq!(iter.size_hint(), (3, Some(5)));
assert_eq!(iter.next(), Some(&1));
#[test]
// Only tests the simple function definition with respect to intersection
fn test_is_disjoint() {
- let one = [1].iter().collect::<BTreeSet<_>>();
- let two = [2].iter().collect::<BTreeSet<_>>();
+ let one = BTreeSet::from([1]);
+ let two = BTreeSet::from([2]);
assert!(one.is_disjoint(&two));
}
// Also implicitly tests the trivial function definition of is_superset
fn test_is_subset() {
fn is_subset(a: &[i32], b: &[i32]) -> bool {
- let set_a = a.iter().collect::<BTreeSet<_>>();
- let set_b = b.iter().collect::<BTreeSet<_>>();
+ let set_a = BTreeSet::from_iter(a.iter());
+ let set_b = BTreeSet::from_iter(b.iter());
set_a.is_subset(&set_b)
}
return;
}
- let large = (0..100).collect::<Vec<_>>();
+ let large = Vec::from_iter(0..100);
assert_eq!(is_subset(&[], &large), true);
assert_eq!(is_subset(&large, &[]), false);
assert_eq!(is_subset(&[-1], &large), false);
#[test]
fn test_retain() {
- let xs = [1, 2, 3, 4, 5, 6];
- let mut set: BTreeSet<i32> = xs.iter().cloned().collect();
+ let mut set = BTreeSet::from([1, 2, 3, 4, 5, 6]);
set.retain(|&k| k % 2 == 0);
assert_eq!(set.len(), 3);
assert!(set.contains(&2));
#[test]
fn test_drain_filter() {
- let mut x: BTreeSet<_> = [1].iter().copied().collect();
- let mut y: BTreeSet<_> = [1].iter().copied().collect();
+ let mut x = BTreeSet::from([1]);
+ let mut y = BTreeSet::from([1]);
x.drain_filter(|_| true);
y.drain_filter(|_| false);
fn test_from_iter() {
let xs = [1, 2, 3, 4, 5, 6, 7, 8, 9];
- let set: BTreeSet<_> = xs.iter().cloned().collect();
+ let set = BTreeSet::from_iter(xs.iter());
for x in &xs {
assert!(set.contains(x));
#![feature(associated_type_bounds)]
#![feature(box_syntax)]
#![feature(cfg_sanitize)]
-#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![feature(const_deref)]
#![feature(const_fn_trait_bound)]
#![feature(const_mut_refs)]
}
let mut slot = None;
let mut state = Default::default();
- let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot, &mut state);
+ let mut writer = PadAdapter::wrap(self.fmt, &mut slot, &mut state);
writer.write_str(name)?;
writer.write_str(": ")?;
value.fmt(&mut writer)?;
if self.is_pretty() {
let mut slot = None;
let mut state = Default::default();
- let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot, &mut state);
+ let mut writer = PadAdapter::wrap(self.fmt, &mut slot, &mut state);
writer.write_str("..\n")?;
self.fmt.write_str("}")
} else {
}
let mut slot = None;
let mut state = Default::default();
- let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot, &mut state);
+ let mut writer = PadAdapter::wrap(self.fmt, &mut slot, &mut state);
value.fmt(&mut writer)?;
writer.write_str(",\n")
} else {
}
let mut slot = None;
let mut state = Default::default();
- let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot, &mut state);
+ let mut writer = PadAdapter::wrap(self.fmt, &mut slot, &mut state);
entry.fmt(&mut writer)?;
writer.write_str(",\n")
} else {
}
let mut slot = None;
self.state = Default::default();
- let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot, &mut self.state);
+ let mut writer = PadAdapter::wrap(self.fmt, &mut slot, &mut self.state);
key.fmt(&mut writer)?;
writer.write_str(": ")?;
} else {
if self.is_pretty() {
let mut slot = None;
- let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot, &mut self.state);
+ let mut writer = PadAdapter::wrap(self.fmt, &mut slot, &mut self.state);
value.fmt(&mut writer)?;
writer.write_str(",\n")?;
} else {
/// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it.
/// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it.
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
- #[cfg(not(bootstrap))]
pub fn const_deallocate(ptr: *mut u8, size: usize, align: usize);
/// Determines whether the raw bytes of the two values are equal.
#![feature(associated_type_bounds)]
#![feature(auto_traits)]
#![feature(cfg_target_has_atomic)]
-#![cfg_attr(not(bootstrap), feature(cfg_target_has_atomic_equal_alignment))]
+#![feature(cfg_target_has_atomic_equal_alignment)]
#![feature(const_fn_floating_point_arithmetic)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_fn_trait_bound)]
/// unreachable!("The loop should always return");
/// }
/// ```
-#[cfg(not(bootstrap))]
#[macro_export]
#[rustc_builtin_macro(unreachable)]
#[allow_internal_unstable(edition_panic)]
};
}
-/// unreachable!() macro
-#[cfg(bootstrap)]
-#[macro_export]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg_attr(not(test), rustc_diagnostic_item = "unreachable_macro")]
-#[allow_internal_unstable(core_panic)]
-macro_rules! unreachable {
- () => ({
- $crate::panicking::panic("internal error: entered unreachable code")
- });
- ($msg:expr $(,)?) => ({
- $crate::unreachable!("{}", $msg)
- });
- ($fmt:expr, $($arg:tt)*) => ({
- $crate::panic!($crate::concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
- });
-}
-
/// Indicates unimplemented code by panicking with a message of "not implemented".
///
/// This allows your code to type-check, which is useful if you are prototyping or
panic_display(&expr);
}
-#[cfg(not(bootstrap))]
#[inline]
#[track_caller]
#[rustc_diagnostic_item = "unreachable_display"] // needed for `non-fmt-panics` lint
panic!("index out of bounds: the len is {} but the index is {}", len, index)
}
-#[cfg(not(bootstrap))]
+// This function is called directly by the codegen backend, and must not have
+// any extra arguments (including those synthesized by track_caller).
#[cold]
#[inline(never)]
+#[cfg_attr(bootstrap, track_caller)]
#[lang = "panic_no_unwind"] // needed by codegen for panic in nounwind function
fn panic_no_unwind() -> ! {
if cfg!(feature = "panic_immediate_abort") {
#[inline]
#[track_caller]
pub const fn swap(&mut self, a: usize, b: usize) {
- let _ = &self[a];
- let _ = &self[b];
-
- // SAFETY: we just checked that both `a` and `b` are in bounds
- unsafe { self.swap_unchecked(a, b) }
+ // FIXME: use swap_unchecked here (https://github.com/rust-lang/rust/pull/88540#issuecomment-944344343)
+ // Can't take two mutable loans from one vector, so instead use raw pointers.
+ let pa = ptr::addr_of_mut!(self[a]);
+ let pb = ptr::addr_of_mut!(self[b]);
+ // SAFETY: `pa` and `pb` have been created from safe mutable references and refer
+ // to elements in the slice and therefore are guaranteed to be valid and aligned.
+ // Note that accessing the elements behind `a` and `b` is checked and will
+ // panic when out of bounds.
+ unsafe {
+ ptr::swap(pa, pb);
+ }
}
/// Swaps two elements in the slice, without doing bounds checking.
}
}
-#[cfg(not(bootstrap))]
#[test]
fn test_const_allocate_at_runtime() {
use core::intrinsics::const_allocate;
}
}
-#[cfg(not(bootstrap))]
#[test]
fn test_const_deallocate_at_runtime() {
use core::intrinsics::const_deallocate;
#![feature(bool_to_option)]
#![feature(box_syntax)]
#![feature(cell_update)]
-#![cfg_attr(bootstrap, feature(cfg_panic))]
-#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![feature(const_assume)]
#![feature(const_black_box)]
#![feature(const_bool_to_option)]
pub(crate) fn simd_cast<T, U>(x: T) -> U;
/// follows Rust's `T as U` semantics, including saturating float casts
/// which amounts to the same as `simd_cast` for many cases
- #[cfg(not(bootstrap))]
pub(crate) fn simd_as<T, U>(x: T) -> U;
/// neg/fneg
/// `from_slice` will panic if the slice's `len` is less than the vector's `Simd::LANES`.
#[must_use]
pub const fn from_slice(slice: &[T]) -> Self {
- assert!(
- slice.len() >= LANES,
- "slice length must be at least the number of lanes"
- );
+ assert!(slice.len() >= LANES, "slice length must be at least the number of lanes");
let mut array = [slice[0]; LANES];
let mut i = 0;
while i < LANES {
/// ```
#[must_use]
#[inline]
- #[cfg(not(bootstrap))]
pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> {
unsafe { intrinsics::simd_as(self) }
}
/// assert_eq!(vec, ["a", "b", "c"]);
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "map_into_keys_values", since = "1.54.0")]
pub fn into_keys(self) -> IntoKeys<K, V> {
IntoKeys { inner: self.into_iter() }
/// assert_eq!(vec, [1, 2, 3]);
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "map_into_keys_values", since = "1.54.0")]
pub fn into_values(self) -> IntoValues<K, V> {
IntoValues { inner: self.into_iter() }
/// println!("key: {} val: {}", key, val);
/// }
/// ```
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn iter(&self) -> Iter<'_, K, V> {
Iter { base: self.base.iter() }
/// println!("key: {} val: {}", key, val);
/// }
/// ```
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn iter_mut(&mut self) -> IterMut<'_, K, V> {
IterMut { base: self.base.iter_mut() }
/// assert!(a.is_empty());
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "drain", since = "1.6.0")]
pub fn drain(&mut self) -> Drain<'_, K, V> {
Drain { base: self.base.drain() }
/// assert_eq!(odds, vec![1, 3, 5, 7]);
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[unstable(feature = "hash_drain_filter", issue = "59618")]
pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, K, V, F>
where
/// assert_eq!(map.len(), 4);
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "retain_hash_collection", since = "1.18.0")]
pub fn retain<F>(&mut self, f: F)
where
type IntoIter = Iter<'a, K, V>;
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
fn into_iter(self) -> Iter<'a, K, V> {
self.iter()
}
type IntoIter = IterMut<'a, K, V>;
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
fn into_iter(self) -> IterMut<'a, K, V> {
self.iter_mut()
}
/// let vec: Vec<(&str, i32)> = map.into_iter().collect();
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
fn into_iter(self) -> IntoIter<K, V> {
IntoIter { base: self.base.into_iter() }
}
/// }
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn iter(&self) -> Iter<'_, T> {
Iter { base: self.base.iter() }
/// assert!(set.is_empty());
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "drain", since = "1.6.0")]
pub fn drain(&mut self) -> Drain<'_, T> {
Drain { base: self.base.drain() }
/// assert_eq!(odds, vec![1, 3, 5, 7]);
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[unstable(feature = "hash_drain_filter", issue = "59618")]
pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, T, F>
where
/// set.retain(|&k| k % 2 == 0);
/// assert_eq!(set.len(), 3);
/// ```
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "retain_hash_collection", since = "1.18.0")]
pub fn retain<F>(&mut self, f: F)
where
/// assert_eq!(diff, [4].iter().collect());
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn difference<'a>(&'a self, other: &'a HashSet<T, S>) -> Difference<'a, T, S> {
Difference { iter: self.iter(), other }
/// assert_eq!(diff1, [1, 4].iter().collect());
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn symmetric_difference<'a>(
&'a self,
/// assert_eq!(intersection, [2, 3].iter().collect());
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a, T, S> {
if self.len() <= other.len() {
/// assert_eq!(union, [1, 2, 3, 4].iter().collect());
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn union<'a>(&'a self, other: &'a HashSet<T, S>) -> Union<'a, T, S> {
if self.len() >= other.len() {
type IntoIter = Iter<'a, T>;
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
fn into_iter(self) -> Iter<'a, T> {
self.iter()
}
/// }
/// ```
#[inline]
- #[cfg_attr(not(bootstrap), rustc_lint_query_instability)]
+ #[rustc_lint_query_instability]
fn into_iter(self) -> IntoIter<T> {
IntoIter { base: self.base.into_iter() }
}
#![feature(c_variadic)]
#![feature(cfg_accessible)]
#![feature(cfg_eval)]
-#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![feature(cfg_target_thread_local)]
#![feature(char_error_internals)]
#![feature(char_internals)]
use crate::fs;
use crate::marker::PhantomData;
use crate::mem::forget;
-#[cfg(not(target_os = "wasi"))]
+#[cfg(not(any(target_os = "wasi", target_env = "sgx")))]
use crate::sys::cvt;
use crate::sys_common::{AsInner, FromInner, IntoInner};
exec_time: Option<&TestExecTime>,
) -> io::Result<()> {
self.write_log(|| {
+ let TestDesc {
+ name,
+ #[cfg(not(bootstrap))]
+ ignore_message,
+ ..
+ } = test;
format!(
"{} {}",
match *result {
TestResult::TrOk => "ok".to_owned(),
TestResult::TrFailed => "failed".to_owned(),
TestResult::TrFailedMsg(ref msg) => format!("failed: {}", msg),
- TestResult::TrIgnored => "ignored".to_owned(),
+ TestResult::TrIgnored => {
+ #[cfg(not(bootstrap))]
+ if let Some(msg) = ignore_message {
+ format!("ignored, {}", msg)
+ } else {
+ "ignored".to_owned()
+ }
+ #[cfg(bootstrap)]
+ "ignored".to_owned()
+ }
TestResult::TrBench(ref bs) => fmt_bench_samples(bs),
TestResult::TrTimedFail => "failed (time limit exceeded)".to_owned(),
},
- test.name,
+ name,
)
})?;
if let Some(exec_time) = exec_time {
desc: TestDesc {
name: StaticTestName("1"),
ignore: true,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(move || {})),
},
desc: TestDesc {
name: StaticTestName("2"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(move || {})),
},
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: true,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: true,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::Yes,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::YesWithMessage("error message"),
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::YesWithMessage(expected),
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::YesWithMessage(expected),
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(f)),
};
TestDesc {
name: StaticTestName("whatever"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type,
- #[cfg(bootstrap)]
- allow_fail: false,
}
}
desc: TestDesc {
name: StaticTestName("3"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::Yes,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(move || {})),
});
desc: TestDesc {
name: StaticTestName(name),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(move || {})),
})
desc: TestDesc {
name: DynTestName((*name).clone()),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: DynTestFn(Box::new(testfn)),
};
let desc = TestDesc {
name: StaticTestName("f"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
};
crate::bench::benchmark(TestId(0), desc, tx, true, f);
let desc = TestDesc {
name: StaticTestName("f"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
};
crate::bench::benchmark(TestId(0), desc, tx, true, f);
let test_a = TestDesc {
name: StaticTestName("a"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
};
let test_b = TestDesc {
name: StaticTestName("b"),
ignore: false,
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
test_type: TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
};
let mut out = PrettyFormatter::new(OutputLocation::Raw(Vec::new()), false, 10, false, None);
pub struct TestDesc {
pub name: TestName,
pub ignore: bool,
+ #[cfg(not(bootstrap))]
+ pub ignore_message: Option<&'static str>,
pub should_panic: options::ShouldPanic,
pub compile_fail: bool,
pub no_run: bool,
pub test_type: TestType,
- #[cfg(bootstrap)]
- pub allow_fail: bool,
}
impl TestDesc {
pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection) {
cargo
.arg("--features")
- .arg(builder.rustc_features())
+ .arg(builder.rustc_features(builder.kind))
.arg("--manifest-path")
.arg(builder.src.join("compiler/rustc/Cargo.toml"));
rustc_cargo_env(builder, cargo, target);
use build_helper::{mtime, output, run, run_suppressed, t, try_run, try_run_suppressed};
use filetime::FileTime;
+use crate::builder::Kind;
use crate::config::{LlvmLibunwind, TargetSelection};
use crate::util::{exe, libdir, CiEnv};
}
/// Gets the space-separated set of activated features for the compiler.
- fn rustc_features(&self) -> String {
+ fn rustc_features(&self, kind: Kind) -> String {
let mut features = String::new();
if self.config.jemalloc {
features.push_str("jemalloc");
}
- if self.config.llvm_enabled() {
+ if self.config.llvm_enabled() || kind == Kind::Check {
features.push_str(" llvm");
}
To scrape examples from test code, e.g. functions marked `#[test]`, then
add the `--scrape-tests` flag.
+
+### `--check-cfg`: check configuration flags
+
+This flag accepts the same values as `rustc --check-cfg`, and uses it to check configuration flags.
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc src/lib.rs -Z unstable-options \
+ --check-cfg='names()' --check-cfg='values(feature, "foo", "bar")'
+```
+
+The example above check every well known names (`target_os`, `doc`, `test`, ... via `names()`)
+and check the values of `feature`: `foo` and `bar`.
fn clean(&self, cx: &mut DocContext<'_>) -> Lifetime {
let def = cx.tcx.named_region(self.hir_id);
if let Some(
- rl::Region::EarlyBound(_, node_id, _)
- | rl::Region::LateBound(_, _, node_id, _)
+ rl::Region::EarlyBound(_, node_id)
+ | rl::Region::LateBound(_, _, node_id)
| rl::Region::Free(_, node_id),
) = def
{
crate extern_strs: Vec<String>,
/// List of `cfg` flags to hand to the compiler. Always includes `rustdoc`.
crate cfgs: Vec<String>,
+ /// List of check cfg flags to hand to the compiler.
+ crate check_cfgs: Vec<String>,
/// Codegen options to hand to the compiler.
crate codegen_options: CodegenOptions,
/// Codegen options strings to hand to the compiler.
.field("libs", &self.libs)
.field("externs", &FmtExterns(&self.externs))
.field("cfgs", &self.cfgs)
+ .field("check-cfgs", &self.check_cfgs)
.field("codegen_options", &"...")
.field("debugging_options", &"...")
.field("target", &self.target)
};
let cfgs = matches.opt_strs("cfg");
+ let check_cfgs = matches.opt_strs("check-cfg");
let extension_css = matches.opt_str("e").map(|s| PathBuf::from(&s));
externs,
extern_strs,
cfgs,
+ check_cfgs,
codegen_options,
codegen_options_strs,
debugging_opts,
libs,
externs,
mut cfgs,
+ check_cfgs,
codegen_options,
debugging_opts,
target,
// these are definitely not part of rustdoc, but we want to warn on them anyway.
rustc_lint::builtin::RENAMED_AND_REMOVED_LINTS.name.to_string(),
rustc_lint::builtin::UNKNOWN_LINTS.name.to_string(),
+ rustc_lint::builtin::UNEXPECTED_CFGS.name.to_string(),
];
lints_to_show.extend(crate::lint::RUSTDOC_LINTS.iter().map(|lint| lint.name.to_string()));
interface::Config {
opts: sessopts,
crate_cfg: interface::parse_cfgspecs(cfgs),
- crate_check_cfg: interface::parse_check_cfg(vec![]),
+ crate_check_cfg: interface::parse_check_cfg(check_cfgs),
input,
input_path: cpath,
output_file: None,
let config = interface::Config {
opts: sessopts,
crate_cfg: interface::parse_cfgspecs(cfgs),
- crate_check_cfg: interface::parse_check_cfg(vec![]),
+ crate_check_cfg: interface::parse_check_cfg(options.check_cfgs.clone()),
input,
input_path: None,
output_file: None,
for cfg in &rustdoc_options.cfgs {
compiler.arg("--cfg").arg(&cfg);
}
+ if !rustdoc_options.check_cfgs.is_empty() {
+ compiler.arg("-Z").arg("unstable-options");
+ for check_cfg in &rustdoc_options.check_cfgs {
+ compiler.arg("--check-cfg").arg(&check_cfg);
+ }
+ }
if let Some(sysroot) = rustdoc_options.maybe_sysroot {
compiler.arg("--sysroot").arg(sysroot);
}
Ignore::None => false,
Ignore::Some(ref ignores) => ignores.iter().any(|s| target_str.contains(s)),
},
+ #[cfg(not(bootstrap))]
+ ignore_message: None,
// compiler failures are test failures
should_panic: test::ShouldPanic::No,
compile_fail: config.compile_fail,
no_run,
test_type: test::TestType::DocTest,
- #[cfg(bootstrap)]
- allow_fail: false,
},
testfn: test::DynTestFn(box move || {
let report_unused_externs = |uext| {
#![recursion_limit = "256"]
#![warn(rustc::internal)]
#![allow(clippy::collapsible_if, clippy::collapsible_else_if)]
+#![allow(rustc::potential_query_instability)]
#[macro_use]
extern crate tracing;
o.optmulti("L", "library-path", "directory to add to crate search path", "DIR")
}),
stable("cfg", |o| o.optmulti("", "cfg", "pass a --cfg to rustc", "")),
+ unstable("check-cfg", |o| o.optmulti("", "check-cfg", "pass a --check-cfg to rustc", "")),
stable("extern", |o| o.optmulti("", "extern", "pass an --extern to rustc", "NAME[=PATH]")),
unstable("extern-html-root-url", |o| {
o.optmulti(
"__comment": "Generated by `./x.py run src/tools/bump-stage0`. Run that command again to update the bootstrap compiler.",
"dist_server": "https://static.rust-lang.org",
"compiler": {
- "date": "2022-01-28",
+ "date": "2022-02-22",
"version": "beta"
},
"rustfmt": {
- "date": "2022-01-28",
+ "date": "2022-02-23",
"version": "nightly"
},
"checksums_sha256": {
- "dist/2022-01-28/cargo-beta-aarch64-apple-darwin.tar.gz": "8c62238c1d0a6ce177f59f5fb92f535433bd4be45d146def6527d0cdadd35422",
- "dist/2022-01-28/cargo-beta-aarch64-apple-darwin.tar.xz": "bc6b381296fc6c882af149f39f2a3b9de35fa4c89ce95f41a2ce1aee2fba051c",
- "dist/2022-01-28/cargo-beta-aarch64-pc-windows-msvc.tar.gz": "ca2ae341b04e558315d74b62d63ea860aaaec633d5fa604a0af73cf197e540fd",
- "dist/2022-01-28/cargo-beta-aarch64-pc-windows-msvc.tar.xz": "f570b2a8902931e49374ca326a2fdb3294d688dcbd053e767e3b01e2fe749dd5",
- "dist/2022-01-28/cargo-beta-aarch64-unknown-linux-gnu.tar.gz": "d22d886ff0017682c27aed6e43e0a3519864847a36ea7546bc7924340098ebbb",
- "dist/2022-01-28/cargo-beta-aarch64-unknown-linux-gnu.tar.xz": "cb2221cd5c4e6251bcfb5e1d6ae49bbdb3d6463258866cb3971f86db4e4221de",
- "dist/2022-01-28/cargo-beta-aarch64-unknown-linux-musl.tar.gz": "64046c814a93d4771e6c835afe30303afeb4c511282d2fbec1a716334ab1d630",
- "dist/2022-01-28/cargo-beta-aarch64-unknown-linux-musl.tar.xz": "1f3ebb839986c3548dfff2da3c716e954bb0eb40abf823e1f1933ba79425b85e",
- "dist/2022-01-28/cargo-beta-arm-unknown-linux-gnueabi.tar.gz": "50c894bf151d8d8073d667712097c1dbb254c99ac1fcdadd495a7928d21a957a",
- "dist/2022-01-28/cargo-beta-arm-unknown-linux-gnueabi.tar.xz": "e6a52d5cccf994e65240983924f6b8469669dc710715060730e94e67dbd74877",
- "dist/2022-01-28/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz": "91c47a849fd1ffb764508d8a287bb717627d3a6fb12171df7bd427490e826dda",
- "dist/2022-01-28/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz": "a493a29a384a9573ab29ce9f366dc419907500a01e389e8486a5f5aa57c8394b",
- "dist/2022-01-28/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz": "c55187e202b699570db7ae49a1fbd615696f30008be60a3bd5c9ee708925e4a5",
- "dist/2022-01-28/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz": "288ea72dff7dc1882b51b4d4e73ac8d05f351da44a99d3ad5ee50b231f189f1b",
- "dist/2022-01-28/cargo-beta-i686-pc-windows-gnu.tar.gz": "a746316d99b1943cd63c485180c512ddfc7d394fd76a51f9ed56dd2dcadc032a",
- "dist/2022-01-28/cargo-beta-i686-pc-windows-gnu.tar.xz": "4395f831aa0a9413b5733902df58c6474913c53f46600ffe6f694c4312dc9d70",
- "dist/2022-01-28/cargo-beta-i686-pc-windows-msvc.tar.gz": "d1f3441addc86e7b5bc21fbb2550e6a3e59a818027137ce2bac1b3208168726b",
- "dist/2022-01-28/cargo-beta-i686-pc-windows-msvc.tar.xz": "4081e7ab2bb2208d636812f74a9f5b7d3c057f694d40589aa3affe3df35d0981",
- "dist/2022-01-28/cargo-beta-i686-unknown-linux-gnu.tar.gz": "ab9bc43f20705cf5899d35381f3bd432a346c85762182a8f3b61adb93149910c",
- "dist/2022-01-28/cargo-beta-i686-unknown-linux-gnu.tar.xz": "b50084926003b1e7b8f3a6a60f41a7c1dce764b1ce367567c112293aee16c244",
- "dist/2022-01-28/cargo-beta-mips-unknown-linux-gnu.tar.gz": "79bebb05444b1288ad6faabc9ed7365206aa8321195285565130017cba61e3d9",
- "dist/2022-01-28/cargo-beta-mips-unknown-linux-gnu.tar.xz": "ee12f3ae5a08329a482aaa0764e4b674337c659fcc10132220d67313ba663634",
- "dist/2022-01-28/cargo-beta-mips64-unknown-linux-gnuabi64.tar.gz": "597e2021c3d56d821f91ff26b65ca31c837e6451d7f12d04494208f0b0dac847",
- "dist/2022-01-28/cargo-beta-mips64-unknown-linux-gnuabi64.tar.xz": "23976bfa23b9a4d0e211daa4fa50fc34e57af95c05c2cae061782b180c9cb308",
- "dist/2022-01-28/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "e9b7393951081be935b6f97a0bb5d974975e555eea291d256913f07c9a8ea21e",
- "dist/2022-01-28/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "c12b8d1711078cfe2506dc069bdc6a823b8720f10f5f927d2fe0d8a4dac09fd9",
- "dist/2022-01-28/cargo-beta-mipsel-unknown-linux-gnu.tar.gz": "dd810231860fa9d925a641a9928b05917a697cb205acd6636e11c5d60cc3badf",
- "dist/2022-01-28/cargo-beta-mipsel-unknown-linux-gnu.tar.xz": "2d36e70cd07a97a92f23b26984cd8a1310c9762cc61e629c69a66a3deb53884b",
- "dist/2022-01-28/cargo-beta-powerpc-unknown-linux-gnu.tar.gz": "65187ba25062e668abf1b401364f99553ebf8d61d26a5e4a833a00a3dec38f64",
- "dist/2022-01-28/cargo-beta-powerpc-unknown-linux-gnu.tar.xz": "d5237004a0d161cbbc99c0c36072b2b4ce1112ce2ac26c8dd1770711c5cad8fa",
- "dist/2022-01-28/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz": "56722110c9436681db0946e6b66883323c077cac33ef666c8f4d79dea3b0f073",
- "dist/2022-01-28/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz": "d3957129b72dce1d1ab4666b8aa826d93ad938ac42ace1fbc055c97148b5f217",
- "dist/2022-01-28/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz": "0b8e012c149c64a163cb22bd0a980cbf30cccd260bd4244a67c64e6adb250cc1",
- "dist/2022-01-28/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz": "cfd05fd445176914d90e2f8f6ac4db60b6adaca32551b0290a06dd18dbdfe768",
- "dist/2022-01-28/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz": "ba7b03932cdc6d25b1c85e0ceb35360fb41837904283910aa7452ff41ce7b40b",
- "dist/2022-01-28/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz": "d036966c31e6f89c52a40889094042454f848d51a371167fde5a99a7d37d95b4",
- "dist/2022-01-28/cargo-beta-s390x-unknown-linux-gnu.tar.gz": "383957085d629e7a64afc3a560a8cfb9dea25b7deed71b9bb0e172a1218713fb",
- "dist/2022-01-28/cargo-beta-s390x-unknown-linux-gnu.tar.xz": "eba3a543082a934403ee72222f397831394633f092fbfe34aba21da2f5a3f6ff",
- "dist/2022-01-28/cargo-beta-x86_64-apple-darwin.tar.gz": "fc8f6ce885d9fa29b71ed8be24da9bf718ed581e4738c167952b68667acb8daf",
- "dist/2022-01-28/cargo-beta-x86_64-apple-darwin.tar.xz": "47560ce1cefeca1b1b80f4df3a8bc01cda9de6aaa9c46e64c5fb051e1e221e08",
- "dist/2022-01-28/cargo-beta-x86_64-pc-windows-gnu.tar.gz": "281c046114664c1df3629bd2001d4785e930d7f86a743acf21d2a2b117b9e857",
- "dist/2022-01-28/cargo-beta-x86_64-pc-windows-gnu.tar.xz": "66207bd42c186fd52c1ab4156343842f5e561770142762dc7f553460d689b444",
- "dist/2022-01-28/cargo-beta-x86_64-pc-windows-msvc.tar.gz": "949de6cd5b2856d4c70162bb6a5321ec193430fa0120e69bf6af9851f9e0d17d",
- "dist/2022-01-28/cargo-beta-x86_64-pc-windows-msvc.tar.xz": "796f3cee5426cf482da4e065351ad1b7208cfe03addb721433594ff7321d0611",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-freebsd.tar.gz": "2e587bbe22cfb0a8f62822279611505d31498bcce1e85578fb7ac092ae88007d",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-freebsd.tar.xz": "800ac9e61fdff1e046c8bf5708fde53a8ea96ebb9c74d1268dbb15518fa1a2cb",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-illumos.tar.gz": "8d543d45cc1770ba6d7591c65aa9fe20ec7d877e227e5d9fd3778b8dfa1fa073",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-illumos.tar.xz": "dfb18af670d92c55539bb99df1b48e834dcd3ac080c2a93b66d86785e01d7784",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-linux-gnu.tar.gz": "21539d224d42f19d6ac44824c13c2a81a33695239d6c9903921ac89ebedf1608",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-linux-gnu.tar.xz": "a9b81e05c3341d89e14cce58af2334c4a09ecf7e468141aaa74f7d32383b4a41",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-linux-musl.tar.gz": "cd0b693001a83b24e31b380f02b02cbd92365b1398884e174bbafc4991470747",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-linux-musl.tar.xz": "5755a6a61d233c097e99b5b6597f70e42f79feb3e661daecade9847fbf322019",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-netbsd.tar.gz": "807f8fec9df54aab2bc2b70d8fe581922ed9f6210608bb3c06ca919c4ce18c77",
- "dist/2022-01-28/cargo-beta-x86_64-unknown-netbsd.tar.xz": "29defeeaa32612bef8b0fc54cf70ce7b472dab9a0bc3bd4516dfbcfad682adec",
- "dist/2022-01-28/rust-std-beta-aarch64-apple-darwin.tar.gz": "bf8adfd2906d4fbf2e86700a2d753afb6397a0a8cbb3249977fb5b5c63cb7fea",
- "dist/2022-01-28/rust-std-beta-aarch64-apple-darwin.tar.xz": "eb45b62563528fe2eb53e8a4b21bd94f818c6d7e053a6d467854bb4870d97124",
- "dist/2022-01-28/rust-std-beta-aarch64-apple-ios-sim.tar.gz": "fc0218862447e94362de8b4c0537ab3e52715dd3becd3a467d2b8b772379eafa",
- "dist/2022-01-28/rust-std-beta-aarch64-apple-ios-sim.tar.xz": "290440ff743ad923ab3dadbec37b5f8f32bf0fb71cd52348932045a358a7c79d",
- "dist/2022-01-28/rust-std-beta-aarch64-apple-ios.tar.gz": "c2d73f7b0bc523ffbaca6b996d3739d7504d49197a3f43660ef0b60b43e0d372",
- "dist/2022-01-28/rust-std-beta-aarch64-apple-ios.tar.xz": "8aedb963e75125eb73f0cfb5fca4c1e687f9c05bda1829faf2feca67644b3f05",
- "dist/2022-01-28/rust-std-beta-aarch64-fuchsia.tar.gz": "9a54522ddbb3d013584374123bf9af94529880641b1a06de95f60b003e4cebb8",
- "dist/2022-01-28/rust-std-beta-aarch64-fuchsia.tar.xz": "2fa07e359705959879b53d2384ba4b1cdbf5cf9d2d4de09f7e1951a7f762233d",
- "dist/2022-01-28/rust-std-beta-aarch64-linux-android.tar.gz": "55e1116809e6b6a2e2284496ab5295687ad5ea78b258425fdfb1408463b5e13a",
- "dist/2022-01-28/rust-std-beta-aarch64-linux-android.tar.xz": "a28d4e982f7e9be7d77a56aaa2a2cb56d8d9e973abf53251b17c9304702d0501",
- "dist/2022-01-28/rust-std-beta-aarch64-pc-windows-msvc.tar.gz": "d764bee67fb0b03649c3d66d969cbc164d0e3044745dd03df9618cb6fadc18c1",
- "dist/2022-01-28/rust-std-beta-aarch64-pc-windows-msvc.tar.xz": "b955936e318bc72118a28b90049507b515f252b2cb2e7b13ebdfd0b7e26fa160",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz": "6f73c34ce381c71f9d4b26eb68180fe4095d6093aa3cefd8247bc1752df9180d",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz": "ca82c0aa61c59b29f02f5dfd4ca6ef2836d145944b39e24f4d257eef4765ef46",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-linux-musl.tar.gz": "a369a6f079274e0e8604616bd911dced66e3557a109aef5d8a2495c657d51f30",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-linux-musl.tar.xz": "ce8e9ce1c71ecc704830df274df4eab48c1bb431bc0a2260208e80bd7c9f0ce9",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz": "8a331a2e9e90260ccd31c8868d321badfc499adf875492c6b3fc89cd6bb30108",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz": "fb17a241fd1b05c1c63ecf0f2318106f5992fb90eab5c4128186e1f7a232fdcc",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-none.tar.gz": "892fc92ff90f729e1cd72db18c9b33a4a534f960e8ccf25b99e098b9c7bd1fe9",
- "dist/2022-01-28/rust-std-beta-aarch64-unknown-none.tar.xz": "f781f4f9c7528860c720ac89a8c883bd9ae0ef515a9110a15588d2ea4ceffaa7",
- "dist/2022-01-28/rust-std-beta-arm-linux-androideabi.tar.gz": "1767a44aa4999d4cbbb0f99ee79c02f1afe573e93c9fd8326090fe250ff05c4b",
- "dist/2022-01-28/rust-std-beta-arm-linux-androideabi.tar.xz": "bfdef77cb3101b83881069b3cf908f119c1611b547c1620a2e9b06b63e18706c",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz": "8cb857bc6779224fb9ff3fdbdc21b770814a02a93cbad96c19bd155f007efea5",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz": "5a708abe835aab411885c13a5d47584b279f5955a971729084f869f0e9f05c14",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz": "c214aa4109e2b2069c3e739524570d5412475f65741a6eeca3e54fa8cd8486c5",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz": "6c957c577b75d8b2f1b0f7a8e7b0eae8256bec71c93b7cc69a1231754890cff9",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-musleabi.tar.gz": "14ddf068ecc33aba42de9cab00a52498691564c1c83b4e043024a9b093942533",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-musleabi.tar.xz": "2950de6376f7ee9c05145fbd8143c61a7344fb748f540c835d0523cd645176f0",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz": "94ca02d2b03e71b9a6515a296a958ceeeb2fa0f3b6f14d46ff455e5adfdbd167",
- "dist/2022-01-28/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz": "7b48e5e497dd82144e2e9d2b718855ddcbacb91c5a7544762d57fc18024b2b5d",
- "dist/2022-01-28/rust-std-beta-armebv7r-none-eabi.tar.gz": "afd44d9aee954a7f5c1b744862c7e62ebc4812192deffc06052e4c5f23fbb1b4",
- "dist/2022-01-28/rust-std-beta-armebv7r-none-eabi.tar.xz": "2cbcd24628de62d41b18fbf2434104dc8815edcf4d4fc895cf0fdbe91d920ea7",
- "dist/2022-01-28/rust-std-beta-armebv7r-none-eabihf.tar.gz": "4dd22c4893a31d58dbdda4c60bca249fb261a49f64c0dd33b93916924b301668",
- "dist/2022-01-28/rust-std-beta-armebv7r-none-eabihf.tar.xz": "f51031ffcee2cfc0720a5a39a2fc319df099c829eba0bc9d57758dabad2901c6",
- "dist/2022-01-28/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz": "c5fb7b66c2b4f5cae789895a6670548fc14a71626b4962fcf973191b3408b6e7",
- "dist/2022-01-28/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz": "0ce55128a439376a176e36b96615ff6d595fec18acb3f1e72d97a48fba52d9e1",
- "dist/2022-01-28/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz": "e1ce999a808d0c3046b5aac0abc494b37d15256d91acfc0031f7409e03c37cef",
- "dist/2022-01-28/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz": "8c1990aa82d0cb1081918500967669a3026bbdb14cb72114305253a03e38b89e",
- "dist/2022-01-28/rust-std-beta-armv7-linux-androideabi.tar.gz": "0d7ca26d9c90df9657eb01829e8536d2d5493a79ce785eb025e5b09c180a0bbd",
- "dist/2022-01-28/rust-std-beta-armv7-linux-androideabi.tar.xz": "89a7e989fbac5b272840635f7deb1d0b65079a1b97e5b055c22306ead886b2dd",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz": "45746a4f15d418902ba608ca5992f207277f3b591c440839f6c89fdabc4c3330",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz": "625d0dac58197517630362f993712c0e7706e43be5d5ef36159321ce3cc6b20e",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz": "aca7527de247595d7c7a240f093d66ffb4e2d11282f1df2fde9531096d4fe9b0",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz": "0c0e620d4fea01054af6fdf28c8b2f15eac40acd41b0ae0a8ed9520b72d2c5ac",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz": "084b0f9a065821c2996da457c67ddca54219f39788b22f6b24a4be6c4cad07f7",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz": "eec6022b0123e24c97a453fbf40eb3a9ee606aa5f797a790f2bde9b2eea2bb5d",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz": "343fea5dcc3e75db9577d2955e6e1c4bf75aa622f741456d64843d927491ed90",
- "dist/2022-01-28/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz": "37d9a42c59374785f05bb478b0af26e80e212a229720a3f2f59db7157d5a028e",
- "dist/2022-01-28/rust-std-beta-armv7a-none-eabi.tar.gz": "f35390f75f201567458b43b76affa4bbc677adb3ebf0e3f07513ca707bbd832d",
- "dist/2022-01-28/rust-std-beta-armv7a-none-eabi.tar.xz": "38a2776f222485a7381e35ed4f50a9756f0615e83b1143dffa7a6f1aa47e7001",
- "dist/2022-01-28/rust-std-beta-armv7r-none-eabi.tar.gz": "2c3730bc1d7cd878cd9f0070697ae0a64f209b74bd2442afb1ea536b11f92da1",
- "dist/2022-01-28/rust-std-beta-armv7r-none-eabi.tar.xz": "0bdd8d03334ff042fa693eaa27afddf1afc670aab89293e5baec57ce9e5c6c57",
- "dist/2022-01-28/rust-std-beta-armv7r-none-eabihf.tar.gz": "b1f1088d554a06bc30b5c9bfd2043d952c80f8ff972c824760911dd0fa487a2d",
- "dist/2022-01-28/rust-std-beta-armv7r-none-eabihf.tar.xz": "0cc2026f2968ce7f4e262e0899251fb6ee0dc84b49d3d9bd496e00795070d842",
- "dist/2022-01-28/rust-std-beta-asmjs-unknown-emscripten.tar.gz": "858c4a3660ef76c3fe792881638e67563c2290d9a81c3b0f49963b252e1e493a",
- "dist/2022-01-28/rust-std-beta-asmjs-unknown-emscripten.tar.xz": "10fcf8c290e936a4ff78163d5e0fb9827176a9860578f9352094026e85a81c14",
- "dist/2022-01-28/rust-std-beta-i586-pc-windows-msvc.tar.gz": "7d5e5fe1c399e58a889c861864278d2d4641a888be548ae55d3b6734b6490c15",
- "dist/2022-01-28/rust-std-beta-i586-pc-windows-msvc.tar.xz": "f53c2713dbeb793e8564fc222c4ec90263eb2a908c938e4e9ca06aff40e24a84",
- "dist/2022-01-28/rust-std-beta-i586-unknown-linux-gnu.tar.gz": "0519f54f0f3829e7d0a26dabe0450de23189fd771a33720d71e17ef7017d27e7",
- "dist/2022-01-28/rust-std-beta-i586-unknown-linux-gnu.tar.xz": "ab2d89d1be4b2c5076a4d83108ac5785178e2726362a8f76d4d4eabffc016ba7",
- "dist/2022-01-28/rust-std-beta-i586-unknown-linux-musl.tar.gz": "873a4c495f57514224fa25a67e4c714b5d37cf760c18aae38bea6b7b8c8f089f",
- "dist/2022-01-28/rust-std-beta-i586-unknown-linux-musl.tar.xz": "01bb0327a8f63fe2a42a6af07a743253974fcbfecab3bdd739be58e96e0d0c0c",
- "dist/2022-01-28/rust-std-beta-i686-linux-android.tar.gz": "630d53d2eb46c63cd183f5d130af45e2641313d1b1c607c41f7a4a507fca16e4",
- "dist/2022-01-28/rust-std-beta-i686-linux-android.tar.xz": "323660e7d58d468ddc33dbbd0fa37621fe78713091ba2ef178d4a8fe01bf81e1",
- "dist/2022-01-28/rust-std-beta-i686-pc-windows-gnu.tar.gz": "0d687096fcf757434d07db355f96eddd8e07a90d952d123f2af30a0f63dffaf4",
- "dist/2022-01-28/rust-std-beta-i686-pc-windows-gnu.tar.xz": "22fb93f31abf9f7d9e4cdfd5a7ddd03705ecc48db22d7a4ebd58e421891fb998",
- "dist/2022-01-28/rust-std-beta-i686-pc-windows-msvc.tar.gz": "1c644591da0698df4a40977c9db8a00a002c1a34cb828a4038c5c17d1a3aae58",
- "dist/2022-01-28/rust-std-beta-i686-pc-windows-msvc.tar.xz": "e0220fd4ee5f36b29f605f9a8bcdea1bd7721c40787b59e1fb63915e5da0668f",
- "dist/2022-01-28/rust-std-beta-i686-unknown-freebsd.tar.gz": "eb9faa1d7492d92cffec3495937c7682e3c578d9c6ac5d9074efea0d1097d63b",
- "dist/2022-01-28/rust-std-beta-i686-unknown-freebsd.tar.xz": "10732369b289fc92ea0566cbf8494fa267ac551e682921f1824d76b70170d73c",
- "dist/2022-01-28/rust-std-beta-i686-unknown-linux-gnu.tar.gz": "355c6c1178d34e687a071081dddd093a1d6edd3e93cd73aac46f425797c6c541",
- "dist/2022-01-28/rust-std-beta-i686-unknown-linux-gnu.tar.xz": "4904406365f855ed10cf113f04cbeaaf29842789afb91d84396ba3953125d873",
- "dist/2022-01-28/rust-std-beta-i686-unknown-linux-musl.tar.gz": "832737bfc8c70f07a8463d1db39f260829de67dc8c588cf11170f2dcb2b0dc28",
- "dist/2022-01-28/rust-std-beta-i686-unknown-linux-musl.tar.xz": "8220b586c8cbe913db4d00699f7821fdf40ca8da85faf4fbfc84ae56916460e9",
- "dist/2022-01-28/rust-std-beta-mips-unknown-linux-gnu.tar.gz": "82939695d5bfe904481e3858e2d203d56f0877683ebfb33326ab9d0699ff2c5f",
- "dist/2022-01-28/rust-std-beta-mips-unknown-linux-gnu.tar.xz": "f337c7caee2e964926801811a282e4f18f4e196521ddfa81417ff6dca46927c4",
- "dist/2022-01-28/rust-std-beta-mips-unknown-linux-musl.tar.gz": "e7256b993f54fc5b7aa68c8aa5e5f1294d82681f0b8b38c7f7ed6e1d57064af4",
- "dist/2022-01-28/rust-std-beta-mips-unknown-linux-musl.tar.xz": "00bf1b30ac924ca221569fb2febf34593ca435540163d12ec4e433a7406c2819",
- "dist/2022-01-28/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.gz": "6d2c2d9b82d95d808a23e99e0f9b828d9087fe82efeabce200ea7634636857da",
- "dist/2022-01-28/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.xz": "e504cbcda58085ad283dcccf4aa5160a117aeef01f4017ffb4350a6e3b18113f",
- "dist/2022-01-28/rust-std-beta-mips64-unknown-linux-muslabi64.tar.gz": "c382edfa08997d2c5d400ca9c93eee9457fdabf157da2306187af68a11cd3705",
- "dist/2022-01-28/rust-std-beta-mips64-unknown-linux-muslabi64.tar.xz": "616d4daf1ed58c7718a204da636d96597d184ecdc71b414a9b20e5fef710c078",
- "dist/2022-01-28/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "5d24d7be185cb8fb8bdb1a89a63be323491284d2e9bb191104ef59a547e3899e",
- "dist/2022-01-28/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "c055f2f3d77354a9d03276f7af8221e3c8a337b11198143a31b6b654e8bc4f28",
- "dist/2022-01-28/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.gz": "ae730a78c7382af9c16f0b4bc157f339bf8befced1748b955e29e0db751cd5cb",
- "dist/2022-01-28/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.xz": "18f02642733d06bfad35e6d383e6634a22c79dfc56f6b6f1976a5bf71ca36478",
- "dist/2022-01-28/rust-std-beta-mipsel-unknown-linux-gnu.tar.gz": "cf162ecf50f6edddff265f5e051719f8c15c730f3826cecff3477d5c63f3f28b",
- "dist/2022-01-28/rust-std-beta-mipsel-unknown-linux-gnu.tar.xz": "f82bf7eac361cfd2b255c3eb1f2ba4e6349fe5f88d6e6e9edee0aa7e9ae4e721",
- "dist/2022-01-28/rust-std-beta-mipsel-unknown-linux-musl.tar.gz": "30e48dc0b5c8cfb1d3fd18e06ca19f7136aae366cc9e2b142999d8a0430e3513",
- "dist/2022-01-28/rust-std-beta-mipsel-unknown-linux-musl.tar.xz": "7db67dfd175d398f4e922be87002cee22e7badc661ab3ee4aba7c7e9673ecf0e",
- "dist/2022-01-28/rust-std-beta-nvptx64-nvidia-cuda.tar.gz": "d72d9066354bf5f2daddd8ca00f2221c897142e68b7e8343c6c965e5537ccb10",
- "dist/2022-01-28/rust-std-beta-nvptx64-nvidia-cuda.tar.xz": "eb5f848052e0ab07de8aec5f767d6d4413da0c135ce02e766d125da5850a585f",
- "dist/2022-01-28/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz": "6cf15da4eee99e1b89f2306ffebebce537543f08ef36f3a8aad38b0202bf1378",
- "dist/2022-01-28/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz": "b35d2296994172b05ffd0bb3bb59cddc007ad93cc089aeb1f8b4a2d7a1d716d4",
- "dist/2022-01-28/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz": "819327e4a040bea527712ac2d935b2db9539262a9e552450144b9829038db48f",
- "dist/2022-01-28/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz": "68cd8c861a62931feae04eef5a3ecbb9bdd97433d082cae060e005f1da6523f5",
- "dist/2022-01-28/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz": "fc1459aa99a44895a0631a35cadd7c8683b7570fe0a743e0bdc7f397936a377a",
- "dist/2022-01-28/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz": "702b008b7390df74ed639b99133abbc5c0441c002d4d99594c9c56f46e13e518",
- "dist/2022-01-28/rust-std-beta-riscv32i-unknown-none-elf.tar.gz": "45dea87501465e6ec421f7a9a6a364fb4bbe7f6e6c00aef16bd66b58a204ed18",
- "dist/2022-01-28/rust-std-beta-riscv32i-unknown-none-elf.tar.xz": "f7d5178e5b2514e52336dd3d4dd7ebe7f452e6427ff578d19f955d611625c2ac",
- "dist/2022-01-28/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz": "9c7b727799288d289f7569823b4f75c691d42a2c25066f742e74efcb1e9e7c31",
- "dist/2022-01-28/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz": "536397a308e268b30a6bd1a2a869ade61e0d048aba76b9787b130c5d8ede7d12",
- "dist/2022-01-28/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz": "21397afe74f4a3611e91c4e9efede79d3cf982a13d1b864c878be7d3436e3129",
- "dist/2022-01-28/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz": "3c61d50eb15c56087ab9f9cfe765586a2fbcdff93d60740a75bb435dcd18619f",
- "dist/2022-01-28/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz": "7f654430af17b09cd974e35f6c99b1ff88fad706e659fe9d48ed9cb765722278",
- "dist/2022-01-28/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz": "9d7ee3d8dd1e93c754e2991f656acc2a03e88b9ee2deaa865c83fabe05aa5618",
- "dist/2022-01-28/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz": "47ea53de8215c251bb206f81ff6e8ad2d632e9f74e793d36db00d8329e7f4dea",
- "dist/2022-01-28/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz": "56c033b71340b5379a59dfc0219bb5350a3e95aa22983c0bbfe1cad6b347718c",
- "dist/2022-01-28/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz": "3902efc5f212d815a77d39211a7ad662c2826857bde89ec7c0f6411745531e6a",
- "dist/2022-01-28/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz": "f9631edc7899d7f71230483caff7215a423b4ced12a963e41dc0e268301c4565",
- "dist/2022-01-28/rust-std-beta-s390x-unknown-linux-gnu.tar.gz": "e1006abf94a35dc9eed587cde1eef3bf35ce0e685f4040176c2460df4ef71f69",
- "dist/2022-01-28/rust-std-beta-s390x-unknown-linux-gnu.tar.xz": "34f5901fef0845b5da92f3a49a20d533b6bcdb77cbfd9d8432eac8aa47b28675",
- "dist/2022-01-28/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz": "d3a63e5ba55d291045562d95d27cfaa6f116ecc72ebba39ff97ee8e960030de1",
- "dist/2022-01-28/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz": "f9b7b16aa77ac7ca1e8384d74c5cfcb66626cc57eede7aff1da4cdb7ac13942d",
- "dist/2022-01-28/rust-std-beta-sparcv9-sun-solaris.tar.gz": "9af8b18ab6089bb2e06ea33a17a44ee98cd0ac3c54b688f5848d4cd141ff2389",
- "dist/2022-01-28/rust-std-beta-sparcv9-sun-solaris.tar.xz": "1809d88ac573ea265f3d21d4142d0176ba9ab51e789911825a9d72ca917ddfd1",
- "dist/2022-01-28/rust-std-beta-thumbv6m-none-eabi.tar.gz": "5a1aeb44ca3b92a37eced85edf374d2ffe17ba6f6da748580baaf3af1c3a8a36",
- "dist/2022-01-28/rust-std-beta-thumbv6m-none-eabi.tar.xz": "7d3cdc3b7b3d9d47aa0d1d6de4fc5f520ee99c52b4678fc3987823efe4e1ca98",
- "dist/2022-01-28/rust-std-beta-thumbv7em-none-eabi.tar.gz": "a950ffaf7228864eb2fd9570bb86a5544f89f8293a3e96f794d36eaa7e9f8825",
- "dist/2022-01-28/rust-std-beta-thumbv7em-none-eabi.tar.xz": "527be16c3474ab25c3ac56aab6278a3d4f1b535bee0c226dbf63e52f5ea2acf7",
- "dist/2022-01-28/rust-std-beta-thumbv7em-none-eabihf.tar.gz": "fc864b408f7d8688733b260b7ca2f476f148a0c04cef15b4b99348fb59627ce9",
- "dist/2022-01-28/rust-std-beta-thumbv7em-none-eabihf.tar.xz": "3a966b6343c75933d00ead88f54e797aa81abc1b521902d15c22d44791b33e71",
- "dist/2022-01-28/rust-std-beta-thumbv7m-none-eabi.tar.gz": "4ab03955b4b787f5d2b1096e03aa4b0948a2a53562107ef6f9cf0ae122668b86",
- "dist/2022-01-28/rust-std-beta-thumbv7m-none-eabi.tar.xz": "2c0e443dcda563ff4cad6285ea648797bca6ce828bfed66f3b868fa386a0a693",
- "dist/2022-01-28/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz": "831e7af7924d20ba5289a67d6f0d55942f624ad1abb997a90e05fe303c442870",
- "dist/2022-01-28/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz": "e99648317cc93eb4e3e807dc85b28bc6336136750caa9ae000a8041e93d1a9e1",
- "dist/2022-01-28/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz": "37db1b82732ee477e4bd8f1d430ca0f7b50f9699285188cc4c55efc024c760f3",
- "dist/2022-01-28/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz": "5dfd285234f1f9da127b7ae7f823facac9f6f281713b5502268ff75668ae8a6e",
- "dist/2022-01-28/rust-std-beta-thumbv8m.base-none-eabi.tar.gz": "22c21d88398dcc6dff166270e455e6a4be8bc06b1932f4138ce8c931e3a900f6",
- "dist/2022-01-28/rust-std-beta-thumbv8m.base-none-eabi.tar.xz": "2eb7e4dbd9984ca60746af13c631871c3d872b95239c422d135de2bda203707a",
- "dist/2022-01-28/rust-std-beta-thumbv8m.main-none-eabi.tar.gz": "97e6b0834227d725660d6f9729b198ddb70ba238640f2a43de4568230ac7bf5d",
- "dist/2022-01-28/rust-std-beta-thumbv8m.main-none-eabi.tar.xz": "e9b06591f4769bed69b6be6647deded3991125c0a5bec5486126e6572707fd7c",
- "dist/2022-01-28/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz": "6afa229d0a1159f853a13f0ea36c4dcb8bf964bd699ecafc57539a1391861591",
- "dist/2022-01-28/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz": "5811a551c8c19b09f6928aeaa655c69f32657775b9149e4fa37a5003be15faec",
- "dist/2022-01-28/rust-std-beta-wasm32-unknown-emscripten.tar.gz": "522e98515cbedd4b75cd2a3151d16517d71d8078005c3a1133e6e222dad163a1",
- "dist/2022-01-28/rust-std-beta-wasm32-unknown-emscripten.tar.xz": "2654caa437d1f1871db5400652287597bec88eb366e099b03d7cca70367d3722",
- "dist/2022-01-28/rust-std-beta-wasm32-unknown-unknown.tar.gz": "c18dfcedf25851f446271979b868bcd8dbdad2ca2a4762f3594385d65811d449",
- "dist/2022-01-28/rust-std-beta-wasm32-unknown-unknown.tar.xz": "0dc5da1073e3df2899909045c33c4aceb9b159faf7a20c2e32affca7e7587554",
- "dist/2022-01-28/rust-std-beta-wasm32-wasi.tar.gz": "e6e03121c99326cb56bb3a6f6eb352cadfcc487b20f5a7e1b95c5c7f1c97feb0",
- "dist/2022-01-28/rust-std-beta-wasm32-wasi.tar.xz": "8cf642cc54d22908a3db701a1beb13aa43143857596f4965261cdfa35812cfeb",
- "dist/2022-01-28/rust-std-beta-x86_64-apple-darwin.tar.gz": "e3065e70fcea7f03ce4ae41742bc6540ee2e0df50501d8ed81215d0ca4c63f9d",
- "dist/2022-01-28/rust-std-beta-x86_64-apple-darwin.tar.xz": "e5e683cc14760ab0f94c4f02b721e3cb2c0c780ab68e63c971de70355c30d2cb",
- "dist/2022-01-28/rust-std-beta-x86_64-apple-ios.tar.gz": "b31791d217e4868caf88fa4c96c3476a4c65bb8ab59e8846f7e2f4f003be7cc9",
- "dist/2022-01-28/rust-std-beta-x86_64-apple-ios.tar.xz": "24dd9d59c9ecfd0c7a56143a9e0368b077d61ac7d9c56cb940e8b195fb5ccde8",
- "dist/2022-01-28/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz": "15bad901b51a039c70dda2379eb1cbfb7098ed00415924ad19fb9318f176d34f",
- "dist/2022-01-28/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz": "6fd144e0d7cf510f5df11798d9e8f2faeee52d9dd5134fdfb90fac2adb9c1d21",
- "dist/2022-01-28/rust-std-beta-x86_64-fuchsia.tar.gz": "f22276c2c07074dd8f3634f95eb4422ca1a2ddb89e22e05450c77e59676445f9",
- "dist/2022-01-28/rust-std-beta-x86_64-fuchsia.tar.xz": "fa745d421e36d9255da6e69ae4adf968910200f99394a8ca88aa2917b0931758",
- "dist/2022-01-28/rust-std-beta-x86_64-linux-android.tar.gz": "b6924656e61295d96c5c792cd482435248867a846000d232f8895b983f2fd68a",
- "dist/2022-01-28/rust-std-beta-x86_64-linux-android.tar.xz": "58b981335322b7f5f11ecf71411b9b7fe045d160fb99b1f8a452d0d833926461",
- "dist/2022-01-28/rust-std-beta-x86_64-pc-solaris.tar.gz": "559721b2bf60bbd7688b8aeeccdd3d6c92eee2eaf29082f42ec53689f2fddb92",
- "dist/2022-01-28/rust-std-beta-x86_64-pc-solaris.tar.xz": "c6341953f2a9d11159e3bf398b90cf9e76af4b6af7cd6d828b22661bc4f3fc5c",
- "dist/2022-01-28/rust-std-beta-x86_64-pc-windows-gnu.tar.gz": "59b91baee1eeee88c78b55ac3a32ce1cdf59107715a3db7c3476843ea981b70c",
- "dist/2022-01-28/rust-std-beta-x86_64-pc-windows-gnu.tar.xz": "2f7bd143bb9f40a06e69b5f9908ab14e364db254918dd1c984c272a853a56f0b",
- "dist/2022-01-28/rust-std-beta-x86_64-pc-windows-msvc.tar.gz": "1258d1207468450556a0a265342e5155474a7f87e8c33b5233c72a959b13421c",
- "dist/2022-01-28/rust-std-beta-x86_64-pc-windows-msvc.tar.xz": "907d14ff6bb742f2bf12f4b51054c8c6bb128cdaee957918e4fdeda61ac18c53",
- "dist/2022-01-28/rust-std-beta-x86_64-sun-solaris.tar.gz": "ca0cef7d3497ae9714537bbdd2469b48afb20ba1dfecf03d680e801871a3ec97",
- "dist/2022-01-28/rust-std-beta-x86_64-sun-solaris.tar.xz": "73eaceff8046cdb76ccb7a6739f01dfff5b740ffdf5366067e92814be5ff97a0",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-freebsd.tar.gz": "bb8671bf78ee0c8840d453af9ca0d337c167d69c293e4710d6aac2d19c3a044b",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-freebsd.tar.xz": "87cdacf1caa7fb3656be04fb3b37f21541b2e8eed214bb5822c0723fe9f23067",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-illumos.tar.gz": "7dd006b93c449864bc3c6e024e0f0903db1c422b6bccb1bd1ee8187fcbb4e3d4",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-illumos.tar.xz": "7d77712a5d07578e2f9947ef11ced00a84b22d3075f747781b6c0e0483bd7fc8",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz": "5f6fb2124a40f0a7ed2631b59f67762d701c9fd8ede051dc922d99ac6fe29c97",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz": "e00f0da85fb8378dac3ae76f235f54cca568680d4208fed065143e1ecde1b87d",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz": "d2d0222ba528a42d8804423c15cac59a5c37e36b76248605dfcf9d732cceb1de",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz": "d2c8cf8510369513fd79107bd450df429a97f5bfbc59ef8a7fea5fbd75462a65",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-linux-musl.tar.gz": "a7934e15342434f242ea7eb9c9c853a984f70befaf1cf2266cc5a198233a2337",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-linux-musl.tar.xz": "bc5de5c3df04aa3aaf4866e432b3b50dafaf790345587eaf066334f7f52ff34a",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-netbsd.tar.gz": "9827751229decaf827c8bbbbeebe868c86d7002a82d776f0ecf310d539eb285b",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-netbsd.tar.xz": "88d41e6fa0d290fd39470f824045abdf3557e0028ae877c9c4081231531dc8cd",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-redox.tar.gz": "5b1c8bed24c4bee0cfffbf54029e39673545a314102be2281018f8bbd05a9d17",
- "dist/2022-01-28/rust-std-beta-x86_64-unknown-redox.tar.xz": "3bc2a98b43bda5080734ba0ad1235e72a3e12e3bbb5c603193aae3a18feeee1c",
- "dist/2022-01-28/rustc-beta-aarch64-apple-darwin.tar.gz": "be36422d10d4dcbc618eec2dc33ebd62c16e366a0bcf8a4a3b9ddf5bfe236bf2",
- "dist/2022-01-28/rustc-beta-aarch64-apple-darwin.tar.xz": "cf6e5b5475733dc71f68c8d8b08556d410c3f2bc87813565cb9a69d0984fdf48",
- "dist/2022-01-28/rustc-beta-aarch64-pc-windows-msvc.tar.gz": "c2eff28806e697087a39da7922ede30b937110d1e492ab839644c695c02ea467",
- "dist/2022-01-28/rustc-beta-aarch64-pc-windows-msvc.tar.xz": "ea9fda833ade80ef87afcf3cfdc0ace851c01b66b00701d70722ba9aab1c9d0f",
- "dist/2022-01-28/rustc-beta-aarch64-unknown-linux-gnu.tar.gz": "e9e37df47dfb3bcbae3110e0b372ae661aff82d5e6a6837deff78978a85dd2f3",
- "dist/2022-01-28/rustc-beta-aarch64-unknown-linux-gnu.tar.xz": "f11adc9a47432ab4ecd0e95c8fbde21c493dcac730ac9bcc924e096eacce6b94",
- "dist/2022-01-28/rustc-beta-aarch64-unknown-linux-musl.tar.gz": "6279fd872148c28c0684d7dbfd6e96838fff8acbec83c45e235e85f3d68802de",
- "dist/2022-01-28/rustc-beta-aarch64-unknown-linux-musl.tar.xz": "c969e5c760dda90fe23cf8df764601c38ada25a2d7bed0d497f31701c7bcc62d",
- "dist/2022-01-28/rustc-beta-arm-unknown-linux-gnueabi.tar.gz": "d4025f62b09f94d5c464fa6bb614186e9968c6b34f5a12544ee35323426eae19",
- "dist/2022-01-28/rustc-beta-arm-unknown-linux-gnueabi.tar.xz": "992d055af2f888d2c61e5aa1670ef40a8bf7ac761cf6ecf76d7a8d13b3eb9a0c",
- "dist/2022-01-28/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz": "ab153065e0db468cdcab3a3a251d0f80a7d94940f3455db419b3a3ae5bffb651",
- "dist/2022-01-28/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz": "2501ad4358112e7acc736f9820d6f822bd985acd577e56c124573082a8e26cec",
- "dist/2022-01-28/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz": "3e145f4111fc7835949b6ba34d0ed7a58605166cfcde22d96d2e8dad3f8c65ff",
- "dist/2022-01-28/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz": "948f13b6f988072c707cf8c730abf970d6b47d4fb6044d4f6b615b48c21369c1",
- "dist/2022-01-28/rustc-beta-i686-pc-windows-gnu.tar.gz": "997ba934c0bc912df01906b547f240f4cf7036300cd34ff341e72b69502b1cab",
- "dist/2022-01-28/rustc-beta-i686-pc-windows-gnu.tar.xz": "c0ef12248f08da0f88629e55ab805b637289e7a29a92bdec5cdbf138df272baf",
- "dist/2022-01-28/rustc-beta-i686-pc-windows-msvc.tar.gz": "94e6df381784d4f7bd9c8cbff39fe3066d636c64257093563f84a59ee84b686b",
- "dist/2022-01-28/rustc-beta-i686-pc-windows-msvc.tar.xz": "ce392e7c1942f3267b029faa1f06a4162c3a21316ad819fa218a0ddbd9993b79",
- "dist/2022-01-28/rustc-beta-i686-unknown-linux-gnu.tar.gz": "0809b22fc64166ed66a32090c3af49bf3b1515d9aa37958d1bf4d8edeef67bac",
- "dist/2022-01-28/rustc-beta-i686-unknown-linux-gnu.tar.xz": "6a24a429d45b5558ebf069b0ea730a8b2c0f8cb8e8247d3e50739b5c6a06f45c",
- "dist/2022-01-28/rustc-beta-mips-unknown-linux-gnu.tar.gz": "af3ff96546ae18359f529f35430c4faec41e411357a74e420b5eb6e939e56f9d",
- "dist/2022-01-28/rustc-beta-mips-unknown-linux-gnu.tar.xz": "40e578de34500ac7bfd1513187894787b9a2a13e1cffbfb4a3fc04779e8f564e",
- "dist/2022-01-28/rustc-beta-mips64-unknown-linux-gnuabi64.tar.gz": "9b4eeabf21940541791b768db2995c2fcd0f3aa4077f741df941892e65c03e1a",
- "dist/2022-01-28/rustc-beta-mips64-unknown-linux-gnuabi64.tar.xz": "15940aaeb1da2bd7c3a5f4a3a76c90018a5d38bb933fa516b9833d3b5c9bc465",
- "dist/2022-01-28/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "e2d93d8ab7f3a43be6bed773a5afc1ce0b43c15ddb6390a34facb920dcac6980",
- "dist/2022-01-28/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "1ce438ec11c7d5912a348bd08fd9a81cd77e7ae9b221ded4473dd203fa5507e7",
- "dist/2022-01-28/rustc-beta-mipsel-unknown-linux-gnu.tar.gz": "537928c967794a4b0b6fb3c6df138aafec1c26a5bc608089cba5b2ee2fb3679c",
- "dist/2022-01-28/rustc-beta-mipsel-unknown-linux-gnu.tar.xz": "1ac3144f0ed01c686adb813e5f59ba9f07522161269928d852abf886f8beaa8f",
- "dist/2022-01-28/rustc-beta-powerpc-unknown-linux-gnu.tar.gz": "23d6bddd60b9615b9b2dcc711587eb73022905f4f84db0b85433fb018db9fa90",
- "dist/2022-01-28/rustc-beta-powerpc-unknown-linux-gnu.tar.xz": "172bf1d122830c06caae2879b0f175829938a6a043c39fba39ae2684632cec8f",
- "dist/2022-01-28/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz": "df0f58797083a0fb07072237932d6ef30035df227f347976e766dfba0b4d16c7",
- "dist/2022-01-28/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz": "951a378b2bd9e8dd60cc5813664c6a7b020e256b5efe88dc9ffc776c9bb9aa5f",
- "dist/2022-01-28/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz": "93fb7cd91ff9e530d6eae0496d6456aa48cb6a7e81dc118d40fa5db84324e0ef",
- "dist/2022-01-28/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz": "e0facee99193bcc891feb961a2eded35b4bd40f80b5fff977fcc48f7e7b26b84",
- "dist/2022-01-28/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz": "d6c9a1014fe73d03ba7fe5248e84fba7abe46b96f61cc45a8972d0c85f577cc4",
- "dist/2022-01-28/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz": "1f9f65bd07e075d4c7065d860ffa09441210a220abc4f6c0302de1cba4b56ebc",
- "dist/2022-01-28/rustc-beta-s390x-unknown-linux-gnu.tar.gz": "0f73fe2bda02e6b9e0f17b8907571d11c622df6b9349ecb60b8d28fab0090f45",
- "dist/2022-01-28/rustc-beta-s390x-unknown-linux-gnu.tar.xz": "8b1b8cb25ab0a00213b4272390175d91b486cb08e45425f52a8ee1104bc11efe",
- "dist/2022-01-28/rustc-beta-x86_64-apple-darwin.tar.gz": "a6fa895d1debcbce04c68c64fac8ddf875f6c4e8d7298ec4e46e79cb702e103a",
- "dist/2022-01-28/rustc-beta-x86_64-apple-darwin.tar.xz": "a0dc92f6a544b215f1b8cf71dc21fb26423883baa24c551c96c250bf05b21c99",
- "dist/2022-01-28/rustc-beta-x86_64-pc-windows-gnu.tar.gz": "867038c72a56f889420bba6f1946ea560a328a79dd54b70caa8d7ae83712ad54",
- "dist/2022-01-28/rustc-beta-x86_64-pc-windows-gnu.tar.xz": "a59d3409f4ca6f534608f5fe709ec6442e253f8d9400b9169814c5273765bb72",
- "dist/2022-01-28/rustc-beta-x86_64-pc-windows-msvc.tar.gz": "e07ee24da341ae8fb8fe55f895ca5fdbedfc392454906396c61d79f1f5cac631",
- "dist/2022-01-28/rustc-beta-x86_64-pc-windows-msvc.tar.xz": "668aa9303bf8a90c90167b6ca4a9a8a885d5ba21bcbacc379c3ce9b5c1a2f7d7",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-freebsd.tar.gz": "5e9b6a14feaf665839070f20a795ce2ed1c11824a56264fb35de5e894f7e2c13",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-freebsd.tar.xz": "3506fc1b57f8da75e93f48d00c49f4d0cdf61b459955449a87d1a7fc051c40dd",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-illumos.tar.gz": "b30f734100da20382605a98a70d3b6c34febdb11e105fc1a1639ab7b1338545f",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-illumos.tar.xz": "0b1ca988d1e25423d49f92acb123e8f91ca6772418d2bf4411e4fc1387410c5b",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-linux-gnu.tar.gz": "9320b51f221d9f875a98455fee8494d09318aa0aa90946e1fc03b73173738bb8",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-linux-gnu.tar.xz": "374ba55f3b7d1c6dfaa3385e7b033612335eaf01fa0d06eaeab95cc00503617b",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-linux-musl.tar.gz": "556428fed3c5b92e001fa9b762915583004e0e3384d1eb17d08bdbb07eff1a91",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-linux-musl.tar.xz": "5122a66d96e89e7f31e04604792cd26f7cf687d007d839732ad8ec3c32546014",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-netbsd.tar.gz": "689e0892a575b507032bf4948319fb0706f3d58da7ac55c40560edfb85fb617b",
- "dist/2022-01-28/rustc-beta-x86_64-unknown-netbsd.tar.xz": "8b1fda9cb3779af899b6988225a4d89a4b3b5f5ab696c0178c82ea5730f4503d",
- "dist/2022-01-28/rustfmt-nightly-aarch64-apple-darwin.tar.gz": "d10e91d44175ed8841bfaa0ac36641e5b5fd9f562a69634e1dc8e74937f6b910",
- "dist/2022-01-28/rustfmt-nightly-aarch64-apple-darwin.tar.xz": "26ddf37786bf057527b1ef72580b09f5ab2954046699e5ea8d773ff833d938c8",
- "dist/2022-01-28/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz": "59482a7e368c63812aec689c9b9575c267273c1e2096bcc5a1bb0e4fe87f9703",
- "dist/2022-01-28/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz": "b7aae7502c13cff81125b8960b06eb808b1ad51fecc311f7cfb02b5aeed8a0d9",
- "dist/2022-01-28/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz": "28dcc5231402b7c71d0a741878ff0c64fcd37537889f0a0ab5e04fdb2001c3c5",
- "dist/2022-01-28/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz": "24d0e5ef0a8b5c7359243a0ed06801281782ba2fe4ee315ebcc53ce78e84d338",
- "dist/2022-01-28/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz": "4f7ed5c1e05a7e903bcbcdccae8da1f296ec182f56c4bd29c38cdee2c022b20a",
- "dist/2022-01-28/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz": "c5bbefb41d4ca4f376431d64fb15e250d5dedb8d4ff220f19532fbf7c24fb627",
- "dist/2022-01-28/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz": "ccb65098e45ead43ef62b4b0b10dd552d4cf23786b9639ac665612d458c4eea1",
- "dist/2022-01-28/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz": "5674d7e984b0fbb51e927d991296411cf0da46465eaaf86a58b2ba81d801cc92",
- "dist/2022-01-28/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz": "a6f868aa17cf4c8734f800451f33bc55d38bf6fe4d658714f469416b86fdf911",
- "dist/2022-01-28/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz": "acf5681ce5f75bd807aeb23964958d77b5c77a3cabe51d102aeab22c99bd1d24",
- "dist/2022-01-28/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz": "e973affc0149d03981875496ae8aea5d7eb5b5a8fcf42380589a3c5f49e7f9f3",
- "dist/2022-01-28/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz": "7a00e48bae6d388c0514537429d17b31a316ffddc1bd3d2c6651babec8d2787d",
- "dist/2022-01-28/rustfmt-nightly-i686-pc-windows-gnu.tar.gz": "e3169c339cd6cd1a9355c4f55281f32ab78e60ccad46129b1848135cdbab1f25",
- "dist/2022-01-28/rustfmt-nightly-i686-pc-windows-gnu.tar.xz": "0ae17e2d2ad1a03de08f8462c462888e6c72e36d9d7e4737e85ad9890eff3a4e",
- "dist/2022-01-28/rustfmt-nightly-i686-pc-windows-msvc.tar.gz": "c884249be750942fb19da009dabc296438be4e25c872b548c7cd501135367030",
- "dist/2022-01-28/rustfmt-nightly-i686-pc-windows-msvc.tar.xz": "8b92f8cf72c3289d4be864dd44ce230ff3098f52b16215464f34451dd16f4b9e",
- "dist/2022-01-28/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz": "31e97a0e6b1078a2bd78ac92c5861ad5a6dd91c4f819c69e2c07e3941ab893d7",
- "dist/2022-01-28/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz": "d36fbd52792645198dd0d2b8fd7b5389931e101313ed0c3793370120a58f5ff6",
- "dist/2022-01-28/rustfmt-nightly-mips-unknown-linux-gnu.tar.gz": "b3384f0e386aa2b77def7cb36906a3fdbc4ada92fab50deb923561cf6043b98a",
- "dist/2022-01-28/rustfmt-nightly-mips-unknown-linux-gnu.tar.xz": "f728634605fd782ca173c6be41c4ab9eac5b036419e2d33513d1cae197367834",
- "dist/2022-01-28/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.gz": "07404280a97ac98597ced7de15856dc05b855123058984aac3f0b2ab896bccf7",
- "dist/2022-01-28/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.xz": "02de9fa0ee4334af980cd25a4bd467ffbc275ee0871224b84f9549c23f922bc1",
- "dist/2022-01-28/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.gz": "81bfb88af8c591d32508986d7ff96261b0d84eacb8303f614fcae9095a25fbdb",
- "dist/2022-01-28/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.xz": "e7bff69f544d999c4b2c27071c049dc092df47431e658a9a8f07c7e2cc08c8d4",
- "dist/2022-01-28/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.gz": "d1d7081173f89fdd287f6b5010ab5787198c504cba5de4bf54f8473777e20bfa",
- "dist/2022-01-28/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.xz": "d77625ec03a2e0101fcb743c440dd8e21fdafbd04bb652ee4db6c365e0e0ad49",
- "dist/2022-01-28/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz": "80143957513b49c7d3f4e113e86a9181cda78f2b928f765b3f4060fbd9bf44f7",
- "dist/2022-01-28/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz": "7d9ad14154b99fe9e82e6fd59884b9bc1c3d379c16c376f990dda859d3b86fdf",
- "dist/2022-01-28/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz": "897629dc734984e2ff984fd911f6b02fb8d3d9e4ac70bb209981226d27800392",
- "dist/2022-01-28/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz": "9bf72e0f71a81f2afb66ecb5bc242b349d92e8b9f51249f52de172e12281fcfd",
- "dist/2022-01-28/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz": "89893ed9bd3c2ec611d54d44aac79379db78dd1c4994747e5a6e55cb779a1d1e",
- "dist/2022-01-28/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz": "f7b8ca2f4afcabc178f166161c0c006fe0b8eb16455fa8a2fe7d8429718d65b3",
- "dist/2022-01-28/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz": "90aafc241355240df41729288bcd61aeb61c792528570f643f5e9fe34a33ccc6",
- "dist/2022-01-28/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz": "7018db141ad7b1960640245034efc233a267b05cc412a7969ccb26d87b46c49d",
- "dist/2022-01-28/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz": "b986c3ecf6d5e6683f44efbc24ccb1486e42514c695e3401082c396caf26a69d",
- "dist/2022-01-28/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz": "8c4d895c603bb875f24fadef68f0b19b5c390640ee170dcf41bdba07d79a4f03",
- "dist/2022-01-28/rustfmt-nightly-x86_64-apple-darwin.tar.gz": "7c95e4d7c161eea4af6f59f6ff69829eba791dae1fe18cd2a18a5b2c1fb1190d",
- "dist/2022-01-28/rustfmt-nightly-x86_64-apple-darwin.tar.xz": "51f32b5abbaefb3590cc174c909ea2b80cb15fc1c2cd6c60e749035d9899c5dc",
- "dist/2022-01-28/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz": "aaff3042d48acefad9fd012a7c44148e6503dce61c2eedbd06d025d35d086ff6",
- "dist/2022-01-28/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz": "8811d63c78d7b3bd6ee4b7b735fbce58cb13783d1d12b16c6cd584f518934a4b",
- "dist/2022-01-28/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz": "7d526137c7437d9d2bdfa8e87790b038b053805e9528a8b8b9c6827d5d0ce64e",
- "dist/2022-01-28/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz": "84c8c33267286b65acbb8c1a692d410ee49ebfec708cd3cf35013b76c87ec292",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz": "4e52381a3c7acd8435bfcdd45de3a238916985dc7c746615847381b7c2f3fab0",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz": "4979e2ca9e1bb42635b0d633b26dcd9d9265698bbe10320daf464243a803d100",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-illumos.tar.gz": "aea87359d72f23a27bee9763074301d4e4c85c5e91cc1c18c16c8477b52ff9c2",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-illumos.tar.xz": "6bcf6b03d018964d63c20782d01f8fa832f5f22a8eb719d59c93fc18510804a5",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz": "651db4ab2e12f46771ca41f1344d145d8163d5fa02b974b0ad07fe011219040c",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz": "d774f9b51f5a25b32b37b933c898eaa420d51a7ccf0277d1b980ba69a128db59",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz": "39c5c15b939ca8d41af51945e4c9aea6a8011564bfac8e71dee7141a237e7499",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz": "3fd188964c03825728fd6691210a44c715651010305436056977b15a03989b75",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz": "835877a13df7d811f5cf6f5d983a43be03a7cf831a0135900e484c1c6cb2da33",
- "dist/2022-01-28/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz": "616f16ce1e5c4b50a7bc19550886cab1b861d0b925a7fab4b4d73a37e40552ed"
+ "dist/2022-02-22/cargo-beta-aarch64-apple-darwin.tar.gz": "5b23653987a4157a80be39e7c3560f79b1b40ecdb30ae156170e02f659020e78",
+ "dist/2022-02-22/cargo-beta-aarch64-apple-darwin.tar.xz": "f2e8b34a2b57d9aa876b60d081689371aa2802e4e6ea38329785f2cba3c40dec",
+ "dist/2022-02-22/cargo-beta-aarch64-pc-windows-msvc.tar.gz": "57d51d004175a2c05892b4edb347300c42cf5764d52f6aabc905e8cd8cb60330",
+ "dist/2022-02-22/cargo-beta-aarch64-pc-windows-msvc.tar.xz": "5c0c7698b31394e531dc005b48b6ab78dbf74914cf7daef8e7cc41791adaa061",
+ "dist/2022-02-22/cargo-beta-aarch64-unknown-linux-gnu.tar.gz": "1257e6ba753b1328a22730b53da7db3064797d4bda5e02ee79566bec31cf60c3",
+ "dist/2022-02-22/cargo-beta-aarch64-unknown-linux-gnu.tar.xz": "12289ddd9564f7bd25eadfb182d67fbff275244faeb281d918998ba578f5923a",
+ "dist/2022-02-22/cargo-beta-aarch64-unknown-linux-musl.tar.gz": "8d4d767930996e35c66b2208056b3c57da7cce642650ff3e12ca3e7f8c612d9d",
+ "dist/2022-02-22/cargo-beta-aarch64-unknown-linux-musl.tar.xz": "a0e0ceeb786273d33d79e939e6aeb015d1e960c88675bd582815ff31312c0948",
+ "dist/2022-02-22/cargo-beta-arm-unknown-linux-gnueabi.tar.gz": "bd92f426ee10d84d162a78955e29d4da7c4c76808d17a81ad599777e76dc8869",
+ "dist/2022-02-22/cargo-beta-arm-unknown-linux-gnueabi.tar.xz": "844c40ed33b03d1cd7a0a82995ef02e33a450155cf1bab36e7b5cddf61ce7ebf",
+ "dist/2022-02-22/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz": "0a8e1a8ca38be1356aadf8f6e2f51d2b83ec27c87f3c63c0dc85dba5337b3139",
+ "dist/2022-02-22/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz": "de54fbd0cdd17e74e576fc1ad2147542fb82a845ac336c7efb284c6ffaab21c9",
+ "dist/2022-02-22/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz": "561b7566dd155b6ea6ae2dd1f6de6ae49b3104df7f6ad5bba59e2505e4a2386b",
+ "dist/2022-02-22/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz": "eff55c73491c83b109c2cd4e67f8e82314ddd9abcdbfcc358fb8c2423b31aa8c",
+ "dist/2022-02-22/cargo-beta-i686-pc-windows-gnu.tar.gz": "3766d773de8332b0b6bbff26bdbeb090eaddf12badc37c91280cf26825400796",
+ "dist/2022-02-22/cargo-beta-i686-pc-windows-gnu.tar.xz": "55e3553aacaab2139e15d231cb7c328f3abedf6c7014be64fab98b657b12dff3",
+ "dist/2022-02-22/cargo-beta-i686-pc-windows-msvc.tar.gz": "b59118825ceee16f18a73de57da9de3db35715d9c53fe50c9dd3eaaaac0cf234",
+ "dist/2022-02-22/cargo-beta-i686-pc-windows-msvc.tar.xz": "f530b478e8de8a1e23f73d0a7f9467835c02f5d5c29cabcaf6b7c8191753d23d",
+ "dist/2022-02-22/cargo-beta-i686-unknown-linux-gnu.tar.gz": "40354386ce0a62ae2851ed9cd82e86ff7da8fbce0a0232ba63b71b1ea583af8f",
+ "dist/2022-02-22/cargo-beta-i686-unknown-linux-gnu.tar.xz": "d480890b820adf734e4c952e7fc78636b679684ed9bcceb73c4596fb1d45c8e3",
+ "dist/2022-02-22/cargo-beta-mips-unknown-linux-gnu.tar.gz": "36575bdbde3af9f33467608d123b145a35a708c6814e8e66be3736cf38fcf4b8",
+ "dist/2022-02-22/cargo-beta-mips-unknown-linux-gnu.tar.xz": "977da6dd9a6865b125222d0a2067d95de6dc1042533df14bb8598e3160cd26f8",
+ "dist/2022-02-22/cargo-beta-mips64-unknown-linux-gnuabi64.tar.gz": "bac180c4c4d26acb42916f489abdc9bcc98683de2f9437ef56b00b624338db74",
+ "dist/2022-02-22/cargo-beta-mips64-unknown-linux-gnuabi64.tar.xz": "48640b94de8f38bc1c285c6c7a3f973c461d7336acfbec1b2f1eab09294929bf",
+ "dist/2022-02-22/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "870e51831fdb84e927b4556d3f6e1882bd8d3a542d36fd9c59a52333b7671e9d",
+ "dist/2022-02-22/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "898ea5ba25d4503092cdbeda226947c4465515e684945dbd16b9009881f1c2c0",
+ "dist/2022-02-22/cargo-beta-mipsel-unknown-linux-gnu.tar.gz": "b5177d9199b585710cf0f9cf65b9d5e9e3372e869a6a1445119566878737358c",
+ "dist/2022-02-22/cargo-beta-mipsel-unknown-linux-gnu.tar.xz": "9aa14abb02c8ccd4f9b684c02a544776e0936919f8f7e46698f85a69b7dbcd2d",
+ "dist/2022-02-22/cargo-beta-powerpc-unknown-linux-gnu.tar.gz": "9d6bd864f629a957172c7fbd20c7549d88248a42f259e6be9f779b4bbb4b09bd",
+ "dist/2022-02-22/cargo-beta-powerpc-unknown-linux-gnu.tar.xz": "988929cb1e75d053c1b081a8a672310447e630195175fd1e54dc5d0ec35783df",
+ "dist/2022-02-22/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz": "1b32b43d0ec4989d048223ffdc914656c693ea978e38543b45b1d0c78a6f2c2e",
+ "dist/2022-02-22/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz": "cd52c1191291ad23dee3a5eea11cb30d2b39e5be56cfbeba72d63add0c1f8689",
+ "dist/2022-02-22/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz": "54126eee55aadba389058e4114e57898604398a3638cec33cb06f0b08f19c293",
+ "dist/2022-02-22/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz": "04c0333e2ed44f0c6c24583f8dd08041bff444024407b5b15ca4679830d00748",
+ "dist/2022-02-22/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz": "d06c620327fbfbff716ac80c569fa3f93d21a137653226c3417a32978d7c21fa",
+ "dist/2022-02-22/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz": "dc9c6058c0612b9e75f17785571f334e3ab07d7d41e7e6892a9f176a032efbfb",
+ "dist/2022-02-22/cargo-beta-s390x-unknown-linux-gnu.tar.gz": "41740c9043a17a6f94ccc9b1ce3e651bd5c1d40082573c2603fc467e3e7211d6",
+ "dist/2022-02-22/cargo-beta-s390x-unknown-linux-gnu.tar.xz": "9f35c90f54fd109dc89101dc4f400c1e2274c73dd830ea47032f6669f17d2281",
+ "dist/2022-02-22/cargo-beta-x86_64-apple-darwin.tar.gz": "bb2df47156ed411068df28b2f3da9cbd1a43e87da92b79b08f49c9ec1b7acf9a",
+ "dist/2022-02-22/cargo-beta-x86_64-apple-darwin.tar.xz": "1e28f97bba0788d8666ea99dc6794f14246248d2215ca954523a022f32f0032a",
+ "dist/2022-02-22/cargo-beta-x86_64-pc-windows-gnu.tar.gz": "ec819340d489948ca3376011e504163b2b8aa4a795757b76c680d7827a894d51",
+ "dist/2022-02-22/cargo-beta-x86_64-pc-windows-gnu.tar.xz": "74e39561dec9a133d98e85f05659353fe5123b813e2042a6e1d1aeff44f8f018",
+ "dist/2022-02-22/cargo-beta-x86_64-pc-windows-msvc.tar.gz": "43c4071dde2a487211ccb8b70738dd9f2bff6d629c10c676387bcf3dd1bbdbe5",
+ "dist/2022-02-22/cargo-beta-x86_64-pc-windows-msvc.tar.xz": "14aa403752daef201d9c62efaf342fa9070f1acd15417a212840dec9b04e0bf6",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-freebsd.tar.gz": "dd186508224dddd5fd701741913bfabfc0a11ac4ec3268e4089ff20a9e6db851",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-freebsd.tar.xz": "051a08c9a74150e706f683c96ed1a89531d75622a379e738f27c838317f1aa0e",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-illumos.tar.gz": "ed980715be8e3e8354656e09b0b8fd265a1009c7af3c77a0da7ee297c746d465",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-illumos.tar.xz": "119943b8a0c62839de252a372960c93124b99de1b918122d2798dadac8658918",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-linux-gnu.tar.gz": "1738f1416773c85571414162ba894a753db03fcac9770012358f64db341fedd3",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-linux-gnu.tar.xz": "eac6a6deb3a7cf0d9d6c0d474cf3af2c3fb6a27f047c59e39549af219a04e487",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-linux-musl.tar.gz": "20d7ee9d7234395840b2478681ce4d79bf71045ae218d61f6b54ab9476dc39a1",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-linux-musl.tar.xz": "3eaf0ea2187a5483738aef57c1a72e90fd7d2f1f43d161b4312a88a2afb5fb36",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-netbsd.tar.gz": "7359595da468c6a22e42c8cc1918034e1efada2458281354d378c6921fd839bb",
+ "dist/2022-02-22/cargo-beta-x86_64-unknown-netbsd.tar.xz": "901fced3b888c3d117b7ce5dae9f670b5a3251572d6e2dc2b143c734e38ac683",
+ "dist/2022-02-22/rust-std-beta-aarch64-apple-darwin.tar.gz": "dca112bb73d3db03df91770cda1a90f130fa19e80657bae8c70c9737a1739f0b",
+ "dist/2022-02-22/rust-std-beta-aarch64-apple-darwin.tar.xz": "5d86a54ac7a3da08eee4401cbdca416b88f47e3f873bf77aa09f9d8259bde015",
+ "dist/2022-02-22/rust-std-beta-aarch64-apple-ios-sim.tar.gz": "7496f9dc8cab45f14ff01c3ceb7938dd2532b802903aade5775f1311e29a2191",
+ "dist/2022-02-22/rust-std-beta-aarch64-apple-ios-sim.tar.xz": "fb0704f0b2dd9cbee2a7b887963c15fd5c3391425632362161d59e94c81b608e",
+ "dist/2022-02-22/rust-std-beta-aarch64-apple-ios.tar.gz": "b63c47df8f9ee3a498248898d465dd24c2de842d3a61e2a7850fc10348c65080",
+ "dist/2022-02-22/rust-std-beta-aarch64-apple-ios.tar.xz": "d25ee7959831231a1661f95ca11bd3fbd5cb177ae8cd82bb3fb33889e8a081df",
+ "dist/2022-02-22/rust-std-beta-aarch64-fuchsia.tar.gz": "06fa5e122904ff03b1e0e9218a58b7c492c3cbb57e2d26e255171f6c7734f5b7",
+ "dist/2022-02-22/rust-std-beta-aarch64-fuchsia.tar.xz": "8b4a60e54a255c5eb45545c78c4b43d78527777f874a8a9b215999b414c3dbec",
+ "dist/2022-02-22/rust-std-beta-aarch64-linux-android.tar.gz": "7209d2f4fb41fe00afee1d49246228fecd955930abac317f7ae608a4eb27f834",
+ "dist/2022-02-22/rust-std-beta-aarch64-linux-android.tar.xz": "ad8aac4d753c357fb39408c01567a95710f95c73b5589d37304f6d8eedf43ea9",
+ "dist/2022-02-22/rust-std-beta-aarch64-pc-windows-msvc.tar.gz": "0e25c7a39e32cd3dff61a2972df5e5a08f743d505d0a1e99a26768b3d0abc44a",
+ "dist/2022-02-22/rust-std-beta-aarch64-pc-windows-msvc.tar.xz": "63f7d6967c920135bfdc45e4867579ffe5858d1608777bae0c64e3bb74180bc9",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz": "e1688baa8a9681e8975885def8ef160da31f79d4b767fdfffda0eb4a281c4a20",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz": "07acb0382de4c967421ad62367c4585e567ac16f82b2c6d2bac4218999ea217e",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-linux-musl.tar.gz": "9abe9e57210890632319ae175e4ff10d4c05d505820e6e6d4b694a84e57b3e53",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-linux-musl.tar.xz": "cf9edb113ce62b71b7e6d535c2d0c153fb0041a86ccf22393c7fa1bde99ff589",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz": "1d378a8eff18de4487f6edda01f9c9f991b0f3dc575be062d5faa04f0489dff1",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz": "84c23145e5ce8fe37088d413e3bc4072cbe662feb0400895e91e924515c4d8ac",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-none.tar.gz": "04a154058d8014608bbde9e70a85bb1943c58053ac64119ea84be70a1a085c35",
+ "dist/2022-02-22/rust-std-beta-aarch64-unknown-none.tar.xz": "6edde8a372c29756b54fccf54232fee7899625eb6c5529658024028ae4f8a471",
+ "dist/2022-02-22/rust-std-beta-arm-linux-androideabi.tar.gz": "b1670696b4aa52daa390a5c9ce26056507a11ff883d98ed6e84a7f04b38ee7a2",
+ "dist/2022-02-22/rust-std-beta-arm-linux-androideabi.tar.xz": "2cb4a03fb3b8d8556c359c4d4f1823dbef3a22f0483e43f41ee154333a202ec8",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz": "46f7ba3b96a9088f242a0ad191ca320529d9798d8842d41accd14622fb7b6750",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz": "091190cccf966aeb6d387fb6542ad43f7f38b6843a13309f92df2f759a4045dd",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz": "4d1740f7d33566e2642d1618d9c6cd0c0650d39af5d428dfd993a4f65e27e3c6",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz": "4d4c2f1fb3319030b978d1343b80a34c22b3c4df58ef1dbce9eddc42a0e9ac41",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-musleabi.tar.gz": "d7ad7df20a41f7df39fd0973f37740d0c732468de6e099febc13db7f871860b4",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-musleabi.tar.xz": "598c5ab98d3a3ffeb4f3aaf5535d8947e6ae6d45aa0071438f9490dd63acf7b5",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz": "46d2276ab614e5f4d1f990824fd2b67c9398c669a01698c8a4b157bd45e3eedb",
+ "dist/2022-02-22/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz": "f404d2c3d89ae820112a324a3c5bf127efb6fb31813138c0fde99948eea7d76f",
+ "dist/2022-02-22/rust-std-beta-armebv7r-none-eabi.tar.gz": "8c8c547387db74673c1954b8ac1cdeff5b726d432581649bc60f988acb0352e2",
+ "dist/2022-02-22/rust-std-beta-armebv7r-none-eabi.tar.xz": "2942966353af6f1a29c3266e1f35e3f1bf49a7d555a6034dda72c31b7e83b89d",
+ "dist/2022-02-22/rust-std-beta-armebv7r-none-eabihf.tar.gz": "3b80afad86c655b5be24ddb8348c3d5781006053c14932ab2855be525c35108b",
+ "dist/2022-02-22/rust-std-beta-armebv7r-none-eabihf.tar.xz": "3b55016a3f27aa0381eb502e2d732aa9397aac117e98d4fb4721587b62ac7842",
+ "dist/2022-02-22/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz": "2c17d2a504c4f7aa581731bbfa9eecc1638b9bdc8800d136da1a6d248ec70e76",
+ "dist/2022-02-22/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz": "78dcb72afa5187b7ae91a1ccc2e7978b30cab8eaaa46cb09a62266868c866ad3",
+ "dist/2022-02-22/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz": "d42741e9ea6f23fc88dada5e9339cf7fb3015d3713335b77543afeaafdfcbb53",
+ "dist/2022-02-22/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz": "ecd0e30fbd08fc8dbf478ddfb7a48b619b84b04c687bdcd56259b64f9ccedea1",
+ "dist/2022-02-22/rust-std-beta-armv7-linux-androideabi.tar.gz": "b4fedc281f748c443232bf061fde9dccbf415eec62053103a270613689c4cf1a",
+ "dist/2022-02-22/rust-std-beta-armv7-linux-androideabi.tar.xz": "bae884d552a8d234efa795b5b56524cb834f06c77000e926bc0bd1446387174d",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz": "116c08ac9ca36e0d3d0bb86d0d25db8f19b508d851b93c6a738711400e1faf93",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz": "d15b7e02a7fdf7d45d0269b4c739a96dda4f22ef70d7a3a2b098527b34f81b76",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz": "86390d1528d0382109ae094005b35d84ccb5e6bc670a490d2c8e27010efafb13",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz": "fb23bfcadc53baf72793718b051710a6bfa6575f8fb7104925157681b1efdc3f",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz": "f34cce7af6d123b9c509f28d63f10397ebbea74b6181b819d022f700521dec7d",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz": "2777e62cbd8ddd5dce730f4a6671dffac132ecf194a8840178d178296264879e",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz": "4e6f11b82e57c60ab5e4329bcb0c5384f9bc2044ee8f194c3022949855389ab8",
+ "dist/2022-02-22/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz": "a45eaf577ddf69ebd8eb7b112bf2b79ffa7a3360ef959f6bfb5f0a5e634ede48",
+ "dist/2022-02-22/rust-std-beta-armv7a-none-eabi.tar.gz": "66fc6787cf5060b8d279d325ef745dc37206335a9e279bb7f3687b6564f3bdab",
+ "dist/2022-02-22/rust-std-beta-armv7a-none-eabi.tar.xz": "3996d7a5e7721262fed35af65949523510544eb3942c97dbcd231f84770edb7a",
+ "dist/2022-02-22/rust-std-beta-armv7r-none-eabi.tar.gz": "be50c97fd48c7209b2b452f3f9c00cca1fd26f8482b4c5bec46b9a32dbbf9cf1",
+ "dist/2022-02-22/rust-std-beta-armv7r-none-eabi.tar.xz": "4f74859110079c69ff3a84a4c4110ec4df7d4ce7bf4886a9115defc11174f41e",
+ "dist/2022-02-22/rust-std-beta-armv7r-none-eabihf.tar.gz": "1d29241da65cedfd665917fdc0ae8d66eaf847280c57ebfa630d6e4993232642",
+ "dist/2022-02-22/rust-std-beta-armv7r-none-eabihf.tar.xz": "a3898ab71f6fb6f0a0b85f706d74fc75330eaded7e4fde7e9903ad375b2c4c9e",
+ "dist/2022-02-22/rust-std-beta-asmjs-unknown-emscripten.tar.gz": "6c895e95c55cb55a40a24cbe381a5ce6ed5d50a6ce97781c33429fb846449a9d",
+ "dist/2022-02-22/rust-std-beta-asmjs-unknown-emscripten.tar.xz": "524b781dc177afef5fa70b13a80961d26ecfae25c331dc967127ed9964c29f98",
+ "dist/2022-02-22/rust-std-beta-i586-pc-windows-msvc.tar.gz": "43fae07717c4b20690c6d0843f43e10581e656346fcc1363cbb2f90efcbab93c",
+ "dist/2022-02-22/rust-std-beta-i586-pc-windows-msvc.tar.xz": "20c2d659ed82a128cb31d4fed737d79245edf84101b1ad58e4b694784c181aa1",
+ "dist/2022-02-22/rust-std-beta-i586-unknown-linux-gnu.tar.gz": "240c51132bb92b3e5d0b3abd281c1d317aae0cdc23ac5d06b465fd6a3a783913",
+ "dist/2022-02-22/rust-std-beta-i586-unknown-linux-gnu.tar.xz": "b8aafd530bc9f888b2d73d2ddb232501e481999faed06026994bfbc479adc892",
+ "dist/2022-02-22/rust-std-beta-i586-unknown-linux-musl.tar.gz": "0f36dd856386e03f34288c0fb720b86cb31969b1db5c90f6ab6329319b344b40",
+ "dist/2022-02-22/rust-std-beta-i586-unknown-linux-musl.tar.xz": "5bc340d21f80eb420ceafe5d7eb40651dc00dbbbb8ccde59ff88d6843ac93cda",
+ "dist/2022-02-22/rust-std-beta-i686-linux-android.tar.gz": "9eed175b238e5b7f2d7600233cda65efe570050f501680be8e08d98a54028123",
+ "dist/2022-02-22/rust-std-beta-i686-linux-android.tar.xz": "d6b106f23ac95537191b460847ce38b7e7f6ebb120561cb2b4497ec40d53217d",
+ "dist/2022-02-22/rust-std-beta-i686-pc-windows-gnu.tar.gz": "51b91d661906c4c6e54bfd34c16aa874447da706f15413c9f6caa7943e49b165",
+ "dist/2022-02-22/rust-std-beta-i686-pc-windows-gnu.tar.xz": "1d8b8c856e3eb75578a187a483074b2d78ea6c6047018a8110d685a9b6f59812",
+ "dist/2022-02-22/rust-std-beta-i686-pc-windows-msvc.tar.gz": "be373ef9dbc40c44be1cce66d6a37379670d8c6073d2e3ee0c010e08b8d0290e",
+ "dist/2022-02-22/rust-std-beta-i686-pc-windows-msvc.tar.xz": "97a8cabc18f4745c856e8a51deeb3b2cfaad15aa854dd8bf50d742c498375802",
+ "dist/2022-02-22/rust-std-beta-i686-unknown-freebsd.tar.gz": "4dfdaa7fa0d282dfcc8a919fbc077fb5a987820ea920a3f443ad286c3f16e134",
+ "dist/2022-02-22/rust-std-beta-i686-unknown-freebsd.tar.xz": "e9fef55eaf2302ae80b411bef7d3c52b9a2f8e5e80b1e629541722508aea629c",
+ "dist/2022-02-22/rust-std-beta-i686-unknown-linux-gnu.tar.gz": "05b2bdc3bdcc5853d4b44423031e82452d040c74d5b3832e03910c25c752e70f",
+ "dist/2022-02-22/rust-std-beta-i686-unknown-linux-gnu.tar.xz": "1038a6415b9f68c63cecb98b0ad860a0f424d7053e4fc6cc52c3054cdd9b3c56",
+ "dist/2022-02-22/rust-std-beta-i686-unknown-linux-musl.tar.gz": "588b13f016e2fd49c4261a230dde062f68de10d8b128e1b801071f6fb04e42b4",
+ "dist/2022-02-22/rust-std-beta-i686-unknown-linux-musl.tar.xz": "91dd6f3c85b28dc1aa0636bcfda1156c97fbb1322156c2a600bc66e2bac22627",
+ "dist/2022-02-22/rust-std-beta-mips-unknown-linux-gnu.tar.gz": "140af043ae006d47e7b19badfede6aa684c455b18df6d7da4a7c2437a9d303e8",
+ "dist/2022-02-22/rust-std-beta-mips-unknown-linux-gnu.tar.xz": "0ec24313945e2fe853c1139e729fa40e5ffec406070bd52468a23b96efd08c5d",
+ "dist/2022-02-22/rust-std-beta-mips-unknown-linux-musl.tar.gz": "3b4c2aa34c84d5cf6460f8fe46ba0e0596fe83403f38f0f53d8b14ecab3d7de3",
+ "dist/2022-02-22/rust-std-beta-mips-unknown-linux-musl.tar.xz": "53c3476fb78702570ba096d2f6becaef2b402bf8c5afa58b8d559ddbe7a379c5",
+ "dist/2022-02-22/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.gz": "e2963c7aaa7ae70a341a67d93d52ac2911309cb1977639e85750b0dd8061bb21",
+ "dist/2022-02-22/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.xz": "76444714fb5cdc40797c0d217536b4328484c12f2ad0f47e3635d88fc31aa958",
+ "dist/2022-02-22/rust-std-beta-mips64-unknown-linux-muslabi64.tar.gz": "0eeef057018f809ef008d23df65ede61b1d1695d2d5ffb6cf322e73939f789fb",
+ "dist/2022-02-22/rust-std-beta-mips64-unknown-linux-muslabi64.tar.xz": "efb4db958a03894289570b0383eedf47e3d3723793eab95a1336a8e4fac0a909",
+ "dist/2022-02-22/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "59a15a0870013712d2d5162d180bfae71388eefb63d0ff0ee3dd30471c4feaf0",
+ "dist/2022-02-22/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "46d9a7e326d582ec0d9cc674b4f2976da877b16197b0aec2ac783b3cbca8d0e2",
+ "dist/2022-02-22/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.gz": "c6f88389945fc1802fbd271bcdfe77172d60b27b6416a6a899c29854748f93b0",
+ "dist/2022-02-22/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.xz": "16ac29879c3fadb76ebc8ae1234dc4c2aed1809f329a95c67e5e54aa2730e9a7",
+ "dist/2022-02-22/rust-std-beta-mipsel-unknown-linux-gnu.tar.gz": "6c93eab95575a3327ec019c45f57564bf8c2bf92df1c9cc895de6f6b6514c695",
+ "dist/2022-02-22/rust-std-beta-mipsel-unknown-linux-gnu.tar.xz": "81e560c30f477cee45c866c6653fcf2b7942287547321f939ab68a849d1c680e",
+ "dist/2022-02-22/rust-std-beta-mipsel-unknown-linux-musl.tar.gz": "612d4169406b20abaa38362dad969008d5d3eea1b7c5a376f5ff33870879e70b",
+ "dist/2022-02-22/rust-std-beta-mipsel-unknown-linux-musl.tar.xz": "d39459a64250838ac6b46352de106fbd199e4e586f066123a1ffe78f52291d1d",
+ "dist/2022-02-22/rust-std-beta-nvptx64-nvidia-cuda.tar.gz": "ef9ada210252cf9f66e7ff6aa43855318ac6030b6a963f4f25ef227c3b50a51d",
+ "dist/2022-02-22/rust-std-beta-nvptx64-nvidia-cuda.tar.xz": "7ba46c4171c4776770d8a5e590e8b3e12fc85d519fe85c5db166569d353fa371",
+ "dist/2022-02-22/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz": "11e163b7e4884078185ac92fdba62a77468b70ffe0e4f22a6c420ff8441d12cd",
+ "dist/2022-02-22/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz": "3f88f0163078a219730898a77f3bf8db3df3967100931a4685bcd9d43f2b4668",
+ "dist/2022-02-22/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz": "68742e04b7fa9f398945363b41e8988040f53c46de6fb7b481647052d54f23ad",
+ "dist/2022-02-22/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz": "f978bff9ae78b26c439a3817648a63cd9e9e149bf08cf2124ef2372b5863c52e",
+ "dist/2022-02-22/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz": "715d0512df81db8266b1264721704ef069a78ae5ec615c772e876c119723df80",
+ "dist/2022-02-22/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz": "65739553817038796c9364f8e92f7b492872cc46cab9ea3535b74ce55a1b6474",
+ "dist/2022-02-22/rust-std-beta-riscv32i-unknown-none-elf.tar.gz": "65815e6f296c5651f4185820c2bfe9a6929d3a4aba555b453b1e21791e98586e",
+ "dist/2022-02-22/rust-std-beta-riscv32i-unknown-none-elf.tar.xz": "51f1a45d7fea68806220a31877c4ae2aa0be171aa594fab847ee295682afe9d2",
+ "dist/2022-02-22/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz": "25199052e5e2f39611c60cfb6c071337c3621eef7203090a1f1abba9959a05e5",
+ "dist/2022-02-22/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz": "ac272237e72fc06a2c940f643df7d614267182acdaaa883cdc2ed86baa83e955",
+ "dist/2022-02-22/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz": "8b6b8235a671d0ca3b0548b64197ec320975d9866f13435c069b279f95e8d8d9",
+ "dist/2022-02-22/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz": "f0136a97c8338e72e05bf4390ac0a828f52559b73727a9a075c137dbaa249637",
+ "dist/2022-02-22/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz": "7be9a45ddbdf281496520d76372a004f16b927fc6bade0ae97ad8b92d34d3d7c",
+ "dist/2022-02-22/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz": "47f3a3d69b0819dc681e37437618a2130f4c5aa199cad3bbbbee8bd442374ac6",
+ "dist/2022-02-22/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz": "8a7d37d7e022c4513877f428361312963d555f35e78978efc27f4eac2e411b6a",
+ "dist/2022-02-22/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz": "d530edb2ceadba90b840a691b61f267388b9022003318f489fd46c84560459b9",
+ "dist/2022-02-22/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz": "012398447b0236c20a3ceab1e4f6126bac120c361875f15d304e9ecb7c6781a3",
+ "dist/2022-02-22/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz": "c092dc1d8ee387e1ac8496b3bb412175a03efe4cf923b82ac4ec47c880986e72",
+ "dist/2022-02-22/rust-std-beta-s390x-unknown-linux-gnu.tar.gz": "acaeda013557588d8c9643fd0aa7ad0da5cc7c64f7aca0fc383b00f7b4a174ac",
+ "dist/2022-02-22/rust-std-beta-s390x-unknown-linux-gnu.tar.xz": "99c1a499bb9cfa343bf03da8abfa8f18595fedc3fb354e893fa62f67d067bd89",
+ "dist/2022-02-22/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz": "e07bcd62f79c9f764b6c6ea8d3744506beb8e1ee1ddb202276f116e9ee44ecc5",
+ "dist/2022-02-22/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz": "2283784176fc003b8ce29899b747dbdbe848fc226f963ec36a95d79b1afb0c0e",
+ "dist/2022-02-22/rust-std-beta-sparcv9-sun-solaris.tar.gz": "80c1613f9598db047a95be40494870942a5a4ef54c7e4a72c9fa3df9b23f64b1",
+ "dist/2022-02-22/rust-std-beta-sparcv9-sun-solaris.tar.xz": "9b33ce8b938978caa4164af52bbb982183fa2fa86e5f079805fb6f479c8c9aae",
+ "dist/2022-02-22/rust-std-beta-thumbv6m-none-eabi.tar.gz": "794c9b2cbe3e76e2dbab31d89817a7c21bdc19a59022ee652862aac025db6914",
+ "dist/2022-02-22/rust-std-beta-thumbv6m-none-eabi.tar.xz": "0a7afdedd20874df94e9604669926b1ce82b68774db7756312d43bbbea3e9334",
+ "dist/2022-02-22/rust-std-beta-thumbv7em-none-eabi.tar.gz": "19821e7291f4363f37b5ef2a1b505163cdf02e38d5b47aa980892e794e918c73",
+ "dist/2022-02-22/rust-std-beta-thumbv7em-none-eabi.tar.xz": "a4e0b594b756316bbaa05ebd4d0559edc9a733d5ffe84797c6e096882969ad36",
+ "dist/2022-02-22/rust-std-beta-thumbv7em-none-eabihf.tar.gz": "222e15bb1db6e80459616a001ca8fcad8aba9921b1161e8b9ce9e38fd9fb2d10",
+ "dist/2022-02-22/rust-std-beta-thumbv7em-none-eabihf.tar.xz": "72ae8a9dba6c2913ba3eaea2e96d7e744985f6c5badf170daa678c00b89e93e8",
+ "dist/2022-02-22/rust-std-beta-thumbv7m-none-eabi.tar.gz": "74b4d65d13262964ef180fd7a63a3d2f62c529aa3b99883e3e83815338129631",
+ "dist/2022-02-22/rust-std-beta-thumbv7m-none-eabi.tar.xz": "7dfacadec18736016520db4a07a677f74771db955418f4b1df6c09d871e159e9",
+ "dist/2022-02-22/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz": "6bf0482aecbe5d1dba551319cffa074e0a72e6ce8c2e636ead98733429bdf09c",
+ "dist/2022-02-22/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz": "81e9ff4577785f9d11cfbf92ee18dc6a1202147500ffa474f4a0ab099af0f7e4",
+ "dist/2022-02-22/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz": "bf073994172580e7b9e5a0a618ae5f58759801a8e949d2137f69191d05b146eb",
+ "dist/2022-02-22/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz": "8c21d837cd9e1c98db78b4c37dc03f07373184e2354880a1dd9501fc62f8b6f7",
+ "dist/2022-02-22/rust-std-beta-thumbv8m.base-none-eabi.tar.gz": "167f9fc5aa4d3dd68044110a346d5888d9bacc5c8d3fb1140d2687f312ddb057",
+ "dist/2022-02-22/rust-std-beta-thumbv8m.base-none-eabi.tar.xz": "c64177f1aab599a25d97497124c5d4e9449ecffaf96caefecc8b0a2552aacb4d",
+ "dist/2022-02-22/rust-std-beta-thumbv8m.main-none-eabi.tar.gz": "95de6b1fbd95287258f9caac1f805492afc9657adfada82295736d85b1b20c3c",
+ "dist/2022-02-22/rust-std-beta-thumbv8m.main-none-eabi.tar.xz": "d3f8c5ed80c59b1bd2c538aab63be8b39db78db3c2f49d7447092a8b97e2963c",
+ "dist/2022-02-22/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz": "aa0ec6f6b0d652ebde2694a8153252928cc1f41c565912da8bee5b0d225b786b",
+ "dist/2022-02-22/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz": "1f23bcb96112bdec4a1f45c41afef3faa95cddc5be2f693ee3e1f4f3e584c49f",
+ "dist/2022-02-22/rust-std-beta-wasm32-unknown-emscripten.tar.gz": "49d6ea925560f3eed75da2c7d9cefe404525702504ce0cc4cbfb3fe638814566",
+ "dist/2022-02-22/rust-std-beta-wasm32-unknown-emscripten.tar.xz": "13b93becc017bb6bb60212ba30d6717a1be6af139b965b15000264b48e163991",
+ "dist/2022-02-22/rust-std-beta-wasm32-unknown-unknown.tar.gz": "27f3dffa92ccdc8d2b3342e737b5f80b7b2dbc53a994249bf318810f4d8b4643",
+ "dist/2022-02-22/rust-std-beta-wasm32-unknown-unknown.tar.xz": "2236cab6b48c9c564731913dc652a2e0cc6af0d6b9a64b66cf39a6b943c410da",
+ "dist/2022-02-22/rust-std-beta-wasm32-wasi.tar.gz": "35ca9a19558512fc1758e9c7482246bf6a518e48d4a93a8748c07ebdb4be9d6c",
+ "dist/2022-02-22/rust-std-beta-wasm32-wasi.tar.xz": "3bbae2bf8423e3323155f3f336435fbd53b58cfa16107f9fa567ea77923e5ff4",
+ "dist/2022-02-22/rust-std-beta-x86_64-apple-darwin.tar.gz": "9a6c1808797c92da862f706f08a6482a4412e52dc9a492d06645f03c8b1c0fc6",
+ "dist/2022-02-22/rust-std-beta-x86_64-apple-darwin.tar.xz": "2a658172c220c047542e992a8b1440d887d809f301f3a0e23a811d586ff43dc2",
+ "dist/2022-02-22/rust-std-beta-x86_64-apple-ios.tar.gz": "2da9affdcc01bc9369192b40feb0797349d2084fb6ddff55e61d7b0a831272cc",
+ "dist/2022-02-22/rust-std-beta-x86_64-apple-ios.tar.xz": "dcf403a1d670bdb0e29d61161d268a2be9a6d31ea4055dff562e06cb72ba1c78",
+ "dist/2022-02-22/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz": "506ad99d890f0c1ff525a8c9f28aa4f7aec349afd78279b21d7486a88f548ef0",
+ "dist/2022-02-22/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz": "4f20a7b59e32266fc01c67d36ec27f68e9a44105819e1c5a1dc8823367c4914a",
+ "dist/2022-02-22/rust-std-beta-x86_64-fuchsia.tar.gz": "0705d9ad7e640a8a4b48c88d1997ffa57f849d1fa4cf3ae4185afd2122ed6b60",
+ "dist/2022-02-22/rust-std-beta-x86_64-fuchsia.tar.xz": "2b5382417346f07f105704eac3fdd4a8bfa0285804715a64d1e314a0c9ce4ef6",
+ "dist/2022-02-22/rust-std-beta-x86_64-linux-android.tar.gz": "03404906af39d9111316c624835a09a4326f6172f52a405b82f831c3b408ea9f",
+ "dist/2022-02-22/rust-std-beta-x86_64-linux-android.tar.xz": "5ff2b24d8fc552a791b609de6373afc57a8661d2769e89f4e19c5cf85be864b4",
+ "dist/2022-02-22/rust-std-beta-x86_64-pc-solaris.tar.gz": "a90e13d0e45a71843caa1dd960a7b032120034aa0caa4148f825e3493d65640e",
+ "dist/2022-02-22/rust-std-beta-x86_64-pc-solaris.tar.xz": "d176219f6fb41aa0bbb59b11801f45af29edeb24423325b162686d3fc3d3ff93",
+ "dist/2022-02-22/rust-std-beta-x86_64-pc-windows-gnu.tar.gz": "dd8da303ff2740b3b9ea565ed9a335f62de8c1357884660abbc4e7a9ccef7a74",
+ "dist/2022-02-22/rust-std-beta-x86_64-pc-windows-gnu.tar.xz": "d807829b1328527f49d318ce942dea5fd8e71a8fa16cbfe2d7444fb5a962e158",
+ "dist/2022-02-22/rust-std-beta-x86_64-pc-windows-msvc.tar.gz": "7ba1551ce159030125ce74ae7321e0365fb2d33758fd2a578693dec8ff817c66",
+ "dist/2022-02-22/rust-std-beta-x86_64-pc-windows-msvc.tar.xz": "55ab2bcc5469ff433e15c06f490af3721abd6dc468eed68ce3fb2842dacaf28e",
+ "dist/2022-02-22/rust-std-beta-x86_64-sun-solaris.tar.gz": "1e1b97a4840415f7efada876ddbeebf336ea4c6a0d0fab4238ce1f490e6450a3",
+ "dist/2022-02-22/rust-std-beta-x86_64-sun-solaris.tar.xz": "20377a3a7eb39727c3c4202a35569c52362f486fdc3ea451a0d9cc5ccc95ae4f",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-freebsd.tar.gz": "5c3116945faee33a8a45f911d270c19ad979f3c3f11af2dc769173b6b8f93564",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-freebsd.tar.xz": "852b0fa691ce59a509cf8c414407a8ea1bed362cf52007ceaa0d240533a3b6d1",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-illumos.tar.gz": "66081135debd54f351c3117428aae95ca160895effd7c8c5d3c9eacdcc18dafd",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-illumos.tar.xz": "80bd080495367c9cad59a356e410aa200aee03690ad38d817ff9020e2c46b7eb",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz": "42b513b8d24d66f582c4cab8d61414012c34a25d7f65679985ab68e2cdfc0fed",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz": "18c5bdfc09da2789c79d4b7ec8e0703699acbd2528efc13a249043517e415031",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz": "f12be56fd501f1305be77f31e7021c79749e60286d27f68c4c6fbaf9326b6b18",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz": "f9445ebb056c31cce13267e7ca1416aa01c482e6d0968044c1c90193a4ab7ecf",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-linux-musl.tar.gz": "46724764c0c9ef57ca9e74ebcfefbfc4053d0aec9827219e3a8f70d7661d4f00",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-linux-musl.tar.xz": "9ec841afae859c5d2f386a0ba333cb7f1055718645de6a46cc429e1ab6388a8d",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-netbsd.tar.gz": "224c80a3babc99ed5ab0f2c2376a730606a49adf99b26ac1039b98e96972bb49",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-netbsd.tar.xz": "a6011d4c075ac5f7c8fb64dca3388e659c18fb95b104ff5ba661e614015607e4",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-redox.tar.gz": "ca11ca60fc78827a87e202060f6892b2513c4e7ee7af637c9f5ffc73512258b5",
+ "dist/2022-02-22/rust-std-beta-x86_64-unknown-redox.tar.xz": "a2df3333acdda56303a8607151538d4e3f0ccbb5e7ad0ce538c2daa16927a2aa",
+ "dist/2022-02-22/rustc-beta-aarch64-apple-darwin.tar.gz": "14e52bfeaaa4e1040c9ac2a1ef5ce55c6f862187d789ff07bfc10397d5302b2d",
+ "dist/2022-02-22/rustc-beta-aarch64-apple-darwin.tar.xz": "43e8d608a04b8c1037e3d6fae9c90aad0317b109176a9016b8327bca34346e4d",
+ "dist/2022-02-22/rustc-beta-aarch64-pc-windows-msvc.tar.gz": "507d7533e80f022031e27698664bedd4c0e02334b008fa1276e0b4094c616a11",
+ "dist/2022-02-22/rustc-beta-aarch64-pc-windows-msvc.tar.xz": "798d75848e5fe551d70feeaab10cd77709e218c34d65fefc8392667942e5da93",
+ "dist/2022-02-22/rustc-beta-aarch64-unknown-linux-gnu.tar.gz": "ce50f8abc2070654681d073db6d36ca0e36806a9af0e23d7273771713756b3c9",
+ "dist/2022-02-22/rustc-beta-aarch64-unknown-linux-gnu.tar.xz": "4654ae2341a8a62d7bc2facf85bcba483f3bb083d51e7127c8b3c18a63a31180",
+ "dist/2022-02-22/rustc-beta-aarch64-unknown-linux-musl.tar.gz": "e66559d3acd1fd17c0fed9f106e51865e5de85438ff2eb2add4032a29ee4947b",
+ "dist/2022-02-22/rustc-beta-aarch64-unknown-linux-musl.tar.xz": "648ca772d54e95a6066115dedc6b04b9874875bb0950f1cabef99d91c16083d2",
+ "dist/2022-02-22/rustc-beta-arm-unknown-linux-gnueabi.tar.gz": "737c865a96af5ea78492bccb1341025b25dcd6449229cbf085524296bcd232d9",
+ "dist/2022-02-22/rustc-beta-arm-unknown-linux-gnueabi.tar.xz": "484ecf1f2f940e4d46596dbf6697ff6d94edd90739769f63985415a360e65703",
+ "dist/2022-02-22/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz": "503e5827abbe658d4caa91432506121e3f3ed5d3d1896a7fe1f6b4dd38c5ba1a",
+ "dist/2022-02-22/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz": "c0001b8f07436a1765569b857b7f1c0ed81dfb87de8ada1e534c2cde1ce866e8",
+ "dist/2022-02-22/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz": "e39e0f013d02d2a340c62abfa58b37095fb0df828e5678c94f6611e3b03e3670",
+ "dist/2022-02-22/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz": "9aa60dba618f60f3099c0b2b14ca55a15187fc6858c45bde482bc40d324acefa",
+ "dist/2022-02-22/rustc-beta-i686-pc-windows-gnu.tar.gz": "4ee632be637fea478c42f2c77a24f8146b6b982bb0c9c9a19d5e83a6cf0d49ca",
+ "dist/2022-02-22/rustc-beta-i686-pc-windows-gnu.tar.xz": "ba4d659c22647102ed0ce4fa1b7121df788479838b6de08058a7ccd14923293c",
+ "dist/2022-02-22/rustc-beta-i686-pc-windows-msvc.tar.gz": "9d37026d3efcd15c18eae8a35d5c91089b0094ca3fa2a09c07a9022a246ab5bf",
+ "dist/2022-02-22/rustc-beta-i686-pc-windows-msvc.tar.xz": "2edb8490cc2a02821f1c088f0bb9576e8c6a511654209da940de0aec42210dca",
+ "dist/2022-02-22/rustc-beta-i686-unknown-linux-gnu.tar.gz": "3cd3297af97a6343bdd92457837aaa80f775f2efe64417856a51f6540b703151",
+ "dist/2022-02-22/rustc-beta-i686-unknown-linux-gnu.tar.xz": "c3497504066a953efbcc28840b6b7f1bf2799ec7aaa987d806cd56b874a9304a",
+ "dist/2022-02-22/rustc-beta-mips-unknown-linux-gnu.tar.gz": "a15c0cc57cee5ba21dcfba2c9e6ebc940e4aab635832d487e5db3adaf9749325",
+ "dist/2022-02-22/rustc-beta-mips-unknown-linux-gnu.tar.xz": "95d249a9c96253771e197adc86175acde4fa866f84aac84dc299df7bfee4985c",
+ "dist/2022-02-22/rustc-beta-mips64-unknown-linux-gnuabi64.tar.gz": "7c0b48e2e3af9807a5b460cc453534f821850522b43ca66e918f42312f634a16",
+ "dist/2022-02-22/rustc-beta-mips64-unknown-linux-gnuabi64.tar.xz": "aeb58f5b1dc9c96813f421763fa75b19219cdfa24100faa5ff833f70b56b8087",
+ "dist/2022-02-22/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "1ad4c58f78cf006b1243bdb3e4261ffc9d21c6eaa7ac2adad588173fa6bcba73",
+ "dist/2022-02-22/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "c119c341da94a30f569fbc1edeaf7d6e0083f6e16ef7aa219d3c499aae351ba5",
+ "dist/2022-02-22/rustc-beta-mipsel-unknown-linux-gnu.tar.gz": "b61616e8eeac33c979ee37f5938dd6ee5c308f58a6c2beb8a1f50c7e3506820f",
+ "dist/2022-02-22/rustc-beta-mipsel-unknown-linux-gnu.tar.xz": "bc5a46ef0c7e761f619e8cffb8dd1818a32551ca14be88649b2e2582f905bdec",
+ "dist/2022-02-22/rustc-beta-powerpc-unknown-linux-gnu.tar.gz": "6331d582c1130652d939f22eda45ce1b321b577d34affefc0cc0d54050460d28",
+ "dist/2022-02-22/rustc-beta-powerpc-unknown-linux-gnu.tar.xz": "bc5cb07aef32ef637b25850e443e737725c4cac7f513207d79f9520bd41888d7",
+ "dist/2022-02-22/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz": "a00742e6898e49363ee8478ec4f3d2cbfc778c540233d308b7ce88bdc7bc5dc0",
+ "dist/2022-02-22/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz": "ad3a5f983ce1ff07948c962f885bf7adf182543e8cb04630a3feaafe43b8a56a",
+ "dist/2022-02-22/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz": "4b620d1c6e97436100dd2135ea4e380c5c7f5a480a9dc615601343dfbe30bab6",
+ "dist/2022-02-22/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz": "92ef427c03064dbb5e5f3cdd00fa86a754a6b67961534c37256d8dbe127a097e",
+ "dist/2022-02-22/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz": "4e050159e2a61217dcf3b622f5fab7bc18a1110ab2e87f161879545b7da52fe4",
+ "dist/2022-02-22/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz": "bea23024681fb2bac5f1531969d494a421e48d19148a77b7be797298c6e162d0",
+ "dist/2022-02-22/rustc-beta-s390x-unknown-linux-gnu.tar.gz": "efc8e427beffd618501b1c14562c9b1a78958831737eb849507c00ebf0ad6e90",
+ "dist/2022-02-22/rustc-beta-s390x-unknown-linux-gnu.tar.xz": "c361166049cfdc1de3a3fa8f11061ea770d76f38623db0ede269366bb7f82d99",
+ "dist/2022-02-22/rustc-beta-x86_64-apple-darwin.tar.gz": "4c2c12f423036eadae0b328381426e7e43d7cb7a83e4fe06a4c88576e164d010",
+ "dist/2022-02-22/rustc-beta-x86_64-apple-darwin.tar.xz": "628d767591c8e5ece33de3e23e262fc55d6294513bbb537efbdb4b81f29f40a1",
+ "dist/2022-02-22/rustc-beta-x86_64-pc-windows-gnu.tar.gz": "06a2f1e96caf3737c5bfed4bdfb219a4f8b3484339d42651005dbc03eea634ed",
+ "dist/2022-02-22/rustc-beta-x86_64-pc-windows-gnu.tar.xz": "1892a79bb57dc0498db1ea467ea70455ec6bf4f55b5d014bd53170be81abb9d0",
+ "dist/2022-02-22/rustc-beta-x86_64-pc-windows-msvc.tar.gz": "1d55ec78eb3be79cffe3cd3dbaf300f9fec74f2f0d7559098c7a04002da75788",
+ "dist/2022-02-22/rustc-beta-x86_64-pc-windows-msvc.tar.xz": "6bf18b2583840dddebdd2f71b65e6986afb2c5ce03d9641a112afcdb443e3850",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-freebsd.tar.gz": "047906362381a6ea3c575e508fb80d12c269b104866c9a2b816c0702b67753f0",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-freebsd.tar.xz": "b186691e919123365da36a4368ed5d1b78b81e46583b9c282a909004998a396c",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-illumos.tar.gz": "c8c60d2aa4645a18578eba0a637b4f9ebfabeec0992cf75515013be87fb34a00",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-illumos.tar.xz": "a126ae90761c130a1e9afd69b547b2c37486472a6fdc5c21f07f4298a2b92f65",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-linux-gnu.tar.gz": "ebea0afac2fab2a014c11ed97d6beb75578cc0ec985e5f8f8bc09b1c01615307",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-linux-gnu.tar.xz": "c40d047cda71b01faf5048b8cebc3ac7315da6f8bd47e080183e154c3f4eb651",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-linux-musl.tar.gz": "6f017936f0bcb0b98ff733887383a8ae8902eba9014b6fe674a7aa379d681ade",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-linux-musl.tar.xz": "e89205f8583ea948ed82d7ff576c102bd18dd77bb9234835b3cd7c814951d69f",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-netbsd.tar.gz": "f6fa66459dc4b58a1b4c19c7b0590293c7ebe2685021ba0ac382b541072965d7",
+ "dist/2022-02-22/rustc-beta-x86_64-unknown-netbsd.tar.xz": "a65546bf3b63618ee16316c1ce552edf24f6d3d2d60dff63515ca61e69ee45a7",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-apple-darwin.tar.gz": "8f4bc35d8e2b03db96a5d9faedb5e25155082d96621c26b90734219468904c62",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-apple-darwin.tar.xz": "c83c48eae807ab73ebeb6324778faa1430b7efe0da6e32acb013cad9e2bb505c",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz": "00b0beac51b53a7469a6b6ef9d99309baa4b9da3e6ef08d9e5a84dcd4697ba2c",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz": "2d6dc8a6a02327d7d1fa3ab08f5a0a1cfb567a78ef6564a91050028d5f7e1eb0",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz": "88691ff2cefa6880cb4bbe2d717b5419cd0440ee0d000ff8a70f9d86d714b866",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz": "c075a7fe36931eff39f1880fce0dbb2d6d691bd4eee6f8db88b49f123e0117d0",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz": "394ee236b37b687963a0c42e40b3c6863460c302429ad00ca37c7931ea896233",
+ "dist/2022-02-23/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz": "74b68d4c1a7d36cca7fd1dab686bd43b04af1be5a9a07f7c42c52b0d5ebe35e4",
+ "dist/2022-02-23/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz": "d53edb376291a80362d4b51c8bf889f5cd3221e3e92c8db149f1d869024d4834",
+ "dist/2022-02-23/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz": "f26b9f9f97fce1c2de87b9d2168df0e4c3c995572dc6dcb5ac08ebb9185e8e77",
+ "dist/2022-02-23/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz": "2771d7d805b9fe3604d47640f969ebab005944f8b77e4d30b2b48adeec62a1f8",
+ "dist/2022-02-23/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz": "78f7160f9ad76a3dd6c5ac6021b9fb60ed758cbd90ae34ed2e16f3fd0a646add",
+ "dist/2022-02-23/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz": "f46da2d33597142d7b6d344b03cb17c5f6d9345421781b071aa84d52c3c13488",
+ "dist/2022-02-23/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz": "f95d077c5a5f713b26330aec15f14430731c53f4d297853d23e8a0158cb7818a",
+ "dist/2022-02-23/rustfmt-nightly-i686-pc-windows-gnu.tar.gz": "fd2db83f3a984d3834b8ecb1450846fd514e4ed1941095fe89d8e4217abd8c81",
+ "dist/2022-02-23/rustfmt-nightly-i686-pc-windows-gnu.tar.xz": "9a031255581634341287da672c7a0d7e893927faefdc9bafee50f5af53633bcc",
+ "dist/2022-02-23/rustfmt-nightly-i686-pc-windows-msvc.tar.gz": "13efc17049a0c032165eb8de8931069548acb2a282248f0a9a29656e8a97a5a8",
+ "dist/2022-02-23/rustfmt-nightly-i686-pc-windows-msvc.tar.xz": "7c684d51fd30c54203220b1505db629b37e2730686d0906d87e2b435093b52e7",
+ "dist/2022-02-23/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz": "8d6ca92b75866a8c238a401476f3cbf4314e8cafa098d9bbc45769926b77e534",
+ "dist/2022-02-23/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz": "c0609adb3c8cb75dd8e7351243fc6bf8f70701222097964262be0be3d8b6407d",
+ "dist/2022-02-23/rustfmt-nightly-mips-unknown-linux-gnu.tar.gz": "66eb9b3684e1f96765001989b6e8eaf03be016b9aa903ebc428f604a468ebf94",
+ "dist/2022-02-23/rustfmt-nightly-mips-unknown-linux-gnu.tar.xz": "7300327d6ffc0950943c480e9831e63a23af477816a9f971278e8bbc6c0e3514",
+ "dist/2022-02-23/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.gz": "670c81aed32cbe72b12b5c5b9de8ca65446ae201a3e547a7039bce015884acf8",
+ "dist/2022-02-23/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.xz": "9e86bddbbb0b755a7ad43fb2e20ff4cda4bd2e36d864112c75d69d142509e779",
+ "dist/2022-02-23/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.gz": "53f068e73ed65ad2a3903e7bbf80095d7dbc671e41d80780f52ffd1e1b101804",
+ "dist/2022-02-23/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.xz": "519a29e54063cbee1dca22a17624e1508d1b1a3f1d27cfdac08226c4a7d76092",
+ "dist/2022-02-23/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.gz": "56180120aa97452fff9016b87d8e97d15e35080e65a6dde9892059d20e09cb80",
+ "dist/2022-02-23/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.xz": "20604ae6826adfae2fbd67815a770a46d51f6aea7d5da73a54c66118645e76a3",
+ "dist/2022-02-23/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz": "3f0c4fa31ff93aab3b586def6202a9a2b63c7ce2509e707992f941b7bbd43ecb",
+ "dist/2022-02-23/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz": "d4eb5cb900b51018d83a0e1f0f50b12bd61f19cb7afc69f614c2fdeff446d323",
+ "dist/2022-02-23/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz": "3991a0259b758588ad2166ba5b7b10c79e777941a87f27bcbad4ee7422a240e0",
+ "dist/2022-02-23/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz": "2f507613d2cf82288f318bcd70c2d750dd06228699486ba7233ffb08f27baa03",
+ "dist/2022-02-23/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz": "811a37b83c293cf05780f62befaeecc69d5e847c407df3f355c27a69fffacd9c",
+ "dist/2022-02-23/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz": "99d5577c5766c6ddbba567306ba798ce62fbf92f9a6a227e46cb8c78ba04dda0",
+ "dist/2022-02-23/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz": "bac95ae187e4bae372de1ae20fe87eac02a45956bd4dcca71870cf2431b5abb5",
+ "dist/2022-02-23/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz": "a2501c6790552f2472891bd3298b0c9038e6dc3e826d060772ed396b2ca45f53",
+ "dist/2022-02-23/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz": "1e7a476248c2dc64ac2f65cfa74c0949f170c418674cb692ccf1c1cdccfdabd6",
+ "dist/2022-02-23/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz": "85fbac21530f0007da71dc979056f69cf267b2ed870e1d9deb71538a0f46b4c2",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-apple-darwin.tar.gz": "6e7ba1d83b61ce690c857bc197f3c0a1cf0cb2afd3c4c7f16fdb4079f460ce6f",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-apple-darwin.tar.xz": "6611703fcd9ec8ba9fa1837be5736c2b2833532cdcc152c5e3429d1994ac624a",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz": "e1350f9b420888776ab85bf2bc3e762c04a0ca8fe72e82d2d21215d4601f67ee",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz": "0cd5343e4e2db2f68026a2d55ae5e91cff2402dd1657bc03d9bf131264d9a75f",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz": "e1a81be6159fb9e28cb1f35ac4508a09a0be86edf6ab39db08988a5bbefa9e76",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz": "d5073cb4c148ef6e664c1fe17b02900e5f6ee0cf39710cad55887ebd919e797d",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz": "63a0018ed3b7bf94dca3db30be7a1d6940a7559cdd0ca408c366551e2f5e6863",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz": "85924719f0bfa06024496e550edfb6556a7b90e42d7d2d810b52f5bcef4401b0",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-illumos.tar.gz": "ddd2d19ef69ecebb3d654769b06cba5da5c366f01167298ee581f7cd934c637e",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-illumos.tar.xz": "9178284a64238c7778b521c5a105034efbbb85039b619e3ebb1247b83334bd7d",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz": "7ab236ced294c39de4bb563e9ebaed04c906a4ccfd1932138d37d6d03f75cae7",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz": "f392f5b890506e63407204998c3b9b9529dea8a7bdff2319bc202da6fa07c3b9",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz": "647da2183d93846ac5225b99117846a07a90975bdf1b5075e86601dcf97d1ecf",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz": "9c3be22743d1d9120d16ae47d035f788ba809207bdddeb8746828ea914dd90e4",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz": "4c396836a92122b0594568a288fedaca9f5bdd58a7a2013882a1afd17ef69de2",
+ "dist/2022-02-23/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz": "0ae2188987be65bfad882878e7a1365310c2cc28504f7ad8400fd759dbc40684"
}
}
// compile-flags: -C no-prepopulate-passes
-//
+// min-llvm-version: 14.0
#![crate_type = "lib"]
#[no_mangle]
pub fn low_align_const() -> E<i16, [i16; 3]> {
// Check that low_align_const and high_align_const use the same constant
- // CHECK: memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 2 %1, i8* align 2 getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i{{(32|64)}} 8, i1 false)
+ // CHECK: memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 2 %1, i8* align 2 getelementptr inbounds (<{ [4 x i8], [4 x i8] }>, <{ [4 x i8], [4 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i{{(32|64)}} 8, i1 false)
*&E::A(0)
}
#[no_mangle]
pub fn high_align_const() -> E<i16, i32> {
// Check that low_align_const and high_align_const use the same constant
- // CHECK: memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i{{(32|64)}} 8, i1 false)
+ // CHECK: memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [4 x i8], [4 x i8] }>, <{ [4 x i8], [4 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i{{(32|64)}} 8, i1 false)
*&E::A(0)
}
// NONMSVC: {{.*}}DIDerivedType(tag: DW_TAG_pointer_type, name: "fn() -> <recursive_type>",{{.*}}
//
// CHECK: {{.*}}DISubroutineType{{.*}}
-// CHECK: {{.*}}DIBasicType(name: "<recur_type>", encoding: DW_ATE_unsigned)
+// CHECK: {{.*}}DIBasicType(name: "<recur_type>", size: {{32|64}}, encoding: DW_ATE_unsigned)
pub fn foo() -> impl Copy {
foo
+++ /dev/null
-// compile-flags: -C no-prepopulate-passes -Z partially_uninit_const_threshold=1024
-
-// Like uninit-consts.rs, but tests that we correctly generate partially-uninit consts
-// when the (disabled by default) partially_uninit_const_threshold flag is used.
-
-#![crate_type = "lib"]
-
-use std::mem::MaybeUninit;
-
-pub struct PartiallyUninit {
- x: u32,
- y: MaybeUninit<[u8; 10]>
-}
-
-// This should be partially undef.
-// CHECK: [[PARTIALLY_UNINIT:@[0-9]+]] = private unnamed_addr constant <{ [4 x i8], [12 x i8] }> <{ [4 x i8] c"\EF\BE\AD\DE", [12 x i8] undef }>, align 4
-
-// This shouldn't contain undef, since it's larger than the 1024 byte limit.
-// CHECK: [[UNINIT_PADDING_HUGE:@[0-9]+]] = private unnamed_addr constant <{ [32768 x i8] }> <{ [32768 x i8] c"{{.+}}" }>, align 4
-
-// CHECK-LABEL: @partially_uninit
-#[no_mangle]
-pub const fn partially_uninit() -> PartiallyUninit {
- const X: PartiallyUninit = PartiallyUninit { x: 0xdeadbeef, y: MaybeUninit::uninit() };
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [4 x i8], [12 x i8] }>, <{ [4 x i8], [12 x i8] }>* [[PARTIALLY_UNINIT]], i32 0, i32 0, i32 0), i{{(32|64)}} 16, i1 false)
- X
-}
-
-// CHECK-LABEL: @uninit_padding_huge
-#[no_mangle]
-pub const fn uninit_padding_huge() -> [(u32, u8); 4096] {
- const X: [(u32, u8); 4096] = [(123, 45); 4096];
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [32768 x i8] }>, <{ [32768 x i8] }>* [[UNINIT_PADDING_HUGE]], i32 0, i32 0, i32 0), i{{(32|64)}} 32768, i1 false)
- X
-}
// compile-flags: -C no-prepopulate-passes
+// min-llvm-version: 14.0
// Check that we use undef (and not zero) for uninitialized bytes in constants.
}
// CHECK: [[FULLY_UNINIT:@[0-9]+]] = private unnamed_addr constant <{ [10 x i8] }> undef
-// CHECK: [[PARTIALLY_UNINIT:@[0-9]+]] = private unnamed_addr constant <{ [16 x i8] }> <{ [16 x i8] c"\EF\BE\AD\DE\00\00\00\00\00\00\00\00\00\00\00\00" }>, align 4
+
+// CHECK: [[PARTIALLY_UNINIT:@[0-9]+]] = private unnamed_addr constant <{ [4 x i8], [12 x i8] }> <{ [4 x i8] c"\EF\BE\AD\DE", [12 x i8] undef }>, align 4
+
+// This shouldn't contain undef, since it contains more chunks
+// than the default value of uninit_const_chunk_threshold.
+// CHECK: [[UNINIT_PADDING_HUGE:@[0-9]+]] = private unnamed_addr constant <{ [32768 x i8] }> <{ [32768 x i8] c"{{.+}}" }>, align 4
+
// CHECK: [[FULLY_UNINIT_HUGE:@[0-9]+]] = private unnamed_addr constant <{ [16384 x i8] }> undef
// CHECK-LABEL: @fully_uninit
#[no_mangle]
pub const fn partially_uninit() -> PartiallyUninit {
const X: PartiallyUninit = PartiallyUninit { x: 0xdeadbeef, y: MaybeUninit::uninit() };
- // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [16 x i8] }>, <{ [16 x i8] }>* [[PARTIALLY_UNINIT]], i32 0, i32 0, i32 0), i{{(32|64)}} 16, i1 false)
+ // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [4 x i8], [12 x i8] }>, <{ [4 x i8], [12 x i8] }>* [[PARTIALLY_UNINIT]], i32 0, i32 0, i32 0), i{{(32|64)}} 16, i1 false)
+ X
+}
+
+// CHECK-LABEL: @uninit_padding_huge
+#[no_mangle]
+pub const fn uninit_padding_huge() -> [(u32, u8); 4096] {
+ const X: [(u32, u8); 4096] = [(123, 45); 4096];
+ // CHECK: call void @llvm.memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [32768 x i8] }>, <{ [32768 x i8] }>* [[UNINIT_PADDING_HUGE]], i32 0, i32 0, i32 0), i{{(32|64)}} 32768, i1 false)
X
}
}
bb0: {
- StorageLive(_1); // scope 0 at $DIR/union.rs:13:9: 13:11
- StorageLive(_2); // scope 0 at $DIR/union.rs:13:23: 13:28
- _2 = val() -> bb1; // scope 0 at $DIR/union.rs:13:23: 13:28
+- StorageLive(_1); // scope 0 at $DIR/union.rs:13:9: 13:11
+- StorageLive(_2); // scope 0 at $DIR/union.rs:13:23: 13:28
+- _2 = val() -> bb1; // scope 0 at $DIR/union.rs:13:23: 13:28
++ nop; // scope 0 at $DIR/union.rs:13:9: 13:11
++ nop; // scope 0 at $DIR/union.rs:13:23: 13:28
++ (_1.0: u32) = val() -> bb1; // scope 0 at $DIR/union.rs:13:23: 13:28
// mir::Constant
// + span: $DIR/union.rs:13:23: 13:26
// + literal: Const { ty: fn() -> u32 {val}, val: Value(Scalar(<ZST>)) }
}
bb1: {
- (_1.0: u32) = move _2; // scope 0 at $DIR/union.rs:13:14: 13:30
- StorageDead(_2); // scope 0 at $DIR/union.rs:13:29: 13:30
+- (_1.0: u32) = move _2; // scope 0 at $DIR/union.rs:13:14: 13:30
+- StorageDead(_2); // scope 0 at $DIR/union.rs:13:29: 13:30
++ nop; // scope 0 at $DIR/union.rs:13:14: 13:30
++ nop; // scope 0 at $DIR/union.rs:13:29: 13:30
StorageLive(_3); // scope 1 at $DIR/union.rs:15:5: 15:27
StorageLive(_4); // scope 1 at $DIR/union.rs:15:10: 15:26
_4 = (_1.0: u32); // scope 2 at $DIR/union.rs:15:19: 15:24
StorageDead(_4); // scope 1 at $DIR/union.rs:15:26: 15:27
StorageDead(_3); // scope 1 at $DIR/union.rs:15:27: 15:28
- StorageDead(_1); // scope 0 at $DIR/union.rs:16:1: 16:2
+- StorageDead(_1); // scope 0 at $DIR/union.rs:16:1: 16:2
++ nop; // scope 0 at $DIR/union.rs:16:1: 16:2
return; // scope 0 at $DIR/union.rs:16:2: 16:2
}
}
-//! Tests that projections through unions cancel `DestinationPropagation`.
+//! Tests that we can propogate into places that are projections into unions
// compile-flags: -Zunsound-mir-opts
fn val() -> u32 {
1
assert-attribute: ("#main-content > details.top-doc", {"open": ""})
assert-text: ("#toggle-all-docs", "[−]")
click: "#toggle-all-docs"
-wait-for: 1000
+wait-for: 50
// This is now collapsed so there shouldn't be the "open" attribute on details.
assert-attribute-false: ("#main-content > details.top-doc", {"open": ""})
assert-text: ("#toggle-all-docs", "[+]")
click: "#toggle-all-docs"
-wait-for: 1000
+wait-for: 50
// Not collapsed anymore so the "open" attribute should be back.
assert-attribute: ("#main-content > details.top-doc", {"open": ""})
assert-text: ("#toggle-all-docs", "[−]")
+
+// Check that it works on non-module pages as well.
+goto: file://|DOC_PATH|/test_docs/struct.Foo.html
+// We first check that everything is visible.
+assert-text: ("#toggle-all-docs", "[−]")
+assert-attribute: ("details.rustdoc-toggle", {"open": ""}, ALL)
+// We collapse them all.
+click: "#toggle-all-docs"
+wait-for: 50
+assert-text: ("#toggle-all-docs", "[+]")
+// We check that all <details> are collapsed (except for the impl block ones).
+assert-attribute-false: ("details.rustdoc-toggle:not(.implementors-toggle)", {"open": ""}, ALL)
+assert-attribute: ("details.rustdoc-toggle.implementors-toggle", {"open": ""})
+// We now check that the other impl blocks are collapsed.
+assert-attribute-false: (
+ "#blanket-implementations-list > details.rustdoc-toggle.implementors-toggle",
+ {"open": ""},
+ ALL,
+)
+// We open them all again.
+click: "#toggle-all-docs"
+wait-for: 50
+assert-text: ("#toggle-all-docs", "[−]")
+assert-attribute: ("details.rustdoc-toggle", {"open": ""}, ALL)
--- /dev/null
+// check-pass
+// compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
+// normalize-stderr-test: "src/test/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
+
+/// The doctest will produce a warning because feature invalid is unexpected
+/// ```
+/// #[cfg(feature = "invalid")]
+/// assert!(false);
+/// ```
+pub struct Foo;
--- /dev/null
+warning: unexpected `cfg` condition value
+ --> $DIR/check-cfg-test.rs:9:7
+ |
+LL | #[cfg(feature = "invalid")]
+ | ^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(unexpected_cfgs)]` on by default
+ = note: expected values for `feature` are: test
+
+warning: 1 warning emitted
+
--- /dev/null
+
+running 1 test
+test $DIR/check-cfg-test.rs - Foo (line 8) ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
+
--- /dev/null
+// check-fail
+// compile-flags: --check-cfg=names()
--- /dev/null
+error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg`
+
--- /dev/null
+// check-pass
+// compile-flags: --check-cfg=names() -Z unstable-options
+
+/// uniz is nor a builtin nor pass as arguments so is unexpected
+#[cfg(uniz)]
+//~^ WARNING unexpected `cfg` condition name
+pub struct Bar;
--- /dev/null
+warning: unexpected `cfg` condition name
+ --> $DIR/check-cfg.rs:5:7
+ |
+LL | #[cfg(uniz)]
+ | ^^^^ help: did you mean: `unix`
+ |
+ = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
--- /dev/null
+// Derived from an ICE found in tokio-xmpp during a crater run.
+// edition:2021
+// compile-flags: -Zdrop-tracking
+
+#![allow(dead_code)]
+
+#[derive(Clone)]
+struct InfoResult {
+ node: Option<std::rc::Rc<String>>
+}
+
+struct Agent {
+ info_result: InfoResult
+}
+
+impl Agent {
+ async fn handle(&mut self) {
+ let mut info = self.info_result.clone();
+ info.node = None;
+ let element = parse_info(info);
+ let _ = send_element(element).await;
+ }
+}
+
+struct Element {
+}
+
+async fn send_element(_: Element) {}
+
+fn parse(_: &[u8]) -> Result<(), ()> {
+ Ok(())
+}
+
+fn parse_info(_: InfoResult) -> Element {
+ Element { }
+}
+
+fn assert_send<T: Send>(_: T) {}
+
+fn main() {
+ let agent = Agent { info_result: InfoResult { node: None } };
+ // FIXME: It would be nice for this to work. See #94067.
+ assert_send(agent.handle());
+ //~^ cannot be sent between threads safely
+}
--- /dev/null
+error: future cannot be sent between threads safely
+ --> $DIR/drop-track-field-assign-nonsend.rs:43:17
+ |
+LL | assert_send(agent.handle());
+ | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
+ |
+ = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
+note: future is not `Send` as this value is used across an await
+ --> $DIR/drop-track-field-assign-nonsend.rs:21:38
+ |
+LL | let mut info = self.info_result.clone();
+ | -------- has type `InfoResult` which is not `Send`
+...
+LL | let _ = send_element(element).await;
+ | ^^^^^^ await occurs here, with `mut info` maybe used later
+LL | }
+ | - `mut info` is later dropped here
+note: required by a bound in `assert_send`
+ --> $DIR/drop-track-field-assign-nonsend.rs:38:19
+ |
+LL | fn assert_send<T: Send>(_: T) {}
+ | ^^^^ required by this bound in `assert_send`
+
+error: aborting due to previous error
+
--- /dev/null
+// Derived from an ICE found in tokio-xmpp during a crater run.
+// edition:2021
+// compile-flags: -Zdrop-tracking
+// build-pass
+
+#![allow(dead_code)]
+
+#[derive(Clone)]
+struct InfoResult {
+ node: Option<String>
+}
+
+struct Agent {
+ info_result: InfoResult
+}
+
+impl Agent {
+ async fn handle(&mut self) {
+ let mut info = self.info_result.clone();
+ info.node = Some("bar".into());
+ let element = parse_info(info);
+ let _ = send_element(element).await;
+ }
+}
+
+struct Element {
+}
+
+async fn send_element(_: Element) {}
+
+fn parse(_: &[u8]) -> Result<(), ()> {
+ Ok(())
+}
+
+fn parse_info(_: InfoResult) -> Element {
+ Element { }
+}
+
+fn main() {
+ let mut agent = Agent {
+ info_result: InfoResult { node: None }
+ };
+ let _ = agent.handle();
+}
// edition:2018
// compile-flags: --crate-type lib
-#![feature(in_band_lifetimes)]
-
use std::future::Future;
pub async fn simple_generic<T>() {}
async move { f.foo() }
}
-pub fn call_with_ref_block_in_band(f: &'a (impl Foo + 'a)) -> impl Future<Output = ()> + 'a {
- async move { f.foo() }
-}
-
pub fn async_block_with_same_generic_params_unifies() {
let mut a = call_generic_bound_block(FooType);
a = call_generic_bound_block(FooType);
let f_two = FooType;
let mut d = call_with_ref_block(&f_one);
d = call_with_ref_block(&f_two);
-
- let f_one = FooType;
- let f_two = FooType;
- let mut d = call_with_ref_block_in_band(&f_one);
- d = call_with_ref_block_in_band(&f_two);
}
--- /dev/null
+// check-pass
+
+#![feature(used_with_arg)]
+
+#[used(linker)]
+#[no_mangle] // accidentally detected as `used(compiler)`
+pub static GLOB: usize = 0;
+
+fn main() {}
--> $DIR/ub-ref-ptr.rs:49:1
|
LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a potentially null function pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a null function pointer
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 4, align: 4) {
--> $DIR/ub-ref-ptr.rs:49:1
|
LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a potentially null function pointer
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a null function pointer
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 8, align: 8) {
--- /dev/null
+// Checks that code coverage doesn't interfere with const_precise_live_drops.
+// Regression test for issue #93848.
+//
+// check-pass
+// compile-flags: --crate-type=lib -Cinstrument-coverage -Zno-profiler-runtime
+
+#![feature(const_precise_live_drops)]
+
+#[inline]
+pub const fn transpose<T, E>(this: Option<Result<T, E>>) -> Result<Option<T>, E> {
+ match this {
+ Some(Ok(x)) => Ok(Some(x)),
+ Some(Err(e)) => Err(e),
+ None => Ok(None),
+ }
+}
i: 0 //~ ERROR use of deprecated field `deprecation_lint::DeprecatedStruct::i`: text
};
- let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated struct `deprecation_lint::DeprecatedUnitStruct`: text
+ let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated unit struct `deprecation_lint::DeprecatedUnitStruct`: text
- let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated variant `deprecation_lint::Enum::DeprecatedVariant`: text
+ let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated unit variant `deprecation_lint::Enum::DeprecatedVariant`: text
- let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated struct `deprecation_lint::DeprecatedTupleStruct`: text
+ let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated tuple struct `deprecation_lint::DeprecatedTupleStruct`: text
let _ = nested::DeprecatedStruct { //~ ERROR use of deprecated struct `deprecation_lint::nested::DeprecatedStruct`: text
i: 0 //~ ERROR use of deprecated field `deprecation_lint::nested::DeprecatedStruct::i`: text
};
- let _ = nested::DeprecatedUnitStruct; //~ ERROR use of deprecated struct `deprecation_lint::nested::DeprecatedUnitStruct`: text
+ let _ = nested::DeprecatedUnitStruct; //~ ERROR use of deprecated unit struct `deprecation_lint::nested::DeprecatedUnitStruct`: text
- let _ = nested::Enum::DeprecatedVariant; //~ ERROR use of deprecated variant `deprecation_lint::nested::Enum::DeprecatedVariant`: text
+ let _ = nested::Enum::DeprecatedVariant; //~ ERROR use of deprecated unit variant `deprecation_lint::nested::Enum::DeprecatedVariant`: text
- let _ = nested::DeprecatedTupleStruct (1); //~ ERROR use of deprecated struct `deprecation_lint::nested::DeprecatedTupleStruct`: text
+ let _ = nested::DeprecatedTupleStruct (1); //~ ERROR use of deprecated tuple struct `deprecation_lint::nested::DeprecatedTupleStruct`: text
// At the moment, the lint checker only checks stability in
// in the arguments of macros.
{ .. } = x;
let x = Deprecated2(1, 2, 3);
- //~^ ERROR use of deprecated struct `deprecation_lint::Deprecated2`: text
+ //~^ ERROR use of deprecated tuple struct `deprecation_lint::Deprecated2`: text
let _ = x.0;
//~^ ERROR use of deprecated field `deprecation_lint::Deprecated2::0`: text
//~^ ERROR use of deprecated field `deprecation_lint::Deprecated2::2`: text
let Deprecated2
- //~^ ERROR use of deprecated struct `deprecation_lint::Deprecated2`: text
+ //~^ ERROR use of deprecated tuple struct `deprecation_lint::Deprecated2`: text
(_,
//~^ ERROR use of deprecated field `deprecation_lint::Deprecated2::0`: text
_,
//~^ ERROR use of deprecated field `deprecation_lint::Deprecated2::2`: text
= x;
let Deprecated2
- //~^ ERROR use of deprecated struct `deprecation_lint::Deprecated2`: text
+ //~^ ERROR use of deprecated tuple struct `deprecation_lint::Deprecated2`: text
// the patterns are all fine:
(..) = x;
}
LL | let _ = DeprecatedStruct {
| ^^^^^^^^^^^^^^^^
-error: use of deprecated struct `deprecation_lint::DeprecatedUnitStruct`: text
+error: use of deprecated unit struct `deprecation_lint::DeprecatedUnitStruct`: text
--> $DIR/deprecation-lint.rs:38:17
|
LL | let _ = DeprecatedUnitStruct;
| ^^^^^^^^^^^^^^^^^^^^
-error: use of deprecated variant `deprecation_lint::Enum::DeprecatedVariant`: text
+error: use of deprecated unit variant `deprecation_lint::Enum::DeprecatedVariant`: text
--> $DIR/deprecation-lint.rs:40:23
|
LL | let _ = Enum::DeprecatedVariant;
| ^^^^^^^^^^^^^^^^^
-error: use of deprecated struct `deprecation_lint::DeprecatedTupleStruct`: text
+error: use of deprecated tuple struct `deprecation_lint::DeprecatedTupleStruct`: text
--> $DIR/deprecation-lint.rs:42:17
|
LL | let _ = DeprecatedTupleStruct (1);
LL | let _ = nested::DeprecatedStruct {
| ^^^^^^^^^^^^^^^^
-error: use of deprecated struct `deprecation_lint::nested::DeprecatedUnitStruct`: text
+error: use of deprecated unit struct `deprecation_lint::nested::DeprecatedUnitStruct`: text
--> $DIR/deprecation-lint.rs:48:25
|
LL | let _ = nested::DeprecatedUnitStruct;
| ^^^^^^^^^^^^^^^^^^^^
-error: use of deprecated variant `deprecation_lint::nested::Enum::DeprecatedVariant`: text
+error: use of deprecated unit variant `deprecation_lint::nested::Enum::DeprecatedVariant`: text
--> $DIR/deprecation-lint.rs:50:31
|
LL | ... let _ = nested::Enum::DeprecatedVariant;
| ^^^^^^^^^^^^^^^^^
-error: use of deprecated struct `deprecation_lint::nested::DeprecatedTupleStruct`: text
+error: use of deprecated tuple struct `deprecation_lint::nested::DeprecatedTupleStruct`: text
--> $DIR/deprecation-lint.rs:52:25
|
LL | ... let _ = nested::DeprecatedTupleStruct (1);
LL | let Deprecated
| ^^^^^^^^^^
-error: use of deprecated struct `deprecation_lint::Deprecated2`: text
+error: use of deprecated tuple struct `deprecation_lint::Deprecated2`: text
--> $DIR/deprecation-lint.rs:132:17
|
LL | let x = Deprecated2(1, 2, 3);
| ^^^^^^^^^^^
-error: use of deprecated struct `deprecation_lint::Deprecated2`: text
+error: use of deprecated tuple struct `deprecation_lint::Deprecated2`: text
--> $DIR/deprecation-lint.rs:142:13
|
LL | let Deprecated2
| ^^^^^^^^^^^
-error: use of deprecated struct `deprecation_lint::Deprecated2`: text
+error: use of deprecated tuple struct `deprecation_lint::Deprecated2`: text
--> $DIR/deprecation-lint.rs:151:13
|
LL | let Deprecated2
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/E0261.rs:5:9
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | x: &'a str,
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error: aborting due to 2 previous errors
--- /dev/null
+#[repr(C)]
+struct ReallyBig {
+ _a: [u8; usize::MAX],
+}
+
+// The limit for "too big for the current architecture" is dependent on the target pointer size
+// however it's artifically limited on 64 bits
+// logic copied from rustc_target::abi::TargetDataLayout::obj_size_bound()
+const fn max_size() -> usize {
+ #[cfg(target_pointer_width = "16")]
+ {
+ 1 << 15
+ }
+
+ #[cfg(target_pointer_width = "32")]
+ {
+ 1 << 31
+ }
+
+ #[cfg(target_pointer_width = "64")]
+ {
+ 1 << 47
+ }
+
+ #[cfg(not(any(
+ target_pointer_width = "16",
+ target_pointer_width = "32",
+ target_pointer_width = "64"
+ )))]
+ {
+ isize::MAX as usize
+ }
+}
+
+extern "C" {
+ static FOO: [u8; 1];
+ static BAR: [u8; max_size() - 1];
+ static BAZ: [u8; max_size()]; //~ ERROR extern static is too large
+ static UWU: [usize; usize::MAX]; //~ ERROR extern static is too large
+ static A: ReallyBig; //~ ERROR extern static is too large
+}
+
+fn main() {}
--- /dev/null
+error: extern static is too large for the current architecture
+ --> $DIR/extern-static-size-overflow.rs:38:5
+ |
+LL | static BAZ: [u8; max_size()];
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: extern static is too large for the current architecture
+ --> $DIR/extern-static-size-overflow.rs:39:5
+ |
+LL | static UWU: [usize; usize::MAX];
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: extern static is too large for the current architecture
+ --> $DIR/extern-static-size-overflow.rs:40:5
+ |
+LL | static A: ReallyBig;
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
+++ /dev/null
-#![allow(warnings)]
-
-fn foo(x: &'x u8) -> &'x u8 { x }
-//~^ ERROR use of undeclared lifetime name
-//~^^ ERROR use of undeclared lifetime name
-
-struct X<'a>(&'a u8);
-
-impl<'a> X<'a> {
- fn inner(&self) -> &'a u8 {
- self.0
- }
-}
-
-impl<'a> X<'b> {
-//~^ ERROR use of undeclared lifetime name
- fn inner_2(&self) -> &'b u8 {
- //~^ ERROR use of undeclared lifetime name
- self.0
- }
-}
-
-impl X<'b> {
-//~^ ERROR use of undeclared lifetime name
- fn inner_3(&self) -> &'b u8 {
- //~^ ERROR use of undeclared lifetime name
- self.0
- }
-}
-
-struct Y<T>(T);
-
-impl Y<&'a u8> {
- //~^ ERROR use of undeclared lifetime name
- fn inner(&self) -> &'a u8 {
- //~^ ERROR use of undeclared lifetime name
- self.0
- }
-}
-
-trait MyTrait<'a> {
- fn my_lifetime(&self) -> &'a u8;
- fn any_lifetime() -> &'b u8;
- //~^ ERROR use of undeclared lifetime name
- fn borrowed_lifetime(&'b self) -> &'b u8;
- //~^ ERROR use of undeclared lifetime name
- //~^^ ERROR use of undeclared lifetime name
-}
-
-impl MyTrait<'a> for Y<&'a u8> {
-//~^ ERROR use of undeclared lifetime name
-//~^^ ERROR use of undeclared lifetime name
- fn my_lifetime(&self) -> &'a u8 { self.0 }
- //~^ ERROR use of undeclared lifetime name
- fn any_lifetime() -> &'b u8 { &0 }
- //~^ ERROR use of undeclared lifetime name
- fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
- //~^ ERROR use of undeclared lifetime name
- //~^^ ERROR use of undeclared lifetime name
-}
-
-fn main() {}
+++ /dev/null
-error[E0261]: use of undeclared lifetime name `'x`
- --> $DIR/feature-gate-in_band_lifetimes.rs:3:12
- |
-LL | fn foo(x: &'x u8) -> &'x u8 { x }
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'x` here: `<'x>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-
-error[E0261]: use of undeclared lifetime name `'x`
- --> $DIR/feature-gate-in_band_lifetimes.rs:3:23
- |
-LL | fn foo(x: &'x u8) -> &'x u8 { x }
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'x` here: `<'x>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:15:12
- |
-LL | impl<'a> X<'b> {
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'b` here: `'b,`
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:17:27
- |
-LL | fn inner_2(&self) -> &'b u8 {
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | impl<'b, 'a> X<'b> {
- | +++
-help: consider introducing lifetime `'b` here
- |
-LL | fn inner_2<'b>(&self) -> &'b u8 {
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:23:8
- |
-LL | impl X<'b> {
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'b` here: `<'b>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:25:27
- |
-LL | fn inner_3(&self) -> &'b u8 {
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | impl<'b> X<'b> {
- | ++++
-help: consider introducing lifetime `'b` here
- |
-LL | fn inner_3<'b>(&self) -> &'b u8 {
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'a`
- --> $DIR/feature-gate-in_band_lifetimes.rs:33:9
- |
-LL | impl Y<&'a u8> {
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-
-error[E0261]: use of undeclared lifetime name `'a`
- --> $DIR/feature-gate-in_band_lifetimes.rs:35:25
- |
-LL | fn inner(&self) -> &'a u8 {
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'a` here
- |
-LL | impl<'a> Y<&'a u8> {
- | ++++
-help: consider introducing lifetime `'a` here
- |
-LL | fn inner<'a>(&self) -> &'a u8 {
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'a`
- --> $DIR/feature-gate-in_band_lifetimes.rs:50:14
- |
-LL | impl MyTrait<'a> for Y<&'a u8> {
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-
-error[E0261]: use of undeclared lifetime name `'a`
- --> $DIR/feature-gate-in_band_lifetimes.rs:50:25
- |
-LL | impl MyTrait<'a> for Y<&'a u8> {
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-
-error[E0261]: use of undeclared lifetime name `'a`
- --> $DIR/feature-gate-in_band_lifetimes.rs:53:31
- |
-LL | fn my_lifetime(&self) -> &'a u8 { self.0 }
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'a` here
- |
-LL | impl<'a> MyTrait<'a> for Y<&'a u8> {
- | ++++
-help: consider introducing lifetime `'a` here
- |
-LL | fn my_lifetime<'a>(&self) -> &'a u8 { self.0 }
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:55:27
- |
-LL | fn any_lifetime() -> &'b u8 { &0 }
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
- | ++++
-help: consider introducing lifetime `'b` here
- |
-LL | fn any_lifetime<'b>() -> &'b u8 { &0 }
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:57:27
- |
-LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
- | ++++
-help: consider introducing lifetime `'b` here
- |
-LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:57:40
- |
-LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
- | ++++
-help: consider introducing lifetime `'b` here
- |
-LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:43:27
- |
-LL | fn any_lifetime() -> &'b u8;
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | trait MyTrait<'b, 'a> {
- | +++
-help: consider introducing lifetime `'b` here
- |
-LL | fn any_lifetime<'b>() -> &'b u8;
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:45:27
- |
-LL | fn borrowed_lifetime(&'b self) -> &'b u8;
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | trait MyTrait<'b, 'a> {
- | +++
-help: consider introducing lifetime `'b` here
- |
-LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8;
- | ++++
-
-error[E0261]: use of undeclared lifetime name `'b`
- --> $DIR/feature-gate-in_band_lifetimes.rs:45:40
- |
-LL | fn borrowed_lifetime(&'b self) -> &'b u8;
- | ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
-help: consider introducing lifetime `'b` here
- |
-LL | trait MyTrait<'b, 'a> {
- | +++
-help: consider introducing lifetime `'b` here
- |
-LL | fn borrowed_lifetime<'b>(&'b self) -> &'b u8;
- | ++++
-
-error: aborting due to 17 previous errors
-
-For more information about this error, try `rustc --explain E0261`.
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'x` here: `<'x>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0582]: binding for associated type `Y` references lifetime `'a`, which does not appear in the trait input types
--> $DIR/gat-in-trait-path-undeclared-lifetime.rs:8:33
LL | + Deref<Target = Self::Item<'b>>;
| ^^ undeclared lifetime
|
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | trait Iterable<'b> {
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
| ^^^^^^^^^^^ undeclared lifetime
|
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'undeclared` here
|
LL | trait Iterable<'undeclared> {
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/issue-67510.rs:7:26
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error: aborting due to 2 previous errors
// run-pass
#![allow(dead_code)]
-#![feature(in_band_lifetimes)]
-fn foo(x: &'x u32) -> impl Fn() -> &'y u32
+fn foo<'x, 'y>(x: &'x u32) -> impl Fn() -> &'y u32
where 'x: 'y
{
move || x
// run-pass
#![allow(dead_code)]
-#![feature(in_band_lifetimes)]
trait Trait<'a> { }
-impl Trait<'b> for &'a u32 { }
+impl<'a, 'b> Trait<'b> for &'a u32 { }
-fn foo(x: &'x u32) -> impl Trait<'y>
+fn foo<'x, 'y>(x: &'x u32) -> impl Trait<'y>
where 'x: 'y
{
x
// See https://github.com/rust-lang/rust/issues/46541 for more details.
#![allow(dead_code)]
-#![feature(in_band_lifetimes)]
use std::cell::Cell;
trait Trait<'a> { }
-impl Trait<'b> for Cell<&'a u32> { }
+impl<'a, 'b> Trait<'b> for Cell<&'a u32> { }
-fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
+fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y>
//~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds [E0700]
where 'x: 'y
{
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
- --> $DIR/region-escape-via-bound.rs:15:29
+ --> $DIR/region-escape-via-bound.rs:14:37
|
-LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
- | ^^^^^^^^^^^^^^
-LL |
-LL | where 'x: 'y
- | -- hidden type `Cell<&'x u32>` captures the lifetime `'x` as defined here
+LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y>
+ | -- ^^^^^^^^^^^^^^
+ | |
+ | hidden type `Cell<&'x u32>` captures the lifetime `'x` as defined here
|
help: to declare that the `impl Trait` captures `'x`, you can add an explicit `'x` lifetime bound
|
-LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y> + 'x
- | ++++
+LL | fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> + 'x
+ | ++++
error: aborting due to previous error
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-fn foo(x: fn(&'a u32)) {} //~ ERROR must be explicitly
-
-fn bar(x: &Fn(&'a u32)) {} //~ ERROR must be explicitly
-
-fn baz(x: fn(&'a u32), y: &'a u32) {} //~ ERROR must be explicitly
-
-struct Foo<'a> { x: &'a u32 }
-
-impl Foo<'a> {
- fn bar(&self, x: fn(&'a u32)) {} //~ ERROR must be explicitly
-}
-
-fn main() {}
+++ /dev/null
-error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders
- --> $DIR/E0687.rs:4:15
- |
-LL | fn foo(x: fn(&'a u32)) {}
- | ^^ in-band lifetime definition
-
-error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders
- --> $DIR/E0687.rs:6:16
- |
-LL | fn bar(x: &Fn(&'a u32)) {}
- | ^^ in-band lifetime definition
-
-error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders
- --> $DIR/E0687.rs:8:15
- |
-LL | fn baz(x: fn(&'a u32), y: &'a u32) {}
- | ^^ in-band lifetime definition
-
-error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders
- --> $DIR/E0687.rs:13:26
- |
-LL | fn bar(&self, x: fn(&'a u32)) {}
- | ^^ in-band lifetime definition
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0687`.
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-fn bar<F>(x: &F) where F: Fn(&'a u32) {} //~ ERROR must be explicitly
-
-fn baz(x: &impl Fn(&'a u32)) {} //~ ERROR must be explicitly
-
-fn main() {}
+++ /dev/null
-error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders
- --> $DIR/E0687_where.rs:4:31
- |
-LL | fn bar<F>(x: &F) where F: Fn(&'a u32) {}
- | ^^ in-band lifetime definition
-
-error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders
- --> $DIR/E0687_where.rs:6:21
- |
-LL | fn baz(x: &impl Fn(&'a u32)) {}
- | ^^ in-band lifetime definition
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0687`.
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix
-
-struct Foo<'a> { x: &'a u32 }
-
-impl Foo<'a> {
- fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix
-}
-
-impl<'b> Foo<'a> { //~ ERROR cannot mix
- fn baz() {}
-}
-
-fn main() {}
+++ /dev/null
-error[E0688]: cannot mix in-band and explicit lifetime definitions
- --> $DIR/E0688.rs:4:28
- |
-LL | fn foo<'a>(x: &'a u32, y: &'b u32) {}
- | -- ^^ in-band lifetime definition here
- | |
- | explicit lifetime definition here
-
-error[E0688]: cannot mix in-band and explicit lifetime definitions
- --> $DIR/E0688.rs:9:44
- |
-LL | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {}
- | -- ^^ in-band lifetime definition here
- | |
- | explicit lifetime definition here
-
-error[E0688]: cannot mix in-band and explicit lifetime definitions
- --> $DIR/E0688.rs:12:14
- |
-LL | impl<'b> Foo<'a> {
- | -- ^^ in-band lifetime definition here
- | |
- | explicit lifetime definition here
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0688`.
+++ /dev/null
-// run-rustfix
-// edition:2018
-
-#![allow(unused)]
-#![deny(elided_lifetimes_in_paths)]
-//~^ NOTE the lint level is defined here
-
-use std::cell::{Ref, RefCell};
-
-struct Foo<'a> {
- x: &'a u32,
-}
-
-fn foo(x: &Foo<'_>) {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
-}
-
-fn bar(x: &Foo<'_>) {}
-
-struct Wrapped<'a>(&'a str);
-
-struct WrappedWithBow<'a> {
- gift: &'a str,
-}
-
-struct MatchedSet<'a, 'b> {
- one: &'a str,
- another: &'b str,
-}
-
-fn wrap_gift(gift: &str) -> Wrapped<'_> {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- Wrapped(gift)
-}
-
-fn wrap_gift_with_bow(gift: &str) -> WrappedWithBow<'_> {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- WrappedWithBow { gift }
-}
-
-fn inspect_matched_set(set: MatchedSet<'_, '_>) {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected 2 lifetime parameters
- //~| HELP consider using the `'_` lifetime
- println!("{} {}", set.one, set.another);
-}
-
-// Verify that the lint does not fire, because the added `'_` wouldn't be resolved correctly.
-fn match_sets() -> MatchedSet<'static, 'static> {
- //~^ ERROR missing lifetime specifiers
- //~| NOTE expected 2 lifetime parameters
- //~| HELP this function's return type contains a borrowed value
- //~| HELP consider using the `'static` lifetime
- MatchedSet { one: "one", another: "another" }
-}
-
-macro_rules! autowrapper {
- ($type_name:ident, $fn_name:ident, $lt:lifetime) => {
- struct $type_name<$lt> {
- gift: &$lt str
- }
-
- fn $fn_name(gift: &str) -> $type_name<'_> {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- //~| ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- $type_name { gift }
- }
- }
-}
-
-autowrapper!(Autowrapped, autowrap_gift, 'a);
-//~^ NOTE in this expansion of autowrapper!
-//~| NOTE in this expansion of autowrapper!
-
-// Verify that rustfix does not try to apply the fix twice.
-autowrapper!(AutowrappedAgain, autowrap_gift_again, 'a);
-//~^ NOTE in this expansion of autowrapper!
-//~| NOTE in this expansion of autowrapper!
-
-macro_rules! anytuple_ref_ty {
- ($($types:ty),*) => {
- Ref<'_, ($($types),*)>
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- }
-}
-
-#[allow(elided_lifetimes_in_paths)]
-mod blah {
- struct Thing<'a>(&'a i32);
- struct Bar<T>(T);
-
- fn foo(b: Bar<Thing>) {}
-}
-
-fn main() {
- let honesty = RefCell::new((4, 'e'));
- let loyalty: Ref<'_, (u32, char)> = honesty.borrow();
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- let generosity = Ref::map(loyalty, |t| &t.0);
-
- let laughter = RefCell::new((true, "magic"));
- let yellow: anytuple_ref_ty!(bool, &str) = laughter.borrow();
- //~^ NOTE in this expansion of anytuple_ref_ty!
- //~| NOTE in this expansion of anytuple_ref_ty!
-}
+++ /dev/null
-// run-rustfix
-// edition:2018
-
-#![allow(unused)]
-#![deny(elided_lifetimes_in_paths)]
-//~^ NOTE the lint level is defined here
-
-use std::cell::{Ref, RefCell};
-
-struct Foo<'a> {
- x: &'a u32,
-}
-
-fn foo(x: &Foo) {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
-}
-
-fn bar(x: &Foo<'_>) {}
-
-struct Wrapped<'a>(&'a str);
-
-struct WrappedWithBow<'a> {
- gift: &'a str,
-}
-
-struct MatchedSet<'a, 'b> {
- one: &'a str,
- another: &'b str,
-}
-
-fn wrap_gift(gift: &str) -> Wrapped {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- Wrapped(gift)
-}
-
-fn wrap_gift_with_bow(gift: &str) -> WrappedWithBow {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- WrappedWithBow { gift }
-}
-
-fn inspect_matched_set(set: MatchedSet) {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected 2 lifetime parameters
- //~| HELP consider using the `'_` lifetime
- println!("{} {}", set.one, set.another);
-}
-
-// Verify that the lint does not fire, because the added `'_` wouldn't be resolved correctly.
-fn match_sets() -> MatchedSet {
- //~^ ERROR missing lifetime specifiers
- //~| NOTE expected 2 lifetime parameters
- //~| HELP this function's return type contains a borrowed value
- //~| HELP consider using the `'static` lifetime
- MatchedSet { one: "one", another: "another" }
-}
-
-macro_rules! autowrapper {
- ($type_name:ident, $fn_name:ident, $lt:lifetime) => {
- struct $type_name<$lt> {
- gift: &$lt str
- }
-
- fn $fn_name(gift: &str) -> $type_name {
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- //~| ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- $type_name { gift }
- }
- }
-}
-
-autowrapper!(Autowrapped, autowrap_gift, 'a);
-//~^ NOTE in this expansion of autowrapper!
-//~| NOTE in this expansion of autowrapper!
-
-// Verify that rustfix does not try to apply the fix twice.
-autowrapper!(AutowrappedAgain, autowrap_gift_again, 'a);
-//~^ NOTE in this expansion of autowrapper!
-//~| NOTE in this expansion of autowrapper!
-
-macro_rules! anytuple_ref_ty {
- ($($types:ty),*) => {
- Ref<($($types),*)>
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- }
-}
-
-#[allow(elided_lifetimes_in_paths)]
-mod blah {
- struct Thing<'a>(&'a i32);
- struct Bar<T>(T);
-
- fn foo(b: Bar<Thing>) {}
-}
-
-fn main() {
- let honesty = RefCell::new((4, 'e'));
- let loyalty: Ref<(u32, char)> = honesty.borrow();
- //~^ ERROR hidden lifetime parameters in types are deprecated
- //~| NOTE expected named lifetime parameter
- //~| HELP consider using the `'_` lifetime
- let generosity = Ref::map(loyalty, |t| &t.0);
-
- let laughter = RefCell::new((true, "magic"));
- let yellow: anytuple_ref_ty!(bool, &str) = laughter.borrow();
- //~^ NOTE in this expansion of anytuple_ref_ty!
- //~| NOTE in this expansion of anytuple_ref_ty!
-}
+++ /dev/null
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:14:12
- |
-LL | fn foo(x: &Foo) {
- | ^^^ expected named lifetime parameter
- |
-note: the lint level is defined here
- --> $DIR/elided-lifetimes.rs:5:9
- |
-LL | #![deny(elided_lifetimes_in_paths)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
-help: consider using the `'_` lifetime
- |
-LL | fn foo(x: &Foo<'_>) {
- | ~~~~~~~
-
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:33:29
- |
-LL | fn wrap_gift(gift: &str) -> Wrapped {
- | ^^^^^^^ expected named lifetime parameter
- |
-help: consider using the `'_` lifetime
- |
-LL | fn wrap_gift(gift: &str) -> Wrapped<'_> {
- | ~~~~~~~~~~~
-
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:40:38
- |
-LL | fn wrap_gift_with_bow(gift: &str) -> WrappedWithBow {
- | ^^^^^^^^^^^^^^ expected named lifetime parameter
- |
-help: consider using the `'_` lifetime
- |
-LL | fn wrap_gift_with_bow(gift: &str) -> WrappedWithBow<'_> {
- | ~~~~~~~~~~~~~~~~~~
-
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:47:29
- |
-LL | fn inspect_matched_set(set: MatchedSet) {
- | ^^^^^^^^^^ expected 2 lifetime parameters
- |
-help: consider using the `'_` lifetime
- |
-LL | fn inspect_matched_set(set: MatchedSet<'_, '_>) {
- | ~~~~~~~~~~~~~~~~~~
-
-error[E0106]: missing lifetime specifiers
- --> $DIR/elided-lifetimes.rs:55:20
- |
-LL | fn match_sets() -> MatchedSet {
- | ^^^^^^^^^^ expected 2 lifetime parameters
- |
- = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
- |
-LL | fn match_sets() -> MatchedSet<'static, 'static> {
- | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:69:36
- |
-LL | fn $fn_name(gift: &str) -> $type_name {
- | ^^^^^^^^^^ expected named lifetime parameter
-...
-LL | autowrapper!(Autowrapped, autowrap_gift, 'a);
- | -------------------------------------------- in this macro invocation
- |
- = note: this error originates in the macro `autowrapper` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider using the `'_` lifetime
- |
-LL | fn $fn_name(gift: &str) -> $type_name<'_> {
- | ~~~~~~~~~~~~~~
-
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:69:36
- |
-LL | fn $fn_name(gift: &str) -> $type_name {
- | ^^^^^^^^^^ expected named lifetime parameter
-...
-LL | autowrapper!(AutowrappedAgain, autowrap_gift_again, 'a);
- | ------------------------------------------------------- in this macro invocation
- |
- = note: this error originates in the macro `autowrapper` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider using the `'_` lifetime
- |
-LL | fn $fn_name(gift: &str) -> $type_name<'_> {
- | ~~~~~~~~~~~~~~
-
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:109:22
- |
-LL | let loyalty: Ref<(u32, char)> = honesty.borrow();
- | ^ expected named lifetime parameter
- |
-help: consider using the `'_` lifetime
- |
-LL | let loyalty: Ref<'_, (u32, char)> = honesty.borrow();
- | +++
-
-error: hidden lifetime parameters in types are deprecated
- --> $DIR/elided-lifetimes.rs:92:13
- |
-LL | Ref<($($types),*)>
- | ^ expected named lifetime parameter
-...
-LL | let yellow: anytuple_ref_ty!(bool, &str) = laughter.borrow();
- | ---------------------------- in this macro invocation
- |
- = note: this error originates in the macro `anytuple_ref_ty` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider using the `'_` lifetime
- |
-LL | Ref<'_, ($($types),*)>
- | +++
-
-error: aborting due to 9 previous errors
-
-For more information about this error, try `rustc --explain E0106`.
+++ /dev/null
-// run-pass
-
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-fn foo(x: &'x u8) -> &'x u8 { x }
-fn foo2(x: &'a u8, y: &u8) -> &'a u8 { x }
-
-fn check_in_band_can_be_late_bound() {
- let _: for<'x> fn(&'x u8, &u8) -> &'x u8 = foo2;
-}
-
-struct ForInherentNoParams;
-
-impl ForInherentNoParams {
- fn foo(x: &'a u32, y: &u32) -> &'a u32 { x }
-}
-
-struct X<'a>(&'a u8);
-
-impl<'a> X<'a> {
- fn inner(&self) -> &'a u8 {
- self.0
- }
-
- fn same_lifetime_as_parameter(&mut self, x: &'a u8) {
- self.0 = x;
- }
-}
-
-impl X<'b> {
- fn inner_2(&self) -> &'b u8 {
- self.0
- }
-
- fn reference_already_introduced_in_band_from_method_with_explicit_binders<'a>(
- &'b self, x: &'a u32
- ) {}
-}
-
-struct Y<T>(T);
-
-impl Y<&'a u8> {
- fn inner(&self) -> &'a u8 {
- self.0
- }
-}
-
-trait MyTrait<'a> {
- fn my_lifetime(&self) -> &'a u8;
- fn any_lifetime() -> &'b u8;
- fn borrowed_lifetime(&'b self) -> &'b u8;
- fn default_impl(&self, x: &'b u32, y: &u32) -> &'b u32 { x }
- fn in_band_def_explicit_impl(&self, x: &'b u8);
-}
-
-impl MyTrait<'a> for Y<&'a u8> {
- fn my_lifetime(&self) -> &'a u8 { self.0 }
- fn any_lifetime() -> &'b u8 { &0 }
- fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
- fn in_band_def_explicit_impl<'b>(&self, x: &'b u8) {}
-}
-
-fn test_hrtb_defined_lifetime_where<F>(_: F) where for<'a> F: Fn(&'a u8) {}
-fn test_hrtb_defined_lifetime_polytraitref<F>(_: F) where F: for<'a> Fn(&'a u8) {}
-
-fn reference_in_band_from_locals(x: &'test u32) -> &'test u32 {
- let y: &'test u32 = x;
- y
-}
-
-fn in_generics_in_band<T: MyTrait<'a>>(x: &T) {}
-fn where_clause_in_band<T>(x: &T) where T: MyTrait<'a> {}
-fn impl_trait_in_band(x: &impl MyTrait<'a>) {}
-
-// Tests around using in-band lifetimes within existential traits.
-
-trait FunkyTrait<'a> { }
-impl<'a, T> FunkyTrait<'a> for T { }
-fn ret_pos_impl_trait_in_band_outlives(x: &'a u32) -> impl ::std::fmt::Debug + 'a {
- x
-}
-fn ret_pos_impl_trait_in_band_param(x: &'a u32) -> impl FunkyTrait<'a> {
- x
-}
-fn ret_pos_impl_trait_in_band_param_static(x: &'a u32) -> impl FunkyTrait<'static> + 'a {
- x
-}
-fn ret_pos_impl_trait_in_band_param_outlives(x: &'a u32) -> impl FunkyTrait<'a> + 'a {
- x
-}
-fn ret_pos_impl_trait_in_band_higher_ranked(x: &'a u32) -> impl for<'b> FunkyTrait<'b> + 'a {
- x
-}
-
-fn main() {}
+++ /dev/null
-#![deny(elided_lifetimes_in_paths)]
-
-// Previously, the elided-lifetimes-in-path lint would fire, but we don't want
-// that, because `'_` isn't legal in struct declarations.
-
-struct Betrayal<'a> { x: &'a u8 }
-
-struct Heartbreak(Betrayal); //~ ERROR missing lifetime specifier
-
-fn main() {}
+++ /dev/null
-error[E0106]: missing lifetime specifier
- --> $DIR/issue-61124-anon-lifetime-in-struct-declaration.rs:8:19
- |
-LL | struct Heartbreak(Betrayal);
- | ^^^^^^^^ expected named lifetime parameter
- |
-help: consider introducing a named lifetime parameter
- |
-LL | struct Heartbreak<'a>(Betrayal<'a>);
- | ++++ ~~~~~~~~~~~~
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0106`.
+++ /dev/null
-error[E0621]: explicit lifetime required in the type of `y`
- --> $DIR/mismatched.rs:4:42
- |
-LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y }
- | ---- ^ lifetime `'a` required
- | |
- | help: add explicit lifetime `'a` to the type of `y`: `&'a u32`
-
-error: lifetime may not live long enough
- --> $DIR/mismatched.rs:6:46
- |
-LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y }
- | -- -- ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
- | | |
- | | lifetime `'b` defined here
- | lifetime `'a` defined here
- |
- = help: consider adding the following bound: `'b: 'a`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0621`.
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required
-
-fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch
-
-fn main() {}
+++ /dev/null
-error[E0621]: explicit lifetime required in the type of `y`
- --> $DIR/mismatched.rs:4:42
- |
-LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y }
- | ---- ^ lifetime `'a` required
- | |
- | help: add explicit lifetime `'a` to the type of `y`: `&'a u32`
-
-error[E0623]: lifetime mismatch
- --> $DIR/mismatched.rs:6:46
- |
-LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y }
- | ------- ------- ^ ...but data from `y` is returned here
- | |
- | this parameter and the return type are declared with different lifetimes...
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0621, E0623.
-For more information about an error, try `rustc --explain E0621`.
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-trait Get {
- fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 {
- y //~ ERROR explicit lifetime required
- }
-}
-
-fn main() {}
+++ /dev/null
-error[E0621]: explicit lifetime required in the type of `y`
- --> $DIR/mismatched_trait.rs:6:9
- |
-LL | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 {
- | ---- help: add explicit lifetime `'a` to the type of `y`: `&'a u32`
-LL | y
- | ^ lifetime `'a` required
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0621`.
+++ /dev/null
-use std::ops::Deref;
-trait Trait {}
-
-struct Struct;
-
-impl Deref for Struct {
- type Target = dyn Trait;
- fn deref(&self) -> &dyn Trait {
- //~^ ERROR `impl` item signature doesn't match `trait` item signature
- unimplemented!();
- }
-}
-
-fn main() {}
+++ /dev/null
-error: `impl` item signature doesn't match `trait` item signature
- --> $DIR/mismatched_trait_impl-2.rs:8:5
- |
-LL | fn deref(&self) -> &dyn Trait {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Struct) -> &'1 (dyn Trait + '1)`
- |
- ::: $SRC_DIR/core/src/ops/deref.rs:LL:COL
- |
-LL | fn deref(&self) -> &Self::Target;
- | --------------------------------- expected `fn(&'1 Struct) -> &'1 (dyn Trait + 'static)`
- |
- = note: expected `fn(&'1 Struct) -> &'1 (dyn Trait + 'static)`
- found `fn(&'1 Struct) -> &'1 (dyn Trait + '1)`
- = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
- = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
-
-error: aborting due to previous error
-
+++ /dev/null
-error: `impl` item signature doesn't match `trait` item signature
- --> $DIR/mismatched_trait_impl.rs:9:5
- |
-LL | fn foo(&self, x: &'a u32, y: &u32) -> &'a u32;
- | ---------------------------------------------- expected `fn(&'1 i32, &'a u32, &'2 u32) -> &'a u32`
-...
-LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 i32, &'2 u32, &'3 u32) -> &'3 u32`
- |
- = note: expected `fn(&'1 i32, &'a u32, &'2 u32) -> &'a u32`
- found `fn(&'1 i32, &'2 u32, &'3 u32) -> &'3 u32`
- = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
- = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
-
-error: aborting due to previous error
-
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-trait Get {
- fn foo(&self, x: &'a u32, y: &u32) -> &'a u32;
-}
-
-impl Get for i32 {
- fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR `impl` item signature doesn't match
- x //~ ERROR lifetime mismatch
- }
-}
-
-fn main() {}
+++ /dev/null
-error: `impl` item signature doesn't match `trait` item signature
- --> $DIR/mismatched_trait_impl.rs:9:5
- |
-LL | fn foo(&self, x: &'a u32, y: &u32) -> &'a u32;
- | ---------------------------------------------- expected `fn(&'1 i32, &'a u32, &'2 u32) -> &'a u32`
-...
-LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 i32, &'2 u32, &'3 u32) -> &'3 u32`
- |
- = note: expected `fn(&'1 i32, &'a u32, &'2 u32) -> &'a u32`
- found `fn(&'1 i32, &'2 u32, &'3 u32) -> &'3 u32`
- = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
- = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
-
-error[E0623]: lifetime mismatch
- --> $DIR/mismatched_trait_impl.rs:10:9
- |
-LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 {
- | ---- -------
- | |
- | this parameter and the return type are declared with different lifetimes...
-LL | x
- | ^ ...but data from `x` is returned here
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0623`.
+++ /dev/null
-#![feature(generic_associated_types)]
-#![allow(unused)]
-
-trait Trait<'a> {
- type Foo;
-
- type Bar<'b>
- //~^ NOTE associated type defined here, with 1 lifetime parameter
- //~| NOTE
- where
- Self: 'b;
-}
-
-struct Impl<'a>(&'a ());
-
-impl<'a> Trait<'a> for Impl<'a> {
- type Foo = &'a ();
- type Bar<'b> = &'b ();
-}
-
-type A<'a> = Impl<'a>;
-
-type B<'a> = <A<'a> as Trait>::Foo;
-//~^ ERROR missing lifetime specifier
-//~| NOTE expected named lifetime parameter
-
-type C<'a, 'b> = <A<'a> as Trait>::Bar;
-//~^ ERROR missing lifetime specifier
-//~| ERROR missing generics for associated type
-//~| NOTE expected named lifetime parameter
-//~| NOTE these named lifetimes are available to use
-//~| NOTE expected 1 lifetime argument
-
-fn main() {}
+++ /dev/null
-error[E0106]: missing lifetime specifier
- --> $DIR/missing-lifetime-in-alias.rs:23:24
- |
-LL | type B<'a> = <A<'a> as Trait>::Foo;
- | ^^^^^ expected named lifetime parameter
- |
-help: consider using the `'a` lifetime
- |
-LL | type B<'a> = <A<'a> as Trait<'a>>::Foo;
- | ~~~~~~~~~
-
-error[E0106]: missing lifetime specifier
- --> $DIR/missing-lifetime-in-alias.rs:27:28
- |
-LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
- | ^^^^^ expected named lifetime parameter
- |
-note: these named lifetimes are available to use
- --> $DIR/missing-lifetime-in-alias.rs:27:8
- |
-LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
- | ^^ ^^
-
-error[E0107]: missing generics for associated type `Trait::Bar`
- --> $DIR/missing-lifetime-in-alias.rs:27:36
- |
-LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
- | ^^^ expected 1 lifetime argument
- |
-note: associated type defined here, with 1 lifetime parameter: `'b`
- --> $DIR/missing-lifetime-in-alias.rs:7:10
- |
-LL | type Bar<'b>
- | ^^^ --
-help: add missing lifetime argument
- |
-LL | type C<'a, 'b> = <A<'a> as Trait>::Bar<'a>;
- | ~~~~~~~
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0106, E0107.
-For more information about an error, try `rustc --explain E0106`.
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-fn foo(x: &'a u32) -> &'a u32 { x }
-
-fn main() {
- let mut p = 3;
- let r = foo(&p);
- p += 1; //~ ERROR cannot assign to `p` because it is borrowed
- println!("{}", r);
-}
+++ /dev/null
-error[E0506]: cannot assign to `p` because it is borrowed
- --> $DIR/mut_while_borrow.rs:9:5
- |
-LL | let r = foo(&p);
- | -- borrow of `p` occurs here
-LL | p += 1;
- | ^^^^^^ assignment to borrowed `p` occurs here
-LL | println!("{}", r);
- | - borrow later used here
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0506`.
+++ /dev/null
-// Test that the `'a` from the impl doesn't
-// prevent us from creating a `'a` parameter
-// on the `blah` function.
-//
-// check-pass
-
-#![feature(in_band_lifetimes)]
-
-struct Foo<'a> {
- x: &'a u32
-
-}
-
-impl Foo<'a> {
- fn method(&self) {
- fn blah(f: Foo<'a>) { }
- }
-}
-
-fn main() { }
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-struct Foo {
- x: &'test u32, //~ ERROR undeclared lifetime
-}
-
-enum Bar {
- Baz(&'test u32), //~ ERROR undeclared lifetime
-}
-
-fn main() {}
+++ /dev/null
-error[E0261]: use of undeclared lifetime name `'test`
- --> $DIR/no_in_band_in_struct.rs:5:9
- |
-LL | struct Foo {
- | - help: consider introducing lifetime `'test` here: `<'test>`
-LL | x: &'test u32,
- | ^^^^^ undeclared lifetime
-
-error[E0261]: use of undeclared lifetime name `'test`
- --> $DIR/no_in_band_in_struct.rs:9:10
- |
-LL | enum Bar {
- | - help: consider introducing lifetime `'test` here: `<'test>`
-LL | Baz(&'test u32),
- | ^^^^^ undeclared lifetime
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0261`.
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-fn foo(x: &u32) {
- let y: &'test u32 = x; //~ ERROR use of undeclared lifetime
-}
-
-fn foo2(x: &u32) {}
-fn bar() {
- let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime
-}
-
-fn main() {}
+++ /dev/null
-error[E0261]: use of undeclared lifetime name `'test`
- --> $DIR/no_introducing_in_band_in_locals.rs:5:13
- |
-LL | fn foo(x: &u32) {
- | - help: consider introducing lifetime `'test` here: `<'test>`
-LL | let y: &'test u32 = x;
- | ^^^^^ undeclared lifetime
-
-error[E0261]: use of undeclared lifetime name `'test`
- --> $DIR/no_introducing_in_band_in_locals.rs:10:16
- |
-LL | let y: fn(&'test u32) = foo2;
- | ^^^^^ undeclared lifetime
- |
- = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
-help: consider introducing lifetime `'test` here
- |
-LL | fn bar<'test>() {
- | +++++++
-help: consider making the type lifetime-generic with a new `'test` lifetime
- |
-LL | let y: for<'test> fn(&'test u32) = foo2;
- | ++++++++++
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0261`.
+++ /dev/null
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-struct Foo<T>(T);
-
-impl Foo<&'s u8> {
- fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name
- fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name
-}
-
-fn main() {}
+++ /dev/null
-error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
- --> $DIR/shadow.rs:7:12
- |
-LL | impl Foo<&'s u8> {
- | -- first declared here
-LL | fn bar<'s>(&self, x: &'s u8) {}
- | ^^ lifetime `'s` already in scope
-
-error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
- --> $DIR/shadow.rs:8:19
- |
-LL | impl Foo<&'s u8> {
- | -- first declared here
-LL | fn bar<'s>(&self, x: &'s u8) {}
-LL | fn baz(x: for<'s> fn(&'s u32)) {}
- | ^^ lifetime `'s` already in scope
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0496`.
--- /dev/null
+#![feature(generic_associated_types)]
+
+trait Trait<'a> {
+ type Foo;
+
+ type Bar<'b>
+ //~^ NOTE associated type defined here, with 1 lifetime parameter
+ //~| NOTE
+ where
+ Self: 'b;
+}
+
+struct Impl<'a>(&'a ());
+
+impl<'a> Trait<'a> for Impl<'a> {
+ type Foo = &'a ();
+ type Bar<'b> = &'b ();
+}
+
+type A<'a> = Impl<'a>;
+
+type B<'a> = <A<'a> as Trait>::Foo;
+//~^ ERROR missing lifetime specifier
+//~| NOTE expected named lifetime parameter
+
+type C<'a, 'b> = <A<'a> as Trait>::Bar;
+//~^ ERROR missing lifetime specifier
+//~| ERROR missing generics for associated type
+//~| NOTE expected named lifetime parameter
+//~| NOTE these named lifetimes are available to use
+//~| NOTE expected 1 lifetime argument
+
+fn main() {}
--- /dev/null
+error[E0106]: missing lifetime specifier
+ --> $DIR/missing-lifetime-in-alias.rs:22:24
+ |
+LL | type B<'a> = <A<'a> as Trait>::Foo;
+ | ^^^^^ expected named lifetime parameter
+ |
+help: consider using the `'a` lifetime
+ |
+LL | type B<'a> = <A<'a> as Trait<'a>>::Foo;
+ | ~~~~~~~~~
+
+error[E0106]: missing lifetime specifier
+ --> $DIR/missing-lifetime-in-alias.rs:26:28
+ |
+LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
+ | ^^^^^ expected named lifetime parameter
+ |
+note: these named lifetimes are available to use
+ --> $DIR/missing-lifetime-in-alias.rs:26:8
+ |
+LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
+ | ^^ ^^
+
+error[E0107]: missing generics for associated type `Trait::Bar`
+ --> $DIR/missing-lifetime-in-alias.rs:26:36
+ |
+LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
+ | ^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'b`
+ --> $DIR/missing-lifetime-in-alias.rs:6:10
+ |
+LL | type Bar<'b>
+ | ^^^ --
+help: add missing lifetime argument
+ |
+LL | type C<'a, 'b> = <A<'a> as Trait>::Bar<'a>;
+ | ~~~~~~~
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0106, E0107.
+For more information about an error, try `rustc --explain E0106`.
--- /dev/null
+// check-pass
+
+fn method<'a>(_i: &'a i32) {
+ fn inner<'a>(_j: &'a f32) {}
+}
+
+fn main() {}
--- /dev/null
+struct Foo<T>(T);
+
+impl<'s> Foo<&'s u8> {
+ fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name
+ fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name
+}
+
+fn main() {}
--- /dev/null
+error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
+ --> $DIR/shadow.rs:4:12
+ |
+LL | impl<'s> Foo<&'s u8> {
+ | -- first declared here
+LL | fn bar<'s>(&self, x: &'s u8) {}
+ | ^^ lifetime `'s` already in scope
+
+error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope
+ --> $DIR/shadow.rs:5:19
+ |
+LL | impl<'s> Foo<&'s u8> {
+ | -- first declared here
+LL | fn bar<'s>(&self, x: &'s u8) {}
+LL | fn baz(x: for<'s> fn(&'s u32)) {}
+ | ^^ lifetime `'s` already in scope
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0496`.
| - help: consider introducing lifetime `'b` here: `<'b>`
LL | a: &'b str,
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'b`
--> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9
| - help: consider introducing lifetime `'b` here: `<'b>`
LL | a: &'b str,
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'b`
--> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:13:13
LL | fn foo(&'b self) {}
| ^^ undeclared lifetime
|
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b> T for Test {
let _ = UnstableStruct { i: 0 };
let _ = StableStruct { i: 0 };
- let _ = DeprecatedUnitStruct; //~ WARN use of deprecated struct `lint_stability::DeprecatedUnitStruct`
- let _ = DeprecatedUnstableUnitStruct; //~ WARN use of deprecated struct `lint_stability::DeprecatedUnstableUnitStruct`
+ let _ = DeprecatedUnitStruct; //~ WARN use of deprecated unit struct `lint_stability::DeprecatedUnitStruct`
+ let _ = DeprecatedUnstableUnitStruct; //~ WARN use of deprecated unit struct `lint_stability::DeprecatedUnstableUnitStruct`
let _ = UnstableUnitStruct;
let _ = StableUnitStruct;
- let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated variant `lint_stability::Enum::DeprecatedVariant`
- let _ = Enum::DeprecatedUnstableVariant; //~ WARN use of deprecated variant `lint_stability::Enum::DeprecatedUnstableVariant`
+ let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated unit variant `lint_stability::Enum::DeprecatedVariant`
+ let _ = Enum::DeprecatedUnstableVariant; //~ WARN use of deprecated unit variant `lint_stability::Enum::DeprecatedUnstableVariant`
let _ = Enum::UnstableVariant;
let _ = Enum::StableVariant;
- let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated struct `lint_stability::DeprecatedTupleStruct`
- let _ = DeprecatedUnstableTupleStruct (1); //~ WARN use of deprecated struct `lint_stability::DeprecatedUnstableTupleStruct`
+ let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated tuple struct `lint_stability::DeprecatedTupleStruct`
+ let _ = DeprecatedUnstableTupleStruct (1); //~ WARN use of deprecated tuple struct `lint_stability::DeprecatedUnstableTupleStruct`
let _ = UnstableTupleStruct (1);
let _ = StableTupleStruct (1);
LL | let _ = DeprecatedUnstableStruct {
| ^^^^^^^^^^^^^^^^^^^^^^^^
-warning: use of deprecated struct `lint_stability::DeprecatedUnitStruct`: text
+warning: use of deprecated unit struct `lint_stability::DeprecatedUnitStruct`: text
--> $DIR/lint-stability-deprecated.rs:118:17
|
LL | let _ = DeprecatedUnitStruct;
| ^^^^^^^^^^^^^^^^^^^^
-warning: use of deprecated struct `lint_stability::DeprecatedUnstableUnitStruct`: text
+warning: use of deprecated unit struct `lint_stability::DeprecatedUnstableUnitStruct`: text
--> $DIR/lint-stability-deprecated.rs:119:17
|
LL | let _ = DeprecatedUnstableUnitStruct;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-warning: use of deprecated variant `lint_stability::Enum::DeprecatedVariant`: text
+warning: use of deprecated unit variant `lint_stability::Enum::DeprecatedVariant`: text
--> $DIR/lint-stability-deprecated.rs:123:23
|
LL | let _ = Enum::DeprecatedVariant;
| ^^^^^^^^^^^^^^^^^
-warning: use of deprecated variant `lint_stability::Enum::DeprecatedUnstableVariant`: text
+warning: use of deprecated unit variant `lint_stability::Enum::DeprecatedUnstableVariant`: text
--> $DIR/lint-stability-deprecated.rs:124:23
|
LL | let _ = Enum::DeprecatedUnstableVariant;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-warning: use of deprecated struct `lint_stability::DeprecatedTupleStruct`: text
+warning: use of deprecated tuple struct `lint_stability::DeprecatedTupleStruct`: text
--> $DIR/lint-stability-deprecated.rs:128:17
|
LL | let _ = DeprecatedTupleStruct (1);
| ^^^^^^^^^^^^^^^^^^^^^
-warning: use of deprecated struct `lint_stability::DeprecatedUnstableTupleStruct`: text
+warning: use of deprecated tuple struct `lint_stability::DeprecatedUnstableTupleStruct`: text
--> $DIR/lint-stability-deprecated.rs:129:17
|
LL | let _ = DeprecatedUnstableTupleStruct (1);
{ .. } = x;
let x = Deprecated2(1, 2, 3);
- //~^ ERROR use of deprecated struct
+ //~^ ERROR use of deprecated tuple struct
let _ = x.0;
//~^ ERROR use of deprecated field
//~^ ERROR use of deprecated field
let Deprecated2
- //~^ ERROR use of deprecated struct
+ //~^ ERROR use of deprecated tuple struct
(_,
//~^ ERROR use of deprecated field
_,
//~^ ERROR use of deprecated field
= x;
let Deprecated2
- //~^ ERROR use of deprecated struct
+ //~^ ERROR use of deprecated tuple struct
// the patterns are all fine:
(..) = x;
}
LL | let Deprecated
| ^^^^^^^^^^
-error: use of deprecated struct `cross_crate::lint_stability_fields::Deprecated2`: text
+error: use of deprecated tuple struct `cross_crate::lint_stability_fields::Deprecated2`: text
--> $DIR/lint-stability-fields-deprecated.rs:131:17
|
LL | let x = Deprecated2(1, 2, 3);
| ^^^^^^^^^^^
-error: use of deprecated struct `cross_crate::lint_stability_fields::Deprecated2`: text
+error: use of deprecated tuple struct `cross_crate::lint_stability_fields::Deprecated2`: text
--> $DIR/lint-stability-fields-deprecated.rs:141:13
|
LL | let Deprecated2
| ^^^^^^^^^^^
-error: use of deprecated struct `cross_crate::lint_stability_fields::Deprecated2`: text
+error: use of deprecated tuple struct `cross_crate::lint_stability_fields::Deprecated2`: text
--> $DIR/lint-stability-fields-deprecated.rs:150:13
|
LL | let Deprecated2
--> $DIR/must_use-array.rs:43:5
|
LL | impl_array();
- | ^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^
error: unused array of arrays of arrays of `S` that must be used
--> $DIR/must_use-array.rs:45:5
--> $DIR/must_use-trait.rs:37:5
|
LL | get_critical_tuple();
- | ^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^
error: unused implementer of `Critical` in tuple element 2 that must be used
--> $DIR/must_use-trait.rs:37:5
|
LL | get_critical_tuple();
- | ^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
--> $DIR/must_use-tuple.rs:14:5
|
LL | foo();
- | ^^^^^^
+ | ^^^^^
|
= note: this `Result` may be an `Err` variant, which should be handled
error: unused `Result` in tuple element 0 that must be used
- --> $DIR/must_use-tuple.rs:16:6
+ --> $DIR/must_use-tuple.rs:16:7
|
LL | ((Err::<(), ()>(()), ()), ());
- | ^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^
|
= note: this `Result` may be an `Err` variant, which should be handled
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | 0.clone::<'a>();
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error: aborting due to previous error
error: lifetime may not live long enough
- --> $DIR/issue-52742.rs:14:9
+ --> $DIR/issue-52742.rs:12:9
|
LL | fn take_bar(&mut self, b: Bar<'_>) {
| --------- -- let's call this `'1`
-#![feature(in_band_lifetimes)]
-
struct Foo<'a, 'b> {
x: &'a u32,
y: &'b u32,
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
- --> $DIR/issue-52742.rs:14:18
+ --> $DIR/issue-52742.rs:12:18
|
LL | self.y = b.z
| ^^^
|
note: ...the reference is valid for the lifetime `'_` as defined here...
- --> $DIR/issue-52742.rs:12:10
+ --> $DIR/issue-52742.rs:10:10
|
LL | impl Foo<'_, '_> {
| ^^
note: ...but the borrowed content is only valid for the anonymous lifetime defined here
- --> $DIR/issue-52742.rs:13:31
+ --> $DIR/issue-52742.rs:11:31
|
LL | fn take_bar(&mut self, b: Bar<'_>) {
| ^^^^^^^
//~^ ERROR mismatched types
}
+fn space_cadet() -> bool {
+ ({ true }) | { true } //~ ERROR E0308
+ //~^ ERROR expected parameter name
+}
+
+fn revenge_from_mars() -> bool {
+ ({ true }) && { true } //~ ERROR E0308
+ //~^ ERROR mismatched types
+}
+
+fn attack_from_mars() -> bool {
+ ({ true }) || { true } //~ ERROR E0308
+ //~^ ERROR mismatched types
+}
+
+// This gets corrected by adding a semicolon, instead of parens.
+// It's placed here to help keep track of the way this diagnostic
+// needs to interact with type checking to avoid MachineApplicable
+// suggestions that actually break stuff.
+//
+// If you're wondering what happens if that `foo()` is a `true` like
+// all the ones above use? Nothing. It makes neither suggestion in
+// that case.
+fn asteroids() -> impl FnOnce() -> bool {
+ { foo(); } || { true } //~ ERROR E0308
+}
+
fn main() {}
//~^ ERROR mismatched types
}
+fn space_cadet() -> bool {
+ { true } | { true } //~ ERROR E0308
+ //~^ ERROR expected parameter name
+}
+
+fn revenge_from_mars() -> bool {
+ { true } && { true } //~ ERROR E0308
+ //~^ ERROR mismatched types
+}
+
+fn attack_from_mars() -> bool {
+ { true } || { true } //~ ERROR E0308
+ //~^ ERROR mismatched types
+}
+
+// This gets corrected by adding a semicolon, instead of parens.
+// It's placed here to help keep track of the way this diagnostic
+// needs to interact with type checking to avoid MachineApplicable
+// suggestions that actually break stuff.
+//
+// If you're wondering what happens if that `foo()` is a `true` like
+// all the ones above use? Nothing. It makes neither suggestion in
+// that case.
+fn asteroids() -> impl FnOnce() -> bool {
+ { foo() } || { true } //~ ERROR E0308
+}
+
fn main() {}
LL ~ }) > 0
|
+error: expected parameter name, found `{`
+ --> $DIR/expr-as-stmt.rs:41:16
+ |
+LL | { true } | { true }
+ | ^ expected parameter name
+ |
+help: parentheses are required to parse this as an expression
+ |
+LL | ({ true }) | { true }
+ | + +
+
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:64:7
+ |
+LL | { foo() } || { true }
+ | ^^^^^- help: consider using a semicolon here: `;`
+ | |
+ | expected `()`, found `i32`
+
error[E0308]: mismatched types
--> $DIR/expr-as-stmt.rs:8:6
|
LL | ({2}) - 2
| + +
-error: aborting due to 11 previous errors
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:41:7
+ |
+LL | { true } | { true }
+ | ^^^^ expected `()`, found `bool`
+ |
+help: you might have meant to return this value
+ |
+LL | { return true; } | { true }
+ | ++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:46:7
+ |
+LL | { true } && { true }
+ | ^^^^ expected `()`, found `bool`
+ |
+help: you might have meant to return this value
+ |
+LL | { return true; } && { true }
+ | ++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:46:14
+ |
+LL | fn revenge_from_mars() -> bool {
+ | ---- expected `bool` because of return type
+LL | { true } && { true }
+ | ^^^^^^^^^^^ expected `bool`, found `&&bool`
+ |
+help: parentheses are required to parse this as an expression
+ |
+LL | ({ true }) && { true }
+ | + +
+
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:51:7
+ |
+LL | { true } || { true }
+ | ^^^^ expected `()`, found `bool`
+ |
+help: you might have meant to return this value
+ |
+LL | { return true; } || { true }
+ | ++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/expr-as-stmt.rs:51:14
+ |
+LL | fn attack_from_mars() -> bool {
+ | ---- expected `bool` because of return type
+LL | { true } || { true }
+ | ^^^^^^^^^^^ expected `bool`, found closure
+ |
+ = note: expected type `bool`
+ found closure `[closure@$DIR/expr-as-stmt.rs:51:14: 51:25]`
+help: parentheses are required to parse this as an expression
+ |
+LL | ({ true }) || { true }
+ | + +
+
+error: aborting due to 18 previous errors
Some errors have detailed explanations: E0308, E0600, E0614.
For more information about an error, try `rustc --explain E0308`.
| - help: consider introducing lifetime `'foo` here: `<'foo>`
LL | X5(&'foo usize)
| ^^^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-in-enums.rs:17:9
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | X6(&'a usize)
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error: aborting due to 2 previous errors
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | a: &'a isize,
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-in-structs.rs:11:9
LL | a: &'a isize,
LL | b: &'a isize,
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error: aborting due to 2 previous errors
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | E1(&'a isize)
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-name-undeclared.rs:31:13
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | f: &'a isize
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'b`
--> $DIR/regions-name-undeclared.rs:16:24
LL | fn m4(&self, arg: &'b isize) { }
| ^^ undeclared lifetime
|
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b, 'a> Foo<'a> {
LL | fn m5(&'b self) { }
| ^^ undeclared lifetime
|
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b, 'a> Foo<'a> {
LL | fn m6(&self, arg: Foo<'b>) { }
| ^^ undeclared lifetime
|
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b, 'a> Foo<'a> {
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-name-undeclared.rs:33:14
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-name-undeclared.rs:41:17
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'b`
--> $DIR/regions-name-undeclared.rs:43:36
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | fn fn_types<'b>(a: &'a isize,
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | fn fn_types<'b>(a: &'a isize,
...
LL | c: &'a isize)
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-name-undeclared.rs:53:31
LL | async fn buggy(&self) -> &'a str {
| ^^ undeclared lifetime
|
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'a` here
|
LL | impl<'a> Bug {
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | Foo(&'a isize),
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-undeclared.rs:5:10
LL | Foo(&'a isize),
LL | Bar(&'a isize),
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-undeclared.rs:8:15
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'a` here: `<'a>`
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/regions-undeclared.rs:9:15
| - help: consider introducing lifetime `'a` here: `<'a>`
LL | y: &'a isize)
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error: aborting due to 5 previous errors
+++ /dev/null
-// run-rustfix
-
-#![feature(in_band_lifetimes)]
-#![deny(single_use_lifetimes)]
-#![allow(dead_code)]
-#![allow(unused_variables)]
-
-// Test that we DO warn when lifetime name is used only
-// once in a fn argument, even with in band lifetimes.
-
-fn a(x: &u32, y: &u32) {
- //~^ ERROR `'a` only used once
- //~| ERROR `'b` only used once
- //~| HELP elide the single-use lifetime
- //~| HELP elide the single-use lifetime
-}
-
-fn main() { }
+++ /dev/null
-// run-rustfix
-
-#![feature(in_band_lifetimes)]
-#![deny(single_use_lifetimes)]
-#![allow(dead_code)]
-#![allow(unused_variables)]
-
-// Test that we DO warn when lifetime name is used only
-// once in a fn argument, even with in band lifetimes.
-
-fn a(x: &'a u32, y: &'b u32) {
- //~^ ERROR `'a` only used once
- //~| ERROR `'b` only used once
- //~| HELP elide the single-use lifetime
- //~| HELP elide the single-use lifetime
-}
-
-fn main() { }
+++ /dev/null
-error: lifetime parameter `'a` only used once
- --> $DIR/one-use-in-fn-argument-in-band.rs:11:10
- |
-LL | fn a(x: &'a u32, y: &'b u32) {
- | ^^-
- | |
- | this lifetime is only used here
- | help: elide the single-use lifetime
- |
-note: the lint level is defined here
- --> $DIR/one-use-in-fn-argument-in-band.rs:4:9
- |
-LL | #![deny(single_use_lifetimes)]
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: lifetime parameter `'b` only used once
- --> $DIR/one-use-in-fn-argument-in-band.rs:11:22
- |
-LL | fn a(x: &'a u32, y: &'b u32) {
- | ^^-
- | |
- | this lifetime is only used here
- | help: elide the single-use lifetime
-
-error: aborting due to 2 previous errors
-
let _ = ENUM4;
let _: Enum4<isize> = Enum4::Some(1);
- //~^ use of deprecated variant `unstable_generic_param::Enum4::Some`: test [deprecated]
+ //~^ use of deprecated tuple variant `unstable_generic_param::Enum4::Some`: test [deprecated]
//~^^ use of deprecated enum `unstable_generic_param::Enum4`: test [deprecated]
let _ = ENUM4;
let _: Enum4 = ENUM4; //~ use of deprecated enum `unstable_generic_param::Enum4`: test [deprecated]
let _: Enum4<usize> = ENUM4; //~ use of deprecated enum `unstable_generic_param::Enum4`: test [deprecated]
let _: Enum4<isize> = Enum4::Some(0);
- //~^ use of deprecated variant `unstable_generic_param::Enum4::Some`: test [deprecated]
+ //~^ use of deprecated tuple variant `unstable_generic_param::Enum4::Some`: test [deprecated]
//~^^ use of deprecated enum `unstable_generic_param::Enum4`: test [deprecated]
let _ = ENUM5;
let _: Enum5<isize> = Enum5::Some(1); //~ ERROR use of unstable library feature 'unstable_default'
- //~^ use of deprecated variant `unstable_generic_param::Enum5::Some`: test [deprecated]
+ //~^ use of deprecated tuple variant `unstable_generic_param::Enum5::Some`: test [deprecated]
//~^^ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated]
let _ = ENUM5;
let _: Enum5 = ENUM5; //~ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated]
let _: Enum5<usize> = ENUM5; //~ ERROR use of unstable library feature 'unstable_default'
//~^ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated]
let _: Enum5<isize> = Enum5::Some(0); //~ ERROR use of unstable library feature 'unstable_default'
- //~^ use of deprecated variant `unstable_generic_param::Enum5::Some`: test [deprecated]
+ //~^ use of deprecated tuple variant `unstable_generic_param::Enum5::Some`: test [deprecated]
//~^^ use of deprecated enum `unstable_generic_param::Enum5`: test [deprecated]
let _: Enum6<isize> = Enum6::Some(1); // ok
LL | let _: Alias5<isize> = Alias5::Some(0);
| ^^^^^^
-warning: use of deprecated variant `unstable_generic_param::Enum4::Some`: test
+warning: use of deprecated tuple variant `unstable_generic_param::Enum4::Some`: test
--> $DIR/generics-default-stability.rs:219:34
|
LL | let _: Enum4<isize> = Enum4::Some(1);
LL | let _: Enum4<usize> = ENUM4;
| ^^^^^
-warning: use of deprecated variant `unstable_generic_param::Enum4::Some`: test
+warning: use of deprecated tuple variant `unstable_generic_param::Enum4::Some`: test
--> $DIR/generics-default-stability.rs:225:34
|
LL | let _: Enum4<isize> = Enum4::Some(0);
LL | let _: Enum4<isize> = Enum4::Some(0);
| ^^^^^
-warning: use of deprecated variant `unstable_generic_param::Enum5::Some`: test
+warning: use of deprecated tuple variant `unstable_generic_param::Enum5::Some`: test
--> $DIR/generics-default-stability.rs:230:34
|
LL | let _: Enum5<isize> = Enum5::Some(1);
LL | let _: Enum5<usize> = ENUM5;
| ^^^^^
-warning: use of deprecated variant `unstable_generic_param::Enum5::Some`: test
+warning: use of deprecated tuple variant `unstable_generic_param::Enum5::Some`: test
--> $DIR/generics-default-stability.rs:237:34
|
LL | let _: Enum5<isize> = Enum5::Some(0);
--- /dev/null
+use std::collections::VecDeque;
+
+pub struct BuildPlanBuilder {
+ acc: VecDeque<(String, String)>,
+ current_provides: String,
+ current_requires: String,
+}
+
+impl BuildPlanBuilder {
+ pub fn or(&mut self) -> &mut Self {
+ self.acc.push_back(self.current_provides, self.current_requires);
+ //~^ ERROR this function takes 1 argument but 2 arguments were supplied
+ self
+ }
+}
+
+fn main() {}
--- /dev/null
+error[E0061]: this function takes 1 argument but 2 arguments were supplied
+ --> $DIR/wrong_argument_ice.rs:11:18
+ |
+LL | self.acc.push_back(self.current_provides, self.current_requires);
+ | ^^^^^^^^^ --------------------- --------------------- supplied 2 arguments
+ |
+note: associated function defined here
+ --> $SRC_DIR/alloc/src/collections/vec_deque/mod.rs:LL:COL
+ |
+LL | pub fn push_back(&mut self, value: T) {
+ | ^^^^^^^^^
+help: use parentheses to construct a tuple
+ |
+LL | self.acc.push_back((self.current_provides, self.current_requires));
+ | + +
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0061`.
LL | for<'a> dyn Trait1<'a>: Trait1<'a>, // OK
LL | (dyn for<'a> Trait1<'a>): Trait1<'a>,
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error[E0261]: use of undeclared lifetime name `'b`
--> $DIR/where-lifetime-resolution.rs:8:52
...
LL | for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
| ^^ undeclared lifetime
- |
- = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
error: aborting due to 2 previous errors
// warn on rustc internal lints
#![warn(rustc::internal)]
// Disable this rustc lint for now, as it was also done in rustc
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
// FIXME: switch to something more ergonomic here, once available.
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
cfg: Option<&str>,
) -> test::TestDesc {
let mut ignore = false;
+ #[cfg(not(bootstrap))]
+ let ignore_message: Option<String> = None;
let mut should_fail = false;
let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some();
test::TestDesc {
name,
ignore,
+ #[cfg(not(bootstrap))]
+ ignore_message,
should_panic,
compile_fail: false,
no_run: false,
test_type: test::TestType::Unknown,
- #[cfg(bootstrap)]
- allow_fail: false,
}
}
enum StructLitField<'a> {
Regular(&'a ast::ExprField),
Base(&'a ast::Expr),
- Rest(&'a Span),
+ Rest(Span),
}
// 2 = " {".len()
let field_iter = fields.iter().map(StructLitField::Regular).chain(
match struct_rest {
ast::StructRest::Base(expr) => Some(StructLitField::Base(&**expr)),
- ast::StructRest::Rest(span) => Some(StructLitField::Rest(span)),
+ ast::StructRest::Rest(span) => Some(StructLitField::Rest(*span)),
ast::StructRest::None => None,
}
.into_iter(),