]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #93400 - ChayimFriedman2:dont-suggest-using-const-with-bounds-unused...
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 26 Feb 2022 06:52:41 +0000 (07:52 +0100)
committerGitHub <noreply@github.com>
Sat, 26 Feb 2022 06:52:41 +0000 (07:52 +0100)
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.

225 files changed:
Cargo.lock
RELEASES.md
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_ast_passes/src/lib.rs
compiler/rustc_borrowck/src/lib.rs
compiler/rustc_borrowck/src/nll.rs
compiler/rustc_borrowck/src/type_check/liveness/mod.rs
compiler/rustc_borrowck/src/type_check/mod.rs
compiler/rustc_builtin_macros/src/lib.rs
compiler/rustc_builtin_macros/src/test.rs
compiler/rustc_codegen_llvm/Cargo.toml
compiler/rustc_codegen_llvm/src/consts.rs
compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
compiler/rustc_codegen_llvm/src/lib.rs
compiler/rustc_codegen_ssa/src/lib.rs
compiler/rustc_const_eval/src/const_eval/machine.rs
compiler/rustc_const_eval/src/interpret/eval_context.rs
compiler/rustc_const_eval/src/interpret/memory.rs
compiler/rustc_const_eval/src/interpret/operand.rs
compiler/rustc_const_eval/src/interpret/validity.rs
compiler/rustc_const_eval/src/lib.rs
compiler/rustc_data_structures/src/intern.rs
compiler/rustc_data_structures/src/lib.rs
compiler/rustc_driver/src/lib.rs
compiler/rustc_error_codes/src/error_codes/E0687.md
compiler/rustc_error_codes/src/error_codes/E0688.md
compiler/rustc_errors/src/lib.rs
compiler/rustc_expand/src/build.rs
compiler/rustc_expand/src/lib.rs
compiler/rustc_feature/src/active.rs
compiler/rustc_feature/src/removed.rs
compiler/rustc_hir/src/hir.rs
compiler/rustc_incremental/src/lib.rs
compiler/rustc_index/src/lib.rs
compiler/rustc_index/src/vec.rs
compiler/rustc_index/src/vec/tests.rs
compiler/rustc_infer/src/infer/error_reporting/nice_region_error/find_anon_type.rs
compiler/rustc_infer/src/lib.rs
compiler/rustc_interface/src/lib.rs
compiler/rustc_interface/src/tests.rs
compiler/rustc_lint/src/context.rs
compiler/rustc_lint/src/lib.rs
compiler/rustc_lint/src/unused.rs
compiler/rustc_macros/src/lib.rs
compiler/rustc_macros/src/newtype.rs [new file with mode: 0644]
compiler/rustc_metadata/src/lib.rs
compiler/rustc_metadata/src/rmeta/encoder.rs
compiler/rustc_middle/src/lib.rs
compiler/rustc_middle/src/middle/resolve_lifetime.rs
compiler/rustc_middle/src/mir/interpret/allocation.rs
compiler/rustc_middle/src/mir/mod.rs
compiler/rustc_middle/src/mir/visit.rs
compiler/rustc_middle/src/ty/consts.rs
compiler/rustc_middle/src/ty/context.rs
compiler/rustc_middle/src/ty/mod.rs
compiler/rustc_middle/src/ty/print/pretty.rs
compiler/rustc_middle/src/ty/sty.rs
compiler/rustc_mir_build/src/build/scope.rs
compiler/rustc_mir_build/src/lib.rs
compiler/rustc_mir_dataflow/src/impls/mod.rs
compiler/rustc_mir_transform/src/coverage/graph.rs
compiler/rustc_mir_transform/src/coverage/spans.rs
compiler/rustc_mir_transform/src/dest_prop.rs
compiler/rustc_mir_transform/src/lib.rs
compiler/rustc_monomorphize/src/lib.rs
compiler/rustc_parse/src/parser/expr.rs
compiler/rustc_passes/src/check_attr.rs
compiler/rustc_passes/src/lib.rs
compiler/rustc_privacy/src/lib.rs
compiler/rustc_query_impl/src/lib.rs
compiler/rustc_query_system/src/lib.rs
compiler/rustc_resolve/src/late/diagnostics.rs
compiler/rustc_resolve/src/late/lifetimes.rs
compiler/rustc_resolve/src/lib.rs
compiler/rustc_save_analysis/src/lib.rs
compiler/rustc_session/src/lib.rs
compiler/rustc_session/src/options.rs
compiler/rustc_span/src/lib.rs
compiler/rustc_span/src/span_encoding.rs
compiler/rustc_symbol_mangling/src/lib.rs
compiler/rustc_trait_selection/src/lib.rs
compiler/rustc_typeck/src/astconv/mod.rs
compiler/rustc_typeck/src/check/check.rs
compiler/rustc_typeck/src/check/expr.rs
compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs
compiler/rustc_typeck/src/check/fn_ctxt/suggestions.rs
compiler/rustc_typeck/src/check/generator_interior/drop_ranges/record_consumed_borrow.rs
compiler/rustc_typeck/src/check/op.rs
compiler/rustc_typeck/src/collect.rs
compiler/rustc_typeck/src/lib.rs
library/alloc/src/collections/btree/map/tests.rs
library/alloc/src/collections/btree/set.rs
library/alloc/src/collections/btree/set/tests.rs
library/alloc/src/lib.rs
library/core/src/fmt/builders.rs
library/core/src/intrinsics.rs
library/core/src/lib.rs
library/core/src/macros/mod.rs
library/core/src/panicking.rs
library/core/src/slice/mod.rs
library/core/tests/intrinsics.rs
library/core/tests/lib.rs
library/portable-simd/crates/core_simd/src/intrinsics.rs
library/portable-simd/crates/core_simd/src/vector.rs
library/std/src/collections/hash/map.rs
library/std/src/collections/hash/set.rs
library/std/src/lib.rs
library/std/src/os/fd/owned.rs
library/test/src/console.rs
library/test/src/tests.rs
library/test/src/types.rs
src/bootstrap/compile.rs
src/bootstrap/lib.rs
src/doc/rustdoc/src/unstable-features.md
src/librustdoc/clean/mod.rs
src/librustdoc/config.rs
src/librustdoc/core.rs
src/librustdoc/doctest.rs
src/librustdoc/lib.rs
src/stage0.json
src/test/codegen/consts.rs
src/test/codegen/fn-impl-trait-self.rs
src/test/codegen/uninit-consts-allow-partially-uninit.rs [deleted file]
src/test/codegen/uninit-consts.rs
src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff
src/test/mir-opt/dest-prop/union.rs
src/test/rustdoc-gui/toggle-docs.goml
src/test/rustdoc-ui/check-cfg-test.rs [new file with mode: 0644]
src/test/rustdoc-ui/check-cfg-test.stderr [new file with mode: 0644]
src/test/rustdoc-ui/check-cfg-test.stdout [new file with mode: 0644]
src/test/rustdoc-ui/check-cfg-unstable.rs [new file with mode: 0644]
src/test/rustdoc-ui/check-cfg-unstable.stderr [new file with mode: 0644]
src/test/rustdoc-ui/check-cfg.rs [new file with mode: 0644]
src/test/rustdoc-ui/check-cfg.stderr [new file with mode: 0644]
src/test/ui/async-await/drop-track-field-assign-nonsend.rs [new file with mode: 0644]
src/test/ui/async-await/drop-track-field-assign-nonsend.stderr [new file with mode: 0644]
src/test/ui/async-await/drop-track-field-assign.rs [new file with mode: 0644]
src/test/ui/async-await/generics-and-bounds.rs
src/test/ui/attributes/used_with_arg_no_mangle.rs [new file with mode: 0644]
src/test/ui/consts/const-eval/ub-ref-ptr.32bit.stderr
src/test/ui/consts/const-eval/ub-ref-ptr.64bit.stderr
src/test/ui/consts/precise-drop-with-coverage.rs [new file with mode: 0644]
src/test/ui/deprecation/deprecation-lint.rs
src/test/ui/deprecation/deprecation-lint.stderr
src/test/ui/error-codes/E0261.stderr
src/test/ui/extern/extern-static-size-overflow.rs [new file with mode: 0644]
src/test/ui/extern/extern-static-size-overflow.stderr [new file with mode: 0644]
src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs [deleted file]
src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr [deleted file]
src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr
src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr
src/test/ui/generic-associated-types/issue-67510.stderr
src/test/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs
src/test/ui/impl-trait/region-escape-via-bound-contravariant.rs
src/test/ui/impl-trait/region-escape-via-bound.rs
src/test/ui/impl-trait/region-escape-via-bound.stderr
src/test/ui/in-band-lifetimes/E0687.rs [deleted file]
src/test/ui/in-band-lifetimes/E0687.stderr [deleted file]
src/test/ui/in-band-lifetimes/E0687_where.rs [deleted file]
src/test/ui/in-band-lifetimes/E0687_where.stderr [deleted file]
src/test/ui/in-band-lifetimes/E0688.rs [deleted file]
src/test/ui/in-band-lifetimes/E0688.stderr [deleted file]
src/test/ui/in-band-lifetimes/elided-lifetimes.fixed [deleted file]
src/test/ui/in-band-lifetimes/elided-lifetimes.rs [deleted file]
src/test/ui/in-band-lifetimes/elided-lifetimes.stderr [deleted file]
src/test/ui/in-band-lifetimes/in-band-lifetimes.rs [deleted file]
src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.rs [deleted file]
src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr [deleted file]
src/test/ui/in-band-lifetimes/mismatched.nll.stderr [deleted file]
src/test/ui/in-band-lifetimes/mismatched.rs [deleted file]
src/test/ui/in-band-lifetimes/mismatched.stderr [deleted file]
src/test/ui/in-band-lifetimes/mismatched_trait.rs [deleted file]
src/test/ui/in-band-lifetimes/mismatched_trait.stderr [deleted file]
src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs [deleted file]
src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr [deleted file]
src/test/ui/in-band-lifetimes/mismatched_trait_impl.nll.stderr [deleted file]
src/test/ui/in-band-lifetimes/mismatched_trait_impl.rs [deleted file]
src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr [deleted file]
src/test/ui/in-band-lifetimes/missing-lifetime-in-alias.rs [deleted file]
src/test/ui/in-band-lifetimes/missing-lifetime-in-alias.stderr [deleted file]
src/test/ui/in-band-lifetimes/mut_while_borrow.rs [deleted file]
src/test/ui/in-band-lifetimes/mut_while_borrow.stderr [deleted file]
src/test/ui/in-band-lifetimes/nested-items.rs [deleted file]
src/test/ui/in-band-lifetimes/no_in_band_in_struct.rs [deleted file]
src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr [deleted file]
src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.rs [deleted file]
src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr [deleted file]
src/test/ui/in-band-lifetimes/shadow.rs [deleted file]
src/test/ui/in-band-lifetimes/shadow.stderr [deleted file]
src/test/ui/lifetimes/missing-lifetime-in-alias.rs [new file with mode: 0644]
src/test/ui/lifetimes/missing-lifetime-in-alias.stderr [new file with mode: 0644]
src/test/ui/lifetimes/nested.rs [new file with mode: 0644]
src/test/ui/lifetimes/shadow.rs [new file with mode: 0644]
src/test/ui/lifetimes/shadow.stderr [new file with mode: 0644]
src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr
src/test/ui/lint/lint-stability-deprecated.rs
src/test/ui/lint/lint-stability-deprecated.stderr
src/test/ui/lint/lint-stability-fields-deprecated.rs
src/test/ui/lint/lint-stability-fields-deprecated.stderr
src/test/ui/lint/unused/must_use-array.stderr
src/test/ui/lint/unused/must_use-trait.stderr
src/test/ui/lint/unused/must_use-tuple.stderr
src/test/ui/methods/method-call-lifetime-args-unresolved.stderr
src/test/ui/nll/issue-52742.nll.stderr
src/test/ui/nll/issue-52742.rs
src/test/ui/nll/issue-52742.stderr
src/test/ui/parser/expr-as-stmt.fixed
src/test/ui/parser/expr-as-stmt.rs
src/test/ui/parser/expr-as-stmt.stderr
src/test/ui/regions/regions-in-enums.stderr
src/test/ui/regions/regions-in-structs.stderr
src/test/ui/regions/regions-name-undeclared.stderr
src/test/ui/regions/regions-undeclared.stderr
src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.fixed [deleted file]
src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.rs [deleted file]
src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr [deleted file]
src/test/ui/stability-attribute/generics-default-stability.rs
src/test/ui/stability-attribute/generics-default-stability.stderr
src/test/ui/tuple/wrong_argument_ice.rs [new file with mode: 0644]
src/test/ui/tuple/wrong_argument_ice.stderr [new file with mode: 0644]
src/test/ui/where-clauses/where-lifetime-resolution.stderr
src/tools/clippy/clippy_lints/src/lib.rs
src/tools/compiletest/src/header.rs
src/tools/rustfmt/src/expr.rs

index 7a1dd32e0ac15fec0de35b5c77c1101221785c3e..cb397821d1c8966b4a5d0df63450a4ba7890a110 100644 (file)
@@ -3524,6 +3524,7 @@ dependencies = [
  "rustc_hir",
  "rustc_index",
  "rustc_llvm",
+ "rustc_macros",
  "rustc_metadata",
  "rustc_middle",
  "rustc_query_system",
index 96da1660c0febf534f086714588895dbf45a912e..971a63b240f3e06e4bd1cfe96e7288e25ae982f4 100644 (file)
@@ -4,7 +4,7 @@ Version 1.59.0 (2022-02-24)
 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]
@@ -18,6 +18,21 @@ Compiler
 - [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
 ---------
@@ -43,6 +58,7 @@ Stabilized APIs
 - [`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]
@@ -86,6 +102,7 @@ Compatibility Notes
 - [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
 ----------------
@@ -127,6 +144,7 @@ and related tools.
 [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/
@@ -161,6 +179,7 @@ and related tools.
 [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)
index 0156c5016acd1cd3cc8366de1493b08d9ca593b9..940887280b9c18437f28152aeaa1ad9930eece8c 100644 (file)
@@ -35,7 +35,7 @@
 #![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};
@@ -142,13 +142,9 @@ struct LoweringContext<'a, 'hir: 'a> {
     /// 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>,
@@ -379,7 +375,7 @@ pub fn lower_crate<'a, 'hir>(
         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()),
@@ -726,13 +722,13 @@ fn collect_in_band_defs<T>(
         &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)
     }
 
@@ -749,7 +745,7 @@ fn lifetime_to_generic_param(
         // 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),
         };
@@ -773,38 +769,10 @@ fn lifetime_to_generic_param(
         }
     }
 
-    /// 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));
@@ -1946,7 +1914,7 @@ fn lower_lifetime(&mut self, l: &Lifetime) -> hir::Lifetime {
             }
             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))
                 }
 
@@ -1957,7 +1925,6 @@ fn lower_lifetime(&mut self, l: &Lifetime) -> hir::Lifetime {
                 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))
             }
@@ -2001,8 +1968,8 @@ fn lower_generic_param(
 
         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| {
@@ -2025,7 +1992,7 @@ fn lower_generic_param(
                 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)
             }
@@ -2384,7 +2351,7 @@ fn elided_ref_lifetime(&mut self, span: Span) -> hir::Lifetime {
             // 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),
index f4863137bdd59c947faf0d657928b8e5daa07fe3..876dd7f757c5a8c0f08023fb0fd7b3094547256e 100644 (file)
@@ -8,7 +8,7 @@
 #![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;
index 590c5799ff6179d34b6889a7bc722b4103095223..c489f409fb53bdd6fcba7a850cf4ff492678b8f6 100644 (file)
@@ -9,7 +9,7 @@
 #![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;
index a2736fd1156646f02443be87f8e30fd4b1b0dbd9..6fd9f4954a6cc869694e13b4700aa31f451f1939 100644 (file)
@@ -188,6 +188,7 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
             move_data,
             elements,
             upvars,
+            use_polonius,
         );
 
     if let Some(all_facts) = &mut all_facts {
index f18fe1f43d4da2c8b72ab4785c0411c850bbf14f..ac8670a513820f108bd62f29321c131904e90de0 100644 (file)
@@ -37,6 +37,7 @@ pub(super) fn generate<'mir, 'tcx>(
     flow_inits: &mut ResultsCursor<'mir, 'tcx, MaybeInitializedPlaces<'mir, 'tcx>>,
     move_data: &MoveData<'tcx>,
     location_table: &LocationTable,
+    use_polonius: bool,
 ) {
     debug!("liveness::generate");
 
@@ -46,7 +47,7 @@ pub(super) fn generate<'mir, 'tcx>(
         &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();
index b87a9e6567bbbfac6012a74644c26105898eb5af..fdbf95591c8b838fd1d4dd330d0bcb236d94b960 100644 (file)
@@ -136,6 +136,7 @@ pub(crate) fn type_check<'mir, 'tcx>(
     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();
@@ -187,7 +188,15 @@ pub(crate) fn type_check<'mir, 'tcx>(
         &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);
index 38877399943ef77574acfd04697ab2e3d7ddc8ec..a05122394a06a21401aedc423c308a67f4c24171 100644 (file)
@@ -13,7 +13,7 @@
 #![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;
 
index 690879624058b4ac3a0667baec6a403889bbe683..e658631d09038ee22ec243927e53074810f4c970 100644 (file)
@@ -262,6 +262,15 @@ pub fn expand_test_or_bench(
                                         "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
@@ -364,6 +373,20 @@ fn should_ignore(sess: &Session, i: &ast::Item) -> bool {
     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) => {
index 3b410c2cb4a7ec629bf133d0cc13c2e6e4d0c8af..67183ff5887e9a4d5447f764898df5e6762f9803 100644 (file)
@@ -25,6 +25,7 @@ rustc_fs_util = { path = "../rustc_fs_util" }
 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" }
index 51223697dbd8504a847b700bd09387039b85cf54..c98720944c9769c32b03460d94d1e29238914377 100644 (file)
@@ -2,6 +2,7 @@
 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;
@@ -37,7 +38,7 @@ fn append_chunks_of_init_and_uninit_bytes<'ll, 'a, 'b>(
         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));
 
@@ -53,30 +54,26 @@ fn append_chunks_of_init_and_uninit_bytes<'ll, 'a, 'b>(
             }
         };
 
-        // 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));
         }
     }
 
index d515502d445a9050b55a7ab0ba396c4495f3a0eb..89fc89800373714a41cc27bfc39d704226e76b17 100644 (file)
@@ -23,9 +23,7 @@
 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};
@@ -37,7 +35,6 @@
 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};
@@ -95,193 +94,127 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 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()
     }
 }
 
@@ -293,7 +226,7 @@ fn get_unique_type_id_of_vtable_type(&mut self, vtable_type_name: &str) -> Uniqu
 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>,
@@ -304,15 +237,13 @@ enum RecursiveTypeDescription<'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,
@@ -344,9 +275,10 @@ fn finalize(&self, cx: &CodegenCx<'ll, 'tcx>) -> MetadataCreationResult<'ll> {
                 // `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 \
@@ -379,7 +311,7 @@ fn finalize(&self, cx: &CodegenCx<'ll, 'tcx>) -> MetadataCreationResult<'ll> {
 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);
         }
@@ -390,7 +322,7 @@ macro_rules! return_if_metadata_created_in_meantime {
 /// 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 {
@@ -434,7 +366,7 @@ fn pointer_or_reference_metadata<'ll, 'tcx>(
     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);
 
@@ -534,16 +466,42 @@ fn pointer_or_reference_metadata<'ll, 'tcx>(
 
 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())),
         },
     )
@@ -553,17 +511,30 @@ fn subroutine_type_metadata<'ll, 'tcx>(
     )
     .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
@@ -571,7 +542,7 @@ fn subroutine_type_metadata<'ll, 'tcx>(
 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);
@@ -601,7 +572,7 @@ fn dyn_type_metadata<'ll, 'tcx>(
 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,
@@ -620,38 +591,11 @@ fn slice_type_metadata<'ll, 'tcx>(
 }
 
 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);
 
@@ -676,64 +620,7 @@ pub fn type_metadata<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll
         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);
@@ -764,47 +651,56 @@ pub fn type_metadata<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll
     };
 
     {
-        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() {
@@ -985,7 +881,7 @@ fn basic_type_metadata<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'l
 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);
 
@@ -1306,7 +1202,7 @@ fn create_member_descriptions<'ll>(
 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);
 
@@ -1415,7 +1311,7 @@ fn prepare_tuple_metadata<'ll, 'tcx>(
     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);
@@ -1483,7 +1379,7 @@ fn create_member_descriptions<'ll>(
 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);
 
@@ -1570,7 +1466,7 @@ fn create_member_descriptions(&self, cx: &CodegenCx<'ll, 'tcx>) -> Vec<MemberDes
         };
 
         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();
@@ -1913,7 +1809,7 @@ fn create_member_descriptions<'ll>(
 
 #[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>,
@@ -1923,9 +1819,17 @@ enum VariantInfo<'a, '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))
             }
@@ -1934,7 +1838,7 @@ fn map_struct_name<R>(&self, f: impl FnOnce(&str) -> R) -> R {
 
     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
@@ -1947,7 +1851,7 @@ fn variant_name(&self) -> String {
 
     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 {
@@ -1988,10 +1892,8 @@ fn describe_enum_variant<'ll, 'tcx>(
     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);
 
@@ -2021,7 +1923,7 @@ fn prepare_enum_metadata<'ll, 'tcx>(
     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;
@@ -2145,8 +2047,7 @@ fn prepare_enum_metadata<'ll, '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(
@@ -2257,10 +2158,9 @@ fn prepare_enum_metadata<'ll, 'tcx>(
         }
     };
 
-    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 {
@@ -2288,9 +2188,7 @@ fn prepare_enum_metadata<'ll, 'tcx>(
         // 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(
@@ -2336,7 +2234,7 @@ fn composite_type_metadata<'ll, 'tcx>(
     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 {
@@ -2459,13 +2357,12 @@ fn create_struct_stub<'ll, 'tcx>(
     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
@@ -2499,13 +2396,11 @@ fn create_union_stub<'ll, 'tcx>(
     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
@@ -2629,10 +2524,7 @@ fn vtable_type_metadata<'ll, 'tcx>(
 
     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
index 247cb9ee6e8c9f2e475a4c70238b9f4bdd02437a..1b4a193dbf1852d8cb193dc3c75272808215889e 100644 (file)
@@ -38,6 +38,7 @@
 use smallvec::SmallVec;
 use std::cell::RefCell;
 use std::iter;
+use std::lazy::OnceCell;
 use tracing::debug;
 
 mod create_scope_map;
@@ -63,9 +64,11 @@ pub struct CrateDebugContext<'a, 'tcx> {
     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>>,
@@ -93,6 +96,7 @@ pub fn new(llmod: &'a llvm::Module) -> Self {
             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(),
         }
     }
index 75836e143856facc4a21b7c7578bef5798a364c1..c2211005a0386d49645bb034499001d58983a7fd 100644 (file)
@@ -9,9 +9,13 @@
 #![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};
 
index 9bb8db076a8d67d2bffccd3a218e7465668332de..25e27f565eae26d626d9e45862cb17800a39d96a 100644 (file)
@@ -7,7 +7,7 @@
 #![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
index b2019ce40c3eaa2d2889d70ab2568b07d99d148b..99888992bc86aef53944c184b90edb73e82559c2 100644 (file)
@@ -217,8 +217,9 @@ fn guaranteed_ne(&mut self, a: Scalar, b: Scalar) -> bool {
             // 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.
index ab50c709143fd0dc0590f086fd1c491bc145f82d..45ac3cd1f84a60315ebd5df0d3cd519631eb1a69 100644 (file)
@@ -22,9 +22,9 @@
 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;
 
@@ -440,6 +440,29 @@ pub fn scalar_to_ptr(&self, scalar: Scalar<M::PointerTag>) -> Pointer<Option<M::
         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.
index 73e7d862ad64186cacb0a7d6f22b4c167f79d600..04a6209990ccf72795e45716ae4f89f30db87675 100644 (file)
@@ -483,21 +483,6 @@ fn check_offset_align(offset: u64, align: Align) -> InterpResult<'static> {
             }
         })
     }
-
-    /// 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
index 91578e9fd49f66e5caa0c16ecb9b334e942a5494..9b317e8e0abfb3b4a100e6e69b122638ca901221 100644 (file)
@@ -720,12 +720,11 @@ pub fn read_discriminant(
                     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))
                         }
index 0bf86d52080ead4d4fa31aa63382e54c6bd1ae46..5cacab823866ad81dc7804e103ae69a625e2b183 100644 (file)
@@ -572,21 +572,25 @@ fn try_visit_primitive(
                     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)
             }
@@ -644,10 +648,9 @@ fn visit_scalar(
             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 {
@@ -758,7 +761,7 @@ fn visit_union(
     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(());
         }
index 77d312f585138f6c4c9eda1031cb4f4c1a27955a..d688331ae0a56f569fac57467846e593a02164b6 100644 (file)
@@ -22,7 +22,7 @@
 #![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;
index c79a5ebf0933bbfba4b73418256b1964f5fb6302..46054fe7bcbb97234dff1580361a490e4a2a0cd7 100644 (file)
@@ -20,7 +20,7 @@ mod private {
 /// 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> {
index 3e93fe9a11f72613a3aa8d21a50ff0394108d049..b1e59d6502913621afd4c6d2b63412d84f5d0118 100644 (file)
@@ -28,7 +28,7 @@
 #![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;
index 563ec8b0e3a70fceee51d8eabca767c1653b6d57..db03ee8c4bc9400aad33303c908dab61d38623bf 100644 (file)
@@ -9,7 +9,7 @@
 #![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;
index 67b7db2d31fdeb663d37384437aa59fcc8644403..05c4915535de87490bf90ec0deb533d2b61959ae 100644 (file)
@@ -1,8 +1,10 @@
+#### 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!
index db50f490208f4afa3f28a3069095968474fa923b..44e641a2a0b5a75feb8042bb5117d99942447030 100644 (file)
@@ -1,8 +1,10 @@
+#### 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!
index 463308c27b25a92e62d9fbe3b951fab1970f41e6..fdfedffc529851bc15585eea5b583fde93f24145 100644 (file)
@@ -8,9 +8,9 @@
 #![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;
index 2cc15b3e53f460b93ba8e686e6835fa20a8c0174..b8ed75cb6bb74750074cd93c925b8e4f7c5851c5 100644 (file)
@@ -329,6 +329,10 @@ pub fn expr_some(&self, sp: Span, expr: P<ast::Expr>) -> P<ast::Expr> {
         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))
     }
index 43a310f4eafe3f4442149812ac93ce133e05f876..b024524aa2968e730187350070b5ea3783d175e3 100644 (file)
@@ -9,7 +9,7 @@
 #![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;
index 5545abc6024af2f8140488b18989da4e9cfa8c4d..1d9d16e85cb21286a7510f5e24b8d3954b7a22d3 100644 (file)
@@ -400,8 +400,6 @@ pub fn set(&self, features: &mut Features, span: Span) {
     (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.
index f5f944db5e90b23cbbd63a3a381beb997e566ff1..fae9bd633afffc829972012f85e9494649cd2077 100644 (file)
@@ -104,6 +104,9 @@ macro_rules! declare_features {
     (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.
index 72c02932945ca063329ab10a3166aa0b03e17604..c3795e48d7625661518329cb8dcb52156231da4a 100644 (file)
@@ -471,11 +471,6 @@ pub enum LifetimeParamKind {
     // `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,
index b4df3e1e396bdf2c4b5f4af70f665277cea8bba6..017113459664778040761f528a5dbc395a5dc8c7 100644 (file)
@@ -5,7 +5,7 @@
 #![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;
index 0cfb7bd110602103b6c3a5962c0dcd1ef1223817..33c3c536f119b4bf3cf4b388e66ba00fa29cfa81 100644 (file)
@@ -12,6 +12,8 @@
 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 {
index 8b61530577d8e2848a6a43a3ebdd62ac6507e903..4656994ac0869621eb4588493acc21d00b320dc9 100644 (file)
@@ -49,461 +49,6 @@ fn index(self) -> usize {
     }
 }
 
-/// 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>,
index 15c43c72c7b3757ba55c1bdce8413f55e72a653f..915d2e8bcb3ff74b1e031aa3aa13ba239f8fa105 100644 (file)
@@ -1,5 +1,9 @@
 #![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() {
index b1535701bb399dc86fbda3a1f0c57c1a3b63e75e..135714af2a6c18fa13af2722bf1f45845395980a 100644 (file)
@@ -125,7 +125,7 @@ fn visit_ty(&mut self, arg: &'tcx hir::Ty<'tcx>) {
                     // 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);
@@ -137,7 +137,7 @@ fn visit_ty(&mut self, arg: &'tcx hir::Ty<'tcx>) {
                     // 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!(
@@ -155,8 +155,8 @@ fn visit_ty(&mut self, arg: &'tcx hir::Ty<'tcx>) {
                         Some(
                             rl::Region::Static
                             | rl::Region::Free(_, _)
-                            | rl::Region::EarlyBound(_, _, _)
-                            | rl::Region::LateBound(_, _, _, _)
+                            | rl::Region::EarlyBound(_, _)
+                            | rl::Region::LateBound(_, _, _)
                             | rl::Region::LateBoundAnon(_, _, _),
                         )
                         | None,
@@ -221,7 +221,7 @@ fn visit_lifetime(&mut self, lifetime: &hir::Lifetime) {
                 }
             }
 
-            (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;
@@ -229,7 +229,7 @@ fn visit_lifetime(&mut self, lifetime: &hir::Lifetime) {
                 }
             }
 
-            (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);
@@ -242,8 +242,8 @@ fn visit_lifetime(&mut self, lifetime: &hir::Lifetime) {
             (
                 Some(
                     rl::Region::Static
-                    | rl::Region::EarlyBound(_, _, _)
-                    | rl::Region::LateBound(_, _, _, _)
+                    | rl::Region::EarlyBound(_, _)
+                    | rl::Region::LateBound(_, _, _)
                     | rl::Region::LateBoundAnon(_, _, _)
                     | rl::Region::Free(_, _),
                 )
index ae79e14db181c94e0bd061482455112f6a15ded0..4960630051f3ee2c8fd8b2675c7c89df535636eb 100644 (file)
@@ -23,7 +23,7 @@
 #![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;
index dcad3036cc24d3af834d54eb4d927a89a63b0aa8..f847c08a9dc7b5e362e981aca8aee7843f9d9230 100644 (file)
@@ -6,7 +6,7 @@
 #![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;
index 9ab138c1b12a51f54e900efd0989ef8bf2329739..def5c30411b84152c6fe87625ab7a1f5da4db96c 100644 (file)
@@ -758,7 +758,6 @@ macro_rules! tracked {
     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);
@@ -789,6 +788,7 @@ macro_rules! tracked {
     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);
index ac0f4bd8a4d72fd0dac92c5246706ba137e911cf..0582a4e01bfeb5b7e87ddffb72b9d87a9d718368 100644 (file)
@@ -147,7 +147,7 @@ pub fn get_lint_groups<'t>(
         &'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, .. })| {
index 7182022d2529817d5f7bf9163e3d21289adccb6a..a40453eb22a7a946b99f14e34ea127b7d94e5717 100644 (file)
@@ -38,7 +38,7 @@
 #![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;
index b71ffa43d85dc088bab45af9cf46f93440f57e1d..16d222f68a3211e3a56a1435bbb5aab94fdbd68f 100644 (file)
@@ -240,17 +240,17 @@ fn check_must_use_ty<'tcx>(
                 }
                 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;
                         }
                     }
index 152ae159aed446556ad243c1d58cf10f6a9df691..03e139755ba292266bf0a73d9a531560f09e82d5 100644 (file)
@@ -1,4 +1,5 @@
 #![feature(proc_macro_diagnostic)]
+#![feature(allow_internal_unstable)]
 #![allow(rustc::default_hash_types)]
 #![recursion_limit = "128"]
 
@@ -8,6 +9,7 @@
 
 mod hash_stable;
 mod lift;
+mod newtype;
 mod query;
 mod serialize;
 mod session_diagnostic;
@@ -24,6 +26,27 @@ pub fn symbols(input: TokenStream) -> TokenStream {
     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)] =>
diff --git a/compiler/rustc_macros/src/newtype.rs b/compiler/rustc_macros/src/newtype.rs
new file mode 100644 (file)
index 0000000..f284e5c
--- /dev/null
@@ -0,0 +1,310 @@
+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()
+}
index 046245080deb555423c13acbb062dd1c94f63e49..06658aadbac2710234fde1764d916b96dc5c69cb 100644 (file)
@@ -9,7 +9,7 @@
 #![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;
 
index fae76f80c4bdebc794f804f4d3cd934981681bcb..c3e168c47272965fdbed44f30d7ee5fb57080696 100644 (file)
@@ -6,7 +6,7 @@
 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,
 };
@@ -983,12 +983,7 @@ fn encode_def_ids(&mut self) {
             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));
index d3de54b4950f6a4e6707e0dedcbbb0cf6f5b4b0b..7ca564f29e6591a6b07901874d88d7fcfe4c9de0 100644 (file)
@@ -57,7 +57,7 @@
 #![feature(unwrap_infallible)]
 #![feature(decl_macro)]
 #![recursion_limit = "512"]
-#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate bitflags;
index 2665ea8d7fd73a48599095131492ea813a7c8329..98375cbad9f9b21f33e0d1ccbcb794fe62859533 100644 (file)
@@ -4,47 +4,14 @@
 
 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),
 }
index a36c9b6ed7304ba6fae8b627e84aa04c1561422b..5de119f956282b51448f6bda0135825b1517c9b1 100644 (file)
@@ -957,6 +957,7 @@ pub fn range_as_init_chunks(&self, start: Size, end: Size) -> InitChunkIter<'_>
 }
 
 /// 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.
index 52e143916cef0ad439a97c101a2684a3d878a785..9a36230516c17acff3562c2e3ac60f9086ee5d36 100644 (file)
@@ -1847,6 +1847,7 @@ pub fn is_field_to(&self, f: Field) -> bool {
     /// 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
index a618800cc1bd2c12a51a8b830f77ad276227f834..7320a5690693b732ae617afeb3cc980446eb8885 100644 (file)
@@ -162,6 +162,9 @@ fn visit_constant(&mut self,
                 self.super_constant(constant, location);
             }
 
+            // The macro results in a false positive of sorts, where &mut Span
+            // is fine, but &Span is not; just allow the lint.
+            #[allow(rustc::pass_by_value)]
             fn visit_span(&mut self,
                           span: & $($mutability)? Span) {
                 self.super_span(span);
@@ -869,6 +872,9 @@ fn super_constant(&mut self,
                 }
             }
 
+            // 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) {
             }
 
index a794a8c0e0874f3c5c0b4e8b7a340a2509e72782..b753c6238e147de4da3e59feb5f5a5d578ee4845 100644 (file)
@@ -21,7 +21,7 @@
 
 /// 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> {
index 7a6a6a00cc755af52ca897bc2c9beb765684a952..19d8856dc6ce4081119b9783322f043cd6cee3f0 100644 (file)
@@ -970,7 +970,7 @@ pub struct FreeRegionInfo {
 /// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/ty.html
 #[derive(Copy, Clone)]
 #[rustc_diagnostic_item = "TyCtxt"]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct TyCtxt<'tcx> {
     gcx: &'tcx GlobalCtxt<'tcx>,
 }
index f0b7f2a653f45e761b1e7cca71c1af64d99f0139..88c993d98e2423b17aba154aa4892588c45cfa15 100644 (file)
@@ -433,7 +433,7 @@ pub struct CReaderCacheKey {
 /// Use this rather than `TyS`, whenever possible.
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 #[rustc_diagnostic_item = "Ty"]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct Ty<'tcx>(Interned<'tcx, TyS<'tcx>>);
 
 // Statics only used for internal testing.
@@ -486,7 +486,7 @@ pub fn has_name(&self) -> bool {
 
 /// 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> {
index 2070dc357290dfd4777001df0380936ff21f3110..542bc3b02e02bb0b587f97503fa4fd13c146bbd7 100644 (file)
@@ -612,7 +612,7 @@ fn pretty_print_type(mut self, ty: Ty<'tcx>) -> Result<Self::Type, Self::Error>
                 }
             }
             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)),
@@ -754,7 +754,7 @@ fn pretty_print_type(mut self, ty: Ty<'tcx>) -> Result<Self::Type, Self::Error>
                 } 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!("_");
                 }
index 02a4df637d88946b25ac850550ca5d0bafeb44c4..a1e906140e0e8211a8f5620f9b05029e1523d0d4 100644 (file)
@@ -1396,7 +1396,7 @@ pub fn for_def(def: &ty::GenericParamDef) -> ParamConst {
 
 /// Use this rather than `TyKind`, whenever possible.
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
-#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
+#[rustc_pass_by_value]
 pub struct Region<'tcx>(pub Interned<'tcx, RegionKind>);
 
 impl<'tcx> Deref for Region<'tcx> {
index 84d6c1d2db87f1c3834a2cafb9b5d121af446d97..b2ea2889b3e048b55d13783b7a2d1f5ecb1edac7 100644 (file)
@@ -671,7 +671,7 @@ impl<'a, 'tcx> Builder<'a, '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);
             }
         }
 
@@ -730,8 +730,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
 
     // 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);
     }
index 12ea740d48aec56bbc4c90430d699180269f4f8a..9dea67e176266bdcebe673eaa5118a607268a752 100644 (file)
@@ -9,7 +9,7 @@
 #![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;
index 9502c5d57d68860944170a19347ed55f404a1baf..7d6a08d47dae1bb7eb84e24e3be5c2d28f848d16 100644 (file)
@@ -706,24 +706,27 @@ fn switch_on_enum_discriminant<'mir, 'tcx>(
     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);
index 57862b6628d2310819005e408cd8f79bfd073eb8..55f7e70db8fd30f8a2dca6382950cfb88c3225a2 100644 (file)
@@ -281,7 +281,7 @@ fn predecessors(&self, node: Self::Node) -> <Self as graph::GraphPredecessors<'_
 }
 
 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,
index d1cb2826dedfcffb90990613206039496703b06b..27b9b6c2fa3e76872c627e1d32f43203a2993125 100644 (file)
@@ -47,9 +47,9 @@ pub fn format<'tcx>(&self, tcx: TyCtxt<'tcx>, mir_body: &mir::Body<'tcx>) -> Str
         }
     }
 
-    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,
         }
     }
 }
index 237ead591a585913db1f26fdb2b8ccf0c171a10d..7878d6eaab1232cabc15bd023c1735d92cf432fe 100644 (file)
 //!   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::{
@@ -135,7 +128,7 @@ fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
     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;
@@ -803,9 +796,8 @@ struct CandidateAssignment<'tcx> {
 /// 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),
@@ -816,7 +808,6 @@ fn find_candidates<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) -> Vec<CandidateA
 }
 
 struct FindAssignments<'a, 'tcx> {
-    tcx: TyCtxt<'tcx>,
     body: &'a Body<'tcx>,
     candidates: Vec<CandidateAssignment<'tcx>>,
     ever_borrowed_locals: BitSet<Local>,
@@ -845,10 +836,11 @@ fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
                 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)
             {
@@ -862,22 +854,11 @@ fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
                 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 {
index e7d5bab8fd9d45e6bce054f0d7c75e8f4e754ee8..c0c66daffa8e0b56e1ace951721f2df0de0907a5 100644 (file)
@@ -10,7 +10,7 @@
 #![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;
index bbc65b09ece1dbd34359af691ffaea0fcc388ad3..c9accbcd86ed4315f18967efc17cf980b06ab802 100644 (file)
@@ -4,7 +4,7 @@
 #![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;
index c6919779ffd35e7c1c693c89315377d050c79766..a11cb3f5677c6fb8aeab0df15e86158406aee326 100644 (file)
@@ -372,10 +372,17 @@ fn should_continue_as_assoc_expr(&mut self, lhs: &Expr) -> bool {
                 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
@@ -1247,7 +1254,14 @@ fn parse_bottom_expr(&mut self) -> PResult<'a, P<Expr>> {
         } 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() {
index 68efbbb74c300c6385e06edc243170cca683d78e..6e4907fe518ae1626594a112ec015dfeb11b0e6a 100644 (file)
@@ -1740,8 +1740,8 @@ fn check_repr(
     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");
index 3130513c40e3774e602c4dbb7d51539b27e9dff7..71381f1d869311d964fa440550581c273d66c313 100644 (file)
@@ -13,7 +13,7 @@
 #![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;
index 3dd9995fa0081e7dc1d320db14d7aa7f27778d69..b56cb86a18c86f30cd2697d4b0ffbae32c57e6be 100644 (file)
@@ -4,7 +4,7 @@
 #![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;
index 832540a85e74b9ab2135ba967e684f3fff5c304d..6ebff5388f457d4d2a35f6cb50b2a2a00f7c661e 100644 (file)
@@ -7,7 +7,7 @@
 #![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;
index 750ac76a771222d130c830997419fda760abeb5c..6b70e9342fa648f77ef667cb040f850a2cad21f8 100644 (file)
@@ -5,7 +5,7 @@
 #![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;
index b71776c161531ec270f9afe3a3cadd6d2297cfa4..0ead6708f9a7a59910dbdd25679f1b632f825e14 100644 (file)
@@ -1838,7 +1838,6 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
             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 {
@@ -1854,7 +1853,6 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
                     }) {
                         (param.span.shrink_to_lo(), format!("{}, ", lifetime_ref))
                     } else {
-                        suggests_in_band = true;
                         (generics.span, format!("<{}>", lifetime_ref))
                     };
                     if suggested_spans.contains(&span) {
@@ -1889,15 +1887,6 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
                 _ => {}
             }
         }
-        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();
     }
 
index 23a8189f62fd83c3e53578623317b71784eb0703..1997f2133ed0020debe30cfe0c61774f1860eb40 100644 (file)
@@ -1,4 +1,3 @@
-// ignore-tidy-filelength
 //! Name resolution for lifetimes.
 //!
 //! Name resolution for lifetimes follows *much* simpler rules than the
@@ -16,7 +15,7 @@
 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::*;
@@ -63,23 +62,18 @@ fn early(hir_map: Map<'_>, index: &mut u32, param: &GenericParam<'_>) -> (ParamN
         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 {
@@ -93,7 +87,7 @@ fn id(&self) -> Option<DefId> {
         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)
             }
         }
@@ -101,8 +95,8 @@ fn id(&self) -> Option<DefId> {
 
     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)
@@ -113,8 +107,8 @@ fn shifted(self, amount: u32) -> Region {
 
     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)
@@ -127,7 +121,7 @@ fn subst<'a, L>(self, mut params: L, map: &NamedRegionMap) -> Option<Region>
     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)
@@ -568,7 +562,7 @@ fn sub_items_have_self_param(node: &hir::ItemKind<'_>) -> bool {
 
 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))
         }
@@ -1010,7 +1004,7 @@ fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) {
                     // 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 {
@@ -1046,7 +1040,7 @@ fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) {
                     match param.kind {
                         GenericParamKind::Lifetime { .. } => {
                             let (name, reg) = Region::early(self.tcx.hir(), &mut index, &param);
-                            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.
@@ -1325,9 +1319,6 @@ fn visit_fn_decl(&mut self, fd: &'tcx hir::FnDecl<'tcx>) {
     }
 
     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 {
@@ -1535,30 +1526,6 @@ fn desc(&self) -> &'static str {
     }
 }
 
-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
@@ -1696,7 +1663,7 @@ fn compute_object_lifetime_defaults<'tcx>(
                     .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 {
@@ -1777,18 +1744,16 @@ fn add_bounds(set: &mut Set1<hir::LifetimeName>, bounds: &[hir::GenericBound<'_>
                             .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()))
                             })
                     }
                 }
@@ -1846,13 +1811,7 @@ fn with<F>(&mut self, wrap_scope: Scope<'_>, f: F)
     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 {
@@ -1982,8 +1941,8 @@ fn check_uses_for_lifetimes_defined_by_scope(&mut self) {
         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,
@@ -2338,39 +2297,6 @@ fn resolve_lifetime_ref(&mut self, lifetime_ref: &'tcx hir::Lifetime) {
                 }
             }
 
-            // 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);
@@ -2950,7 +2876,7 @@ fn visit_param_bound(&mut self, bound: &hir::GenericBound<'_>) {
             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 =>
                         {
@@ -3356,8 +3282,8 @@ fn insert_lifetime(&mut self, lifetime_ref: &'tcx hir::Lifetime, def: Region) {
             }
 
             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);
index 4823b889207f145e42626716e89285bb879c5a6d..0c386ebc49eaa16c24e0d801cc741012ec29f197 100644 (file)
@@ -18,7 +18,7 @@
 #![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;
index 43ec35a8434194f9e54c93ed598ef18c912133f1..cf71f9b3fc5aaa9076c3e016d8e4cf9cd5f0de38 100644 (file)
@@ -3,7 +3,7 @@
 #![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;
index 82a95faa3470a87bf173f98bbcd34906e7a65532..f9574cb1a3bb57238d9e7f930d8f0810876cc804 100644 (file)
@@ -4,7 +4,7 @@
 #![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;
index 9a92258f80985068631b38625693172284db8002..359e00718bf134e4c175060b46063618a4a934d6 100644 (file)
@@ -1336,9 +1336,6 @@ mod parse {
         "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],
@@ -1483,6 +1480,9 @@ mod parse {
         "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],
index e51030eedf82fa6cb74f70f960d1b4e9c1685f6c..6d7377927c2910df4f9cc7fda27ddc7244b1e3eb 100644 (file)
@@ -22,7 +22,8 @@
 #![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;
index 61e4074a7c80bf1cf9d846df96bccb2a9f91000c..3ee329e9736f2570e47c4e771da6cbd8a72921a0 100644 (file)
 /// 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,
index f4d1f41902aff11802bb176b86720073c33822b1..3b60f91f8c85394049e597e06f9b75eca90fe194 100644 (file)
@@ -91,7 +91,7 @@
 #![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;
index 0041f5964059c9f646b57715b021800cccd96503..5569334ff3d20c48bdb3c12da9bac3335de4101c 100644 (file)
@@ -22,7 +22,7 @@
 #![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;
index efa50375c95ea01614c4c17ed8396b75465f637e..4a310e2be3e3c8ef325b7293aaec98e1e83bc99d 100644 (file)
@@ -205,7 +205,7 @@ pub fn ast_region_to_region(
         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),
@@ -222,7 +222,7 @@ pub fn ast_region_to_region(
                 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 }))
             }
index 7dca95ebdd613970d5f964fc6440bc45696c4cfe..8ed87497f1b32e817efc8037f54dbb22e3a009ca 100644 (file)
@@ -14,7 +14,7 @@
 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};
@@ -417,10 +417,31 @@ fn check_static_inhabited<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId, span: Spa
     // 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(
index f84036a7a39909a21f6c058d8ce10f01bc5414c4..8d4ffefda73bb41d03c1b58b882d0cf4afb65307 100644 (file)
@@ -271,7 +271,7 @@ fn check_expr_kind(
             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),
@@ -982,7 +982,7 @@ fn check_expr_assign(
         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 {
@@ -1014,7 +1014,7 @@ fn check_expr_assign(
             }
             if eq {
                 err.span_suggestion_verbose(
-                    *span,
+                    span,
                     "you might have meant to compare for equality",
                     "==".to_string(),
                     applicability,
@@ -1031,7 +1031,7 @@ fn check_expr_assign(
             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));
index 0fe5e74da89bfbf2cdcb98c8f5b4076ce121d4f0..d884073126306f4e0a43b852c39a21edb535664b 100644 (file)
@@ -313,6 +313,15 @@ pub fn apply_adjustments(&self, expr: &hir::Expr<'_>, adj: Vec<Adjustment<'tcx>>
                     ) => {
                         // 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!(
index 9e4b88e3746806ccd0847f2302bbfd812dad4be4..8cad4fc707ea3a7488e8f3ba9ec5386c5f82bc7a 100644 (file)
@@ -633,7 +633,7 @@ fn try_suggest_return_impl_trait(
             })
             .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 =
index 9a308586afff3a723ef738794aac89547a8f2e52..03d3b23bb23d5cc35d4f6ab5e048bd338c401ef2 100644 (file)
@@ -93,9 +93,10 @@ fn consume(
     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));
@@ -103,9 +104,14 @@ fn borrow(
 
     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(
index 5873b0f52a60eac6f1dbbb017cf21714841974dc..5dd5e71656d2317fd13a85667a3e8064520ab1ce 100644 (file)
@@ -36,7 +36,7 @@ pub fn check_binop_assign(
 
         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
@@ -98,9 +98,9 @@ pub fn check_binop(
                     && 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,
                     );
@@ -114,9 +114,9 @@ pub fn check_binop(
 
     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> {
@@ -129,8 +129,8 @@ fn enforce_builtin_binop_types(
         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
             }
 
@@ -141,13 +141,13 @@ fn enforce_builtin_binop_types(
 
             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
             }
         }
index cf2164763b1cfd065b34acac879c9b503914ce5c..2317ae43f11433b719312390b3edb8e56bcbaf42 100644 (file)
@@ -1377,7 +1377,7 @@ fn visit_lifetime(&mut self, lt: &'tcx hir::Lifetime) {
             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(
index bbfe5295fe107f6ec9e1ad223120a7402968ec2b..f0289fd505a47c78997be0512d0a8344dd512c40 100644 (file)
@@ -70,7 +70,7 @@
 #![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;
index b39b5409ae44f0dfe39ea4f96ea93f024a4bc10b..65468d5fe57166222a53de3fb2ce0efce3dc64ec 100644 (file)
 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.
@@ -180,7 +176,7 @@ fn test_levels() {
 #[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();
 }
@@ -189,7 +185,7 @@ fn test_check_ord_chaos() {
 #[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();
 }
@@ -337,8 +333,7 @@ fn test_basic_small() {
 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
@@ -360,8 +355,7 @@ fn test<T>(size: usize, mut iter: T)
 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
@@ -386,7 +380,7 @@ fn do_test_iter_mut_mutation<T>(size: usize)
     <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);
@@ -452,7 +446,7 @@ fn test_iter_mut_mutation() {
 
 #[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();
 }
@@ -467,14 +461,14 @@ fn test_values_mut_mutation() {
         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();
@@ -491,7 +485,7 @@ fn test_iter_entering_root_twice() {
 
 #[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();
@@ -509,7 +503,7 @@ fn test_iter_mixed() {
     // 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
@@ -569,21 +563,19 @@ fn test_iter_min_max() {
 }
 
 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);
@@ -638,10 +630,9 @@ fn test_range_small() {
 
 #[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![]);
@@ -660,9 +651,9 @@ fn test_range_height_1() {
 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);
@@ -715,9 +706,7 @@ fn check<'a, L, R>(lhs: L, rhs: R)
         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));
@@ -728,14 +717,13 @@ fn check<'a, L, R>(lhs: L, rhs: R)
 #[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);
 }
@@ -743,35 +731,35 @@ fn test_range_equal_empty_cases() {
 #[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)));
 }
 
@@ -823,7 +811,7 @@ fn borrow(&self) -> &EvilTwin {
         }
     }
 
-    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));
 }
 
@@ -831,7 +819,7 @@ fn borrow(&self) -> &EvilTwin {
 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));
@@ -870,7 +858,7 @@ fn test_range() {
     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) {
@@ -891,7 +879,7 @@ fn test_range_mut() {
     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) {
@@ -910,7 +898,7 @@ fn test_range_mut() {
 
 #[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);
@@ -934,7 +922,7 @@ fn empty() {
     #[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();
     }
@@ -943,7 +931,7 @@ fn consumed_keeping_all() {
     #[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();
@@ -953,7 +941,7 @@ fn consumed_removing_all() {
     #[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;
@@ -970,7 +958,7 @@ fn mutating_and_keeping() {
     #[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;
@@ -985,7 +973,7 @@ fn mutating_and_removing() {
     #[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();
@@ -995,7 +983,7 @@ fn underfull_keeping_all() {
     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();
@@ -1006,7 +994,7 @@ fn underfull_removing_one() {
     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();
@@ -1016,7 +1004,7 @@ fn underfull_keeping_one() {
     #[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();
@@ -1024,29 +1012,29 @@ fn underfull_removing_all() {
 
     #[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();
@@ -1055,8 +1043,8 @@ fn height_0_keeping_one() {
 
     #[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();
@@ -1064,7 +1052,7 @@ fn height_0_removing_all() {
 
     #[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();
@@ -1073,7 +1061,7 @@ fn height_0_keeping_half() {
     #[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();
@@ -1083,7 +1071,7 @@ fn height_1_removing_all() {
     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();
@@ -1094,7 +1082,7 @@ fn height_1_removing_one() {
     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();
@@ -1105,7 +1093,7 @@ fn height_1_keeping_one() {
     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();
@@ -1116,7 +1104,7 @@ fn height_2_removing_one() {
     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();
@@ -1126,7 +1114,7 @@ fn height_2_keeping_one() {
     #[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();
@@ -1287,7 +1275,7 @@ fn split_off<T: Ord>(v: &mut BTreeMap<Box<T>, ()>, t: &T) {
 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) {
@@ -1415,7 +1403,7 @@ fn cmp(&self, _: &Self) -> Ordering {
 #[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, ());
         }
@@ -1485,7 +1473,7 @@ fn test_clone() {
     }
 
     // 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);
@@ -1496,14 +1484,11 @@ fn test_clone() {
 
 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 {
@@ -1864,9 +1849,9 @@ fn test_first_last_entry() {
 
 #[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();
     }
@@ -1874,14 +1859,14 @@ fn test_insert_into_full_height_0() {
 
 #[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();
@@ -2022,7 +2007,7 @@ fn test_split_off_empty_left() {
 #[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();
@@ -2038,7 +2023,7 @@ fn test_split_off_tiny_left_height_2() {
 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();
@@ -2052,7 +2037,7 @@ fn test_split_off_tiny_right_height_2() {
 #[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());
@@ -2112,13 +2097,11 @@ fn test_into_iter_drop_leak_height_0() {
 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);
@@ -2128,9 +2111,8 @@ fn test_into_iter_drop_leak_height_1() {
 
 #[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));
@@ -2140,9 +2122,8 @@ fn test_into_keys() {
 
 #[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'));
index a4315be74e36c27bea4195f1d80574042e089a85..3031bf86a7be154a3030a42860bc04adab929344 100644 (file)
@@ -1539,7 +1539,7 @@ fn next(&mut self) -> Option<&'a T> {
     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))
     }
index 7390ff5a59c8cd5b7908e53d04a2fa09e2108295..7865d37ae51f1cde0a29e538d1496c980e3c4d24 100644 (file)
@@ -91,7 +91,7 @@ fn check_intersection(a: &[i32], b: &[i32], expected: &[i32]) {
         return;
     }
 
-    let large = (0..100).collect::<Vec<_>>();
+    let large = Vec::from_iter(0..100);
     check_intersection(&[], &large, &[]);
     check_intersection(&large, &[], &[]);
     check_intersection(&[-1], &large, &[]);
@@ -107,8 +107,8 @@ fn check_intersection(a: &[i32], b: &[i32], expected: &[i32]) {
 
 #[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));
@@ -145,7 +145,7 @@ fn check_difference(a: &[i32], b: &[i32], expected: &[i32]) {
         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, &[]);
@@ -159,43 +159,43 @@ fn check_difference(a: &[i32], b: &[i32], expected: &[i32]) {
 
 #[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));
@@ -204,19 +204,19 @@ fn test_difference_size_hint() {
     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)));
 }
@@ -235,8 +235,8 @@ fn check_symmetric_difference(a: &[i32], b: &[i32], expected: &[i32]) {
 
 #[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));
@@ -263,8 +263,8 @@ fn check_union(a: &[i32], b: &[i32], expected: &[i32]) {
 
 #[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));
@@ -276,8 +276,8 @@ fn test_union_size_hint() {
 #[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));
 }
 
@@ -285,8 +285,8 @@ fn test_is_disjoint() {
 // 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)
     }
 
@@ -310,7 +310,7 @@ fn is_subset(a: &[i32], b: &[i32]) -> bool {
         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);
@@ -321,8 +321,7 @@ fn is_subset(a: &[i32], b: &[i32]) -> bool {
 
 #[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));
@@ -332,8 +331,8 @@ fn test_retain() {
 
 #[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);
@@ -417,7 +416,7 @@ fn test_zip() {
 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));
index 6da32df57efb761c654afbb068a99b8842de9883..82493f9c398cb5805d7653cab651b6b19b570538 100644 (file)
 #![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)]
index 8e7b03d02f157db216cb9fb71440374600cfe997..32d1a4e55083428dee2923730ce162130a63bb94 100644 (file)
@@ -138,7 +138,7 @@ pub fn field(&mut self, name: &str, value: &dyn fmt::Debug) -> &mut Self {
                 }
                 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)?;
@@ -189,7 +189,7 @@ pub fn finish_non_exhaustive(&mut self) -> fmt::Result {
                 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 {
@@ -323,7 +323,7 @@ pub fn field(&mut self, value: &dyn fmt::Debug) -> &mut Self {
                 }
                 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 {
@@ -394,7 +394,7 @@ fn entry(&mut self, entry: &dyn fmt::Debug) {
                 }
                 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 {
@@ -789,7 +789,7 @@ pub fn key(&mut self, key: &dyn fmt::Debug) -> &mut Self {
                 }
                 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 {
@@ -845,7 +845,7 @@ pub fn value(&mut self, value: &dyn fmt::Debug) -> &mut Self {
 
             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 {
index b5228397f0a9990f10cd245c838c307dec120cfe..1d457c2b7d542b080fb6c2f578a9c4b898d82f5e 100644 (file)
@@ -1936,7 +1936,6 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
     /// - 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.
index aa1ad9362a90e897b4fee9c84dc74cdcbeb32ff5..e7896b2cb66ed0b59d503b933948a023d04de276 100644 (file)
 #![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)]
index 628b679236e1d4d879df4e906fcb79cbb5cb13d2..65a2c3ff6edc9ea6bf0ad4df9a22ee779507ac3a 100644 (file)
@@ -594,7 +594,6 @@ macro_rules! writeln {
 ///     unreachable!("The loop should always return");
 /// }
 /// ```
-#[cfg(not(bootstrap))]
 #[macro_export]
 #[rustc_builtin_macro(unreachable)]
 #[allow_internal_unstable(edition_panic)]
@@ -608,24 +607,6 @@ macro_rules! unreachable {
     };
 }
 
-/// 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
index 2b720fc4192a7e04ee212a1961635ebba41f79dd..89cebaa653f4ba9ebee10cba5958555c1ec7f9ab 100644 (file)
@@ -56,7 +56,6 @@ pub const fn panic_str(expr: &str) -> ! {
     panic_display(&expr);
 }
 
-#[cfg(not(bootstrap))]
 #[inline]
 #[track_caller]
 #[rustc_diagnostic_item = "unreachable_display"] // needed for `non-fmt-panics` lint
@@ -85,9 +84,11 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
     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") {
index cd38c3a75473d4c1393823bb1afab8ef61812654..7d89fc7eceda241606dab099e94fa9cfc4c6db67 100644 (file)
@@ -587,11 +587,17 @@ pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
     #[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.
index e050e8103752283c4d773f57fd752ddc4b286fb7..06870c6d06cbe9333d79f7330c36089299b668e2 100644 (file)
@@ -80,7 +80,6 @@ fn test_hints_in_const_contexts() {
     }
 }
 
-#[cfg(not(bootstrap))]
 #[test]
 fn test_const_allocate_at_runtime() {
     use core::intrinsics::const_allocate;
@@ -89,7 +88,6 @@ fn test_const_allocate_at_runtime() {
     }
 }
 
-#[cfg(not(bootstrap))]
 #[test]
 fn test_const_deallocate_at_runtime() {
     use core::intrinsics::const_deallocate;
index 06c7be054a0381b0eaa9574efba3277999d4fe46..28830222c1a94b0f31153f8d1a47a1af8e8f6f84 100644 (file)
@@ -6,8 +6,6 @@
 #![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)]
index 233657202f7e8def0053c03a12e4775ba98332b1..2291400537c9431fa0d292e0b43bb95c4ea4e52f 100644 (file)
@@ -41,7 +41,6 @@
     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
index b7ef7a56c7319b6404d1464149a7c68e28d3ba83..35c5b6b84f81fec784faa0d32483fc5f199f16a9 100644 (file)
@@ -62,10 +62,7 @@ pub const fn splat(value: T) -> Self {
     /// `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 {
@@ -100,7 +97,6 @@ pub const fn from_slice(slice: &[T]) -> Self {
     /// ```
     #[must_use]
     #[inline]
-    #[cfg(not(bootstrap))]
     pub fn cast<U: SimdElement>(self) -> Simd<U, LANES> {
         unsafe { intrinsics::simd_as(self) }
     }
index 53b43455b5a61804b25acf527ba6d4c3e22fc4cb..c0524352193f947b45367a3470d5aa1557afe91f 100644 (file)
@@ -371,7 +371,7 @@ pub fn keys(&self) -> Keys<'_, K, V> {
     /// 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() }
@@ -449,7 +449,7 @@ pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> {
     /// 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() }
@@ -473,7 +473,7 @@ pub fn into_values(self) -> IntoValues<K, V> {
     ///     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() }
@@ -503,7 +503,7 @@ pub fn iter(&self) -> Iter<'_, K, V> {
     ///     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() }
@@ -568,7 +568,7 @@ pub fn is_empty(&self) -> bool {
     /// 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() }
@@ -610,7 +610,7 @@ pub fn drain(&mut self) -> Drain<'_, K, V> {
     /// 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
@@ -634,7 +634,7 @@ pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, K, V, F>
     /// 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
@@ -2001,7 +2001,7 @@ impl<'a, K, V, S> IntoIterator for &'a HashMap<K, V, S> {
     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()
     }
@@ -2013,7 +2013,7 @@ impl<'a, K, V, S> IntoIterator for &'a mut HashMap<K, V, S> {
     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()
     }
@@ -2043,7 +2043,7 @@ impl<K, V, S> IntoIterator for HashMap<K, V, S> {
     /// 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() }
     }
index 200667ae390697c390bc9f466c5933035eb4baff..2eb4cacabb83100c3bf4d00ecc4d356b995042ee 100644 (file)
@@ -185,7 +185,7 @@ pub fn capacity(&self) -> usize {
     /// }
     /// ```
     #[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() }
@@ -250,7 +250,7 @@ pub fn is_empty(&self) -> bool {
     /// 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() }
@@ -289,7 +289,7 @@ pub fn drain(&mut self) -> Drain<'_, T> {
     /// 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
@@ -312,7 +312,7 @@ pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, T, F>
     /// 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
@@ -537,7 +537,7 @@ pub fn shrink_to(&mut self, min_capacity: usize) {
     /// 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 }
@@ -565,7 +565,7 @@ pub fn difference<'a>(&'a self, other: &'a HashSet<T, S>) -> Difference<'a, T, S
     /// 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,
@@ -593,7 +593,7 @@ pub fn symmetric_difference<'a>(
     /// 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() {
@@ -622,7 +622,7 @@ pub fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a,
     /// 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() {
@@ -1423,7 +1423,7 @@ impl<'a, T, S> IntoIterator for &'a HashSet<T, S> {
     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()
     }
@@ -1455,7 +1455,7 @@ impl<T, S> IntoIterator for HashSet<T, S> {
     /// }
     /// ```
     #[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() }
     }
index 5dc586d3a2adf61ab1fc87f01cb7c26d598064d4..1e0d9b79b9f6e453b089dd58c96e369035b52419 100644 (file)
 #![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)]
index 71c660e7186751be890291f7d5d1127a1d23b850..d72f9a2ff9c8f8a9fa53238730a1aefaebffb64b 100644 (file)
@@ -8,7 +8,7 @@
 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};
 
index 920f55ad251a651ca3f484c6d8f2fc1eb2c0d2c2..22fcd77dccc52a5f32a5a1d51a09fd2cfa3995e6 100644 (file)
@@ -103,17 +103,32 @@ pub fn write_log_result(
         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 {
index d566dbc09f434bfd09f6318bffc287ae58b6736e..8329e9735d43dff78b1a282402f8bc5320954cfa 100644 (file)
@@ -61,12 +61,12 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
             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 || {})),
         },
@@ -74,12 +74,12 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
             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 || {})),
         },
@@ -95,12 +95,12 @@ fn 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)),
     };
@@ -117,12 +117,12 @@ fn 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)),
     };
@@ -143,12 +143,12 @@ fn 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)),
     };
@@ -169,12 +169,12 @@ fn 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)),
     };
@@ -200,12 +200,12 @@ fn 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)),
     };
@@ -235,12 +235,12 @@ fn 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)),
     };
@@ -262,12 +262,12 @@ fn 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)),
         };
@@ -297,12 +297,12 @@ fn 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)),
     };
@@ -333,12 +333,12 @@ fn 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)),
     };
@@ -373,12 +373,12 @@ fn typed_test_desc(test_type: TestType) -> TestDesc {
     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,
     }
 }
 
@@ -486,12 +486,12 @@ pub fn exclude_should_panic_option() {
         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 || {})),
     });
@@ -511,12 +511,12 @@ fn tests() -> Vec<TestDescAndFn> {
                 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 || {})),
             })
@@ -601,12 +601,12 @@ fn testfn() {}
             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)),
         };
@@ -753,12 +753,12 @@ fn f(_: &mut Bencher) {}
     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);
@@ -776,12 +776,12 @@ fn f(b: &mut Bencher) {
     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);
@@ -793,23 +793,23 @@ fn should_sort_failures_before_printing_them() {
     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);
index 43e5a10ebbe95a02f6184410fb9368e7556a1f1f..1084fb98389fb08c8f74fe6e85765a652f32063f 100644 (file)
@@ -117,12 +117,12 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 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 {
index 53226977fd881fae5cb06e4e0f2d6301e3bcaa3f..b2805d93b70fc82778ebbd7760472d3ecfef2c3e 100644 (file)
@@ -648,7 +648,7 @@ fn run(self, builder: &Builder<'_>) {
 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);
index 6f010cc9f8c18cd74334424c04a42ac5a7869500..86339c8d7f88d2992458fcc197c0b2d8eb2aa35f 100644 (file)
 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};
 
@@ -669,12 +670,12 @@ fn std_features(&self, target: TargetSelection) -> String {
     }
 
     /// 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");
         }
 
index c7fd5ed6fcb2ed28d2bd217e35a94928c8326d7d..141d5d2d2b2d0fec9a8802eedaee1cf7d5cf3919 100644 (file)
@@ -512,3 +512,17 @@ crate being documented (`foobar`) and a path to output the calls
 
 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`.
index 1e0c1e8f1f356b7624ec44056f70f14cad4e2181..e0e641c2f9b5eb96628ad025960f03621fcc884c 100644 (file)
@@ -193,8 +193,8 @@ impl Clean<Lifetime> for hir::Lifetime {
     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
         {
index 6e483d27f336b52e1933b8b1c1e45c52b54c09af..93f90b90e0a0d6db6afffa3b2c0db72d6d690321 100644 (file)
@@ -80,6 +80,8 @@ fn try_from(value: &str) -> Result<Self, Self::Error> {
     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.
@@ -172,6 +174,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
             .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)
@@ -506,6 +509,7 @@ fn println_condition(condition: Condition) {
         };
 
         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));
 
@@ -677,6 +681,7 @@ fn println_condition(condition: Condition) {
             externs,
             extern_strs,
             cfgs,
+            check_cfgs,
             codegen_options,
             codegen_options_strs,
             debugging_opts,
index c2f6f7aea757e4ef3fdef947f8a1154d402d9233..2b82575f71083626af0af14977bd5418b0957761 100644 (file)
@@ -192,6 +192,7 @@ impl<'tcx> DocContext<'tcx> {
         libs,
         externs,
         mut cfgs,
+        check_cfgs,
         codegen_options,
         debugging_opts,
         target,
@@ -219,6 +220,7 @@ impl<'tcx> DocContext<'tcx> {
         // 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()));
 
@@ -253,7 +255,7 @@ impl<'tcx> DocContext<'tcx> {
     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,
index a08732be1c560542ca6e9a4a300ed06c0c729035..5b6c7626239bcea3a41cb58524231fde34f4f753 100644 (file)
@@ -91,7 +91,7 @@
     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,
@@ -321,6 +321,12 @@ fn run_test(
     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);
     }
@@ -946,13 +952,13 @@ fn add_test(&mut self, test: String, config: LangString, line: usize) {
                     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| {
index 9d3e58a3a66fc7ca5300f697da42016982d381fb..5c8a8fb80f1f422c90dc289d8d6a2e3f86852d17 100644 (file)
@@ -22,6 +22,7 @@
 #![recursion_limit = "256"]
 #![warn(rustc::internal)]
 #![allow(clippy::collapsible_if, clippy::collapsible_else_if)]
+#![allow(rustc::potential_query_instability)]
 
 #[macro_use]
 extern crate tracing;
@@ -259,6 +260,7 @@ fn opts() -> Vec<RustcOptGroup> {
             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(
index 525902be8524cfcfb2bcab7432fc0f765e04c8f9..5990ab44359453849967d9a21a4b9ac1c45c6920 100644 (file)
   "__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"
   }
 }
index 7f945299c22a6c9bb77fb8b39f9c797071da59d4..1a84f1a44795bb22f41403e0bc4e7643695c47d2 100644 (file)
@@ -1,5 +1,5 @@
 // compile-flags: -C no-prepopulate-passes
-//
+// min-llvm-version: 14.0
 
 #![crate_type = "lib"]
 
@@ -43,7 +43,7 @@ pub fn inline_enum_const() -> E<i8, i16> {
 #[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)
 }
 
@@ -51,6 +51,6 @@ pub fn inline_enum_const() -> E<i8, i16> {
 #[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)
 }
index 4bd811bed10e5d2999a7551e860e4f902548632c..0abc8a409ed7a5346c995ce235171a6103ebe408 100644 (file)
@@ -5,7 +5,7 @@
 // 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
diff --git a/src/test/codegen/uninit-consts-allow-partially-uninit.rs b/src/test/codegen/uninit-consts-allow-partially-uninit.rs
deleted file mode 100644 (file)
index f7420e4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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
-}
index c4c21e03f16767e2aa93538cbb70a4f161f958b9..3e370c7ba64f8262a1a5c2aca1d375706c02429f 100644 (file)
@@ -1,4 +1,5 @@
 // compile-flags: -C no-prepopulate-passes
+// min-llvm-version: 14.0
 
 // Check that we use undef (and not zero) for uninitialized bytes in constants.
 
@@ -12,7 +13,13 @@ pub struct PartiallyUninit {
 }
 
 // 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
@@ -27,7 +34,15 @@ pub struct PartiallyUninit {
 #[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
 }
 
index 9be0738ea96ee0e0f7e1f9725875f75b2020ba3f..11776ed21e1586b9ae92675c926ecd5a58970a36 100644 (file)
       }
   
       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
       }
   }
index 0ac9661a66a31d291c49b58fad860654b936d5be..68c834dfbbf27bb491e76f51e1369074848ee83b 100644 (file)
@@ -1,4 +1,4 @@
-//! 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
index 480d6242ac611790c39f0c208cdb749095e6bd8a..477105193d3eeb3e16b119ab1686eabe95fc7b14 100644 (file)
@@ -3,12 +3,36 @@ goto: file://|DOC_PATH|/test_docs/index.html
 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)
diff --git a/src/test/rustdoc-ui/check-cfg-test.rs b/src/test/rustdoc-ui/check-cfg-test.rs
new file mode 100644 (file)
index 0000000..626cc83
--- /dev/null
@@ -0,0 +1,12 @@
+// 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;
diff --git a/src/test/rustdoc-ui/check-cfg-test.stderr b/src/test/rustdoc-ui/check-cfg-test.stderr
new file mode 100644 (file)
index 0000000..dc25205
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
diff --git a/src/test/rustdoc-ui/check-cfg-test.stdout b/src/test/rustdoc-ui/check-cfg-test.stdout
new file mode 100644 (file)
index 0000000..b7db49b
--- /dev/null
@@ -0,0 +1,6 @@
+
+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
+
diff --git a/src/test/rustdoc-ui/check-cfg-unstable.rs b/src/test/rustdoc-ui/check-cfg-unstable.rs
new file mode 100644 (file)
index 0000000..5c500ce
--- /dev/null
@@ -0,0 +1,2 @@
+// check-fail
+// compile-flags: --check-cfg=names()
diff --git a/src/test/rustdoc-ui/check-cfg-unstable.stderr b/src/test/rustdoc-ui/check-cfg-unstable.stderr
new file mode 100644 (file)
index 0000000..9b27c2b
--- /dev/null
@@ -0,0 +1,2 @@
+error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg`
+
diff --git a/src/test/rustdoc-ui/check-cfg.rs b/src/test/rustdoc-ui/check-cfg.rs
new file mode 100644 (file)
index 0000000..fa8789a
--- /dev/null
@@ -0,0 +1,7 @@
+// 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;
diff --git a/src/test/rustdoc-ui/check-cfg.stderr b/src/test/rustdoc-ui/check-cfg.stderr
new file mode 100644 (file)
index 0000000..1db8e1d
--- /dev/null
@@ -0,0 +1,10 @@
+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
+
diff --git a/src/test/ui/async-await/drop-track-field-assign-nonsend.rs b/src/test/ui/async-await/drop-track-field-assign-nonsend.rs
new file mode 100644 (file)
index 0000000..b6c0fda
--- /dev/null
@@ -0,0 +1,45 @@
+// 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
+}
diff --git a/src/test/ui/async-await/drop-track-field-assign-nonsend.stderr b/src/test/ui/async-await/drop-track-field-assign-nonsend.stderr
new file mode 100644 (file)
index 0000000..d95483c
--- /dev/null
@@ -0,0 +1,25 @@
+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
+
diff --git a/src/test/ui/async-await/drop-track-field-assign.rs b/src/test/ui/async-await/drop-track-field-assign.rs
new file mode 100644 (file)
index 0000000..3a393cd
--- /dev/null
@@ -0,0 +1,44 @@
+// 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();
+}
index 90ab0c01f5450f086ad569fdb911eecaf721284c..963b19b34a620b2edd13825211b1c1c6a75f79d9 100644 (file)
@@ -2,8 +2,6 @@
 // edition:2018
 // compile-flags: --crate-type lib
 
-#![feature(in_band_lifetimes)]
-
 use std::future::Future;
 
 pub async fn simple_generic<T>() {}
@@ -73,10 +71,6 @@ pub fn call_with_ref_block<'a>(f: &'a (impl Foo + 'a)) -> impl Future<Output = (
     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);
@@ -91,9 +85,4 @@ pub fn async_block_with_same_generic_params_unifies() {
     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);
 }
diff --git a/src/test/ui/attributes/used_with_arg_no_mangle.rs b/src/test/ui/attributes/used_with_arg_no_mangle.rs
new file mode 100644 (file)
index 0000000..d0bbe76
--- /dev/null
@@ -0,0 +1,9 @@
+// check-pass
+
+#![feature(used_with_arg)]
+
+#[used(linker)]
+#[no_mangle] // accidentally detected as `used(compiler)`
+pub static GLOB: usize = 0;
+
+fn main() {}
index bf4e2926d51c02d4723d970fef9d9a7cf1a404d6..f6f2432f2d71d8fa94a7bb6e11930f0c25d0420b 100644 (file)
@@ -112,7 +112,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $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) {
index ef25e279a0671b02fe643fdbb90c9ce1501c833a..28bd040e2232c3f812ec966d822ef81efcd21b8b 100644 (file)
@@ -112,7 +112,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $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) {
diff --git a/src/test/ui/consts/precise-drop-with-coverage.rs b/src/test/ui/consts/precise-drop-with-coverage.rs
new file mode 100644 (file)
index 0000000..275cb38
--- /dev/null
@@ -0,0 +1,16 @@
+// 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),
+    }
+}
index 9bde2ca1942e64c09a188bc4d2a58f835ffaa762..a1a149ab3a0e1c7386f67e8baf786b13c6300d98 100644 (file)
@@ -35,21 +35,21 @@ fn test() {
             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.
@@ -130,7 +130,7 @@ pub fn foo() {
             { .. } = 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
@@ -140,7 +140,7 @@ pub fn foo() {
         //~^ 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
              _,
@@ -149,7 +149,7 @@ pub fn foo() {
              //~^ 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;
     }
index 5d716fa625e5d47793dd0a2e878be4296b3a627f..3842f8492956033a6caff4416e73280f5ead0da7 100644 (file)
@@ -46,19 +46,19 @@ error: use of deprecated struct `deprecation_lint::DeprecatedStruct`: text
 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);
@@ -70,19 +70,19 @@ error: use of deprecated struct `deprecation_lint::nested::DeprecatedStruct`: te
 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);
@@ -154,19 +154,19 @@ error: use of deprecated struct `deprecation_lint::Deprecated`: text
 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
index 33d74feead513bf34132804999decdc4b4efd80f..0eab2dc0ee05f891e01f74514c246f58f4e5392b 100644 (file)
@@ -5,8 +5,6 @@ LL | fn foo(x: &'a str) { }
    |       -    ^^ 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
@@ -15,8 +13,6 @@ LL | struct Foo {
    |           - 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
 
diff --git a/src/test/ui/extern/extern-static-size-overflow.rs b/src/test/ui/extern/extern-static-size-overflow.rs
new file mode 100644 (file)
index 0000000..30a0c44
--- /dev/null
@@ -0,0 +1,43 @@
+#[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() {}
diff --git a/src/test/ui/extern/extern-static-size-overflow.stderr b/src/test/ui/extern/extern-static-size-overflow.stderr
new file mode 100644 (file)
index 0000000..f5173fe
--- /dev/null
@@ -0,0 +1,20 @@
+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
+
diff --git a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.rs
deleted file mode 100644 (file)
index 0e5f968..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr
deleted file mode 100644 (file)
index 41fb145..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-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`.
index ce9df46483d136079ec4b81383b739f89b979297..317897ae70f72c9037aa5123a067968d2d423605 100644 (file)
@@ -5,8 +5,6 @@ LL |   fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
    |        -                          ^^ 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
index adbd47ac16f45862e992dee98e491b1f31546a94..bf0ca8715036b130e46c9aa7da8f5d7564e65b1b 100644 (file)
@@ -4,7 +4,6 @@ error[E0261]: use of undeclared lifetime name `'b`
 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> {
@@ -20,7 +19,6 @@ error[E0261]: use of undeclared lifetime name `'undeclared`
 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> {
index 8ed2854ed3057108bac806b838da23fc56e2bb98..abc02b33e0e6a115635876ba33c9a4cc2f998d4d 100644 (file)
@@ -5,8 +5,6 @@ LL | fn f(x: Box<dyn X<Y<'a>=&'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/issue-67510.rs:7:26
@@ -15,8 +13,6 @@ LL | fn f(x: Box<dyn X<Y<'a>=&'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: aborting due to 2 previous errors
 
index adaa474474f674ec66ee2eb4ac7e961a0612021d..9f63a8617babdb0786ed6225182cc068df34ebd1 100644 (file)
@@ -8,9 +8,8 @@
 // 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
index 204c2ff304114de5beefd933118bcf39b26a5a70..79319dfe796a2e51e623d0cda08d7d10e3ca9eee 100644 (file)
@@ -8,13 +8,12 @@
 // 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
index 29243699e44fd11a00e210259009f3654856f41b..e834f96dbbeeb2dc16dc3da1097e8bacdecd3724 100644 (file)
@@ -4,15 +4,14 @@
 // 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
 {
index cf854f67d0456436bcbae328748c2e1283dba6ed..ecec34e0115c67205e8ef18382323cb60151a975 100644 (file)
@@ -1,16 +1,15 @@
 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
 
diff --git a/src/test/ui/in-band-lifetimes/E0687.rs b/src/test/ui/in-band-lifetimes/E0687.rs
deleted file mode 100644 (file)
index 2e262dd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/E0687.stderr b/src/test/ui/in-band-lifetimes/E0687.stderr
deleted file mode 100644 (file)
index 7aea2f2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/E0687_where.rs b/src/test/ui/in-band-lifetimes/E0687_where.rs
deleted file mode 100644 (file)
index 6cf8053..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/E0687_where.stderr b/src/test/ui/in-band-lifetimes/E0687_where.stderr
deleted file mode 100644 (file)
index af0f966..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/E0688.rs b/src/test/ui/in-band-lifetimes/E0688.rs
deleted file mode 100644 (file)
index a4e1f01..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/E0688.stderr b/src/test/ui/in-band-lifetimes/E0688.stderr
deleted file mode 100644 (file)
index afefcd9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/elided-lifetimes.fixed b/src/test/ui/in-band-lifetimes/elided-lifetimes.fixed
deleted file mode 100644 (file)
index 87a79b8..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-// 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!
-}
diff --git a/src/test/ui/in-band-lifetimes/elided-lifetimes.rs b/src/test/ui/in-band-lifetimes/elided-lifetimes.rs
deleted file mode 100644 (file)
index 28323a2..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-// 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!
-}
diff --git a/src/test/ui/in-band-lifetimes/elided-lifetimes.stderr b/src/test/ui/in-band-lifetimes/elided-lifetimes.stderr
deleted file mode 100644 (file)
index 2e65461..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/in-band-lifetimes.rs b/src/test/ui/in-band-lifetimes/in-band-lifetimes.rs
deleted file mode 100644 (file)
index 9b2e1fe..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-// 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() {}
diff --git a/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.rs b/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.rs
deleted file mode 100644 (file)
index cf08cb7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr b/src/test/ui/in-band-lifetimes/issue-61124-anon-lifetime-in-struct-declaration.stderr
deleted file mode 100644 (file)
index 20369a5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/mismatched.nll.stderr b/src/test/ui/in-band-lifetimes/mismatched.nll.stderr
deleted file mode 100644 (file)
index db028e6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/mismatched.rs b/src/test/ui/in-band-lifetimes/mismatched.rs
deleted file mode 100644 (file)
index 11c41ea..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/mismatched.stderr b/src/test/ui/in-band-lifetimes/mismatched.stderr
deleted file mode 100644 (file)
index db72c20..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait.rs b/src/test/ui/in-band-lifetimes/mismatched_trait.rs
deleted file mode 100644 (file)
index 221f4fc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr
deleted file mode 100644 (file)
index ac66daa..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs
deleted file mode 100644 (file)
index 1b524ec..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-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() {}
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr
deleted file mode 100644 (file)
index 0546b6b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-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
-
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.nll.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.nll.stderr
deleted file mode 100644 (file)
index c7a90c5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-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
-
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.rs b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.rs
deleted file mode 100644 (file)
index b9e02e9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr
deleted file mode 100644 (file)
index 84e5339..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/missing-lifetime-in-alias.rs b/src/test/ui/in-band-lifetimes/missing-lifetime-in-alias.rs
deleted file mode 100644 (file)
index 800f033..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/missing-lifetime-in-alias.stderr b/src/test/ui/in-band-lifetimes/missing-lifetime-in-alias.stderr
deleted file mode 100644 (file)
index f1b951f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/mut_while_borrow.rs b/src/test/ui/in-band-lifetimes/mut_while_borrow.rs
deleted file mode 100644 (file)
index 97e8ed0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#![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);
-}
diff --git a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr
deleted file mode 100644 (file)
index f96ff9d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/nested-items.rs b/src/test/ui/in-band-lifetimes/nested-items.rs
deleted file mode 100644 (file)
index 7de2071..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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() { }
diff --git a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.rs b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.rs
deleted file mode 100644 (file)
index 9b0c0cd..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#![allow(warnings)]
-#![feature(in_band_lifetimes)]
-
-struct Foo {
-    x: &'test u32, //~ ERROR undeclared lifetime
-}
-
-enum Bar {
-    Baz(&'test u32), //~ ERROR undeclared lifetime
-}
-
-fn main() {}
diff --git a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr
deleted file mode 100644 (file)
index fe656f7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.rs b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.rs
deleted file mode 100644 (file)
index c1c40af..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr
deleted file mode 100644 (file)
index 5f0de61..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-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`.
diff --git a/src/test/ui/in-band-lifetimes/shadow.rs b/src/test/ui/in-band-lifetimes/shadow.rs
deleted file mode 100644 (file)
index 27b5d57..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/in-band-lifetimes/shadow.stderr b/src/test/ui/in-band-lifetimes/shadow.stderr
deleted file mode 100644 (file)
index c7a6f3a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-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`.
diff --git a/src/test/ui/lifetimes/missing-lifetime-in-alias.rs b/src/test/ui/lifetimes/missing-lifetime-in-alias.rs
new file mode 100644 (file)
index 0000000..af7b641
--- /dev/null
@@ -0,0 +1,33 @@
+#![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() {}
diff --git a/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr b/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr
new file mode 100644 (file)
index 0000000..b16b792
--- /dev/null
@@ -0,0 +1,43 @@
+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`.
diff --git a/src/test/ui/lifetimes/nested.rs b/src/test/ui/lifetimes/nested.rs
new file mode 100644 (file)
index 0000000..f3f1f20
--- /dev/null
@@ -0,0 +1,7 @@
+// check-pass
+
+fn method<'a>(_i: &'a i32) {
+    fn inner<'a>(_j: &'a f32) {}
+}
+
+fn main() {}
diff --git a/src/test/ui/lifetimes/shadow.rs b/src/test/ui/lifetimes/shadow.rs
new file mode 100644 (file)
index 0000000..e212488
--- /dev/null
@@ -0,0 +1,8 @@
+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() {}
diff --git a/src/test/ui/lifetimes/shadow.stderr b/src/test/ui/lifetimes/shadow.stderr
new file mode 100644 (file)
index 0000000..b834e90
--- /dev/null
@@ -0,0 +1,20 @@
+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`.
index a208689523401ad3f5a6947174a518dbc3e86532..cb459f31cd243fd14eb0683812b1c1b2847ee2b2 100644 (file)
@@ -5,8 +5,6 @@ LL | struct Test {
    |            - 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
@@ -15,8 +13,6 @@ LL | struct Test {
    |            - 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
@@ -24,7 +20,6 @@ error[E0261]: use of undeclared lifetime name `'b`
 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 {
index 5bdddf714186c2140aebdc5525e3c702ecef4046..2f600971da113acd640856ae8b87374acd0833b9 100644 (file)
@@ -115,18 +115,18 @@ fn 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);
 
index 4b082fcd35951147a71aa9e01b9bb94c9590fd8a..9f1e7b281e982a76e3dead827d7f574a4cdfc276 100644 (file)
@@ -88,37 +88,37 @@ warning: use of deprecated struct `lint_stability::DeprecatedUnstableStruct`: te
 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);
index 2024cf15ab0a1339cca9b0f0974a19ff90aacfa8..a44eb1ce10a22aea4734f6dfe69f687a1c7e42bf 100644 (file)
@@ -129,7 +129,7 @@ pub fn foo() {
             { .. } = 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
@@ -139,7 +139,7 @@ pub fn foo() {
         //~^ ERROR use of deprecated field
 
         let Deprecated2
-        //~^ ERROR use of deprecated struct
+        //~^ ERROR use of deprecated tuple struct
             (_,
              //~^ ERROR use of deprecated field
              _,
@@ -148,7 +148,7 @@ pub fn foo() {
              //~^ 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;
     }
index 151b3e59b9130115e89cf23e00629a73aa8dee8a..2d83260206f81084fe8e486a7b7ccd8069009dc1 100644 (file)
@@ -22,19 +22,19 @@ error: use of deprecated struct `cross_crate::lint_stability_fields::Deprecated`
 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
index c42223b51985100370808d49dc1279711842fcf3..45a5317fccc6e7c508a901736ebc049da5e531fb 100644 (file)
@@ -32,7 +32,7 @@ error: unused array of boxed `T` trait objects in tuple element 1 that must be u
   --> $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
index 11555d80825a4971b68dd366ad58997a2d89599f..a42eb8841789dfb0f0071a4e1d2d65b833b877a1 100644 (file)
@@ -26,13 +26,13 @@ error: unused boxed `Critical` trait object in tuple element 1 that must be used
   --> $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
 
index 0532d89e039eb9d9d731cc7e1c8586a3d6bfbfbf..e5709a5f0af5a1e04e0acf3bdf37f88fcb3ac36c 100644 (file)
@@ -31,15 +31,15 @@ error: unused `Result` in tuple element 0 that must be used
   --> $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
 
index 93c0384fcc2663fa8ff82c4170ba356e85814022..c9f235c4f7df7509b14b4aa93e065ec2670e2dc6 100644 (file)
@@ -5,8 +5,6 @@ LL | fn main() {
    |        - 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
 
index e8b7b3333eb6b73b6e126c4e9881cd5821abdb5a..0f6d6cd4fa1805eecc3ff16f9f4aa1556ca56136 100644 (file)
@@ -1,5 +1,5 @@
 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`
index db9ddfff285b3c23776dcceba9fb5a5652ee4b45..d3e201b8ae8e7ab09ee45b0ad1fd9729667cebd6 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(in_band_lifetimes)]
-
 struct Foo<'a, 'b> {
     x: &'a u32,
     y: &'b u32,
index 3f8481219a9adce9b2a447da9606463695625a19..67bac14b6e4e1dd380dea53eb65f9b48e35096cb 100644 (file)
@@ -1,16 +1,16 @@
 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<'_>) {
    |                               ^^^^^^^
index 101959d6da0e0ae36daffadaecd581aac2af43db..36709eea17c2144795de5995d944bf091a490b9f 100644 (file)
@@ -37,4 +37,31 @@ fn qux() -> u32 {
     //~^ 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() {}
index 45c4f977502d24fc0414b854c5fb843792cf331c..92bb972b24020e3cc29ce21ef0d4e79d98bafffd 100644 (file)
@@ -37,4 +37,31 @@ fn qux() -> u32 {
     //~^ 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() {}
index cae775099e0a03ced8306d34efbe54a3df257290..df0e4dcb16e2cbc57abb68659db7b9e804e1a6ac 100644 (file)
@@ -44,6 +44,25 @@ LL |         _ => 1,
 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
    |
@@ -121,7 +140,68 @@ help: parentheses are required to parse this as an expression
 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`.
index d56c1fbd119c8cf2ca95e65798734054e9947dde..66537653291c7ce98a2e2869c46ea832ea63e9cd 100644 (file)
@@ -5,8 +5,6 @@ LL | enum No0 {
    |         - 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
@@ -15,8 +13,6 @@ LL | enum No1 {
    |         - 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
 
index 2750149d09735abd2d725686e7bbe49e575837a7..5dfdc2ee93b43120cad1131bb15f8af52b683849 100644 (file)
@@ -5,8 +5,6 @@ LL | struct StructDecl {
    |                  - 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
@@ -16,8 +14,6 @@ LL | struct StructDecl {
 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
 
index 250752c9b9e685b5fcdbbcd733151a63ced4c493..4399263f716edca6daa667f35237d58778e1af44 100644 (file)
@@ -5,8 +5,6 @@ LL |     enum E {
    |           - 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
@@ -15,8 +13,6 @@ LL |     struct S {
    |             - 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
@@ -24,7 +20,6 @@ error[E0261]: use of undeclared lifetime name `'b`
 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> {
@@ -40,7 +35,6 @@ error[E0261]: use of undeclared lifetime name `'b`
 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> {
@@ -56,7 +50,6 @@ error[E0261]: use of undeclared lifetime name `'b`
 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> {
@@ -73,8 +66,6 @@ LL |     type X = Option<&'a isize>;
    |           -          ^^ 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
@@ -83,8 +74,6 @@ LL |     fn f(a: &'a isize) { }
    |         -    ^^ 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
@@ -93,8 +82,6 @@ LL | fn fn_types(a: &'a isize,
    |            -    ^^ 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
@@ -103,7 +90,6 @@ LL | ...                   &'b 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,
@@ -120,7 +106,6 @@ LL | ...                   &'b 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,
@@ -138,8 +123,6 @@ LL | fn fn_types(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
@@ -147,7 +130,6 @@ error[E0261]: use of undeclared lifetime name `'a`
 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 {
index f3cae184ccde813e4d05b5a91d06b988518e5157..6bfde5524ac4961a2861d57a2af59f4bc35cab05 100644 (file)
@@ -11,8 +11,6 @@ LL | enum EnumDecl {
    |              - 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
@@ -22,8 +20,6 @@ LL | enum EnumDecl {
 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
@@ -32,8 +28,6 @@ LL | fn fnDecl(x: &'a isize,
    |          -    ^^ 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
@@ -42,8 +36,6 @@ LL | fn fnDecl(x: &'a isize,
    |          - 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
 
diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.fixed b/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.fixed
deleted file mode 100644 (file)
index 6bc07af..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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() { }
diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.rs b/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.rs
deleted file mode 100644 (file)
index 22c6a5a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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() { }
diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr b/src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr
deleted file mode 100644 (file)
index b251e8a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-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
-
index c5132861f855c07463965259b8e8eb7739cd9acd..300cc34d63df205e8a0c056dc90ddfbc03a9200e 100644 (file)
@@ -217,25 +217,25 @@ fn main() {
 
     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
index 2a9d34a15c4924cba69ddc9c8e616f69d06721eb..e094a10c8e7b474ceaa7de3a8a042df2eb0514a9 100644 (file)
@@ -144,7 +144,7 @@ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test
 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);
@@ -168,7 +168,7 @@ warning: use of deprecated enum `unstable_generic_param::Enum4`: test
 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);
@@ -180,7 +180,7 @@ warning: use of deprecated enum `unstable_generic_param::Enum4`: test
 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);
@@ -204,7 +204,7 @@ warning: use of deprecated enum `unstable_generic_param::Enum5`: test
 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);
diff --git a/src/test/ui/tuple/wrong_argument_ice.rs b/src/test/ui/tuple/wrong_argument_ice.rs
new file mode 100644 (file)
index 0000000..da967d8
--- /dev/null
@@ -0,0 +1,17 @@
+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() {}
diff --git a/src/test/ui/tuple/wrong_argument_ice.stderr b/src/test/ui/tuple/wrong_argument_ice.stderr
new file mode 100644 (file)
index 0000000..e96a957
--- /dev/null
@@ -0,0 +1,19 @@
+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`.
index a704fea28289969d976c8e45bf0bf0e4a357ba6c..6c52664154bbf333667287e087c21af0396527b6 100644 (file)
@@ -6,8 +6,6 @@ LL | fn f() where
 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
@@ -17,8 +15,6 @@ LL | fn f() where
 ...
 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
 
index 5c45012ef0686c12bc2e9b5bdbb38bab033b7184..85256ff0e995fa247c5ab0622371fce176a366c2 100644 (file)
@@ -18,7 +18,7 @@
 // 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`.)
index 887d27fd6dca41d04c8d3c7b4b7500178f0362e5..1bdea33dffaf9ebb0bb9a06a5e14b19840d0c751 100644 (file)
@@ -806,6 +806,8 @@ pub fn make_test_description<R: Read>(
     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();
@@ -877,12 +879,12 @@ pub fn make_test_description<R: Read>(
     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,
     }
 }
 
index e1865c8afc2f0c753c73297989f94e8ced5efd1f..4f333cd27cefe5c9a70d1a7e883819f126dcf8de 100644 (file)
@@ -1533,7 +1533,7 @@ fn rewrite_struct_lit<'a>(
     enum StructLitField<'a> {
         Regular(&'a ast::ExprField),
         Base(&'a ast::Expr),
-        Rest(&'a Span),
+        Rest(Span),
     }
 
     // 2 = " {".len()
@@ -1568,7 +1568,7 @@ enum StructLitField<'a> {
         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(),