jiebi/CodeConvo huggingface dataset:
// `val` dropped here while still borrowed // borrow might be used here, when `val` is dropped and runs the `Drop` code for type `std::rc::Weak` } <del> #[test] fn rc_from_vec_opt() { let mut v = Vec::with_capacity(64); v.push(0usize); let addr = v.as_ptr().cast::<u8>(); let rc: Rc<[_]> = v.into(); unsafe { assert_eq!( rc.as_ptr().cast::<u8>().offset_from(addr), (std::mem::size_of::<usize>() * 2) as isize, "Vector allocation not reused" ); } } </del>
expected: Expectation<'tcx>, ) -> Option<Ty<'tcx>> { if let [callee_expr, rest @ ..] = arg_exprs { <del> let callee_ty = self.check_expr(callee_expr); </del> <ins> let callee_ty = self.typeck_results.borrow().expr_ty_adjusted_opt(callee_expr)?; </ins> // First, do a probe with `IsSuggestion(true)` to avoid emitting // any strange errors. If it's successful, then we'll do a true // method lookup.
<ins> fn main() -> Result<(), ()> { a(b(c(d(e( //~^ ERROR cannot find function `a` in this scope //~| ERROR cannot find function `b` in this scope //~| ERROR cannot find function `c` in this scope //~| ERROR cannot find function `d` in this scope //~| ERROR cannot find function `e` in this scope z???????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????? //~^^^ ERROR cannot find value `z` in this scope ))))) } </ins>
<ins> error[E0425]: cannot find value `z` in this scope --> $DIR/fn-to-method-deeply-nested.rs:8:9 | LL |         z???????????????????????????????????????????????????????????????????????????????????????? |         ^ not found in this scope error[E0425]: cannot find function `e` in this scope --> $DIR/fn-to-method-deeply-nested.rs:2:13 | LL |     a(b(c(d(e( |             ^ not found in this scope error[E0425]: cannot find function `d` in this scope --> $DIR/fn-to-method-deeply-nested.rs:2:11 | LL |     a(b(c(d(e( |           ^ not found in this scope error[E0425]: cannot find function `c` in this scope --> $DIR/fn-to-method-deeply-nested.rs:2:9 | LL |     a(b(c(d(e( |         ^ not found in this scope error[E0425]: cannot find function `b` in this scope --> $DIR/fn-to-method-deeply-nested.rs:2:7 | LL |     a(b(c(d(e( |       ^ not found in this scope error[E0425]: cannot find function `a` in this scope --> $DIR/fn-to-method-deeply-nested.rs:2:5 | LL |     a(b(c(d(e( |     ^ not found in this scope error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0425`. </ins>
<ins> error[E0308]: mismatched types --> $DIR/check-args-on-fn-err-2.rs:2:19 | LL |     a((), 1i32 == 2u32); |           ----    ^^^^ expected `i32`, found `u32` |           | |           expected because this is `i32` | help: change the type of the numeric literal from `u32` to `i32` | LL |     a((), 1i32 == 2i32); |                    ~~~ error[E0425]: cannot find function `a` in this scope --> $DIR/check-args-on-fn-err-2.rs:2:5 | LL |     a((), 1i32 == 2u32); |     ^ not found in this scope error: aborting due to 2 previous errors Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. </ins>
t("```rustn```n```rustn```", &[1, 3]); t("```rustn```n ```rustn```", &[1, 3]); } <ins> #[test] fn test_ascii_with_prepending_hashtag() { fn t(input: &str, expect: &str) { let mut map = IdMap::new(); let output = Markdown { content: input, links: &[], ids: &mut map, error_codes: ErrorCodes::Yes, edition: DEFAULT_EDITION, playground: &None, heading_offset: HeadingOffset::H2, } .into_string(); assert_eq!(output, expect, "original: {}", input); } t( r#"```ascii #..#.####.#....#.....##.. #..#.#....#....#....#..#. ####.###..#....#....#..#. #..#.#....#....#....#..#. #..#.#....#....#....#..#. #..#.####.####.####..##.. ```"#, "<div class="example-wrap"><pre class="language-ascii"><code> #..#.####.#....#.....##.. #..#.#....#....#....#..#. ####.###..#....#....#..#. #..#.#....#....#....#..#. #..#.#....#....#....#..#. #..#.####.####.####..##.. </code></pre></div>", ); } </ins>
let entry = spanned_predicates.entry(spans); entry.or_insert_with(|| (path, tr_self_ty, Vec::new())).2.push(p); } <ins> Some(Node::Item(hir::Item { kind: hir::ItemKind::Trait(rustc_ast::ast::IsAuto::Yes, ..), span: item_span, .. })) => { tcx.sess.delay_span_bug( *item_span, "auto trait is invoked with no method error, but no error reported?", ); } </ins> Some(_) => unreachable!(), None => (), }
<ins> error[E0380]: auto traits cannot have associated items --> $DIR/issue-105732.rs:4:8 | LL | auto trait Foo { |            --- auto trait cannot have associated items LL |     fn g(&self); |     ---^-------- help: remove these associated items error[E0599]: the method `g` exists for reference `&Self`, but its trait bounds were not satisfied --> $DIR/issue-105732.rs:9:14 | LL |         self.g(); |              ^ | = note: the following trait bounds were not satisfied: `Self: Foo` which is required by `&Self: Foo` `&Self: Foo` = help: items from traits can only be used if the type parameter is bounded by the trait help: the following trait defines an item `g`, perhaps you need to add a supertrait for it: | LL | trait Bar: Foo { |          +++++ error: aborting due to 2 previous errors Some errors have detailed explanations: E0380, E0599. For more information about an error, try `rustc --explain E0380`. </ins>
Some(tcx.typeck_root_def_id(def_id)) } Node::Item(item) => match item.kind { <del> ItemKind::OpaqueTy(hir::OpaqueTy { .. }) => { </del> <ins> ItemKind::OpaqueTy(hir::OpaqueTy { origin: hir::OpaqueTyOrigin::FnReturn(fn_def_id) | hir::OpaqueTyOrigin::AsyncFn(fn_def_id), in_trait, .. }) => { if in_trait { assert!(matches!(tcx.def_kind(fn_def_id), DefKind::AssocFn)) } else { assert!(matches!(tcx.def_kind(fn_def_id), DefKind::AssocFn | DefKind::Fn)) } Some(fn_def_id.to_def_id()) } ItemKind::OpaqueTy(hir::OpaqueTy { origin: hir::OpaqueTyOrigin::TyAlias, .. }) => { </ins> let parent_id = tcx.hir().get_parent_item(hir_id); assert_ne!(parent_id, hir::CRATE_OWNER_ID); debug!("generics_of: parent of opaque ty {:?} is {:?}", def_id, parent_id);
self.typeck_results.borrow().qpath_res(qpath, callee_expr.hir_id) } hir::ExprKind::Call(ref inner_callee, _) => { <del> // If the call spans more than one line and the callee kind is // itself another `ExprCall`, that's a clue that we might just be // missing a semicolon (Issue #51055) let call_is_multiline = self.tcx.sess.source_map().is_multiline(call_expr.span); if call_is_multiline { err.span_suggestion( callee_expr.span.shrink_to_hi(), "consider using a semicolon here", ";", Applicability::MaybeIncorrect, ); } </del> if let hir::ExprKind::Path(ref inner_qpath) = inner_callee.kind { inner_callee_path = Some(inner_qpath); self.typeck_results.borrow().qpath_res(inner_qpath, inner_callee.hir_id)
}; if !self.maybe_suggest_bad_array_definition(&mut err, call_expr, callee_expr) { <ins> // If the call spans more than one line and the callee kind is // itself another `ExprCall`, that's a clue that we might just be // missing a semicolon (#51055, #106515). let call_is_multiline = self .tcx .sess .source_map() .is_multiline(call_expr.span.with_lo(callee_expr.span.hi())) && call_expr.span.ctxt() == callee_expr.span.ctxt(); if call_is_multiline { err.span_suggestion( callee_expr.span.shrink_to_hi(), "consider using a semicolon here to finish the statement", ";", Applicability::MaybeIncorrect, ); } </ins> if let Some((maybe_def, output_ty, _)) = self.extract_callable_info(callee_ty) && !self.type_is_sized_modulo_regions(self.param_env, output_ty) {
<ins> // run-rustfix #![allow(dead_code, unused_variables, path_statements)] fn a() { let x = 5; let y = x; //~ ERROR expected function (); //~ ERROR expected `;`, found `}` } fn b() { let x = 5; let y = x; //~ ERROR expected function (); } fn c() { let x = 5; x; //~ ERROR expected function () } fn d() { // ok let x = || (); x () } fn e() { // ok let x = || (); x (); } fn f() { let y = 5; //~ ERROR expected function (); //~ ERROR expected `;`, found `}` } fn g() { 5; //~ ERROR expected function (); } fn main() {} </ins>
<ins> // run-rustfix #![allow(dead_code, unused_variables, path_statements)] fn a() { let x = 5; let y = x //~ ERROR expected function () //~ ERROR expected `;`, found `}` } fn b() { let x = 5; let y = x //~ ERROR expected function (); } fn c() { let x = 5; x //~ ERROR expected function () } fn d() { // ok let x = || (); x () } fn e() { // ok let x = || (); x (); } fn f() { let y = 5 //~ ERROR expected function () //~ ERROR expected `;`, found `}` } fn g() { 5 //~ ERROR expected function (); } fn main() {} </ins>
<ins> error: expected `;`, found `}` --> $DIR/missing-semicolon.rs:6:7 | LL |     () |       ^ help: add `;` here LL | } | - unexpected token error: expected `;`, found `}` --> $DIR/missing-semicolon.rs:32:7 | LL |     () |       ^ help: add `;` here LL | } | - unexpected token error[E0618]: expected function, found `{integer}` --> $DIR/missing-semicolon.rs:5:13 | LL |       let x = 5; |           - `x` has type `{integer}` LL |       let y = x |               ^- help: consider using a semicolon here to finish the statement: `;` |  _____________| | | LL | |     () | |______- call expression requires function error[E0618]: expected function, found `{integer}` --> $DIR/missing-semicolon.rs:11:13 | LL |       let x = 5; |           - `x` has type `{integer}` LL |       let y = x |               ^- help: consider using a semicolon here to finish the statement: `;` |  _____________| | | LL | |     (); | |______- call expression requires function error[E0618]: expected function, found `{integer}` --> $DIR/missing-semicolon.rs:16:5 | LL |       let x = 5; |           - `x` has type `{integer}` LL |       x |       ^- help: consider using a semicolon here to finish the statement: `;` |  _____| | | LL | |     () | |______- call expression requires function error[E0618]: expected function, found `{integer}` --> $DIR/missing-semicolon.rs:31:13 | LL |       let y = 5 |               ^- help: consider using a semicolon here to finish the statement: `;` |  _____________| | | LL | |     () | |______- call expression requires function error[E0618]: expected function, found `{integer}` --> $DIR/missing-semicolon.rs:35:5 | LL |       5 |       ^- help: consider using a semicolon here to finish the statement: `;` |  _____| | | LL | |     (); | |______- call expression requires function error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0618`. </ins>
note = "if you want to iterate between `start` until a value `end`, use the exclusive range  syntax `start..end` or the inclusive range syntax `start..=end`" ), <ins> on( _Self = "{float}", note = "if you want to iterate between `start` until a value `end`, use the exclusive range  syntax `start..end` or the inclusive range syntax `start..=end`" ), </ins> label = "`{Self}` is not an iterator", message = "`{Self}` is not an iterator" )]
<ins> // #106728 fn main() { for i in 0.2 { //~^ ERROR `{float}` is not an iterator //~| `{float}` is not an iterator //~| NOTE in this expansion of desugaring of `for` loop //~| NOTE in this expansion of desugaring of `for` loop //~| NOTE in this expansion of desugaring of `for` loop //~| NOTE in this expansion of desugaring of `for` loop //~| NOTE if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` //~| NOTE required for `{float}` to implement `IntoIterator` println!(); } } </ins>
<ins> error[E0277]: `{float}` is not an iterator --> $DIR/float_iterator_hint.rs:4:14 | LL |     for i in 0.2 { |              ^^^ `{float}` is not an iterator | = help: the trait `Iterator` is not implemented for `{float}` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` = note: required for `{float}` to implement `IntoIterator` error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. </ins>
|              ^^^^ `{float}` is not an iterator | = help: the trait `Iterator` is not implemented for `{float}` <ins> = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` </ins> = note: required for `{float}` to implement `IntoIterator` error: aborting due to 12 previous errors
if !check && paths.is_empty() { match get_modified_rs_files(build) { Ok(Some(files)) => { <ins> if files.len() <= 10 { for file in &files { println!("formatting modified file {file}"); } } else { println!("formatting {} modified files", files.len()); } </ins> for file in files { <del> println!("formatting modified file {file}"); </del> ignore_fmt.add(&format!("/{file}")).expect(&file); } }
sections[None] = [] section_order = [None] targets = {} <ins> top_level_keys = [] </ins> for line in open(rust_dir + '/config.toml.example').read().split("n"): <ins> if cur_section == None: if line.count('=') == 1: top_level_key = line.split('=')[0] top_level_key = top_level_key.strip(' #') top_level_keys.append(top_level_key) </ins> if line.startswith('['): cur_section = line[1:-1] if cur_section.startswith('target'):
raise RuntimeError("failed to find config line for {}".format(key)) <del> for section_key in config: section_config = config[section_key] if section_key not in sections: raise RuntimeError("config key {} not in sections".format(section_key)) </del> <ins> def configure_top_level_key(lines, top_level_key, value): for i, line in enumerate(lines): if line.startswith('#' + top_level_key + ' = ') or line.startswith(top_level_key + ' = '): lines[i] = "{} = {}".format(top_level_key, value) return </ins> <del> if section_key == 'target': </del> <ins> raise RuntimeError("failed to find config line for {}".format(top_level_key)) for section_key, section_config in config.items(): if section_key not in sections and section_key not in top_level_keys: raise RuntimeError("config key {} not in sections or top_level_keys".format(section_key)) if section_key in top_level_keys: configure_top_level_key(sections[None], section_key, section_config) elif  section_key == 'target': </ins> for target in section_config: configure_section(targets[target], section_config[target]) else:
use crate::ffi::CStr; use crate::mem; <del> use crate::os::raw::{c_char, c_int, c_long, c_longlong, c_uint, c_ulong, c_ushort}; </del> <ins> use crate::os::raw::{c_char, c_long, c_longlong, c_uint, c_ulong, c_ushort}; </ins> use crate::os::windows::io::{BorrowedHandle, HandleOrInvalid, HandleOrNull}; use crate::ptr; use core::ffi::NonZero_c_ulong; use libc::{c_void, size_t, wchar_t}; <ins> pub use crate::os::raw::c_int; </ins> #[path = "c/errors.rs"] // c.rs is included from two places so we need to specify this mod errors; pub use errors::*;
pub type LPBOOL = *mut BOOL; pub type LPBYTE = *mut BYTE; <ins> pub type LPCCH = *const CHAR; </ins> pub type LPCSTR = *const CHAR; <ins> pub type LPCWCH = *const WCHAR; </ins> pub type LPCWSTR = *const WCHAR; <ins> pub type LPCVOID = *const c_void; </ins> pub type LPDWORD = *mut DWORD; pub type LPHANDLE = *mut HANDLE; pub type LPOVERLAPPED = *mut OVERLAPPED; pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION; pub type LPSECURITY_ATTRIBUTES = *mut SECURITY_ATTRIBUTES; pub type LPSTARTUPINFO = *mut STARTUPINFO; <ins> pub type LPSTR = *mut CHAR; </ins> pub type LPVOID = *mut c_void; <del> pub type LPCVOID = *const c_void; </del> pub type LPWCH = *mut WCHAR; pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW; pub type LPWSADATA = *mut WSADATA;
pub const FILE_TYPE_PIPE: u32 = 3; <ins> pub const CP_UTF8: DWORD = 65001; pub const MB_ERR_INVALID_CHARS: DWORD = 0x08; pub const WC_ERR_INVALID_CHARS: DWORD = 0x80; </ins> #[repr(C)] #[derive(Copy)] pub struct WIN32_FIND_DATAW {
lpFilePart: *mut LPWSTR, ) -> DWORD; pub fn GetFileAttributesW(lpFileName: LPCWSTR) -> DWORD; <ins> pub fn MultiByteToWideChar( CodePage: UINT, dwFlags: DWORD, lpMultiByteStr: LPCCH, cbMultiByte: c_int, lpWideCharStr: LPWSTR, cchWideChar: c_int, ) -> c_int; pub fn WideCharToMultiByte( CodePage: UINT, dwFlags: DWORD, lpWideCharStr: LPCWCH, cchWideChar: c_int, lpMultiByteStr: LPSTR, cbMultiByte: c_int, lpDefaultChar: LPCCH, lpUsedDefaultChar: LPBOOL, ) -> c_int; </ins> } #[link(name = "ws2_32")]
} fn write_valid_utf8_to_console(handle: c::HANDLE, utf8: &str) -> io::Result<usize> { <ins> debug_assert!(!utf8.is_empty()); </ins> let mut utf16 = [MaybeUninit::<u16>::uninit(); MAX_BUFFER_SIZE / 2]; <del> let mut len_utf16 = 0; for (chr, dest) in utf8.encode_utf16().zip(utf16.iter_mut()) { *dest = MaybeUninit::new(chr); len_utf16 += 1; } // Safety: We've initialized `len_utf16` values. let utf16: &[u16] = unsafe { MaybeUninit::slice_assume_init_ref(&utf16[..len_utf16]) }; </del> <ins> let utf8 = &utf8[..utf8.floor_char_boundary(utf16.len())]; let utf16: &[u16] = unsafe { // Note that this theoretically checks validity twice in the (most common) case // where the underlying byte sequence is valid utf-8 (given the check in `write()`). let result = c::MultiByteToWideChar( c::CP_UTF8,                      // CodePage c::MB_ERR_INVALID_CHARS,         // dwFlags utf8.as_ptr() as c::LPCCH,       // lpMultiByteStr utf8.len() as c::c_int,          // cbMultiByte utf16.as_mut_ptr() as c::LPWSTR, // lpWideCharStr utf16.len() as c::c_int,         // cchWideChar ); assert!(result != 0, "Unexpected error in MultiByteToWideChar"); // Safety: MultiByteToWideChar initializes `result` values. MaybeUninit::slice_assume_init_ref(&utf16[..result as usize]) }; </ins> let mut written = write_u16s(handle, &utf16)?;
// a missing surrogate can be produced (and also because of the UTF-8 validation above), // write the missing surrogate out now. // Buffering it would mean we have to lie about the number of bytes written. <del> let first_char_remaining = utf16[written]; if first_char_remaining >= 0xDCEE && first_char_remaining <= 0xDFFF { </del> <ins> let first_code_unit_remaining = utf16[written]; if first_code_unit_remaining >= 0xDCEE && first_code_unit_remaining <= 0xDFFF { </ins> // low surrogate // We just hope this works, and give up otherwise let _ = write_u16s(handle, &utf16[written..written + 1]);
Ok(amount as usize) } <del> #[allow(unused)] </del> fn utf16_to_utf8(utf16: &[u16], utf8: &mut [u8]) -> io::Result<usize> { <del> let mut written = 0; for chr in char::decode_utf16(utf16.iter().cloned()) { match chr { Ok(chr) => { chr.encode_utf8(&mut utf8[written..]); written += chr.len_utf8(); } Err(_) => { // We can't really do any better than forget all data and return an error. return Err(io::const_io_error!( io::ErrorKind::InvalidData, "Windows stdin in console mode does not support non-UTF-16 input;  encountered unpaired surrogate", )); } } </del> <ins> debug_assert!(utf16.len() <= c::c_int::MAX as usize); debug_assert!(utf8.len() <= c::c_int::MAX as usize); let result = unsafe { c::WideCharToMultiByte( c::CP_UTF8,                    // CodePage c::WC_ERR_INVALID_CHARS,       // dwFlags utf16.as_ptr(),                // lpWideCharStr utf16.len() as c::c_int,       // cchWideChar utf8.as_mut_ptr() as c::LPSTR, // lpMultiByteStr utf8.len() as c::c_int,        // cbMultiByte ptr::null(),                   // lpDefaultChar ptr::null_mut(),               // lpUsedDefaultChar ) }; if result == 0 { // We can't really do any better than forget all data and return an error. Err(io::const_io_error!( io::ErrorKind::InvalidData, "Windows stdin in console mode does not support non-UTF-16 input;  encountered unpaired surrogate", )) } else { Ok(result as usize) </ins> } <del> Ok(written) </del> } impl IncompleteUtf8 {
invalid monomorphization of `{$name}` intrinsic: unsupported {$name} from `{$in_ty}` with element `{$elem_ty}` to `{$ret_ty}` codegen_gcc_invalid_monomorphization_invalid_bitmask = <del> invalid monomorphization of `{$name}` intrinsic: invalid bitmask `{ty}`, expected `u{$expected_int_bits}` or `[u8; {$expected_bytes}]` </del> <ins> invalid monomorphization of `{$name}` intrinsic: invalid bitmask `{$ty}`, expected `u{$expected_int_bits}` or `[u8; {$expected_bytes}]` </ins> codegen_gcc_invalid_monomorphization_simd_shuffle = invalid monomorphization of `{$name}` intrinsic: simd_shuffle index must be an array of `u32`, got `{$ty}`
codegen_ssa_unsupported_arch = unsupported arch `{$arch}` for os `{$os}` <del> codegen_ssa_apple_sdk_error_sdk_path = failed to get {$sdk_name} SDK path: {error} </del> <ins> codegen_ssa_apple_sdk_error_sdk_path = failed to get {$sdk_name} SDK path: {$error} </ins> <del> codegen_ssa_read_file = failed to read file: {message} </del> <ins> codegen_ssa_read_file = failed to read file: {$message} </ins> codegen_ssa_unsupported_link_self_contained = option `-C link-self-contained` is not supported on this target
}; use fluent_bundle::{FluentBundle, FluentError, FluentResource}; use fluent_syntax::{ <del> ast::{Attribute, Entry, Identifier, Message}, </del> <ins> ast::{ Attribute, Entry, Expression, Identifier, InlineExpression, Message, Pattern, PatternElement, }, </ins> parser::ParserError, }; use proc_macro::{Diagnostic, Level, Span};
}; let mut constants = TokenStream::new(); <ins> let mut messagerefs = Vec::new(); </ins> for entry in resource.entries() { let span = res.krate.span(); <del> if let Entry::Message(Message { id: Identifier { name }, attributes, .. }) = entry { </del> <ins> if let Entry::Message(Message { id: Identifier { name }, attributes, value, .. }) = entry { </ins> let _ = previous_defns.entry(name.to_string()).or_insert(path_span); if name.contains('-') {
.emit(); } <ins> if let Some(Pattern { elements }) = value { for elt in elements { if let PatternElement::Placeable { expression: Expression::Inline(InlineExpression::MessageReference { id, .. }), } = elt { messagerefs.push((id.name, *name)); } } } </ins> // Require that the message name starts with the crate name // `hir_typeck_foo_bar` (in `hir_typeck.ftl`) // `const_eval_baz` (in `const_eval.ftl`)
} } <ins> for (mref, name) in messagerefs.into_iter() { if !previous_defns.contains_key(mref) { Diagnostic::spanned( path_span, Level::Error, format!("referenced message `{mref}` does not exist (in message `{name}`)"), ) .help(&format!("you may have meant to use a variable reference (`{{${mref}}}`)")) .emit(); } } </ins> if let Err(errs) = bundle.add_resource(resource) { for e in errs { match e {
| = help: replace any '-'s with '_'s <del> error: aborting due to 10 previous errors </del> <ins> error: referenced message `message` does not exist (in message `missing_message_ref`) --> $DIR/test.rs:104:20 | LL |         missing => "./missing-message-ref.ftl" |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: you may have meant to use a variable reference (`{$message}`) error: aborting due to 11 previous errors </ins> For more information about this error, try `rustc --explain E0428`.
"{place_name} {partially_str}moved due to this method call{loop_message}", ), ); let infcx = tcx.infer_ctxt().build(); <ins> // Erase and shadow everything that could be passed to the new infcx. </ins> let ty = tcx.erase_regions(moved_place.ty(self.body, tcx).ty); <ins> let method_substs = tcx.erase_regions(method_substs); </ins> if let ty::Adt(def, substs) = ty.kind() && Some(def.did()) == tcx.lang_items().pin_type() && let ty::Ref(_, _, hir::Mutability::Mut) = substs.type_at(0).kind()
<ins> error[E0382]: use of moved value: `r` --> $DIR/pin-mut-reborrow-infer-var-issue-107419.rs:10:9 | LL |     let mut r = Pin::new(&mut uwu); |         ----- move occurs because `r` has type `Pin<&mut ()>`, which does not implement the `Copy` trait LL |     foo(r.get_mut()); |           --------- `r` moved due to this method call LL |     foo(r.get_mut()); |         ^ value used here after move | note: `Pin::<&'a mut T>::get_mut` takes ownership of the receiver `self`, which moves `r` --> $SRC_DIR/core/src/pin.rs:LL:COL help: consider reborrowing the `Pin` instead of moving it | LL |     foo(r.as_mut().get_mut()); |           +++++++++ error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. </ins>