os: ubuntu-20.04-xl
- name: dist-x86_64-apple
env:
- SCRIPT: "./x.py dist --exclude rust-docs --exclude extended && ./x.py dist --target=x86_64-apple-darwin rust-docs && ./x.py dist extended"
- RUST_CONFIGURE_ARGS: "--host=x86_64-apple-darwin --target=x86_64-apple-darwin,aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
+ SCRIPT: "./x.py dist --host=x86_64-apple-darwin --target=x86_64-apple-darwin"
+ RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
MACOSX_DEPLOYMENT_TARGET: 10.7
NO_LLVM_ASSERTIONS: 1
NO_OVERFLOW_CHECKS: 1
DIST_REQUIRE_ALL_TOOLS: 1
os: macos-latest
+ - name: dist-apple-various
+ env:
+ SCRIPT: "./x.py dist --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim"
+ RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
+ RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
+ MACOSX_DEPLOYMENT_TARGET: 10.7
+ NO_LLVM_ASSERTIONS: 1
+ NO_DEBUG_ASSERTIONS: 1
+ NO_OVERFLOW_CHECKS: 1
+ os: macos-latest
- name: dist-x86_64-apple-alt
env:
SCRIPT: "./x.py dist"
[[package]]
name = "ammonia"
-version = "3.1.0"
+version = "3.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89eac85170f4b3fb3dc5e442c1cfb036cb8eecf9dbbd431a161ffad15d90ea3b"
+checksum = "b74b175af97d1aecc1add0878b1cbfcbf3bd4c22d7713eeb6d597da23e29bc0d"
dependencies = [
"html5ever",
"lazy_static",
dependencies = [
"cfg-if 0.1.10",
"libc",
- "wasi",
+ "wasi 0.9.0+wasi-snapshot-preview1",
]
[[package]]
dependencies = [
"cfg-if 0.1.10",
"libc",
- "wasi",
+ "wasi 0.9.0+wasi-snapshot-preview1",
]
[[package]]
[[package]]
name = "libc"
-version = "0.2.108"
+version = "0.2.116"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119"
+checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
dependencies = [
"rustc-std-workspace-core",
]
[[package]]
name = "pin-project-lite"
-version = "0.2.4"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827"
+checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
[[package]]
name = "pin-utils"
"rustc_codegen_ssa",
"rustc_driver",
"tikv-jemalloc-sys",
- "tikv-jemallocator",
]
[[package]]
"rustc-demangle",
"std_detect",
"unwind",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
]
[[package]]
[[package]]
name = "thread_local"
-version = "1.0.1"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
+checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
dependencies = [
- "lazy_static",
+ "once_cell",
]
[[package]]
"libc",
]
-[[package]]
-name = "tikv-jemallocator"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c14a5a604eb8715bc5785018a37d00739b180bcf609916ddf4393d33d49ccdf"
-dependencies = [
- "libc",
- "tikv-jemalloc-sys",
-]
-
[[package]]
name = "time"
version = "0.1.43"
[[package]]
name = "tokio"
-version = "1.8.2"
+version = "1.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2602b8af3767c285202012822834005f596c811042315fa7e9f5b12b2a43207"
+checksum = "50dae83881bc9b0403dd5b44ea9deed3e939856cc8722d5be37f0d6e5c6d53dd"
dependencies = [
"autocfg",
"bytes",
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
optional = true
features = ['unprefixed_malloc_on_supported_platforms']
-[dependencies.tikv-jemallocator]
-version = '0.4.0'
-optional = true
-
[features]
-jemalloc = ['tikv-jemalloc-sys', 'tikv-jemallocator']
+jemalloc = ['tikv-jemalloc-sys']
llvm = ['rustc_driver/llvm']
max_level_info = ['rustc_driver/max_level_info']
) -> T {
let old_len = self.in_scope_lifetimes.len();
- let parent_generics =
- match self.owners[parent_hir_id].as_ref().unwrap().node().expect_item().kind {
- hir::ItemKind::Impl(hir::Impl { ref generics, .. })
- | hir::ItemKind::Trait(_, _, ref generics, ..) => generics.params,
- _ => &[],
- };
+ let parent_generics = match self.owners[parent_hir_id].unwrap().node().expect_item().kind {
+ hir::ItemKind::Impl(hir::Impl { ref generics, .. })
+ | hir::ItemKind::Trait(_, _, ref generics, ..) => generics.params,
+ _ => &[],
+ };
let lt_def_names = parent_generics.iter().filter_map(|param| match param.kind {
hir::GenericParamKind::Lifetime { .. } => Some(param.name.normalize_to_macros_2_0()),
_ => None,
.node_id_to_hir_id
.insert(new_node_id, hir::HirId::make_owner(new_id));
debug_assert!(_old.is_none());
+ self.owners.ensure_contains_elem(new_id, || hir::MaybeOwner::Phantom);
+ let _old = std::mem::replace(
+ &mut self.owners[new_id],
+ hir::MaybeOwner::NonOwner(hir::HirId::make_owner(new_id)),
+ );
+ debug_assert!(matches!(_old, hir::MaybeOwner::Phantom));
continue;
};
let ident = *ident;
arena: &'hir Arena<'hir>,
/// The items being lowered are collected here.
- owners: IndexVec<LocalDefId, Option<hir::OwnerInfo<'hir>>>,
+ owners: IndexVec<LocalDefId, hir::MaybeOwner<&'hir hir::OwnerInfo<'hir>>>,
/// Bodies inside the owner being lowered.
bodies: Vec<(hir::ItemLocalId, &'hir hir::Body<'hir>)>,
/// Attributes inside the owner being lowered.
) -> &'hir hir::Crate<'hir> {
let _prof_timer = sess.prof.verbose_generic_activity("hir_lowering");
- let owners = IndexVec::from_fn_n(|_| None, resolver.definitions().def_index_count());
+ let owners =
+ IndexVec::from_fn_n(|_| hir::MaybeOwner::Phantom, resolver.definitions().def_index_count());
LoweringContext {
sess,
resolver,
let hir_hash = self.compute_hir_hash();
- let mut def_id_to_hir_id = IndexVec::default();
-
- for (node_id, hir_id) in self.node_id_to_hir_id.into_iter_enumerated() {
- if let Some(def_id) = self.resolver.opt_local_def_id(node_id) {
- if def_id_to_hir_id.len() <= def_id.index() {
- def_id_to_hir_id.resize(def_id.index() + 1, None);
- }
- def_id_to_hir_id[def_id] = hir_id;
- }
- }
-
- self.resolver.definitions().init_def_id_to_hir_id_mapping(def_id_to_hir_id);
-
let krate = hir::Crate { owners: self.owners, hir_hash };
self.arena.alloc(krate)
}
.owners
.iter_enumerated()
.filter_map(|(def_id, info)| {
- let info = info.as_ref()?;
+ let info = info.as_owner()?;
let def_path_hash = definitions.def_path_hash(def_id);
Some((def_path_hash, info))
})
self.current_hir_id_owner = current_owner;
self.item_local_id_counter = current_local_counter;
- let _old = self.owners.insert(def_id, info);
- debug_assert!(_old.is_none());
+ self.owners.ensure_contains_elem(def_id, || hir::MaybeOwner::Phantom);
+ self.owners[def_id] = hir::MaybeOwner::Owner(self.arena.alloc(info));
def_id
}
None
} else {
let def_id = self.resolver.opt_local_def_id(node_id)?;
+ self.owners.ensure_contains_elem(def_id, || hir::MaybeOwner::Phantom);
+ if let o @ hir::MaybeOwner::Phantom = &mut self.owners[def_id] {
+ // Do not override a `MaybeOwner::Owner` that may already here.
+ *o = hir::MaybeOwner::NonOwner(hir_id);
+ }
Some((hir_id.local_id, def_id))
}
})
Inconsistent,
}
+#[derive(Clone, Copy)]
+enum IndentStyle {
+ /// Vertically aligned under whatever column this block begins at.
+ ///
+ /// fn demo(arg1: usize,
+ /// arg2: usize);
+ Visual,
+ /// Indented relative to the indentation level of the previous line.
+ ///
+ /// fn demo(
+ /// arg1: usize,
+ /// arg2: usize,
+ /// );
+ Block { offset: isize },
+}
+
#[derive(Clone, Copy)]
pub struct BreakToken {
offset: isize,
#[derive(Clone, Copy)]
pub struct BeginToken {
- offset: isize,
+ indent: IndentStyle,
breaks: Breaks,
}
#[derive(Copy, Clone)]
enum PrintFrame {
Fits,
- Broken { offset: isize, breaks: Breaks },
+ Broken { indent: usize, breaks: Breaks },
}
const SIZE_INFINITY: isize = 0xffff;
scan_stack: VecDeque<usize>,
/// Stack of blocks-in-progress being flushed by print
print_stack: Vec<PrintFrame>,
+ /// Level of indentation of current line
+ indent: usize,
/// Buffered indentation to avoid writing trailing whitespace
pending_indentation: isize,
/// The token most recently popped from the left boundary of the
right_total: 0,
scan_stack: VecDeque::new(),
print_stack: Vec::new(),
+ indent: 0,
pending_indentation: 0,
last_printed: None,
}
*self
.print_stack
.last()
- .unwrap_or(&PrintFrame::Broken { offset: 0, breaks: Breaks::Inconsistent })
+ .unwrap_or(&PrintFrame::Broken { indent: 0, breaks: Breaks::Inconsistent })
}
fn print_begin(&mut self, token: BeginToken, size: isize) {
if size > self.space {
- let col = self.margin - self.space + token.offset;
- self.print_stack.push(PrintFrame::Broken { offset: col, breaks: token.breaks });
+ self.print_stack.push(PrintFrame::Broken { indent: self.indent, breaks: token.breaks });
+ self.indent = match token.indent {
+ IndentStyle::Block { offset } => (self.indent as isize + offset) as usize,
+ IndentStyle::Visual => (self.margin - self.space) as usize,
+ };
} else {
self.print_stack.push(PrintFrame::Fits);
}
}
fn print_end(&mut self) {
- self.print_stack.pop().unwrap();
+ if let PrintFrame::Broken { indent, .. } = self.print_stack.pop().unwrap() {
+ self.indent = indent;
+ }
}
fn print_break(&mut self, token: BreakToken, size: isize) {
- let break_offset =
- match self.get_top() {
- PrintFrame::Fits => None,
- PrintFrame::Broken { offset, breaks: Breaks::Consistent } => Some(offset),
- PrintFrame::Broken { offset, breaks: Breaks::Inconsistent } => {
- if size > self.space { Some(offset) } else { None }
- }
- };
- if let Some(offset) = break_offset {
- self.out.push('\n');
- self.pending_indentation = offset + token.offset;
- self.space = self.margin - (offset + token.offset);
- } else {
+ let fits = match self.get_top() {
+ PrintFrame::Fits => true,
+ PrintFrame::Broken { breaks: Breaks::Consistent, .. } => false,
+ PrintFrame::Broken { breaks: Breaks::Inconsistent, .. } => size <= self.space,
+ };
+ if fits {
self.pending_indentation += token.blank_space;
self.space -= token.blank_space;
+ } else {
+ self.out.push('\n');
+ let indent = self.indent as isize + token.offset;
+ self.pending_indentation = indent;
+ self.space = self.margin - indent;
}
}
/// "raw box"
pub fn rbox(&mut self, indent: usize, breaks: Breaks) {
- self.scan_begin(BeginToken { offset: indent as isize, breaks })
+ self.scan_begin(BeginToken {
+ indent: IndentStyle::Block { offset: indent as isize },
+ breaks,
+ })
}
/// Inconsistent breaking box
self.rbox(indent, Breaks::Consistent)
}
+ pub fn visual_align(&mut self) {
+ self.scan_begin(BeginToken { indent: IndentStyle::Visual, breaks: Breaks::Consistent });
+ }
+
pub fn break_offset(&mut self, n: usize, off: isize) {
self.scan_break(BreakToken { offset: off, blank_space: n as isize })
}
self.break_offset(n, 0)
}
- crate fn zerobreak(&mut self) {
+ pub fn zerobreak(&mut self) {
self.spaces(0)
}
self.word(cmnt.lines[0].clone());
self.hardbreak()
} else {
- self.ibox(0);
+ self.visual_align();
for line in &cmnt.lines {
if !line.is_empty() {
self.word(line.clone());
// Outer-box is consistent.
self.cbox(INDENT_UNIT);
// Head-box is inconsistent.
- self.ibox(w.len() + 1);
+ self.ibox(0);
// Keyword that starts the head.
if !w.is_empty() {
self.word_nbsp(w);
self.print_ident(label.ident);
self.word_space(":");
}
- self.head("while");
+ self.cbox(0);
+ self.ibox(0);
+ self.word_nbsp("while");
self.print_expr_as_cond(test);
self.space();
self.print_block_with_attrs(blk, attrs);
self.print_ident(label.ident);
self.word_space(":");
}
- self.head("for");
+ self.cbox(0);
+ self.ibox(0);
+ self.word_nbsp("for");
self.print_pat(pat);
self.space();
self.word_space("in");
self.print_ident(label.ident);
self.word_space(":");
}
- self.head("loop");
+ self.cbox(0);
+ self.ibox(0);
+ self.word_nbsp("loop");
self.print_block_with_attrs(blk, attrs);
}
ast::ExprKind::Match(ref expr, ref arms) => {
- self.cbox(INDENT_UNIT);
- self.ibox(INDENT_UNIT);
+ self.cbox(0);
+ self.ibox(0);
self.word_nbsp("match");
self.print_expr_as_cond(expr);
self.space();
self.word_space(":");
}
// containing cbox, will be closed by print-block at }
- self.cbox(INDENT_UNIT);
+ self.cbox(0);
// head-box, will be closed by print-block after {
self.ibox(0);
self.print_block_with_attrs(blk, attrs);
self.word_nbsp("async");
self.print_capture_clause(capture_clause);
// cbox/ibox in analogy to the `ExprKind::Block` arm above
- self.cbox(INDENT_UNIT);
+ self.cbox(0);
self.ibox(0);
self.print_block_with_attrs(blk, attrs);
}
self.word("?")
}
ast::ExprKind::TryBlock(ref blk) => {
- self.head("try");
+ self.cbox(0);
+ self.ibox(0);
+ self.word_nbsp("try");
self.print_block_with_attrs(blk, attrs)
}
ast::ExprKind::Err => {
use crate::pp::Breaks::Inconsistent;
-use crate::pprust::state::{AnnNode, PrintState, State, INDENT_UNIT};
+use crate::pprust::state::{AnnNode, PrintState, State};
use rustc_ast as ast;
use rustc_ast::GenericBound;
self.space_if_not_bol();
self.maybe_print_comment(v.span.lo());
self.print_outer_attributes(&v.attrs);
- self.ibox(INDENT_UNIT);
+ self.ibox(0);
self.print_variant(v);
self.word(",");
self.end();
use rustc_ast as ast;
use rustc_ast::ptr::P;
use rustc_ast::tokenstream::TokenStream;
+use rustc_ast::visit::{self, Visitor};
use rustc_ast::{token, BlockCheckMode, UnsafeSource};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::{pluralize, Applicability, DiagnosticBuilder};
// the order provided to fmt::Arguments. When arguments are repeated, we
// want the expression evaluated only once.
//
- // Thus in the not nicely ordered case we emit the following instead:
+ // Further, if any arg _after the first one_ contains a yield point such
+ // as `await` or `yield`, the above short form is inconvenient for the
+ // caller because it would keep a temporary of type ArgumentV1 alive
+ // across the yield point. ArgumentV1 can't implement Send since it
+ // holds a type-erased arbitrary type.
+ //
+ // Thus in the not nicely ordered case, and in the yielding case, we
+ // emit the following instead:
//
// match (&$arg0, &$arg1, …) {
- // _args => [ArgumentV1::new(_args.$i, …), ArgumentV1::new(_args.$j, …), …]
+ // args => [ArgumentV1::new(args.$i, …), ArgumentV1::new(args.$j, …), …]
// }
//
// for the sequence of indices $i, $j, … governed by fmt_arg_index_and_ty.
+ // This more verbose representation ensures that all arguments are
+ // evaluated a single time each, in the order written by the programmer,
+ // and that the surrounding future/generator (if any) is Send whenever
+ // possible.
+ let no_need_for_match =
+ nicely_ordered && !original_args.iter().skip(1).any(|e| may_contain_yield_point(e));
+
for (arg_index, arg_ty) in fmt_arg_index_and_ty {
let e = &mut original_args[arg_index];
let span = e.span;
- let arg = if nicely_ordered {
+ let arg = if no_need_for_match {
let expansion_span = e.span.with_ctxt(self.macsp.ctxt());
// The indices are strictly ordered so e has not been taken yet.
self.ecx.expr_addr_of(expansion_span, P(e.take()))
} else {
let def_site = self.ecx.with_def_site_ctxt(span);
- let args_tuple = self.ecx.expr_ident(def_site, Ident::new(sym::_args, def_site));
+ let args_tuple = self.ecx.expr_ident(def_site, Ident::new(sym::args, def_site));
let member = Ident::new(sym::integer(arg_index), def_site);
self.ecx.expr(def_site, ast::ExprKind::Field(args_tuple, member))
};
let args_array = self.ecx.expr_vec(self.macsp, fmt_args);
let args_slice = self.ecx.expr_addr_of(
self.macsp,
- if nicely_ordered {
+ if no_need_for_match {
args_array
} else {
- // In the !nicely_ordered case, none of the exprs were moved
+ // In the !no_need_for_match case, none of the exprs were moved
// away in the previous loop.
//
// This uses the arg span for `&arg` so that borrowck errors
.map(|e| self.ecx.expr_addr_of(e.span.with_ctxt(self.macsp.ctxt()), e))
.collect();
- let pat = self.ecx.pat_ident(self.macsp, Ident::new(sym::_args, self.macsp));
+ let pat = self.ecx.pat_ident(self.macsp, Ident::new(sym::args, self.macsp));
let arm = self.ecx.arm(self.macsp, pat, args_array);
let head = self.ecx.expr(self.macsp, ast::ExprKind::Tup(heads));
self.ecx.expr_match(self.macsp, head, vec![arm])
return ecx.expr_call_global(macsp, path, vec![arg]);
}
};
+ let new_fn_name = match trait_ {
+ "Display" => "new_display",
+ "Debug" => "new_debug",
+ "LowerExp" => "new_lower_exp",
+ "UpperExp" => "new_upper_exp",
+ "Octal" => "new_octal",
+ "Pointer" => "new_pointer",
+ "Binary" => "new_binary",
+ "LowerHex" => "new_lower_hex",
+ "UpperHex" => "new_upper_hex",
+ _ => unreachable!(),
+ };
- let path = ecx.std_path(&[sym::fmt, Symbol::intern(trait_), sym::fmt]);
- let format_fn = ecx.path_global(sp, path);
- let path = ecx.std_path(&[sym::fmt, sym::ArgumentV1, sym::new]);
- ecx.expr_call_global(macsp, path, vec![arg, ecx.expr_path(format_fn)])
+ let path = ecx.std_path(&[sym::fmt, sym::ArgumentV1, Symbol::intern(new_fn_name)]);
+ ecx.expr_call_global(sp, path, vec![arg])
}
}
cx.into_expr()
}
+
+fn may_contain_yield_point(e: &ast::Expr) -> bool {
+ struct MayContainYieldPoint(bool);
+
+ impl Visitor<'_> for MayContainYieldPoint {
+ fn visit_expr(&mut self, e: &ast::Expr) {
+ if let ast::ExprKind::Await(_) | ast::ExprKind::Yield(_) = e.kind {
+ self.0 = true;
+ } else {
+ visit::walk_expr(self, e);
+ }
+ }
+
+ fn visit_mac_call(&mut self, _: &ast::MacCall) {
+ self.0 = true;
+ }
+
+ fn visit_attribute(&mut self, _: &ast::Attribute) {
+ // Conservatively assume this may be a proc macro attribute in
+ // expression position.
+ self.0 = true;
+ }
+
+ fn visit_item(&mut self, _: &ast::Item) {
+ // Do not recurse into nested items.
+ }
+ }
+
+ let mut visitor = MayContainYieldPoint(false);
+ visitor.visit_expr(e);
+ visitor.0
+}
aggregate_value
}
- fn landing_pad(&mut self, _ty: Type<'gcc>, _pers_fn: RValue<'gcc>, _num_clauses: usize) -> RValue<'gcc> {
+ fn set_personality_fn(&mut self, _personality: RValue<'gcc>) {
+ // TODO(antoyo)
+ }
+
+ fn cleanup_landing_pad(&mut self, _ty: Type<'gcc>, _pers_fn: RValue<'gcc>) -> RValue<'gcc> {
let field1 = self.context.new_field(None, self.u8_type, "landing_pad_field_1");
let field2 = self.context.new_field(None, self.i32_type, "landing_pad_field_1");
let struct_type = self.context.new_struct_type(None, "landing_pad", &[field1, field2]);
// rustc_codegen_ssa now calls the unwinding builder methods even on panic=abort.
}
- fn set_cleanup(&mut self, _landing_pad: RValue<'gcc>) {
- // TODO(antoyo)
- }
-
- fn resume(&mut self, _exn: RValue<'gcc>) -> RValue<'gcc> {
+ fn resume(&mut self, _exn: RValue<'gcc>) {
unimplemented!();
}
unimplemented!();
}
- fn cleanup_ret(&mut self, _funclet: &Funclet, _unwind: Option<Block<'gcc>>) -> RValue<'gcc> {
+ fn cleanup_ret(&mut self, _funclet: &Funclet, _unwind: Option<Block<'gcc>>) {
unimplemented!();
}
unimplemented!();
}
- fn catch_switch(&mut self, _parent: Option<RValue<'gcc>>, _unwind: Option<Block<'gcc>>, _num_handlers: usize) -> RValue<'gcc> {
+ fn catch_switch(
+ &mut self,
+ _parent: Option<RValue<'gcc>>,
+ _unwind: Option<Block<'gcc>>,
+ _handlers: &[Block<'gcc>],
+ ) -> RValue<'gcc> {
unimplemented!();
}
- fn add_handler(&mut self, _catch_switch: RValue<'gcc>, _handler: Block<'gcc>) {
- unimplemented!();
- }
-
- fn set_personality_fn(&mut self, _personality: RValue<'gcc>) {
- // TODO(antoyo)
- }
-
// Atomic Operations
fn atomic_cmpxchg(&mut self, dst: RValue<'gcc>, cmp: RValue<'gcc>, src: RValue<'gcc>, order: AtomicOrdering, failure_order: AtomicOrdering, weak: bool) -> RValue<'gcc> {
let expected = self.current_func().new_local(None, cmp.get_type(), "expected");
unsafe { llvm::LLVMBuildInsertValue(self.llbuilder, agg_val, elt, idx as c_uint, UNNAMED) }
}
- fn landing_pad(
- &mut self,
- ty: &'ll Type,
- pers_fn: &'ll Value,
- num_clauses: usize,
- ) -> &'ll Value {
- // Use LLVMSetPersonalityFn to set the personality. It supports arbitrary Consts while,
- // LLVMBuildLandingPad requires the argument to be a Function (as of LLVM 12). The
- // personality lives on the parent function anyway.
- self.set_personality_fn(pers_fn);
+ fn set_personality_fn(&mut self, personality: &'ll Value) {
unsafe {
- llvm::LLVMBuildLandingPad(self.llbuilder, ty, None, num_clauses as c_uint, UNNAMED)
+ llvm::LLVMSetPersonalityFn(self.llfn(), personality);
}
}
- fn set_cleanup(&mut self, landing_pad: &'ll Value) {
+ fn cleanup_landing_pad(&mut self, ty: &'ll Type, pers_fn: &'ll Value) -> &'ll Value {
+ let landing_pad = self.landing_pad(ty, pers_fn, 1 /* FIXME should this be 0? */);
unsafe {
llvm::LLVMSetCleanup(landing_pad, llvm::True);
}
+ landing_pad
}
- fn resume(&mut self, exn: &'ll Value) -> &'ll Value {
- unsafe { llvm::LLVMBuildResume(self.llbuilder, exn) }
+ fn resume(&mut self, exn: &'ll Value) {
+ unsafe {
+ llvm::LLVMBuildResume(self.llbuilder, exn);
+ }
}
fn cleanup_pad(&mut self, parent: Option<&'ll Value>, args: &[&'ll Value]) -> Funclet<'ll> {
Funclet::new(ret.expect("LLVM does not have support for cleanuppad"))
}
- fn cleanup_ret(
- &mut self,
- funclet: &Funclet<'ll>,
- unwind: Option<&'ll BasicBlock>,
- ) -> &'ll Value {
- let ret =
- unsafe { llvm::LLVMRustBuildCleanupRet(self.llbuilder, funclet.cleanuppad(), unwind) };
- ret.expect("LLVM does not have support for cleanupret")
+ fn cleanup_ret(&mut self, funclet: &Funclet<'ll>, unwind: Option<&'ll BasicBlock>) {
+ unsafe {
+ llvm::LLVMRustBuildCleanupRet(self.llbuilder, funclet.cleanuppad(), unwind)
+ .expect("LLVM does not have support for cleanupret");
+ }
}
fn catch_pad(&mut self, parent: &'ll Value, args: &[&'ll Value]) -> Funclet<'ll> {
&mut self,
parent: Option<&'ll Value>,
unwind: Option<&'ll BasicBlock>,
- num_handlers: usize,
+ handlers: &[&'ll BasicBlock],
) -> &'ll Value {
let name = cstr!("catchswitch");
let ret = unsafe {
self.llbuilder,
parent,
unwind,
- num_handlers as c_uint,
+ handlers.len() as c_uint,
name.as_ptr(),
)
};
- ret.expect("LLVM does not have support for catchswitch")
- }
-
- fn add_handler(&mut self, catch_switch: &'ll Value, handler: &'ll BasicBlock) {
- unsafe {
- llvm::LLVMRustAddHandler(catch_switch, handler);
- }
- }
-
- fn set_personality_fn(&mut self, personality: &'ll Value) {
- unsafe {
- llvm::LLVMSetPersonalityFn(self.llfn(), personality);
+ let ret = ret.expect("LLVM does not have support for catchswitch");
+ for handler in handlers {
+ unsafe {
+ llvm::LLVMRustAddHandler(ret, handler);
+ }
}
+ ret
}
// Atomic Operations
None
}
}
+
+ pub(crate) fn landing_pad(
+ &mut self,
+ ty: &'ll Type,
+ pers_fn: &'ll Value,
+ num_clauses: usize,
+ ) -> &'ll Value {
+ // Use LLVMSetPersonalityFn to set the personality. It supports arbitrary Consts while,
+ // LLVMBuildLandingPad requires the argument to be a Function (as of LLVM 12). The
+ // personality lives on the parent function anyway.
+ self.set_personality_fn(pers_fn);
+ unsafe {
+ llvm::LLVMBuildLandingPad(self.llbuilder, ty, None, num_clauses as c_uint, UNNAMED)
+ }
+ }
}
normal.ret(bx.const_i32(0));
- let cs = catchswitch.catch_switch(None, None, 2);
- catchswitch.add_handler(cs, catchpad_rust.llbb());
- catchswitch.add_handler(cs, catchpad_foreign.llbb());
+ let cs =
+ catchswitch.catch_switch(None, None, &[catchpad_rust.llbb(), catchpad_foreign.llbb()]);
// We can't use the TypeDescriptor defined in libpanic_unwind because it
// might be in another DLL and the SEH encoding only supports specifying
but `link.exe` was not found",
);
sess.note_without_error(
- "please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 \
+ "please ensure that VS 2013, VS 2015, VS 2017, VS 2019 or VS 2022 \
was installed with the Visual C++ option",
);
}
let mut cp_bx = self.new_block(&format!("cp_funclet{:?}", bb));
ret_llbb = cs_bx.llbb();
- let cs = cs_bx.catch_switch(None, None, 1);
- cs_bx.add_handler(cs, cp_bx.llbb());
+ let cs = cs_bx.catch_switch(None, None, &[cp_bx.llbb()]);
// The "null" here is actually a RTTI type descriptor for the
// C++ personality function, but `catch (...)` has no type so
let llpersonality = self.cx.eh_personality();
let llretty = self.landing_pad_type();
- let lp = bx.landing_pad(llretty, llpersonality, 1);
- bx.set_cleanup(lp);
+ let lp = bx.cleanup_landing_pad(llretty, llpersonality);
let slot = self.get_personality_slot(&mut bx);
slot.storage_live(&mut bx);
}
}
+ sym::const_allocate => {
+ // returns a null pointer at runtime.
+ bx.const_null(bx.type_i8p())
+ }
+
+ sym::const_deallocate => {
+ // nop at runtime.
+ return;
+ }
+
// This requires that atomic intrinsics follow a specific naming pattern:
// "atomic_<operation>[_<ordering>]", and no ordering means SeqCst
name if name_str.starts_with("atomic_") => {
fn extract_value(&mut self, agg_val: Self::Value, idx: u64) -> Self::Value;
fn insert_value(&mut self, agg_val: Self::Value, elt: Self::Value, idx: u64) -> Self::Value;
- fn landing_pad(
- &mut self,
- ty: Self::Type,
- pers_fn: Self::Value,
- num_clauses: usize,
- ) -> Self::Value;
- fn set_cleanup(&mut self, landing_pad: Self::Value);
- fn resume(&mut self, exn: Self::Value) -> Self::Value;
+ fn set_personality_fn(&mut self, personality: Self::Value);
+
+ // These are used by everyone except msvc
+ fn cleanup_landing_pad(&mut self, ty: Self::Type, pers_fn: Self::Value) -> Self::Value;
+ fn resume(&mut self, exn: Self::Value);
+
+ // These are used only by msvc
fn cleanup_pad(&mut self, parent: Option<Self::Value>, args: &[Self::Value]) -> Self::Funclet;
- fn cleanup_ret(
- &mut self,
- funclet: &Self::Funclet,
- unwind: Option<Self::BasicBlock>,
- ) -> Self::Value;
+ fn cleanup_ret(&mut self, funclet: &Self::Funclet, unwind: Option<Self::BasicBlock>);
fn catch_pad(&mut self, parent: Self::Value, args: &[Self::Value]) -> Self::Funclet;
fn catch_switch(
&mut self,
parent: Option<Self::Value>,
unwind: Option<Self::BasicBlock>,
- num_handlers: usize,
+ handlers: &[Self::BasicBlock],
) -> Self::Value;
- fn add_handler(&mut self, catch_switch: Self::Value, handler: Self::BasicBlock);
- fn set_personality_fn(&mut self, personality: Self::Value);
fn atomic_cmpxchg(
&mut self,
};
use rustc_errors::ErrorReported;
-use rustc_hir as hir;
use rustc_hir::def::DefKind;
use rustc_middle::mir;
use rustc_middle::mir::interpret::ErrorHandled;
tcx: TyCtxt<'tcx>,
key: ty::ParamEnvAnd<'tcx, GlobalId<'tcx>>,
) -> ::rustc_middle::mir::interpret::EvalToConstValueResult<'tcx> {
- assert!(key.param_env.constness() == hir::Constness::Const);
+ assert!(key.param_env.is_const());
// see comment in eval_to_allocation_raw_provider for what we're doing here
if key.param_env.reveal() == Reveal::All {
let mut key = key;
tcx: TyCtxt<'tcx>,
key: ty::ParamEnvAnd<'tcx, GlobalId<'tcx>>,
) -> ::rustc_middle::mir::interpret::EvalToAllocationRawResult<'tcx> {
- assert!(key.param_env.constness() == hir::Constness::Const);
+ assert!(key.param_env.is_const());
// Because the constant is computed twice (once per value of `Reveal`), we are at risk of
// reporting the same error twice here. To resolve this, we check whether we can evaluate the
// constant in the more restrictive `Reveal::UserFacing`, which most likely already was
)?;
ecx.write_pointer(ptr, dest)?;
}
+ sym::const_deallocate => {
+ let ptr = ecx.read_pointer(&args[0])?;
+ let size = ecx.read_scalar(&args[1])?.to_machine_usize(ecx)?;
+ let align = ecx.read_scalar(&args[2])?.to_machine_usize(ecx)?;
+
+ let size = Size::from_bytes(size);
+ let align = match Align::from_bytes(align) {
+ Ok(a) => a,
+ Err(err) => throw_ub_format!("align has to be a power of 2, {}", err),
+ };
+
+ // If an allocation is created in an another const,
+ // we don't deallocate it.
+ let (alloc_id, _, _) = ecx.memory.ptr_get_alloc(ptr)?;
+ let is_allocated_in_another_const = matches!(
+ ecx.tcx.get_global_alloc(alloc_id),
+ Some(interpret::GlobalAlloc::Memory(_))
+ );
+
+ if !is_allocated_in_another_const {
+ ecx.memory.deallocate(
+ ptr,
+ Some((size, align)),
+ interpret::MemoryKind::Machine(MemoryKind::Heap),
+ )?;
+ }
+ }
_ => {
return Err(ConstEvalErrKind::NeedsRfc(format!(
"calling intrinsic `{}`",
E0769: include_str!("./error_codes/E0769.md"),
E0770: include_str!("./error_codes/E0770.md"),
E0771: include_str!("./error_codes/E0771.md"),
+E0772: include_str!("./error_codes/E0772.md"),
E0773: include_str!("./error_codes/E0773.md"),
E0774: include_str!("./error_codes/E0774.md"),
E0775: include_str!("./error_codes/E0775.md"),
// E0723, // unstable feature in `const` context
E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
// E0738, // Removed; errored on `#[track_caller] fn`s in `extern "Rust" { ... }`.
- E0772, // `'static' obligation coming from `impl dyn Trait {}` or `impl Foo for dyn Bar {}`.
}
--- /dev/null
+A trait object has some specific lifetime `'1`, but it was used in a way that
+requires it to have a `'static` lifetime.
+
+Example of erroneous code:
+
+```compile_fail,E0772
+trait BooleanLike {}
+trait Person {}
+
+impl BooleanLike for bool {}
+
+impl dyn Person {
+ fn is_cool(&self) -> bool {
+ // hey you, you're pretty cool
+ true
+ }
+}
+
+fn get_is_cool<'p>(person: &'p dyn Person) -> impl BooleanLike {
+ // error: `person` has an anonymous lifetime `'p` but calling
+ // `print_cool_fn` introduces an implicit `'static` lifetime
+ // requirement
+ person.is_cool()
+}
+```
+
+The trait object `person` in the function `get_is_cool`, while already being
+behind a reference with lifetime `'p`, also has it's own implicit lifetime,
+`'2`.
+
+Lifetime `'2` represents the data the trait object might hold inside, for
+example:
+
+```
+trait MyTrait {}
+
+struct MyStruct<'a>(&'a i32);
+
+impl<'a> MyTrait for MyStruct<'a> {}
+```
+
+With this scenario, if a trait object of `dyn MyTrait + '2` was made from
+`MyStruct<'a>`, `'a` must live as long, if not longer than `'2`. This allows the
+trait object's internal data to be accessed safely from any trait methods. This
+rule also goes for any lifetime any struct made into a trait object may have.
+
+In the implementation for `dyn Person`, the `'2` lifetime representing the
+internal data was ommitted, meaning that the compiler inferred the lifetime
+`'static`. As a result, the implementation's `is_cool` is inferred by the
+compiler to look like this:
+
+```
+# trait Person {}
+#
+# impl dyn Person {
+fn is_cool<'a>(self: &'a (dyn Person + 'static)) -> bool {unimplemented!()}
+# }
+```
+
+While the `get_is_cool` function is inferred to look like this:
+
+```
+# trait Person {}
+# trait BooleanLike {}
+#
+fn get_is_cool<'p, R: BooleanLike>(person: &'p (dyn Person + 'p)) -> R {
+ unimplemented!()
+}
+```
+
+Which brings us to the core of the problem; the assignment of type
+`&'_ (dyn Person + '_)` to type `&'_ (dyn Person + 'static)` is impossible.
+
+Fixing it is as simple as being generic over lifetime `'2`, as to prevent the
+compiler from inferring it as `'static`:
+
+```
+# trait Person {}
+#
+impl<'d> dyn Person + 'd {/* ... */}
+
+// This works too, and is more elegant:
+//impl dyn Person + '_ {/* ... */}
+```
+
+See the [Rust Reference on Trait Object Lifetime Bounds][trait-objects] for
+more information on trait object lifetimes.
+
+[trait-object-lifetime-bounds]: https://doc.rust-lang.org/reference/types/trait-object.html#trait-object-lifetime-bounds
#![feature(associated_type_defaults)]
#![feature(crate_visibility_modifier)]
#![feature(decl_macro)]
-#![cfg_attr(bootstrap, feature(destructuring_assignment))]
#![feature(if_let_guard)]
#![feature(let_else)]
#![feature(proc_macro_diagnostic)]
pub use crate::def_id::DefPathHash;
use crate::def_id::{CrateNum, DefIndex, LocalDefId, StableCrateId, CRATE_DEF_INDEX, LOCAL_CRATE};
use crate::def_path_hash_map::DefPathHashMap;
-use crate::hir;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::StableHasher;
pub struct Definitions {
table: DefPathTable,
- /// Only [`LocalDefId`]s for items and item-like are HIR owners.
- /// The associated `HirId` has a `local_id` of `0`.
- /// Generic parameters and closures are also assigned a `LocalDefId` but are not HIR owners.
- /// Their `HirId`s are defined by their position while lowering the enclosing owner.
- // FIXME(cjgillot) Some `LocalDefId`s from `use` items are dropped during lowering and lack a `HirId`.
- pub(super) def_id_to_hir_id: IndexVec<LocalDefId, Option<hir::HirId>>,
-
/// Item with a given `LocalDefId` was defined during macro expansion with ID `ExpnId`.
expansions_that_defined: FxHashMap<LocalDefId, ExpnId>,
})
}
- #[inline]
- #[track_caller]
- pub fn local_def_id_to_hir_id(&self, id: LocalDefId) -> hir::HirId {
- self.def_id_to_hir_id[id].unwrap()
- }
-
/// Adds a root definition (no parent) and a few other reserved definitions.
pub fn new(stable_crate_id: StableCrateId, crate_span: Span) -> Definitions {
let key = DefKey {
Definitions {
table,
- def_id_to_hir_id: Default::default(),
expansions_that_defined: Default::default(),
def_id_to_span,
stable_crate_id,
def_id
}
- /// Initializes the `LocalDefId` to `HirId` mapping once it has been generated during
- /// AST to HIR lowering.
- pub fn init_def_id_to_hir_id_mapping(
- &mut self,
- mapping: IndexVec<LocalDefId, Option<hir::HirId>>,
- ) {
- assert!(
- self.def_id_to_hir_id.is_empty(),
- "trying to initialize `LocalDefId` <-> `HirId` mappings twice"
- );
-
- self.def_id_to_hir_id = mapping;
- }
-
pub fn expansion_that_defined(&self, id: LocalDefId) -> ExpnId {
self.expansions_that_defined.get(&id).copied().unwrap_or_else(ExpnId::root)
}
}
pub fn iter_local_def_id(&self) -> impl Iterator<Item = LocalDefId> + '_ {
- self.def_id_to_hir_id.iter_enumerated().map(|(k, _)| k)
+ self.table.def_path_hashes.indices().map(|local_def_index| LocalDefId { local_def_index })
}
#[inline(always)]
pub local_id_to_def_id: SortedMap<ItemLocalId, LocalDefId>,
}
+impl<'tcx> OwnerNodes<'tcx> {
+ pub fn node(&self) -> OwnerNode<'tcx> {
+ use rustc_index::vec::Idx;
+ let node = self.nodes[ItemLocalId::new(0)].as_ref().unwrap().node;
+ let node = node.as_owner().unwrap(); // Indexing must ensure it is an OwnerNode.
+ node
+ }
+}
+
/// Full information resulting from lowering an AST node.
#[derive(Debug, HashStable_Generic)]
pub struct OwnerInfo<'hir> {
impl<'tcx> OwnerInfo<'tcx> {
#[inline]
pub fn node(&self) -> OwnerNode<'tcx> {
- use rustc_index::vec::Idx;
- let node = self.nodes.nodes[ItemLocalId::new(0)].as_ref().unwrap().node;
- let node = node.as_owner().unwrap(); // Indexing must ensure it is an OwnerNode.
- node
+ self.nodes.node()
+ }
+}
+
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
+pub enum MaybeOwner<T> {
+ Owner(T),
+ NonOwner(HirId),
+ /// Used as a placeholder for unused LocalDefId.
+ Phantom,
+}
+
+impl<T> MaybeOwner<T> {
+ pub fn as_owner(self) -> Option<T> {
+ match self {
+ MaybeOwner::Owner(i) => Some(i),
+ MaybeOwner::NonOwner(_) | MaybeOwner::Phantom => None,
+ }
+ }
+
+ pub fn map<U>(self, f: impl FnOnce(T) -> U) -> MaybeOwner<U> {
+ match self {
+ MaybeOwner::Owner(i) => MaybeOwner::Owner(f(i)),
+ MaybeOwner::NonOwner(hir_id) => MaybeOwner::NonOwner(hir_id),
+ MaybeOwner::Phantom => MaybeOwner::Phantom,
+ }
+ }
+
+ pub fn unwrap(self) -> T {
+ match self {
+ MaybeOwner::Owner(i) => i,
+ MaybeOwner::NonOwner(_) | MaybeOwner::Phantom => panic!("Not a HIR owner"),
+ }
}
}
/// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html
#[derive(Debug)]
pub struct Crate<'hir> {
- pub owners: IndexVec<LocalDefId, Option<OwnerInfo<'hir>>>,
+ pub owners: IndexVec<LocalDefId, MaybeOwner<&'hir OwnerInfo<'hir>>>,
pub hir_hash: Fingerprint,
}
if self.local_id.index() == 0 { Some(self.owner) } else { None }
}
+ #[inline]
+ pub fn is_owner(self) -> bool {
+ self.local_id.index() == 0
+ }
+
#[inline]
pub fn make_owner(owner: LocalDefId) -> Self {
Self { owner, local_id: ItemLocalId::from_u32(0) }
// Opaque types found in explicit return types and their
// associated fresh inference variable. Writeback resolves these
// variables to get the concrete type, which can be used to
- // 'de-opaque' OpaqueTypeDecl, after typeck is done with all functions.
+ // 'de-opaque' OpaqueTypeDecl outside of type inference.
pub opaque_types: OpaqueTypeMap<'tcx>,
/// A map from inference variables created from opaque
let predicate = predicate.fold_with(&mut BottomUpFolder {
tcx,
ty_op: |ty| match ty.kind() {
- ty::Projection(projection_ty) => infcx.infer_projection(
- self.param_env,
- *projection_ty,
- traits::ObligationCause::misc(self.value_span, self.body_id),
- 0,
- &mut self.obligations,
- ),
+ ty::Projection(projection_ty) if !projection_ty.has_escaping_bound_vars() => {
+ infcx.infer_projection(
+ self.param_env,
+ *projection_ty,
+ traits::ObligationCause::misc(self.value_span, self.body_id),
+ 0,
+ &mut self.obligations,
+ )
+ }
_ => ty,
},
lt_op: |lt| lt,
/// of this, GNU assembler [local labels] *must* be used instead of labels
/// with a name. Using named labels might cause assembler or linker errors.
///
+ /// See the explanation in [Rust By Example] for more details.
+ ///
/// [local labels]: https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-Labels
+ /// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels
pub NAMED_ASM_LABELS,
Deny,
"named labels in inline assembly",
}
}
-/// Context for lint checking after type checking.
+/// Context for lint checking outside of type inference.
pub struct LateContext<'tcx> {
/// Type context we're checking in.
pub tcx: TyCtxt<'tcx>,
}
BuiltinLintDiagnostics::NamedAsmLabel(help) => {
db.help(&help);
+ db.note("see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information");
}
}
// Rewrap `db`, and pass control to the user.
impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) {
- use rustc_middle::ty;
use rustc_middle::ty::PredicateKind::*;
let predicates = cx.tcx.explicit_predicates_of(item.def_id);
let Trait(trait_predicate) = predicate.kind().skip_binder() else {
continue
};
- if trait_predicate.constness == ty::BoundConstness::ConstIfConst {
+ if trait_predicate.is_const_if_const() {
// `~const Drop` definitely have meanings so avoid linting here.
continue;
}
/// register size, to alert you of possibly using the incorrect width. To
/// fix this, add the suggested modifier to the template, or cast the
/// value to the correct size.
+ ///
+ /// See [register template modifiers] in the reference for more details.
+ ///
+ /// [register template modifiers]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html#template-modifiers
pub ASM_SUB_REGISTER,
Warn,
"using only a subset of a register for inline asm inputs",
pub fn items(&self) -> impl Iterator<Item = &'hir Item<'hir>> + 'hir {
let krate = self.krate();
- krate.owners.iter().filter_map(|owner| match owner.as_ref()?.node() {
+ krate.owners.iter().filter_map(|owner| match owner.as_owner()?.node() {
OwnerNode::Item(item) => Some(item),
_ => None,
})
Some(hir_id.owner)
} else {
self.tcx
- .hir_owner_nodes(hir_id.owner)?
+ .hir_owner_nodes(hir_id.owner)
+ .as_owner()?
.local_id_to_def_id
.get(&hir_id.local_id)
.copied()
#[inline]
pub fn local_def_id_to_hir_id(&self, def_id: LocalDefId) -> HirId {
- // FIXME(#85914) is this access safe for incr. comp.?
- self.tcx.untracked_resolutions.definitions.local_def_id_to_hir_id(def_id)
+ self.tcx.local_def_id_to_hir_id(def_id)
}
pub fn iter_local_def_id(&self) -> impl Iterator<Item = LocalDefId> + '_ {
if id.local_id == ItemLocalId::from_u32(0) {
Some(self.tcx.hir_owner_parent(id.owner))
} else {
- let owner = self.tcx.hir_owner_nodes(id.owner)?;
+ let owner = self.tcx.hir_owner_nodes(id.owner).as_owner()?;
let node = owner.nodes[id.local_id].as_ref()?;
let hir_id = HirId { owner: id.owner, local_id: node.parent };
Some(hir_id)
let owner = self.tcx.hir_owner(id.owner)?;
Some(owner.node.into())
} else {
- let owner = self.tcx.hir_owner_nodes(id.owner)?;
+ let owner = self.tcx.hir_owner_nodes(id.owner).as_owner()?;
let node = owner.nodes[id.local_id].as_ref()?;
Some(node.node)
}
.owners
.iter_enumerated()
.flat_map(move |(owner, owner_info)| {
- let bodies = &owner_info.as_ref()?.nodes.bodies;
+ let bodies = &owner_info.as_owner()?.nodes.bodies;
Some(bodies.iter().map(move |&(local_id, _)| {
let hir_id = HirId { owner, local_id };
let body_id = BodyId { hir_id };
par_iter(&self.krate().owners.raw).enumerate().for_each(|(owner, owner_info)| {
let owner = LocalDefId::new(owner);
- if let Some(owner_info) = owner_info {
+ if let MaybeOwner::Owner(owner_info) = owner_info {
par_iter(owner_info.nodes.bodies.range(..)).for_each(|(local_id, _)| {
let hir_id = HirId { owner, local_id: *local_id };
let body_id = BodyId { hir_id };
pub fn walk_attributes(self, visitor: &mut impl Visitor<'hir>) {
let krate = self.krate();
for (owner, info) in krate.owners.iter_enumerated() {
- if let Some(info) = info {
+ if let MaybeOwner::Owner(info) = info {
for (local_id, attrs) in info.attrs.map.iter() {
let id = HirId { owner, local_id: *local_id };
for a in *attrs {
V: itemlikevisit::ItemLikeVisitor<'hir>,
{
let krate = self.krate();
- for owner in krate.owners.iter().filter_map(Option::as_ref) {
+ for owner in krate.owners.iter().filter_map(|i| i.as_owner()) {
match owner.node() {
OwnerNode::Item(item) => visitor.visit_item(item),
OwnerNode::ForeignItem(item) => visitor.visit_foreign_item(item),
V: itemlikevisit::ParItemLikeVisitor<'hir> + Sync + Send,
{
let krate = self.krate();
- par_for_each_in(&krate.owners.raw, |owner| match owner.as_ref().map(OwnerInfo::node) {
- Some(OwnerNode::Item(item)) => visitor.visit_item(item),
- Some(OwnerNode::ForeignItem(item)) => visitor.visit_foreign_item(item),
- Some(OwnerNode::ImplItem(item)) => visitor.visit_impl_item(item),
- Some(OwnerNode::TraitItem(item)) => visitor.visit_trait_item(item),
- Some(OwnerNode::Crate(_)) | None => {}
+ par_for_each_in(&krate.owners.raw, |owner| match owner.map(OwnerInfo::node) {
+ MaybeOwner::Owner(OwnerNode::Item(item)) => visitor.visit_item(item),
+ MaybeOwner::Owner(OwnerNode::ForeignItem(item)) => visitor.visit_foreign_item(item),
+ MaybeOwner::Owner(OwnerNode::ImplItem(item)) => visitor.visit_impl_item(item),
+ MaybeOwner::Owner(OwnerNode::TraitItem(item)) => visitor.visit_trait_item(item),
+ MaybeOwner::Owner(OwnerNode::Crate(_))
+ | MaybeOwner::NonOwner(_)
+ | MaybeOwner::Phantom => {}
})
}
.owners
.iter_enumerated()
.filter_map(|(def_id, info)| {
- let _ = info.as_ref()?;
+ let _ = info.as_owner()?;
let def_path_hash = definitions.def_path_hash(def_id);
let span = definitions.def_span(def_id);
debug_assert_eq!(span.parent(), None);
providers.crate_hash = map::crate_hash;
providers.hir_module_items = map::hir_module_items;
providers.hir_owner = |tcx, id| {
- let owner = tcx.hir_crate(()).owners.get(id)?.as_ref()?;
+ let owner = tcx.hir_crate(()).owners.get(id)?.as_owner()?;
let node = owner.node();
Some(Owner { node, hash_without_bodies: owner.nodes.hash_without_bodies })
};
- providers.hir_owner_nodes = |tcx, id| tcx.hir_crate(()).owners[id].as_ref().map(|i| &i.nodes);
+ providers.local_def_id_to_hir_id = |tcx, id| {
+ let owner = tcx.hir_crate(()).owners[id].map(|_| ());
+ match owner {
+ MaybeOwner::Owner(_) => HirId::make_owner(id),
+ MaybeOwner::Phantom => bug!("No HirId for {:?}", id),
+ MaybeOwner::NonOwner(hir_id) => hir_id,
+ }
+ };
+ providers.hir_owner_nodes = |tcx, id| tcx.hir_crate(()).owners[id].map(|i| &i.nodes);
providers.hir_owner_parent = |tcx, id| {
// Accessing the def_key is ok since its value is hashed as part of `id`'s DefPathHash.
let parent = tcx.untracked_resolutions.definitions.def_key(id).parent;
let parent = parent.map_or(CRATE_HIR_ID, |local_def_index| {
let def_id = LocalDefId { local_def_index };
- let mut parent_hir_id =
- tcx.untracked_resolutions.definitions.local_def_id_to_hir_id(def_id);
+ let mut parent_hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
if let Some(local_id) =
- tcx.hir_crate(()).owners[parent_hir_id.owner].as_ref().unwrap().parenting.get(&id)
+ tcx.hir_crate(()).owners[parent_hir_id.owner].unwrap().parenting.get(&id)
{
parent_hir_id.local_id = *local_id;
}
parent
};
providers.hir_attrs =
- |tcx, id| tcx.hir_crate(()).owners[id].as_ref().map_or(AttributeMap::EMPTY, |o| &o.attrs);
+ |tcx, id| tcx.hir_crate(()).owners[id].as_owner().map_or(AttributeMap::EMPTY, |o| &o.attrs);
providers.source_span = |tcx, def_id| tcx.resolutions(()).definitions.def_span(def_id);
providers.def_span = |tcx, def_id| tcx.hir().span_if_local(def_id).unwrap_or(DUMMY_SP);
providers.fn_arg_names = |tcx, id| {
let id = id.expect_local();
tcx.resolutions(()).definitions.expansion_that_defined(id)
};
+ providers.in_scope_traits_map =
+ |tcx, id| tcx.hir_crate(()).owners[id].as_owner().map(|owner_info| &owner_info.trait_map);
}
/// across a suspension point against the type components of the generator
/// which type checking knows are live across a suspension point. We need to
/// flag drop flags to avoid triggering this check as they are introduced
- /// after typeck.
+ /// outside of type inference.
///
/// This should be sound because the drop flags are fully algebraic, and
/// therefore don't affect the auto-trait or outlives properties of the
desc { |tcx| "HIR owner of `{}`", tcx.def_path_str(key.to_def_id()) }
}
+ /// Gives access to the HIR ID for the given `LocalDefId` owner `key`.
+ ///
+ /// This can be conveniently accessed by methods on `tcx.hir()`.
+ /// Avoid calling this query directly.
+ query local_def_id_to_hir_id(key: LocalDefId) -> hir::HirId {
+ desc { |tcx| "HIR ID of `{}`", tcx.def_path_str(key.to_def_id()) }
+ }
+
/// Gives access to the HIR node's parent for the HIR owner `key`.
///
/// This can be conveniently accessed by methods on `tcx.hir()`.
///
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
- query hir_owner_nodes(key: LocalDefId) -> Option<&'tcx hir::OwnerNodes<'tcx>> {
+ query hir_owner_nodes(key: LocalDefId) -> hir::MaybeOwner<&'tcx hir::OwnerNodes<'tcx>> {
desc { |tcx| "HIR owner items in `{}`", tcx.def_path_str(key.to_def_id()) }
}
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key.to_def_id()) }
cache_on_disk_if { true }
load_cached(tcx, id) {
- #[cfg(bootstrap)]
- {
- match match tcx.on_disk_cache().as_ref() {
- Some(c) => c.try_load_query_result(*tcx, id),
- None => None,
- } {
- Some(x) => Some(&*tcx.arena.alloc(x)),
- None => None,
- }
- }
- #[cfg(not(bootstrap))]
- {
- let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
- .on_disk_cache().as_ref()
- .and_then(|c| c.try_load_query_result(*tcx, id));
+ let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
+ .on_disk_cache().as_ref()
+ .and_then(|c| c.try_load_query_result(*tcx, id));
- typeck_results.map(|x| &*tcx.arena.alloc(x))
- }
+ typeck_results.map(|x| &*tcx.arena.alloc(x))
}
}
/// `ReStatic`
pub re_static: Region<'tcx>,
- /// Erased region, used after type-checking
+ /// Erased region, used outside of type inference.
pub re_erased: Region<'tcx>,
}
field_indices: ItemLocalMap<usize>,
/// Stores the types for various nodes in the AST. Note that this table
- /// is not guaranteed to be populated until after typeck. See
+ /// is not guaranteed to be populated outside inference. See
/// typeck::check::fn_ctxt for details.
node_types: ItemLocalMap<Ty<'tcx>>,
}
pub fn provide(providers: &mut ty::query::Providers) {
- providers.in_scope_traits_map =
- |tcx, id| tcx.hir_crate(()).owners[id].as_ref().map(|owner_info| &owner_info.trait_map);
providers.resolutions = |tcx, ()| &tcx.untracked_resolutions;
providers.module_reexports =
|tcx, id| tcx.resolutions(()).reexport_map.get(&id).map(|v| &v[..]);
pub fn self_ty(self) -> Ty<'tcx> {
self.trait_ref.self_ty()
}
+
+ #[inline]
+ pub fn is_const_if_const(self) -> bool {
+ self.constness == BoundConstness::ConstIfConst
+ }
}
impl<'tcx> PolyTraitPredicate<'tcx> {
p
});
}
+
+ #[inline]
+ pub fn is_const_if_const(self) -> bool {
+ self.skip_binder().is_const_if_const()
+ }
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, TyEncodable, TyDecodable)]
self.packed.tag().constness
}
+ #[inline]
+ pub fn is_const(self) -> bool {
+ self.packed.tag().constness == hir::Constness::Const
+ }
+
/// Construct a trait environment with no where-clauses in scope
/// where the values of all `impl Trait` and other hidden types
/// are revealed. This is suitable for monomorphized, post-typeck
polarity: ty::ImplPolarity::Positive,
})
}
+
#[inline]
pub fn without_const(self) -> PolyTraitPredicate<'tcx> {
self.with_constness(BoundConstness::NotConst)
/// Erase the regions in `value` and then fully normalize all the
/// types found within. The result will also have regions erased.
///
- /// This is appropriate to use only after type-check: it assumes
- /// that normalization will succeed, for example.
+ /// This should only be used outside of type inference. For example,
+ /// it assumes that normalization will succeed.
pub fn normalize_erasing_regions<T>(self, param_env: ty::ParamEnv<'tcx>, value: T) -> T
where
T: TypeFoldable<'tcx>,
/// Static data that has an "infinite" lifetime. Top in the region lattice.
ReStatic,
- /// A region variable. Should not exist after typeck.
+ /// A region variable. Should not exist outside of type inference.
ReVar(RegionVid),
/// A placeholder region -- basically, the higher-ranked version of `ReFree`.
- /// Should not exist after typeck.
+ /// Should not exist outside of type inference.
RePlaceholder(ty::PlaceholderRegion),
/// Empty lifetime is for data that is never accessed. We tag the
pub fn sequence_element_type(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx> {
match self.kind() {
Array(ty, _) | Slice(ty) => ty,
- Str => tcx.mk_mach_uint(ty::UintTy::U8),
+ Str => tcx.types.u8,
_ => bug!("`sequence_element_type` called on non-sequence value: {}", self),
}
}
let mut hcx = tcx.create_no_span_stable_hashing_context();
let mut stable_hasher = StableHasher::new();
let owner = hir_body.id().hir_id.owner;
- let bodies = &tcx.hir_owner_nodes(owner).as_ref().unwrap().bodies;
+ let bodies = &tcx.hir_owner_nodes(owner).unwrap().bodies;
hcx.with_hir_bodies(false, owner, bodies, |hcx| {
hir_body.value.hash_stable(hcx, &mut stable_hasher)
});
} = &terminator.kind
{
let source_info = *self.body.source_info(location);
- // Only handle function calls outside macros
- if !source_info.span.from_expansion() {
- let func_ty = func.ty(self.body, self.tcx);
- if let ty::FnDef(def_id, substs_ref) = *func_ty.kind() {
- // Handle calls to `transmute`
- if self.tcx.is_diagnostic_item(sym::transmute, def_id) {
- let arg_ty = args[0].ty(self.body, self.tcx);
- for generic_inner_ty in arg_ty.walk() {
- if let GenericArgKind::Type(inner_ty) = generic_inner_ty.unpack() {
- if let Some((fn_id, fn_substs)) =
- FunctionItemRefChecker::is_fn_ref(inner_ty)
- {
- let span = self.nth_arg_span(&args, 0);
- self.emit_lint(fn_id, fn_substs, source_info, span);
- }
+ let func_ty = func.ty(self.body, self.tcx);
+ if let ty::FnDef(def_id, substs_ref) = *func_ty.kind() {
+ // Handle calls to `transmute`
+ if self.tcx.is_diagnostic_item(sym::transmute, def_id) {
+ let arg_ty = args[0].ty(self.body, self.tcx);
+ for generic_inner_ty in arg_ty.walk() {
+ if let GenericArgKind::Type(inner_ty) = generic_inner_ty.unpack() {
+ if let Some((fn_id, fn_substs)) =
+ FunctionItemRefChecker::is_fn_ref(inner_ty)
+ {
+ let span = self.nth_arg_span(&args, 0);
+ self.emit_lint(fn_id, fn_substs, source_info, span);
}
}
- } else {
- self.check_bound_args(def_id, substs_ref, &args, source_info);
}
+ } else {
+ self.check_bound_args(def_id, substs_ref, &args, source_info);
}
}
}
self.super_terminator(terminator, location);
}
-
- /// Emits a lint for function references formatted with `fmt::Pointer::fmt` by macros. These
- /// cases are handled as operands instead of call terminators to avoid any dependence on
- /// unstable, internal formatting details like whether `fmt` is called directly or not.
- fn visit_operand(&mut self, operand: &Operand<'tcx>, location: Location) {
- let source_info = *self.body.source_info(location);
- if source_info.span.from_expansion() {
- let op_ty = operand.ty(self.body, self.tcx);
- if let ty::FnDef(def_id, substs_ref) = *op_ty.kind() {
- if self.tcx.is_diagnostic_item(sym::pointer_trait_fmt, def_id) {
- let param_ty = substs_ref.type_at(0);
- if let Some((fn_id, fn_substs)) = FunctionItemRefChecker::is_fn_ref(param_ty) {
- // The operand's ctxt wouldn't display the lint since it's inside a macro so
- // we have to use the callsite's ctxt.
- let callsite_ctxt = source_info.span.source_callsite().ctxt();
- let span = source_info.span.with_ctxt(callsite_ctxt);
- self.emit_lint(fn_id, fn_substs, source_info, span);
- }
- }
- }
- }
- self.super_operand(operand, location);
- }
}
impl<'tcx> FunctionItemRefChecker<'_, 'tcx> {
if let Some((fn_id, fn_substs)) =
FunctionItemRefChecker::is_fn_ref(subst_ty)
{
- let span = self.nth_arg_span(args, arg_num);
+ let mut span = self.nth_arg_span(args, arg_num);
+ if span.from_expansion() {
+ // The operand's ctxt wouldn't display the lint since it's inside a macro so
+ // we have to use the callsite's ctxt.
+ let callsite_ctxt = span.source_callsite().ctxt();
+ span = span.with_ctxt(callsite_ctxt);
+ }
self.emit_lint(fn_id, fn_substs, source_info, span);
}
}
if ident.is_raw_guess()
&& self.look_ahead(1, |t| valid_follow.contains(&t.kind)) =>
{
- err.span_suggestion(
- ident.span,
- "you can escape reserved keywords to use them as identifiers",
- format!("r#{}", ident.name),
+ err.span_suggestion_verbose(
+ ident.span.shrink_to_lo(),
+ &format!("escape `{}` to use it as an identifier", ident.name),
+ "r#".to_owned(),
Applicability::MaybeIncorrect,
);
}
let hir_id = self.tcx.hir().local_def_id_to_hir_id(def_id);
// Ensure that the parent of the def is an item, not HRTB
let parent_id = self.tcx.hir().get_parent_node(hir_id);
- // FIXME(cjgillot) Can this check be replaced by
- // `let parent_is_item = parent_id.is_owner();`?
- let parent_is_item = if let Some(parent_def_id) = parent_id.as_owner() {
- matches!(self.tcx.hir().krate().owners.get(parent_def_id), Some(Some(_)),)
- } else {
- false
- };
-
- if !parent_is_item {
+ if !parent_id.is_owner() {
if !self.trait_definition_only {
struct_span_err!(
self.tcx.sess,
tcx.dep_graph.with_ignore(|| {
info!("Dumping crate {}", cratename);
- // Privacy checking requires and is done after type checking; use a
+ // Privacy checking must be done outside of type inference; use a
// fallback in case the access levels couldn't have been correctly computed.
let access_levels = match tcx.sess.compile_status() {
Ok(..) => tcx.privacy_access_levels(()),
__H,
__S,
__try_var,
- _args,
_d,
_e,
_task_context,
append_const_msg,
arbitrary_enum_discriminant,
arbitrary_self_types,
+ args,
arith_offset,
arm,
arm_target_feature,
const_async_blocks,
const_compare_raw_pointers,
const_constructor,
+ const_deallocate,
const_eval_limit,
const_eval_select,
const_eval_select_ct,
}
/// Returns a suggested register class to use for this type. This is called
- /// after type checking via `supported_types` fails to give a better error
+ /// when `supported_types` fails to give a better error
/// message to the user.
pub fn suggest_class(self, arch: InlineAsmArch, ty: InlineAsmType) -> Option<Self> {
match self {
/// that type check should guarantee to us that all nested
/// obligations *could be* resolved if we wanted to.
///
-/// Assumes that this is run after the entire crate has been successfully type-checked.
/// This also expects that `trait_ref` is fully normalized.
pub fn codegen_fulfill_obligation<'tcx>(
tcx: TyCtxt<'tcx>,
/// Finishes processes any obligations that remain in the
/// fulfillment context, and then returns the result with all type
/// variables removed and regions erased. Because this is intended
-/// for use after type-check has completed, if any errors occur,
+/// for use outside of type inference, if any errors occur,
/// it will panic. It is used during normalization and other cases
/// where processing the obligations in `fulfill_cx` may cause
/// type inference variables that appear in `result` to be
if !errors.is_empty() {
infcx.tcx.sess.delay_span_bug(
rustc_span::DUMMY_SP,
- &format!("Encountered errors `{:?}` resolving bounds after type-checking", errors),
+ &format!(
+ "Encountered errors `{:?}` resolving bounds outside of type inference",
+ errors
+ ),
);
}
} else {
err.span_label(span, explanation);
}
+
+ if trait_predicate.is_const_if_const() && obligation.param_env.is_const() {
+ let non_const_predicate = trait_ref.without_const();
+ let non_const_obligation = Obligation {
+ cause: obligation.cause.clone(),
+ param_env: obligation.param_env.without_const(),
+ predicate: non_const_predicate.to_predicate(tcx),
+ recursion_depth: obligation.recursion_depth,
+ };
+ if self.predicate_may_hold(&non_const_obligation) {
+ err.span_note(
+ span,
+ &format!(
+ "the trait `{}` is implemented for `{}`, \
+ but that implementation is not `const`",
+ non_const_predicate.print_modifiers_and_trait_path(),
+ trait_ref.skip_binder().self_ty(),
+ ),
+ );
+ }
+ }
+
if let Some((msg, span)) = type_def {
err.span_label(span, &msg);
}
//
// In any case, in practice, typeck constructs all the
// parameter environments once for every fn as it goes,
- // and errors will get reported then; so after typeck we
+ // and errors will get reported then; so outside of type inference we
// can be sure that no errors should occur.
debug!(
// severe performance implications for large opaque types with
// late-bound regions. See `issue-88862` benchmark.
ty::Opaque(def_id, substs) if !substs.has_escaping_bound_vars() => {
- // Only normalize `impl Trait` after type-checking, usually in codegen.
+ // Only normalize `impl Trait` outside of type inference, usually in codegen.
match self.param_env.reveal() {
Reveal::UserFacing => ty.super_fold_with(self),
// severe performance implications for large opaque types with
// late-bound regions. See `issue-88862` benchmark.
ty::Opaque(def_id, substs) if !substs.has_escaping_bound_vars() => {
- // Only normalize `impl Trait` after type-checking, usually in codegen.
+ // Only normalize `impl Trait` outside of type inference, usually in codegen.
match self.param_env.reveal() {
Reveal::UserFacing => ty.try_super_fold_with(self),
} else if lang_items.unsize_trait() == Some(def_id) {
self.assemble_candidates_for_unsizing(obligation, &mut candidates);
} else if lang_items.drop_trait() == Some(def_id)
- && obligation.predicate.skip_binder().constness == ty::BoundConstness::ConstIfConst
+ && obligation.predicate.is_const_if_const()
{
self.assemble_const_drop_candidates(obligation, &mut candidates);
} else {
// CheckPredicate(&A: Super)
// CheckPredicate(A: ~const Super) // <- still const env, failure
// ```
- if obligation.param_env.constness() == Constness::Const
- && obligation.predicate.skip_binder().constness == ty::BoundConstness::NotConst
- {
+ if obligation.param_env.is_const() && !obligation.predicate.is_const_if_const() {
new_obligation = TraitObligation {
cause: obligation.cause.clone(),
param_env: obligation.param_env.without_const(),
ImplCandidate(def_id)
if tcx.impl_constness(def_id) == hir::Constness::Const => {}
// const param
- ParamCandidate(trait_pred)
- if trait_pred.skip_binder().constness
- == ty::BoundConstness::ConstIfConst => {}
+ ParamCandidate(trait_pred) if trait_pred.is_const_if_const() => {}
// auto trait impl
AutoImplCandidate(..) => {}
// generator, this will raise error in other places
// kind of an "idempotent" action, but I'm not sure where would be
// a better place. In practice, we construct environments for
// every fn once during type checking, and we'll abort if there
- // are any errors at that point, so after type checking you can be
+ // are any errors at that point, so outside of type inference you can be
// sure that this will succeed without errors anyway.
if tcx.sess.opts.debugging_opts.chalk {
let named_type_param_count =
param_counts.types - has_self as usize - synth_type_param_count;
let infer_lifetimes =
- gen_pos != GenericArgPosition::Type && !gen_args.has_lifetime_params();
+ (gen_pos != GenericArgPosition::Type || infer_args) && !gen_args.has_lifetime_params();
if gen_pos != GenericArgPosition::Type && !gen_args.bindings.is_empty() {
Self::prohibit_assoc_ty_binding(tcx, gen_args.bindings[0].span);
) -> subst::GenericArg<'tcx> {
let tcx = self.astconv.tcx();
match param.kind {
- GenericParamDefKind::Lifetime => tcx.lifetimes.re_static.into(),
+ GenericParamDefKind::Lifetime => self
+ .astconv
+ .re_infer(Some(param), self.span)
+ .unwrap_or_else(|| {
+ debug!(?param, "unelided lifetime in signature");
+
+ // This indicates an illegal lifetime in a non-assoc-trait position
+ tcx.sess.delay_span_bug(self.span, "unelided lifetime in signature");
+
+ // Supply some dummy value. We don't have an
+ // `re_error`, annoyingly, so use `'static`.
+ tcx.lifetimes.re_static
+ })
+ .into(),
GenericParamDefKind::Type { has_default, .. } => {
if !infer_args && has_default {
// No type parameter provided, but a default exists.
use rustc_hir::def::{CtorKind, DefKind, Res};
use rustc_hir::def_id::DefId;
use rustc_hir::intravisit::Visitor;
-use rustc_hir::{ExprKind, QPath};
+use rustc_hir::{ExprKind, HirId, QPath};
use rustc_infer::infer;
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use rustc_infer::infer::InferOk;
+use rustc_middle::middle::stability;
use rustc_middle::ty::adjustment::{Adjust, Adjustment, AllowTwoPhase};
use rustc_middle::ty::error::ExpectedFound;
use rustc_middle::ty::error::TypeError::{FieldMisMatch, Sorts};
_ => {
// prevent all specified fields from being suggested
let skip_fields = skip_fields.iter().map(|x| x.ident.name);
- if let Some(field_name) =
- Self::suggest_field_name(variant, field.ident.name, skip_fields.collect())
- {
+ if let Some(field_name) = self.suggest_field_name(
+ variant,
+ field.ident.name,
+ skip_fields.collect(),
+ expr_span,
+ ) {
err.span_suggestion(
field.ident.span,
"a field with a similar name exists",
format!("`{}` does not have this field", ty),
);
}
- let available_field_names = self.available_field_names(variant);
+ let available_field_names =
+ self.available_field_names(variant, expr_span);
if !available_field_names.is_empty() {
err.note(&format!(
"available fields are: {}",
err.emit();
}
- // Return an hint about the closest match in field names
+ // Return a hint about the closest match in field names
fn suggest_field_name(
+ &self,
variant: &'tcx ty::VariantDef,
field: Symbol,
skip: Vec<Symbol>,
+ // The span where stability will be checked
+ span: Span,
) -> Option<Symbol> {
let names = variant
.fields
.iter()
.filter_map(|field| {
// ignore already set fields and private fields from non-local crates
+ // and unstable fields.
if skip.iter().any(|&x| x == field.name)
|| (!variant.def_id.is_local() && !field.vis.is_public())
+ || matches!(
+ self.tcx.eval_stability(field.did, None, span, None),
+ stability::EvalResult::Deny { .. }
+ )
{
None
} else {
find_best_match_for_name(&names, field, None)
}
- fn available_field_names(&self, variant: &'tcx ty::VariantDef) -> Vec<Symbol> {
+ fn available_field_names(
+ &self,
+ variant: &'tcx ty::VariantDef,
+ access_span: Span,
+ ) -> Vec<Symbol> {
variant
.fields
.iter()
.adjust_ident_and_get_scope(field.ident(self.tcx), variant.def_id, self.body_id)
.1;
field.vis.is_accessible_from(def_scope, self.tcx)
+ && !matches!(
+ self.tcx.eval_stability(field.did, None, access_span, None),
+ stability::EvalResult::Deny { .. }
+ )
})
+ .filter(|field| !self.tcx.is_doc_hidden(field.did))
.map(|field| field.name)
.collect()
}
"ban_nonexisting_field: field={:?}, base={:?}, expr={:?}, expr_ty={:?}",
field, base, expr, expr_t
);
- let mut err = self.no_such_field_err(field, expr_t);
+ let mut err = self.no_such_field_err(field, expr_t, base.hir_id);
match *expr_t.peel_refs().kind() {
ty::Array(_, len) => {
self.suggest_first_deref_field(&mut err, expr, base, field);
}
ty::Adt(def, _) if !def.is_enum() => {
- self.suggest_fields_on_recordish(&mut err, def, field);
+ self.suggest_fields_on_recordish(&mut err, def, field, expr.span);
}
ty::Param(param_ty) => {
self.point_at_param_definition(&mut err, param_ty);
err: &mut DiagnosticBuilder<'_>,
def: &'tcx ty::AdtDef,
field: Ident,
+ access_span: Span,
) {
if let Some(suggested_field_name) =
- Self::suggest_field_name(def.non_enum_variant(), field.name, vec![])
+ self.suggest_field_name(def.non_enum_variant(), field.name, vec![], access_span)
{
err.span_suggestion(
field.span,
} else {
err.span_label(field.span, "unknown field");
let struct_variant_def = def.non_enum_variant();
- let field_names = self.available_field_names(struct_variant_def);
+ let field_names = self.available_field_names(struct_variant_def, access_span);
if !field_names.is_empty() {
err.note(&format!(
"available fields are: {}",
&self,
field: Ident,
expr_t: &'tcx ty::TyS<'tcx>,
+ id: HirId,
) -> DiagnosticBuilder<'_> {
let span = field.span;
debug!("no_such_field_err(span: {:?}, field: {:?}, expr_t: {:?})", span, field, expr_t);
// try to add a suggestion in case the field is a nested field of a field of the Adt
if let Some((fields, substs)) = self.get_field_candidates(span, &expr_t) {
for candidate_field in fields.iter() {
- if let Some(field_path) =
- self.check_for_nested_field(span, field, candidate_field, substs, vec![])
- {
+ if let Some(field_path) = self.check_for_nested_field(
+ span,
+ field,
+ candidate_field,
+ substs,
+ vec![],
+ self.tcx.parent_module(id).to_def_id(),
+ ) {
let field_path_str = field_path
.iter()
.map(|id| id.name.to_ident_string())
candidate_field: &ty::FieldDef,
subst: SubstsRef<'tcx>,
mut field_path: Vec<Ident>,
+ id: DefId,
) -> Option<Vec<Ident>> {
debug!(
"check_for_nested_field(span: {:?}, candidate_field: {:?}, field_path: {:?}",
let field_ty = candidate_field.ty(self.tcx, subst);
if let Some((nested_fields, subst)) = self.get_field_candidates(span, &field_ty) {
for field in nested_fields.iter() {
- let ident = field.ident(self.tcx).normalize_to_macros_2_0();
- if ident == target_field {
- return Some(field_path);
- } else {
+ let accessible = field.vis.is_accessible_from(id, self.tcx);
+ if accessible {
+ let ident = field.ident(self.tcx).normalize_to_macros_2_0();
+ if ident == target_field {
+ return Some(field_path);
+ }
let field_path = field_path.clone();
if let Some(path) = self.check_for_nested_field(
span,
field,
subst,
field_path,
+ id,
) {
return Some(path);
}
sym::const_allocate => {
(0, vec![tcx.types.usize, tcx.types.usize], tcx.mk_mut_ptr(tcx.types.u8))
}
+ sym::const_deallocate => (
+ 0,
+ vec![tcx.mk_mut_ptr(tcx.types.u8), tcx.types.usize, tcx.types.usize],
+ tcx.mk_unit(),
+ ),
sym::ptr_offset_from => {
(1, vec![tcx.mk_imm_ptr(param(0)), tcx.mk_imm_ptr(param(0))], tcx.types.isize)
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
test(no_crate_inject, attr(allow(unused_variables), deny(warnings)))
)]
-#![cfg_attr(
- not(bootstrap),
- doc(cfg_hide(
- not(test),
- not(any(test, bootstrap)),
- any(not(feature = "miri-test-libstd"), test, doctest),
- no_global_oom_handling,
- not(no_global_oom_handling),
- target_has_atomic = "ptr"
- ))
-)]
+#![doc(cfg_hide(
+ not(test),
+ not(any(test, bootstrap)),
+ any(not(feature = "miri-test-libstd"), test, doctest),
+ no_global_oom_handling,
+ not(no_global_oom_handling),
+ target_has_atomic = "ptr"
+))]
#![no_std]
#![needs_allocator]
//
#![feature(const_precise_live_drops)]
#![feature(const_trait_impl)]
#![feature(const_try)]
-#![cfg_attr(bootstrap, feature(destructuring_assignment))]
#![feature(dropck_eyepatch)]
#![feature(exclusive_range_pattern)]
#![feature(fundamental)]
///
/// See the [module-level documentation](self) for more.
#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg_attr(
- not(bootstrap),
- must_not_suspend = "holding a Ref across suspend \
- points can cause BorrowErrors"
-)]
+#[must_not_suspend = "holding a Ref across suspend points can cause BorrowErrors"]
pub struct Ref<'b, T: ?Sized + 'b> {
value: &'b T,
borrow: BorrowRef<'b>,
///
/// See the [module-level documentation](self) for more.
#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg_attr(
- not(bootstrap),
- must_not_suspend = "holding a RefMut across suspend \
- points can cause BorrowErrors"
-)]
+#[must_not_suspend = "holding a RefMut across suspend points can cause BorrowErrors"]
pub struct RefMut<'b, T: ?Sized + 'b> {
value: &'b mut T,
borrow: BorrowRefMut<'b>,
#[inline]
fn size_hint(&self) -> (usize, Option<usize>) {
let (low, high) = self.iter.size_hint();
- // we could be entirely valid surrogates (2 elements per
- // char), or entirely non-surrogates (1 element per char)
- (low / 2, high)
+
+ let (low_buf, high_buf) = match self.buf {
+ // buf is empty, no additional elements from it.
+ None => (0, 0),
+ // `u` is a non surrogate, so it's always an additional character.
+ Some(u) if u < 0xD800 || 0xDFFF < u => (1, 1),
+ // `u` is a leading surrogate (it can never be a trailing surrogate and
+ // it's a surrogate due to the previous branch) and `self.iter` is empty.
+ //
+ // `u` can't be paired, since the `self.iter` is empty,
+ // so it will always become an additional element (error).
+ Some(_u) if high == Some(0) => (1, 1),
+ // `u` is a leading surrogate and `iter` may be non-empty.
+ //
+ // `u` can either pair with a trailing surrogate, in which case no additional elements
+ // are produced, or it can become an error, in which case it's an additional character (error).
+ Some(_u) => (0, 1),
+ };
+
+ // `self.iter` could contain entirely valid surrogates (2 elements per
+ // char), or entirely non-surrogates (1 element per char).
+ //
+ // On odd lower bound, at least one element must stay unpaired
+ // (with other elements from `self.iter`), so we round up.
+ let low = low.div_ceil(2) + low_buf;
+ let high = high.and_then(|h| h.checked_add(high_buf));
+
+ (low, high)
}
}
#[lang = "char"]
impl char {
- /// The highest valid code point a `char` can have.
+ /// The highest valid code point a `char` can have, `'\u{10FFFF}'`.
///
- /// A `char` is a [Unicode Scalar Value], which means that it is a [Code
- /// Point], but only ones within a certain range. `MAX` is the highest valid
- /// code point that's a valid [Unicode Scalar Value].
+ /// # Examples
+ ///
+ /// ```
+ /// # fn something_which_returns_char() -> char { 'a' }
+ /// let c: char = something_which_returns_char();
+ /// assert!(c <= char::MAX);
///
- /// [Unicode Scalar Value]: https://www.unicode.org/glossary/#unicode_scalar_value
- /// [Code Point]: https://www.unicode.org/glossary/#code_point
+ /// let value_at_max = char::MAX as u32;
+ /// assert_eq!(char::from_u32(value_at_max), Some('\u{10FFFF}'));
+ /// assert_eq!(char::from_u32(value_at_max + 1), None);
+ /// ```
#[stable(feature = "assoc_char_consts", since = "1.52.0")]
pub const MAX: char = '\u{10ffff}';
Cn Unassigned a reserved unassigned code point or a noncharacter
*/
-/// The highest valid code point a `char` can have.
+/// The highest valid code point a `char` can have, `'\u{10FFFF}'`.
///
-/// A [`char`] is a [Unicode Scalar Value], which means that it is a [Code
-/// Point], but only ones within a certain range. `MAX` is the highest valid
-/// code point that's a valid [Unicode Scalar Value].
+/// # Examples
///
-/// [Unicode Scalar Value]: https://www.unicode.org/glossary/#unicode_scalar_value
-/// [Code Point]: https://www.unicode.org/glossary/#code_point
+/// ```
+/// # fn something_which_returns_char() -> char { 'a' }
+/// let c: char = something_which_returns_char();
+/// assert!(c <= char::MAX);
+///
+/// let value_at_max = char::MAX as u32;
+/// assert_eq!(char::from_u32(value_at_max), Some('\u{10FFFF}'));
+/// assert_eq!(char::from_u32(value_at_max + 1), None);
+/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub const MAX: char = char::MAX;
}
}
-/// Trait for values that can be compared for a sort-order.
+/// Trait for types that form a [partial order](https://en.wikipedia.org/wiki/Partial_order).
///
/// The `lt`, `le`, `gt`, and `ge` methods of this trait can be called using
/// the `<`, `<=`, `>`, and `>=` operators, respectively.
loop {}
};
+macro_rules! arg_new {
+ ($f: ident, $t: ident) => {
+ #[doc(hidden)]
+ #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
+ #[inline]
+ pub fn $f<'b, T: $t>(x: &'b T) -> ArgumentV1<'_> {
+ Self::new(x, $t::fmt)
+ }
+ };
+}
+
impl<'a> ArgumentV1<'a> {
#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
+ #[inline]
pub fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> ArgumentV1<'b> {
// SAFETY: `mem::transmute(x)` is safe because
// 1. `&'b T` keeps the lifetime it originated with `'b`
unsafe { ArgumentV1 { formatter: mem::transmute(f), value: mem::transmute(x) } }
}
+ arg_new!(new_display, Display);
+ arg_new!(new_debug, Debug);
+ arg_new!(new_octal, Octal);
+ arg_new!(new_lower_hex, LowerHex);
+ arg_new!(new_upper_hex, UpperHex);
+ arg_new!(new_pointer, Pointer);
+ arg_new!(new_binary, Binary);
+ arg_new!(new_lower_exp, LowerExp);
+ arg_new!(new_upper_exp, UpperExp);
+
#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
pub fn from_usize(x: &usize) -> ArgumentV1<'_> {
/// Creates a future from a value.
#[unstable(feature = "into_future", issue = "67644")]
- #[cfg_attr(not(bootstrap), lang = "into_future")]
+ #[lang = "into_future"]
fn into_future(self) -> Self::Future;
}
/// Polls multiple futures simultaneously, returning a tuple
/// of all results once complete.
///
-/// While `join!(a, b)` is similar to `(a.await, b.await)`,
+/// While `join!(a, b).await` is similar to `(a.await, b.await)`,
/// `join!` polls both futures concurrently and is therefore more efficient.
///
/// # Examples
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
pub fn ptr_guaranteed_ne<T>(ptr: *const T, other: *const T) -> bool;
- /// Allocate at compile time. Should not be called at runtime.
+ /// Allocates a block of memory at compile time.
+ /// At runtime, just returns a null pointer.
+ ///
+ /// # Safety
+ ///
+ /// - The `align` argument must be a power of two.
+ /// - At compile time, a compile error occurs if this constraint is violated.
+ /// - At runtime, it is not checked.
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
pub fn const_allocate(size: usize, align: usize) -> *mut u8;
+ /// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time.
+ /// At runtime, does nothing.
+ ///
+ /// # Safety
+ ///
+ /// - The `align` argument must be a power of two.
+ /// - At compile time, a compile error occurs if this constraint is violated.
+ /// - At runtime, it is not checked.
+ /// - 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.
///
/// This is particularly handy for arrays, since it allows things like just
/// assert_eq!((2, 'o'), zipper[2]);
/// ```
///
- /// If both iterators have roughly equivalent syntax, it may me more readable to use [`zip`]:
+ /// If both iterators have roughly equivalent syntax, it may be more readable to use [`zip`]:
///
/// ```
/// use std::iter::zip;
test(no_crate_inject, attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
)]
-#![cfg_attr(
- not(bootstrap),
- doc(cfg_hide(
- not(test),
- any(not(feature = "miri-test-libstd"), test, doctest),
- no_fp_fmt_parse,
- target_pointer_width = "16",
- target_pointer_width = "32",
- target_pointer_width = "64",
- target_has_atomic = "8",
- target_has_atomic = "16",
- target_has_atomic = "32",
- target_has_atomic = "64",
- target_has_atomic = "ptr",
- target_has_atomic_equal_alignment = "8",
- target_has_atomic_equal_alignment = "16",
- target_has_atomic_equal_alignment = "32",
- target_has_atomic_equal_alignment = "64",
- target_has_atomic_equal_alignment = "ptr",
- target_has_atomic_load_store = "8",
- target_has_atomic_load_store = "16",
- target_has_atomic_load_store = "32",
- target_has_atomic_load_store = "64",
- target_has_atomic_load_store = "ptr",
- ))
-)]
+#![doc(cfg_hide(
+ not(test),
+ any(not(feature = "miri-test-libstd"), test, doctest),
+ no_fp_fmt_parse,
+ target_pointer_width = "16",
+ target_pointer_width = "32",
+ target_pointer_width = "64",
+ target_has_atomic = "8",
+ target_has_atomic = "16",
+ target_has_atomic = "32",
+ target_has_atomic = "64",
+ target_has_atomic = "ptr",
+ target_has_atomic_equal_alignment = "8",
+ target_has_atomic_equal_alignment = "16",
+ target_has_atomic_equal_alignment = "32",
+ target_has_atomic_equal_alignment = "64",
+ target_has_atomic_equal_alignment = "ptr",
+ target_has_atomic_load_store = "8",
+ target_has_atomic_load_store = "16",
+ target_has_atomic_load_store = "32",
+ target_has_atomic_load_store = "64",
+ target_has_atomic_load_store = "ptr",
+))]
#![no_core]
//
// Lints:
pub use crate::core_arch::arch::*;
/// Inline assembly.
+ ///
+ /// Refer to [rust by example] for a usage guide and the [reference] for
+ /// detailed information about the syntax and available options.
+ ///
+ /// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
+ /// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
#[stable(feature = "asm", since = "1.59.0")]
#[rustc_builtin_macro]
pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
}
/// Module-level inline assembly.
+ ///
+ /// Refer to [rust by example] for a usage guide and the [reference] for
+ /// detailed information about the syntax and available options.
+ ///
+ /// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
+ /// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
#[stable(feature = "global_asm", since = "1.59.0")]
#[rustc_builtin_macro]
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
/// assert_eq!(s, b"ABCDEF");
/// # }
/// ```
- #[cfg(not(bootstrap))]
#[unstable(feature = "concat_bytes", issue = "87555")]
#[rustc_builtin_macro]
#[macro_export]
Self::from_bits(u32::from_ne_bytes(bytes))
}
- /// Returns an ordering between self and other values.
+ /// Return the ordering between `self` and `other`.
+ ///
/// Unlike the standard partial comparison between floating point numbers,
/// this comparison always produces an ordering in accordance to
- /// the totalOrder predicate as defined in IEEE 754 (2008 revision)
- /// floating point standard. The values are ordered in following order:
- /// - Negative quiet NaN
- /// - Negative signaling NaN
- /// - Negative infinity
- /// - Negative numbers
- /// - Negative subnormal numbers
- /// - Negative zero
- /// - Positive zero
- /// - Positive subnormal numbers
- /// - Positive numbers
- /// - Positive infinity
- /// - Positive signaling NaN
- /// - Positive quiet NaN
- ///
- /// Note that this function does not always agree with the [`PartialOrd`]
- /// and [`PartialEq`] implementations of `f32`. In particular, they regard
- /// negative and positive zero as equal, while `total_cmp` doesn't.
+ /// the `totalOrder` predicate as defined in the IEEE 754 (2008 revision)
+ /// floating point standard. The values are ordered in the following sequence:
+ ///
+ /// - negative quiet NaN
+ /// - negative signaling NaN
+ /// - negative infinity
+ /// - negative numbers
+ /// - negative subnormal numbers
+ /// - negative zero
+ /// - positive zero
+ /// - positive subnormal numbers
+ /// - positive numbers
+ /// - positive infinity
+ /// - positive signaling NaN
+ /// - positive quiet NaN.
+ ///
+ /// The ordering established by this function does not always agree with the
+ /// [`PartialOrd`] and [`PartialEq`] implementations of `f32`. For example,
+ /// they consider negative and positive zero equal, while `total_cmp`
+ /// doesn't.
+ ///
+ /// The interpretation of the signaling NaN bit follows the definition in
+ /// the IEEE 754 standard, which may not match the interpretation by some of
+ /// the older, non-conformant (e.g. MIPS) hardware implementations.
///
/// # Example
+ ///
/// ```
/// #![feature(total_cmp)]
/// struct GoodBoy {
Self::from_bits(u64::from_ne_bytes(bytes))
}
- /// Returns an ordering between self and other values.
+ /// Return the ordering between `self` and `other`.
+ ///
/// Unlike the standard partial comparison between floating point numbers,
/// this comparison always produces an ordering in accordance to
- /// the totalOrder predicate as defined in IEEE 754 (2008 revision)
- /// floating point standard. The values are ordered in following order:
- /// - Negative quiet NaN
- /// - Negative signaling NaN
- /// - Negative infinity
- /// - Negative numbers
- /// - Negative subnormal numbers
- /// - Negative zero
- /// - Positive zero
- /// - Positive subnormal numbers
- /// - Positive numbers
- /// - Positive infinity
- /// - Positive signaling NaN
- /// - Positive quiet NaN
- ///
- /// Note that this function does not always agree with the [`PartialOrd`]
- /// and [`PartialEq`] implementations of `f64`. In particular, they regard
- /// negative and positive zero as equal, while `total_cmp` doesn't.
+ /// the `totalOrder` predicate as defined in the IEEE 754 (2008 revision)
+ /// floating point standard. The values are ordered in the following sequence:
+ ///
+ /// - negative quiet NaN
+ /// - negative signaling NaN
+ /// - negative infinity
+ /// - negative numbers
+ /// - negative subnormal numbers
+ /// - negative zero
+ /// - positive zero
+ /// - positive subnormal numbers
+ /// - positive numbers
+ /// - positive infinity
+ /// - positive signaling NaN
+ /// - positive quiet NaN.
+ ///
+ /// The ordering established by this function does not always agree with the
+ /// [`PartialOrd`] and [`PartialEq`] implementations of `f64`. For example,
+ /// they consider negative and positive zero equal, while `total_cmp`
+ /// doesn't.
+ ///
+ /// The interpretation of the signaling NaN bit follows the definition in
+ /// the IEEE 754 standard, which may not match the interpretation by some of
+ /// the older, non-conformant (e.g. MIPS) hardware implementations.
///
/// # Example
+ ///
/// ```
/// #![feature(total_cmp)]
/// struct GoodBoy {
forward_ref_binop! { impl Add, add for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl Add<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn add(self, other: $t) -> Saturating<$t> {
- Saturating(self.0.saturating_add(other))
- }
- }
- forward_ref_binop! { impl Add, add for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
-
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl AddAssign for Saturating<$t> {
#[inline]
impl AddAssign<$t> for Saturating<$t> {
#[inline]
fn add_assign(&mut self, other: $t) {
- *self = *self + other;
+ *self = *self + Saturating(other);
}
}
forward_ref_op_assign! { impl AddAssign, add_assign for Saturating<$t>, $t }
forward_ref_binop! { impl Sub, sub for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl Sub<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn sub(self, other: $t) -> Saturating<$t> {
- Saturating(self.0.saturating_sub(other))
- }
- }
- forward_ref_binop! { impl Sub, sub for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
-
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl SubAssign for Saturating<$t> {
#[inline]
impl SubAssign<$t> for Saturating<$t> {
#[inline]
fn sub_assign(&mut self, other: $t) {
- *self = *self - other;
+ *self = *self - Saturating(other);
}
}
forward_ref_op_assign! { impl SubAssign, sub_assign for Saturating<$t>, $t }
forward_ref_binop! { impl Mul, mul for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl Mul<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn mul(self, other: $t) -> Saturating<$t> {
- Saturating(self.0.saturating_mul(other))
- }
- }
- forward_ref_binop! { impl Mul, mul for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
-
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl MulAssign for Saturating<$t> {
#[inline]
impl MulAssign<$t> for Saturating<$t> {
#[inline]
fn mul_assign(&mut self, other: $t) {
- *self = *self * other;
+ *self = *self * Saturating(other);
}
}
forward_ref_op_assign! { impl MulAssign, mul_assign for Saturating<$t>, $t }
forward_ref_binop! { impl Div, div for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- /// # Examples
- ///
- /// Basic usage:
- ///
- /// ```
- /// #![feature(saturating_int_impl, saturating_int_assign_impl)]
- /// use std::num::Saturating;
- ///
- #[doc = concat!("assert_eq!(Saturating(2", stringify!($t), "), Saturating(5", stringify!($t), ") / 2);")]
- #[doc = concat!("assert_eq!(Saturating(", stringify!($t), "::MAX), Saturating(", stringify!($t), "::MAX) / 1);")]
- #[doc = concat!("assert_eq!(Saturating(", stringify!($t), "::MIN), Saturating(", stringify!($t), "::MIN) / 1);")]
- /// ```
- ///
- /// ```should_panic
- /// #![feature(saturating_int_impl, saturating_int_assign_impl)]
- /// use std::num::Saturating;
- ///
- #[doc = concat!("let _ = Saturating(0", stringify!($t), ") / 0;")]
- /// ```
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl Div<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn div(self, other: $t) -> Saturating<$t> {
- Saturating(self.0.saturating_div(other))
- }
- }
- forward_ref_binop! { impl Div, div for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl DivAssign for Saturating<$t> {
impl DivAssign<$t> for Saturating<$t> {
#[inline]
fn div_assign(&mut self, other: $t) {
- *self = *self / other;
+ *self = *self / Saturating(other);
}
}
forward_ref_op_assign! { impl DivAssign, div_assign for Saturating<$t>, $t }
forward_ref_binop! { impl Rem, rem for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl Rem<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn rem(self, other: $t) -> Saturating<$t> {
- Saturating(self.0.rem(other))
- }
- }
- forward_ref_binop! { impl Rem, rem for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
-
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl RemAssign for Saturating<$t> {
#[inline]
impl RemAssign<$t> for Saturating<$t> {
#[inline]
fn rem_assign(&mut self, other: $t) {
- *self = *self % other;
+ *self = *self % Saturating(other);
}
}
forward_ref_op_assign! { impl RemAssign, rem_assign for Saturating<$t>, $t }
forward_ref_binop! { impl BitXor, bitxor for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl BitXor<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn bitxor(self, other: $t) -> Saturating<$t> {
- Saturating(self.0 ^ other)
- }
- }
- forward_ref_binop! { impl BitXor, bitxor for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
-
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl BitXorAssign for Saturating<$t> {
#[inline]
impl BitXorAssign<$t> for Saturating<$t> {
#[inline]
fn bitxor_assign(&mut self, other: $t) {
- *self = *self ^ other;
+ *self = *self ^ Saturating(other);
}
}
forward_ref_op_assign! { impl BitXorAssign, bitxor_assign for Saturating<$t>, $t }
forward_ref_binop! { impl BitOr, bitor for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl BitOr<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn bitor(self, other: $t) -> Saturating<$t> {
- Saturating(self.0 | other)
- }
- }
- forward_ref_binop! { impl BitOr, bitor for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
-
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl BitOrAssign for Saturating<$t> {
#[inline]
impl BitOrAssign<$t> for Saturating<$t> {
#[inline]
fn bitor_assign(&mut self, other: $t) {
- *self = *self | other;
+ *self = *self | Saturating(other);
}
}
forward_ref_op_assign! { impl BitOrAssign, bitor_assign for Saturating<$t>, $t }
forward_ref_binop! { impl BitAnd, bitand for Saturating<$t>, Saturating<$t>,
#[unstable(feature = "saturating_int_impl", issue = "87920")] }
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")]
- impl BitAnd<$t> for Saturating<$t> {
- type Output = Saturating<$t>;
-
- #[inline]
- fn bitand(self, other: $t) -> Saturating<$t> {
- Saturating(self.0 & other)
- }
- }
- forward_ref_binop! { impl BitAnd, bitand for Saturating<$t>, $t,
- #[unstable(feature = "saturating_int_assign_impl", issue = "92354")] }
-
#[unstable(feature = "saturating_int_impl", issue = "87920")]
impl BitAndAssign for Saturating<$t> {
#[inline]
impl BitAndAssign<$t> for Saturating<$t> {
#[inline]
fn bitand_assign(&mut self, other: $t) {
- *self = *self & other;
+ *self = *self & Saturating(other);
}
}
forward_ref_op_assign! { impl BitAndAssign, bitand_assign for Saturating<$t>, $t }
issue = "87555",
reason = "`concat_bytes` is not stable enough for use and is subject to change"
)]
-#[cfg(not(bootstrap))]
#[doc(no_inline)]
pub use crate::concat_bytes;
/// }
/// ```
#[stable(feature = "nonnull", since = "1.25.0")]
+ #[rustc_const_unstable(feature = "const_nonnull_new", issue = "93235")]
#[inline]
- pub fn new(ptr: *mut T) -> Option<Self> {
+ pub const fn new(ptr: *mut T) -> Option<Self> {
if !ptr.is_null() {
// SAFETY: The pointer is already checked and is not null
Some(unsafe { Self::new_unchecked(ptr) })
sort::quicksort(self, |a, b| f(a).lt(&f(b)));
}
- /// Reorder the slice such that the element at `index` is at its final sorted position.
- #[unstable(feature = "slice_partition_at_index", issue = "55300")]
- #[rustc_deprecated(since = "1.49.0", reason = "use the select_nth_unstable() instead")]
- #[inline]
- pub fn partition_at_index(&mut self, index: usize) -> (&mut [T], &mut T, &mut [T])
- where
- T: Ord,
- {
- self.select_nth_unstable(index)
- }
-
- /// Reorder the slice with a comparator function such that the element at `index` is at its
- /// final sorted position.
- #[unstable(feature = "slice_partition_at_index", issue = "55300")]
- #[rustc_deprecated(since = "1.49.0", reason = "use select_nth_unstable_by() instead")]
- #[inline]
- pub fn partition_at_index_by<F>(
- &mut self,
- index: usize,
- compare: F,
- ) -> (&mut [T], &mut T, &mut [T])
- where
- F: FnMut(&T, &T) -> Ordering,
- {
- self.select_nth_unstable_by(index, compare)
- }
-
- /// Reorder the slice with a key extraction function such that the element at `index` is at its
- /// final sorted position.
- #[unstable(feature = "slice_partition_at_index", issue = "55300")]
- #[rustc_deprecated(since = "1.49.0", reason = "use the select_nth_unstable_by_key() instead")]
- #[inline]
- pub fn partition_at_index_by_key<K, F>(
- &mut self,
- index: usize,
- f: F,
- ) -> (&mut [T], &mut T, &mut [T])
- where
- F: FnMut(&T) -> K,
- K: Ord,
- {
- self.select_nth_unstable_by_key(index, f)
- }
-
/// Reorder the slice such that the element at `index` is at its final sorted position.
///
/// This reordering has the additional property that any value at position `i < index` will be
let mid = partition_equal(v, pivot, is_less);
// Continue sorting elements greater than the pivot.
- v = &mut { v }[mid..];
+ v = &mut v[mid..];
continue;
}
}
was_partitioned = was_p;
// Split the slice into `left`, `pivot`, and `right`.
- let (left, right) = { v }.split_at_mut(mid);
+ let (left, right) = v.split_at_mut(mid);
let (pivot, right) = right.split_at_mut(1);
let pivot = &pivot[0];
let (mid, _) = partition(v, pivot, is_less);
// Split the slice into `left`, `pivot`, and `right`.
- let (left, right) = { v }.split_at_mut(mid);
+ let (left, right) = v.split_at_mut(mid);
let (pivot, right) = right.split_at_mut(1);
let pivot = &pivot[0];
check(&[0xD800, 0], &[Err(0xD800), Ok('\0')]);
}
+#[test]
+fn test_decode_utf16_size_hint() {
+ fn check(s: &[u16]) {
+ let mut iter = char::decode_utf16(s.iter().cloned());
+
+ loop {
+ let count = iter.clone().count();
+ let (lower, upper) = iter.size_hint();
+
+ assert!(
+ lower <= count && count <= upper.unwrap(),
+ "lower = {lower}, count = {count}, upper = {upper:?}"
+ );
+
+ if let None = iter.next() {
+ break;
+ }
+ }
+ }
+
+ check(&[0xD800, 0xD800, 0xDC00]);
+ check(&[0xD800, 0xD800, 0x0]);
+ check(&[0xD800, 0x41, 0x42]);
+ check(&[0xD800, 0]);
+ check(&[0xD834, 0x006d]);
+}
+
#[test]
fn ed_iterator_specializations() {
// Check counting
assert_eq!(Fool(false), Fool(true));
}
-#[cfg(not(bootstrap))]
mod const_cmp {
use super::*;
}
#[test]
-#[cfg(not(bootstrap))]
const fn test_write_bytes_in_const_contexts() {
use core::intrinsics::write_bytes;
assert!(42u32 == core::hint::black_box(42u32));
}
}
+
+#[cfg(not(bootstrap))]
+#[test]
+fn test_const_allocate_at_runtime() {
+ use core::intrinsics::const_allocate;
+ unsafe {
+ assert!(const_allocate(4, 4).is_null());
+ }
+}
+
+#[cfg(not(bootstrap))]
+#[test]
+fn test_const_deallocate_at_runtime() {
+ use core::intrinsics::const_deallocate;
+ const X: &u32 = &42u32;
+ let x = &0u32;
+ unsafe {
+ const_deallocate(X as *const _ as *mut u8, 4, 4); // nop
+ const_deallocate(x as *const _ as *mut u8, 4, 4); // nop
+ const_deallocate(core::ptr::null_mut(), 1, 1); // nop
+ }
+}
#![feature(const_bool_to_option)]
#![feature(const_cell_into_inner)]
#![feature(const_convert)]
+#![feature(const_heap)]
#![feature(const_maybe_uninit_as_mut_ptr)]
#![feature(const_maybe_uninit_assume_init)]
#![feature(const_maybe_uninit_assume_init_read)]
+#![feature(const_nonnull_new)]
#![feature(const_num_from_num)]
+#![feature(const_ptr_as_ref)]
#![feature(const_ptr_read)]
#![feature(const_ptr_write)]
#![feature(const_ptr_offset)]
#![feature(is_sorted)]
#![feature(pattern)]
#![feature(sort_internals)]
-#![feature(slice_partition_at_index)]
#![feature(slice_take)]
#![feature(maybe_uninit_uninit_array)]
#![feature(maybe_uninit_array_assume_init)]
}
#[test]
-#[cfg(not(bootstrap))]
fn test_set_memory_const() {
const XS: [u8; 20] = {
let mut xs = [0u8; 20];
assert!(ys == zs);
}
+#[test]
+fn test_const_nonnull_new() {
+ const {
+ assert!(NonNull::new(core::ptr::null_mut::<()>()).is_none());
+
+ let value = &mut 0u32;
+ let mut ptr = NonNull::new(value).unwrap();
+ unsafe { *ptr.as_mut() = 42 };
+
+ let reference = unsafe { &*ptr.as_ref() };
+ assert!(*reference == *value);
+ assert!(*reference == 42);
+ };
+}
+
#[test]
#[allow(warnings)]
// Have a symbol for the test below. It doesn’t need to be an actual variadic function, match the
panic_unwind = { path = "../panic_unwind", optional = true }
panic_abort = { path = "../panic_abort" }
core = { path = "../core" }
-libc = { version = "0.2.108", default-features = false, features = ['rustc-dep-of-std'] }
+libc = { version = "0.2.116", default-features = false, features = ['rustc-dep-of-std'] }
compiler_builtins = { version = "0.1.66" }
profiler_builtins = { path = "../profiler_builtins", optional = true }
unwind = { path = "../unwind" }
hermit-abi = { version = "0.1.19", features = ['rustc-dep-of-std'] }
[target.wasm32-wasi.dependencies]
-wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false }
+wasi = { version = "0.11.0", features = ['rustc-dep-of-std'], default-features = false }
[features]
backtrace = [
let path = Path::new("");
assert_eq!(path.canonicalize().unwrap_err().kind(), crate::io::ErrorKind::NotFound);
}
+
+/// Ensure ReadDir works on large directories.
+/// Regression test for https://github.com/rust-lang/rust/issues/93384.
+#[test]
+fn read_large_dir() {
+ let tmpdir = tmpdir();
+
+ let count = 32 * 1024;
+ for i in 0..count {
+ check!(fs::File::create(tmpdir.join(&i.to_string())));
+ }
+
+ for entry in fs::read_dir(tmpdir.path()).unwrap() {
+ entry.unwrap();
+ }
+}
test(no_crate_inject, attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
)]
-#![cfg_attr(
- not(bootstrap),
- doc(cfg_hide(
- not(test),
- not(any(test, bootstrap)),
- no_global_oom_handling,
- not(no_global_oom_handling)
- ))
-)]
+#![doc(cfg_hide(
+ not(test),
+ not(any(test, bootstrap)),
+ no_global_oom_handling,
+ not(no_global_oom_handling)
+))]
// Don't link to std. We are std.
#![no_std]
#![warn(deprecated_in_future)]
#![feature(cfg_target_thread_local)]
#![feature(char_error_internals)]
#![feature(char_internals)]
-#![cfg_attr(not(bootstrap), feature(concat_bytes))]
+#![feature(concat_bytes)]
#![feature(concat_idents)]
#![feature(const_fn_floating_point_arithmetic)]
#![feature(const_fn_fn_ptr_basics)]
pub use alloc_crate::vec;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::any;
-#[stable(feature = "simd_arch", since = "1.27.0")]
-// The `no_inline`-attribute is required to make the documentation of all
-// targets available.
-// See https://github.com/rust-lang/rust/pull/57808#issuecomment-457390549 for
-// more information.
-#[doc(no_inline)] // Note (#82861): required for correct documentation
-pub use core::arch;
#[stable(feature = "core_array", since = "1.36.0")]
pub use core::array;
#[stable(feature = "rust1", since = "1.0.0")]
pub use alloc::task::*;
}
+#[doc = include_str!("../../stdarch/crates/core_arch/src/core_arch_docs.md")]
+#[stable(feature = "simd_arch", since = "1.27.0")]
+pub mod arch {
+ #[stable(feature = "simd_arch", since = "1.27.0")]
+ // The `no_inline`-attribute is required to make the documentation of all
+ // targets available.
+ // See https://github.com/rust-lang/rust/pull/57808#issuecomment-457390549 for
+ // more information.
+ #[doc(no_inline)] // Note (#82861): required for correct documentation
+ pub use core::arch::*;
+
+ #[stable(feature = "simd_x86", since = "1.27.0")]
+ pub use std_detect::is_x86_feature_detected;
+ #[unstable(feature = "stdsimd", issue = "48556")]
+ pub use std_detect::{
+ is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
+ is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
+ is_riscv_feature_detected,
+ };
+}
+
+// This was stabilized in the crate root so we have to keep it there.
+#[stable(feature = "simd_x86", since = "1.27.0")]
+pub use std_detect::is_x86_feature_detected;
+
// The runtime entry point and a few unstable public functions used by the
// compiler
#[macro_use]
#[allow(dead_code, unused_attributes)]
mod backtrace_rs;
-#[stable(feature = "simd_x86", since = "1.27.0")]
-pub use std_detect::is_x86_feature_detected;
-#[doc(hidden)]
-#[unstable(feature = "stdsimd", issue = "48556")]
-pub use std_detect::*;
-#[unstable(feature = "stdsimd", issue = "48556")]
-pub use std_detect::{
- is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
- is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
- is_riscv_feature_detected,
-};
-
// Re-export macros defined in libcore.
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated, deprecated_in_future)]
issue = "87555",
reason = "`concat_bytes` is not stable enough for use and is subject to change"
)]
-#[cfg(not(bootstrap))]
pub use core::concat_bytes;
#[stable(feature = "core_primitive", since = "1.43.0")]
use crate::os::unix::ffi::OsStrExt;
use crate::path::Path;
use crate::sys::cvt;
-use crate::{ascii, fmt, io, iter, mem};
+use crate::{ascii, fmt, io, mem, ptr};
// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here?
#[cfg(not(unix))]
path - base
}
-pub(super) unsafe fn sockaddr_un(path: &Path) -> io::Result<(libc::sockaddr_un, libc::socklen_t)> {
- let mut addr: libc::sockaddr_un = mem::zeroed();
+pub(super) fn sockaddr_un(path: &Path) -> io::Result<(libc::sockaddr_un, libc::socklen_t)> {
+ // SAFETY: All zeros is a valid representation for `sockaddr_un`.
+ let mut addr: libc::sockaddr_un = unsafe { mem::zeroed() };
addr.sun_family = libc::AF_UNIX as libc::sa_family_t;
let bytes = path.as_os_str().as_bytes();
&"path must be shorter than SUN_LEN",
));
}
- for (dst, src) in iter::zip(&mut addr.sun_path, bytes) {
- *dst = *src as libc::c_char;
- }
- // null byte for pathname addresses is already there because we zeroed the
- // struct
+ // SAFETY: `bytes` and `addr.sun_path` are not overlapping and
+ // both point to valid memory.
+ // NOTE: We zeroed the memory above, so the path is already null
+ // terminated.
+ unsafe {
+ ptr::copy_nonoverlapping(bytes.as_ptr(), addr.sun_path.as_mut_ptr().cast(), bytes.len())
+ };
let mut len = sun_path_offset(&addr) + bytes.len();
match bytes.get(0) {
Ok(SocketAddr { addr, len })
}
+ /// Constructs a `SockAddr` with the family `AF_UNIX` and the provided path.
+ ///
+ /// # Errors
+ ///
+ /// Returns an error if the path is longer than `SUN_LEN` or if it contains
+ /// NULL bytes.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// #![feature(unix_socket_creation)]
+ /// use std::os::unix::net::SocketAddr;
+ /// use std::path::Path;
+ ///
+ /// # fn main() -> std::io::Result<()> {
+ /// let address = SocketAddr::from_path("/path/to/socket")?;
+ /// assert_eq!(address.as_pathname(), Some(Path::new("/path/to/socket")));
+ /// # Ok(())
+ /// # }
+ /// ```
+ ///
+ /// Creating a `SocketAddr` with a NULL byte results in an error.
+ ///
+ /// ```
+ /// #![feature(unix_socket_creation)]
+ /// use std::os::unix::net::SocketAddr;
+ ///
+ /// assert!(SocketAddr::from_path("/path/with/\0/bytes").is_err());
+ /// ```
+ #[unstable(feature = "unix_socket_creation", issue = "93423")]
+ pub fn from_path<P>(path: P) -> io::Result<SocketAddr>
+ where
+ P: AsRef<Path>,
+ {
+ sockaddr_un(path.as_ref()).map(|(addr, len)| SocketAddr { addr, len })
+ }
+
/// Returns `true` if the address is unnamed.
///
/// # Examples
}
fn advise(&self, offset: u64, len: u64, advice: u8) -> io::Result<()> {
+ let advice = match advice {
+ a if a == wasi::ADVICE_NORMAL.raw() => wasi::ADVICE_NORMAL,
+ a if a == wasi::ADVICE_SEQUENTIAL.raw() => wasi::ADVICE_SEQUENTIAL,
+ a if a == wasi::ADVICE_RANDOM.raw() => wasi::ADVICE_RANDOM,
+ a if a == wasi::ADVICE_WILLNEED.raw() => wasi::ADVICE_WILLNEED,
+ a if a == wasi::ADVICE_DONTNEED.raw() => wasi::ADVICE_DONTNEED,
+ a if a == wasi::ADVICE_NOREUSE.raw() => wasi::ADVICE_NOREUSE,
+ _ => {
+ return Err(io::Error::new_const(
+ io::ErrorKind::InvalidInput,
+ &"invalid parameter 'advice'",
+ ));
+ }
+ };
+
self.as_inner().as_inner().advise(offset, len, advice)
}
//! WASI-specific networking functionality
#![unstable(feature = "wasi_ext", issue = "71213")]
+
+use crate::io;
+use crate::net;
+use crate::sys_common::AsInner;
+
+/// WASI-specific extensions to [`std::net::TcpListener`].
+///
+/// [`std::net::TcpListener`]: crate::net::TcpListener
+pub trait TcpListenerExt {
+ /// Accept a socket.
+ ///
+ /// This corresponds to the `sock_accept` syscall.
+ fn sock_accept(&self, flags: u16) -> io::Result<u32>;
+}
+
+impl TcpListenerExt for net::TcpListener {
+ fn sock_accept(&self, flags: u16) -> io::Result<u32> {
+ self.as_inner().as_inner().as_inner().sock_accept(flags)
+ }
+}
issue = "87555",
reason = "`concat_bytes` is not stable enough for use and is subject to change"
)]
-#[cfg(not(bootstrap))]
#[doc(no_inline)]
pub use core::prelude::v1::concat_bytes;
/// [`lock`]: Mutex::lock
/// [`try_lock`]: Mutex::try_lock
#[must_use = "if unused the Mutex will immediately unlock"]
-#[cfg_attr(
- not(bootstrap),
- must_not_suspend = "holding a MutexGuard across suspend \
+#[must_not_suspend = "holding a MutexGuard across suspend \
points can cause deadlocks, delays, \
- and cause Futures to not implement `Send`"
-)]
+ and cause Futures to not implement `Send`"]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct MutexGuard<'a, T: ?Sized + 'a> {
lock: &'a Mutex<T>,
/// [`read`]: RwLock::read
/// [`try_read`]: RwLock::try_read
#[must_use = "if unused the RwLock will immediately unlock"]
-#[cfg_attr(
- not(bootstrap),
- must_not_suspend = "holding a RwLockReadGuard across suspend \
+#[must_not_suspend = "holding a RwLockReadGuard across suspend \
points can cause deadlocks, delays, \
- and cause Futures to not implement `Send`"
-)]
+ and cause Futures to not implement `Send`"]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {
lock: &'a RwLock<T>,
/// [`write`]: RwLock::write
/// [`try_write`]: RwLock::try_write
#[must_use = "if unused the RwLock will immediately unlock"]
-#[cfg_attr(
- not(bootstrap),
- must_not_suspend = "holding a RwLockWriteGuard across suspend \
+#[must_not_suspend = "holding a RwLockWriteGuard across suspend \
points can cause deadlocks, delays, \
- and cause Future's to not implement `Send`"
-)]
+ and cause Future's to not implement `Send`"]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {
lock: &'a RwLock<T>,
///
/// See `thread::Builder::spawn_unchecked` for safety requirements.
pub unsafe fn new(stack: usize, p: Box<dyn FnOnce()>) -> io::Result<Thread> {
- // Inherit the current task's priority
- let current_task = task::try_current_task_id().map_err(|e| e.as_io_error())?;
- let priority = task::try_task_priority(current_task).map_err(|e| e.as_io_error())?;
-
let inner = Box::new(ThreadInner {
start: UnsafeCell::new(ManuallyDrop::new(p)),
lifecycle: AtomicUsize::new(LIFECYCLE_INIT),
exinf: inner_ptr as abi::EXINF,
// The entry point
task: Some(trampoline),
- itskpri: priority,
+ // Inherit the calling task's base priority
+ itskpri: abi::TPRI_SELF,
stksz: stack,
// Let the kernel allocate the stack,
stk: crate::ptr::null_mut(),
#[link_name = "SOLID_NET_Close"]
pub fn close(s: c_int) -> c_int;
+ #[link_name = "SOLID_NET_Dup"]
+ pub fn dup(s: c_int) -> c_int;
+
#[link_name = "SOLID_NET_GetPeerName"]
pub fn getpeername(s: c_int, name: *mut sockaddr, namelen: *mut socklen_t) -> c_int;
}
fn duplicate(&self) -> io::Result<FileDesc> {
- super::unsupported()
+ cvt(unsafe { netc::dup(self.fd) }).map(Self::new)
}
}
};
}
+ // Only d_reclen bytes of *entry_ptr are valid, so we can't just copy the
+ // whole thing (#93384). Instead, copy everything except the name.
+ let entry_bytes = entry_ptr as *const u8;
+ let entry_name = ptr::addr_of!((*entry_ptr).d_name) as *const u8;
+ let name_offset = entry_name.offset_from(entry_bytes) as usize;
+ let mut entry: dirent64 = mem::zeroed();
+ ptr::copy_nonoverlapping(entry_bytes, &mut entry as *mut _ as *mut u8, name_offset);
+
let ret = DirEntry {
- entry: *entry_ptr,
+ entry,
// d_name is guaranteed to be null-terminated.
- name: CStr::from_ptr((*entry_ptr).d_name.as_ptr()).to_owned(),
+ name: CStr::from_ptr(entry_name as *const _).to_owned(),
dir: Arc::clone(&self.inner),
};
if ret.name_bytes() != b"." && ret.name_bytes() != b".." {
target_os = "vxworks"
))]
pub fn file_type(&self) -> io::Result<FileType> {
- lstat(&self.path()).map(|m| m.file_type())
+ self.metadata().map(|m| m.file_type())
}
#[cfg(not(any(
libc::DT_SOCK => Ok(FileType { mode: libc::S_IFSOCK }),
libc::DT_DIR => Ok(FileType { mode: libc::S_IFDIR }),
libc::DT_BLK => Ok(FileType { mode: libc::S_IFBLK }),
- _ => lstat(&self.path()).map(|m| m.file_type()),
+ _ => self.metadata().map(|m| m.file_type()),
}
}
target_os = "illumos",
target_os = "haiku",
target_os = "vxworks",
- target_os = "fuchsia"
))]
fn is_dir(_ent: &DirEntry) -> Option<bool> {
None
target_os = "illumos",
target_os = "haiku",
target_os = "vxworks",
- target_os = "fuchsia"
)))]
fn is_dir(ent: &DirEntry) -> Option<bool> {
match ent.entry.d_type {
unsafe { wasi::path_remove_directory(self.as_raw_fd() as wasi::Fd, path).map_err(err2io) }
}
+ pub fn sock_accept(&self, flags: wasi::Fdflags) -> io::Result<wasi::Fd> {
+ unsafe { wasi::sock_accept(self.as_raw_fd() as wasi::Fd, flags).map_err(err2io) }
+ }
+
pub fn sock_recv(
&self,
ri_data: &mut [IoSliceMut<'_>],
if errno > u16::MAX as i32 || errno < 0 {
return Uncategorized;
}
- match errno as u16 {
- wasi::ERRNO_CONNREFUSED => ConnectionRefused,
- wasi::ERRNO_CONNRESET => ConnectionReset,
- wasi::ERRNO_PERM | wasi::ERRNO_ACCES => PermissionDenied,
- wasi::ERRNO_PIPE => BrokenPipe,
- wasi::ERRNO_NOTCONN => NotConnected,
- wasi::ERRNO_CONNABORTED => ConnectionAborted,
- wasi::ERRNO_ADDRNOTAVAIL => AddrNotAvailable,
- wasi::ERRNO_ADDRINUSE => AddrInUse,
- wasi::ERRNO_NOENT => NotFound,
- wasi::ERRNO_INTR => Interrupted,
- wasi::ERRNO_INVAL => InvalidInput,
- wasi::ERRNO_TIMEDOUT => TimedOut,
- wasi::ERRNO_EXIST => AlreadyExists,
- wasi::ERRNO_AGAIN => WouldBlock,
- wasi::ERRNO_NOSYS => Unsupported,
- wasi::ERRNO_NOMEM => OutOfMemory,
+
+ match errno {
+ e if e == wasi::ERRNO_CONNREFUSED.raw().into() => ConnectionRefused,
+ e if e == wasi::ERRNO_CONNRESET.raw().into() => ConnectionReset,
+ e if e == wasi::ERRNO_PERM.raw().into() || e == wasi::ERRNO_ACCES.raw().into() => {
+ PermissionDenied
+ }
+ e if e == wasi::ERRNO_PIPE.raw().into() => BrokenPipe,
+ e if e == wasi::ERRNO_NOTCONN.raw().into() => NotConnected,
+ e if e == wasi::ERRNO_CONNABORTED.raw().into() => ConnectionAborted,
+ e if e == wasi::ERRNO_ADDRNOTAVAIL.raw().into() => AddrNotAvailable,
+ e if e == wasi::ERRNO_ADDRINUSE.raw().into() => AddrInUse,
+ e if e == wasi::ERRNO_NOENT.raw().into() => NotFound,
+ e if e == wasi::ERRNO_INTR.raw().into() => Interrupted,
+ e if e == wasi::ERRNO_INVAL.raw().into() => InvalidInput,
+ e if e == wasi::ERRNO_TIMEDOUT.raw().into() => TimedOut,
+ e if e == wasi::ERRNO_EXIST.raw().into() => AlreadyExists,
+ e if e == wasi::ERRNO_AGAIN.raw().into() => WouldBlock,
+ e if e == wasi::ERRNO_NOSYS.raw().into() => Unsupported,
+ e if e == wasi::ERRNO_NOMEM.raw().into() => OutOfMemory,
_ => Uncategorized,
}
}
return ret;
}
-fn err2io(err: wasi::Error) -> std_io::Error {
- std_io::Error::from_raw_os_error(err.raw_error().into())
+fn err2io(err: wasi::Errno) -> std_io::Error {
+ std_io::Error::from_raw_os_error(err.raw().into())
}
#![deny(unsafe_op_in_unsafe_fn)]
+use super::err2io;
use super::fd::WasiFd;
use crate::convert::TryFrom;
use crate::fmt;
unsupported()
}
- pub fn read(&self, _: &mut [u8]) -> io::Result<usize> {
- unsupported()
+ pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> {
+ self.read_vectored(&mut [IoSliceMut::new(buf)])
}
- pub fn read_vectored(&self, _: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
- unsupported()
+ pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
+ self.socket().as_inner().read(bufs)
}
pub fn is_read_vectored(&self) -> bool {
true
}
- pub fn write(&self, _: &[u8]) -> io::Result<usize> {
- unsupported()
+ pub fn write(&self, buf: &[u8]) -> io::Result<usize> {
+ self.write_vectored(&[IoSlice::new(buf)])
}
- pub fn write_vectored(&self, _: &[IoSlice<'_>]) -> io::Result<usize> {
- unsupported()
+ pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
+ self.socket().as_inner().write(bufs)
}
pub fn is_write_vectored(&self) -> bool {
unsupported()
}
- pub fn set_nonblocking(&self, _: bool) -> io::Result<()> {
- unsupported()
+ pub fn set_nonblocking(&self, state: bool) -> io::Result<()> {
+ let fdstat = unsafe {
+ wasi::fd_fdstat_get(self.socket().as_inner().as_raw_fd() as wasi::Fd).map_err(err2io)?
+ };
+
+ let mut flags = fdstat.fs_flags;
+
+ if state {
+ flags |= wasi::FDFLAGS_NONBLOCK;
+ } else {
+ flags &= !wasi::FDFLAGS_NONBLOCK;
+ }
+
+ unsafe {
+ wasi::fd_fdstat_set_flags(self.socket().as_inner().as_raw_fd() as wasi::Fd, flags)
+ .map_err(err2io)
+ }
}
pub fn socket(&self) -> &Socket {
}
pub fn accept(&self) -> io::Result<(TcpStream, SocketAddr)> {
- unsupported()
+ let fd = unsafe {
+ wasi::sock_accept(self.as_inner().as_inner().as_raw_fd() as _, 0).map_err(err2io)?
+ };
+
+ Ok((
+ TcpStream::from_inner(unsafe { Socket::from_raw_fd(fd as _) }),
+ // WASI has no concept of SocketAddr yet
+ // return an unspecified IPv4Addr
+ SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),
+ ))
}
pub fn duplicate(&self) -> io::Result<TcpListener> {
unsupported()
}
- pub fn set_nonblocking(&self, _: bool) -> io::Result<()> {
- unsupported()
+ pub fn set_nonblocking(&self, state: bool) -> io::Result<()> {
+ let fdstat = unsafe {
+ wasi::fd_fdstat_get(self.socket().as_inner().as_raw_fd() as wasi::Fd).map_err(err2io)?
+ };
+
+ let mut flags = fdstat.fs_flags;
+
+ if state {
+ flags |= wasi::FDFLAGS_NONBLOCK;
+ } else {
+ flags &= !wasi::FDFLAGS_NONBLOCK;
+ }
+
+ unsafe {
+ wasi::fd_fdstat_set_flags(self.socket().as_inner().as_raw_fd() as wasi::Fd, flags)
+ .map_err(err2io)
+ }
}
pub fn socket(&self) -> &Socket {
pub const STDIN_BUF_SIZE: usize = crate::sys_common::io::DEFAULT_BUF_SIZE;
pub fn is_ebadf(err: &io::Error) -> bool {
- err.raw_os_error() == Some(wasi::ERRNO_BADF.into())
+ err.raw_os_error() == Some(wasi::ERRNO_BADF.raw().into())
}
pub fn panic_output() -> Option<impl io::Write> {
let in_ = wasi::Subscription {
userdata: USERDATA,
- r#type: wasi::EVENTTYPE_CLOCK,
- u: wasi::SubscriptionU { clock },
+ u: wasi::SubscriptionU { tag: 0, u: wasi::SubscriptionUU { clock } },
};
unsafe {
let mut event: wasi::Event = mem::zeroed();
(
Ok(1),
wasi::Event {
- userdata: USERDATA, error: 0, r#type: wasi::EVENTTYPE_CLOCK, ..
+ userdata: USERDATA,
+ error: wasi::ERRNO_SUCCESS,
+ type_: wasi::EVENTTYPE_CLOCK,
+ ..
},
) => {}
_ => panic!("thread::sleep(): unexpected result of poll_oneoff"),
pub const UNIX_EPOCH: SystemTime = SystemTime(Duration::from_secs(0));
-fn current_time(clock: u32) -> Duration {
+fn current_time(clock: wasi::Clockid) -> Duration {
let ts = unsafe {
wasi::clock_time_get(
clock, 1, // precision... seems ignored though?
use crate::env;
use crate::fs;
use crate::path::{Path, PathBuf};
+ use crate::thread;
use rand::RngCore;
pub struct TempDir(PathBuf);
// Gee, seeing how we're testing the fs module I sure hope that we
// at least implement this correctly!
let TempDir(ref p) = *self;
- fs::remove_dir_all(p).unwrap();
+ let result = fs::remove_dir_all(p);
+ // Avoid panicking while panicking as this causes the process to
+ // immediately abort, without displaying test results.
+ if !thread::panicking() {
+ result.unwrap();
+ }
}
}
/// }
/// ```
///
-/// # Underlying System calls
+/// # Platform-specific behavior
+///
+/// The precision of `SystemTime` can depend on the underlying OS-specific time format.
+/// For example, on Windows the time is represented in 100 nanosecond intervals whereas Linux
+/// can represent nanosecond intervals.
+///
/// Currently, the following system calls are being used to get the current time using `now()`:
///
/// | Platform | System call |
#[test]
#[cfg(all(target_arch = "arm", any(target_os = "linux", target_os = "android")))]
fn arm_linux() {
+ use std::arch::is_arm_feature_detected;
println!("neon: {}", is_arm_feature_detected!("neon"));
println!("pmull: {}", is_arm_feature_detected!("pmull"));
println!("crypto: {}", is_arm_feature_detected!("crypto"));
#[test]
#[cfg(all(target_arch = "aarch64", any(target_os = "linux", target_os = "android")))]
fn aarch64_linux() {
+ use std::arch::is_aarch64_feature_detected;
println!("neon: {}", is_aarch64_feature_detected!("neon"));
println!("asimd: {}", is_aarch64_feature_detected!("asimd"));
println!("pmull: {}", is_aarch64_feature_detected!("pmull"));
#[test]
#[cfg(all(target_arch = "powerpc", target_os = "linux"))]
fn powerpc_linux() {
+ use std::arch::is_powerpc_feature_detected;
println!("altivec: {}", is_powerpc_feature_detected!("altivec"));
println!("vsx: {}", is_powerpc_feature_detected!("vsx"));
println!("power8: {}", is_powerpc_feature_detected!("power8"));
#[test]
#[cfg(all(target_arch = "powerpc64", target_os = "linux"))]
fn powerpc64_linux() {
+ use std::arch::is_powerpc64_feature_detected;
println!("altivec: {}", is_powerpc64_feature_detected!("altivec"));
println!("vsx: {}", is_powerpc64_feature_detected!("vsx"));
println!("power8: {}", is_powerpc64_feature_detected!("power8"));
#[test]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
fn x86_all() {
+ use std::arch::is_x86_feature_detected;
+
// the below is the set of features we can test at runtime, but don't actually
// use to gate anything and are thus not part of the X86_ALLOWED_FEATURES list
-Subproject commit 11c98f6eb9c4ba48b2362ad4960343b312d056b8
+Subproject commit eaee02ffdf5d820729ccdf2f95fa08b08c7d24d2
}
};
- // cfg(bootstrap) -- drop the compiler.stage == 0 branch.
- if compiler.stage == 0 {
- if use_new_symbol_mangling {
- rustflags.arg("-Zsymbol-mangling-version=v0");
- } else {
- rustflags.arg("-Zsymbol-mangling-version=legacy");
- }
+ if use_new_symbol_mangling {
+ rustflags.arg("-Csymbol-mangling-version=v0");
} else {
- if use_new_symbol_mangling {
- rustflags.arg("-Csymbol-mangling-version=v0");
- } else {
- rustflags.arg("-Csymbol-mangling-version=legacy");
- rustflags.arg("-Zunstable-options");
- }
+ rustflags.arg("-Csymbol-mangling-version=legacy");
+ rustflags.arg("-Zunstable-options");
}
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,
if !path.starts_with(suite_path) {
return None;
}
- let exists = path.is_dir() || path.is_file();
+ let abs_path = builder.src.join(path);
+ let exists = abs_path.is_dir() || abs_path.is_file();
if !exists {
- if let Some(p) = path.to_str() {
+ if let Some(p) = abs_path.to_str() {
builder.info(&format!("Warning: Skipping \"{}\": not a regular file or directory", p));
}
return None;
# https://github.com/puppeteer/puppeteer/issues/375
#
# We also specify the version in case we need to update it to go around cache limitations.
-RUN npm install -g browser-ui-test@0.5.3 --unsafe-perm=true
+RUN npm install -g browser-ui-test@0.5.8 --unsafe-perm=true
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
# macOS Builders #
####################
- # Only generate documentation for x86_64-apple-darwin, not other
- # tier 2 targets produced by this builder.
- name: dist-x86_64-apple
env:
- SCRIPT: ./x.py dist --exclude rust-docs --exclude extended && ./x.py dist --target=x86_64-apple-darwin rust-docs && ./x.py dist extended
- RUST_CONFIGURE_ARGS: --host=x86_64-apple-darwin --target=x86_64-apple-darwin,aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
+ SCRIPT: ./x.py dist --host=x86_64-apple-darwin --target=x86_64-apple-darwin
+ RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
MACOSX_DEPLOYMENT_TARGET: 10.7
NO_LLVM_ASSERTIONS: 1
DIST_REQUIRE_ALL_TOOLS: 1
<<: *job-macos-xl
+ - name: dist-apple-various
+ env:
+ SCRIPT: ./x.py dist --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim
+ RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
+ RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
+ MACOSX_DEPLOYMENT_TARGET: 10.7
+ NO_LLVM_ASSERTIONS: 1
+ NO_DEBUG_ASSERTIONS: 1
+ NO_OVERFLOW_CHECKS: 1
+ <<: *job-macos-xl
+
- name: dist-x86_64-apple-alt
env:
SCRIPT: ./x.py dist
-Subproject commit 1ca6a7bd1d73edc4a3e6c7d6a40f5d4b66c1e517
+Subproject commit 18c0055b8aea49391e8f758a4400097999c9cf1e
- [Github tagged RFCs]
- [Github tagged issues]
- [RFC (stalled) front page styleguide]
-- [Guide on how to write documenation for a Rust crate]
+- [Guide on how to write documentation for a Rust crate]
[API Guidelines]: https://rust-lang.github.io/api-guidelines/documentation.html
[Github tagged RFCs]: https://github.com/rust-lang/rfcs/issues?q=label%3AT-rustdoc
[Github tagged issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AT-rustdoc
-[Guide on how to write documenation for a Rust crate]: https://blog.guillaume-gomez.fr/articles/2020-03-12+Guide+on+how+to+write+documentation+for+a+Rust+crate
+[Guide on how to write documentation for a Rust crate]: https://blog.guillaume-gomez.fr/articles/2020-03-12+Guide+on+how+to+write+documentation+for+a+Rust+crate
[Learn Rust]: https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments
[RFC 1574: More API Documentation Conventions]: https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html
[RFC 1946: Intra Rustdoc Links]: https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html
mod blanket_impl;
crate mod cfg;
crate mod inline;
+mod render_macro_matchers;
mod simplify;
crate mod types;
crate mod utils;
--- /dev/null
+use rustc_ast::token::{self, BinOpToken, DelimToken};
+use rustc_ast::tokenstream::{TokenStream, TokenTree};
+use rustc_ast_pretty::pprust::state::State as Printer;
+use rustc_ast_pretty::pprust::PrintState;
+use rustc_middle::ty::TyCtxt;
+use rustc_session::parse::ParseSess;
+use rustc_span::source_map::FilePathMapping;
+use rustc_span::symbol::{kw, Ident, Symbol};
+use rustc_span::Span;
+
+/// Render a macro matcher in a format suitable for displaying to the user
+/// as part of an item declaration.
+pub(super) fn render_macro_matcher(tcx: TyCtxt<'_>, matcher: &TokenTree) -> String {
+ if let Some(snippet) = snippet_equal_to_token(tcx, matcher) {
+ // If the original source code is known, we display the matcher exactly
+ // as present in the source code.
+ return snippet;
+ }
+
+ // If the matcher is macro-generated or some other reason the source code
+ // snippet is not available, we attempt to nicely render the token tree.
+ let mut printer = Printer::new();
+
+ // If the inner ibox fits on one line, we get:
+ //
+ // macro_rules! macroname {
+ // (the matcher) => {...};
+ // }
+ //
+ // If the inner ibox gets wrapped, the cbox will break and get indented:
+ //
+ // macro_rules! macroname {
+ // (
+ // the matcher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+ // ) => {...};
+ // }
+ printer.cbox(8);
+ printer.word("(");
+ printer.zerobreak();
+ printer.ibox(0);
+ match matcher {
+ TokenTree::Delimited(_span, _delim, tts) => print_tts(&mut printer, tts),
+ // Matcher which is not a Delimited is unexpected and should've failed
+ // to compile, but we render whatever it is wrapped in parens.
+ TokenTree::Token(_) => print_tt(&mut printer, matcher),
+ }
+ printer.end();
+ printer.break_offset_if_not_bol(0, -4);
+ printer.word(")");
+ printer.end();
+ printer.s.eof()
+}
+
+/// Find the source snippet for this token's Span, reparse it, and return the
+/// snippet if the reparsed TokenTree matches the argument TokenTree.
+fn snippet_equal_to_token(tcx: TyCtxt<'_>, matcher: &TokenTree) -> Option<String> {
+ // Find what rustc thinks is the source snippet.
+ // This may not actually be anything meaningful if this matcher was itself
+ // generated by a macro.
+ let source_map = tcx.sess.source_map();
+ let span = matcher.span();
+ let snippet = source_map.span_to_snippet(span).ok()?;
+
+ // Create a Parser.
+ let sess = ParseSess::new(FilePathMapping::empty());
+ let file_name = source_map.span_to_filename(span);
+ let mut parser =
+ match rustc_parse::maybe_new_parser_from_source_str(&sess, file_name, snippet.clone()) {
+ Ok(parser) => parser,
+ Err(diagnostics) => {
+ for mut diagnostic in diagnostics {
+ diagnostic.cancel();
+ }
+ return None;
+ }
+ };
+
+ // Reparse a single token tree.
+ let mut reparsed_trees = match parser.parse_all_token_trees() {
+ Ok(reparsed_trees) => reparsed_trees,
+ Err(mut diagnostic) => {
+ diagnostic.cancel();
+ return None;
+ }
+ };
+ if reparsed_trees.len() != 1 {
+ return None;
+ }
+ let reparsed_tree = reparsed_trees.pop().unwrap();
+
+ // Compare against the original tree.
+ if reparsed_tree.eq_unspanned(matcher) { Some(snippet) } else { None }
+}
+
+fn print_tt(printer: &mut Printer<'_>, tt: &TokenTree) {
+ match tt {
+ TokenTree::Token(token) => {
+ let token_str = printer.token_to_string(token);
+ printer.word(token_str);
+ if let token::DocComment(..) = token.kind {
+ printer.hardbreak()
+ }
+ }
+ TokenTree::Delimited(_span, delim, tts) => {
+ let open_delim = printer.token_kind_to_string(&token::OpenDelim(*delim));
+ printer.word(open_delim);
+ if !tts.is_empty() {
+ if *delim == DelimToken::Brace {
+ printer.space();
+ }
+ print_tts(printer, tts);
+ if *delim == DelimToken::Brace {
+ printer.space();
+ }
+ }
+ let close_delim = printer.token_kind_to_string(&token::CloseDelim(*delim));
+ printer.word(close_delim);
+ }
+ }
+}
+
+fn print_tts(printer: &mut Printer<'_>, tts: &TokenStream) {
+ #[derive(Copy, Clone, PartialEq)]
+ enum State {
+ Start,
+ Dollar,
+ DollarIdent,
+ DollarIdentColon,
+ DollarParen,
+ DollarParenSep,
+ Pound,
+ PoundBang,
+ Ident,
+ Other,
+ }
+
+ use State::*;
+
+ let mut state = Start;
+ for tt in tts.trees() {
+ let (needs_space, next_state) = match &tt {
+ TokenTree::Token(tt) => match (state, &tt.kind) {
+ (Dollar, token::Ident(..)) => (false, DollarIdent),
+ (DollarIdent, token::Colon) => (false, DollarIdentColon),
+ (DollarIdentColon, token::Ident(..)) => (false, Other),
+ (
+ DollarParen,
+ token::BinOp(BinOpToken::Plus | BinOpToken::Star) | token::Question,
+ ) => (false, Other),
+ (DollarParen, _) => (false, DollarParenSep),
+ (DollarParenSep, token::BinOp(BinOpToken::Plus | BinOpToken::Star)) => {
+ (false, Other)
+ }
+ (Pound, token::Not) => (false, PoundBang),
+ (_, token::Ident(symbol, /* is_raw */ false))
+ if !usually_needs_space_between_keyword_and_open_delim(*symbol, tt.span) =>
+ {
+ (true, Ident)
+ }
+ (_, token::Comma | token::Semi) => (false, Other),
+ (_, token::Dollar) => (true, Dollar),
+ (_, token::Pound) => (true, Pound),
+ (_, _) => (true, Other),
+ },
+ TokenTree::Delimited(_, delim, _) => match (state, delim) {
+ (Dollar, DelimToken::Paren) => (false, DollarParen),
+ (Pound | PoundBang, DelimToken::Bracket) => (false, Other),
+ (Ident, DelimToken::Paren | DelimToken::Bracket) => (false, Other),
+ (_, _) => (true, Other),
+ },
+ };
+ if state != Start && needs_space {
+ printer.space();
+ }
+ print_tt(printer, &tt);
+ state = next_state;
+ }
+}
+
+fn usually_needs_space_between_keyword_and_open_delim(symbol: Symbol, span: Span) -> bool {
+ let ident = Ident { name: symbol, span };
+ let is_keyword = ident.is_used_keyword() || ident.is_unused_keyword();
+ if !is_keyword {
+ // An identifier that is not a keyword usually does not need a space
+ // before an open delim. For example: `f(0)` or `f[0]`.
+ return false;
+ }
+
+ match symbol {
+ // No space after keywords that are syntactically an expression. For
+ // example: a tuple struct created with `let _ = Self(0, 0)`, or if
+ // someone has `impl Index<MyStruct> for bool` then `true[MyStruct]`.
+ kw::False | kw::SelfLower | kw::SelfUpper | kw::True => false,
+
+ // No space, as in `let _: fn();`
+ kw::Fn => false,
+
+ // No space, as in `pub(crate) type T;`
+ kw::Pub => false,
+
+ // No space for keywords that can end an expression, as in `fut.await()`
+ // where fut's Output type is `fn()`.
+ kw::Await => false,
+
+ // Otherwise space after keyword. Some examples:
+ //
+ // `expr as [T; 2]`
+ // ^
+ // `box (tuple,)`
+ // ^
+ // `break (tuple,)`
+ // ^
+ // `type T = dyn (Fn() -> dyn Trait) + Send;`
+ // ^
+ // `for (tuple,) in iter {}`
+ // ^
+ // `if (tuple,) == v {}`
+ // ^
+ // `impl [T] {}`
+ // ^
+ // `for x in [..] {}`
+ // ^
+ // `let () = unit;`
+ // ^
+ // `match [x, y] {...}`
+ // ^
+ // `&mut (x as T)`
+ // ^
+ // `return [];`
+ // ^
+ // `fn f<T>() where (): Into<T>`
+ // ^
+ // `while (a + b).what() {}`
+ // ^
+ // `yield [];`
+ // ^
+ _ => true,
+ }
+}
}
/// Indicates where an external crate can be found.
+#[derive(Debug)]
crate enum ExternalLocation {
/// Remote URL root of the external crate
Remote(String),
/// Use this method to get the [DefId] of a [clean] AST node, including [PrimitiveType]s.
///
- /// See [`Self::def_id_no_primitives`] for more.
- ///
/// [clean]: crate::clean
crate fn def_id(&self, cache: &Cache) -> Option<DefId> {
self.inner_def_id(Some(cache))
}
-
- /// Use this method to get the [`DefId`] of a [`clean`] AST node.
- /// This will return [`None`] when called on a primitive [`clean::Type`].
- /// Use [`Self::def_id`] if you want to include primitives.
- ///
- /// [`clean`]: crate::clean
- /// [`clean::Type`]: crate::clean::Type
- // FIXME: get rid of this function and always use `def_id`
- crate fn def_id_no_primitives(&self) -> Option<DefId> {
- self.inner_def_id(None)
- }
}
/// A primitive (aka, builtin) type.
use crate::clean::auto_trait::AutoTraitFinder;
use crate::clean::blanket_impl::BlanketImplFinder;
+use crate::clean::render_macro_matchers::render_macro_matcher;
use crate::clean::{
inline, Clean, Crate, ExternalCrate, Generic, GenericArg, GenericArgs, ImportSource, Item,
ItemKind, Lifetime, Path, PathSegment, Primitive, PrimitiveType, Type, TypeBinding, Visibility,
use rustc_middle::mir::interpret::ConstValue;
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
use rustc_middle::ty::{self, DefIdTree, TyCtxt};
-use rustc_session::parse::ParseSess;
-use rustc_span::source_map::FilePathMapping;
use rustc_span::symbol::{kw, sym, Symbol};
use std::fmt::Write as _;
use std::mem;
out
}
-/// Render a macro matcher in a format suitable for displaying to the user
-/// as part of an item declaration.
-pub(super) fn render_macro_matcher(tcx: TyCtxt<'_>, matcher: &TokenTree) -> String {
- if let Some(snippet) = snippet_equal_to_token(tcx, matcher) {
- snippet
- } else {
- rustc_ast_pretty::pprust::tt_to_string(matcher)
- }
-}
-
-/// Find the source snippet for this token's Span, reparse it, and return the
-/// snippet if the reparsed TokenTree matches the argument TokenTree.
-fn snippet_equal_to_token(tcx: TyCtxt<'_>, matcher: &TokenTree) -> Option<String> {
- // Find what rustc thinks is the source snippet.
- // This may not actually be anything meaningful if this matcher was itself
- // generated by a macro.
- let source_map = tcx.sess.source_map();
- let span = matcher.span();
- let snippet = source_map.span_to_snippet(span).ok()?;
-
- // Create a Parser.
- let sess = ParseSess::new(FilePathMapping::empty());
- let file_name = source_map.span_to_filename(span);
- let mut parser =
- match rustc_parse::maybe_new_parser_from_source_str(&sess, file_name, snippet.clone()) {
- Ok(parser) => parser,
- Err(diagnostics) => {
- for mut diagnostic in diagnostics {
- diagnostic.cancel();
- }
- return None;
- }
- };
-
- // Reparse a single token tree.
- let mut reparsed_trees = match parser.parse_all_token_trees() {
- Ok(reparsed_trees) => reparsed_trees,
- Err(mut diagnostic) => {
- diagnostic.cancel();
- return None;
- }
- };
- if reparsed_trees.len() != 1 {
- return None;
- }
- let reparsed_tree = reparsed_trees.pop().unwrap();
-
- // Compare against the original tree.
- if reparsed_tree.eq_unspanned(matcher) { Some(snippet) } else { None }
-}
-
pub(super) fn display_macro_source(
cx: &mut DocContext<'_>,
name: Symbol,
desc,
parent,
parent_idx: None,
- search_type: get_function_type_for_search(&item, self.tcx),
+ search_type: get_function_type_for_search(&item, self.tcx, self.cache),
aliases: item.attrs.get_doc_aliases(),
});
}
fn write_srclink(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer) {
if let Some(l) = cx.src_href(item) {
- write!(buf, "<a class=\"srclink\" href=\"{}\" title=\"goto source code\">source</a>", l)
+ write!(buf, "<a class=\"srclink\" href=\"{}\">source</a>", l)
}
}
containing_item.stable_since(tcx),
const_stable_since,
);
- if has_stability {
+ let mut tmp_buf = Buffer::empty_from(w);
+ write_srclink(cx, item, &mut tmp_buf);
+ if has_stability && !tmp_buf.is_empty() {
w.write_str(" · ");
}
-
- write_srclink(cx, item, w);
+ w.push_buffer(tmp_buf);
w.write_str("</div>");
}
use rustc_data_structures::fx::FxHashMap;
use rustc_middle::ty::TyCtxt;
-use rustc_span::symbol::Symbol;
+use rustc_span::symbol::{kw, Symbol};
use serde::ser::{Serialize, SerializeStruct, Serializer};
use crate::clean;
desc,
parent: Some(did),
parent_idx: None,
- search_type: get_function_type_for_search(item, tcx),
+ search_type: get_function_type_for_search(item, tcx, &cache),
aliases: item.attrs.get_doc_aliases(),
});
}
crate fn get_function_type_for_search<'tcx>(
item: &clean::Item,
tcx: TyCtxt<'tcx>,
+ cache: &Cache,
) -> Option<IndexItemFunctionType> {
let (mut inputs, mut output) = match *item.kind {
- clean::FunctionItem(ref f) => get_fn_inputs_and_outputs(f, tcx),
- clean::MethodItem(ref m, _) => get_fn_inputs_and_outputs(m, tcx),
- clean::TyMethodItem(ref m) => get_fn_inputs_and_outputs(m, tcx),
+ clean::FunctionItem(ref f) => get_fn_inputs_and_outputs(f, tcx, cache),
+ clean::MethodItem(ref m, _) => get_fn_inputs_and_outputs(m, tcx, cache),
+ clean::TyMethodItem(ref m) => get_fn_inputs_and_outputs(m, tcx, cache),
_ => return None,
};
let path = &bounds[0].trait_;
Some(path.segments.last().unwrap().name)
}
- clean::Generic(s) => Some(s),
+ // We return an empty name because we don't care about the generic name itself.
+ clean::Generic(_) => Some(kw::Empty),
clean::Primitive(ref p) => Some(p.as_sym()),
clean::BorrowedRef { ref type_, .. } => get_index_type_name(type_),
clean::BareFunction(_)
///
/// Important note: It goes through generics recursively. So if you have
/// `T: Option<Result<(), ()>>`, it'll go into `Option` and then into `Result`.
-#[instrument(level = "trace", skip(tcx, res))]
+#[instrument(level = "trace", skip(tcx, res, cache))]
fn add_generics_and_bounds_as_types<'tcx>(
generics: &Generics,
arg: &Type,
tcx: TyCtxt<'tcx>,
recurse: usize,
res: &mut Vec<TypeWithKind>,
+ cache: &Cache,
) {
fn insert_ty(
res: &mut Vec<TypeWithKind>,
tcx: TyCtxt<'_>,
ty: Type,
mut generics: Vec<TypeWithKind>,
+ cache: &Cache,
) {
let is_full_generic = ty.is_full_generic();
+ let generics_empty = generics.is_empty();
if is_full_generic {
- if generics.is_empty() {
+ if generics_empty {
// This is a type parameter with no trait bounds (for example: `T` in
// `fn f<T>(p: T)`, so not useful for the rustdoc search because we would end up
// with an empty type with an empty name. Let's just discard it.
}
}
let mut index_ty = get_index_type(&ty, generics);
- if index_ty.name.as_ref().map(|s| s.is_empty()).unwrap_or(true) {
+ if index_ty.name.as_ref().map(|s| s.is_empty() && generics_empty).unwrap_or(true) {
return;
}
if is_full_generic {
// We remove the name of the full generic because we have no use for it.
index_ty.name = Some(String::new());
res.push(TypeWithKind::from((index_ty, ItemType::Generic)));
- } else if let Some(kind) = ty.def_id_no_primitives().map(|did| tcx.def_kind(did).into()) {
+ } else if let Some(kind) = ty.def_id(cache).map(|did| tcx.def_kind(did).into()) {
res.push(TypeWithKind::from((index_ty, kind)));
} else if ty.is_primitive() {
// This is a primitive, let's store it as such.
if let Type::Generic(arg_s) = *arg {
// First we check if the bounds are in a `where` predicate...
if let Some(where_pred) = generics.where_predicates.iter().find(|g| match g {
- WherePredicate::BoundPredicate { ty, .. } => {
- ty.def_id_no_primitives() == arg.def_id_no_primitives()
- }
+ WherePredicate::BoundPredicate { ty, .. } => ty.def_id(cache) == arg.def_id(cache),
_ => false,
}) {
let mut ty_generics = Vec::new();
tcx,
recurse + 1,
&mut ty_generics,
+ cache,
)
}
_ => {}
}
}
}
- insert_ty(res, tcx, arg.clone(), ty_generics);
+ insert_ty(res, tcx, arg.clone(), ty_generics, cache);
}
// Otherwise we check if the trait bounds are "inlined" like `T: Option<u32>`...
if let Some(bound) = generics.params.iter().find(|g| g.is_type() && g.name == arg_s) {
tcx,
recurse + 1,
&mut ty_generics,
+ cache,
);
}
}
- insert_ty(res, tcx, arg.clone(), ty_generics);
+ insert_ty(res, tcx, arg.clone(), ty_generics, cache);
}
} else {
// This is not a type parameter. So for example if we have `T, U: Option<T>`, and we're
let mut ty_generics = Vec::new();
if let Some(arg_generics) = arg.generics() {
for gen in arg_generics.iter() {
- add_generics_and_bounds_as_types(generics, gen, tcx, recurse + 1, &mut ty_generics);
+ add_generics_and_bounds_as_types(
+ generics,
+ gen,
+ tcx,
+ recurse + 1,
+ &mut ty_generics,
+ cache,
+ );
}
}
- insert_ty(res, tcx, arg.clone(), ty_generics);
+ insert_ty(res, tcx, arg.clone(), ty_generics, cache);
}
}
fn get_fn_inputs_and_outputs<'tcx>(
func: &Function,
tcx: TyCtxt<'tcx>,
+ cache: &Cache,
) -> (Vec<TypeWithKind>, Vec<TypeWithKind>) {
let decl = &func.decl;
let generics = &func.generics;
continue;
}
let mut args = Vec::new();
- add_generics_and_bounds_as_types(generics, &arg.type_, tcx, 0, &mut args);
+ add_generics_and_bounds_as_types(generics, &arg.type_, tcx, 0, &mut args, cache);
if !args.is_empty() {
all_types.extend(args);
} else {
- if let Some(kind) = arg.type_.def_id_no_primitives().map(|did| tcx.def_kind(did).into())
- {
+ if let Some(kind) = arg.type_.def_id(cache).map(|did| tcx.def_kind(did).into()) {
all_types.push(TypeWithKind::from((get_index_type(&arg.type_, vec![]), kind)));
}
}
let mut ret_types = Vec::new();
match decl.output {
FnRetTy::Return(ref return_type) => {
- add_generics_and_bounds_as_types(generics, return_type, tcx, 0, &mut ret_types);
+ add_generics_and_bounds_as_types(generics, return_type, tcx, 0, &mut ret_types, cache);
if ret_types.is_empty() {
- if let Some(kind) =
- return_type.def_id_no_primitives().map(|did| tcx.def_kind(did).into())
- {
+ if let Some(kind) = return_type.def_id(cache).map(|did| tcx.def_kind(did).into()) {
ret_types.push(TypeWithKind::from((get_index_type(return_type, vec![]), kind)));
}
}
vertical-align: middle;
border: solid 1px;
border-radius: 3px;
- box-shadow: inset 0 -1px 0;
cursor: default;
}
background-color: rgba(0,0,0,0);
margin: 0;
padding: 0;
- padding-left: 15px;
z-index: 11;
+ /* Reduce height slightly to account for mobile topbar. */
+ height: calc(100vh - 45px);
}
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
padding: 0.3em;
padding-right: 0.6em;
text-overflow: ellipsis;
- overflow-x: hidden;
+ overflow: hidden;
+ white-space: nowrap;
+ /* Rare exception to specifying font sizes in rem. Since the topbar
+ height is specified in pixels, this also has to be specified in
+ pixels to avoid overflowing the topbar when the user sets a bigger
+ font size. */
+ font-size: 22.4px;
}
.mobile-topbar .logo-container {
.sidebar-menu-toggle {
width: 45px;
+ /* Rare exception to specifying font sizes in rem. Since this is acting
+ as an icon, it's okay to specify its sizes in pixels. */
+ font-size: 32px;
border: none;
}
pre.rust a,
.sidebar h2 a,
.sidebar h3 a,
+.mobile-topbar h2 a,
.in-band a {
color: #c5c5c5;
}
background-color: #314559;
border-color: #5c6773;
border-bottom-color: #5c6773;
- box-shadow-color: #c6cbd1;
+ box-shadow: inset 0 -1px 0 #5c6773;
}
#theme-picker, #settings-menu, #help-button {
background: #616161;
}
.toggle-line:hover .toggle-line-inner {
- background: ##898989;
+ background: #898989;
}
pre.rust a,
.sidebar h2 a,
.sidebar h3 a,
+.mobile-topbar h2 a,
.in-band a {
color: #ddd;
}
background-color: #fafbfc;
border-color: #d1d5da;
border-bottom-color: #c6cbd1;
- box-shadow-color: #c6cbd1;
+ box-shadow: inset 0 -1px 0 #c6cbd1;
}
#theme-picker, #settings-menu, #help-button {
background: #616161;
}
.toggle-line:hover .toggle-line-inner {
- background: ##898989;
+ background: #898989;
}
}
.rust-logo {
- /* No need for a border in here! */
+ /* This rule exists to force other themes to explicitly style the logo.
+ * Rustdoc has a custom linter for this purpose.
+ */
}
/* Improve the scrollbar display on webkit-based browsers */
pre.rust a,
.sidebar h2 a,
.sidebar h3 a,
+.mobile-topbar h2 a,
.in-band a {
color: #000;
}
background-color: #fafbfc;
border-color: #d1d5da;
border-bottom-color: #c6cbd1;
- box-shadow-color: #c6cbd1;
+ box-shadow: inset 0 -1px 0 #c6cbd1;
}
#theme-picker, #settings-menu, #help-button {
var mobileLocationTitle = document.querySelector(".mobile-topbar h2.location");
var locationTitle = document.querySelector(".sidebar h2.location");
if (mobileLocationTitle && locationTitle) {
- mobileLocationTitle.innerText = locationTitle.innerText;
+ mobileLocationTitle.innerHTML = locationTitle.innerHTML;
}
}
}());
{% endif %}
{%- match src_href -%}
{%- when Some with (href) -%}
- <a class="srclink" href="{{href|safe}}" title="goto source code">source</a> · {# -#}
+ <a class="srclink" href="{{href|safe}}">source</a> · {# -#}
{%- else -%}
{%- endmatch -%}
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> {#- -#}
///
/// NOTE: this cannot be a query because more traits could be available when more crates are compiled!
/// So it is not stable to serialize cross-crate.
+#[instrument(level = "debug", skip(cx))]
fn trait_impls_for<'a>(
cx: &mut DocContext<'a>,
ty: Ty<'a>,
all_trait_impls: Default::default(),
};
+ // Because of the `crate::` prefix, any doc comment can reference
+ // the crate root's set of in-scope traits. This line makes sure
+ // it's available.
+ loader.add_traits_in_scope(CRATE_DEF_ID.to_def_id());
+
// Overridden `visit_item` below doesn't apply to the crate root,
// so we have to visit its attributes and reexports separately.
loader.load_links_in_attrs(&krate.attrs, krate.span);
if let ItemKind::Mod(..) = item.kind {
let old_mod = mem::replace(&mut self.current_mod, self.resolver.local_def_id(item.id));
+ // A module written with a outline doc comments will resolve traits relative
+ // to the parent module. Make sure the parent module's traits-in-scope are
+ // loaded, even if the module itself has no doc comments.
+ self.add_traits_in_parent_scope(self.current_mod.to_def_id());
+
self.load_links_in_attrs(&item.attrs, item.span);
self.process_module_children_or_reexports(self.current_mod.to_def_id());
visit::walk_item(self, item);
use super::Pass;
use crate::clean::*;
use crate::core::DocContext;
+use crate::formats::cache::Cache;
use crate::visit::DocVisitor;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
}
});
- let mut cleaner = BadImplStripper { prims, items: crate_items };
+ let mut cleaner = BadImplStripper { prims, items: crate_items, cache: &cx.cache };
let mut type_did_to_deref_target: FxHashMap<DefId, &Type> = FxHashMap::default();
// Follow all `Deref` targets of included items and recursively add them as valid
fn add_deref_target(
cx: &DocContext<'_>,
map: &FxHashMap<DefId, &Type>,
- cleaner: &mut BadImplStripper,
+ cleaner: &mut BadImplStripper<'_>,
type_did: DefId,
) {
if let Some(target) = map.get(&type_did) {
} else if let Some(did) = target.def_id(&cx.cache) {
cleaner.items.insert(did.into());
}
- if let Some(for_did) = for_.def_id_no_primitives() {
+ if let Some(for_did) = for_.def_id(&cx.cache) {
if type_did_to_deref_target.insert(for_did, target).is_none() {
// Since only the `DefId` portion of the `Type` instances is known to be same for both the
// `Deref` target type and the impl for type positions, this map of types is keyed by
}
}
-struct BadImplStripper {
+struct BadImplStripper<'a> {
prims: FxHashSet<PrimitiveType>,
items: FxHashSet<ItemId>,
+ cache: &'a Cache,
}
-impl BadImplStripper {
+impl<'a> BadImplStripper<'a> {
fn keep_impl(&self, ty: &Type, is_deref: bool) -> bool {
if let Generic(_) = ty {
// keep impls made on generics
true
} else if let Some(prim) = ty.primitive_type() {
self.prims.contains(&prim)
- } else if let Some(did) = ty.def_id_no_primitives() {
+ } else if let Some(did) = ty.def_id(self.cache) {
is_deref || self.keep_impl_with_def_id(did.into())
} else {
false
};
/// Strip items marked `#[doc(hidden)]`
-crate fn strip_hidden(krate: clean::Crate, _: &mut DocContext<'_>) -> clean::Crate {
+crate fn strip_hidden(krate: clean::Crate, cx: &mut DocContext<'_>) -> clean::Crate {
let mut retained = ItemIdSet::default();
// strip all #[doc(hidden)] items
};
// strip all impls referencing stripped items
- let mut stripper = ImplStripper { retained: &retained };
+ let mut stripper = ImplStripper { retained: &retained, cache: &cx.cache };
stripper.fold_crate(krate)
}
}
// strip all impls referencing private items
- let mut stripper = ImplStripper { retained: &retained };
+ let mut stripper = ImplStripper { retained: &retained, cache: &cx.cache };
stripper.fold_crate(krate)
}
use crate::clean::{self, Item, ItemIdSet};
use crate::fold::{strip_item, DocFolder};
+use crate::formats::cache::Cache;
crate struct Stripper<'a> {
crate retained: &'a mut ItemIdSet,
/// This stripper discards all impls which reference stripped items
crate struct ImplStripper<'a> {
crate retained: &'a ItemIdSet,
+ crate cache: &'a Cache,
}
impl<'a> DocFolder for ImplStripper<'a> {
if imp.trait_.is_none() && imp.items.is_empty() {
return None;
}
- if let Some(did) = imp.for_.def_id_no_primitives() {
+ if let Some(did) = imp.for_.def_id(self.cache) {
if did.is_local() && !imp.for_.is_assoc_ty() && !self.retained.contains(&did.into())
{
debug!("ImplStripper: impl item for stripped type; removing");
}
if let Some(generics) = imp.trait_.as_ref().and_then(|t| t.generics()) {
for typaram in generics {
- if let Some(did) = typaram.def_id_no_primitives() {
+ if let Some(did) = typaram.def_id(self.cache) {
if did.is_local() && !self.retained.contains(&did.into()) {
debug!(
"ImplStripper: stripped item in trait's generics; removing impl"
-Subproject commit 221a195b62f4373a8893f4d022e4ce981b09a857
+Subproject commit b6b46f596a7d2523ee1acd1c00e699615849da60
"__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": "2021-11-30",
+ "date": "2022-01-28",
"version": "beta"
},
"rustfmt": {
- "date": "2021-11-30",
+ "date": "2022-01-28",
"version": "nightly"
},
"checksums_sha256": {
- "dist/2021-11-30/cargo-beta-aarch64-apple-darwin.tar.gz": "f7dadcadc22aab3ed9ddd737a9c2af05f42ffe48b431bbad5d43128130480279",
- "dist/2021-11-30/cargo-beta-aarch64-apple-darwin.tar.xz": "0ee7c052bb1fd3f3655d9ff74b3f38ebb256d3f523750dbde1be9bceb207cda9",
- "dist/2021-11-30/cargo-beta-aarch64-pc-windows-msvc.tar.gz": "68d914f773b122bd1ceae13a55d3c8365753d09d4371e3962401b9a48945cf20",
- "dist/2021-11-30/cargo-beta-aarch64-pc-windows-msvc.tar.xz": "b0204e516f0c22b956f227555be5665df96c4e0f60281592b00678b4ea8ad4e9",
- "dist/2021-11-30/cargo-beta-aarch64-unknown-linux-gnu.tar.gz": "77b771198aaf78c039df9c08493a9af5d1eb02e6b88bd4fc3b42269cdbf582d0",
- "dist/2021-11-30/cargo-beta-aarch64-unknown-linux-gnu.tar.xz": "6f6465db2c726cc3d2db73150377ed17cbe164297f8cbffc51c8194494cb0384",
- "dist/2021-11-30/cargo-beta-aarch64-unknown-linux-musl.tar.gz": "76a8001adffd5d7a607459f1726f3d68c95e6eb4925eac9ccb77b213c37d2385",
- "dist/2021-11-30/cargo-beta-aarch64-unknown-linux-musl.tar.xz": "07dac7cfe68cb6b0a1872728c1dfb3fde0f9fa27a08933494faaf58a5e35865a",
- "dist/2021-11-30/cargo-beta-arm-unknown-linux-gnueabi.tar.gz": "d2d6d2b56cbcc8bb5b2139818770fc155146d6b4469678de8a1e8249f15137d7",
- "dist/2021-11-30/cargo-beta-arm-unknown-linux-gnueabi.tar.xz": "5f97d1449b9c4461be47615ab49ec408d8f1981b7a1bc0d7b7cce606c14cd5ed",
- "dist/2021-11-30/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz": "097d346e828a37ae5be077f0896796ab6238194846f8ae279cd9e2f510645625",
- "dist/2021-11-30/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz": "71a7906aea42e1048fc43828ece3da720eea4f9d4ff59e970e273f0fe9191e12",
- "dist/2021-11-30/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz": "20e49a6995503dd8215dc9f56ffb87dc9f07fe85a1b0d2f409313836dc0dda3f",
- "dist/2021-11-30/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz": "b9388524cec65e789bb5eaf22cfd63ce837b9a98d1b769901597c6f061f1b93d",
- "dist/2021-11-30/cargo-beta-i686-pc-windows-gnu.tar.gz": "7b0bf29bc67904a64560402891d60506a29b7cd64007d7c1f4e168a574009a9c",
- "dist/2021-11-30/cargo-beta-i686-pc-windows-gnu.tar.xz": "c580c17566e36cbb91945e0fb9e592ac7578d32da948c70aabb90de80000f5c8",
- "dist/2021-11-30/cargo-beta-i686-pc-windows-msvc.tar.gz": "e34436449fb69b8ca696b4bcba8e18a612fee189ad8069d765813d39c708ad58",
- "dist/2021-11-30/cargo-beta-i686-pc-windows-msvc.tar.xz": "322836c74da2b221426782e4b5e174571d1da1935d478b4b8b948608a28a20e8",
- "dist/2021-11-30/cargo-beta-i686-unknown-linux-gnu.tar.gz": "ab2361cb4cbe44331e34a50728dd56a3db220e08f1b29452f781ee075b236c33",
- "dist/2021-11-30/cargo-beta-i686-unknown-linux-gnu.tar.xz": "6375ef38e8e6270d6d932d176a7e62014daf153e873667f6d4a5335fa15f8bf3",
- "dist/2021-11-30/cargo-beta-mips-unknown-linux-gnu.tar.gz": "3e80c94aef4511090e6a83f64b304b835ae2a8e769d3beec96e3f08c0faca01c",
- "dist/2021-11-30/cargo-beta-mips-unknown-linux-gnu.tar.xz": "af954c96c823d711b372c94a2f2bab32536a4e39bcdd0351674252837096f8b4",
- "dist/2021-11-30/cargo-beta-mips64-unknown-linux-gnuabi64.tar.gz": "92464fb6d0691a591637cf342842b42b940f8a84525f1e1f51493734f2ad7b1b",
- "dist/2021-11-30/cargo-beta-mips64-unknown-linux-gnuabi64.tar.xz": "5ddeb87b53749bc532322ee8435fd442adbfaa5e80f3b614b7153c40f46d63d1",
- "dist/2021-11-30/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "1c60eccc658664853232131fb48dc5d2c66340bb95d242084c211c59407fa667",
- "dist/2021-11-30/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "257aab89cd0d5d9af408fc346aeccb8d51e1eba5dc0db074db1f4b57a8d4aab2",
- "dist/2021-11-30/cargo-beta-mipsel-unknown-linux-gnu.tar.gz": "20b1fa2138a547f5f6644acfbca9e73f8d228578a600c7710cb2fc34a20eb058",
- "dist/2021-11-30/cargo-beta-mipsel-unknown-linux-gnu.tar.xz": "134dde13eb7dedb8fc608acae62d715937c168a9fe5a449262e9ac9b3f042396",
- "dist/2021-11-30/cargo-beta-powerpc-unknown-linux-gnu.tar.gz": "4ffca03462b91b9cbb02a022546aa0e16118eb1950a8f040929e5bfceee2b9f7",
- "dist/2021-11-30/cargo-beta-powerpc-unknown-linux-gnu.tar.xz": "14bfd567241f969de712240f78d83d21dab0bd11ac42da38a2b02da7a59a9dc9",
- "dist/2021-11-30/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz": "f44113175429958961148bef66d0ec1b52850c19c035ac83b0d20139e1116d97",
- "dist/2021-11-30/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz": "3e5f05f0f5aa2fb8b2e63eed7b29ce67831158648f64c2892b477b318a86e300",
- "dist/2021-11-30/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz": "76258605464ea434a2c28c2fd05f1947b2165fa10a2810958397d8352e20215d",
- "dist/2021-11-30/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz": "c4f2e0756f8571ed7b1bd82702d91b32cc40af58e0697c2f307feeb5755f93ae",
- "dist/2021-11-30/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz": "c466a280084c164ca4a120b184eab6403c80db962c0d2d1f2cb5b662746ec4da",
- "dist/2021-11-30/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz": "b6f97111eeab0403c67965d57f9bee2ecdf5f39eb44941070d3cd06745f235a3",
- "dist/2021-11-30/cargo-beta-s390x-unknown-linux-gnu.tar.gz": "2ab5f013205446852a06f27b326f6454a5b3fb958413a7e00e1d8402413155b5",
- "dist/2021-11-30/cargo-beta-s390x-unknown-linux-gnu.tar.xz": "49dd5e7e3b8091546ef932f359fc4260e3f0b7ec851f43dd10f471c6fe50a5cd",
- "dist/2021-11-30/cargo-beta-x86_64-apple-darwin.tar.gz": "ac20e50e745914c8431a5c6993b9dbb6bf7b745e4b45283b230207e7be1bb167",
- "dist/2021-11-30/cargo-beta-x86_64-apple-darwin.tar.xz": "dec91c3f6eda827d3976b96da8def71ad3cc0b71fbe1b4e5387a464a8bbd85c3",
- "dist/2021-11-30/cargo-beta-x86_64-pc-windows-gnu.tar.gz": "e11e26ad4fde6109808f4cd752c2a810c8ca81b890b0c09902be981a72c43723",
- "dist/2021-11-30/cargo-beta-x86_64-pc-windows-gnu.tar.xz": "fb49db7bce2376335f4fda11cc454b3d762bd7f95c5dba85596100bd0c1e148a",
- "dist/2021-11-30/cargo-beta-x86_64-pc-windows-msvc.tar.gz": "7703eb725703aeffb57d6a2c0c95c44b6e4eed09b4a99b37346ea895a1d51088",
- "dist/2021-11-30/cargo-beta-x86_64-pc-windows-msvc.tar.xz": "65e0f34d9b4af3b270d8d4752c94b58e54895d180fddc3f4b535406e16b8a356",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-freebsd.tar.gz": "4624bd8e93bc1c36bccd15b44f484059f485df1c0cd1b8bcf21c4855c85b7ea4",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-freebsd.tar.xz": "a277a3fccfba30db2942c8303db16e5112d72c7721fe7a777cf24a301b68ad2c",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-illumos.tar.gz": "37e034e5c83bab47ac5cd502d4f6385af270040fb7eb59221bc02cdbcf949d0b",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-illumos.tar.xz": "d26eda6fd5533defbf3983f2bb9c07c0cba00abf4c346443080059c4810ef1b6",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-linux-gnu.tar.gz": "909f8bc8dce0276695f1e88994bd21ba2ad4a3ff66b8172e566b7907d9f2531c",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-linux-gnu.tar.xz": "52807fac650c03c9d398ce6e5987ecfd5e8e30b5c4e94c320ebc2a6fd665740c",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-linux-musl.tar.gz": "3158dcde7e05e9871572dd7044b3c8466687d8afadbbffa4021a443f4973a4ac",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-linux-musl.tar.xz": "551ef92e71c001fe48804587e8532b5032d419bd139b2f59cbd8c2e308e3c2ae",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-netbsd.tar.gz": "9dd630b19f6c9ce26d2ed6a1f46c383d6bc3eecf1efb80f15a651ef4408197c0",
- "dist/2021-11-30/cargo-beta-x86_64-unknown-netbsd.tar.xz": "1f128e4e8f9e98839caf64e68fbd163de1d5323abf40f718643a815081f898ac",
- "dist/2021-11-30/rust-std-beta-aarch64-apple-darwin.tar.gz": "3aecc61fe4e056326182db5942cd472039f95788d165940df8b53742f70fb051",
- "dist/2021-11-30/rust-std-beta-aarch64-apple-darwin.tar.xz": "db3cdaf50925184df6a79914cd1c0df0c9782f96829d23428b1a0ebc814fb468",
- "dist/2021-11-30/rust-std-beta-aarch64-apple-ios-sim.tar.gz": "61df5ab32d3e11243bc2b8506c65af9d8a84a2bc93fc1315d046e20eb048c62e",
- "dist/2021-11-30/rust-std-beta-aarch64-apple-ios-sim.tar.xz": "42603c786c02ce754b4c756ac0fe4d88574231f5a8d31b6f9a1192680f8eb180",
- "dist/2021-11-30/rust-std-beta-aarch64-apple-ios.tar.gz": "49e5d2df9b1019e21c14a1b7f8e69515c16d810dc354ddbe2429857214b3c33e",
- "dist/2021-11-30/rust-std-beta-aarch64-apple-ios.tar.xz": "5323762166729cc7c3c5045b484ea2f50ec0dbdca15d8c7e82f0c29e1247f8e2",
- "dist/2021-11-30/rust-std-beta-aarch64-fuchsia.tar.gz": "7510b5b538c735362ec6b12beaa9d3c8720c4ea1f686c643fcc40c5dabca5435",
- "dist/2021-11-30/rust-std-beta-aarch64-fuchsia.tar.xz": "19b4d188923a820bc8424fed062bab64a56d33f8f00d9ba6792331f06eb0cbc0",
- "dist/2021-11-30/rust-std-beta-aarch64-linux-android.tar.gz": "77a5e84c97f83ea8263fd147e5f5781a61bb5bdbf1cc40a3a8a72becc8dd486d",
- "dist/2021-11-30/rust-std-beta-aarch64-linux-android.tar.xz": "c17f843d951d9fa72760e3a071557635da83c0dc279887648979277bcef66aff",
- "dist/2021-11-30/rust-std-beta-aarch64-pc-windows-msvc.tar.gz": "6e86b78826f5e3d18b2f2aa4f274a5d7bacadbde8d7cfc72cc89dbcb0455fec3",
- "dist/2021-11-30/rust-std-beta-aarch64-pc-windows-msvc.tar.xz": "e1b1e9eb09e851c8125319432b9fb52a6aa815b7f5bc82efbba7e375aab44764",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz": "a6589e628f03fc7c39345cfa23827be6cf26391848bc576a66c7701f18a01669",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz": "a0cb9706216575748a953b6e36b59875c6bf9b9410d4a8085974e324c0cbb7e0",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-linux-musl.tar.gz": "c803cfd7c803de2b210d5e9800d44f3365a0b4ae581d987b415fdfb990de1a30",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-linux-musl.tar.xz": "a93310d2102699602c348901186992c1305a1a20fd0a2e5d8985a4f32e61eb28",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz": "2ce3460b436c8c44e074ce1cb8c81bb2cd37ec8ea8fde1b766f113b39412d71c",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz": "5e65f8409d2a8eb366f29fe994469f257b18e70ad0707be2ca9c144a0b6f9a78",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-none.tar.gz": "a4b73dfbf9df497883b2f5ea3053c256838e1e706f312ee02e1b018b9a7f6099",
- "dist/2021-11-30/rust-std-beta-aarch64-unknown-none.tar.xz": "a70bd19ae1fa41a3413f0a0b6b2beff569c1b16829cd675967a6d1cd92d8dd54",
- "dist/2021-11-30/rust-std-beta-arm-linux-androideabi.tar.gz": "46eabf68836f62fe8dfb39c54ee63e9fe211ab84443ff17c46b5240e0d08e723",
- "dist/2021-11-30/rust-std-beta-arm-linux-androideabi.tar.xz": "9a4e53e3e867e9e18959cba32078c4f7d588247b74e156cc68345808d7b7ecc4",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz": "66d9e4de284d7a221f66a2c615d6ec0805dc8f1a91a184cc96701cf98116be60",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz": "1af2fd7a16d51e2f4bd6e1840b935e2cdc7a8f3b3b1144d22b42cea52b9bd185",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz": "cb479e676240ef682d3ad27390bc2498f80a421d321e9423cb923b972ea86675",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz": "0011ba4db5a8310199011d37818818867703bf6fbbcd7e1a7bead621eda1e5f2",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-musleabi.tar.gz": "8b192e6f0263d925aac1436887f67b24fa02f31c0fc708c30827f0363f032ceb",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-musleabi.tar.xz": "688755d433c1227db1125ee52e7aa643f27f922b21fbe3a5fcaf70467d159a79",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz": "b336cef0e11136ccf5c41669869426a376d570042d3c99eed6c448cfe165818e",
- "dist/2021-11-30/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz": "1be7d7f0de2ae63b9dd282efc24531f1146fbc7831b84d9c0cd2c8cbdff32fe3",
- "dist/2021-11-30/rust-std-beta-armebv7r-none-eabi.tar.gz": "33d49bd069b9fdbae8a6868e2cce6fcea26cfd0248372d3d3c977828b3fc51cd",
- "dist/2021-11-30/rust-std-beta-armebv7r-none-eabi.tar.xz": "e204295b8b17388d8b4cfc04de5690b4b6a377da12df7c24f930c064da787200",
- "dist/2021-11-30/rust-std-beta-armebv7r-none-eabihf.tar.gz": "07584d1a4f4979ff86aa8b8be820810366c4fdbda4e5dec93c0a5883804a2103",
- "dist/2021-11-30/rust-std-beta-armebv7r-none-eabihf.tar.xz": "4f73d8af677409960ac480c254f25547752ffe08b80785dceb6b6f1fdc0b6646",
- "dist/2021-11-30/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz": "fb998ae84f383f1ee93fb946f396545a60d4a58f1f0107653f3dcf97e2cfb4f7",
- "dist/2021-11-30/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz": "8d8fdc9404422d0519328d6a622262833c5465b1cba62a59951a05f59d6cb15a",
- "dist/2021-11-30/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz": "c8abc1c472326419065caed5567bffc4bcfac2af45fafb7f1327b468f26a0112",
- "dist/2021-11-30/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz": "d905b6339363b2538bc39607c0fc58dae2b8023b1c3c1f745654a839ec178988",
- "dist/2021-11-30/rust-std-beta-armv7-linux-androideabi.tar.gz": "69dbb3e17dcdfa9e6acc465fae4427a2596e8bfc024cc18d30201f41bcdd1be2",
- "dist/2021-11-30/rust-std-beta-armv7-linux-androideabi.tar.xz": "f012832da820d59a791bf39c25e282c2b92bee75377e4fca7e9520162be62b83",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz": "bb742536d0d7b664ac7277bc5e45f40d64001da0ff1f9e088edc5240e1b35dcf",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz": "6d4c050229400ef1f2e384a4a360569309d1a0828ff07f97c73ca294ef114ca1",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz": "c7c354d1bd4071ef69e8d91ee5c020c9aac613ddb2565c9a3a01fa41903e3715",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz": "1bfe9acf4bc7f1e58f1e5a721172df69be65e049894046561bc94ed6ed67c24c",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz": "96fe9952332d7aee42e61445226793af32995d0f21fde7ebfe751ef2f9acfd90",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz": "2f85ea745f03f779306f78ddff9389f4417d826258a90740a76b37bd14b8fca6",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz": "434b6eaffa2a4c798b4a6f00997d65c55d9fad24d176bbc54dc045339e654432",
- "dist/2021-11-30/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz": "955fd83cc57de91fea9aea3f563c4cb5a2611e6dd24406845f7e8be5b7f25f3c",
- "dist/2021-11-30/rust-std-beta-armv7a-none-eabi.tar.gz": "45a4818cc22f80252264309263994270b2e15ec8db7ced500cef838f09260fa5",
- "dist/2021-11-30/rust-std-beta-armv7a-none-eabi.tar.xz": "8748379556a312b31788b5458b74d5d7fb2fa61f29e5528e449d216c21f4e9ed",
- "dist/2021-11-30/rust-std-beta-armv7r-none-eabi.tar.gz": "928a6b77d3e6e8030c6ee454d648c5f6eb0b79a8beda3d11fc3578cc4556ac45",
- "dist/2021-11-30/rust-std-beta-armv7r-none-eabi.tar.xz": "428526e30a28a9dba01943800a179b7ba144866f36dd69171a4fd1804345b75f",
- "dist/2021-11-30/rust-std-beta-armv7r-none-eabihf.tar.gz": "e1e43b61b7826fe4f8063d89896e7b86a13e41ed3a17ef2684d1bded5252b7b6",
- "dist/2021-11-30/rust-std-beta-armv7r-none-eabihf.tar.xz": "5f6478a196f1eabd6d4b58ebacf89c3635a9488f4b2f145283e9352cff5da7b8",
- "dist/2021-11-30/rust-std-beta-asmjs-unknown-emscripten.tar.gz": "65b23ab952ed313cc9de94eae473a28eb9b7d9ca8aa432f4d3a08c30484e30c7",
- "dist/2021-11-30/rust-std-beta-asmjs-unknown-emscripten.tar.xz": "949e3b832f70c3effa2b78363b42caf0720ede57722c360b710773bd7f3e1502",
- "dist/2021-11-30/rust-std-beta-i586-pc-windows-msvc.tar.gz": "06667714b168e2e0d6e0f3e81cc3fb68940f77aa3cd3495d91ce9ff15502ab9f",
- "dist/2021-11-30/rust-std-beta-i586-pc-windows-msvc.tar.xz": "9794592856633299de53e697579c75bcf6009c6f05c7bfcadf8c63dfa383b3f9",
- "dist/2021-11-30/rust-std-beta-i586-unknown-linux-gnu.tar.gz": "ffb8b8ec98f9732602edcf3e4e628327f8ef80712c59ebaab5392503ed04460c",
- "dist/2021-11-30/rust-std-beta-i586-unknown-linux-gnu.tar.xz": "7f60c2798023bdf3993b443783d3d6dd350abfa3bbdce58ada3e9b3d3c4391f0",
- "dist/2021-11-30/rust-std-beta-i586-unknown-linux-musl.tar.gz": "f086f349faf5f44b0fbd060f3c40b553aa5a6309a02c08e8a45d27cb3a820926",
- "dist/2021-11-30/rust-std-beta-i586-unknown-linux-musl.tar.xz": "05ebd51df4b17c22569d69a65d9542b5010beea023e545859a23bb244162b537",
- "dist/2021-11-30/rust-std-beta-i686-linux-android.tar.gz": "0f2a192b970209d10f2ffb4f88dcb6637e1ed822e47fef8e0d3daf4ca8b250d9",
- "dist/2021-11-30/rust-std-beta-i686-linux-android.tar.xz": "3aee7e88fbcc0290219a8d980efb1c6d8a1642a1576393fe3b5d400a68b17f8b",
- "dist/2021-11-30/rust-std-beta-i686-pc-windows-gnu.tar.gz": "251780731ee8c996dc1adb59148d7a0307642e11f3bf767c0caaf5f37b70b395",
- "dist/2021-11-30/rust-std-beta-i686-pc-windows-gnu.tar.xz": "76c8cd535a4ab4f9c0ccca19986f483de63e7c6c0708e37de653acb80621bce0",
- "dist/2021-11-30/rust-std-beta-i686-pc-windows-msvc.tar.gz": "ce1b7c98f381f207a26ca3fa5937f5e276eb8f91ef6ae2e0e082370e9ca1c21e",
- "dist/2021-11-30/rust-std-beta-i686-pc-windows-msvc.tar.xz": "106f655c10d182b6581e87cff881bf081efe9404b52885b6efed4eb0f09a3a04",
- "dist/2021-11-30/rust-std-beta-i686-unknown-freebsd.tar.gz": "2cac777f7178954e5c19e266d57927ddf68b74aa5a0161e35e096569d0a6946c",
- "dist/2021-11-30/rust-std-beta-i686-unknown-freebsd.tar.xz": "abd915c242fdd2e8f7d53291b2d84d269f9c6f4c4059c725770c3e47e50c4758",
- "dist/2021-11-30/rust-std-beta-i686-unknown-linux-gnu.tar.gz": "f680956e937e421c7868a22ec3ac2a6de7bc8203fae17937793914f4a9fd1657",
- "dist/2021-11-30/rust-std-beta-i686-unknown-linux-gnu.tar.xz": "15c71b8a2e8604a49240f5d6d0da65c40c8c207f1ebec943cb8c50cd7a51d879",
- "dist/2021-11-30/rust-std-beta-i686-unknown-linux-musl.tar.gz": "71c15bbabb5bcadb603513c73e40a96026fc8f6d5c82e9ea9b6569fcc22d5af2",
- "dist/2021-11-30/rust-std-beta-i686-unknown-linux-musl.tar.xz": "4a9af011d4a2b63a0357c6367210fbf4b6e116b5388ed3a62b758a4bad1fa77f",
- "dist/2021-11-30/rust-std-beta-mips-unknown-linux-gnu.tar.gz": "c44531c5467c1e01739f3796db1f59c4b6d6483f4bb8c398c751dbc30ed550ed",
- "dist/2021-11-30/rust-std-beta-mips-unknown-linux-gnu.tar.xz": "0ec54d445e3c24bf7aa8ecdca45f49abfc2e4013c7af682d7134a5e52e752d23",
- "dist/2021-11-30/rust-std-beta-mips-unknown-linux-musl.tar.gz": "3ea1a25b04112d83771e7b713ff8d33418bd18a7adcaaf6cce68f537cb27fefb",
- "dist/2021-11-30/rust-std-beta-mips-unknown-linux-musl.tar.xz": "c904834d0fa015d24ba0e929e900ad06bfe773bc4a439f9bbcd8862a5065171c",
- "dist/2021-11-30/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.gz": "498cda7a23e81ed7563650deb320361c8cffdc10de13ce143175e77f720600ed",
- "dist/2021-11-30/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.xz": "bb0e95d7fad089cc84e826adffc416757df4480ffdfd09547625950b13b9e934",
- "dist/2021-11-30/rust-std-beta-mips64-unknown-linux-muslabi64.tar.gz": "87ae1f563963370eeaa3f46d568339d5589e4fd509d21087db43ca2f1d6a1daf",
- "dist/2021-11-30/rust-std-beta-mips64-unknown-linux-muslabi64.tar.xz": "da6268585d69c9c71c92dadb658bc7c055b5ce4c87abc52b5451d1111c1675dd",
- "dist/2021-11-30/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "93c67427050266f49dc367a1f8e694989424664f740ae3911f78f1cc53faf35c",
- "dist/2021-11-30/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "03f9a6e921555954b33fd7f446e9093ad4b631c86d001303e4c47078d0e1d385",
- "dist/2021-11-30/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.gz": "6c96a53e86f71965f1922585469501504b79c3347d09409033f871b1c9cdc856",
- "dist/2021-11-30/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.xz": "000e43f7e40abecd402242455f8a3d60692043ddb80bd15dd6f52acd1c5af096",
- "dist/2021-11-30/rust-std-beta-mipsel-unknown-linux-gnu.tar.gz": "7ee55e1f5a63b52d7b87882fa4131fe848d18dba819d46e16ea2435889d84722",
- "dist/2021-11-30/rust-std-beta-mipsel-unknown-linux-gnu.tar.xz": "b8fc28ffd7d97e76913755bedc2f9e7cec7150e036d13fcf7e50dc5a2422d1dd",
- "dist/2021-11-30/rust-std-beta-mipsel-unknown-linux-musl.tar.gz": "af81aaa9bd624f57168762dfbae39853ada92043809bff953e108e97169e5732",
- "dist/2021-11-30/rust-std-beta-mipsel-unknown-linux-musl.tar.xz": "37357e40af421ca5b4d2b95f19eca41ce016404ffcce8abea45e08721664f0e3",
- "dist/2021-11-30/rust-std-beta-nvptx64-nvidia-cuda.tar.gz": "cbbd98fd3ee6bdd3c01e590c2f10367ec38d799e02ddbc1b0e31027684a356f6",
- "dist/2021-11-30/rust-std-beta-nvptx64-nvidia-cuda.tar.xz": "defda4e2ef2f3baf8c7d2a9159d17ca439004687f0b6714826408b94d4f0aed0",
- "dist/2021-11-30/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz": "201c5bdc1dba11e039bea9257e17ddd2f50b29448b070fc0edb4a7a9f4e45f45",
- "dist/2021-11-30/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz": "0319b07244f443e254e10a04e75633b293faffc5896ade44c05dde0739356f38",
- "dist/2021-11-30/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz": "54e7cb5a1534ecdbd484ef304f608eb48464ae2c2330958b65b8101f81291319",
- "dist/2021-11-30/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz": "aecedf5ca4d91e98ba3c4faba64699d79b3fd4877f880840d492b4872ccb924a",
- "dist/2021-11-30/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz": "a4cf3bde61d46484e36fd41386840250e0c031414ee422bbb3d37f7ac7489ca3",
- "dist/2021-11-30/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz": "d93e2a290aea3075cd61b950ded4c3756611acc6a59ba7efb9ce2e4dbac76c59",
- "dist/2021-11-30/rust-std-beta-riscv32i-unknown-none-elf.tar.gz": "69c9f09416b788d93f54734a953ed8dead2a31e1dacd6e67a6550529385b338f",
- "dist/2021-11-30/rust-std-beta-riscv32i-unknown-none-elf.tar.xz": "808a02952a31ae3a171849dc217763f5cd142622e92ae2b383014bbe37e9b551",
- "dist/2021-11-30/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz": "67e6b61d822cfc9f95a2808917601cf3d2560d636b12a19ee29a790cc06e8235",
- "dist/2021-11-30/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz": "7310493bc6f184b401650fb399015be29a8df009e55fa1cbfbcf9d9608fe61e2",
- "dist/2021-11-30/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz": "fd4db925d7eb598f210ab2d96f692cbdb627acbd6a8976259411a4d2356b8728",
- "dist/2021-11-30/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz": "b5b0394ef612188fd094e355892aafe4530758fe38dc8859ba917cb2febe028e",
- "dist/2021-11-30/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz": "3b7c3ad97393bc702dbd71bc819c0e5f6164cf471171c7c48cfffdf5477b35b6",
- "dist/2021-11-30/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz": "21e6f247a6663918c6e38782e43211224d50d4de22a9162be0c5f6d6d0a9afea",
- "dist/2021-11-30/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz": "d0c9bd56dcac12d7174e11f2acdb16fba41ffb3aba71b6b1b4b49ce7fa115f6e",
- "dist/2021-11-30/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz": "c89adc1cbdb7bfa27f5bfdac38b5ff084eafe081b27548dc243bbff378ec7118",
- "dist/2021-11-30/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz": "3e6f8a86901c1350c54bd89e156af029978f4a25f578ea26f49a1f3332da2187",
- "dist/2021-11-30/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz": "43e74dbeb89547be1b3ad1b532bef97b577530a8b19b825342efb72d91d4b0bd",
- "dist/2021-11-30/rust-std-beta-s390x-unknown-linux-gnu.tar.gz": "c8c7a22e63353e7c7766e254c3fc0b0277bc8265f1123a38705bf319a7d99a19",
- "dist/2021-11-30/rust-std-beta-s390x-unknown-linux-gnu.tar.xz": "1759ca2de0ff890918a0f634782557ae2b3181e543790878093f303ede45e215",
- "dist/2021-11-30/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz": "a9ac36f2b4e88ce2f2789e9df46ae679879c111594cfe82b538e4067adad2b5e",
- "dist/2021-11-30/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz": "6260f0616828d79898165bf42875881dc5253143d940ac951b7f295553afb8c9",
- "dist/2021-11-30/rust-std-beta-sparcv9-sun-solaris.tar.gz": "42d3e5acf2475d732ce5afe3c2ebea6d332c137d061aa256df75b7ce54c16b16",
- "dist/2021-11-30/rust-std-beta-sparcv9-sun-solaris.tar.xz": "7f84ff29dc36a224961e87d40cd6e531c9309bdafaec5de2b043aa89af511552",
- "dist/2021-11-30/rust-std-beta-thumbv6m-none-eabi.tar.gz": "6bfdf4e59ac3f9dbde2fa46797bd9bb9cbda232c0d507f04bafd937e88945cb7",
- "dist/2021-11-30/rust-std-beta-thumbv6m-none-eabi.tar.xz": "d12901a4efc8395df3c1ac137f86c3da07477277fad138edb49d5c4382a3a114",
- "dist/2021-11-30/rust-std-beta-thumbv7em-none-eabi.tar.gz": "38718b50fa2acacc0fac98931a5714df38feb8370fccf8d7a955de3b2c117dd0",
- "dist/2021-11-30/rust-std-beta-thumbv7em-none-eabi.tar.xz": "9753c00de1117a5fb9bff4ce2a4434ac6d3d06a1b4b3d0cc44ddb590739b9a0b",
- "dist/2021-11-30/rust-std-beta-thumbv7em-none-eabihf.tar.gz": "c1eb35c914ad1a762cf550d54b7ec80cb3a8ab6ab39f5c89709f88e04eeba46f",
- "dist/2021-11-30/rust-std-beta-thumbv7em-none-eabihf.tar.xz": "3c092ac130633f327a0afc8bdf8ba252f05d9b0050383122d7ba31cc3f5ddfc5",
- "dist/2021-11-30/rust-std-beta-thumbv7m-none-eabi.tar.gz": "fb391d1199eab0854228323d08dd8b27709175697532e4b47e9dab6f26f24a8f",
- "dist/2021-11-30/rust-std-beta-thumbv7m-none-eabi.tar.xz": "82347d3a0a123c430a526486dbd8c424732181eede038e2f91f1504d510a755b",
- "dist/2021-11-30/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz": "0cb559fff7f8dc35e5279217ef6fe7c2b5fa3d68f5ca82f258b6885f42e8d144",
- "dist/2021-11-30/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz": "ee1fe1dc9fe620743022939cdeac3ab34135e61897f0707c3b1a0a1b7d730360",
- "dist/2021-11-30/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz": "bb8de6fe10aa624fdd63484403e228a5c592b94d4aac95e2b2401cd8b9472f0a",
- "dist/2021-11-30/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz": "1bb7f7ac88e250534d89f0b0dc74f13ca563bad53956be74418d2aef28d250a5",
- "dist/2021-11-30/rust-std-beta-thumbv8m.base-none-eabi.tar.gz": "0aea9f5cddb136591d105ebd3607a2e1f402f1c707cf33f21fb5cf1d30101ee0",
- "dist/2021-11-30/rust-std-beta-thumbv8m.base-none-eabi.tar.xz": "f547622b8f052c6290c530d506d8ee314f90c81ace562a0a533b6ad2ba00b987",
- "dist/2021-11-30/rust-std-beta-thumbv8m.main-none-eabi.tar.gz": "80f8f7c613c7ff2097f5c346b3ac4a5cf750167277f28655e0263b05a231668d",
- "dist/2021-11-30/rust-std-beta-thumbv8m.main-none-eabi.tar.xz": "a57b4489a1d46ad3fc303a3b2dd478df66407a3e2dfeb9c12860a543ae5210eb",
- "dist/2021-11-30/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz": "6c4264b2bcecc951c39626fc1cf8de36f1eadbda31a552e14274f728978e16a5",
- "dist/2021-11-30/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz": "ec72f8e861eed6b5e2518b46cd8008d3bd2b6f2a7a42784a2dc8a6184d3ecc62",
- "dist/2021-11-30/rust-std-beta-wasm32-unknown-emscripten.tar.gz": "0fc209babd43546d04b3fdd27ce77c96d75aa5eb6595f00586a19a17e4530b59",
- "dist/2021-11-30/rust-std-beta-wasm32-unknown-emscripten.tar.xz": "ecdb8152992b4a9779aeda2b4cc638163ac24faf45c484f27316a6b3ff0eb297",
- "dist/2021-11-30/rust-std-beta-wasm32-unknown-unknown.tar.gz": "52bbea99f2405f35f58d5448c353c605c2a87e7546e95b86d8baa39b4fc7a9a2",
- "dist/2021-11-30/rust-std-beta-wasm32-unknown-unknown.tar.xz": "47ea301d79eada8898907af226b39b4c73ac1fe974963139aee78c3567ee53e4",
- "dist/2021-11-30/rust-std-beta-wasm32-wasi.tar.gz": "dc9ccfa3e46e4f3b0e11de8a83885695ab154a2211fa89a20670db116d63a4c2",
- "dist/2021-11-30/rust-std-beta-wasm32-wasi.tar.xz": "52d890b402c7e7bb7c0f9b34f2e216f0937453ab42e7c4ce205739bd64ba7dc7",
- "dist/2021-11-30/rust-std-beta-x86_64-apple-darwin.tar.gz": "0ccbff8a582047cd6d2a6b30387ea73cfce7e0c61eddf516126836b9f9ca86ff",
- "dist/2021-11-30/rust-std-beta-x86_64-apple-darwin.tar.xz": "cab55f71575d58aa7213a7dc4cfb0704ca7faec7203c545aeaff178eebe40436",
- "dist/2021-11-30/rust-std-beta-x86_64-apple-ios.tar.gz": "6863523669b65464bd52e1a47f6decf868cc93d2111ffc222bb4a032a0095e3f",
- "dist/2021-11-30/rust-std-beta-x86_64-apple-ios.tar.xz": "d5c6e65a656621891f387861c8259116dd9a8ab14e13ea10e93b78834e1d334a",
- "dist/2021-11-30/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz": "ec7130bfff74b7226fb5d0f311dd399f7628cb59ce06b4bc9a9f394067855eda",
- "dist/2021-11-30/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz": "0f52f00f03126aed0260cbfdd9790a62f9f4ceb24e2a3a6d80e8a15a1b4a09c2",
- "dist/2021-11-30/rust-std-beta-x86_64-fuchsia.tar.gz": "1a3f4c6c1528050820b85e07aa96af6588c7d61935108cb5110d1e0c964142e8",
- "dist/2021-11-30/rust-std-beta-x86_64-fuchsia.tar.xz": "fe9488c3476e931440ad487a4cf265fdd3c01e18c9e43b33f51b9eb078821282",
- "dist/2021-11-30/rust-std-beta-x86_64-linux-android.tar.gz": "c7205b1cdcdff00d91a3991b1f40674b075c34dc0877de4786da5ab85e3b6cfa",
- "dist/2021-11-30/rust-std-beta-x86_64-linux-android.tar.xz": "87a3cfe8992ad615d5522d97ace91dcc86057d060d82b581df206f2802225a0e",
- "dist/2021-11-30/rust-std-beta-x86_64-pc-solaris.tar.gz": "cd9eeb26fe909e38d8d8129829d19b4d04d96014496cc7f2f4ae077b94f2aae3",
- "dist/2021-11-30/rust-std-beta-x86_64-pc-solaris.tar.xz": "b6e59180ff89f7e460fcbc246802e6441c71600774ae5cb2d9af464365a642cb",
- "dist/2021-11-30/rust-std-beta-x86_64-pc-windows-gnu.tar.gz": "45e07be14211ec7c9f3c1ad0eb9f7a9b422b10c842d5d0e8b0b498751ab7ae0f",
- "dist/2021-11-30/rust-std-beta-x86_64-pc-windows-gnu.tar.xz": "593f70209f3b5b4e126d57ece0b1adefb4bc1055cfd168779d854369985b2b2e",
- "dist/2021-11-30/rust-std-beta-x86_64-pc-windows-msvc.tar.gz": "6e14f3431da08f63d82e5b1e2c56fdf13f93ea7b6660dc64b1c855d00c008257",
- "dist/2021-11-30/rust-std-beta-x86_64-pc-windows-msvc.tar.xz": "6e6355686d22213d27f5dbec0b7ded38532e79ac904bae978a8eb5fc880916cf",
- "dist/2021-11-30/rust-std-beta-x86_64-sun-solaris.tar.gz": "39bdaa250d8f17914602a2185c51014f7fbfb1e30991816a432c3897338b52a1",
- "dist/2021-11-30/rust-std-beta-x86_64-sun-solaris.tar.xz": "ebab0e4b13e0b3bdbe0ac858d5a4ca28bb813854aea1d8ec86d8e220c68b3442",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-freebsd.tar.gz": "a700f1736b96c4e7237305dc98a79163b07127f0aac1f436415c233b8495a5af",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-freebsd.tar.xz": "e94ecf7d1c9a5144577fdb14b7232b11dff0ebbfa8aae8cb4884d4ed9c5bae77",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-illumos.tar.gz": "209dc9917790c2be8777c597e19a9f43301aaaaac3c9731e9d0512e6918334b9",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-illumos.tar.xz": "6e4810c7484c231f0edb15ae5acea822ed5d868eaf041438afea4b6ba38be35e",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz": "df952ee1385da9457c4e95dc08ab59ca915f5f211738982f8db3684cf80967fc",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz": "62d7383ee21b0a7d072b15a9877a922f8dbcea42d910c2cb3c4129152b26ea9a",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz": "be28225516fa38edd34e1af5f051d7c8ab5f433cc5814df199bc451285d95e0c",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz": "1a6fdfac24feb34744daced6c6545c844ff13d5e5f14620520d5ed4b85be8742",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-linux-musl.tar.gz": "c0f098faa0c9de6a8e82b80dfe44bfa9d4482e118259c33452ef025885ceab6e",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-linux-musl.tar.xz": "1d1ed7cf8fc16efab3faab9ef5abadac9ab98d3b60522fde0612ac0b256de528",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-netbsd.tar.gz": "1ed41e8019480cd151a9ddd0f080afc56ed0afe47cfb7c6b5a6a2473ff6e7e81",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-netbsd.tar.xz": "849c04115660abdf1d4460aef2d87021c6ad52423c83dfed3c2cec8e380ae6fe",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-redox.tar.gz": "e3a35d33b3282fd156482c85e19817f78dcd964de8b712a6e46b965dc60d5204",
- "dist/2021-11-30/rust-std-beta-x86_64-unknown-redox.tar.xz": "d5bfbb1415a62547b9e2a24b770a3c6e4d531101cfb2360b7a7de34d0bf18974",
- "dist/2021-11-30/rustc-beta-aarch64-apple-darwin.tar.gz": "28beba0ff958b93f85618e49f13f4062cefacc82f6b5911d42f00515f99c5abe",
- "dist/2021-11-30/rustc-beta-aarch64-apple-darwin.tar.xz": "07c6a43130112c93745e729c91669243cd28b73fafc7d9b32b4f22650db7bcad",
- "dist/2021-11-30/rustc-beta-aarch64-pc-windows-msvc.tar.gz": "9e70dc74c4428438716d14861797380ce7f6617bc93b83c74fc1a6f8aca99392",
- "dist/2021-11-30/rustc-beta-aarch64-pc-windows-msvc.tar.xz": "8f61ec8129b7b0bcc6b329337e5e0323054a438e999615687a18fdc42a8d0692",
- "dist/2021-11-30/rustc-beta-aarch64-unknown-linux-gnu.tar.gz": "bba3cbfdd2842cdf8f2698b709401db6a641227d1742595e3959f1f0ace37c5f",
- "dist/2021-11-30/rustc-beta-aarch64-unknown-linux-gnu.tar.xz": "fe74ad76a2cffdff0a2fb953f31b73d80a0bce75402bf65f01d250fcae6ff779",
- "dist/2021-11-30/rustc-beta-aarch64-unknown-linux-musl.tar.gz": "cde952fb3c38a969c0743d2f9d90e256db8613c463a4b23d6119656570978eb5",
- "dist/2021-11-30/rustc-beta-aarch64-unknown-linux-musl.tar.xz": "f2dd88f1b4ec97aaaebb601d20751d50536e85b2cac36740abbc03fa8a4d0d06",
- "dist/2021-11-30/rustc-beta-arm-unknown-linux-gnueabi.tar.gz": "1a4414987e4da2c8086590fe4ad531f78862443eede3bc9069efb424900746d2",
- "dist/2021-11-30/rustc-beta-arm-unknown-linux-gnueabi.tar.xz": "1682f8bde2562d4b9183fa512bc1e54d2a821fd9f63208a51489f21deeb7fcfd",
- "dist/2021-11-30/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz": "ca40f3c5e8fd8bd6d89d3c0a3ad4d767353c1b4138e2720371a275c9c52c9117",
- "dist/2021-11-30/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz": "c7afe4eba5cdb02a2e8ae224a0970c8aa36ef429ac298b0f98ff41a0d911aad1",
- "dist/2021-11-30/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz": "6acd677fda38aea2b960f2af6438b30c3b6bd759bb3e56228a1096445ddd100f",
- "dist/2021-11-30/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz": "451a2e139771f39ec09a7cefd48885ec30f732668d50c750d42e6c58c250f8fe",
- "dist/2021-11-30/rustc-beta-i686-pc-windows-gnu.tar.gz": "a1df7d105231d4941a55a9f850d39acc201a99dd408d523935799b70fec30c6a",
- "dist/2021-11-30/rustc-beta-i686-pc-windows-gnu.tar.xz": "3005718736a2a0fa3a4f1be10239cfb467e9cabe6ce366f9909826bd3c06a990",
- "dist/2021-11-30/rustc-beta-i686-pc-windows-msvc.tar.gz": "695039c6737fb3bfd325fbebdab61aeef80ec427ae3d40d8b82e8b317e147fc8",
- "dist/2021-11-30/rustc-beta-i686-pc-windows-msvc.tar.xz": "7a5038b7299de71d3677042647fca501984d1f2a52c1d84052956ff7854622b3",
- "dist/2021-11-30/rustc-beta-i686-unknown-linux-gnu.tar.gz": "d21dd4c98d38186544aee9b22b439d67d77c0a740357dfad7fea3c4a9b8d1332",
- "dist/2021-11-30/rustc-beta-i686-unknown-linux-gnu.tar.xz": "e62a7c9809de668343323eb9fa1a1f6cc302a6e161e64826e9d31bd202f2f472",
- "dist/2021-11-30/rustc-beta-mips-unknown-linux-gnu.tar.gz": "b85eb1bff16384b4f6ad268a01bdcec539b9ea412abb6d64618521cb0e63985d",
- "dist/2021-11-30/rustc-beta-mips-unknown-linux-gnu.tar.xz": "ce79b36723a65419e03ec77ea14680791d683e5e04332eebdf59550bdaaa164d",
- "dist/2021-11-30/rustc-beta-mips64-unknown-linux-gnuabi64.tar.gz": "e778edd911e09c5c3b46aeccbabcd8ead78dd38086206d03406fc8dce52806e7",
- "dist/2021-11-30/rustc-beta-mips64-unknown-linux-gnuabi64.tar.xz": "10afe035ca7d3a967b467875b1345dde8bdcd3f8c4af1e917bfa2c676e0fec70",
- "dist/2021-11-30/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "6b6c3386ebec138ff07a21d3f5631263219c226ca146bf97fe0a7bb9fee9d0c5",
- "dist/2021-11-30/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "5ff6430623d0f3aa14748f371e34072aba126a16429928f8f99172190f369fee",
- "dist/2021-11-30/rustc-beta-mipsel-unknown-linux-gnu.tar.gz": "369ad16e85e4f2956e400105e6d8374ff64c473c3c3b61ae4d916214d5f922da",
- "dist/2021-11-30/rustc-beta-mipsel-unknown-linux-gnu.tar.xz": "1c8adfb22f724fa98f30f23378a28729e144f6ab9bba54adf13111ca4648ed78",
- "dist/2021-11-30/rustc-beta-powerpc-unknown-linux-gnu.tar.gz": "b3e270c6272420c31ee7bed8ed36c113c879a384fa5b85af0deb7d43a355ca2c",
- "dist/2021-11-30/rustc-beta-powerpc-unknown-linux-gnu.tar.xz": "a21cdd8d182cc64ceaa83e522299860c2710dee780e8f49ff107a73fbd73c3ca",
- "dist/2021-11-30/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz": "1a81076b8e49647b61761a38ed283a9a71b326dc321920f7be453e0e15ae2465",
- "dist/2021-11-30/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz": "3f8ce23f81623a00de63ce7e82e448eec0901a92f908e6aff362807bae14ff84",
- "dist/2021-11-30/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz": "eaa3b365bd91a5770db85e8541ee28c99988635521c0f2dfea05218172f11a55",
- "dist/2021-11-30/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz": "3f856ae24c4737bf1928025a10712b6d856788d988fb5018631c525d13b68e29",
- "dist/2021-11-30/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz": "c672cbf2caef81f7ab923ff7c6a05f1865057278180a686f810ddc71dacc49d0",
- "dist/2021-11-30/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz": "bda5d2234aebdc175c87da3b77d050c56bced21a794c416bb9090c0ae3374be2",
- "dist/2021-11-30/rustc-beta-s390x-unknown-linux-gnu.tar.gz": "59e01371664f8d39c7a06c205af0f5ab9aabdb3942be4f493d05ab71047619e8",
- "dist/2021-11-30/rustc-beta-s390x-unknown-linux-gnu.tar.xz": "de956b5275e38e0b4223819973e85f5f65c409addd786f7ac2d525a79c3f0c92",
- "dist/2021-11-30/rustc-beta-x86_64-apple-darwin.tar.gz": "4f78d90362488a866ea7b1cccbc61f925d94034b46dfa775dea75223e67d755a",
- "dist/2021-11-30/rustc-beta-x86_64-apple-darwin.tar.xz": "3520d028e9370087cfa57eb7225dd76c008cb08ffb01c8101aaa86104f427f12",
- "dist/2021-11-30/rustc-beta-x86_64-pc-windows-gnu.tar.gz": "f954349daa7dfd819ec0a7335a47b1d3b2ed0138eae31c56288d9c523cdf56b2",
- "dist/2021-11-30/rustc-beta-x86_64-pc-windows-gnu.tar.xz": "ca046d8fca5fa48117c61c70a21176d9220a3c62af9fdc9b899c157bb196a5b5",
- "dist/2021-11-30/rustc-beta-x86_64-pc-windows-msvc.tar.gz": "61ae4421bdf798a5ca1a8bc8c8521dfb29a707e40d382dbd2e155f134956ac33",
- "dist/2021-11-30/rustc-beta-x86_64-pc-windows-msvc.tar.xz": "495076dfc2fa0b8d96613e34f867de9d43483984a8bd6839bf273c2be38039b6",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-freebsd.tar.gz": "828526bc23ad8802071bf4f2984faf3549139eb4ce8ebb9ba8711c196d2bf437",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-freebsd.tar.xz": "fa2464350b2ac29bec6751c551cc45b7af92c25d2cf1109397e724802d4859cf",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-illumos.tar.gz": "a1d9719668ea1887d6202c25b9dd2b7d40bdd240f3f753af77ac93f126c84c38",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-illumos.tar.xz": "4b36f5d448bf022f90e284c22a44e0b87ef8518ec93a297ceb703eb612ef80d8",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-linux-gnu.tar.gz": "63e654f5e8707a0536381025bdbb43d498c70a29a5ada0ecdb12e23844cc9a9f",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-linux-gnu.tar.xz": "6b5b74abdcb1cae42620cabc142a119b58823e9f2ac0c3151e087a76323c5cae",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-linux-musl.tar.gz": "f3aa2d52ce5da066c59de609ebd5df60ac908c7e0db23ac4afe69b927ef2a974",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-linux-musl.tar.xz": "6e8858dbaf50a8211516e5afa83e4133d878e0d4b19ba4a3e4c3e51cb80210b7",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-netbsd.tar.gz": "9028dd44728092ccaec86f415abdb3733f3ea58ab7c3d736e96e27540cc66a2d",
- "dist/2021-11-30/rustc-beta-x86_64-unknown-netbsd.tar.xz": "c6720fd231b54a04e1ba3ed3fe333b1d8ef5b771ce341b4c112169a293bf713a",
- "dist/2021-11-30/rustfmt-nightly-aarch64-apple-darwin.tar.gz": "d987783ba5117529b325bcf6f5e7abd9eee42b5ea86ce5109a4fd3f450af8062",
- "dist/2021-11-30/rustfmt-nightly-aarch64-apple-darwin.tar.xz": "5d5838733dc64e302991465c1f371fde855ee410d42d1713ddc1c471b469e1a8",
- "dist/2021-11-30/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz": "8593ab35bb800312d6fe4c4a4d151feb26187c6db0d0d5ca5e3e98a007f8a4ff",
- "dist/2021-11-30/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz": "a2ded0420cc1d98df255c7ef93247b9a6d3d9ec22e42c477305dc15ef35fd329",
- "dist/2021-11-30/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz": "652275e77d73f122c12eb952338661562a48fc76164d6549158abc14fb4e4a4a",
- "dist/2021-11-30/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz": "fbb49b56bb11348e07124d8216b8f8b6e26d8697abb05afec0ddb07a456b29e5",
- "dist/2021-11-30/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz": "817c7ed90ab8cdec1dcfc8571391a714002b49fd20da0ae32135f57d233ffbfb",
- "dist/2021-11-30/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz": "cbd8674c65babce944bab6a6f013d44a2c7d6829434a6b97edb1f1e1df1c076f",
- "dist/2021-11-30/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz": "66b13ffad073bc624ebdef219e61f8972fc6be354aaf1f8ede58a3acc01314c3",
- "dist/2021-11-30/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz": "11ecfef218376fd2232ad552526b39173c5269130f02e408a7492762cde87a6a",
- "dist/2021-11-30/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz": "07ad99e019141843f5d6f8c302b9d20c7453ebead79e9711af33c9c8081b9e22",
- "dist/2021-11-30/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz": "6656be84a9b5a63083d63e3a87bc928b424109efff48e3a6770e026c6ea7c2e8",
- "dist/2021-11-30/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz": "155422628d41ce9730f4503bffa12e396b58692c906828acf15f0dd39b3d491e",
- "dist/2021-11-30/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz": "fc75c3836489bda30d340132d0d5ab8ee7f7c67617e4dc66a9eae559bbdb0421",
- "dist/2021-11-30/rustfmt-nightly-i686-pc-windows-gnu.tar.gz": "181d557c8f73c8f22ed63a8f98e53f6d88871fd694173aea70c53d42c0c55ae2",
- "dist/2021-11-30/rustfmt-nightly-i686-pc-windows-gnu.tar.xz": "5defc562a2f0ced4539006692cc969cf89756637f5f5c62be0276dfedd6f3db6",
- "dist/2021-11-30/rustfmt-nightly-i686-pc-windows-msvc.tar.gz": "f28b3fdf5425e7b782d0f78ca95613efd87b2b0d14d44c4490f17d4eb452f183",
- "dist/2021-11-30/rustfmt-nightly-i686-pc-windows-msvc.tar.xz": "b6cebd5a23bcc504d05c8dd79654baf2ab45b162c59b7b843e24efb7e2344011",
- "dist/2021-11-30/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz": "c59850b28fcfb1608c7e91890b8628ac201b87b4d9af7e9fd019e3e4a137c033",
- "dist/2021-11-30/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz": "ad808569083691ba31b0e10222f9dd01822ade91689bcb060544f28b99f2a299",
- "dist/2021-11-30/rustfmt-nightly-mips-unknown-linux-gnu.tar.gz": "8fca357226b91cc712b888c0a62f9e52b121ab6d9815ea5f53bbfd243b895b69",
- "dist/2021-11-30/rustfmt-nightly-mips-unknown-linux-gnu.tar.xz": "7f5451fe6946c16a7ba404c8bab33816d58d478b1dc0ea1ce6b85befe26ddf77",
- "dist/2021-11-30/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.gz": "7cc76ce31cf59f1cbeca87a46c996e905f048acfc70d438eae2a32bb67fc60c1",
- "dist/2021-11-30/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.xz": "429bacebe2a9f1478a00b1573fe4e1b071c6348d800182993c8b5d8ba54d9615",
- "dist/2021-11-30/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.gz": "701a12b5a4a689e6b2ef260e35ed2d22c00452cde5e18ce0d886ace37e81964f",
- "dist/2021-11-30/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.xz": "0ef78c91a3220226619f20b28bf67947a56ff31f369d5ea7bfc2aef356060e42",
- "dist/2021-11-30/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.gz": "0765a3b65315bbb1381927eaf6f65f16fd09dddab41d7398e483bf001ee7bc3e",
- "dist/2021-11-30/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.xz": "c74b0833f995ffad5c812ba130f423485bd8297eca0c4eae227852a88ece8521",
- "dist/2021-11-30/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz": "3c9d5a35ef1e459ded4dcdcad40bc5e3bcd5b2821cf4f46dbaf2c2c3259fa3ff",
- "dist/2021-11-30/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz": "0aa8975a6dbd103a4764ad643de6094bd6911bd3a90d46e24ad1eafcea2870e7",
- "dist/2021-11-30/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz": "a0ee2ec59ed07ba9c9e48076c954f5c6e4d39809d9e4923337db2627ea279c6f",
- "dist/2021-11-30/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz": "e712fa72a41dedcd50c6531433220904b9627fa78bfa15cdd96d97161981cb77",
- "dist/2021-11-30/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz": "fc7809520a4a41ccb0ffb303c7bbc96443308387890ebdb65a25c3697a5c3eb4",
- "dist/2021-11-30/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz": "84a8fa7468b9e59465f85607f84960e11faf0f37bd766d55b6be985db89d0d17",
- "dist/2021-11-30/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz": "2703dff8cb1c0ca08787f1c7715885c5b09919c040783ba98bd74f8fe3af704d",
- "dist/2021-11-30/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz": "a3e25cc857e990b467c804f41e23bfbe8ef02630b48703fc1c7fae692e16eb80",
- "dist/2021-11-30/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz": "659a9ca0e1296f817cd9f90fed9ccd7d3c7c3e7eea7e9c437bbeb2d951a2669c",
- "dist/2021-11-30/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz": "21e83ac3b148f0f690cb9a39b385fb0d5a82d6eea9ec46d4d4445b5a660c6d7c",
- "dist/2021-11-30/rustfmt-nightly-x86_64-apple-darwin.tar.gz": "c8e3300a426cc4a80ba4f1cf0c6822d9b883f24c486b991f2056938be778d43f",
- "dist/2021-11-30/rustfmt-nightly-x86_64-apple-darwin.tar.xz": "55f1f7d84828b3cc5d13b10e549a74f2f1df11057ed48e75fbafc0d3538daf03",
- "dist/2021-11-30/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz": "99bf70cee39b2ce73dbe5827fe3d93e45241faea284acb3f8004cf7e700e1704",
- "dist/2021-11-30/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz": "dfc569d57211eae74a2cde5db180d2f2f44bca04f811655ef1f8d8c2154b97ef",
- "dist/2021-11-30/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz": "679d69ba6a4b460f9672f1ec1c2939ac41ee7f911a2a74eaf6db477aa088e6e3",
- "dist/2021-11-30/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz": "3b9a899fcf40db84be8bd14e7c767c572c7d8c7c85f90997b8278fe8726413ae",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz": "19be469ab711dcee7a7243e865efc5addf8b2cdbdf15150a2c367692c45b9f94",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz": "789c7129e235b65860a514fdb38f01ac195af610d4ac6a296d272a6f36d72344",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-illumos.tar.gz": "18657363783d0967d871ee1ed8905b3db0c3b761910fb06ea10980ec6b5ca082",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-illumos.tar.xz": "8b272546a9eb8b23724fbec5577fc0c917a23e994befc38ebfa797957df03b9d",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz": "4e1de312f07fb98845a881b44c2a76ec9abf61e5aba46e8e384de1cd297957a3",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz": "a13ad29e2d06c9df233882d009ba8354d92d2fb29239cadaf858b9abc8b477d9",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz": "aae38bbf1eb7e0da50eb7f226897dc85e88b5e008ef901a93dadb0550f4055ac",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz": "757564eaa1a339d37b59da304bbc7a846bb883a73c62b78df39dacd947606ec9",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz": "5f3a83079cb1fd7d8b9be44d0df7b57c6dc79da8e1762eace67c122cffc2d4ca",
- "dist/2021-11-30/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz": "e47ee14a1e679ee5f23936ba7d7de13dcba082c7f32e366be7a990503c91f6ad"
+ "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"
}
}
let _ = #[attr] (x as Y);
let _ =
#[attr] while true {
- #![attr]
- };
+ #![attr]
+ };
let _ =
#[attr] while let Some(false) = true {
- #![attr]
- };
+ #![attr]
+ };
let _ =
#[attr] for x in y {
- #![attr]
- };
+ #![attr]
+ };
let _ =
#[attr] loop {
- #![attr]
- };
+ #![attr]
+ };
let _ =
#[attr] match true {
- #![attr]
- #[attr]
- _ => false,
- };
+ #![attr]
+ #[attr]
+ _ => false,
+ };
let _ = #[attr] || #[attr] foo;
let _ = #[attr] move || #[attr] foo;
let _ =
#[attr] ||
- #[attr] {
- #![attr]
- foo
- };
+ #[attr] {
+ #![attr]
+ foo
+ };
let _ =
#[attr] move ||
- #[attr] {
- #![attr]
- foo
- };
+ #[attr] {
+ #![attr]
+ foo
+ };
let _ =
#[attr] ||
- {
- #![attr]
- foo
- };
+ {
+ #![attr]
+ foo
+ };
let _ =
#[attr] move ||
- {
- #![attr]
- foo
- };
+ {
+ #![attr]
+ foo
+ };
let _ =
#[attr] {
- #![attr]
- };
+ #![attr]
+ };
let _ =
#[attr] {
- #![attr]
- let _ = ();
- };
+ #![attr]
+ let _ = ();
+ };
let _ =
#[attr] {
- #![attr]
- let _ = ();
- foo
- };
+ #![attr]
+ let _ = ();
+ foo
+ };
let _ = #[attr] x = y;
let _ = #[attr] (x = y);
let _ = #[attr] x += y;
// Taken from https://www.unicode.org/Public/UNIDATA/PropList.txt
let chars =
['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}',
- '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}',
- '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}',
- '\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}',
- '\u{205F}', '\u{3000}'];
+ '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}',
+ '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}',
+ '\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}',
+ '\u{205F}', '\u{3000}'];
for c in &chars { let ws = c.is_whitespace(); println!("{} {}", c, ws); }
}
mac! {
a(aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
- aaaaaaaa aaaaaaaa) a
+ aaaaaaaa aaaaaaaa) a
[aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
- aaaaaaaa aaaaaaaa] a
+ aaaaaaaa aaaaaaaa] a
{
aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
aaaaaaaa aaaaaaaa aaaaaaaa
}
mac!(aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
- aaaaaaaa aaaaaaaa);
+aaaaaaaa aaaaaaaa);
mac![aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
- aaaaaaaa aaaaaaaa];
+aaaaaaaa aaaaaaaa];
mac! {
aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
aaaaaaaa aaaaaaaa
}
#[rustc_dummy(aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
- aaaaaaaa aaaaaaaa aaaaaaaa)]
+aaaaaaaa aaaaaaaa aaaaaaaa)]
#[rustc_dummy[aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
- aaaaaaaa aaaaaaaa aaaaaaaa]]
+aaaaaaaa aaaaaaaa aaaaaaaa]]
#[rustc_dummy {
- aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
- aaaaaaaa aaaaaaaa
- }]
+ aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
+ aaaaaaaa aaaaaaaa
+}]
#[rustc_dummy =
- "aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa"]
+"aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa"]
fn main() {}
pub fn foo(_: [i32; (3 as usize)]) ({ } as ())
pub fn bar() ({
- const FOO: usize = ((5 as usize) - (4 as usize) as usize);
- let _: [(); (FOO as usize)] = ([(() as ())] as [(); 1]);
+ const FOO: usize = ((5 as usize) - (4 as usize) as usize);
+ let _: [(); (FOO as usize)] = ([(() as ())] as [(); 1]);
- let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);
+ let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);
- let _ =
- (((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])
- as &[i32; 3]) as *const _ as *const [i32; 3]) as
- *const [i32; (3 as usize)] as *const [i32; 3]);
+ let _ =
+ (((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3]) as
+ &[i32; 3]) as *const _ as *const [i32; 3]) as
+ *const [i32; (3 as usize)] as *const [i32; 3]);
- ({
- let res =
- ((::alloc::fmt::format as
- for<'r> fn(Arguments<'r>) -> String {format})(((::core::fmt::Arguments::new_v1
- as
- fn(&[&'static str], &[ArgumentV1]) -> Arguments {Arguments::new_v1})((&([("test"
- as
- &str)]
- as
- [&str; 1])
- as
- &[&str; 1]),
- (&([]
- as
- [ArgumentV1; 0])
- as
- &[ArgumentV1; 0]))
- as
- Arguments))
- as String);
- (res as String)
- } as String);
- } as ())
+ ({
+ let res =
+ ((::alloc::fmt::format as
+ for<'r> fn(Arguments<'r>) -> String {format})(((::core::fmt::Arguments::new_v1
+ as
+ fn(&[&'static str], &[ArgumentV1]) -> Arguments {Arguments::new_v1})((&([("test"
+ as &str)] as [&str; 1]) as
+ &[&str; 1]),
+ (&([] as [ArgumentV1; 0]) as &[ArgumentV1; 0])) as
+ Arguments)) as String);
+ (res as String)
+ } as String);
+ } as ())
pub type Foo = [i32; (3 as usize)];
pub struct Bar {
pub x: [i32; (3 as usize)],
pub enum Baz { BazVariant([i32; (5 as usize)]), }
pub fn id<T>(x: T) -> T ({ (x as T) } as T)
pub fn use_id() ({
- let _ =
- ((id::<[i32; (3 as usize)]> as
- fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1
- as
- i32),
- (2
- as
- i32),
- (3
- as
- i32)]
- as
- [i32; 3]))
- as [i32; 3]);
- } as ())
+ let _ =
+ ((id::<[i32; (3 as usize)]> as
+ fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1 as i32),
+ (2 as i32), (3 as i32)] as [i32; 3])) as [i32; 3]);
+ } as ())
fn main() ({ } as ())
#[allow()]
const C: C =
C{
- #[cfg(debug_assertions)]
- field: 0,
+ #[cfg(debug_assertions)]
+ field: 0,
- #[cfg(not(debug_assertions))]
- field: 1,};
+ #[cfg(not(debug_assertions))]
+ field: 1,};
macro_rules! all_fragments {
($b : block, $e : expr, $i : ident, $it : item, $l : lifetime, $lit :
- literal, $m : meta, $p : pat, $pth : path, $s : stmt, $tt : tt, $ty : ty,
- $vis : vis) => {} ;
+ literal, $m : meta, $p : pat, $pth : path, $s : stmt, $tt : tt, $ty : ty,
+ $vis : vis) => {} ;
}
fn main() {}
let _y =
match x {
Some(_) =>
- ["some(_)".to_string(), "not".to_string(), "SO".to_string(),
- "long".to_string(), "string".to_string()],
+ ["some(_)".to_string(), "not".to_string(), "SO".to_string(),
+ "long".to_string(), "string".to_string()],
None =>
- ["none".to_string(), "a".to_string(), "a".to_string(),
- "a".to_string(), "a".to_string()],
+ ["none".to_string(), "a".to_string(), "a".to_string(),
+ "a".to_string(), "a".to_string()],
};
}
let _ =
#[rustc_dummy] match () {
- #![rustc_dummy]
- () => (),
- };
+ #![rustc_dummy]
+ () => (),
+ };
}
fn _5() {
let _ = #[rustc_dummy] 0 as usize;
let _ =
#[rustc_dummy] while false {
- #![rustc_dummy]
- };
+ #![rustc_dummy]
+ };
let _ =
#[rustc_dummy] while let None = Some(()) {
- #![rustc_dummy]
- };
+ #![rustc_dummy]
+ };
let _ =
#[rustc_dummy] for _ in 0..0 {
- #![rustc_dummy]
- };
+ #![rustc_dummy]
+ };
let _ =
#[rustc_dummy] loop {
- #![rustc_dummy]
- };
+ #![rustc_dummy]
+ };
let _ =
#[rustc_dummy] match false {
- #![rustc_dummy]
- _ => (),
- };
+ #![rustc_dummy]
+ _ => (),
+ };
let _ = #[rustc_dummy] || #[rustc_dummy] ();
let _ = #[rustc_dummy] move || #[rustc_dummy] ();
let _ =
#[rustc_dummy] ||
- {
- #![rustc_dummy]
- #[rustc_dummy]
- ()
- };
+ {
+ #![rustc_dummy]
+ #[rustc_dummy]
+ ()
+ };
let _ =
#[rustc_dummy] move ||
- {
- #![rustc_dummy]
- #[rustc_dummy]
- ()
- };
+ {
+ #![rustc_dummy]
+ #[rustc_dummy]
+ ()
+ };
let _ =
#[rustc_dummy] {
- #![rustc_dummy]
- };
+ #![rustc_dummy]
+ };
let _ =
#[rustc_dummy] {
- #![rustc_dummy]
- let _ = ();
- };
+ #![rustc_dummy]
+ let _ = ();
+ };
let _ =
#[rustc_dummy] {
- #![rustc_dummy]
- let _ = ();
- ()
- };
+ #![rustc_dummy]
+ let _ = ();
+ ()
+ };
let mut x = 0;
let _ = #[rustc_dummy] x = 15;
let _ = #[rustc_dummy] x += 15;
fn main() {
let _v1 =
[
- // Comment
- 0,
- // Comment
- 1,
- // Comment
- 2];
+ // Comment
+ 0,
+ // Comment
+ 1,
+ // Comment
+ 2];
let _v2 =
[0, // Comment
- 1, // Comment
- 2]; // Comment
+ 1, // Comment
+ 2]; // Comment
let _v3 =
[
- /* Comment */
- 0,
- /* Comment */
- 1,
- /* Comment */
- 2];
+ /* Comment */
+ 0,
+ /* Comment */
+ 1,
+ /* Comment */
+ 2];
let _v4 =
[0, /* Comment */
- 1, /* Comment */
- 2]; /* Comment */
+ 1, /* Comment */
+ 2]; /* Comment */
}
29| 1| some_string = Some(String::from("the string content"));
30| 1| let
31| 1| a
- 32| | =
- 33| | ||
+ 32| 1| =
+ 33| 1| ||
34| 0| {
35| 0| let mut countdown = 0;
36| 0| if is_false {
116| 1|
117| 1| let
118| 1| _unused_closure
- 119| 1| =
- 120| 1| |
+ 119| | =
+ 120| | |
121| | mut countdown
122| | |
123| 0| {
18| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
19| 2|}
------------------
- | used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
+ | used_crate::used_only_from_bin_crate_generic_function::<&str>:
| 17| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| 18| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
| 19| 1|}
------------------
- | used_crate::used_only_from_bin_crate_generic_function::<&str>:
+ | used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
| 17| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| 18| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
| 19| 1|}
22| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);
23| 2|}
------------------
- | used_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
+ | used_crate::used_only_from_this_lib_crate_generic_function::<&str>:
| 21| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| 22| 1| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);
| 23| 1|}
------------------
- | used_crate::used_only_from_this_lib_crate_generic_function::<&str>:
+ | used_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
| 21| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| 22| 1| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);
| 23| 1|}
40| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
41| 2|}
------------------
- | used_inline_crate::used_only_from_bin_crate_generic_function::<&str>:
+ | used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
| 39| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| 40| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
| 41| 1|}
------------------
- | used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
+ | used_inline_crate::used_only_from_bin_crate_generic_function::<&str>:
| 39| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| 40| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
| 41| 1|}
46| 4| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);
47| 4|}
------------------
- | used_inline_crate::used_only_from_this_lib_crate_generic_function::<&str>:
+ | used_inline_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
| 45| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| 46| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);
| 47| 2|}
------------------
- | used_inline_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
+ | used_inline_crate::used_only_from_this_lib_crate_generic_function::<&str>:
| 45| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| 46| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);
| 47| 2|}
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
size: (400, 600)
+font-size: 18
+
// The out-of-band info (source, stable version, collapse) should be below the
// h1 when the screen gets narrow enough.
assert-css: (".main-heading", {
"flex-direction": "column"
})
+assert-property: (".mobile-topbar h2.location", {"offsetHeight": 45})
+
// Note: We can't use assert-text here because the 'Since' is set by CSS and
// is therefore not part of the DOM.
assert-css: (".content .out-of-band .since::before", { "content": "\"Since \"" })
click: ".sidebar-menu-toggle"
click: ".sidebar-links a"
assert-position: ("#method\.must_use", {"y": 45})
+
+// Check that the bottom-most item on the sidebar menu can be scrolled fully into view.
+click: ".sidebar-menu-toggle"
+scroll-to: ".block.keyword li:nth-child(1)"
+assert-position: (".block.keyword li:nth-child(1)", {"y": 542.96875})
wait-for: 500
// should be the light theme so let's check the color
assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
+
+goto: file://|DOC_PATH|/settings.html
+click: "#theme-light"
+wait-for: 500
+assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
+assert-local-storage: { "rustdoc-theme": "light" }
+
+click: "#theme-dark"
+wait-for: 500
+assert-css: ("body", { "background-color": "rgb(53, 53, 53)" })
+assert-local-storage: { "rustdoc-theme": "dark" }
+
+click: "#theme-ayu"
+wait-for: 500
+assert-css: ("body", { "background-color": "rgb(15, 20, 25)" })
+assert-local-storage: { "rustdoc-theme": "ayu" }
--- /dev/null
+// Ensures that the theme is working when going back in history.
+goto: file://|DOC_PATH|/test_docs/index.html
+// Set the theme to dark.
+local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
+// We reload the page so the local storage settings are being used.
+reload:
+assert-css: ("body", { "background-color": "rgb(53, 53, 53)" })
+assert-local-storage: { "rustdoc-theme": "dark" }
+
+// Now we go to the settings page.
+click: "#settings-menu"
+wait-for: ".settings"
+// We change the theme to "light".
+click: "#theme-light"
+wait-for: 250
+assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
+assert-local-storage: { "rustdoc-theme": "light" }
+
+// We go back in history.
+history-go-back:
+// Confirm that we're not on the settings page.
+assert-false: ".settings"
+// Check that the current theme is still "light".
+assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
+assert-local-storage: { "rustdoc-theme": "light" }
// On mobile:
size: (600, 600)
goto: file://|DOC_PATH|/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html
-assert-property: (".mobile-topbar .location", {"scrollWidth": "504"})
+assert-property: (".mobile-topbar .location", {"scrollWidth": "986"})
assert-property: (".mobile-topbar .location", {"clientWidth": "504"})
assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})
--- /dev/null
+pub struct Test<'a> {
+ data: &'a (),
+}
+
+impl<'a> Test<'a> {
+ pub fn do_test(&self) {}
+}
+
+// @has crate_relative/demo/index.html
+// @has - '//a/@href' '../struct.Test.html#method.do_test'
+pub mod demo {
+ //! [`crate::Test::do_test`]
+}
--- /dev/null
+pub mod wrapper {
+
+ pub struct Test<'a> {
+ data: &'a (),
+ }
+
+ impl<'a> Test<'a> {
+ pub fn do_test(&self) {}
+ }
+
+ // @has mod_relative/wrapper/demo/index.html
+ // @has - '//a/@href' '../struct.Test.html#method.do_test'
+ /// [`Test::do_test`]
+ pub mod demo {
+ }
+
+}
--- /dev/null
+macro_rules! linebreak {
+ (
+ <= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
+ 26 27 28 =>
+ ) => { ... };
+}
\ No newline at end of file
--- /dev/null
+macro_rules! morestuff {
+ (
+ <= "space between most kinds of tokens" : 1 $x + @ :: >>= 'static
+ "no space inside paren or bracket" : (2 a) [2 a] $(2 $a:tt)*
+ "space inside curly brace" : { 2 a }
+ "no space inside empty delimiters" : () [] {}
+ "no space before comma or semicolon" : a, (a), { a }, a; [T; 0];
+ "the three repetition specifiers" : $(@)*, $(@)+, $(@)?
+ "repetition separators" : $(@)|*, $(@)|+, $(@)==*, $(@)static*
+ "plus or star cannot be a repetition separator" : $(@)+ * $(@)* +
+ "no space between ident and paren" : let _ = f(0) + f[0] + Struct {};
+ "space between keyword and paren" : return (a,) & for x in (..)
+ "some special case keywords" : pub(crate), fn() -> u8, Self(0, 0) =>
+ ) => { ... };
+}
\ No newline at end of file
-macro_rules! outer {
- ($($matcher:tt)*) => {
+macro_rules! make_macro {
+ ($macro_name:ident $($matcher:tt)*) => {
#[macro_export]
- macro_rules! inner {
+ macro_rules! $macro_name {
(<= $($matcher)* =>) => {};
}
}
}
-// @has macro_generated_macro/macro.inner.html //pre 'macro_rules! inner {'
-// @has - //pre '(<= type $($i : ident) :: * + $e : expr =>) => { ... };'
-outer!(type $($i:ident)::* + $e:expr);
+// @has macro_generated_macro/macro.interpolations.html //pre 'macro_rules! interpolations {'
+// @has - //pre '(<= type $($i:ident)::* + $e:expr =>) => { ... };'
+make_macro!(interpolations type $($i:ident)::* + $e:expr);
+interpolations!(<= type foo::bar + x.sort() =>);
-inner!(<= type foo::bar + x.sort() =>);
+// @has macro_generated_macro/macro.attributes.html //pre 'macro_rules! attributes {'
+// @has - //pre '(<= #![no_std] #[cfg(feature = "alloc")] =>) => { ... };'
+make_macro!(attributes #![no_std] #[cfg(feature = "alloc")]);
+
+// @has macro_generated_macro/macro.groups.html //pre 'macro_rules! groups {'
+// @has - //pre '(<= fn {} () { foo[0] } =>) => { ... };'
+make_macro!(groups fn {}() {foo[0]});
+
+// @snapshot macro_linebreak_pre macro_generated_macro/macro.linebreak.html //pre/text()
+make_macro!(linebreak 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28);
+
+// @snapshot macro_morestuff_pre macro_generated_macro/macro.morestuff.html //pre/text()
+make_macro!(morestuff
+ "space between most kinds of tokens": 1 $x + @ :: >>= 'static
+ "no space inside paren or bracket": (2 a) [2 a] $(2 $a:tt)*
+ "space inside curly brace": { 2 a }
+ "no space inside empty delimiters": () [] {}
+ "no space before comma or semicolon": a, (a), { a }, a; [T; 0];
+ "the three repetition specifiers": $(@)*, $(@)+, $(@)?
+ "repetition separators": $(@)|*, $(@)|+, $(@)==*, $(@)static*
+ "plus or star cannot be a repetition separator": $(@)+ * $(@)* +
+ "no space between ident and paren": let _ = f(0) + f[0] + Struct {};
+ "space between keyword and paren": return (a,) & for x in (..)
+ "some special case keywords": pub(crate), fn() -> u8, Self(0, 0)
+);
--- /dev/null
+#![doc(html_no_source)]
+#![feature(staged_api)]
+#![stable(feature = "bar", since = "1.0")]
+#![crate_name = "foo"]
+
+// @has foo/fn.foo.html
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
+// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+#[stable(feature = "bar", since = "1.0")]
+pub fn foo() {}
+
+// @has foo/struct.Bar.html
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
+// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+#[stable(feature = "bar", since = "1.0")]
+pub struct Bar;
+
+impl Bar {
+ // @has - '//div[@id="method.bar"]/*[@class="rightside"]' '2.0'
+ // @!has - '//div[@id="method.bar"]/*[@class="rightside"]' '2.0 ·'
+ #[stable(feature = "foobar", since = "2.0")]
+ pub fn bar() {}
+}
|
= note: `#[deny(named_asm_labels)]` on by default
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:27:15
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:30:15
| ^^^ ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:34:15
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:35:15
| ^^^^ ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:37:22
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:38:15
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:38:28
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:43:15
| ^^^^ ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:45:15
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:46:20
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:49:15
| ^^^^ ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:51:15
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:52:21
| ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:53:21
| ^^^^ ^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:59:13
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:68:19
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:82:15
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:85:15
| ^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:86:15
| ^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:87:15
| ^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:95:15
| ^^^^^^^^^^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:96:15
| ^^^^^^^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:99:15
| ^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:100:15
| ^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:104:14
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:112:13
| ^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:124:14
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
warning: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:134:19
LL | #[warn(named_asm_labels)]
| ^^^^^^^^^^^^^^^^
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:143:20
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:149:20
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:157:20
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:167:24
| ^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:176:15
| ^^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:180:15
| ^^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: avoid using named labels in inline assembly
--> $DIR/named-asm-labels.rs:190:19
| ^^^^^^^^
|
= help: only local labels of the form `<number>:` should be used in inline asm
+ = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
error: aborting due to 35 previous errors; 1 warning emitted
LL | pub mod await {
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | pub mod r#await {
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error-in-non-macro-position.rs:7:20
LL | pub struct await;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | pub struct r#await;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error-in-non-macro-position.rs:10:22
LL | use self::outer_mod::await::await;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | use self::outer_mod::r#await::await;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error-in-non-macro-position.rs:10:29
LL | use self::outer_mod::await::await;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | use self::outer_mod::await::r#await;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error-in-non-macro-position.rs:13:14
LL | struct Foo { await: () }
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | struct Foo { r#await: () }
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error-in-non-macro-position.rs:16:15
LL | impl Foo { fn await() {} }
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | impl Foo { fn r#await() {} }
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error-in-non-macro-position.rs:19:14
LL | macro_rules! await {
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | macro_rules! r#await {
- | ~~~~~~~
+ | ++
error: aborting due to 7 previous errors
LL | pub mod await {
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | pub mod r#await {
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error.rs:6:20
LL | pub struct await;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | pub struct r#await;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error.rs:9:22
LL | use self::outer_mod::await::await;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | use self::outer_mod::r#await::await;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error.rs:9:29
LL | use self::outer_mod::await::await;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | use self::outer_mod::await::r#await;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/2018-edition-error.rs:12:14
LL | macro_rules! await { () => {}; }
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | macro_rules! r#await { () => {}; }
- | ~~~~~~~
+ | ++
error: expected expression, found `)`
--> $DIR/2018-edition-error.rs:15:12
= note: this error originates in the macro `bug` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected token: `{
- let res =
- ::alloc::fmt::format(::core::fmt::Arguments::new_v1(&[""],
- &[::core::fmt::ArgumentV1::new(&"u8",
- ::core::fmt::Display::fmt)]));
- res
- }.as_str()`
+ let res =
+ ::alloc::fmt::format(::core::fmt::Arguments::new_v1(&[""],
+ &[::core::fmt::ArgumentV1::new_display(&"u8")]));
+ res
+ }.as_str()`
--> $DIR/key-value-expansion.rs:48:23
|
LL | doc_comment! {format!("{coor}", coor = stringify!($t1)).as_str()}
--- /dev/null
+// #84044: This used to ICE.
+
+fn main() {
+ let f = || {};
+ drop(&mut f); //~ ERROR cannot borrow `f` as mutable, as it is not declared as mutable
+}
--- /dev/null
+error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
+ --> $DIR/issue-84044-drop-non-mut.rs:5:10
+ |
+LL | let f = || {};
+ | - help: consider changing this to be mutable: `mut f`
+LL | drop(&mut f);
+ | ^^^^^^ cannot borrow as mutable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0596`.
| expected due to this
|
= note: expected unit type `()`
- found closure `[mod1::f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#19t, extern "rust-call" fn(()), _#20t]]`
+ found closure `[mod1::f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#16t, extern "rust-call" fn(()), _#15t]]`
help: use parentheses to call this closure
|
LL | let c1 : () = c();
| expected due to this
|
= note: expected unit type `()`
- found closure `[f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#19t, extern "rust-call" fn(()), _#20t]]`
+ found closure `[f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#16t, extern "rust-call" fn(()), _#15t]]`
help: use parentheses to call this closure
|
LL | let c1 : () = c();
fn foo<const SIZE : usize = 5>() {}
struct Range<const FROM : usize = 0, const LEN : usize = 0, const TO : usize =
- FROM>;
+ FROM>;
const FOO: i32 = foo();
const fn foo() -> i32 {
unsafe {
- let _ = intrinsics::const_allocate(4, 3) as * mut i32;
+ let _ = intrinsics::const_allocate(4, 3) as *mut i32;
//~^ error: evaluation of constant value failed
}
1
-
}
fn main() {}
LL | const FOO: i32 = foo();
| ----- inside `FOO` at $DIR/alloc_intrinsic_errors.rs:6:18
...
-LL | let _ = intrinsics::const_allocate(4, 3) as * mut i32;
+LL | let _ = intrinsics::const_allocate(4, 3) as *mut i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| align has to be a power of 2, `3` is not a power of 2
--- /dev/null
+// run-pass
+#![feature(core_intrinsics)]
+#![feature(const_heap)]
+#![feature(inline_const)]
+
+use std::intrinsics;
+
+struct ZST;
+
+fn main() {
+ const {
+ unsafe {
+ let _ = intrinsics::const_allocate(0, 0) as *mut ZST;
+ }
+ }
+}
--- /dev/null
+// run-pass
+#![feature(core_intrinsics)]
+#![feature(const_heap)]
+#![feature(const_mut_refs)]
+
+use std::intrinsics;
+
+const _X: () = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ intrinsics::const_deallocate(ptr, 4, 4);
+};
+
+const Y: &u32 = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4) as *mut u32;
+ *ptr = 42;
+ &*ptr
+};
+
+const Z: &u32 = &42;
+
+const _Z: () = unsafe {
+ let ptr1 = Y as *const _ as *mut u8;
+ intrinsics::const_deallocate(ptr1, 4, 4); // nop
+ intrinsics::const_deallocate(ptr1, 2, 4); // nop
+ intrinsics::const_deallocate(ptr1, 4, 2); // nop
+
+ let ptr2 = Z as *const _ as *mut u8;
+ intrinsics::const_deallocate(ptr2, 4, 4); // nop
+ intrinsics::const_deallocate(ptr2, 2, 4); // nop
+ intrinsics::const_deallocate(ptr2, 4, 2); // nop
+};
+
+fn main() {
+ assert_eq!(*Y, 42);
+ assert_eq!(*Z, 42);
+}
--- /dev/null
+#![feature(core_intrinsics)]
+#![feature(const_heap)]
+#![feature(const_mut_refs)]
+
+use std::intrinsics;
+
+const _X: &'static u8 = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ intrinsics::const_deallocate(ptr, 4, 4);
+ &*ptr
+ //~^ error: evaluation of constant value failed
+};
+
+const _Y: u8 = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ let reference = &*ptr;
+ intrinsics::const_deallocate(ptr, 4, 4);
+ *reference
+ //~^ error: evaluation of constant value failed
+};
+
+fn main() {}
--- /dev/null
+error[E0080]: evaluation of constant value failed
+ --> $DIR/dealloc_intrinsic_dangling.rs:10:5
+ |
+LL | &*ptr
+ | ^^^^^ pointer to alloc2 was dereferenced after this allocation got freed
+
+error[E0080]: evaluation of constant value failed
+ --> $DIR/dealloc_intrinsic_dangling.rs:18:5
+ |
+LL | *reference
+ | ^^^^^^^^^^ pointer to alloc4 was dereferenced after this allocation got freed
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
--- /dev/null
+#![feature(core_intrinsics)]
+#![feature(const_heap)]
+
+use std::intrinsics;
+
+const _X: () = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ intrinsics::const_deallocate(ptr, 4, 4);
+ intrinsics::const_deallocate(ptr, 4, 4);
+ //~^ error: evaluation of constant value failed
+};
+
+fn main() {}
--- /dev/null
+error[E0080]: evaluation of constant value failed
+ --> $DIR/dealloc_intrinsic_duplicate.rs:9:5
+ |
+LL | intrinsics::const_deallocate(ptr, 4, 4);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer to alloc2 was dereferenced after this allocation got freed
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.
--- /dev/null
+#![feature(core_intrinsics)]
+#![feature(const_heap)]
+
+use std::intrinsics;
+
+const _X: () = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ intrinsics::const_deallocate(ptr, 4, 2);
+ //~^ error: evaluation of constant value failed
+};
+const _Y: () = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ intrinsics::const_deallocate(ptr, 2, 4);
+ //~^ error: evaluation of constant value failed
+};
+
+const _Z: () = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ intrinsics::const_deallocate(ptr, 3, 4);
+ //~^ error: evaluation of constant value failed
+};
+
+const _W: () = unsafe {
+ let ptr = intrinsics::const_allocate(4, 4);
+ intrinsics::const_deallocate(ptr, 4, 3);
+ //~^ error: evaluation of constant value failed
+};
+
+fn main() {}
--- /dev/null
+error[E0080]: evaluation of constant value failed
+ --> $DIR/dealloc_intrinsic_incorrect_layout.rs:8:5
+ |
+LL | intrinsics::const_deallocate(ptr, 4, 2);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc2 has size 4 and alignment 4, but gave size 4 and alignment 2
+
+error[E0080]: evaluation of constant value failed
+ --> $DIR/dealloc_intrinsic_incorrect_layout.rs:13:5
+ |
+LL | intrinsics::const_deallocate(ptr, 2, 4);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc4 has size 4 and alignment 4, but gave size 2 and alignment 4
+
+error[E0080]: evaluation of constant value failed
+ --> $DIR/dealloc_intrinsic_incorrect_layout.rs:19:5
+ |
+LL | intrinsics::const_deallocate(ptr, 3, 4);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc6 has size 4 and alignment 4, but gave size 3 and alignment 4
+
+error[E0080]: evaluation of constant value failed
+ --> $DIR/dealloc_intrinsic_incorrect_layout.rs:25:5
+ |
+LL | intrinsics::const_deallocate(ptr, 4, 3);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ align has to be a power of 2, `3` is not a power of 2
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
--- /dev/null
+// run-pass
+#![feature(core_intrinsics)]
+#![feature(const_heap)]
+#![feature(inline_const)]
+
+use std::intrinsics;
+
+fn main() {
+ const {
+ unsafe {
+ let ptr1 = intrinsics::const_allocate(0, 0);
+ let ptr2 = intrinsics::const_allocate(0, 0);
+ intrinsics::const_deallocate(ptr1, 0, 0);
+ intrinsics::const_deallocate(ptr2, 0, 0);
+ }
+ }
+}
--- /dev/null
+#[derive(Default)]
+pub struct A {
+ #[doc(hidden)]
+ pub hello: i32,
+ pub bye: i32,
+}
+
+#[derive(Default)]
+pub struct B {
+ pub hello: i32,
+ pub bye: i32,
+}
+
+fn main() {
+ A::default().hey;
+ //~^ ERROR no field `hey` on type `A`
+ //~| NOTE unknown field
+ //~| NOTE available fields are: `bye`
+
+ B::default().hey;
+ //~^ ERROR no field `hey` on type `B`
+ //~| NOTE unknown field
+ //~| NOTE available fields are: `hello`, `bye`
+}
--- /dev/null
+error[E0609]: no field `hey` on type `A`
+ --> $DIR/issue-93210-ignore-doc-hidden.rs:15:18
+ |
+LL | A::default().hey;
+ | ^^^ unknown field
+ |
+ = note: available fields are: `bye`
+
+error[E0609]: no field `hey` on type `B`
+ --> $DIR/issue-93210-ignore-doc-hidden.rs:20:18
+ |
+LL | B::default().hey;
+ | ^^^ unknown field
+ |
+ = note: available fields are: `hello`, `bye`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0609`.
| ^^^^^^^^^^^^^^^^^^ expected identifier, found keyword
|
= note: this error originates in the macro `produces_async` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: you can escape reserved keywords to use them as identifiers
+help: escape `async` to use it as an identifier
|
LL | () => (pub fn r#async() {})
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let mut async = 1;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `async` to use it as an identifier
|
LL | let mut r#async = 1;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `async`
--> $DIR/edition-keywords-2018-2015-parsing.rs:26:13
LL | module::async();
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `async` to use it as an identifier
|
LL | module::r#async();
- | ~~~~~~~
+ | ++
error: no rules expected the token `r#async`
--> $DIR/edition-keywords-2018-2015-parsing.rs:20:31
| ^^^^^^^^^^^^^^^^^^ expected identifier, found keyword
|
= note: this error originates in the macro `produces_async` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: you can escape reserved keywords to use them as identifiers
+help: escape `async` to use it as an identifier
|
LL | () => (pub fn r#async() {})
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let mut async = 1;
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `async` to use it as an identifier
|
LL | let mut r#async = 1;
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:26:13
LL | module::async();
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `async` to use it as an identifier
|
LL | module::r#async();
- | ~~~~~~~
+ | ++
error: no rules expected the token `r#async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:20:31
--- /dev/null
+// check-pass
+// edition:2021
+
+macro_rules! m {
+ () => {
+ async {}.await
+ };
+}
+
+async fn with_await() {
+ println!("{} {:?}", "", async {}.await);
+}
+
+async fn with_macro_call_expr() {
+ println!("{} {:?}", "", m!());
+}
+
+async fn with_macro_call_stmt_semi() {
+ println!("{} {:?}", "", { m!(); });
+}
+
+async fn with_macro_call_stmt_braced() {
+ println!("{} {:?}", "", { m!{} });
+}
+
+fn assert_send(_: impl Send) {}
+
+fn main() {
+ assert_send(with_await());
+ assert_send(with_macro_call_expr());
+ assert_send(with_macro_call_stmt_semi());
+ assert_send(with_macro_call_stmt_braced());
+}
| ^^^ the trait `UpperHex` is not implemented for `str`
|
= note: required because of the requirements on the impl of `UpperHex` for `&str`
+note: required by a bound in `ArgumentV1::<'a>::new_upper_hex`
+ --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
+ |
+LL | arg_new!(new_upper_hex, UpperHex);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ArgumentV1::<'a>::new_upper_hex`
= note: this error originates in the macro `$crate::__export::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
--- /dev/null
+#![feature(generic_associated_types)]
+#![allow(unused)]
+
+pub trait Trait {
+ type Assoc<'a> where Self: 'a;
+
+ fn f(&self) -> Self::Assoc<'_>;
+
+ // Disallow elision in return position, for now
+ fn g(&self) -> Self::Assoc;
+ //~^ ERROR missing generics for associated type `Trait::Assoc`
+}
+
+pub struct Struct {
+ item: f32
+}
+
+pub struct GenericStruct<'a> {
+ ref_item: &'a f32
+}
+
+impl Trait for Struct {
+ type Assoc<'a> = GenericStruct<'a>;
+
+ fn f(&self) -> Self::Assoc<'_> {
+ Self::Assoc {
+ ref_item: &self.item
+ }
+ }
+
+ // Disallow elision in return position, for now
+ fn g(&self) -> Self::Assoc {
+ //~^ ERROR missing generics for associated type `Trait::Assoc`
+ todo!()
+ }
+}
+
+fn main() {}
--- /dev/null
+error[E0107]: missing generics for associated type `Trait::Assoc`
+ --> $DIR/elided-in-expr-position.rs:10:26
+ |
+LL | fn g(&self) -> Self::Assoc;
+ | ^^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/elided-in-expr-position.rs:5:10
+ |
+LL | type Assoc<'a> where Self: 'a;
+ | ^^^^^ --
+help: add missing lifetime argument
+ |
+LL | fn g(&self) -> Self::Assoc<'_>;
+ | ~~~~~~~~~
+
+error[E0107]: missing generics for associated type `Trait::Assoc`
+ --> $DIR/elided-in-expr-position.rs:32:26
+ |
+LL | fn g(&self) -> Self::Assoc {
+ | ^^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/elided-in-expr-position.rs:5:10
+ |
+LL | type Assoc<'a> where Self: 'a;
+ | ^^^^^ --
+help: add missing lifetime argument
+ |
+LL | fn g(&self) -> Self::Assoc<'_> {
+ | ~~~~~~~~~
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0107`.
--- /dev/null
+// check-pass
+
+#![feature(generic_associated_types)]
+
+pub trait Scalar: 'static {
+ type RefType<'a>: ScalarRef<'a>;
+}
+
+pub trait ScalarRef<'a>: 'a {}
+
+fn cmp_eq<'a, 'b, A: Scalar, B: Scalar, O: Scalar>(a: A::RefType<'a>, b: B::RefType<'b>) -> O {
+ todo!()
+}
+
+fn build_expression<A: Scalar, B: Scalar, O: Scalar>(
+) -> impl Fn(A::RefType<'_>, B::RefType<'_>) -> O {
+ cmp_eq
+}
+
+fn main() {}
| required by a bound introduced by this call
|
= help: the trait `~const FnOnce<()>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]`
+note: the trait `FnOnce<()>` is implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]`, but that implementation is not `const`
+ --> $DIR/const-eval-select-bad.rs:6:27
+ |
+LL | const_eval_select((), || {}, || {});
+ | ^^^^^
= note: wrap the `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
error[E0282]: type annotations needed
- --> $DIR/issue-69455.rs:29:5
+ --> $DIR/issue-69455.rs:29:20
|
LL | type Output;
| ------------ `<Self as Test<Rhs>>::Output` defined here
...
LL | println!("{}", 23u64.test(xs.iter().sum()));
- | ^^^^^^^^^^^^^^^---------------------------^
- | | |
- | | this method call resolves to `<Self as Test<Rhs>>::Output`
- | cannot infer type for type parameter `T` declared on the associated function `new`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | |
+ | this method call resolves to `<Self as Test<Rhs>>::Output`
+ | cannot infer type for type parameter `T` declared on the associated function `new_display`
|
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
LL | let extern = 0;
| ^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `extern` to use it as an identifier
|
LL | let r#extern = 0;
- | ~~~~~~~~
+ | ++
error: aborting due to previous error
LL | use extern::foo;
| ^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `extern` to use it as an identifier
|
LL | use r#extern::foo;
- | ~~~~~~~~
+ | ++
error[E0432]: unresolved import `r#extern`
--> $DIR/keyword-extern-as-identifier-use.rs:1:5
// check-pass
pub fn main() ({
- (if (true as bool)
- ({ } as
- ()) else if (let Some(a) =
- ((Some as
- fn(i32) -> Option<i32> {Option::<i32>::Some})((3
- as
- i32))
- as Option<i32>) as bool)
- ({ } as ()) as ())
- } as ())
+ (if (true as bool)
+ ({ } as
+ ()) else if (let Some(a) =
+ ((Some as
+ fn(i32) -> Option<i32> {Option::<i32>::Some})((3
+ as i32)) as Option<i32>) as bool) ({ } as ())
+ as ())
+ } as ())
LL | fn false() { }
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `false` to use it as an identifier
|
LL | fn r#false() { }
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | fn true() { }
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `true` to use it as an identifier
|
LL | fn r#true() { }
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | return
| ^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `return` to use it as an identifier
|
LL | r#return
- |
+ | ++
error: expected one of `.`, `=>`, `?`, or an operator, found reserved identifier `_`
--> $DIR/issue-15980.rs:13:9
LL | foo!(true);
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `true` to use it as an identifier
|
LL | foo!(r#true);
- | ~~~~~~
+ | ++
error: invalid `struct` delimiters or `fn` call arguments
--> $DIR/issue-44406.rs:3:9
LL | m::for();
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `for` to use it as an identifier
|
LL | m::r#for();
- | ~~~~~
+ | ++
error: aborting due to previous error
LL | }
| - the item list ends here
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `impl` to use it as an identifier
|
LL | r#impl
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | let abstract = ();
| ^^^^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `abstract` to use it as an identifier
|
LL | let r#abstract = ();
- | ~~~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let as = "foo";
| ^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `as` to use it as an identifier
|
LL | let r#as = "foo";
- | ~~~~
+ | ++
error: aborting due to previous error
LL | let break = "foo";
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `break` to use it as an identifier
|
LL | let r#break = "foo";
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let const = "foo";
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `const` to use it as an identifier
|
LL | let r#const = "foo";
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let continue = "foo";
| ^^^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `continue` to use it as an identifier
|
LL | let r#continue = "foo";
- | ~~~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let else = "foo";
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `else` to use it as an identifier
|
LL | let r#else = "foo";
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | let enum = "foo";
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `enum` to use it as an identifier
|
LL | let r#enum = "foo";
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | let final = ();
| ^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `final` to use it as an identifier
|
LL | let r#final = ();
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let fn = "foo";
| ^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `fn` to use it as an identifier
|
LL | let r#fn = "foo";
- | ~~~~
+ | ++
error: aborting due to previous error
LL | let for = "foo";
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `for` to use it as an identifier
|
LL | let r#for = "foo";
- | ~~~~~
+ | ++
error: aborting due to previous error
LL | let if = "foo";
| ^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `if` to use it as an identifier
|
LL | let r#if = "foo";
- | ~~~~
+ | ++
error: aborting due to previous error
LL | let impl = "foo";
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `impl` to use it as an identifier
|
LL | let r#impl = "foo";
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | let let = "foo";
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `let` to use it as an identifier
|
LL | let r#let = "foo";
- | ~~~~~
+ | ++
error: aborting due to previous error
LL | let loop = "foo";
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `loop` to use it as an identifier
|
LL | let r#loop = "foo";
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | let match = "foo";
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `match` to use it as an identifier
|
LL | let r#match = "foo";
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let mod = "foo";
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `mod` to use it as an identifier
|
LL | let r#mod = "foo";
- | ~~~~~
+ | ++
error: aborting due to previous error
LL | let move = "foo";
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `move` to use it as an identifier
|
LL | let r#move = "foo";
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | let override = ();
| ^^^^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `override` to use it as an identifier
|
LL | let r#override = ();
- | ~~~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let pub = "foo";
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `pub` to use it as an identifier
|
LL | let r#pub = "foo";
- | ~~~~~
+ | ++
error: aborting due to previous error
LL | let return = "foo";
| ^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `return` to use it as an identifier
|
LL | let r#return = "foo";
- | ~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let static = "foo";
| ^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `static` to use it as an identifier
|
LL | let r#static = "foo";
- | ~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let struct = "foo";
| ^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `struct` to use it as an identifier
|
LL | let r#struct = "foo";
- | ~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let trait = "foo";
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `trait` to use it as an identifier
|
LL | let r#trait = "foo";
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let try = "foo";
| ^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `try` to use it as an identifier
|
LL | let r#try = "foo";
- | ~~~~~
+ | ++
error: aborting due to previous error
LL | let type = "foo";
| ^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `type` to use it as an identifier
|
LL | let r#type = "foo";
- | ~~~~~~
+ | ++
error: aborting due to previous error
LL | let typeof = ();
| ^^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `typeof` to use it as an identifier
|
LL | let r#typeof = ();
- | ~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let unsafe = "foo";
| ^^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `unsafe` to use it as an identifier
|
LL | let r#unsafe = "foo";
- | ~~~~~~~~
+ | ++
error: aborting due to previous error
LL | let use = "foo";
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `use` to use it as an identifier
|
LL | let r#use = "foo";
- | ~~~~~
+ | ++
error: aborting due to previous error
LL | let where = "foo";
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `where` to use it as an identifier
|
LL | let r#where = "foo";
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let while = "foo";
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `while` to use it as an identifier
|
LL | let r#while = "foo";
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | pub mod break {
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `break` to use it as an identifier
|
LL | pub mod r#break {
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | fn macro() {
| ^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `macro` to use it as an identifier
|
LL | fn r#macro() {
- | ~~~~~~~
+ | ++
error: aborting due to previous error
LL | let mut mut yield(become, await) = r#yield(0, 0);
| ^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `yield` to use it as an identifier
|
LL | let mut mut r#yield(become, await) = r#yield(0, 0);
- | ~~~~~~~
+ | ++
error: expected identifier, found reserved keyword `become`
--> $DIR/mut-patterns.rs:28:23
LL | let mut mut yield(become, await) = r#yield(0, 0);
| ^^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `become` to use it as an identifier
|
LL | let mut mut yield(r#become, await) = r#yield(0, 0);
- | ~~~~~~~~
+ | ++
error: expected identifier, found keyword `await`
--> $DIR/mut-patterns.rs:28:31
LL | let mut mut yield(become, await) = r#yield(0, 0);
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `await` to use it as an identifier
|
LL | let mut mut yield(become, r#await) = r#yield(0, 0);
- | ~~~~~~~
+ | ++
error: `mut` must be attached to each individual binding
--> $DIR/mut-patterns.rs:28:9
PRINT-ATTR INPUT (DISPLAY): impl Foo <
[u8 ;
- {
- #! [rustc_dummy(cursed_inner)] #! [allow(unused)] struct Inner
- { field : [u8 ; { #! [rustc_dummy(another_cursed_inner)] 1 }] } 0
- }] > { #! [rustc_dummy(evaluated_attr)] fn bar() {} }
+{
+ #! [rustc_dummy(cursed_inner)] #! [allow(unused)] struct Inner
+ { field : [u8 ; { #! [rustc_dummy(another_cursed_inner)] 1 }] } 0
+}] > { #! [rustc_dummy(evaluated_attr)] fn bar() {} }
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "impl",
#[cfg(FALSE)] first : String, #[cfg_attr(FALSE, deny(warnings))] second :
bool, third :
[u8 ;
- {
- #[cfg(FALSE)] struct Bar ; #[cfg(not(FALSE))] struct Inner ;
- #[cfg(FALSE)] let a = 25 ; match true
- {
- #[cfg(FALSE)] true => {},
- #[cfg_attr(not(FALSE), allow(warnings))] false => {}, _ => {}
- } ; #[print_helper(should_be_removed)] fn removed_fn()
- { #! [cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn
- kept_fn() { #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
- {
- Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
- #[cfg(FALSE)] String, u8)
- } struct
- TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
- #[cfg(FALSE)] bool, u8) ; fn plain_removed_fn()
- { #! [cfg_attr(not(FALSE), cfg(FALSE))] } 0
- }], #[print_helper(d)] fourth : B
+ {
+ #[cfg(FALSE)] struct Bar ; #[cfg(not(FALSE))] struct Inner ;
+ #[cfg(FALSE)] let a = 25 ; match true
+ {
+ #[cfg(FALSE)] true => {}, #[cfg_attr(not(FALSE), allow(warnings))]
+ false => {}, _ => {}
+ } ; #[print_helper(should_be_removed)] fn removed_fn()
+ { #! [cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn()
+ { #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
+ {
+ Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] String, u8)
+ } struct
+ TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] bool, u8) ; fn plain_removed_fn()
+ { #! [cfg_attr(not(FALSE), cfg(FALSE))] } 0
+ }], #[print_helper(d)] fourth : B
}
PRINT-ATTR INPUT (DEBUG): TokenStream [
Punct {
{
second : bool, third :
[u8 ;
- {
- #[cfg(not(FALSE))] struct Inner ; match true
- { #[allow(warnings)] false => {}, _ => {} } ; #[print_helper(c)]
- #[cfg(not(FALSE))] fn kept_fn()
- { #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
- { Foo(#[cfg(not(FALSE))] i32, u8) } struct
- TupleStruct(#[cfg(not(FALSE))] i32, u8) ; 0
- }], #[print_helper(d)] fourth : B
+ {
+ #[cfg(not(FALSE))] struct Inner ; match true
+ { #[allow(warnings)] false => {}, _ => {} } ; #[print_helper(c)]
+ #[cfg(not(FALSE))] fn kept_fn()
+ { #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
+ { Foo(#[cfg(not(FALSE))] i32, u8) } struct
+ TupleStruct(#[cfg(not(FALSE))] i32, u8) ; 0
+ }], #[print_helper(d)] fourth : B
}
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Punct {
{
val :
[bool ;
- {
- let a = #[rustc_dummy(first)] #[rustc_dummy(second)]
- { #! [allow(unused)] 30 } ; 0
- }]
+ {
+ let a = #[rustc_dummy(first)] #[rustc_dummy(second)]
+ { #! [allow(unused)] 30 } ; 0
+ }]
}
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
fn main() {
[crate::TokenStream::from(crate::TokenTree::Ident(crate::Ident::new("let",
- crate::Span::recover_proc_macro_span(0)))),
- crate::TokenStream::from(crate::TokenTree::Ident(crate::Ident::new("hello",
- crate::Span::recover_proc_macro_span(1)))),
- crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3d}',
- crate::Spacing::Alone))),
- crate::TokenStream::from(crate::TokenTree::Literal({
- let mut iter =
- "\"world\"".parse::<crate::TokenStream>().unwrap().into_iter();
- if let (Some(crate::TokenTree::Literal(mut lit)),
- None) =
- (iter.next(),
- iter.next())
- {
- lit.set_span(crate::Span::recover_proc_macro_span(2));
- lit
- } else {
- {
- ::core::panicking::panic("internal error: entered unreachable code")
- }
- }
- })),
- crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3b}',
- crate::Spacing::Alone)))].iter().cloned().collect::<crate::TokenStream>()
+ crate::Span::recover_proc_macro_span(0)))),
+ crate::TokenStream::from(crate::TokenTree::Ident(crate::Ident::new("hello",
+ crate::Span::recover_proc_macro_span(1)))),
+ crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3d}',
+ crate::Spacing::Alone))),
+ crate::TokenStream::from(crate::TokenTree::Literal({
+ let mut iter =
+ "\"world\"".parse::<crate::TokenStream>().unwrap().into_iter();
+ if let (Some(crate::TokenTree::Literal(mut lit)),
+ None) =
+ (iter.next(), iter.next()) {
+ lit.set_span(crate::Span::recover_proc_macro_span(2));
+ lit
+ } else {
+ {
+ ::core::panicking::panic("internal error: entered unreachable code")
+ }
+ }
+ })),
+ crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3b}',
+ crate::Spacing::Alone)))].iter().cloned().collect::<crate::TokenStream>()
}
const _: () =
{
LL | let become = 0;
| ^^^^^^ expected identifier, found reserved keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `become` to use it as an identifier
|
LL | let r#become = 0;
- | ~~~~~~~~
+ | ++
error: aborting due to previous error
fn hello(#[angery(true)] a : i32, #[a2] b : i32, #[what = "how"] c : u32)
{} fn
hello2(#[a1] #[a2] a : i32, #[what = "how"] b : i32, #[angery(true)] c :
- u32) {} fn
+ u32) {} fn
hello_self(#[a1] #[a2] & self, #[a1] #[a2] a : i32, #[what = "how"] b :
- i32, #[angery(true)] c : u32) {}
+ i32, #[angery(true)] c : u32) {}
}"#);
| ^^^^^^^^^^^ no implementation for `NonConstAdd + NonConstAdd`
|
= help: the trait `~const Add` is not implemented for `NonConstAdd`
+note: the trait `Add` is implemented for `NonConstAdd`, but that implementation is not `const`
+ --> $DIR/assoc-type.rs:18:16
+ |
+LL | type Bar = NonConstAdd;
+ | ^^^^^^^^^^^
note: required by a bound in `Foo::Bar`
--> $DIR/assoc-type.rs:14:15
|
| required by a bound introduced by this call
|
= help: the trait `~const PartialEq` is not implemented for `S`
+note: the trait `PartialEq` is implemented for `S`, but that implementation is not `const`
+ --> $DIR/call-generic-method-nonconst.rs:19:34
+ |
+LL | pub const EQ: bool = equals_self(&S);
+ | ^^
note: required by a bound in `equals_self`
--> $DIR/call-generic-method-nonconst.rs:12:25
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Drop` is not implemented for `NonTrivialDrop`
|
+note: the trait `Drop` is implemented for `NonTrivialDrop`, but that implementation is not `const`
+ --> $DIR/const-drop-fail.rs:46:5
+ |
+LL | ConstImplWithDropGlue(NonTrivialDrop),
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `ConstImplWithDropGlue`
--> $DIR/const-drop-fail.rs:17:8
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Drop` is not implemented for `NonTrivialDrop`
|
+note: the trait `Drop` is implemented for `NonTrivialDrop`, but that implementation is not `const`
+ --> $DIR/const-drop-fail.rs:46:5
+ |
+LL | ConstImplWithDropGlue(NonTrivialDrop),
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `ConstImplWithDropGlue`
--> $DIR/const-drop-fail.rs:17:8
|
LL | foo::<()>();
| ^^ the trait `~const Tr` is not implemented for `()`
|
+note: the trait `Tr` is implemented for `()`, but that implementation is not `const`
+ --> $DIR/default-method-body-is-const-body-checking.rs:12:15
+ |
+LL | foo::<()>();
+ | ^^
note: required by a bound in `foo`
--> $DIR/default-method-body-is-const-body-checking.rs:7:28
|
LL | T::b();
| ^^^^ the trait `~const Bar` is not implemented for `T`
|
+note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
+ --> $DIR/trait-where-clause.rs:14:5
+ |
+LL | T::b();
+ | ^^^^
note: required by a bound in `Foo::b`
--> $DIR/trait-where-clause.rs:8:24
|
LL | T::c::<T>();
| ^^^^^^^^^ the trait `~const Bar` is not implemented for `T`
|
+note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
+ --> $DIR/trait-where-clause.rs:16:5
+ |
+LL | T::c::<T>();
+ | ^^^^^^^^^
note: required by a bound in `Foo::c`
--> $DIR/trait-where-clause.rs:9:13
|
LL | type A1 = dyn::dyn;
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `dyn` to use it as an identifier
|
LL | type A1 = dyn::r#dyn;
- | ~~~~~
+ | ++
error: expected identifier, found `<`
--> $DIR/dyn-trait-compatibility.rs:5:14
--- /dev/null
+// compile-flags: -Zsave-analysis
+
+// Check that this does not ICE.
+// Stolen from src/test/ui/const-generics/generic_arg_infer/infer-arg-test.rs
+
+#![feature(generic_arg_infer)]
+
+struct All<'a, T, const N: usize> {
+ v: &'a T,
+}
+
+struct BadInfer<_>;
+//~^ ERROR expected identifier
+//~| ERROR parameter `_` is never used
+
+fn all_fn<'a, T, const N: usize>() {}
+
+fn bad_infer_fn<_>() {}
+//~^ ERROR expected identifier
+
+
+fn main() {
+ let a: All<_, _, _>;
+ //~^ ERROR this struct takes 2 generic arguments but 3 generic arguments were supplied
+ all_fn();
+ let v: [u8; _];
+ let v: [u8; 10] = [0; _];
+}
--- /dev/null
+error: expected identifier, found reserved identifier `_`
+ --> $DIR/issue-89066.rs:12:17
+ |
+LL | struct BadInfer<_>;
+ | ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+ --> $DIR/issue-89066.rs:18:17
+ |
+LL | fn bad_infer_fn<_>() {}
+ | ^ expected identifier, found reserved identifier
+
+error[E0392]: parameter `_` is never used
+ --> $DIR/issue-89066.rs:12:17
+ |
+LL | struct BadInfer<_>;
+ | ^ unused parameter
+ |
+ = help: consider removing `_`, referring to it in a field, or using a marker such as `PhantomData`
+ = help: if you intended `_` to be a const parameter, use `const _: usize` instead
+
+error[E0107]: this struct takes 2 generic arguments but 3 generic arguments were supplied
+ --> $DIR/issue-89066.rs:23:10
+ |
+LL | let a: All<_, _, _>;
+ | ^^^ - help: remove this generic argument
+ | |
+ | expected 2 generic arguments
+ |
+note: struct defined here, with 2 generic parameters: `T`, `N`
+ --> $DIR/issue-89066.rs:8:8
+ |
+LL | struct All<'a, T, const N: usize> {
+ | ^^^ - -
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0107, E0392.
+For more information about an error, try `rustc --explain E0107`.
error: aborting due to 4 previous errors
-For more information about this error, try `rustc --explain E0515`.
+Some errors have detailed explanations: E0515, E0772.
+For more information about an error, try `rustc --explain E0515`.
error: aborting due to 6 previous errors
-For more information about this error, try `rustc --explain E0759`.
+Some errors have detailed explanations: E0759, E0772.
+For more information about an error, try `rustc --explain E0759`.
--- /dev/null
+// compile-flags: --crate-type lib
+pub struct S {
+ pub val: string::MyString,
+}
+
+pub fn test(s: S) {
+ dbg!(s.cap) //~ ERROR: no field `cap` on type `S` [E0609]
+}
+
+pub(crate) mod string {
+
+ pub struct MyString {
+ buf: MyVec,
+ }
+
+ struct MyVec {
+ cap: usize,
+ }
+}
--- /dev/null
+error[E0609]: no field `cap` on type `S`
+ --> $DIR/private-field.rs:7:12
+ |
+LL | dbg!(s.cap)
+ | ^^^ unknown field
+ |
+ = note: available fields are: `val`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0609`.
LL | pub fn break() {}
| ^^^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `break` to use it as an identifier
|
LL | pub fn r#break() {}
- | ~~~~~~~
+ | ++
error: expected identifier, found keyword `let`
--> $DIR/raw-name-use-suggestion.rs:7:10
LL | foo::let();
| ^^^ expected identifier, found keyword
|
-help: you can escape reserved keywords to use them as identifiers
+help: escape `let` to use it as an identifier
|
LL | foo::r#let();
- | ~~~~~
+ | ++
error[E0425]: cannot find function `r#break` in this scope
--> $DIR/raw-name-use-suggestion.rs:8:5
--- /dev/null
+// #91594: This used to ICE.
+
+trait Component<M> {
+ type Interface;
+}
+trait HasComponent<I> {}
+
+struct Foo;
+
+impl HasComponent<<Foo as Component<Foo>>::Interface> for Foo {}
+//~^ ERROR the trait bound `Foo: HasComponent<()>` is not satisfied
+
+impl<M: HasComponent<()>> Component<M> for Foo {
+ type Interface = u8;
+}
+
+fn main() {}
--- /dev/null
+error[E0277]: the trait bound `Foo: HasComponent<()>` is not satisfied
+ --> $DIR/issue-91594.rs:10:6
+ |
+LL | impl HasComponent<<Foo as Component<Foo>>::Interface> for Foo {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `HasComponent<()>` is not implemented for `Foo`
+ |
+ = help: the following implementations were found:
+ <Foo as HasComponent<<Foo as Component<Foo>>::Interface>>
+note: required because of the requirements on the impl of `Component<Foo>` for `Foo`
+ --> $DIR/issue-91594.rs:13:27
+ |
+LL | impl<M: HasComponent<()>> Component<M> for Foo {
+ | ^^^^^^^^^^^^ ^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
trait Animal { }
fn main() {
- pub type ServeFut = /*impl Trait*/;
- }
+ pub type ServeFut = /*impl Trait*/;
+ }
use clippy_utils::ty::is_copy;
use clippy_utils::{is_expn_of, is_lint_allowed, meets_msrv, msrvs, path_to_local};
use if_chain::if_chain;
-use rustc_data_structures::fx::{FxHashMap, FxHashSet};
+use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
use rustc_errors::Applicability;
use rustc_hir as hir;
use rustc_hir::intravisit::{self, Visitor};
extract_msrv_attr!(LateContext);
}
-fn find_slice_values(cx: &LateContext<'_>, pat: &hir::Pat<'_>) -> FxHashMap<hir::HirId, SliceLintInformation> {
+fn find_slice_values(cx: &LateContext<'_>, pat: &hir::Pat<'_>) -> FxIndexMap<hir::HirId, SliceLintInformation> {
let mut removed_pat: FxHashSet<hir::HirId> = FxHashSet::default();
- let mut slices: FxHashMap<hir::HirId, SliceLintInformation> = FxHashMap::default();
+ let mut slices: FxIndexMap<hir::HirId, SliceLintInformation> = FxIndexMap::default();
pat.walk_always(|pat| {
if let hir::PatKind::Binding(binding, value_hir_id, ident, sub_pat) = pat.kind {
// We'll just ignore mut and ref mut for simplicity sake right now
fn filter_lintable_slices<'a, 'tcx>(
cx: &'a LateContext<'tcx>,
- slice_lint_info: FxHashMap<hir::HirId, SliceLintInformation>,
+ slice_lint_info: FxIndexMap<hir::HirId, SliceLintInformation>,
max_suggested_slice: u64,
scope: &'tcx hir::Expr<'tcx>,
-) -> FxHashMap<hir::HirId, SliceLintInformation> {
+) -> FxIndexMap<hir::HirId, SliceLintInformation> {
let mut visitor = SliceIndexLintingVisitor {
cx,
slice_lint_info,
struct SliceIndexLintingVisitor<'a, 'tcx> {
cx: &'a LateContext<'tcx>,
- slice_lint_info: FxHashMap<hir::HirId, SliceLintInformation>,
+ slice_lint_info: FxIndexMap<hir::HirId, SliceLintInformation>,
max_suggested_slice: u64,
}
expr_visitor_no_bodies(|e| {
// if we're still inside of the macro definition...
if e.span.ctxt() == expr.span.ctxt() {
- // ArgumnetV1::new(<value>, <format_trait>::fmt)
+ // ArgumnetV1::new_<format_trait>(<value>)
if_chain! {
- if let ExprKind::Call(callee, [val, fmt_path]) = e.kind;
+ if let ExprKind::Call(callee, [val]) = e.kind;
if let ExprKind::Path(QPath::TypeRelative(ty, seg)) = callee.kind;
- if seg.ident.name == sym::new;
if let hir::TyKind::Path(QPath::Resolved(_, path)) = ty.kind;
if path.segments.last().unwrap().ident.name == sym::ArgumentV1;
- if let ExprKind::Path(QPath::Resolved(_, path)) = fmt_path.kind;
- if let [.., fmt_trait, _fmt] = path.segments;
+ if seg.ident.name.as_str().starts_with("new_");
then {
let val_idx = if_chain! {
if val.span.ctxt() == expr.span.ctxt();
formatters.len()
}
};
- formatters.push((val_idx, fmt_trait.ident.name));
+ let fmt_trait = match seg.ident.name.as_str() {
+ "new_display" => "Display",
+ "new_debug" => "Debug",
+ "new_lower_exp" => "LowerExp",
+ "new_upper_exp" => "UpperExp",
+ "new_octal" => "Octal",
+ "new_pointer" => "Pointer",
+ "new_binary" => "Binary",
+ "new_lower_hex" => "LowerHex",
+ "new_upper_hex" => "UpperHex",
+ _ => unreachable!(),
+ };
+ formatters.push((val_idx, Symbol::intern(fmt_trait)));
}
}
if let ExprKind::Struct(QPath::Resolved(_, path), ..) = e.kind {