<ins> // Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. use std::borrow::{ToOwned, Cow}; fn assert_send<T: Send>(_: T) {} fn main() { assert_send(Cow::Borrowed("foo")); } </ins>


} } <ins> if !unnormalized_trait_sig.output().references_error() { debug_assert!( !collector.types.is_empty(), "expect >0 RPITITs in call to `collect_return_position_impl_trait_in_trait_tys`" ); } </ins> // FIXME: This has the same issue as #108544, but since this isn't breaking // existing code, I'm not particularly inclined to do the same hack as above // where we process wf obligations manually. This can be fixed in a forward-


.param_env .and(type_op::implied_outlives_bounds::ImpliedOutlivesBounds { ty }) .fully_perform(self.infcx, DUMMY_SP) <del> .unwrap_or_else(|_| bug!("failed to compute implied bounds {:?}", ty)); </del> <ins> .map_err(|_: ErrorGuaranteed| debug!("failed to compute implied bounds {:?}", ty)) .ok()?; </ins> debug!(?bounds, ?constraints); self.add_outlives_bounds(bounds); constraints


} // We probe again, taking all traits into account (not only those in scope). <del> let candidates = match self.lookup_probe( </del> <ins> let mut candidates = match self.lookup_probe( </ins> span, segment.ident, self_ty,


if instance.def.is_inline(tcx) { attributes::inline(llfn, attributes::InlineAttr::Hint); } <del> attributes::from_fn_attrs(cx, llfn, instance.def.def_id()); </del> <ins> attributes::from_fn_attrs(cx, llfn, Some(instance.def.def_id())); </ins> let instance_def_id = instance.def_id();


..(ori_link.range.start + before_second_backtick_group) } <ins> /// Returns true if we should ignore `link` due to it being unlikely /// that it is an intra-doc link. `link` should still have disambiguators /// if there were any. /// /// The difference between this and [`should_ignore_link()`] is that this /// check should only be used on links that still have disambiguators. fn should_ignore_link_with_disambiguators(link: &str) -> bool { link.contains(|ch: char| !(ch.is_alphanumeric() || ":_<>, !*&;@()".contains(ch))) } /// Returns true if we should ignore `path_str` due to it being unlikely /// that it is an intra-doc link. fn should_ignore_link(path_str: &str) -> bool { path_str.contains(|ch: char| !(ch.is_alphanumeric() || ":_<>, !*&;".contains(ch))) } </ins> #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] /// Disambiguators for a link. crate enum Disambiguator {


use rustc_hir::{HirId, HirIdSet, Node}; use rustc_middle::lint::LintDiagnosticBuilder; use rustc_middle::ty::subst::{GenericArgKind, Subst}; <del> use rustc_middle::ty::{self, Ty, TyCtxt}; </del> <ins> use rustc_middle::ty::{self, layout::LayoutError, Ty, TyCtxt}; </ins> use rustc_session::lint::FutureIncompatibleInfo; use rustc_session::Session; use rustc_span::edition::Edition;


} #[test] <del> fn wtf8_show() { let mut string = Wtf8Buf::from_str("aé 💩"); string.push(CodePoint::from_u32(0xD800).unwrap()); assert_eq!(format!("{:?}", string), r#""aé 💩u{D800}""#); </del> <ins> fn wtf8buf_show_str() { let text = "até 💩r"; let mut string = Wtf8Buf::from_str(text); assert_eq!(format!("{:?}", text), format!("{:?}", string)); </ins> } #[test]


extern crate issue_76736_2; // @has foo/struct.Foo.html <del> // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </del> <ins> // @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </ins> pub struct Foo; // @has foo/struct.Bar.html <del> // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </del> <ins> // @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </ins> pub use issue_76736_2::Bar;


size: (1100, 800) // We check that ".item-info" is bigger than its content. assert-css: (".item-info", {"width": "807px"}) <del> assert-css: (".item-info .stab", {"width": "343px"}) </del> <ins> assert-css: (".item-info .stab", {"width": "341px"}) </ins>


}); debug!("instantiate_method_substs: user_type_annotation={:?}", user_type_annotation); <del> self.fcx.write_user_type_annotation(self.call_expr.hir_id, user_type_annotation); </del> <ins> if !self.skip_record_for_diagnostics { self.fcx.write_user_type_annotation(self.call_expr.hir_id, user_type_annotation); } </ins> } self.normalize(self.span, substs)


<ins> fn main() { extern { static symbol: [usize]; //~ ERROR: the size for values of type } println!("{}", symbol[0]); } </ins>


stabilizing its interface")] impl<T> ScopedKey<T> { #[doc(hidden)] <del> pub const fn new() -> ScopedKey<T> { ScopedKey { inner: imp::KeyInner::new() } </del> <ins> pub const fn new(inner: fn() -> &'static imp::KeyInner<T>) -> ScopedKey<T> { ScopedKey { inner: inner } </ins> } /// Inserts a value into this scoped thread local storage slot for a


/// Pushes all the predicates needed to validate that `ty` is WF into `out`. #[instrument(level = "debug", skip(self))] fn compute(&mut self, arg: GenericArg<'tcx>) { <del> let mut walker = arg.walk(); let param_env = self.param_env; let depth = self.recursion_depth; while let Some(arg) = walker.next() { debug!(?arg, ?self.out); let ty = match arg.unpack() { GenericArgKind::Type(ty) => ty, // No WF constraints for lifetimes being present, any outlives // obligations are handled by the parent (e.g. `ty::Ref`). GenericArgKind::Lifetime(_) => continue, GenericArgKind::Const(ct) => { match ct.kind() { ty::ConstKind::Unevaluated(uv) => { if !ct.has_escaping_bound_vars() { let obligations = self.nominal_obligations(uv.def, uv.args); self.out.extend(obligations); let predicate = ty::Binder::dummy(ty::PredicateKind::Clause( ty::ClauseKind::ConstEvaluatable(ct), )); let cause = self.cause(traits::WellFormed(None)); self.out.push(traits::Obligation::with_depth( self.tcx(), cause, self.recursion_depth, self.param_env, predicate, )); } } ty::ConstKind::Infer(_) => { let cause = self.cause(traits::WellFormed(None)); self.out.push(traits::Obligation::with_depth( self.tcx(), cause, self.recursion_depth, self.param_env, ty::Binder::dummy(ty::PredicateKind::Clause( ty::ClauseKind::WellFormed(ct.into()), )), )); } ty::ConstKind::Expr(_) => { // FIXME(generic_const_exprs): this doesn't verify that given `Expr(N + 1)` the // trait bound `typeof(N): Add<typeof(1)>` holds. This is currently unnecessary // as `ConstKind::Expr` is only produced via normalization of `ConstKind::Unevaluated` // which means that the `DefId` would have been typeck'd elsewhere. However in // the future we may allow directly lowering to `ConstKind::Expr` in which case // we would not be proving bounds we should. let predicate = ty::Binder::dummy(ty::PredicateKind::Clause( ty::ClauseKind::ConstEvaluatable(ct), )); let cause = self.cause(traits::WellFormed(None)); self.out.push(traits::Obligation::with_depth( self.tcx(), cause, self.recursion_depth, self.param_env, predicate, )); } ty::ConstKind::Error(_) | ty::ConstKind::Param(_) | ty::ConstKind::Bound(..) | ty::ConstKind::Placeholder(..) => { // These variants are trivially WF, so nothing to do here. } ty::ConstKind::Value(..) => { // FIXME: Enforce that values are structurally-matchable. } } continue; } }; debug!("wf bounds for ty={:?} ty.kind={:#?}", ty, ty.kind()); match *ty.kind() { ty::Bool | ty::Char | ty::Int(..) | ty::Uint(..) | ty::Float(..) | ty::Error(_) | ty::Str | ty::CoroutineWitness(..) | ty::Never | ty::Param(_) | ty::Bound(..) | ty::Placeholder(..) | ty::Foreign(..) => { // WfScalar, WfParameter, etc } // Can only infer to `ty::Int(_) | ty::Uint(_)`. ty::Infer(ty::IntVar(_)) => {} // Can only infer to `ty::Float(_)`. ty::Infer(ty::FloatVar(_)) => {} ty::Slice(subty) => { self.require_sized(subty, traits::SliceOrArrayElem); } ty::Array(subty, _) => { self.require_sized(subty, traits::SliceOrArrayElem); // Note that we handle the len is implicitly checked while walking `arg`. } ty::Tuple(tys) => { if let Some((_last, rest)) = tys.split_last() { for &elem in rest { self.require_sized(elem, traits::TupleElem); } } } ty::RawPtr(_) => { // Simple cases that are WF if their type args are WF. } ty::Alias(ty::Projection, data) => { walker.skip_current_subtree(); // Subtree handled by compute_projection. self.compute_projection(data); } ty::Alias(ty::Inherent, data) => { walker.skip_current_subtree(); // Subtree handled by compute_inherent_projection. self.compute_inherent_projection(data); } ty::Adt(def, args) => { // WfNominalType let obligations = self.nominal_obligations(def.did(), args); self.out.extend(obligations); } ty::FnDef(did, args) => { let obligations = self.nominal_obligations(did, args); self.out.extend(obligations); } ty::Ref(r, rty, _) => { // WfReference if !r.has_escaping_bound_vars() && !rty.has_escaping_bound_vars() { let cause = self.cause(traits::ReferenceOutlivesReferent(ty)); self.out.push(traits::Obligation::with_depth( self.tcx(), cause, depth, param_env, ty::Binder::dummy(ty::PredicateKind::Clause( ty::ClauseKind::TypeOutlives(ty::OutlivesPredicate(rty, r)), )), )); } } ty::Coroutine(did, args, ..) => { // Walk ALL the types in the coroutine: this will // include the upvar types as well as the yield // type. Note that this is mildly distinct from // the closure case, where we have to be careful // about the signature of the closure. We don't // have the problem of implied bounds here since // coroutines don't take arguments. let obligations = self.nominal_obligations(did, args); self.out.extend(obligations); } ty::Closure(did, args) => { // Only check the upvar types for WF, not the rest // of the types within. This is needed because we // capture the signature and it may not be WF // without the implied bounds. Consider a closure // like `|x: &'a T|` -- it may be that `T: 'a` is // not known to hold in the creator's context (and // indeed the closure may not be invoked by its // creator, but rather turned to someone who *can* // verify that). // // The special treatment of closures here really // ought not to be necessary either; the problem // is related to #25860 -- there is no way for us // to express a fn type complete with the implied // bounds that it is assuming. I think in reality // the WF rules around fn are a bit messed up, and // that is the rot problem: `fn(&'a T)` should // probably always be WF, because it should be // shorthand for something like `where(T: 'a) { // fn(&'a T) }`, as discussed in #25860. walker.skip_current_subtree(); // subtree handled below // FIXME(eddyb) add the type to `walker` instead of recursing. self.compute(args.as_closure().tupled_upvars_ty().into()); // Note that we cannot skip the generic types // types. Normally, within the fn // body where they are created, the generics will // always be WF, and outside of that fn body we // are not directly inspecting closure types // anyway, except via auto trait matching (which // only inspects the upvar types). // But when a closure is part of a type-alias-impl-trait // then the function that created the defining site may // have had more bounds available than the type alias // specifies. This may cause us to have a closure in the // hidden type that is not actually well formed and // can cause compiler crashes when the user abuses unsafe // code to procure such a closure. // See tests/ui/type-alias-impl-trait/wf_check_closures.rs let obligations = self.nominal_obligations(did, args); self.out.extend(obligations); } ty::CoroutineClosure(did, args) => { // See the above comments. The same apply to coroutine-closures. walker.skip_current_subtree(); self.compute(args.as_coroutine_closure().tupled_upvars_ty().into()); let obligations = self.nominal_obligations(did, args); self.out.extend(obligations); } ty::FnPtr(_) => { // let the loop iterate into the argument/return // types appearing in the fn signature } ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) => { // All of the requirements on type parameters // have already been checked for `impl Trait` in // return position. We do need to check type-alias-impl-trait though. if self.tcx().is_type_alias_impl_trait(def_id) { let obligations = self.nominal_obligations(def_id, args); self.out.extend(obligations); } } ty::Alias(ty::Weak, ty::AliasTy { def_id, args, .. }) => { let obligations = self.nominal_obligations(def_id, args); self.out.extend(obligations); } ty::Dynamic(data, r, _) => { // WfObject // // Here, we defer WF checking due to higher-ranked // regions. This is perhaps not ideal. self.from_object_ty(ty, data, r); // FIXME(#27579) RFC also considers adding trait // obligations that don't refer to Self and // checking those let defer_to_coercion = self.tcx().features().object_safe_for_dispatch; if !defer_to_coercion { if let Some(principal) = data.principal_def_id() { self.out.push(traits::Obligation::with_depth( self.tcx(), self.cause(traits::WellFormed(None)), depth, param_env, ty::Binder::dummy(ty::PredicateKind::ObjectSafe(principal)), )); } } } // Inference variables are the complicated case, since we don't // know what type they are. We do two things: // // 1. Check if they have been resolved, and if so proceed with //    THAT type. // 2. If not, we've at least simplified things (e.g., we went //    from `Vec<$0>: WF` to `$0: WF`), so we can //    register a pending obligation and keep //    moving. (Goal is that an "inductive hypothesis" //    is satisfied to ensure termination.) // See also the comment on `fn obligations`, describing "livelock" // prevention, which happens before this can be reached. ty::Infer(_) => { let cause = self.cause(traits::WellFormed(None)); self.out.push(traits::Obligation::with_depth( self.tcx(), cause, self.recursion_depth, param_env, ty::Binder::dummy(ty::PredicateKind::Clause(ty::ClauseKind::WellFormed( ty.into(), ))), )); } } debug!(?self.out); } </del> <ins> arg.visit_with(self); debug!(?self.out); </ins> } #[instrument(level = "debug", skip(self))]


CHECK:        [[DEFINE_INTERNAL]] { {{.*}} } @_R{{[a-zA-Z0-9_]+}}testprog14will_be_called() unnamed_addr #{{[0-9]+}} { CHECK-NEXT:   start: CHECK-NOT:    [[DEFINE_INTERNAL]] <del> CHECK:        %pgocount = load i64, {{i64*|ptr}} </del> <ins> CHECK:        atomicrmw add ptr </ins> CHECK-SAME:   @__profc__R{{[a-zA-Z0-9_]+}}testprog14will_be_called, CHECK:        declare void @llvm.instrprof.increment({{i8*|ptr}}, i64, i32, i32) #[[LLVM_INSTRPROF_INCREMENT_ATTR:[0-9]+]]


ty::Closure(..) => Abi::RustCall, ty::CoroutineClosure(..) => Abi::RustCall, ty::Coroutine(..) => Abi::Rust, <ins> // No need to do MIR validation on error bodies ty::Error(_) => return, </ins> _ => { span_bug!(body.span, "unexpected body ty: {:?} phase {:?}", body_ty, mir_phase) }


target_option_val!(limit_rdylib_exports); target_option_val!(override_export_symbols); target_option_val!(merge_functions); <del> target_option_val!(mcount, "target_mcount"); </del> <ins> target_option_val!(mcount, "target-mcount"); </ins> target_option_val!(llvm_abiname); target_option_val!(relax_elf_relocations); target_option_val!(llvm_args);


} impl Attribute { <ins> #[inline] </ins> pub fn has_name(&self, name: Symbol) -> bool { match self.kind { AttrKind::Normal(ref item, _) => item.path == name,


let s = str::from_utf8(&out.stderr).unwrap(); // loosened the following from double::h to double:: due to // spurious failures on mac, 32bit, optimized <del> assert!(s.contains("stack backtrace") && s.contains("double::"), </del> <ins> assert!(s.contains("stack backtrace") && s.contains(" - double"), </ins> "bad output3: {}", s); // Make sure a stack trace isn't printed too many times


<ins> fn main() { x::<#[a]y::<z>> //~^ ERROR invalid const generic expression //~| ERROR cannot find value `x` in this scope } </ins>


/// ``` #[unstable(feature = "std_misc", reason = "pending integer conventions")] <del> fn ldexp(x: Self, exp: isize) -> Self; </del> <ins> fn ldexp(self, exp: isize) -> Self; </ins> /// Breaks the number into a normalized fraction and a base-2 exponent, /// satisfying: ///


<ins> // Copyright 2018 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // https://github.com/rust-lang/rust/issues/49181 #[derive(Eq, PartialEq)] #[repr(i8)] pub enum A { B = -1, C = 1, } pub const D: A = A::B; fn main() { match A::C { D => {}, _ => {} } } </ins>


cx.stats.borrow_mut().n_closures += 1; <del> // The `uwtable` attribute according to LLVM is: // //     This attribute indicates that the ABI being targeted requires that an //     unwind table entry be produced for this function even if we can show //     that no exceptions passes by it. This is normally the case for the //     ELF x86-64 abi, but it can be disabled for some compilation units. // // Typically when we're compiling with `-C panic=abort` (which implies this // `no_landing_pads` check) we don't need `uwtable` because we can't // generate any exceptions! On Windows, however, exceptions include other // events such as illegal instructions, segfaults, etc. This means that on // Windows we end up still needing the `uwtable` attribute even if the `-C // panic=abort` flag is passed. // // You can also find more info on why Windows is whitelisted here in: //      https://bugzilla.mozilla.org/show_bug.cgi?id=1302078 if !cx.sess().no_landing_pads() || cx.sess().target.target.options.requires_uwtable { attributes::emit_uwtable(lldecl, true); } </del> let mir = cx.tcx.instance_mir(instance.def); mir::codegen_mir(cx, lldecl, &mir, instance, sig); }


// there's no need to do dep-graph tracking for any of it. tcx.dep_graph.assert_ignored(); <del> join( || encode_metadata_impl(tcx, path), || { if tcx.sess.threads() == 1 { return; } // Prefetch some queries used by metadata encoding. // This is not necessary for correctness, but is only done for performance reasons. // It can be removed if it turns out to cause trouble or be detrimental to performance. join(|| prefetch_mir(tcx), || tcx.exported_symbols(LOCAL_CRATE)); }, ); } </del> <ins> if tcx.sess.threads() != 1 { // Prefetch some queries used by metadata encoding. // This is not necessary for correctness, but is only done for performance reasons. // It can be removed if it turns out to cause trouble or be detrimental to performance. join(|| prefetch_mir(tcx), || tcx.exported_symbols(LOCAL_CRATE)); } </ins> <del> fn encode_metadata_impl(tcx: TyCtxt<'_>, path: &Path) { </del> let mut encoder = opaque::FileEncoder::new(path) .unwrap_or_else(|err| tcx.sess.emit_fatal(FailCreateFileEncoder { err })); encoder.emit_raw_bytes(METADATA_HEADER);


pub struct Zip<A, B> { a: A, b: B, <del> // index and len are only used by the specialized version of zip </del> <ins> // index, len and a_len are only used by the specialized version of zip </ins> index: usize, len: usize, <ins> a_len: usize, </ins> } impl<A: Iterator, B: Iterator> Zip<A, B> { pub(in crate::iter) fn new(a: A, b: B) -> Zip<A, B> {


<ins> // run-pass // compile-flags: -C opt-level=1 // Make sure LLVM does not miscompile this match. fn main() { enum Bits { None = 0x00, Low = 0x40, High = 0x80, Both = 0xC0, } let value = Box::new(0x40u8); let mut out = Box::new(0u8); let bits = match *value { 0x00 => Bits::None, 0x40 => Bits::Low, 0x80 => Bits::High, 0xC0 => Bits::Both, _ => return, }; match bits { Bits::None | Bits::Low => { *out = 1; } _ => (), } assert_eq!(*out, 1); } </ins>


<ins> // check-pass use std::ops::Deref; struct Data { boxed: Box<&'static i32> } impl Data { fn use_data(&self, user: impl for <'a> FnOnce(<Box<&'a i32> as Deref>::Target)) { user(*self.boxed) } } fn main() {} </ins>


#[cfg(target_os = "macos")] pub mod sysconf { use types::os::arch::c95::c_int; <ins> pub static _SC_ARG_MAX : c_int = 1; pub static _SC_CHILD_MAX : c_int = 2; pub static _SC_CLK_TCK : c_int = 3; pub static _SC_NGROUPS_MAX : c_int = 4; pub static _SC_OPEN_MAX : c_int = 5; pub static _SC_JOB_CONTROL : c_int = 6; pub static _SC_SAVED_IDS : c_int = 7; pub static _SC_VERSION : c_int = 8; pub static _SC_BC_BASE_MAX : c_int = 9; pub static _SC_BC_DIM_MAX : c_int = 10; pub static _SC_BC_SCALE_MAX : c_int = 11; pub static _SC_BC_STRING_MAX : c_int = 12; pub static _SC_COLL_WEIGHTS_MAX : c_int = 13; pub static _SC_EXPR_NEST_MAX : c_int = 14; pub static _SC_LINE_MAX : c_int = 15; pub static _SC_RE_DUP_MAX : c_int = 16; pub static _SC_2_VERSION : c_int = 17; pub static _SC_2_C_BIND : c_int = 18; pub static _SC_2_C_DEV : c_int = 19; pub static _SC_2_CHAR_TERM : c_int = 20; pub static _SC_2_FORT_DEV : c_int = 21; pub static _SC_2_FORT_RUN : c_int = 22; pub static _SC_2_LOCALEDEF : c_int = 23; pub static _SC_2_SW_DEV : c_int = 24; pub static _SC_2_UPE : c_int = 25; pub static _SC_STREAM_MAX : c_int = 26; pub static _SC_TZNAME_MAX : c_int = 27; pub static _SC_ASYNCHRONOUS_IO : c_int = 28; pub static _SC_PAGESIZE : c_int = 29; pub static _SC_MEMLOCK : c_int = 30; pub static _SC_MEMLOCK_RANGE : c_int = 31; pub static _SC_MEMORY_PROTECTION : c_int = 32; pub static _SC_MESSAGE_PASSING : c_int = 33; pub static _SC_PRIORITIZED_IO : c_int = 34; pub static _SC_PRIORITY_SCHEDULING : c_int = 35; pub static _SC_REALTIME_SIGNALS : c_int = 36; pub static _SC_SEMAPHORES : c_int = 37; pub static _SC_FSYNC : c_int = 38; pub static _SC_SHARED_MEMORY_OBJECTS : c_int = 39; pub static _SC_SYNCHRONIZED_IO : c_int = 40; pub static _SC_TIMERS : c_int = 41; pub static _SC_AIO_LISTIO_MAX : c_int = 42; pub static _SC_AIO_MAX : c_int = 43; pub static _SC_AIO_PRIO_DELTA_MAX : c_int = 44; pub static _SC_DELAYTIMER_MAX : c_int = 45; pub static _SC_MQ_OPEN_MAX : c_int = 46; pub static _SC_MAPPED_FILES : c_int = 47; pub static _SC_RTSIG_MAX : c_int = 48; pub static _SC_SEM_NSEMS_MAX : c_int = 49; pub static _SC_SEM_VALUE_MAX : c_int =50; pub static _SC_SIGQUEUE_MAX : c_int = 51; pub static _SC_TIMER_MAX : c_int = 52; pub static _SC_NPROCESSORS_CONF : c_int = 57; </ins> pub static _SC_NPROCESSORS_ONLN : c_int = 58; <ins> pub static _SC_2_PBS : c_int = 59; pub static _SC_2_PBS_ACCOUNTING : c_int = 60; pub static _SC_2_PBS_CHECKPOINT : c_int = 61; pub static _SC_2_PBS_LOCATE : c_int = 62; pub static _SC_2_PBS_MESSAGE : c_int = 63; pub static _SC_2_PBS_TRACK : c_int = 64; pub static _SC_ADVISORY_INFO : c_int = 65; pub static _SC_BARRIERS : c_int = 66; pub static _SC_CLOCK_SELECTION : c_int = 67; pub static _SC_CPUTIME : c_int = 68; pub static _SC_FILE_LOCKING : c_int = 69; pub static _SC_GETGR_R_SIZE_MAX : c_int = 70; pub static _SC_GETPW_R_SIZE_MAX : c_int = 71; pub static _SC_HOST_NAME_MAX : c_int = 72; pub static _SC_LOGIN_NAME_MAX : c_int = 73; pub static _SC_MONOTONIC_CLOCK : c_int = 74; pub static _SC_MQ_PRIO_MAX : c_int = 75; pub static _SC_READER_WRITER_LOCKS : c_int = 76; pub static _SC_REGEXP : c_int = 77; pub static _SC_SHELL : c_int = 78; pub static _SC_SPAWN : c_int = 79; pub static _SC_SPIN_LOCKS : c_int = 80; pub static _SC_SPORADIC_SERVER : c_int = 81; pub static _SC_THREAD_ATTR_STACKADDR : c_int = 82; pub static _SC_THREAD_ATTR_STACKSIZE : c_int = 83; pub static _SC_THREAD_CPUTIME : c_int = 84; pub static _SC_THREAD_DESTRUCTOR_ITERATIONS : c_int = 85; pub static _SC_THREAD_KEYS_MAX : c_int = 86; pub static _SC_THREAD_PRIO_INHERIT : c_int = 87; pub static _SC_THREAD_PRIO_PROTECT : c_int = 88; pub static _SC_THREAD_PRIORITY_SCHEDULING : c_int = 89; pub static _SC_THREAD_PROCESS_SHARED : c_int = 90; pub static _SC_THREAD_SAFE_FUNCTIONS : c_int = 91; pub static _SC_THREAD_SPORADIC_SERVER : c_int = 92; pub static _SC_THREAD_STACK_MIN : c_int = 93; pub static _SC_THREAD_THREADS_MAX : c_int = 94; pub static _SC_TIMEOUTS : c_int = 95; pub static _SC_THREADS : c_int = 96; pub static _SC_TRACE : c_int = 97; pub static _SC_TRACE_EVENT_FILTER: c_int = 98; pub static _SC_TRACE_INHERIT: c_int = 99; pub static _SC_TRACE_LOG: c_int = 100; pub static _SC_TTY_NAME_MAX: c_int = 101; pub static _SC_TYPED_MEMORY_OBJECTS: c_int = 102; pub static _SC_V6_ILP32_OFF32: c_int = 103; pub static _SC_V6_ILP32_OFFBIG: c_int = 104; pub static _SC_V6_LP64_OFF64: c_int = 105; pub static _SC_V6_LPBIG_OFFBIG: c_int = 106; pub static _SC_IPV6: c_int = 118; pub static _SC_RAW_SOCKETS: c_int = 119; pub static _SC_SYMLOOP_MAX: c_int = 120; pub static _SC_ATEXIT_MAX: c_int = 107; pub static _SC_IOV_MAX: c_int = 56; pub static _SC_PAGE_SIZE: cint = _SC_PAGESIZE; pub static _SC_XOPEN_CRYPT: c_int = 108; pub static _SC_XOPEN_ENH_I18N: c_int = 109; pub static _SC_XOPEN_LEGACY: c_int = 110; pub static _SC_XOPEN_REALTIME: c_int = 111; pub static _SC_XOPEN_REALTIME_THREADS: c_int = 112; pub static _SC_XOPEN_SHM: c_int = 113; pub static _SC_XOPEN_STREAMS: c_int = 114; pub static _SC_XOPEN_UNIX: c_int = 115; pub static _SC_XOPEN_VERSION: c_int = 116; pub static _SC_XOPEN_XCU_VERSION: c_int = 121; pub static _SC_XBS5_ILP32_OFF32: c_int = 122; pub static _SC_XBS5_ILP32_OFFBIG: c_int = 123; pub static _SC_XBS5_LP64_OFF64: c_int = 124; pub static _SC_XBS5_LPBIG_OFFBIG: c_int = 125; pub static _SC_SS_REPL_MAX: c_int = 126; pub static _SC_TRACE_EVENT_NAME_MAX: c_int = 127; pub static _SC_TRACE_NAME_MAX: c_int = 128; pub static _SC_TRACE_SYS_MAX: c_int = 129; pub static _SC_TRACE_USER_EVENT_MAX: c_int = 130; pub static _SC_PASS_MAX: c_int = 131; </ins> } #[cfg(target_os = "android")]


type Wub = !; //~ ERROR type is experimental } <ins> fn look_ma_no_feature_gate<F: FnOnce() -> !>() {} //~ ERROR type is experimental fn tadam(f: &dyn Fn() -> !) {} //~ ERROR type is experimental fn panic() -> ! { panic!(); } fn toudoum() -> impl Fn() -> ! { //~ ERROR type is experimental panic } </ins> fn main() { }


//! are elements, and once they've all been exhausted, will return `None` to //! indicate that iteration is finished. Individual iterators may choose to //! resume iteration, and so calling [`next`] again may or may not eventually <del> //! start returning `Some(Item)` again at some point. </del> <ins> //! start returning `Some(Item)` again at some point (for example, see [`TryIter`]). </ins> //! //! [`Iterator`]'s full definition includes a number of other methods as well, //! but they are default methods, built on top of [`next`], and so you get


<ins> goto: file://|DOC_PATH|/test_docs/type.SomeType.html assert-all: (".top-block .docblock p", {"font-weight": "400"}) </ins>


use crate::cache::{Interned, INTERNER}; use crate::cc_detect::{ndk_compiler, Language}; use crate::channel::{self, GitInfo}; <ins> use crate::compile::CODEGEN_BACKEND_PREFIX; </ins> pub use crate::flags::Subcommand; use crate::flags::{Color, Flags, Warnings}; use crate::util::{exe, output, t};


// Ignore the notification. None } else { <del> print!( "failed to decode compiler output as json: line: {}noutput: {}", line, output ); panic!() </del> <ins> // This function is called for both compiler and non-compiler output, // so if the line isn't recognized as JSON from the compiler then // just print it as-is. Some(format!("{line}n")) </ins> } } else { // preserve non-JSON lines, such as ICEs


//      'Deprecated$' #[deprecated] pub struct W; <ins> // @matches deprecated/struct.X.html '//*[@class="stab deprecated"]'  //      'Deprecated: shorthand reason$' #[deprecated = "shorthand reason"] pub struct X; </ins>


<ins> error[E0277]: the trait bound `*mut (): Trait<'_>` is not satisfied --> $DIR/issue-101623.rs:21:21 | LL |     Trait::do_stuff({ fun(&mut *inner) }); |     --------------- ^^----------------^^ |     |               | |     |               the trait `Trait<'_>` is not implemented for `*mut ()` |     required by a bound introduced by this call | = help: the trait `Trait<'a>` is implemented for `()` error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. </ins>


} } } // Visit everything, but enum variants have their own levels. hir::ItemKind::Enum(ref def, _) => { if item_level.is_some() { self.reach(item.def_id, item_level).generics().predicates(); } <del> let enum_level = self.get(item.def_id); </del> for variant in def.variants { <del> let variant_level = self.update_with_hir_id(variant.id, enum_level); </del> <ins> let variant_level = self.get(self.tcx.hir().local_def_id(variant.id)); </ins> if variant_level.is_some() { <del> if let Some(ctor_id) = variant.data.ctor_hir_id() { self.update_with_hir_id(ctor_id, variant_level); } </del> for field in variant.data.fields() { self.reach(self.tcx.hir().local_def_id(field.hir_id), variant_level) .ty();


tcx: TyCtxt<'tcx>, // typeck errors have subpar spans for opaque types, so delay error reporting until borrowck. ignore_errors: bool, <del> origin: OpaqueTyOrigin, </del> ) -> Self { let OpaqueTypeKey { def_id, substs } = opaque_type_key;


//!    in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part refers //!    to the *value* to print, and the `precision` must come in the input preceding `<arg>`. //! <del> //! For example, these: </del> <ins> //! For example, the following calls all print the same thing `Hello x is 0.01000`: </ins> //! //! ``` <del> //! // Hello {arg 0 (x)} is {arg 1 (0.01) with precision specified inline (5)} </del> <ins> //! // Hello {arg 0 ("x")} is {arg 1 (0.01) with precision specified inline (5)} </ins> //! println!("Hello {0} is {1:.5}", "x", 0.01); //! <del> //! // Hello {arg 1 (x)} is {arg 2 (0.01) with precision specified in arg 0 (5)} </del> <ins> //! // Hello {arg 1 ("x")} is {arg 2 (0.01) with precision specified in arg 0 (5)} </ins> //! println!("Hello {1} is {2:.0$}", 5, "x", 0.01); //! <del> //! // Hello {arg 0 (x)} is {arg 2 (0.01) with precision specified in arg 1 (5)} </del> <ins> //! // Hello {arg 0 ("x")} is {arg 2 (0.01) with precision specified in arg 1 (5)} </ins> //! println!("Hello {0} is {2:.1$}", "x", 5, 0.01); //! <del> //! // Hello {next arg (x)} is {second of next two args (0.01) with precision </del> <ins> //! // Hello {next arg ("x")} is {second of next two args (0.01) with precision </ins> //! //                          specified in first of next two args (5)} //! println!("Hello {} is {:.*}",    "x", 5, 0.01); //! <del> //! // Hello {next arg (x)} is {arg 2 (0.01) with precision </del> <ins> //! // Hello {next arg ("x")} is {arg 2 (0.01) with precision </ins> //! //                          specified in its predecessor (5)} //! println!("Hello {} is {2:.*}",   "x", 5, 0.01); //! <del> //! // Hello {next arg (x)} is {arg "number" (0.01) with precision specified </del> <ins> //! // Hello {next arg ("x")} is {arg "number" (0.01) with precision specified </ins> //! //                          in arg "prec" (5)} //! println!("Hello {} is {number:.prec$}", "x", prec = 5, number = 0.01); //! ``` //! <del> //! All print the same thing: //! //! ```text //! Hello x is 0.01000 //! ``` //! </del> //! While these: //! //! ```


pub use idx::Idx; pub use rustc_index_macros::newtype_index; pub use slice::IndexSlice; <ins> #[doc(no_inline)] </ins> pub use vec::IndexVec; /// Type size assertion. The first argument is a type and the second argument is its expected size.


<ins> fn foo<T>(t: T) { || { t; t; }; //~ ERROR: use of moved value } fn main() {} </ins>


placeholder_type_error(tcx, None, &[], visitor.0, false); } <del> hir::TraitItemKind::Type(_, None) => {} </del> <ins> hir::TraitItemKind::Type(_, None) => { // #74612: Visit and try to find bad placeholders // even if there is no concrete type. let mut visitor = PlaceholderHirTyCollector::default(); visitor.visit_trait_item(trait_item); placeholder_type_error(tcx, None, &[], visitor.0, false); } </ins> }; tcx.ensure().predicates_of(def_id);


<ins> // check-pass // ignore-emscripten no llvm_asm! support #![feature(llvm_asm)] pub fn boot(addr: Option<u32>) { unsafe { llvm_asm!("mov sp, $0"::"r" (addr)); } } fn main() {} </ins>


<ins> error[E0658]: attributes on expressions are experimental --> $DIR/issue-88476.rs:20:13 | LL |     let x = #[rustc_capture_analysis] move || { |             ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable error[E0658]: attributes on expressions are experimental --> $DIR/issue-88476.rs:47:13 | LL |     let c = #[rustc_capture_analysis] move || { |             ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable error: First Pass analysis includes: --> $DIR/issue-88476.rs:20:39 | LL |       let x = #[rustc_capture_analysis] move || { |  _______________________________________^ LL | | LL | | LL | | ...  | LL | | LL | |     }; | |_____^ | note: Capturing f[(0, 0)] -> ImmBorrow --> $DIR/issue-88476.rs:25:26 | LL |         println!("{:?}", f.0); |                          ^^^ error: Min Capture analysis includes: --> $DIR/issue-88476.rs:20:39 | LL |       let x = #[rustc_capture_analysis] move || { |  _______________________________________^ LL | | LL | | LL | | ...  | LL | | LL | |     }; | |_____^ | note: Min Capture f[] -> ByValue --> $DIR/issue-88476.rs:25:26 | LL |         println!("{:?}", f.0); |                          ^^^ error: First Pass analysis includes: --> $DIR/issue-88476.rs:47:39 | LL |       let c = #[rustc_capture_analysis] move || { |  _______________________________________^ LL | | LL | | LL | | ...  | LL | | LL | |     }; | |_____^ | note: Capturing character[(0, 0)] -> ImmBorrow --> $DIR/issue-88476.rs:52:24 | LL |         println!("{}", character.hp) |                        ^^^^^^^^^^^^ error: Min Capture analysis includes: --> $DIR/issue-88476.rs:47:39 | LL |       let c = #[rustc_capture_analysis] move || { |  _______________________________________^ LL | | LL | | LL | | ...  | LL | | LL | |     }; | |_____^ | note: Min Capture character[(0, 0)] -> ByValue --> $DIR/issue-88476.rs:52:24 | LL |         println!("{}", character.hp) |                        ^^^^^^^^^^^^ error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0658`. </ins>


build::CondBr(bcx, cond.immediate(), lltrue, llfalse, DebugLoc::None); } <del> mir::Terminator::Switch { .. } => { unimplemented!() </del> <ins> mir::Terminator::Switch { ref discr, ref adt_def, ref targets } => { let adt_ty = bcx.tcx().lookup_item_type(adt_def.did).ty; let represented_ty = adt::represent_type(bcx.ccx(), adt_ty); let discr_lvalue = self.trans_lvalue(bcx, discr); let discr = adt::trans_get_discr(bcx, &represented_ty, discr_lvalue.llval, None); // The else branch of the Switch can't be hit, so branch to an unreachable // instruction so LLVM knows that // FIXME it might be nice to have just one such block (created lazilly), we could // store it in the "MIR trans" state. let unreachable_blk = bcx.fcx.new_temp_block("enum-variant-unreachable"); build::Unreachable(unreachable_blk); let switch = build::Switch(bcx, discr, unreachable_blk.llbb, targets.len()); assert_eq!(adt_def.variants.len(), targets.len()); for (adt_variant, target) in adt_def.variants.iter().zip(targets) { let llval = adt::trans_case(bcx, &*represented_ty, adt_variant.disr_val); let llbb = self.llblock(*target); build::AddCase(switch, llval, llbb) } </ins> } mir::Terminator::SwitchInt { ref discr, switch_ty, ref values, ref targets } => {


<ins> // Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![feature(rustc_attrs)] use std::fmt; // CoerceUnsized is not implemented for tuples. You can still create // an unsized tuple by transmuting a trait object. fn any<T>() -> T { unreachable!() } #[rustc_error] fn main() { //~ ERROR compilation successful let t: &(u8, fmt::Debug) = any(); println!("{:?}", &t.1); } </ins>


None } Err(ErrorHandled::TooGeneric) => { <del> span_bug!(tcx.def_span(expr_did), "enum discriminant depends on generic arguments",) </del> <ins> tcx.sess.delay_span_bug( tcx.def_span(expr_did), "enum discriminant depends on generic arguments", ); None </ins> } } }


unsafe { Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i))) } <del> } else if A::MAY_HAVE_SIDE_EFFECT && self.index < self.a.size() { </del> <ins> } else if A::MAY_HAVE_SIDE_EFFECT && self.index < self.a_len { </ins> let i = self.index; self.index += 1; self.len += 1;


<ins> // check that we don't forget to drop the Box if we early return before // initializing it // ignore-tidy-linelength // ignore-wasm32-bare compiled with panic=abort by default #![feature(box_syntax)] fn test() -> Option<Box<u32>> { Some(box (None?)) } fn main() { test(); } // END RUST SOURCE // START rustc.test.ElaborateDrops.before.mir // fn test() -> std::option::Option<std::boxed::Box<u32>> { //     ... //     bb0: { //         StorageLive(_1); //         StorageLive(_2); //         _2 = Box(u32); //         StorageLive(_3); //         StorageLive(_4); //         _4 = std::option::Option::<u32>::None; //         _3 = const <std::option::Option<u32> as std::ops::Try>::into_result(move _4) -> [return: bb2, unwind: bb3]; //     } //     bb1 (cleanup): { //         resume; //     } //     bb2: { //         StorageDead(_4); //         _5 = discriminant(_3); //         switchInt(move _5) -> [0isize: bb10, 1isize: bb5, otherwise: bb4]; //     } //     bb3 (cleanup): { //         drop(_2) -> bb1; //     } //     bb4: { //         unreachable; //     } //     bb5: { //         StorageLive(_6); //         _6 = ((_3 as Err).0: std::option::NoneError); //         StorageLive(_8); //         StorageLive(_9); //         _9 = _6; //         _8 = const <std::option::NoneError as std::convert::From<std::option::NoneError>>::from(move _9) -> [return: bb7, unwind: bb3]; //     } //     bb6: { //         return; //     } //     bb7: { //         StorageDead(_9); //         _0 = const <std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::from_error(move _8) -> [return: bb8, unwind: bb3]; //     } //     bb8: { //         StorageDead(_8); //         StorageDead(_6); //         drop(_2) -> bb9; //     } //     bb9: { //         StorageDead(_2); //         StorageDead(_1); //         StorageDead(_3); //         goto -> bb6; //     } //     bb10: { //         StorageLive(_10); //         _10 = ((_3 as Ok).0: u32); //         (*_2) = _10; //         StorageDead(_10); //         _1 = move _2; //         drop(_2) -> [return: bb12, unwind: bb11]; //     } //     bb11 (cleanup): { //         drop(_1) -> bb1; //     } //     bb12: { //         StorageDead(_2); //         _0 = std::option::Option::<std::boxed::Box<u32>>::Some(move _1,); //         drop(_1) -> bb13; //     } //     bb13: { //         StorageDead(_1); //         StorageDead(_3); //         goto -> bb6; //     } // } // END rustc.test.ElaborateDrops.before.mir </ins>


} } <ins> /// Constructs a new locked handle to the standard output of the current /// process. /// /// Each handle returned is a guard granting locked access to a shared /// global buffer whose access is synchronized via a mutex. If you need /// more explicit control over locking, for example, in a multi-threaded /// program, use the [`io::stdout`] function to obtain an unlocked handle, /// along with the [`Stdout::lock`] method. /// /// The lock is released when the returned guard goes out of scope. The /// returned guard also implements the [`Write`] trait for writing data. /// /// ### Note: Windows Portability Consideration /// When operating in a console, the Windows implementation of this stream does not support /// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return /// an error. /// /// # Examples /// /// ```no_run /// #![feature(stdio_locked)] /// use std::io::{self, Write}; /// /// fn main() -> io::Result<()> { ///     let mut handle = io::stdout_locked(); /// ///     handle.write_all(b"hello world")?; /// ///     Ok(()) /// } /// ``` #[unstable(feature = "stdio_locked", issue = "none")] pub fn stdout_locked() -> StdoutLock<'static> { stdout().into_locked() } </ins> pub fn cleanup() { if let Some(instance) = STDOUT.get() { // Flush the data and disable buffering during shutdown


#![feature(inherent_associated_types)] #![allow(incomplete_features)] <ins> #![deny(single_use_lifetimes)] </ins> struct Foo<T>(T);


| help: try using `=` instead | <del> LL -     let x == 2; LL +     let x = 2; | </del> <ins> LL |     let x = 2; |           ~ </ins> error: aborting due to 1 previous error


use rustc::hir; use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::hir::def_id::DefId; <del> use rustc::ty::{self, TyCtxt}; </del> <ins> use rustc::ty::{self, TyCtxt, TypeFoldable}; </ins> use rustc::ty::query::Providers; use rustc::util::nodemap::{FxHashMap, FxHashSet}; use std::collections::hash_map::Entry::{Occupied, Vacant};


match *seq_tt { TokenTree::MetaVarDecl(_, _, id) => id.name == "vis", TokenTree::Sequence(_, ref sub_seq) => <del> sub_seq.op == quoted::KleeneOp::ZeroOrMore, </del> <ins> sub_seq.op == quoted::KleeneOp::ZeroOrMore || sub_seq.op == quoted::KleeneOp::ZeroOrOne, </ins> _ => false, } }) {


{{- layout.external_html.before_content | safe -}}  {#- -#}
☰
 {#- -#}   {#- -#}
 {#- -#}  {#- -#}
 {#- -#}    {#- -#}
 {#- -#} {%- if layout.logo -%}  {#- -#} {%- else -%}  {#- -#} {%- endif -%}
   {#- -#} {{- sidebar | safe -}}  {#- -#}  {#- -#}
 {#- -#}
 {#- -#}   {#- -#}  {#- -#}    {#- -#} {%- if layout.logo -%}  {%- else -%}  {%- endif -%}   {#- -#}  {#- -#}
 {#- -#}


obj } <del> #[inline] </del> <ins> // See comment on do_try above for why #[inline(never)] is needed on bootstrap. #[cfg_attr(bootstrap, inline(never))] #[cfg_attr(not(bootstrap), inline)] </ins> fn do_call<F: FnOnce() -> R, R>(data: *mut u8) { unsafe { let data = data as *mut Data<F, R>;


<ins> // Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // aux-build:issue_41053.rs pub trait Trait { fn foo(&self) {} } pub struct Foo; impl Iterator for Foo { type Item = Box<Trait>; fn next(&mut self) -> Option<Box<Trait>> { extern crate issue_41053; impl ::Trait for issue_41053::Test { fn foo(&self) {} } Some(Box::new(issue_41053::Test)) } } fn main() { Foo.next().unwrap().foo(); } </ins>


<ins> error[E0220]: associated type `Assoc` not found for `Trait` --> $DIR/stranded-opaque.rs:8:31 | LL | fn produce<T>() -> impl Trait<Assoc = impl Trait> { |                               ^^^^^ associated type `Assoc` not found error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0220`. </ins>


val } <ins> fn emit_s390x_va_arg<'ll, 'tcx>( bx: &mut Builder<'_, 'll, 'tcx>, list: OperandRef<'tcx, &'ll Value>, target_ty: Ty<'tcx>, ) -> &'ll Value { // Implementation of the s390x ELF ABI calling convention for va_args see // https://github.com/IBM/s390x-abi (chapter 1.2.4) let va_list_addr = list.immediate(); let va_list_layout = list.deref(bx.cx).layout; let va_list_ty = va_list_layout.llvm_type(bx); let layout = bx.cx.layout_of(target_ty); let in_reg = bx.append_sibling_block("va_arg.in_reg"); let in_mem = bx.append_sibling_block("va_arg.in_mem"); let end = bx.append_sibling_block("va_arg.end"); // FIXME: vector ABI not yet supported. let target_ty_size = bx.cx.size_of(target_ty).bytes(); let indirect: bool = target_ty_size > 8 || !target_ty_size.is_power_of_two(); let unpadded_size = if indirect { 8 } else { target_ty_size }; let padded_size = 8; let padding = padded_size - unpadded_size; let gpr_type = indirect || !layout.is_single_fp_element(bx.cx); let (max_regs, reg_count_field, reg_save_index, reg_padding) = if gpr_type { (5, 0, 2, padding) } else { (4, 1, 16, 0) }; // Check whether the value was passed in a register or in memory. let reg_count = bx.struct_gep( va_list_ty, va_list_addr, va_list_layout.llvm_field_index(bx.cx, reg_count_field), ); let reg_count_v = bx.load(bx.type_i64(), reg_count, Align::from_bytes(8).unwrap()); let use_regs = bx.icmp(IntPredicate::IntULT, reg_count_v, bx.const_u64(max_regs)); bx.cond_br(use_regs, in_reg, in_mem); // Emit code to load the value if it was passed in a register. bx.switch_to_block(in_reg); // Work out the address of the value in the register save area. let reg_ptr = bx.struct_gep(va_list_ty, va_list_addr, va_list_layout.llvm_field_index(bx.cx, 3)); let reg_ptr_v = bx.load(bx.type_i8p(), reg_ptr, bx.tcx().data_layout.pointer_align.abi); let scaled_reg_count = bx.mul(reg_count_v, bx.const_u64(8)); let reg_off = bx.add(scaled_reg_count, bx.const_u64(reg_save_index * 8 + reg_padding)); let reg_addr = bx.gep(bx.type_i8(), reg_ptr_v, &[reg_off]); // Update the register count. let new_reg_count_v = bx.add(reg_count_v, bx.const_u64(1)); bx.store(new_reg_count_v, reg_count, Align::from_bytes(8).unwrap()); bx.br(end); // Emit code to load the value if it was passed in memory. bx.switch_to_block(in_mem); // Work out the address of the value in the argument overflow area. let arg_ptr = bx.struct_gep(va_list_ty, va_list_addr, va_list_layout.llvm_field_index(bx.cx, 2)); let arg_ptr_v = bx.load(bx.type_i8p(), arg_ptr, bx.tcx().data_layout.pointer_align.abi); let arg_off = bx.const_u64(padding); let mem_addr = bx.gep(bx.type_i8(), arg_ptr_v, &[arg_off]); // Update the argument overflow area pointer. let arg_size = bx.cx().const_u64(padded_size); let new_arg_ptr_v = bx.inbounds_gep(bx.type_i8(), arg_ptr_v, &[arg_size]); bx.store(new_arg_ptr_v, arg_ptr, bx.tcx().data_layout.pointer_align.abi); bx.br(end); // Return the appropriate result. bx.switch_to_block(end); let val_addr = bx.phi(bx.type_i8p(), &[reg_addr, mem_addr], &[in_reg, in_mem]); let val_type = layout.llvm_type(bx); let val_addr = if indirect { let ptr_type = bx.cx.type_ptr_to(val_type); let ptr_addr = bx.bitcast(val_addr, bx.cx.type_ptr_to(ptr_type)); bx.load(ptr_type, ptr_addr, bx.tcx().data_layout.pointer_align.abi) } else { bx.bitcast(val_addr, bx.cx.type_ptr_to(val_type)) }; bx.load(val_type, val_addr, layout.align.abi) } </ins> pub(super) fn emit_va_arg<'ll, 'tcx>( bx: &mut Builder<'_, 'll, 'tcx>, addr: OperandRef<'tcx, &'ll Value>,


} let frame = &self.token_cursor.frame; <del> match frame.tree_cursor.look_ahead(dist - 1) { </del> <ins> looker(&match frame.tree_cursor.look_ahead(dist - 1) { </ins> Some(tree) => match tree { <del> TokenTree::Token(token) => looker(token), </del> <ins> TokenTree::Token(token) => token, </ins> TokenTree::Delimited(dspan, delim, _) => { <del> looker(&Token::new(token::OpenDelim(delim.clone()), dspan.open)) </del> <ins> Token::new(token::OpenDelim(delim), dspan.open) </ins> } }, <del> None => looker(&Token::new(token::CloseDelim(frame.delim), frame.span.close)), } </del> <ins> None => Token::new(token::CloseDelim(frame.delim), frame.span.close), }) </ins> } /// Returns whether any of the given keywords are `dist` tokens ahead of the current one.


} else { (None, &[][..], 0) }; <ins> let mut can_suggest_clone = true; </ins> if let Some(def_id) = def_id && let node = self.infcx.tcx.hir_node_by_def_id(def_id) && let Some(fn_sig) = node.fn_sig()


<del> FROM centos:5 </del> <ins> # We use Debian 6 (glibc 2.11, kernel 2.6.32) as a common base for other # distros that still need Rust support: RHEL 6 (glibc 2.12, kernel 2.6.32) and # SLES 11 SP4 (glibc 2.11, kernel 3.0). FROM debian:6 </ins> WORKDIR /build <del> # Centos 5 is EOL and is no longer available from the usual mirrors, so switch # to http://vault.centos.org/ RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo RUN sed -i 's|#(baseurl.*)mirror.centos.org/centos/$releasever|1vault.centos.org/5.11|' /etc/yum.repos.d/*.repo </del> <ins> # Debian 6 is EOL and no longer available from the usual mirrors, # so we'll need to switch to http://archive.debian.org/ RUN sed -i '/updates/d' /etc/apt/sources.list &&  sed -i 's/httpredir/archive/' /etc/apt/sources.list </ins> <del> RUN yum upgrade -y && yum install -y  curl  </del> <ins> RUN apt-get update &&  apt-get install --allow-unauthenticated -y --no-install-recommends  automake  </ins> bzip2  <ins> ca-certificates  curl  file  g++  g++-multilib  </ins> gcc  <del> gcc-c++  </del> <ins> gcc-multilib  git  lib32z1-dev  libedit-dev  libncurses-dev  </ins> make  <del> glibc-devel  </del> <ins> patch  </ins> perl  <del> zlib-devel  file  xz  which  pkgconfig  </del> <ins> pkg-config  unzip  </ins> wget  <del> autoconf  gettext </del> <ins> xz-utils  zlib1g-dev </ins> ENV PATH=/rustroot/bin:$PATH <del> ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib </del> <ins> ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib </ins> ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp <ins> RUN mkdir /home/user </ins> COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/ # We need a build of openssl which supports SNI to download artifacts from


// For each token tree in `input`, parse the token into a `self::TokenTree`, consuming // additional trees if need be. <del> let mut trees = input.trees(); </del> <ins> let mut trees = input.trees().peekable(); </ins> while let Some(tree) = trees.next() { // Given the parsed tree, if there is a metavar and we are expecting matchers, actually // parse out the matcher (i.e., in `$id:ident` this would parse the `:` and `ident`). let tree = parse_tree(tree, &mut trees, parsing_patterns, sess, node_id, features, edition); match tree { TokenTree::MetaVar(start_sp, ident) if parsing_patterns => { <del> let span = match trees.next() { </del> <ins> // Not consuming the next token immediately, as it may not be a colon let span = match trees.peek() { </ins> Some(&tokenstream::TokenTree::Token( Token { kind: token::Colon, span: colon_span }, _, )) => { <ins> // Consume the colon first trees.next(); // It's ok to consume the next tree no matter how, // since if it's not a token then it will be an invalid declaration. </ins> match trees.next() { Some(tokenstream::TokenTree::Token(token, _)) => match token.ident() { Some((fragment, _)) => {


let arenas = ty::CtxtArenas::new(); let hir_map = driver::make_map(&sess, &mut hir_forest); <del> abort_on_err(driver::phase_3_run_analysis_passes(&sess, </del> <ins> let krate_and_analysis = abort_on_err(driver::phase_3_run_analysis_passes(&sess, </ins> &cstore, hir_map, &arenas, &name, resolve::MakeGlobMap::No, <del> |tcx, _, analysis, _| { </del> <ins> |tcx, _, analysis, result| { // Return if the driver hit an err (in `result`) if let Err(_) = result { return None } </ins> let _ignore = tcx.dep_graph.in_ignore(); let ty::CrateAnalysis { access_levels, .. } = analysis;


CFG_DISABLE_UNSTABLE_FEATURES=1 endif ifeq ($(CFG_RELEASE_CHANNEL),beta) <del> CFG_RELEASE=$(CFG_RELEASE_NUM)-beta </del> <ins> CFG_RELEASE=$(CFG_RELEASE_NUM)-beta$(CFG_PRERELEASE_VERSION) </ins> # When building beta distributables just reuse the same "beta" name # so when we upload we'll always override the previous beta. This # doesn't actually impact the version reported by rustc - it's just


<ins> // Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro, proc_macro_lib)] extern crate proc_macro; use proc_macro::TokenStream; #[proc_macro_derive(Foo)] pub fn derive_foo(input: TokenStream) -> TokenStream { input } #[proc_macro_derive(Bar)] pub fn derive_bar(input: TokenStream) -> TokenStream { panic!("lolnope"); } </ins>


original_path, target_place, span, <ins> use_spans, </ins> ) } IllegalMoveOriginKind::InteriorOfTypeWithDestructor { container_ty: ty } => {


<ins> // Regression test for https://github.com/rust-lang/rust/issues/122549 // was fixed by https://github.com/rust-lang/rust/pull/122749 trait ConstChunksExactTrait<T> { fn const_chunks_exact<const N: usize>(&self) -> ConstChunksExact<'a, T, { N }>; //~^ ERROR undeclared lifetime } impl<T> ConstChunksExactTrait<T> for [T] {} //~^ ERROR not all trait items implemented, missing: `const_chunks_exact` struct ConstChunksExact<'rem, T: 'a, const N: usize> {} //~^ ERROR use of undeclared lifetime name `'a` //~^^ ERROR lifetime parameter //~^^^ ERROR type parameter impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> { //~^ ERROR the const parameter `N` is not constrained by the impl trait, self type, or predicates //~^^ ERROR mismatched types type Item = &'a [T; N]; } fn main() { let slice = &[1i32, 2, 3, 4, 5, 6, 7, 8, 9, 10]; let mut iter = [[1, 2, 3], [4, 5, 6], [7, 8, 9]].iter(); for a in slice.const_chunks_exact::<3>() { assert_eq!(a, iter.next().unwrap()); } } </ins>


// Parse the arguments, starting out with `self` being allowed... let (mut params, _) = self.parse_paren_comma_seq(|p| { p.recover_diff_marker(); <ins> let snapshot = p.create_snapshot_for_diagnostic(); </ins> let param = p.parse_param_general(req_name, first_param).or_else(|mut e| { e.emit(); let lo = p.prev_token.span; <ins> p.restore_snapshot(snapshot); </ins> // Skip every token until next possible arg or end. p.eat_to_tokens(&[&token::Comma, &token::CloseDelim(Delimiter::Parenthesis)]); // Create a placeholder argument for proper arg count (issue #34264).


#[serde(rename_all = "snake_case")] #[serde(tag = "variant_kind", content = "variant_inner")] pub enum Variant { <ins> /// A variant with no parentheses, and possible discriminant. /// /// ```rust /// enum Demo { ///     PlainVariant, ///     PlainWithDiscriminant = 1, /// } /// ``` </ins> Plain(Option<Discriminant>), <del> Tuple(Vec<Type>), Struct(Vec<Id>), </del> <ins> /// A variant with unnamed fields. /// /// Unlike most of json, `#[doc(hidden)]` fields will be given as `None` /// instead of being ommited, because order matters. /// /// ```rust /// enum Demo { ///     TupleVariant(i32), ///     EmptyTupleVariant(), /// } /// ``` Tuple(Vec<Option<Id>>), /// A variant with named fields. /// /// ```rust /// enum Demo { ///     StructVariant { x: i32 }, ///     EmptyStructVariant {}, /// } /// ``` Struct { fields: Vec<Id>, fields_stripped: bool }, </ins> } #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]


iter.map(|e| t!(e)).collect::<Vec<_>>().into_iter() } <del> fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(&self, src: P, link: Q) -> io::Result<()> { #[cfg(unix)] use std::os::unix::fs::symlink as symlink_file; #[cfg(windows)] use std::os::windows::fs::symlink_file; if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) } } </del> /// Returns if config.ninja is enabled, and checks for ninja existence, /// exiting with a nicer error message if not. fn ninja(&self) -> bool {


let mut_substs = self.tcx.mk_substs_trait(mut_borrowed_found_ty, &[]); // Try to apply the original trait binding obligation by borrowing. <del> let mut try_borrowing = |new_imm_trait_ref: ty::TraitRef<'tcx>, new_mut_trait_ref: ty::TraitRef<'tcx>, expected_trait_ref: ty::TraitRef<'tcx>, </del> <ins> let mut try_borrowing = |new_imm_trait_ref: ty::Binder<'tcx, ty::TraitRef<'tcx>>, new_mut_trait_ref: ty::Binder<'tcx, ty::TraitRef<'tcx>>, expected_trait_ref: ty::Binder<'tcx, ty::TraitRef<'tcx>>, </ins> blacklist: &[DefId]| -> bool { <del> if blacklist.contains(&expected_trait_ref.def_id) { </del> <ins> if blacklist.contains(&expected_trait_ref.def_id()) { </ins> return false; } let imm_result = self.predicate_must_hold_modulo_regions(&Obligation::new( ObligationCause::dummy(), param_env, <del> ty::Binder::dummy(new_imm_trait_ref).without_const().to_predicate(self.tcx), </del> <ins> new_imm_trait_ref.without_const().to_predicate(self.tcx), </ins> )); let mut_result = self.predicate_must_hold_modulo_regions(&Obligation::new( ObligationCause::dummy(), param_env, <del> ty::Binder::dummy(new_mut_trait_ref).without_const().to_predicate(self.tcx), </del> <ins> new_mut_trait_ref.without_const().to_predicate(self.tcx), </ins> )); if imm_result || mut_result {


<ins> include ../tools.mk # only-windows-msvc all: # Test that we don't have the full path to the PDB file in the binary $(RUSTC) main.rs -g --crate-name my_crate_name --crate-type bin -Cforce-frame-pointers $(CGREP) "my_crate_name.pdb" < $(TMPDIR)/my_crate_name.exe $(CGREP) -v "my_crate_name.pdb" < $(TMPDIR)/my_crate_name.exe # Test that backtraces still can find debuginfo by checking that they contain symbol names and # source locations. $(TMPDIR)/my_crate_name.exe &> $(TMPDIR)/backtrace.txt $(CGREP) "my_crate_name::fn_in_backtrace" < $(TMPDIR)/backtrace.txt $(CGREP) "main.rs:15" < $(TMPDIR)/backtrace.txt # Test that explicitly passed `-Clink-arg=/PDBALTPATH:...` is respected $(RUSTC) main.rs -g --crate-name my_crate_name --crate-type bin -Clink-arg=/PDBALTPATH:abcdefg.pdb -Cforce-frame-pointers $(CGREP) "abcdefg.pdb" < $(TMPDIR)/my_crate_name.exe $(CGREP) -v "my_crate_name.pdb" < $(TMPDIR)/my_crate_name.exe </ins>


//! Types/fns concerning URLs (see RFC 3986) #![crate_name = "url"] <del> #![experimental] </del> <ins> #![deprecated="This is being removed. Use rust-url instead. http://servo.github.io/rust-url/"] </ins> #![crate_type = "rlib"] #![crate_type = "dylib"] #![license = "MIT/ASL2"]


<ins> error[E0599]: no method named `get_a` found for type `&Self` in the current scope --> $DIR/constrain-trait.rs:15:31 | LL |         println!("{:?}", self.get_a()); |                               ^^^^^ method not found in `&Self` | = help: items from traits can only be used if the type parameter is bounded by the trait help: the following trait defines an item `get_a`, perhaps you need to add another supertrait for it: | LL | trait UseString: std::fmt::Debug + GetString { |                                  ^^^^^^^^^^^ error[E0599]: no method named `get_a` found for type `&Self` in the current scope --> $DIR/constrain-trait.rs:21:31 | LL |         println!("{:?}", self.get_a()); |                               ^^^^^ method not found in `&Self` | = help: items from traits can only be used if the type parameter is bounded by the trait help: the following trait defines an item `get_a`, perhaps you need to add a supertrait for it: | LL | trait UseString2: GetString { |                 ^^^^^^^^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0599`. </ins>


//~^ ERROR doesn't implement } <del> pub fn main() { } </del> <ins> trait Foo<T>: Sized { const SIZE: usize = core::mem::size_of::<Self>(); //~^ ERROR the size for values of type `Self` cannot be known at compilation time } trait Bar: std::fmt::Display + Sized { const SIZE: usize = core::mem::size_of::<Self>(); //~^ ERROR the size for values of type `Self` cannot be known at compilation time } trait Baz: Sized where Self: std::fmt::Display { const SIZE: usize = core::mem::size_of::<Self>(); //~^ ERROR the size for values of type `Self` cannot be known at compilation time } trait Qux<T>: Sized where Self: std::fmt::Display { const SIZE: usize = core::mem::size_of::<Self>(); //~^ ERROR the size for values of type `Self` cannot be known at compilation time } trait Bat<T>: std::fmt::Display + Sized { const SIZE: usize = core::mem::size_of::<Self>(); //~^ ERROR the size for values of type `Self` cannot be known at compilation time } fn main() { } </ins>


fn main() -> () { let mut _0: ();                      // return place in scope 0 at $DIR/issue-73223.rs:1:11: 1:11 <del> let _1: i32;                         // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14 let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30 </del> <ins> let mut _1: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30 let _2: i32;                         // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15 </ins> let mut _4: (&i32, &i32);            // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL <del> let mut _5: bool;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _6: bool;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _7: i32;                     // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _8: &std::fmt::Arguments;    // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let _9: std::fmt::Arguments;         // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _10: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let _11: [std::fmt::ArgumentV1; 2];  // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _12: (&&i32, &&i32);         // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let _13: &i32;                       // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _14: &&i32;                  // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL </del> <ins> let mut _7: bool;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _8: bool;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _9: i32;                     // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _10: &std::fmt::Arguments;   // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let _11: std::fmt::Arguments;        // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _12: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let _13: [std::fmt::ArgumentV1; 2];  // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _14: (&&i32, &&i32);         // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL </ins> let _15: &i32;                       // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL <del> let mut _16: std::fmt::ArgumentV1;   // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL </del> <ins> let mut _16: &&i32;                  // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL </ins> let mut _17: std::fmt::ArgumentV1;   // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL <ins> let mut _18: std::fmt::ArgumentV1;   // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL </ins> scope 1 { <del> debug split => _1;               // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 </del> <ins> debug split => _2;               // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 </ins> let _3: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14 scope 3 { debug _prev => _3;           // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14 <ins> let _5: &i32;                // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _6: &i32;                // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL </ins> scope 4 { <del> debug left_val => _13;   // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _15;  // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL </del> <ins> debug left_val => _5;    // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _6;   // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL </ins> scope 5 { <del> debug arg0 => _20;   // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug arg1 => _23;   // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL </del> <ins> debug arg0 => _21;   // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug arg1 => _24;   // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL </ins> scope 6 { <del> debug x => _20;  // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL debug f => _19;  // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL let mut _18: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _19: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _20: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL </del> <ins> debug x => _21;  // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL debug f => _20;  // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL let mut _19: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _20: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _21: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL </ins> } scope 8 { <del> debug x => _23;  // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL debug f => _22;  // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL let mut _21: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _22: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _23: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL </del> <ins> debug x => _24;  // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL debug f => _23;  // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL let mut _22: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _23: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _24: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL </ins> } } scope 10 { <del> debug pieces => (_9.0: &[&str]); // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL debug args => _25;   // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL let mut _24: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _25: &[std::fmt::ArgumentV1]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL </del> <ins> debug pieces => _25; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL debug args => _27;   // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL let mut _25: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _26: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL let mut _27: &[std::fmt::ArgumentV1]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL </ins> } } } } scope 2 { <del> debug v => _1;                   // in scope 2 at $DIR/issue-73223.rs:3:14: 3:15 </del> <ins> debug v => _2;                   // in scope 2 at $DIR/issue-73223.rs:3:14: 3:15 </ins> } scope 7 { }


visibilities: FxHashMap<LocalDefId, ty::Visibility>, has_pub_restricted: bool, used_imports: FxHashSet<NodeId>, <del> maybe_unused_trait_imports: FxHashSet<LocalDefId>, </del> <ins> maybe_unused_trait_imports: FxIndexSet<LocalDefId>, </ins> maybe_unused_extern_crates: Vec<(LocalDefId, Span)>, /// Privacy errors are delayed until the end in order to deduplicate them.


&& self.can_eq(self.param_env, ty, found).is_ok() { // We only point at the first place where the found type was inferred. <ins> if !segment.ident.span.overlaps(mismatch_span) { </ins> err.span_label( segment.ident.span, with_forced_trimmed_paths!(format!( "here the type of `{ident}` is inferred to be `{ty}`", )), <del> ); </del> <ins> );} </ins> break; } else if !param_args.is_empty() { break;


impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> { pub fn new(delegate: &'d mut Delegate<'tcx>, typer: &'t infer::InferCtxt<'a, 'tcx>) <del> -> ExprUseVisitor<'d,'t,'a,'tcx> </del> <ins> -> ExprUseVisitor<'d,'t,'a,'tcx> where 'tcx:'a </ins> { ExprUseVisitor { typer: typer,


/// let err = into_inner_err.into_error(); /// assert_eq!(err.kind(), ErrorKind::WriteZero); /// ``` <del> #[unstable(feature = "io_into_inner_error_parts", issue = "79704")] </del> <ins> #[stable(feature = "io_into_inner_error_parts", since = "1.55.0")] </ins> pub fn into_error(self) -> Error { self.1 }


} } <del> impl FromInternal<( TreeAndJoint, Option<&'_ tokenstream::TokenTree>, &'_ ParseSess, &'_ mut Vec<Self>, )> for TokenTree<Group, Punct, Ident, Literal> </del> <ins> impl FromInternal<(TreeAndJoint, &'_ ParseSess, &'_ mut Vec<Self>)> for TokenTree<Group, Punct, Ident, Literal> </ins> { fn from_internal( <del> ((tree, is_joint), look_ahead, sess, stack): ( TreeAndJoint, Option<&tokenstream::TokenTree>, &ParseSess, &mut Vec<Self>, ), </del> <ins> ((tree, is_joint), sess, stack): (TreeAndJoint, &ParseSess, &mut Vec<Self>), </ins> ) -> Self { use rustc_ast::token::*; <del> let joint = is_joint == Joint && matches!(look_ahead, Some(tokenstream::TokenTree::Token(t)) if t.is_op()); </del> <ins> let joint = is_joint == Joint; </ins> let Token { kind, span } = match tree { tokenstream::TokenTree::Delimited(span, delim, tts) => { let delimiter = Delimiter::from_internal(delim);


// Note that we could skip one of the .. but this ensures we at least loosely find the right // directory. let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); <del> let dest = out_dir.join("error_codes.rs"); </del> let error_codes_path = "../../../compiler/rustc_error_codes/src/error_codes.rs";


// the address of the symbol to ensure it sticks around. #[link_section = ".CRT$XLB"] <del> #[linkage = "external"] </del> #[allow(dead_code, unused_variables)] <ins> #[used] // we don't want LLVM eliminating this symbol for any reason, and // when the symbol makes it to the linker the linker will take over </ins> pub static p_thread_callback: unsafe extern "system" fn(c::LPVOID, c::DWORD, c::LPVOID) = on_tls_callback;


retry aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION env: AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) <del> condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1'))) </del> <ins> condition: and(succeeded(), not(variables.SKIP_JOB), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1'))) </ins> displayName: Upload artifacts # Upload CPU usage statistics that we've been gathering this whole time. Always


extern_return_twou64s(); foreign_fn_with_byval(); issue_28676(); <ins> issue_62350(); </ins> struct_return(); }


-include ../../run-make-fulldeps/tools.mk <del> all: $(TMPDIR)/$(call BIN,directly_linked) $(TMPDIR)/$(call BIN,indirectly_linked) $(TMPDIR)/$(call BIN,indirectly_linked_via_attr) </del> <ins> all: $(TMPDIR)/$(call BIN,directly_linked)  $(TMPDIR)/$(call BIN,directly_linked_test_plus_whole_archive)  $(TMPDIR)/$(call BIN,directly_linked_test_minus_whole_archive)  $(TMPDIR)/$(call BIN,indirectly_linked)  $(TMPDIR)/$(call BIN,indirectly_linked_via_attr) </ins> $(call RUN,directly_linked) | $(CGREP) 'static-initializer.directly_linked.' <ins> $(call RUN,directly_linked_test_plus_whole_archive) --nocapture | $(CGREP) 'static-initializer.' $(call RUN,directly_linked_test_minus_whole_archive) --nocapture | $(CGREP) -v 'static-initializer.' </ins> $(call RUN,indirectly_linked) | $(CGREP) 'static-initializer.indirectly_linked.' $(call RUN,indirectly_linked_via_attr) | $(CGREP) 'static-initializer.native_lib_in_src.'


Scope::Binder { where_bound_origin: Some(hir::PredicateOrigin::ImplTrait), .. } => { <del> let mut err = self.tcx.sess.struct_span_err( lifetime_ref.ident.span, "`impl Trait` can only mention lifetimes bound at the fn or impl level", ); err.span_note(self.tcx.def_span(region_def_id), "lifetime declared here"); err.emit(); </del> <ins> self.tcx.sess.emit_err(errors::LateBoundInApit::Lifetime { span: lifetime_ref.ident.span, param_span: self.tcx.def_span(region_def_id), }); </ins> return; } Scope::Root { .. } => break,


use libc::types::os::arch::c95::{c_int, size_t}; pub static SIGTRAP : c_int = 5; <ins> pub static SIGPIPE: c_int = 13; pub static SIG_IGN: size_t = 1; </ins> pub static GLOB_APPEND   : c_int = 0x0001; pub static GLOB_DOOFFS   : c_int = 0x0002;


eprint('ERROR: vendoring required, but vendor directory does not exist.') eprint('       Run `cargo vendor {}` to initialize the ' 'vendor directory.'.format(sync_dirs)) <del> eprint('Alternatively, use the pre-vendored `rustc-src` dist component.') </del> <ins> eprint('       Alternatively, use the pre-vendored `rustc-src` dist component.') eprint('       To get a stable/beta/nightly version, download it from: ') eprint('       ' 'https://forge.rust-lang.org/infra/other-installation-methods.html#source-code') eprint('       To get a specific commit version, download it using the below URL,') eprint('       replacing <commit> with a specific commit checksum: ') eprint('       ' 'https://ci-artifacts.rust-lang.org/rustc-builds/<commit>/rustc-nightly-src.tar.xz') eprint('       Once you have the source downloaded, place the vendor directory') eprint('       from the archive in the root of the rust project.') </ins> raise Exception("{} not found".format(vendor_dir)) if not os.path.exists(cargo_dir):


<ins> // https://github.com/rust-lang/rust/issues/100252 #![feature(no_core)] #![no_core] mod bar { // @set baz = import_from_private.json "$.index[*][?(@.kind=='struct')].id" pub struct Baz; // @set impl = - "$.index[*][?(@.kind=='impl')].id" impl Baz { // @set doit = - "$.index[*][?(@.kind=='method')].id" pub fn doit() {} } } // @set import = - "$.index[*][?(@.kind=='import')].id" pub use bar::Baz; // FIXME(adotinthevoid): Use hasexact once #99474 lands // @has - "$.index[*][?(@.kind=='module')].inner.items[*]" $import // @is  - "$.index[*][?(@.kind=='import')].inner.id" $baz // @has - "$.index[*][?(@.kind=='struct')].inner.impls[*]" $impl // @has - "$.index[*][?(@.kind=='impl')].inner.items[*]" $doit </ins>


fn bar() -> Self::Output; } <ins> // @has foo/trait.Safe.html // @!has - '//div[@class="sidebar-elems"]//h3/a[@href="#object-safety"]' '' pub trait Safe { fn access(&self); } </ins> // @has foo/struct.Bar.html // @has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Fields' // @has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f"]' 'f'


[[package]] name = "jsonrpc-core" <del> version = "13.1.0" </del> <ins> version = "13.2.0" </ins> source = "registry+https://github.com/rust-lang/crates.io-index" <del> checksum = "dd42951eb35079520ee29b7efbac654d85821b397ef88c8151600ef7e2d00217" </del> <ins> checksum = "91d767c183a7e58618a609499d359ce3820700b3ebb4823a18c343b4a2a41a0d" </ins> dependencies = [ "futures", "log",


[63421]: https://github.com/rust-lang/rust/pull/63421/ [cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/ [cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/ <ins> [63048]: https://github.com/rust-lang/rust/pull/63048 </ins> [`<*const T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast [`<*mut T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast [`Duration::as_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32


<ins> #[derive(PartialEq, Eq)] pub struct Tag(pub Context, pub u16); #[derive(PartialEq, Eq)] pub enum Context { Tiff, Exif, } impl Tag { const ExifIFDPointer: Tag = Tag(Context::Tiff, 34665); } fn main() { match Tag::ExifIFDPointer { //~^ ERROR: non-exhaustive patterns: `Tag(Exif, _)` not covered Tag::ExifIFDPointer => {} } } </ins>


expanded_cache: FxHashMap<(DefId, SubstsRef<'tcx>), Ty<'tcx>>, primary_def_id: Option<DefId>, found_recursion: bool, <ins> found_any_recursion: bool, </ins> /// Whether or not to check for recursive opaque types. /// This is `true` when we're explicitly checking for opaque type /// recursion, and 'false' otherwise to avoid unnecessary work.


let _ = make_vec![a 1, a 2, a 3]; } // --- Minified Issue --- // macro_rules! m { <del> ( $()* ) => {} </del> <ins> ( $()* ) => {}; </ins> //~^ ERROR repetition matches empty token tree }


fn main() { let mut s = S { f: 0, sub: Sub { f: 0 } }; field_write(&mut s); <ins> auto_deref(); nested_boxes(); } fn auto_deref() { struct E { x: bool, y: bool, //~ ERROR: field is never read } struct P<'a> { e: &'a mut E } impl P<'_> { fn f(&mut self) { self.e.x = true; self.e.y = true; } } let mut e = E { x: false, y: false }; let mut p = P { e: &mut e }; p.f(); assert!(e.x); } fn nested_boxes() { struct A { b: Box<B>, } struct B { c: Box<C>, } struct C { u: u32, //~ ERROR: field is never read v: u32, //~ ERROR: field is never read } let mut a = A { b: Box::new(B { c: Box::new(C { u: 0, v: 0 }), }), }; a.b.c.v = 10; a.b.c = Box::new(C { u: 1, v: 2 }); </ins> }


} #[test] <del> #[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)] </del> <ins> #[cfg_attr(any(target_os = "vxworks"), ignore)] </ins> fn test_process_status() { let mut status = if cfg!(target_os = "windows") { Command::new("cmd").args(&["/C", "exit 1"]).status().unwrap() } else { <del> Command::new("false").status().unwrap() </del> <ins> shell_cmd().arg("-c").arg("false").status().unwrap() </ins> }; assert!(status.code() == Some(1)); status = if cfg!(target_os = "windows") { Command::new("cmd").args(&["/C", "exit 0"]).status().unwrap() } else { <del> Command::new("true").status().unwrap() </del> <ins> shell_cmd().arg("-c").arg("true").status().unwrap() </ins> }; assert!(status.success()); }


Some(t) if t.hir_owner == parent_id => t, _ => self.tcx.typeck(parent_id), }; <del> let ty = typeck_results.expr_ty_adjusted(expr); let span = expr.peel_blocks().span; </del> <ins> let expr = expr.peel_blocks(); let ty = typeck_results.expr_ty_adjusted_opt(expr).unwrap_or(tcx.ty_error()); let span = expr.span; </ins> if Some(span) != err.span.primary_span() { err.span_label( span, <del> &if ty.references_error() { </del> <ins> if ty.references_error() { </ins> String::new() } else { format!("this tail expression is of type `{:?}`", ty)


"create_substs_for_associated_item(span: {:?}, item_def_id: {:?}, item_segment: {:?}", span, item_def_id, item_segment ); <del> self.create_substs_for_ast_path( </del> <ins> let (args, _) = self.create_substs_for_ast_path( </ins> span, item_def_id, parent_substs,


#![feature(macro_reexport)] #![feature(macro_vis_matcher)] #![feature(needs_panic_runtime)] <del> #![feature(needs_drop)] </del> #![feature(never_type)] #![feature(num_bits_bytes)] #![feature(old_wrapping)]


<ins> error[E0107]: wrong number of const arguments: expected 0, found 1 --> $DIR/invalid-const-arg-for-type-param.rs:6:34 | LL |     let _: u32 = 5i32.try_into::<32>().unwrap(); |                                  ^^ unexpected const argument error[E0599]: no method named `f` found for type `S` in the current scope --> $DIR/invalid-const-arg-for-type-param.rs:7:7 | LL | struct S; | --------- method `f` not found for this ... LL |     S.f::<0>(); |       ^ error[E0107]: wrong number of const arguments: expected 0, found 1 --> $DIR/invalid-const-arg-for-type-param.rs:8:9 | LL |     S::<0>; |         ^ unexpected const argument error: aborting due to 3 previous errors Some errors have detailed explanations: E0107, E0599. For more information about an error, try `rustc --explain E0107`. </ins>


<ins> pub trait Example { fn query<Q>(self, q: Q); } impl Example for i32 { fn query<Q>(self, _: Q) { unimplemented!() } } mod nested { use super::Example; fn example() { 1.query::<dyn ToString>("") //~^ ERROR the size for values of type `dyn ToString` cannot be known at compilation time //~| ERROR mismatched types } } fn main() {} </ins>


host: opt_str2(matches.opt_str("host")), gdb_version: extract_gdb_version(matches.opt_str("gdb-version")), lldb_version: extract_lldb_version(matches.opt_str("lldb-version")), <ins> llvm_version: matches.opt_str("llvm-version"), </ins> android_cross_path: opt_path(matches, "android-cross-path"), adb_path: opt_str2(matches.opt_str("adb-path")), adb_test_dir: format!("{}/{}",


.as_ref() .cloned() .map(|version| (version, true)) <del> .unwrap_or_default(); // `is_present` defaults to `false` here. </del> <ins> .unwrap_or_default(); </ins> <del> // Miri is nightly-only; never ship it for other trains. </del> <ins> // miri needs to build std with xargo, which doesn't allow stable/beta: // <https://github.com/japaric/xargo/pull/204#issuecomment-374888868> </ins> if pkgname == "miri-preview" && self.rust_release != "nightly" { <del> is_present = false; // Pretend the component is entirely missing. </del> <ins> is_present = false; // ignore it </ins> } let targets = targets.iter().map(|name| { if is_present { <del> // The component generally exists, but it might still be missing for this target. </del> let filename = self.filename(pkgname, name); let digest = match self.digests.remove(&filename) { Some(digest) => digest, <del> // This component does not exist for this target -- skip it. </del> None => return (name.to_string(), Target::unavailable()), }; let xz_filename = filename.replace(".tar.gz", ".tar.xz");


/// [arc]: ../../std/sync/struct.Arc.html /// [ub]: ../../reference/behavior-considered-undefined.html #[stable(feature = "rust1", since = "1.0.0")] <del> #[cfg_attr(not(test), rustc_diagnostic_item = "Send")] </del> <ins> #[cfg_attr(all(not(test), bootstrap), rustc_diagnostic_item = "send_trait")] #[cfg_attr(all(not(test), not(bootstrap)), rustc_diagnostic_item = "Send")] </ins> #[rustc_on_unimplemented( message = "`{Self}` cannot be sent between threads safely", label = "`{Self}` cannot be sent between threads safely"


<ins> error: lifetime must precede `mut` --> $DIR/issue-73568-lifetime-after-mut.rs:2:13 | LL | fn x<'a>(x: &mut 'a i32){} |             ^^^^^^^ help: place the lifetime before `mut`: `&'a mut` error[E0178]: expected a path on the left-hand side of `+`, not `&mut 'a` --> $DIR/issue-73568-lifetime-after-mut.rs:14:13 | LL | fn y<'a>(y: &mut 'a + Send) { |             ^^^^^^^^^^^^^^ help: try adding parentheses: `&mut ('a + Send)` error: lifetime must precede `mut` --> $DIR/issue-73568-lifetime-after-mut.rs:6:22 | LL |         fn w<$lt>(w: &mut $lt i32) {} |                      ^^^^^^^^ help: place the lifetime before `mut`: `&$lt mut` ... LL | mac!('a); | --------- in this macro invocation | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0423]: expected value, found trait `Send` --> $DIR/issue-73568-lifetime-after-mut.rs:18:28 | LL |     let z = y as &mut 'a + Send; |                            ^^^^ not a value warning: trait objects without an explicit `dyn` are deprecated --> $DIR/issue-73568-lifetime-after-mut.rs:14:18 | LL | fn y<'a>(y: &mut 'a + Send) { |                  ^^ help: use `dyn`: `dyn 'a` | = note: `#[warn(bare_trait_objects)]` on by default warning: trait objects without an explicit `dyn` are deprecated --> $DIR/issue-73568-lifetime-after-mut.rs:18:23 | LL |     let z = y as &mut 'a + Send; |                       ^^ help: use `dyn`: `dyn 'a` error[E0224]: at least one trait is required for an object type --> $DIR/issue-73568-lifetime-after-mut.rs:14:18 | LL | fn y<'a>(y: &mut 'a + Send) { |                  ^^ error: aborting due to 5 previous errors; 2 warnings emitted Some errors have detailed explanations: E0178, E0224, E0423. For more information about an error, try `rustc --explain E0178`. </ins>


// u8 literal, push to vector expression ast::LitUint(v, ast::TyU8) => { if v > 0xFF { <del> cx.span_err(expr.span, "too large u8 literal in bytes!") </del> <ins> cx.span_err(expr.span, "too large u8 literal in bytes!"); err = true; </ins> } else { bytes.push(cx.expr_u8(expr.span, v as u8)); }


<ins> // Test for issues/115517 which is fixed by pull/115486 // This should not ice trait Test<const C: usize> {} trait Elide<T> { fn call(); } pub fn test() where (): Test<{ 1 + (<() as Elide(&())>::call) }>, //~^ ERROR cannot capture late-bound lifetime in constant { } fn main() {} </ins>


mingw-check: IMAGE: mingw-check <del> # TODO: enable this job if the commit message matches this regex, need tools # figure out how to get the current commit message on azure and stick it in a # condition somewhere #     if: commit_message =~ /(?i:^update.*b(rls|rustfmt|clippy|miri|cargo)b)/ # - job: Linux-x86_64-gnu-tools #   pool: #     vmImage: ubuntu-16.04 #   steps: #     - template: steps/run.yml #   variables: #     IMAGE: x86_64-gnu-tools </del> <ins> - job: LinuxTools pool: vmImage: ubuntu-16.04 steps: - template: steps/run.yml parameters: only_on_updated_submodules: 'yes' variables: IMAGE: x86_64-gnu-tools </ins>


<ins> warning: public documentation for `private_from_crate_level` links to private item `my_module` --> $DIR/private-from-crate-level.rs:3:6 | LL | //! [my_module] |      ^^^^^^^^^ this item is private | = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` warning: 1 warning emitted </ins>


use crate::flags::{Color, Flags, Warnings}; use crate::util::{exe, output, t}; use once_cell::sync::OnceCell; <ins> use semver::Version; </ins> use serde::{Deserialize, Deserializer}; use serde_derive::Deserialize;


<ins> // Regression test for <https://github.com/rust-lang/rust/issues/100529>. #![no_core] #![feature(no_core)] // @has "$.index[*][?(@.name=='ParseError')]" // @has "$.index[*][?(@.name=='UnexpectedEndTag')]" // @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant_kind" '"tuple"' // @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant_inner" [null] pub enum ParseError { UnexpectedEndTag(#[doc(hidden)] u32), } </ins>


let f1: f64 = FromStrRadix::from_str_radix("1p-123", 16).unwrap(); let f2: f64 = FromStrRadix::from_str_radix("1p-111", 16).unwrap(); let f3: f64 = FromStrRadix::from_str_radix("1.Cp-12", 16).unwrap(); <del> assert_eq!(Float::ldexp(1f64, -123), f1); assert_eq!(Float::ldexp(1f64, -111), f2); </del> <ins> assert_eq!(1f64.ldexp(-123), f1); assert_eq!(1f64.ldexp(-111), f2); </ins> assert_eq!(Float::ldexp(1.75f64, -12), f3); assert_eq!(Float::ldexp(0f64, -123), 0f64);


} if !provided.is_empty() { write!(w, "
Provided Methods

 Provided Methods

 ")?; for m in &provided {


} else { "traits define" }, <del> action = if let Some(param) = param_type { format!("restrict type parameter `{}` with", param) } else { "implement".to_string() }, </del> <ins> action = action, </ins> one_of_them = if candidates.len() == 1 { "it" } else {


<ins> // run-pass #![feature(or_patterns)] fn main() { assert!(f("", 0)); assert!(f("a", 1)); assert!(f("b", 1)); assert!(!f("", 1)); assert!(!f("a", 0)); assert!(!f("b", 0)); assert!(!f("asdf", 32)); //// assert!(!g(true, true, true)); assert!(!g(false, true, true)); assert!(!g(true, false, true)); assert!(!g(false, false, true)); assert!(!g(true, true, false)); assert!(g(false, true, false)); assert!(g(true, false, false)); assert!(g(false, false, false)); //// assert!(!h(true, true, true)); assert!(!h(false, true, true)); assert!(!h(true, false, true)); assert!(!h(false, false, true)); assert!(!h(true, true, false)); assert!(h(false, true, false)); assert!(h(true, false, false)); assert!(h(false, false, false)); } fn f(s: &str, num: usize) -> bool { match (s, num) { ("", 0) | ("a" | "b", 1) => true, _ => false, } } fn g(x: bool, y: bool, z: bool) -> bool { match (x, y, x, z) { (true | false, false, true, false) => true, (false, true | false, true | false, false) => true, (true | false, true | false, true | false, true) => false, (true, true | false, true | false, false) => false, } } fn h(x: bool, y: bool, z: bool) -> bool { match (x, (y, (x, (z,)))) { (true | false, (false, (true, (false,)))) => true, (false, (true | false, (true | false, (false,)))) => true, (true | false, (true | false, (true | false, (true,)))) => false, (true, (true | false, (true | false, (false,)))) => false, } } </ins>


<del> Subproject commit d9e7d2696e41983b6b5a0b4fac604b4e548a84d3 </del> <ins> Subproject commit c7a16bd57c2a9c643a52f0cebecdaf0b6a996da1 </ins>


/// # Example /// /// ```rust <ins> /// # #![allow(deprecated)] </ins> /// use url::get_scheme; /// /// let scheme = match get_scheme("https://example.com/") {


<ins> // check-pass trait Identity<Q> { type T; } impl<Q, T> Identity<Q> for T { type T = T; } trait Holds { type Q; } struct S; struct X(S); struct XHelper; impl Holds for X { type Q = XHelper; } impl<Q> Clone for X where <S as Identity<Q>>::T: Clone, X: Holds<Q = Q>, { fn clone(&self) -> Self { Self(self.0.clone()) } } fn main() {} </ins>


.any(|build_llvm_ourselves| build_llvm_ourselves); let need_cmake = building_llvm || build.config.any_sanitizers_enabled(); if need_cmake { <del> cmd_finder.must_have("cmake"); </del> <ins> if cmd_finder.maybe_have("cmake").is_none() { eprintln!( " Couldn't find required command: cmake You should install cmake, or set `download-ci-llvm = true` in the `[llvm]` section section of `config.toml` to download LLVM rather than building it. " ); std::process::exit(1); } </ins> } build.config.python = build


<ins> // Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // compile-flags:--no-defaults --passes strip-priv-imports // aux-build:empty.rs // ignore-cross-compile // @has issue_27104/index.html // @!has - 'extern crate std' // @!has - 'use std::prelude::' // @has - 'pub extern crate empty' pub extern crate empty; </ins>