<ins> error[E0407]: method `nonexistent` is not a member of trait `issue_119463_extern::PrivateTrait` --> $DIR/issue-119463.rs:11:5 | LL |     fn nonexistent() {} |     ^^^^^^^^^^^^^^^^^^^ not a member of trait `issue_119463_extern::PrivateTrait` error[E0603]: trait `PrivateTrait` is private --> $DIR/issue-119463.rs:7:27 | LL | impl issue_119463_extern::PrivateTrait for S { |                           ^^^^^^^^^^^^ private trait | note: the trait `PrivateTrait` is defined here --> $DIR/auxiliary/issue-119463-extern.rs:1:1 | LL | trait PrivateTrait { | ^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors Some errors have detailed explanations: E0407, E0603. For more information about an error, try `rustc --explain E0407`. </ins>


cargo.arg("--all-targets"); } <del> let _guard = builder.msg_check(&concat!(stringify!($name), " artifacts").to_lowercase(), target); </del> <ins> let _guard = builder.msg_check(&format!("{} artifacts", $display_name), target); </ins> run_cargo( builder, cargo,


match &mut stmt.kind { // Expression without semicolon. StmtKind::Expr(expr) <ins> if classify::expr_requires_semi_to_be_stmt(expr) && !expr.attrs.is_empty() && ![token::Eof, token::Semi, token::CloseDelim(Delimiter::Brace)] .contains(&self.token.kind) => { // The user has written `#[attr] expr` which is unsupported. (#106020) self.attr_on_non_tail_expr(&expr); // We already emitted an error, so don't emit another type error let sp = expr.span.to(self.prev_token.span); *expr = self.mk_expr_err(sp); } // Expression without semicolon. StmtKind::Expr(expr) </ins> if self.token != token::Eof && classify::expr_requires_semi_to_be_stmt(expr) => { // Just check for errors and recover; do not eat semicolon yet.


<del> //@ known-bug: rust-lang/rust#125081 use std::cell::Cell; fn main() { let _: Cell<&str, "a"> = Cell::new('β); } </del>


parse_only: false, no_trans: false, no_analysis: false, <ins> no_rpath: false, </ins> debugging_opts: 0, android_cross_path: None, write_dependency_info: (false, None),


fs::metadata(hiberfil).unwrap(); assert_eq!(true, hiberfil.exists()); } <ins> /// Test that two different ways of obtaining the FileType give the same result. /// Cf. https://github.com/rust-lang/rust/issues/104900 #[test] fn test_eq_direntry_metadata() { let tmpdir = tmpdir(); let file_path = tmpdir.join("file"); File::create(file_path).unwrap(); for e in fs::read_dir(tmpdir.path()).unwrap() { let e = e.unwrap(); let p = e.path(); let ft1 = e.file_type().unwrap(); let ft2 = p.metadata().unwrap().file_type(); assert_eq!(ft1, ft2); } } </ins>


self.is_const_fn_raw(def_id) && match self.is_unstable_const_fn(def_id) { Some(feature_name) => { // has a `rustc_const_unstable` attribute, check whether the user enabled the <del> // corresponding feature gate, const_constructor is not a lib feature, so has // to be checked separately. </del> <ins> // corresponding feature gate. </ins> self.features() .declared_lib_features .iter() .any(|&(sym, _)| sym == feature_name) <del> || (feature_name == sym::const_constructor && self.features().const_constructor) </del> }, // functions without const stability are either stable user written // const fn or the user is using feature gates and we thus don't


<ins> fn f1() -> impl Sized { & 2E } //~ ERROR expected at least one digit in exponent fn f2() -> impl Sized { && 2E } //~ ERROR expected at least one digit in exponent fn f3() -> impl Sized { &'a 2E } //~ ERROR expected at least one digit in exponent //~^ ERROR borrow expressions cannot be annotated with lifetimes fn f4() -> impl Sized { &'static 2E } //~ ERROR expected at least one digit in exponent //~^ ERROR borrow expressions cannot be annotated with lifetimes fn f5() -> impl Sized { *& 2E } //~ ERROR expected at least one digit in exponent fn f6() -> impl Sized { &'_ 2E } //~ ERROR expected at least one digit in exponent //~^ ERROR borrow expressions cannot be annotated with lifetimes fn main() {} </ins>


<ins> // edition: 2021 trait Foo { type T; async fn foo(&self) -> Self::T; } struct Bar; impl Foo for Bar { type T = (); async fn foo(&self) {} //~^ ERROR type annotations needed: cannot satisfy `<Bar as Foo>::T == ()` } impl Foo for Bar { //~^ ERROR conflicting implementations of trait `Foo` for type `Bar` type T = (); async fn foo(&self) {} //~^ ERROR type annotations needed: cannot satisfy `<Bar as Foo>::T == ()` } fn main() {} </ins>


let mut indirect_outputs = vec![]; for (i, (out, &place)) in ia.outputs.iter().zip(&outputs).enumerate() { if out.is_rw { <del> inputs.push(self.load_operand(place).immediate()); </del> <ins> let operand = self.load_operand(place); if let OperandValue::Immediate(_) = operand.val { inputs.push(operand.immediate()); } </ins> ext_constraints.push(i.to_string()); } if out.is_indirect { <del> indirect_outputs.push(self.load_operand(place).immediate()); </del> <ins> let operand = self.load_operand(place); if let OperandValue::Immediate(_) = operand.val { indirect_outputs.push(operand.immediate()); } </ins> } else { output_types.push(place.layout.llvm_type(self.cx())); }


} } <ins> fn evaluation_is_concurrent(&self) -> bool { self.sess.threads() > 1 } </ins> fn expand_abstract_consts<T: TypeFoldable<TyCtxt<'tcx>>>(self, t: T) -> T { self.expand_abstract_consts(t) }


<ins> use std::hash::Hash; use std::marker::PhantomData; use std::ops::Index; struct HashMap<K, V>(PhantomData<(K, V)>); impl<K, V> Index<&K> for HashMap<K, V> where K: Hash, V: Copy, { type Output = V; fn index(&self, k: &K) -> &V { todo!() } } fn index<'a, K, V>(map: &'a HashMap<K, V>, k: K) -> &'a V { map[k] //~^ ERROR the trait bound `K: Hash` is not satisfied //~| ERROR the trait bound `V: Copy` is not satisfied //~| ERROR mismatched types //~| ERROR mismatched types } fn main() {} </ins>


import textwrap try: import urllib2 <ins> from urllib2 import HTTPError </ins> except ImportError: import urllib.request as urllib2 <ins> from urllib.error import HTTPError try: import typing except ImportError: pass </ins> # List of people to ping when the status of a tool or a book changed. # These should be collaborators of the rust-lang/rust repository (with at least


self.error_on_extra_if(&cond)?; // Parse block, which will always fail, but we can add a nice note to the error self.parse_block().map_err(|mut err| { <del> err.span_note( cond_span, "the `if` expression is missing a block after this condition", ); </del> <ins> if self.prev_token == token::Semi && self.token == token::AndAnd && let maybe_let = self.look_ahead(1, |t| t.clone()) && maybe_let.is_keyword(kw::Let) { err.span_suggestion( self.prev_token.span, "consider removing this semicolon to parse the `let` as part of the same chain", "", Applicability::MachineApplicable, ).span_note( self.token.span.to(maybe_let.span), "you likely meant to continue parsing the let-chain starting here", ); } else { err.span_note( cond_span, "the `if` expression is missing a block after this condition", ); } </ins> err })? }


check_safety_of_rvalue_destructor_if_necessary(rcx, head_cmt, expr.span); } Err(..) => { <del> rcx.fcx.tcx().sess.span_note(expr.span, "cat_expr Errd during dtor check"); </del> <ins> let tcx = rcx.fcx.tcx(); if tcx.sess.has_errors() { // cannot run dropck; okay b/c in error state anyway. } else { tcx.sess.span_bug(expr.span, "cat_expr Errd"); } </ins> } }


self.maybe_annotate_with_ascription(&mut err, false); err.emit(); self.recover_stmt_(SemiColonMode::Ignore, BlockMode::Ignore); <del> Some(Stmt { id: DUMMY_NODE_ID, kind: StmtKind::Expr(self.mk_expr_err(self.token.span)), span: self.token.span, }) </del> <ins> Some(self.mk_stmt( self.token.span, StmtKind::Expr(self.mk_expr_err(self.token.span)), )) </ins> } Ok(stmt) => stmt, };


_ => return, } <ins> let max_by_val_size = if is_ret { call::max_ret_by_val(cx) } else { Pointer.size(cx) }; </ins> let size = arg.layout.size; <del> if arg.layout.is_unsized() || size > Pointer.size(cx) { </del> <ins> if arg.layout.is_unsized() || size > max_by_val_size { </ins> arg.make_indirect(); } else { // We want to pass small aggregates as immediates, but using


arg_count, if arg_count == 1 {" was"} else {"s were"}), error_code); <ins> err.span_label(sp, &format!("expected {}{} parameter{}", if variadic {"at least "} else {""}, expected_count, if expected_count == 1 {""} else {"s"})); </ins> let input_types = fn_inputs.iter().map(|i| format!("{:?}", i)).collect::<Vec<String>>(); if input_types.len() > 0 { err.note(&format!("the following parameter type{} expected: {}",


impl<'tcx> TypeVisitor<'tcx> for GATSubstCollector<'tcx> { type BreakTy = !; <ins> fn visit_binder<T: TypeFoldable<'tcx>>( &mut self, t: &ty::Binder<'tcx, T>, ) -> ControlFlow<Self::BreakTy> { self.tcx.liberate_late_bound_regions(self.gat, t.clone()).visit_with(self) } </ins> fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { match t.kind() { ty::Projection(p) if p.item_def_id == self.gat => {


} pub fn store_fn_arg(&self, bx: &Builder<'a, 'tcx>, idx: &mut usize, dst: PlaceRef<'tcx>) { <del> if self.pad.is_some() { *idx += 1; } </del> let mut next = || { let val = llvm::get_param(bx.llfn(), *idx as c_uint); *idx += 1;


<del> Subproject commit af5940b73153b2a4ea2922aa803abac45d029982 </del> <ins> Subproject commit 6651c1b9b2a1b3e995565467218ff7eca7479c5e </ins>


<del> Subproject commit 10419b3f2fc625bb9d746c16d768e433a894484d </del> <ins> Subproject commit a6c28f08458e15cead0e80f3b5b7009786bce4a4 </ins>


<ins> // Tests that the compiler does not ICE when const-evaluating a `panic!()` invocation with a // non-`&str` argument. #![feature(const_panic)] const _: () = panic!(1); //~^ ERROR: argument to `panic!()` in a const context must have type `&str` static _FOO: () = panic!(true); //~^ ERROR: argument to `panic!()` in a const context must have type `&str` const fn _foo() { panic!(&1); //~ ERROR: argument to `panic!()` in a const context must have type `&str` } // ensure that conforming panics don't cause an error const _: () = panic!(); static _BAR: () = panic!("panic in static"); const fn _bar() { panic!("panic in const fn"); } fn main() {} </ins>


discr_index, .. } => { <del> if !variant_index.as_usize() < dest.layout.ty.ty_adt_def().unwrap().variants.len() { throw_ub!(InvalidDiscriminant(variant_scalar)); } </del> <ins> // No need to validate that the discriminant here because the // `TyLayout::for_variant()` call earlier already checks the variant is valid. </ins> if variant_index != dataful_variant { let variants_start = niche_variants.start().as_u32(); let variant_index_relative = variant_index.as_u32()


<ins> error[E0080]: evaluation of `<A<()> as Foo<()>>::BAR` failed --> $DIR/issue-50814-2.rs:16:24 | LL |     const BAR: usize = [5, 6, 7][T::BOO]; |                        ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42 note: erroneous constant encountered --> $DIR/issue-50814-2.rs:20:6 | LL |     &<A<T> as Foo<T>>::BAR |      ^^^^^^^^^^^^^^^^^^^^^ note: the above error was encountered while instantiating `fn foo::<()>` --> $DIR/issue-50814-2.rs:32:22 | LL |     println!("{:x}", foo::<()>() as *const usize as usize); |                      ^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0080`. </ins>


<ins> // ignore-order const QUERY = 'RawFd::as_raw_fd'; const EXPECTED = { 'others': [ // Reproduction test for https://github.com/rust-lang/rust/issues/78724 // Validate that type alias methods get the correct path. { 'path': 'std::os::unix::io::AsRawFd', 'name': 'as_raw_fd' }, { 'path': 'std::os::wasi::io::AsRawFd', 'name': 'as_raw_fd' }, { 'path': 'std::os::linux::process::PidFd', 'name': 'as_raw_fd' }, { 'path': 'std::os::unix::io::RawFd', 'name': 'as_raw_fd' }, ], }; </ins>


/// assert!(ptr::eq(ptr, inner.as_ptr())); /// ``` #[inline] <del> #[unstable(feature = "arc_unwrap_or_clone", issue = "93610")] </del> <ins> #[stable(feature = "arc_unwrap_or_clone", since = "CURRENT_RUSTC_VERSION")] </ins> pub fn unwrap_or_clone(this: Self) -> T { Rc::try_unwrap(this).unwrap_or_else(|rc| (*rc).clone()) }


<del> Subproject commit 5faf5a5ca059f6eb067fc86e47480f5668ac6e8c </del> <ins> Subproject commit 41f3fe64317a6ef144d2ac33e4e5870d894d6038 </ins>


&& data_a.principal_def_id() != data_b.principal_def_id() { debug!("coerce_unsized: found trait upcasting coercion"); <del> has_trait_upcasting_coercion = true; </del> <ins> has_trait_upcasting_coercion = Some((self_ty, unsize_ty)); </ins> } if let ty::Tuple(..) = unsize_ty.kind() { debug!("coerce_unsized: found unsized tuple coercion");


} // Transfer the conditions on the copy rhs, after inversing polarity. Rvalue::UnaryOp(UnOp::Not, Operand::Move(place) | Operand::Copy(place)) => { <ins> if !place.ty(self.body, self.tcx).ty.is_bool() { // Constructing the conditions by inverting the polarity // of equality is only correct for bools. That is to say, // `!a == b` is not `a != b` for integers greater than 1 bit. return; } </ins> let Some(conditions) = state.try_get_idx(lhs, &self.map) else { return }; let Some(place) = self.map.find(place.as_ref()) else { return }; <ins> // FIXME: I think This could be generalized to not bool if we // actually perform a logical not on the condition's value. </ins> let conds = conditions.map(self.arena, Condition::inv); state.insert_value_idx(place, conds, &self.map); }


35 |     #[rustc_deprecated = "1500"] impl S { } |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <del> error: aborting due to 9 previous errors </del> <ins> error: aborting due to 8 previous errors </ins>


<ins> // unit-test: Inline // compile-flags: --crate-type=lib -C panic=abort trait Foo { fn bar(&self) -> i32; } impl<T> Foo for T { fn bar(&self) -> i32 { 0 } } // EMIT_MIR inline_generically_if_sized.call.Inline.diff pub fn call<T>(s: &T) -> i32 { s.bar() } </ins>