diff --git a/Cargo.lock b/Cargo.lock index 094a738b4160f..39688b7b7ea7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -255,7 +255,7 @@ checksum = "81a18687293a1546b67c246452202bbbf143d239cb43494cc163da14979082da" [[package]] name = "cargo" -version = "0.56.0" +version = "0.57.0" dependencies = [ "anyhow", "atty", @@ -388,7 +388,7 @@ dependencies = [ [[package]] name = "cargo-util" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "core-foundation", diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index c89d42ecc58ac..8d7e9612f4749 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -47,8 +47,6 @@ const AARCH64_ALLOWED_FEATURES: &[(&str, Option)] = &[ ("sve", Some(sym::aarch64_target_feature)), // FEAT_CRC ("crc", Some(sym::aarch64_target_feature)), - // Cryptographic extension - ("crypto", Some(sym::aarch64_target_feature)), // FEAT_RAS ("ras", Some(sym::aarch64_target_feature)), // FEAT_LSE diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 87272b1605b79..050f3ae583371 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -954,7 +954,6 @@ impl EmitterWriter { // | for pos in 0..=line_len { draw_col_separator(buffer, line_offset + pos + 1, width_offset - 2); - buffer.putc(line_offset + pos + 1, width_offset - 2, '|', Style::LineNumber); } // Write the horizontal lines for multiline annotations @@ -1344,7 +1343,11 @@ impl EmitterWriter { let buffer_msg_line_offset = buffer.num_lines(); // Add spacing line - draw_col_separator(&mut buffer, buffer_msg_line_offset, max_line_num_len + 1); + draw_col_separator_no_space( + &mut buffer, + buffer_msg_line_offset, + max_line_num_len + 1, + ); // Then, the secondary file indicator buffer.prepend(buffer_msg_line_offset + 1, "::: ", Style::LineNumber); diff --git a/compiler/rustc_expand/src/proc_macro_server.rs b/compiler/rustc_expand/src/proc_macro_server.rs index 47cc2ecb4bfdd..42ae8e972c274 100644 --- a/compiler/rustc_expand/src/proc_macro_server.rs +++ b/compiler/rustc_expand/src/proc_macro_server.rs @@ -582,6 +582,9 @@ impl server::Literal for Rustc<'_> { Ok(Literal { lit, span: self.call_site }) } + fn to_string(&mut self, literal: &Self::Literal) -> String { + literal.lit.to_string() + } fn debug_kind(&mut self, literal: &Self::Literal) -> String { format!("{:?}", literal.lit.kind) } diff --git a/compiler/rustc_mir/src/interpret/operand.rs b/compiler/rustc_mir/src/interpret/operand.rs index d5bc2b1e2eacb..baef2a5a52c78 100644 --- a/compiler/rustc_mir/src/interpret/operand.rs +++ b/compiler/rustc_mir/src/interpret/operand.rs @@ -599,7 +599,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { let ptr = self.global_base_pointer(Pointer::new(id, offset))?; Operand::Indirect(MemPlace::from_ptr(ptr.into(), layout.align.abi)) } - ConstValue::Scalar(x) => Operand::Immediate(tag_scalar(x.into())?.into()), + ConstValue::Scalar(x) => Operand::Immediate(tag_scalar(x)?.into()), ConstValue::Slice { data, start, end } => { // We rely on mutability being set correctly in `data` to prevent writes // where none should happen. diff --git a/compiler/rustc_mir/src/interpret/terminator.rs b/compiler/rustc_mir/src/interpret/terminator.rs index f369480d959fe..35ae07e25cada 100644 --- a/compiler/rustc_mir/src/interpret/terminator.rs +++ b/compiler/rustc_mir/src/interpret/terminator.rs @@ -73,7 +73,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { ty::FnPtr(sig) => { let caller_abi = sig.abi(); let fn_ptr = self.read_pointer(&func)?; - let fn_val = self.memory.get_fn(fn_ptr.into())?; + let fn_val = self.memory.get_fn(fn_ptr)?; ( fn_val, caller_abi, diff --git a/compiler/rustc_mir/src/transform/simplify_comparison_integral.rs b/compiler/rustc_mir/src/transform/simplify_comparison_integral.rs index 1ddf7c9cd0c9e..948fcd9f4550f 100644 --- a/compiler/rustc_mir/src/transform/simplify_comparison_integral.rs +++ b/compiler/rustc_mir/src/transform/simplify_comparison_integral.rs @@ -211,7 +211,7 @@ fn find_branch_value_info<'tcx>( return None; }; let branch_value_scalar = branch_value.literal.try_to_scalar()?; - Some((branch_value_scalar.into(), branch_value_ty, *to_switch_on)) + Some((branch_value_scalar, branch_value_ty, *to_switch_on)) } _ => None, } diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 6c43d6d62128e..9788404dd05bf 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -847,7 +847,7 @@ fn from_str_radix(src: &str, radix: u32) -> Result= 2 && radix <= 36, + (2..=36).contains(&radix), "from_str_radix_int: must lie in the range `[2, 36]` - found {}", radix ); diff --git a/library/core/src/stream/from_iter.rs b/library/core/src/stream/from_iter.rs new file mode 100644 index 0000000000000..eb9a0fd284257 --- /dev/null +++ b/library/core/src/stream/from_iter.rs @@ -0,0 +1,38 @@ +use crate::pin::Pin; + +use crate::stream::Stream; +use crate::task::{Context, Poll}; + +/// A stream that was created from iterator. +/// +/// This stream is created by the [`from_iter`] function. +/// See it documentation for more. +/// +/// [`from_iter`]: fn.from_iter.html +#[unstable(feature = "stream_from_iter", issue = "81798")] +#[derive(Clone, Debug)] +pub struct FromIter { + iter: I, +} + +#[unstable(feature = "stream_from_iter", issue = "81798")] +impl Unpin for FromIter {} + +/// Converts an iterator into a stream. +#[unstable(feature = "stream_from_iter", issue = "81798")] +pub fn from_iter(iter: I) -> FromIter { + FromIter { iter: iter.into_iter() } +} + +#[unstable(feature = "stream_from_iter", issue = "81798")] +impl Stream for FromIter { + type Item = I::Item; + + fn poll_next(mut self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll> { + Poll::Ready(self.iter.next()) + } + + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} diff --git a/library/core/src/stream/mod.rs b/library/core/src/stream/mod.rs index 0df18af65ebf0..58dc8e1e5e606 100644 --- a/library/core/src/stream/mod.rs +++ b/library/core/src/stream/mod.rs @@ -122,6 +122,8 @@ //! warning: unused result that must be used: streams do nothing unless polled //! ``` +mod from_iter; mod stream; +pub use from_iter::{from_iter, FromIter}; pub use stream::Stream; diff --git a/library/proc_macro/src/bridge/mod.rs b/library/proc_macro/src/bridge/mod.rs index b968d44fe488d..7001e827ad845 100644 --- a/library/proc_macro/src/bridge/mod.rs +++ b/library/proc_macro/src/bridge/mod.rs @@ -109,6 +109,7 @@ macro_rules! with_api { fn drop($self: $S::Literal); fn clone($self: &$S::Literal) -> $S::Literal; fn from_str(s: &str) -> Result<$S::Literal, ()>; + fn to_string($self: &$S::Literal) -> String; fn debug_kind($self: &$S::Literal) -> String; fn symbol($self: &$S::Literal) -> String; fn suffix($self: &$S::Literal) -> Option; diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 8138c3882fc14..46f564199d0c2 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -1195,7 +1195,7 @@ impl FromStr for Literal { #[stable(feature = "proc_macro_lib", since = "1.15.0")] impl ToString for Literal { fn to_string(&self) -> String { - TokenStream::from(TokenTree::from(self.clone())).to_string() + self.0.to_string() } } diff --git a/library/std/tests/run-time-detect.rs b/library/std/tests/run-time-detect.rs index c7107b5d0a3ef..079f00a5753f1 100644 --- a/library/std/tests/run-time-detect.rs +++ b/library/std/tests/run-time-detect.rs @@ -16,22 +16,56 @@ fn arm_linux() { println!("neon: {}", is_arm_feature_detected!("neon")); println!("pmull: {}", is_arm_feature_detected!("pmull")); + println!("crypto: {}", is_arm_feature_detected!("crypto")); + println!("crc: {}", is_arm_feature_detected!("crc")); + println!("aes: {}", is_arm_feature_detected!("aes")); + println!("sha2: {}", is_arm_feature_detected!("sha2")); } #[test] #[cfg(all(target_arch = "aarch64", any(target_os = "linux", target_os = "android")))] fn aarch64_linux() { - println!("fp: {}", is_aarch64_feature_detected!("fp")); - println!("fp16: {}", is_aarch64_feature_detected!("fp16")); println!("neon: {}", is_aarch64_feature_detected!("neon")); println!("asimd: {}", is_aarch64_feature_detected!("asimd")); + println!("pmull: {}", is_aarch64_feature_detected!("pmull")); + println!("fp: {}", is_aarch64_feature_detected!("fp")); + println!("fp16: {}", is_aarch64_feature_detected!("fp16")); println!("sve: {}", is_aarch64_feature_detected!("sve")); println!("crc: {}", is_aarch64_feature_detected!("crc")); println!("lse: {}", is_aarch64_feature_detected!("lse")); + println!("lse2: {}", is_aarch64_feature_detected!("lse2")); println!("rdm: {}", is_aarch64_feature_detected!("rdm")); println!("rcpc: {}", is_aarch64_feature_detected!("rcpc")); + println!("rcpc2: {}", is_aarch64_feature_detected!("rcpc2")); println!("dotprod: {}", is_aarch64_feature_detected!("dotprod")); println!("tme: {}", is_aarch64_feature_detected!("tme")); + println!("fhm: {}", is_aarch64_feature_detected!("fhm")); + println!("dit: {}", is_aarch64_feature_detected!("dit")); + println!("flagm: {}", is_aarch64_feature_detected!("flagm")); + println!("ssbs: {}", is_aarch64_feature_detected!("ssbs")); + println!("sb: {}", is_aarch64_feature_detected!("sb")); + println!("pauth: {}", is_aarch64_feature_detected!("pauth")); + println!("dpb: {}", is_aarch64_feature_detected!("dpb")); + println!("dpb2: {}", is_aarch64_feature_detected!("dpb2")); + println!("sve2: {}", is_aarch64_feature_detected!("sve2")); + println!("sve2-aes: {}", is_aarch64_feature_detected!("sve2-aes")); + println!("sve2-sm4: {}", is_aarch64_feature_detected!("sve2-sm4")); + println!("sve2-sha3: {}", is_aarch64_feature_detected!("sve2-sha3")); + println!("sve2-bitperm: {}", is_aarch64_feature_detected!("sve2-bitperm")); + println!("frintts: {}", is_aarch64_feature_detected!("frintts")); + println!("i8mm: {}", is_aarch64_feature_detected!("i8mm")); + println!("f32mm: {}", is_aarch64_feature_detected!("f32mm")); + println!("f64mm: {}", is_aarch64_feature_detected!("f64mm")); + println!("bf16: {}", is_aarch64_feature_detected!("bf16")); + println!("rand: {}", is_aarch64_feature_detected!("rand")); + println!("bti: {}", is_aarch64_feature_detected!("bti")); + println!("mte: {}", is_aarch64_feature_detected!("mte")); + println!("jsconv: {}", is_aarch64_feature_detected!("jsconv")); + println!("fcma: {}", is_aarch64_feature_detected!("fcma")); + println!("aes: {}", is_aarch64_feature_detected!("aes")); + println!("sha2: {}", is_aarch64_feature_detected!("sha2")); + println!("sha3: {}", is_aarch64_feature_detected!("sha3")); + println!("sm4: {}", is_aarch64_feature_detected!("sm4")); } #[test] diff --git a/library/stdarch b/library/stdarch index 3001c75a1d2a8..c158cfd38e20d 160000 --- a/library/stdarch +++ b/library/stdarch @@ -1 +1 @@ -Subproject commit 3001c75a1d2a81d2a76bef139c69387cb2ebb820 +Subproject commit c158cfd38e20d855f5d6ca8a5a101eefb82604a8 diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 75ea30bb565f1..b3fc1e73f7885 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -675,11 +675,10 @@ impl<'a, 'tcx> Clean for (&'a ty::Generics, ty::GenericPredicates<'tcx if let Some(((_, trait_did, name), rhs)) = proj.as_ref().and_then(|(lhs, rhs)| Some((lhs.projection()?, rhs))) { - impl_trait_proj.entry(param_idx).or_default().push(( - trait_did.into(), - name, - rhs, - )); + impl_trait_proj + .entry(param_idx) + .or_default() + .push((trait_did, name, rhs)); } return None; diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 2460fa127f116..5c73d3de5b93f 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -1614,7 +1614,7 @@ impl Type { impl Type { fn inner_def_id(&self, cache: Option<&Cache>) -> Option { let t: PrimitiveType = match *self { - ResolvedPath { did, .. } => return Some(did.into()), + ResolvedPath { did, .. } => return Some(did), DynTrait(ref bounds, _) => return bounds[0].trait_.inner_def_id(cache), Primitive(p) => return cache.and_then(|c| c.primitive_locations.get(&p).cloned()), BorrowedRef { type_: box Generic(..), .. } => PrimitiveType::Reference, diff --git a/src/librustdoc/formats/cache.rs b/src/librustdoc/formats/cache.rs index 5ea2cdc2ad909..3d267ca50334d 100644 --- a/src/librustdoc/formats/cache.rs +++ b/src/librustdoc/formats/cache.rs @@ -228,7 +228,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> { if i.blanket_impl.is_none() { self.cache .implementors - .entry(did.into()) + .entry(did) .or_default() .push(Impl { impl_item: item.clone() }); } diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 0291236abdfa6..8ab6aa775d2e4 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -688,7 +688,7 @@ crate fn anchor<'a, 'cx: 'a>( text: &'a str, cx: &'cx Context<'_>, ) -> impl fmt::Display + 'a { - let parts = href(did.into(), cx); + let parts = href(did, cx); display_fn(move |f| { if let Ok((url, short_ty, fqp)) = parts { write!( @@ -921,7 +921,7 @@ fn fmt_type<'cx>( // everything comes in as a fully resolved QPath (hard to // look at). box clean::ResolvedPath { did, .. } => { - match href(did.into(), cx) { + match href(did, cx) { Ok((ref url, _, ref path)) if !f.alternate() => { write!( f, diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs index 0734d2670ccfa..1c083522beaa9 100644 --- a/src/librustdoc/html/render/cache.rs +++ b/src/librustdoc/html/render/cache.rs @@ -42,7 +42,7 @@ crate fn build_index<'tcx>(krate: &clean::Crate, cache: &mut Cache, tcx: TyCtxt< name: item.name.unwrap().to_string(), path: fqp[..fqp.len() - 1].join("::"), desc, - parent: Some(did.into()), + parent: Some(did), parent_idx: None, search_type: get_index_search_type(&item, tcx), aliases: item.attrs.get_doc_aliases(), diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 94a902a2d0522..4411b7771eda7 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -175,9 +175,45 @@ pub(super) fn write_shared( cx.write_shared(SharedResource::InvocationSpecific { basename: p }, content, &options.emit) }; + fn add_background_image_to_css( + cx: &Context<'_>, + css: &mut String, + rule: &str, + file: &'static str, + ) { + css.push_str(&format!( + "{} {{ background-image: url({}); }}", + rule, + SharedResource::ToolchainSpecific { basename: file } + .path(cx) + .file_name() + .unwrap() + .to_str() + .unwrap() + )) + } + + // Add all the static files. These may already exist, but we just + // overwrite them anyway to make sure that they're fresh and up-to-date. + let mut rustdoc_css = static_files::RUSTDOC_CSS.to_owned(); + add_background_image_to_css( + cx, + &mut rustdoc_css, + "details.undocumented[open] > summary::before, \ + details.rustdoc-toggle[open] > summary::before, \ + details.rustdoc-toggle[open] > summary.hideme::before", + "toggle-minus.svg", + ); + add_background_image_to_css( + cx, + &mut rustdoc_css, + "details.undocumented > summary::before, details.rustdoc-toggle > summary::before", + "toggle-plus.svg", + ); + write_minify("rustdoc.css", &rustdoc_css)?; + // Add all the static files. These may already exist, but we just // overwrite them anyway to make sure that they're fresh and up-to-date. - write_minify("rustdoc.css", static_files::RUSTDOC_CSS)?; write_minify("settings.css", static_files::SETTINGS_CSS)?; write_minify("noscript.css", static_files::NOSCRIPT_CSS)?; @@ -217,6 +253,8 @@ pub(super) fn write_shared( write_toolchain("wheel.svg", static_files::WHEEL_SVG)?; write_toolchain("clipboard.svg", static_files::CLIPBOARD_SVG)?; write_toolchain("down-arrow.svg", static_files::DOWN_ARROW_SVG)?; + write_toolchain("toggle-minus.svg", static_files::TOGGLE_MINUS_PNG)?; + write_toolchain("toggle-plus.svg", static_files::TOGGLE_PLUS_PNG)?; let mut themes: Vec<&String> = themes.iter().collect(); themes.sort(); diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 91243a4086ced..4e33eab565006 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1508,11 +1508,35 @@ details.rustdoc-toggle > summary.hideme > span { } details.rustdoc-toggle > summary::before { - content: "[+]"; - font-weight: 300; - font-size: 0.8em; - letter-spacing: 1px; + content: ""; cursor: pointer; + width: 17px; + height: max(17px, 1.1em); + background-repeat: no-repeat; + background-position: top left; + display: inline-block; + vertical-align: middle; + opacity: .5; +} + +/* Screen readers see the text version at the end the line. + Visual readers see the icon at the start of the line, but small and transparent. */ +details.rustdoc-toggle > summary::after { + content: "Expand"; + overflow: hidden; + width: 0; + height: 0; + position: absolute; +} + +details.rustdoc-toggle > summary.hideme::after { + /* "hideme" toggles already have a description when they're contracted */ + content: ""; +} + +details.rustdoc-toggle > summary:focus::before, +details.rustdoc-toggle > summary:hover::before { + opacity: 1; } details.rustdoc-toggle.top-doc > summary, @@ -1560,20 +1584,44 @@ details.rustdoc-toggle[open] > summary.hideme > span { display: none; } -details.rustdoc-toggle[open] > summary::before { - content: "[−]"; - display: inline; +details.rustdoc-toggle[open] > summary::before, +details.rustdoc-toggle[open] > summary.hideme::before { + width: 17px; + height: max(17px, 1.1em); + background-repeat: no-repeat; + background-position: top left; + display: inline-block; + content: ""; +} + +details.rustdoc-toggle[open] > summary::after, +details.rustdoc-toggle[open] > summary.hideme::after { + content: "Collapse"; } details.undocumented > summary::before { - content: "[+] Show hidden undocumented items"; + padding-left: 17px; + height: max(17px, 1.1em); + background-repeat: no-repeat; + background-position: top left; + content: "Show hidden undocumented items"; cursor: pointer; font-size: 16px; font-weight: 300; + opacity: .5; +} + +details.undocumented > summary:focus::before, +details.undocumented > summary:hover::before { + opacity: 1; } details.undocumented[open] > summary::before { - content: "[−] Hide undocumented items"; + padding-left: 17px; + height: max(17px, 1.1em); + background-repeat: no-repeat + background-position: top left; + content: "Hide undocumented items"; } /* Media Queries */ diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css index df386fb66a33f..849924ea5501e 100644 --- a/src/librustdoc/html/static/css/themes/ayu.css +++ b/src/librustdoc/html/static/css/themes/ayu.css @@ -229,6 +229,11 @@ details.undocumented > summary::before { color: #999; } +details.rustdoc-toggle > summary::before, +details.undocumented > summary::before { + filter: invert(100%); +} + #crate-search { color: #c5c5c5; background-color: #141920; diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css index c8a5dbdc66aaf..c26122e4bffb5 100644 --- a/src/librustdoc/html/static/css/themes/dark.css +++ b/src/librustdoc/html/static/css/themes/dark.css @@ -194,6 +194,11 @@ details.undocumented > summary::before { color: #999; } +details.rustdoc-toggle > summary::before, +details.undocumented > summary::before { + filter: invert(100%); +} + #crate-search { color: #111; background-color: #f0f0f0; diff --git a/src/librustdoc/html/static/images/toggle-minus.svg b/src/librustdoc/html/static/images/toggle-minus.svg new file mode 100644 index 0000000000000..73154788a0e8e --- /dev/null +++ b/src/librustdoc/html/static/images/toggle-minus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/librustdoc/html/static/images/toggle-plus.svg b/src/librustdoc/html/static/images/toggle-plus.svg new file mode 100644 index 0000000000000..08b17033e164b --- /dev/null +++ b/src/librustdoc/html/static/images/toggle-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs index 2ec7e66234ddd..6f3d08ea65569 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -47,6 +47,12 @@ crate static CLIPBOARD_SVG: &[u8] = include_bytes!("static/images/clipboard.svg" /// The file contents of `down-arrow.svg`, the icon used for the crate choice combobox. crate static DOWN_ARROW_SVG: &[u8] = include_bytes!("static/images/down-arrow.svg"); +/// The file contents of `toggle-minus.svg`, the icon used for opened toggles. +crate static TOGGLE_MINUS_PNG: &[u8] = include_bytes!("static/images/toggle-minus.svg"); + +/// The file contents of `toggle-plus.svg`, the icon used for closed toggles. +crate static TOGGLE_PLUS_PNG: &[u8] = include_bytes!("static/images/toggle-plus.svg"); + /// The contents of `COPYRIGHT.txt`, the license listing for files distributed with documentation /// output. crate static COPYRIGHT: &[u8] = include_bytes!("static/COPYRIGHT.txt"); diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index ddb7b85d34a04..b36be9541d2b3 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -293,7 +293,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { ) -> Result<(Res, Option), ErrorKind<'path>> { let tcx = self.cx.tcx; let no_res = || ResolutionFailure::NotResolved { - module_id: module_id.into(), + module_id: module_id, partial_res: None, unresolved: path_str.into(), }; @@ -521,7 +521,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { // but the disambiguator logic expects the associated item. // Store the kind in a side channel so that only the disambiguator logic looks at it. if let Some((kind, id)) = side_channel { - self.kind_side_channel.set(Some((kind, id.into()))); + self.kind_side_channel.set(Some((kind, id))); } Ok((res, Some(fragment))) }; @@ -1268,7 +1268,7 @@ impl LinkCollector<'_, '_> { // doesn't allow statements like `use str::trim;`, making this a (hopefully) // valid omission. See https://github.com/rust-lang/rust/pull/80660#discussion_r551585677 // for discussion on the matter. - verify(kind, id.into())?; + verify(kind, id)?; // FIXME: it would be nice to check that the feature gate was enabled in the original crate, not just ignore it altogether. // However I'm not sure how to check that across crates. @@ -1306,9 +1306,9 @@ impl LinkCollector<'_, '_> { Some(ItemLink { link: ori_link.link, link_text, did: None, fragment }) } Res::Def(kind, id) => { - verify(kind, id.into())?; + verify(kind, id)?; let id = clean::register_res(self.cx, rustc_hir::def::Res::Def(kind, id)); - Some(ItemLink { link: ori_link.link, link_text, did: Some(id.into()), fragment }) + Some(ItemLink { link: ori_link.link, link_text, did: Some(id), fragment }) } } } @@ -1886,7 +1886,7 @@ fn resolution_failure( name = start; for ns in [TypeNS, ValueNS, MacroNS] { if let Some(res) = - collector.check_full_res(ns, &start, module_id.into(), &None) + collector.check_full_res(ns, &start, module_id, &None) { debug!("found partial_res={:?}", res); *partial_res = Some(res); diff --git a/src/librustdoc/passes/collect_trait_impls.rs b/src/librustdoc/passes/collect_trait_impls.rs index 91c495a2bbc06..eefe50caa345e 100644 --- a/src/librustdoc/passes/collect_trait_impls.rs +++ b/src/librustdoc/passes/collect_trait_impls.rs @@ -45,7 +45,7 @@ crate fn collect_trait_impls(krate: Crate, cx: &mut DocContext<'_>) -> Crate { // FIXME(eddyb) is this `doc(hidden)` check needed? if !cx.tcx.get_attrs(def_id).lists(sym::doc).has_word(sym::hidden) { - let impls = get_auto_trait_and_blanket_impls(cx, def_id.into()); + let impls = get_auto_trait_and_blanket_impls(cx, def_id); new_items.extend(impls.filter(|i| cx.inlined.insert(i.def_id))); } }); diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index d74b3b4627284..e28910355357b 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -192,7 +192,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { } else { // All items need to be handled here in case someone wishes to link // to them with intra-doc links - self.cx.cache.access_levels.map.insert(did.into(), AccessLevel::Public); + self.cx.cache.access_levels.map.insert(did, AccessLevel::Public); } } } @@ -204,7 +204,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { None => return false, }; - let is_private = !self.cx.cache.access_levels.is_public(res_did.into()); + let is_private = !self.cx.cache.access_levels.is_public(res_did); let is_hidden = inherits_doc_hidden(self.cx.tcx, res_hir_id); // Only inline if requested or if the item would otherwise be stripped. diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr index a5ebb80c83620..bf18eee4e07ed 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr @@ -3,7 +3,7 @@ error[E0277]: `<::C as Iterator>::Item` cannot be sent between th | LL | type C: Clone + Iterator Lam<&'a u8, App: Debug>> + Sync>; | ^^^^ `<::C as Iterator>::Item` cannot be sent between threads safely - | + | ::: $SRC_DIR/core/src/marker.rs:LL:COL | LL | pub unsafe auto trait Send { @@ -20,7 +20,7 @@ error[E0277]: `<::C as Iterator>::Item` is not an iterator | LL | type C: Clone + Iterator Lam<&'a u8, App: Debug>> + Sync>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<::C as Iterator>::Item` is not an iterator - | + | ::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | LL | pub trait Iterator { @@ -37,7 +37,7 @@ error[E0277]: `<::C as Iterator>::Item` cannot be shared between | LL | type C: Clone + Iterator Lam<&'a u8, App: Debug>> + Sync>; | ^^^^ `<::C as Iterator>::Item` cannot be shared between threads safely - | + | ::: $SRC_DIR/core/src/marker.rs:LL:COL | LL | pub unsafe auto trait Sync { diff --git a/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr index 919b18632e61c..46d472cdf80db 100644 --- a/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr @@ -3,7 +3,7 @@ error[E0277]: `<::A as Iterator>::Item` doesn't implement `Debug` | LL | type A: Iterator; | ^^^^^ `<::A as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | + | ::: $SRC_DIR/core/src/fmt/mod.rs:LL:COL | LL | pub trait Debug { @@ -20,7 +20,7 @@ error[E0277]: the trait bound `<::Out as Baz>::Assoc: Default` is n | LL | pub trait Foo { type Out: Baz; } | ^^^^^^^ the trait `Default` is not implemented for `<::Out as Baz>::Assoc` - | + | ::: $SRC_DIR/core/src/default.rs:LL:COL | LL | pub trait Default: Sized { diff --git a/src/test/ui/associated-types/defaults-wf.stderr b/src/test/ui/associated-types/defaults-wf.stderr index 73ef567ffae6d..e837150c05d8b 100644 --- a/src/test/ui/associated-types/defaults-wf.stderr +++ b/src/test/ui/associated-types/defaults-wf.stderr @@ -3,7 +3,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | LL | type Ty = Vec<[u8]>; | ^^^^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | LL | pub struct Vec { diff --git a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr index 8fdca54d2d8b8..0afc380293370 100644 --- a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr +++ b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr @@ -3,7 +3,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation | LL | trait ArithmeticOps: Add + Sub + Mul + Div {} | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/ops/arith.rs:LL:COL | LL | pub trait Add { diff --git a/src/test/ui/async-await/generator-desc.stderr b/src/test/ui/async-await/generator-desc.stderr index a7aedbb2b322f..d75e927696e10 100644 --- a/src/test/ui/async-await/generator-desc.stderr +++ b/src/test/ui/async-await/generator-desc.stderr @@ -37,7 +37,7 @@ LL | fun((async || {})(), (async || {})()); | -- ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body | | | the expected `async` closure body - | + | ::: $SRC_DIR/core/src/future/mod.rs:LL:COL | LL | pub const fn from_generator(gen: T) -> impl Future diff --git a/src/test/ui/async-await/issue-72442.stderr b/src/test/ui/async-await/issue-72442.stderr index 52245b63128ab..b586207a25ffd 100644 --- a/src/test/ui/async-await/issue-72442.stderr +++ b/src/test/ui/async-await/issue-72442.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `Option<&str>: AsRef` is not satisfied | LL | let mut f = File::open(path.to_str())?; | ^^^^^^^^^^^^^ the trait `AsRef` is not implemented for `Option<&str>` - | + | ::: $SRC_DIR/std/src/fs.rs:LL:COL | LL | pub fn open>(path: P) -> io::Result { diff --git a/src/test/ui/async-await/issues/issue-67893.stderr b/src/test/ui/async-await/issues/issue-67893.stderr index ea5c90a81d4f9..39e50a106acab 100644 --- a/src/test/ui/async-await/issues/issue-67893.stderr +++ b/src/test/ui/async-await/issues/issue-67893.stderr @@ -6,7 +6,7 @@ LL | fn g(_: impl Send) {} ... LL | g(issue_67893::run()) | ^ `MutexGuard<'_, ()>` cannot be sent between threads safely - | + | ::: $DIR/auxiliary/issue_67893.rs:7:20 | LL | pub async fn run() { diff --git a/src/test/ui/async-await/pin-needed-to-poll.stderr b/src/test/ui/async-await/pin-needed-to-poll.stderr index 0756a4d59c19b..0714e666d387f 100644 --- a/src/test/ui/async-await/pin-needed-to-poll.stderr +++ b/src/test/ui/async-await/pin-needed-to-poll.stderr @@ -6,7 +6,7 @@ LL | struct Sleep; ... LL | self.sleep.poll(cx) | ^^^^ method not found in `Sleep` - | + | ::: $SRC_DIR/core/src/future/future.rs:LL:COL | LL | fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll; diff --git a/src/test/ui/borrowck/move-error-snippets.stderr b/src/test/ui/borrowck/move-error-snippets.stderr index 7821dc02bde3c..e7ecd0079f08d 100644 --- a/src/test/ui/borrowck/move-error-snippets.stderr +++ b/src/test/ui/borrowck/move-error-snippets.stderr @@ -6,7 +6,7 @@ LL | let a = $c; | | | move occurs because `D` has type `A`, which does not implement the `Copy` trait | help: consider borrowing here: `&$c` - | + | ::: $DIR/move-error-snippets.rs:21:1 | LL | sss!(); diff --git a/src/test/ui/bound-suggestions.stderr b/src/test/ui/bound-suggestions.stderr index 78f62592960ff..14e28174a295d 100644 --- a/src/test/ui/bound-suggestions.stderr +++ b/src/test/ui/bound-suggestions.stderr @@ -75,7 +75,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation | LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -91,7 +91,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation | LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -107,7 +107,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation | LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -123,7 +123,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation | LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -139,7 +139,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation | LL | const SIZE: usize = core::mem::size_of::(); | ^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr index 0d1d747272d18..64946c316cd1e 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -3,7 +3,7 @@ error[E0277]: `T` cannot be sent between threads safely | LL | impl RequiresRequiresShareAndSend for X { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `T` cannot be sent between threads safely - | + | ::: $DIR/auxiliary/trait_superkinds_in_metadata.rs:7:58 | LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { } diff --git a/src/test/ui/c-variadic/issue-86053-1.stderr b/src/test/ui/c-variadic/issue-86053-1.stderr index ec7ee74aef29a..b399f729f6506 100644 --- a/src/test/ui/c-variadic/issue-86053-1.stderr +++ b/src/test/ui/c-variadic/issue-86053-1.stderr @@ -63,7 +63,7 @@ error[E0412]: cannot find type `F` in this scope | LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) { | ^ - | + | ::: $SRC_DIR/core/src/ops/function.rs:LL:COL | LL | pub trait Fn: FnMut { diff --git a/src/test/ui/closures/closure-move-sync.stderr b/src/test/ui/closures/closure-move-sync.stderr index da5e25c0d18fa..b4e5db74e0348 100644 --- a/src/test/ui/closures/closure-move-sync.stderr +++ b/src/test/ui/closures/closure-move-sync.stderr @@ -3,7 +3,7 @@ error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads s | LL | let t = thread::spawn(|| { | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely - | + | ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL | LL | F: Send + 'static, @@ -18,7 +18,7 @@ error[E0277]: `Sender<()>` cannot be shared between threads safely | LL | thread::spawn(|| tx.send(()).unwrap()); | ^^^^^^^^^^^^^ `Sender<()>` cannot be shared between threads safely - | + | ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL | LL | F: Send + 'static, diff --git a/src/test/ui/const-generics/const-argument-if-length.full.stderr b/src/test/ui/const-generics/const-argument-if-length.full.stderr index a9f1d0eb65718..cc2c9c8681bcc 100644 --- a/src/test/ui/const-generics/const-argument-if-length.full.stderr +++ b/src/test/ui/const-generics/const-argument-if-length.full.stderr @@ -5,7 +5,7 @@ LL | pub const fn is_zst() -> usize { | - this type parameter needs to be `std::marker::Sized` LL | if std::mem::size_of::() == 0 { | ^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { diff --git a/src/test/ui/const-generics/const_evaluatable_checked/cross_crate_predicate.stderr b/src/test/ui/const-generics/const_evaluatable_checked/cross_crate_predicate.stderr index 84b2665d5bfed..ce7ec4d90b6bf 100644 --- a/src/test/ui/const-generics/const_evaluatable_checked/cross_crate_predicate.stderr +++ b/src/test/ui/const-generics/const_evaluatable_checked/cross_crate_predicate.stderr @@ -3,7 +3,7 @@ error: unconstrained generic constant | LL | let _ = const_evaluatable_lib::test1::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/const_evaluatable_lib.rs:6:10 | LL | [u8; std::mem::size_of::() - 1]: Sized, @@ -16,7 +16,7 @@ error: unconstrained generic constant | LL | let _ = const_evaluatable_lib::test1::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/const_evaluatable_lib.rs:4:27 | LL | pub fn test1() -> [u8; std::mem::size_of::() - 1] @@ -29,7 +29,7 @@ error: unconstrained generic constant | LL | let _ = const_evaluatable_lib::test1::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/const_evaluatable_lib.rs:6:10 | LL | [u8; std::mem::size_of::() - 1]: Sized, @@ -42,7 +42,7 @@ error: unconstrained generic constant | LL | let _ = const_evaluatable_lib::test1::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/const_evaluatable_lib.rs:4:27 | LL | pub fn test1() -> [u8; std::mem::size_of::() - 1] diff --git a/src/test/ui/const-ptr/out_of_bounds_read.stderr b/src/test/ui/const-ptr/out_of_bounds_read.stderr index 92541779213a4..04503495bc62a 100644 --- a/src/test/ui/const-ptr/out_of_bounds_read.stderr +++ b/src/test/ui/const-ptr/out_of_bounds_read.stderr @@ -6,12 +6,12 @@ LL | unsafe { copy_nonoverlapping(src, dst, count) } | | | memory access failed: alloc7 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds | inside `copy_nonoverlapping::` at $SRC_DIR/core/src/intrinsics.rs:LL:COL - | + | ::: $SRC_DIR/core/src/ptr/mod.rs:LL:COL | LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); | --------------------------------------------- inside `std::ptr::read::` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - | + | ::: $DIR/out_of_bounds_read.rs:13:33 | LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) }; @@ -25,17 +25,17 @@ LL | unsafe { copy_nonoverlapping(src, dst, count) } | | | memory access failed: alloc7 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds | inside `copy_nonoverlapping::` at $SRC_DIR/core/src/intrinsics.rs:LL:COL - | + | ::: $SRC_DIR/core/src/ptr/mod.rs:LL:COL | LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); | --------------------------------------------- inside `std::ptr::read::` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - | + | ::: $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | LL | unsafe { read(self) } | ---------- inside `ptr::const_ptr::::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/out_of_bounds_read.rs:14:39 | LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() }; @@ -49,17 +49,17 @@ LL | unsafe { copy_nonoverlapping(src, dst, count) } | | | memory access failed: alloc7 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds | inside `copy_nonoverlapping::` at $SRC_DIR/core/src/intrinsics.rs:LL:COL - | + | ::: $SRC_DIR/core/src/ptr/mod.rs:LL:COL | LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); | --------------------------------------------- inside `std::ptr::read::` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - | + | ::: $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL | LL | unsafe { read(self) } | ---------- inside `ptr::mut_ptr::::read` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - | + | ::: $DIR/out_of_bounds_read.rs:15:37 | LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() }; diff --git a/src/test/ui/consts/const_unsafe_unreachable_ub.stderr b/src/test/ui/consts/const_unsafe_unreachable_ub.stderr index ecdd0ca3f54c1..65cb3d74b233e 100644 --- a/src/test/ui/consts/const_unsafe_unreachable_ub.stderr +++ b/src/test/ui/consts/const_unsafe_unreachable_ub.stderr @@ -6,7 +6,7 @@ LL | unsafe { intrinsics::unreachable() } | | | entering unreachable code | inside `unreachable_unchecked` at $SRC_DIR/core/src/hint.rs:LL:COL - | + | ::: $DIR/const_unsafe_unreachable_ub.rs:7:18 | LL | false => std::hint::unreachable_unchecked(), diff --git a/src/test/ui/consts/miri_unleashed/drop.stderr b/src/test/ui/consts/miri_unleashed/drop.stderr index f79dc454a83a0..36db6b7865af2 100644 --- a/src/test/ui/consts/miri_unleashed/drop.stderr +++ b/src/test/ui/consts/miri_unleashed/drop.stderr @@ -6,7 +6,7 @@ LL | pub unsafe fn drop_in_place(to_drop: *mut T) { | | | calling non-const function ` as Drop>::drop` | inside `std::ptr::drop_in_place::> - shim(Some(Vec))` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - | + | ::: $DIR/drop.rs:18:1 | LL | }; diff --git a/src/test/ui/consts/offset_from_ub.stderr b/src/test/ui/consts/offset_from_ub.stderr index 663bfbdade0ce..2478ff081d770 100644 --- a/src/test/ui/consts/offset_from_ub.stderr +++ b/src/test/ui/consts/offset_from_ub.stderr @@ -12,7 +12,7 @@ LL | unsafe { intrinsics::ptr_offset_from(self, origin) } | | | 0x2a is not a valid pointer | inside `ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_from_ub.rs:24:14 | LL | unsafe { (42 as *const u8).offset_from(&5u8) as usize } diff --git a/src/test/ui/consts/offset_ub.stderr b/src/test/ui/consts/offset_ub.stderr index 66a2722ed4acd..4c3f373e0801c 100644 --- a/src/test/ui/consts/offset_ub.stderr +++ b/src/test/ui/consts/offset_ub.stderr @@ -6,7 +6,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | overflowing in-bounds pointer arithmetic | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:8:46 | LL | pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) }; @@ -20,7 +20,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | pointer arithmetic failed: allocN has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:9:43 | LL | pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) }; @@ -34,7 +34,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | pointer arithmetic failed: allocN has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:10:45 | LL | pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) }; @@ -48,7 +48,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | overflowing in-bounds pointer arithmetic | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:12:43 | LL | pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) }; @@ -62,7 +62,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | overflowing in-bounds pointer arithmetic | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:13:44 | LL | pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) }; @@ -76,7 +76,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | overflowing in-bounds pointer arithmetic | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:14:56 | LL | pub const OVERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (usize::MAX as *const u8).offset(2) }; @@ -90,7 +90,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | overflowing in-bounds pointer arithmetic | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:15:57 | LL | pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).offset(-2) }; @@ -104,7 +104,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | pointer arithmetic failed: allocN has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:16:49 | LL | pub const NEGATIVE_OFFSET: *const u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) }; @@ -118,7 +118,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | pointer arithmetic failed: allocN has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:18:50 | LL | pub const ZERO_SIZED_ALLOC: *const u8 = unsafe { [0u8; 0].as_ptr().offset(1) }; @@ -132,7 +132,7 @@ LL | unsafe { intrinsics::offset(self, count) as *mut T } | | | 0x1 is not a valid pointer | inside `ptr::mut_ptr::::offset` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:19:42 | LL | pub const DANGLING: *const u8 = unsafe { ptr::NonNull::::dangling().as_ptr().offset(4) }; @@ -146,7 +146,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | pointer arithmetic failed: 0x0 is not a valid pointer | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:22:50 | LL | pub const NULL_OFFSET_ZERO: *const u8 = unsafe { ptr::null::().offset(0) }; @@ -160,7 +160,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | 0x7f..f is not a valid pointer | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/offset_ub.rs:25:47 | LL | pub const UNDERFLOW_ABS: *const u8 = unsafe { (usize::MAX as *const u8).offset(isize::MIN) }; diff --git a/src/test/ui/consts/ptr_comparisons.stderr b/src/test/ui/consts/ptr_comparisons.stderr index 6ae24c179ff1c..a28ae521d5b9a 100644 --- a/src/test/ui/consts/ptr_comparisons.stderr +++ b/src/test/ui/consts/ptr_comparisons.stderr @@ -6,7 +6,7 @@ LL | unsafe { intrinsics::offset(self, count) } | | | pointer arithmetic failed: alloc3 has size $WORD, so pointer to $TWO_WORDS bytes starting at offset 0 is out-of-bounds | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL - | + | ::: $DIR/ptr_comparisons.rs:61:34 | LL | const _: *const usize = unsafe { (FOO as *const usize).offset(2) }; diff --git a/src/test/ui/cross/cross-file-errors/main.stderr b/src/test/ui/cross/cross-file-errors/main.stderr index 4f015bf2148be..ff9e87250c75d 100644 --- a/src/test/ui/cross/cross-file-errors/main.stderr +++ b/src/test/ui/cross/cross-file-errors/main.stderr @@ -3,7 +3,7 @@ error[E0658]: destructuring assignments are unstable | LL | _ | ^ - | + | ::: $DIR/main.rs:5:5 | LL | underscore!(); @@ -18,7 +18,7 @@ error: in expressions, `_` can only be used on the left-hand side of an assignme | LL | _ | ^ `_` not allowed here - | + | ::: $DIR/main.rs:5:5 | LL | underscore!(); diff --git a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr index 0a76405382456..6267fad4372a4 100644 --- a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr @@ -6,7 +6,7 @@ LL | #[derive(Eq,PartialEq)] ... LL | x: Error | ^^^^^^^^ the trait `Eq` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { diff --git a/src/test/ui/derives/derives-span-Eq-enum.stderr b/src/test/ui/derives/derives-span-Eq-enum.stderr index c17e2c518aa76..5dc4073400191 100644 --- a/src/test/ui/derives/derives-span-Eq-enum.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum.stderr @@ -6,7 +6,7 @@ LL | #[derive(Eq,PartialEq)] ... LL | Error | ^^^^^ the trait `Eq` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { diff --git a/src/test/ui/derives/derives-span-Eq-struct.stderr b/src/test/ui/derives/derives-span-Eq-struct.stderr index 7a7640b40f627..5fd21e2cd7900 100644 --- a/src/test/ui/derives/derives-span-Eq-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-struct.stderr @@ -6,7 +6,7 @@ LL | #[derive(Eq,PartialEq)] LL | struct Struct { LL | x: Error | ^^^^^^^^ the trait `Eq` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { diff --git a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr index 35932986b0499..d96687f8bf2e2 100644 --- a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr @@ -6,7 +6,7 @@ LL | #[derive(Eq,PartialEq)] LL | struct Struct( LL | Error | ^^^^^ the trait `Eq` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr index 4616dadbe6bf7..557431ab5bc2a 100644 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr @@ -6,7 +6,7 @@ LL | #[derive(Hash)] ... LL | x: Error | ^^^^^^^^ the trait `Hash` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | LL | fn hash(&self, state: &mut H); diff --git a/src/test/ui/derives/derives-span-Hash-enum.stderr b/src/test/ui/derives/derives-span-Hash-enum.stderr index ffc7f7bb7daaf..531ad59ca3bf9 100644 --- a/src/test/ui/derives/derives-span-Hash-enum.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum.stderr @@ -6,7 +6,7 @@ LL | #[derive(Hash)] ... LL | Error | ^^^^^ the trait `Hash` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | LL | fn hash(&self, state: &mut H); diff --git a/src/test/ui/derives/derives-span-Hash-struct.stderr b/src/test/ui/derives/derives-span-Hash-struct.stderr index 14aebb4faace9..2852a448c43fc 100644 --- a/src/test/ui/derives/derives-span-Hash-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-struct.stderr @@ -6,7 +6,7 @@ LL | #[derive(Hash)] LL | struct Struct { LL | x: Error | ^^^^^^^^ the trait `Hash` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | LL | fn hash(&self, state: &mut H); diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr index 50139dc3f0a79..93ae1b29702e9 100644 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr @@ -6,7 +6,7 @@ LL | #[derive(Hash)] LL | struct Struct( LL | Error | ^^^^^ the trait `Hash` is not implemented for `Error` - | + | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | LL | fn hash(&self, state: &mut H); diff --git a/src/test/ui/derives/deriving-meta-unknown-trait.stderr b/src/test/ui/derives/deriving-meta-unknown-trait.stderr index 485a91d02758a..bfb673f86f418 100644 --- a/src/test/ui/derives/deriving-meta-unknown-trait.stderr +++ b/src/test/ui/derives/deriving-meta-unknown-trait.stderr @@ -3,7 +3,7 @@ error: cannot find derive macro `Eqr` in this scope | LL | #[derive(Eqr)] | ^^^ help: a derive macro with a similar name exists: `Eq` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub macro Eq($item:item) { @@ -14,7 +14,7 @@ error: cannot find derive macro `Eqr` in this scope | LL | #[derive(Eqr)] | ^^^ help: a derive macro with a similar name exists: `Eq` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub macro Eq($item:item) { diff --git a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr index 28663563c6ccd..04d45758578a3 100644 --- a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr @@ -37,7 +37,7 @@ error: macro expansion ends with an incomplete expression: expected one of `move | LL | ($i: ident) => ($i) | ^ expected one of `move`, `|`, or `||` - | + | ::: $DIR/edition-keywords-2018-2015-parsing.rs:24:8 | LL | if passes_ident!(async) == 1 {} diff --git a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr index cda7e65e437e8..af11a505ccf36 100644 --- a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr @@ -37,7 +37,7 @@ error: macro expansion ends with an incomplete expression: expected one of `move | LL | ($i: ident) => ($i) | ^ expected one of `move`, `|`, or `||` - | + | ::: $DIR/edition-keywords-2018-2018-parsing.rs:24:8 | LL | if passes_ident!(async) == 1 {} diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr index 6292ed446978d..5ee8cbd912b0e 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/src/test/ui/empty/empty-struct-braces-expr.stderr @@ -6,7 +6,7 @@ LL | struct Empty1 {} ... LL | let e1 = Empty1; | ^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:2:1 | LL | pub struct XEmpty2; @@ -29,7 +29,7 @@ LL | struct Empty1 {} ... LL | let e1 = Empty1(); | ^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:2:1 | LL | pub struct XEmpty2; @@ -67,7 +67,7 @@ error[E0423]: expected value, found struct `XEmpty1` | LL | let xe1 = XEmpty1; | ^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:1:1 | LL | pub struct XEmpty1 {} @@ -89,7 +89,7 @@ error[E0423]: expected function, tuple struct or tuple variant, found struct `XE | LL | let xe1 = XEmpty1(); | ^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:1:1 | LL | pub struct XEmpty1 {} diff --git a/src/test/ui/empty/empty-struct-braces-pat-1.stderr b/src/test/ui/empty/empty-struct-braces-pat-1.stderr index 3570012fc3752..5c02b62969fe7 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-1.stderr +++ b/src/test/ui/empty/empty-struct-braces-pat-1.stderr @@ -12,7 +12,7 @@ error[E0532]: expected unit struct, unit variant or constant, found struct varia | LL | XE::XEmpty3 => () | ^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:6:5 | LL | XEmpty3 {}, diff --git a/src/test/ui/empty/empty-struct-braces-pat-2.stderr b/src/test/ui/empty/empty-struct-braces-pat-2.stderr index 3bd3f6a9644a1..4bac2dfe76f28 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-2.stderr +++ b/src/test/ui/empty/empty-struct-braces-pat-2.stderr @@ -6,7 +6,7 @@ LL | struct Empty1 {} ... LL | Empty1() => () | ^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:3:1 | LL | pub struct XEmpty6(); @@ -26,7 +26,7 @@ error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1` | LL | XEmpty1() => () | ^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:1:1 | LL | pub struct XEmpty1 {} @@ -52,7 +52,7 @@ LL | struct Empty1 {} ... LL | Empty1(..) => () | ^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:3:1 | LL | pub struct XEmpty6(); @@ -72,7 +72,7 @@ error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1` | LL | XEmpty1(..) => () | ^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:1:1 | LL | pub struct XEmpty1 {} diff --git a/src/test/ui/empty/empty-struct-braces-pat-3.stderr b/src/test/ui/empty/empty-struct-braces-pat-3.stderr index aac872ba0ecca..cc2feb86d8e5b 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-3.stderr +++ b/src/test/ui/empty/empty-struct-braces-pat-3.stderr @@ -12,7 +12,7 @@ error[E0532]: expected tuple struct or tuple variant, found struct variant `XE:: | LL | XE::XEmpty3() => () | ^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:6:5 | LL | XEmpty3 {}, @@ -44,7 +44,7 @@ error[E0532]: expected tuple struct or tuple variant, found struct variant `XE:: | LL | XE::XEmpty3(..) => () | ^^^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:6:5 | LL | XEmpty3 {}, diff --git a/src/test/ui/empty/empty-struct-tuple-pat.stderr b/src/test/ui/empty/empty-struct-tuple-pat.stderr index 7b0d9717e63a2..9b5c8422de55d 100644 --- a/src/test/ui/empty/empty-struct-tuple-pat.stderr +++ b/src/test/ui/empty/empty-struct-tuple-pat.stderr @@ -30,7 +30,7 @@ error[E0532]: expected unit struct, unit variant or constant, found tuple varian | LL | XE::XEmpty5 => (), | ^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:7:5 | LL | XEmpty4, diff --git a/src/test/ui/empty/empty-struct-unit-pat.stderr b/src/test/ui/empty/empty-struct-unit-pat.stderr index a704e1fae497c..839d3a84103fa 100644 --- a/src/test/ui/empty/empty-struct-unit-pat.stderr +++ b/src/test/ui/empty/empty-struct-unit-pat.stderr @@ -6,7 +6,7 @@ LL | struct Empty2; ... LL | Empty2() => () | ^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:3:1 | LL | pub struct XEmpty6(); @@ -26,7 +26,7 @@ error[E0532]: expected tuple struct or tuple variant, found unit struct `XEmpty2 | LL | XEmpty2() => () | ^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:2:1 | LL | pub struct XEmpty2; @@ -51,7 +51,7 @@ LL | struct Empty2; ... LL | Empty2(..) => () | ^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:3:1 | LL | pub struct XEmpty6(); @@ -71,7 +71,7 @@ error[E0532]: expected tuple struct or tuple variant, found unit struct `XEmpty2 | LL | XEmpty2(..) => () | ^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:2:1 | LL | pub struct XEmpty2; @@ -102,7 +102,7 @@ error[E0532]: expected tuple struct or tuple variant, found unit variant `XE::XE | LL | XE::XEmpty4() => (), | ^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:7:5 | LL | XEmpty4, @@ -133,7 +133,7 @@ error[E0532]: expected tuple struct or tuple variant, found unit variant `XE::XE | LL | XE::XEmpty4(..) => (), | ^^^^^^^^^^^^^^^ - | + | ::: $DIR/auxiliary/empty-struct.rs:7:5 | LL | XEmpty4, diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr index 7b3deb1579aff..fd0215e72ee24 100644 --- a/src/test/ui/error-codes/E0004-2.stderr +++ b/src/test/ui/error-codes/E0004-2.stderr @@ -3,7 +3,7 @@ error[E0004]: non-exhaustive patterns: `None` and `Some(_)` not covered | LL | match x { } | ^ patterns `None` and `Some(_)` not covered - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | None, diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr index b9f2702e88876..a945a4be70854 100644 --- a/src/test/ui/error-codes/E0005.stderr +++ b/src/test/ui/error-codes/E0005.stderr @@ -3,7 +3,7 @@ error[E0005]: refutable pattern in local binding: `None` not covered | LL | let Some(y) = x; | ^^^^^^^ pattern `None` not covered - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | None, diff --git a/src/test/ui/error-codes/E0297.stderr b/src/test/ui/error-codes/E0297.stderr index ec3452b1ddfa6..957e79a9f3981 100644 --- a/src/test/ui/error-codes/E0297.stderr +++ b/src/test/ui/error-codes/E0297.stderr @@ -3,7 +3,7 @@ error[E0005]: refutable pattern in `for` loop binding: `None` not covered | LL | for Some(x) in xs {} | ^^^^^^^ pattern `None` not covered - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | None, diff --git a/src/test/ui/explore-issue-38412.stderr b/src/test/ui/explore-issue-38412.stderr index f4a2330da1773..2f5dab7eb0559 100644 --- a/src/test/ui/explore-issue-38412.stderr +++ b/src/test/ui/explore-issue-38412.stderr @@ -84,7 +84,7 @@ error[E0624]: associated function `pub_crate` is private | LL | r.pub_crate(); | ^^^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/pub-and-stability.rs:114:9 | LL | pub(crate) fn pub_crate(&self) -> i32 { self.d_priv } @@ -95,7 +95,7 @@ error[E0624]: associated function `pub_mod` is private | LL | r.pub_mod(); | ^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/pub-and-stability.rs:116:9 | LL | pub(in m) fn pub_mod(&self) -> i32 { self.d_priv } @@ -106,7 +106,7 @@ error[E0624]: associated function `private` is private | LL | r.private(); | ^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/pub-and-stability.rs:118:9 | LL | fn private(&self) -> i32 { self.d_priv } @@ -135,7 +135,7 @@ error[E0624]: associated function `pub_crate` is private | LL | t.pub_crate(); | ^^^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/pub-and-stability.rs:129:9 | LL | pub(crate) fn pub_crate(&self) -> i32 { self.0 } @@ -146,7 +146,7 @@ error[E0624]: associated function `pub_mod` is private | LL | t.pub_mod(); | ^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/pub-and-stability.rs:130:9 | LL | pub(in m) fn pub_mod(&self) -> i32 { self.0 } @@ -157,7 +157,7 @@ error[E0624]: associated function `private` is private | LL | t.private(); | ^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/pub-and-stability.rs:131:9 | LL | fn private(&self) -> i32 { self.0 } diff --git a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr index 2dacb94bcc07a..912252fd34a2e 100644 --- a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr +++ b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr @@ -138,7 +138,7 @@ error[E0277]: the trait bound `<::A as Iterator>::Item: Copy` is n | LL | type A: Iterator; | ^^^^ the trait `Copy` is not implemented for `<::A as Iterator>::Item` - | + | ::: $SRC_DIR/core/src/marker.rs:LL:COL | LL | pub trait Copy: Clone { diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr index e079c2ddcee26..74629d3e7e64a 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr @@ -3,7 +3,7 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered | LL | let Ok(_x) = foo(); | ^^^^^^ pattern `Err(_)` not covered - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), diff --git a/src/test/ui/generator/sized-yield.stderr b/src/test/ui/generator/sized-yield.stderr index 8e3c2f67ed165..05cc6c012177b 100644 --- a/src/test/ui/generator/sized-yield.stderr +++ b/src/test/ui/generator/sized-yield.stderr @@ -16,7 +16,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t | LL | Pin::new(&mut gen).resume(()); | ^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/ops/generator.rs:LL:COL | LL | pub enum GeneratorState { diff --git a/src/test/ui/generic-associated-types/cross-crate-bounds.stderr b/src/test/ui/generic-associated-types/cross-crate-bounds.stderr index d96c5f4540ef5..57ccadc7b8d04 100644 --- a/src/test/ui/generic-associated-types/cross-crate-bounds.stderr +++ b/src/test/ui/generic-associated-types/cross-crate-bounds.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `(): AsRef<()>` is not satisfied | LL | type Bar = (); | ^^^^^^^^^^^^^^ the trait `AsRef<()>` is not implemented for `()` - | + | ::: $DIR/auxiliary/foo_defn.rs:6:15 | LL | type Bar: AsRef<()>; diff --git a/src/test/ui/impl-trait/impl-generic-mismatch.stderr b/src/test/ui/impl-trait/impl-generic-mismatch.stderr index 0e1ccd8d0d6d6..6af91480e3a6e 100644 --- a/src/test/ui/impl-trait/impl-generic-mismatch.stderr +++ b/src/test/ui/impl-trait/impl-generic-mismatch.stderr @@ -31,7 +31,7 @@ error[E0643]: method `hash` has incompatible signature for trait | LL | fn hash(&self, hasher: &mut impl Hasher) {} | ^^^^^^^^^^^ expected generic parameter, found `impl Trait` - | + | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | LL | fn hash(&self, state: &mut H); diff --git a/src/test/ui/impl-trait/issues/issue-78722.stderr b/src/test/ui/impl-trait/issues/issue-78722.stderr index f42d66d12435c..5e432e7649604 100644 --- a/src/test/ui/impl-trait/issues/issue-78722.stderr +++ b/src/test/ui/impl-trait/issues/issue-78722.stderr @@ -8,7 +8,7 @@ LL | let f: F = async { 1 }; | - ^^^^^^^^^^^ expected opaque type, found a different opaque type | | | expected due to this - | + | ::: $SRC_DIR/core/src/future/mod.rs:LL:COL | LL | pub const fn from_generator(gen: T) -> impl Future diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr index b993115502fd5..30afc8646de3d 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -66,7 +66,7 @@ error[E0599]: no method named `method` found for type `i32` in the current scope | LL | 1i32.method(); | ^^^^^^ method not found in `i32` - | + | ::: $DIR/auxiliary/no_method_suggested_traits.rs:8:12 | LL | fn method(&self) {} diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr index bd58728335008..b15efd6c770eb 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr @@ -3,7 +3,7 @@ error: `impl` item signature doesn't match `trait` item signature | LL | fn deref(&self) -> &dyn Trait { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&Struct) -> &dyn Trait` - | + | ::: $SRC_DIR/core/src/ops/deref.rs:LL:COL | LL | fn deref(&self) -> &Self::Target; diff --git a/src/test/ui/interior-mutability/interior-mutability.stderr b/src/test/ui/interior-mutability/interior-mutability.stderr index dd43da1166445..af6e005311778 100644 --- a/src/test/ui/interior-mutability/interior-mutability.stderr +++ b/src/test/ui/interior-mutability/interior-mutability.stderr @@ -3,7 +3,7 @@ error[E0277]: the type `UnsafeCell` may contain interior mutability and a r | LL | catch_unwind(|| { x.set(23); }); | ^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - | + | ::: $SRC_DIR/std/src/panic.rs:LL:COL | LL | pub fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { diff --git a/src/test/ui/issues/issue-17546.stderr b/src/test/ui/issues/issue-17546.stderr index 6269ccb73e06f..42953bd8d2c2e 100644 --- a/src/test/ui/issues/issue-17546.stderr +++ b/src/test/ui/issues/issue-17546.stderr @@ -3,7 +3,7 @@ error[E0573]: expected type, found variant `NoResult` | LL | fn new() -> NoResult { | ^^^^^^^^^^^^^^^^^^^^^^^^ - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | pub enum Result { @@ -57,7 +57,7 @@ error[E0573]: expected type, found variant `NoResult` | LL | fn newer() -> NoResult { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | pub enum Result { diff --git a/src/test/ui/issues/issue-20433.stderr b/src/test/ui/issues/issue-20433.stderr index 5fed02164b5b7..b9e9bfe1b8cb1 100644 --- a/src/test/ui/issues/issue-20433.stderr +++ b/src/test/ui/issues/issue-20433.stderr @@ -3,7 +3,7 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation | LL | fn iceman(c: Vec<[i32]>) {} | ^^^^^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | LL | pub struct Vec { diff --git a/src/test/ui/issues/issue-21160.stderr b/src/test/ui/issues/issue-21160.stderr index c864381e6b0a6..e9aa8e27089aa 100644 --- a/src/test/ui/issues/issue-21160.stderr +++ b/src/test/ui/issues/issue-21160.stderr @@ -5,7 +5,7 @@ LL | #[derive(Hash)] | ---- in this derive macro expansion LL | struct Foo(Bar); | ^^^ the trait `Hash` is not implemented for `Bar` - | + | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | LL | fn hash(&self, state: &mut H); diff --git a/src/test/ui/issues/issue-21202.stderr b/src/test/ui/issues/issue-21202.stderr index 47f28d7c443fc..1d2816feda948 100644 --- a/src/test/ui/issues/issue-21202.stderr +++ b/src/test/ui/issues/issue-21202.stderr @@ -3,7 +3,7 @@ error[E0624]: associated function `foo` is private | LL | Foo::foo(&f); | ^^^ private associated function - | + | ::: $DIR/auxiliary/issue-21202.rs:4:9 | LL | fn foo(&self) { } diff --git a/src/test/ui/issues/issue-27033.stderr b/src/test/ui/issues/issue-27033.stderr index fa42611d0b32e..9a38d49cd0c96 100644 --- a/src/test/ui/issues/issue-27033.stderr +++ b/src/test/ui/issues/issue-27033.stderr @@ -3,7 +3,7 @@ error[E0530]: match bindings cannot shadow unit variants | LL | None @ _ => {} | ^^^^ cannot be named the same as a unit variant - | + | ::: $SRC_DIR/std/src/prelude/mod.rs:LL:COL | LL | pub use super::v1::*; diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr index 0b7ffc39646a6..8b7871ce31186 100644 --- a/src/test/ui/issues/issue-31173.stderr +++ b/src/test/ui/issues/issue-31173.stderr @@ -12,12 +12,12 @@ error[E0599]: the method `collect` exists for struct `Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>` due to unsatisfied trait bounds - | + | ::: $SRC_DIR/core/src/iter/adapters/cloned.rs:LL:COL | LL | pub struct Cloned { | -------------------- doesn't satisfy `_: Iterator` - | + | ::: $SRC_DIR/core/src/iter/adapters/take_while.rs:LL:COL | LL | pub struct TakeWhile { diff --git a/src/test/ui/issues/issue-43189.stderr b/src/test/ui/issues/issue-43189.stderr index 3a3767c349d65..caf7530b85af1 100644 --- a/src/test/ui/issues/issue-43189.stderr +++ b/src/test/ui/issues/issue-43189.stderr @@ -3,7 +3,7 @@ error[E0599]: no method named `a` found for unit type `()` in the current scope | LL | ().a(); | ^ method not found in `()` - | + | ::: $DIR/auxiliary/xcrate-issue-43189-a.rs:5:8 | LL | fn a(&self) {} diff --git a/src/test/ui/issues/issue-56175.stderr b/src/test/ui/issues/issue-56175.stderr index e6b0fffce663d..013a440ed0457 100644 --- a/src/test/ui/issues/issue-56175.stderr +++ b/src/test/ui/issues/issue-56175.stderr @@ -3,7 +3,7 @@ error[E0599]: no method named `trait_method` found for struct `FooStruct` in the | LL | reexported_trait::FooStruct.trait_method(); | ^^^^^^^^^^^^ method not found in `FooStruct` - | + | ::: $DIR/auxiliary/reexported-trait.rs:3:12 | LL | fn trait_method(&self) { @@ -20,7 +20,7 @@ error[E0599]: no method named `trait_method_b` found for struct `FooStruct` in t | LL | reexported_trait::FooStruct.trait_method_b(); | ^^^^^^^^^^^^^^ method not found in `FooStruct` - | + | ::: $DIR/auxiliary/reexported-trait.rs:7:12 | LL | fn trait_method_b(&self) { diff --git a/src/test/ui/issues/issue-60283.stderr b/src/test/ui/issues/issue-60283.stderr index 149562f8fb31c..9bddc2c41a310 100644 --- a/src/test/ui/issues/issue-60283.stderr +++ b/src/test/ui/issues/issue-60283.stderr @@ -18,7 +18,7 @@ error[E0277]: the size for values of type `<() as Trait<'_>>::Item` cannot be kn | LL | foo((), drop) | ^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub fn drop(_x: T) {} diff --git a/src/test/ui/issues/issue-69725.stderr b/src/test/ui/issues/issue-69725.stderr index 4dd6b4bbb68be..b1ba89f6cbecf 100644 --- a/src/test/ui/issues/issue-69725.stderr +++ b/src/test/ui/issues/issue-69725.stderr @@ -3,7 +3,7 @@ error[E0599]: the method `clone` exists for struct `Struct`, but its trait bo | LL | let _ = Struct::::new().clone(); | ^^^^^ method cannot be called on `Struct` due to unsatisfied trait bounds - | + | ::: $DIR/auxiliary/issue-69725.rs:2:1 | LL | pub struct Struct(A); diff --git a/src/test/ui/issues/issue-7607-1.stderr b/src/test/ui/issues/issue-7607-1.stderr index 0520eada499d9..ecff8b42b0ea7 100644 --- a/src/test/ui/issues/issue-7607-1.stderr +++ b/src/test/ui/issues/issue-7607-1.stderr @@ -3,7 +3,7 @@ error[E0412]: cannot find type `Fo` in this scope | LL | impl Fo { | ^^ help: a trait with a similar name exists: `Fn` - | + | ::: $SRC_DIR/core/src/ops/function.rs:LL:COL | LL | pub trait Fn: FnMut { diff --git a/src/test/ui/issues/issue-78720.stderr b/src/test/ui/issues/issue-78720.stderr index ee15826d18941..95b2f447102ad 100644 --- a/src/test/ui/issues/issue-78720.stderr +++ b/src/test/ui/issues/issue-78720.stderr @@ -9,7 +9,7 @@ error[E0412]: cannot find type `F` in this scope | LL | _func: F, | ^ - | + | ::: $SRC_DIR/core/src/ops/function.rs:LL:COL | LL | pub trait Fn: FnMut { diff --git a/src/test/ui/limits/issue-55878.stderr b/src/test/ui/limits/issue-55878.stderr index a0e8fc70b6acd..a7e382479021a 100644 --- a/src/test/ui/limits/issue-55878.stderr +++ b/src/test/ui/limits/issue-55878.stderr @@ -3,7 +3,7 @@ error[E0080]: values of the type `[u8; SIZE]` are too big for the current archit | LL | intrinsics::size_of::() | ^^^^^^^^^^^^^^^^^^^^^^^^^^ inside `std::mem::size_of::<[u8; SIZE]>` at $SRC_DIR/core/src/mem/mod.rs:LL:COL - | + | ::: $DIR/issue-55878.rs:7:26 | LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>()); diff --git a/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr b/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr index 4d8a8edf4c9ea..438375951493b 100644 --- a/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr +++ b/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr @@ -21,7 +21,7 @@ LL | | } ... LL | ping!(); | -------- in this macro invocation (#1) - | + | ::: $DIR/auxiliary/ping.rs:5:1 | LL | / macro_rules! ping { @@ -43,7 +43,7 @@ LL | | } ... LL | deep!(); | -------- in this macro invocation (#1) - | + | ::: $DIR/auxiliary/ping.rs:5:1 | LL | / macro_rules! ping { diff --git a/src/test/ui/macros/macro-name-typo.stderr b/src/test/ui/macros/macro-name-typo.stderr index 94eb8dc0cd4cb..3e8cfb3f0e97f 100644 --- a/src/test/ui/macros/macro-name-typo.stderr +++ b/src/test/ui/macros/macro-name-typo.stderr @@ -3,7 +3,7 @@ error: cannot find macro `printlx` in this scope | LL | printlx!("oh noes!"); | ^^^^^^^ help: a macro with a similar name exists: `println` - | + | ::: $SRC_DIR/std/src/macros.rs:LL:COL | LL | macro_rules! println { diff --git a/src/test/ui/macros/macro-path-prelude-fail-3.stderr b/src/test/ui/macros/macro-path-prelude-fail-3.stderr index 523f08d547ebc..1abb501ec8051 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-3.stderr +++ b/src/test/ui/macros/macro-path-prelude-fail-3.stderr @@ -3,7 +3,7 @@ error: cannot find macro `inline` in this scope | LL | inline!(); | ^^^^^^ help: a macro with a similar name exists: `line` - | + | ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL | LL | macro_rules! line { diff --git a/src/test/ui/macros/macro-use-wrong-name.stderr b/src/test/ui/macros/macro-use-wrong-name.stderr index 888fb913fb71c..326001fc15a9a 100644 --- a/src/test/ui/macros/macro-use-wrong-name.stderr +++ b/src/test/ui/macros/macro-use-wrong-name.stderr @@ -3,7 +3,7 @@ error: cannot find macro `macro_two` in this scope | LL | macro_two!(); | ^^^^^^^^^ help: a macro with a similar name exists: `macro_one` - | + | ::: $DIR/auxiliary/two_macros.rs:2:1 | LL | macro_rules! macro_one { () => ("one") } diff --git a/src/test/ui/malformed/malformed-derive-entry.stderr b/src/test/ui/malformed/malformed-derive-entry.stderr index ba096a9080ae2..0eafb2d7587db 100644 --- a/src/test/ui/malformed/malformed-derive-entry.stderr +++ b/src/test/ui/malformed/malformed-derive-entry.stderr @@ -21,7 +21,7 @@ error[E0277]: the trait bound `Test1: Clone` is not satisfied | LL | #[derive(Copy(Bad))] | ^^^^ the trait `Clone` is not implemented for `Test1` - | + | ::: $SRC_DIR/core/src/marker.rs:LL:COL | LL | pub trait Copy: Clone { @@ -34,7 +34,7 @@ error[E0277]: the trait bound `Test2: Clone` is not satisfied | LL | #[derive(Copy="bad")] | ^^^^ the trait `Clone` is not implemented for `Test2` - | + | ::: $SRC_DIR/core/src/marker.rs:LL:COL | LL | pub trait Copy: Clone { diff --git a/src/test/ui/mir/issue-80742.stderr b/src/test/ui/mir/issue-80742.stderr index 961234cf7e854..1ebd2b00aee0c 100644 --- a/src/test/ui/mir/issue-80742.stderr +++ b/src/test/ui/mir/issue-80742.stderr @@ -6,7 +6,7 @@ LL | intrinsics::size_of::() | | | size_of called on unsized type `dyn Debug` | inside `std::mem::size_of::` at $SRC_DIR/core/src/mem/mod.rs:LL:COL - | + | ::: $DIR/issue-80742.rs:23:10 | LL | [u8; size_of::() + 1]: , @@ -26,7 +26,7 @@ LL | | } ... LL | let dst = Inline::::new(0); | ^^^ function or associated item cannot be called on `Inline` due to unsatisfied trait bounds - | + | ::: $SRC_DIR/core/src/fmt/mod.rs:LL:COL | LL | pub trait Debug { @@ -43,7 +43,7 @@ LL | intrinsics::size_of::() | | | size_of called on unsized type `dyn Debug` | inside `std::mem::size_of::` at $SRC_DIR/core/src/mem/mod.rs:LL:COL - | + | ::: $DIR/issue-80742.rs:15:10 | LL | [u8; size_of::() + 1]: , diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr index 69ae3d8cbd0e5..67e8ee2283689 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/src/test/ui/mismatched_types/issue-36053-2.stderr @@ -14,7 +14,7 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); | | | doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool` | doesn't satisfy `_: FnMut<(&&str,)>` - | + | ::: $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL | LL | pub struct Filter { diff --git a/src/test/ui/namespace/namespace-mix.stderr b/src/test/ui/namespace/namespace-mix.stderr index ded3173f45b2e..71e35b445ef81 100644 --- a/src/test/ui/namespace/namespace-mix.stderr +++ b/src/test/ui/namespace/namespace-mix.stderr @@ -24,7 +24,7 @@ error[E0423]: expected value, found type alias `xm1::S` | LL | check(xm1::S); | ^^^^^^ - | + | ::: $DIR/auxiliary/namespace-mix.rs:3:5 | LL | pub struct TS(); @@ -73,7 +73,7 @@ error[E0423]: expected value, found struct variant `xm7::V` | LL | check(xm7::V); | ^^^^^^ - | + | ::: $DIR/auxiliary/namespace-mix.rs:6:9 | LL | V {}, diff --git a/src/test/ui/no-send-res-ports.stderr b/src/test/ui/no-send-res-ports.stderr index 2ee32029b40dc..c35692d6eabc9 100644 --- a/src/test/ui/no-send-res-ports.stderr +++ b/src/test/ui/no-send-res-ports.stderr @@ -10,7 +10,7 @@ LL | | let y = x; LL | | println!("{:?}", y); LL | | }); | |_____- within this `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6]` - | + | ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL | LL | F: Send + 'static, diff --git a/src/test/ui/parser/issue-62894.stderr b/src/test/ui/parser/issue-62894.stderr index cf3727c9d579d..9b7bd1559cddf 100644 --- a/src/test/ui/parser/issue-62894.stderr +++ b/src/test/ui/parser/issue-62894.stderr @@ -42,7 +42,7 @@ LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq! LL | LL | fn main() {} | ^^ unexpected token - | + | ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL | LL | ($left:expr, $right:expr $(,)?) => ({ diff --git a/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr b/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr index f515525123e03..4a987cb6c0311 100644 --- a/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr +++ b/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr @@ -12,7 +12,7 @@ error[E0004]: non-exhaustive patterns: `Some(Some(West))` not covered | LL | match Some(Some(North)) { | ^^^^^^^^^^^^^^^^^ pattern `Some(Some(West))` not covered - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), diff --git a/src/test/ui/pattern/usefulness/match-privately-empty.stderr b/src/test/ui/pattern/usefulness/match-privately-empty.stderr index cd157debcd4cf..4efb41978a241 100644 --- a/src/test/ui/pattern/usefulness/match-privately-empty.stderr +++ b/src/test/ui/pattern/usefulness/match-privately-empty.stderr @@ -3,7 +3,7 @@ error[E0004]: non-exhaustive patterns: `Some(Private { misc: true, .. })` not co | LL | match private::DATA { | ^^^^^^^^^^^^^ pattern `Some(Private { misc: true, .. })` not covered - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), diff --git a/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr b/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr index c953cd314406e..1ca0a33bf37d9 100644 --- a/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr +++ b/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr @@ -27,7 +27,7 @@ error[E0004]: non-exhaustive patterns: `Some(_)` not covered | LL | match Some(10) { | ^^^^^^^^ pattern `Some(_)` not covered - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), diff --git a/src/test/ui/privacy/privacy5.stderr b/src/test/ui/privacy/privacy5.stderr index 216abfc68b812..d0c0c6b8bb593 100644 --- a/src/test/ui/privacy/privacy5.stderr +++ b/src/test/ui/privacy/privacy5.stderr @@ -363,7 +363,7 @@ error[E0603]: tuple struct constructor `A` is private | LL | let a = other::A(()); | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 | LL | pub struct A(()); @@ -380,7 +380,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | let b = other::B(2); | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -397,7 +397,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | let c = other::C(2, 3); | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -414,7 +414,7 @@ error[E0603]: tuple struct constructor `A` is private | LL | let other::A(()) = a; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 | LL | pub struct A(()); @@ -431,7 +431,7 @@ error[E0603]: tuple struct constructor `A` is private | LL | let other::A(_) = a; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 | LL | pub struct A(()); @@ -448,7 +448,7 @@ error[E0603]: tuple struct constructor `A` is private | LL | match a { other::A(()) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 | LL | pub struct A(()); @@ -465,7 +465,7 @@ error[E0603]: tuple struct constructor `A` is private | LL | match a { other::A(_) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 | LL | pub struct A(()); @@ -482,7 +482,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | let other::B(_) = b; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -499,7 +499,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | let other::B(_b) = b; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -516,7 +516,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | match b { other::B(_) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -533,7 +533,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | match b { other::B(_b) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -550,7 +550,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | match b { other::B(1) => {} | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -567,7 +567,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | other::B(_) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -584,7 +584,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | let other::C(_, _) = c; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -601,7 +601,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | let other::C(_a, _) = c; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -618,7 +618,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | let other::C(_, _b) = c; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -635,7 +635,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | let other::C(_a, _b) = c; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -652,7 +652,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | match c { other::C(_, _) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -669,7 +669,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | match c { other::C(_a, _) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -686,7 +686,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | match c { other::C(_, _b) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -703,7 +703,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | match c { other::C(_a, _b) => {} } | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); @@ -720,7 +720,7 @@ error[E0603]: tuple struct constructor `A` is private | LL | let a2 = other::A; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:1:14 | LL | pub struct A(()); @@ -737,7 +737,7 @@ error[E0603]: tuple struct constructor `B` is private | LL | let b2 = other::B; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:2:14 | LL | pub struct B(isize); @@ -754,7 +754,7 @@ error[E0603]: tuple struct constructor `C` is private | LL | let c2 = other::C; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy_tuple_struct.rs:3:14 | LL | pub struct C(pub isize, isize); diff --git a/src/test/ui/privacy/private-method-cross-crate.stderr b/src/test/ui/privacy/private-method-cross-crate.stderr index 6532932993363..93f6a7f2f6167 100644 --- a/src/test/ui/privacy/private-method-cross-crate.stderr +++ b/src/test/ui/privacy/private-method-cross-crate.stderr @@ -3,7 +3,7 @@ error[E0624]: associated function `nap` is private | LL | nyan.nap(); | ^^^ private associated function - | + | ::: $DIR/auxiliary/cci_class_5.rs:8:9 | LL | fn nap(&self) {} diff --git a/src/test/ui/privacy/restricted/test.stderr b/src/test/ui/privacy/restricted/test.stderr index 6950667f1ea0b..0f6003c424767 100644 --- a/src/test/ui/privacy/restricted/test.stderr +++ b/src/test/ui/privacy/restricted/test.stderr @@ -87,7 +87,7 @@ error[E0624]: associated function `g` is private | LL | u.g(); | ^ private associated function - | + | ::: $DIR/auxiliary/pub_restricted.rs:14:5 | LL | pub(crate) fn g(&self) {} @@ -98,7 +98,7 @@ error[E0624]: associated function `h` is private | LL | u.h(); | ^ private associated function - | + | ::: $DIR/auxiliary/pub_restricted.rs:15:5 | LL | crate fn h(&self) {} diff --git a/src/test/ui/proc-macro/auxiliary/api/parse.rs b/src/test/ui/proc-macro/auxiliary/api/parse.rs index a304c5e81a4bb..93551ebaf82d5 100644 --- a/src/test/ui/proc-macro/auxiliary/api/parse.rs +++ b/src/test/ui/proc-macro/auxiliary/api/parse.rs @@ -6,8 +6,8 @@ pub fn test() { } fn test_display_literal() { - assert_eq!(Literal::isize_unsuffixed(-10).to_string(), "- 10"); - assert_eq!(Literal::isize_suffixed(-10).to_string(), "- 10isize"); + assert_eq!(Literal::isize_unsuffixed(-10).to_string(), "-10"); + assert_eq!(Literal::isize_suffixed(-10).to_string(), "-10isize"); } fn test_parse_literal() { @@ -18,7 +18,7 @@ fn test_parse_literal() { assert_eq!("b\"\"".parse::().unwrap().to_string(), "b\"\""); assert_eq!("r##\"\"##".parse::().unwrap().to_string(), "r##\"\"##"); assert_eq!("10ulong".parse::().unwrap().to_string(), "10ulong"); - assert_eq!("-10ulong".parse::().unwrap().to_string(), "- 10ulong"); + assert_eq!("-10ulong".parse::().unwrap().to_string(), "-10ulong"); assert!("true".parse::().is_err()); assert!(".8".parse::().is_err()); diff --git a/src/test/ui/proc-macro/group-compat-hack/group-compat-hack.stderr b/src/test/ui/proc-macro/group-compat-hack/group-compat-hack.stderr index 070b066721350..001b345204d34 100644 --- a/src/test/ui/proc-macro/group-compat-hack/group-compat-hack.stderr +++ b/src/test/ui/proc-macro/group-compat-hack/group-compat-hack.stderr @@ -3,7 +3,7 @@ warning: using an old version of `time-macros-impl` | LL | #[my_macro] struct One($name); | ^^^^^ - | + | ::: $DIR/group-compat-hack.rs:27:5 | LL | impl_macros!(Foo); @@ -20,7 +20,7 @@ warning: using an old version of `time-macros-impl` | LL | #[my_macro] struct One($name); | ^^^^^ - | + | ::: $DIR/group-compat-hack.rs:44:5 | LL | impl_macros!(Foo); @@ -36,7 +36,7 @@ warning: using an old version of `js-sys` | LL | #[my_macro] struct Two($name); | ^^^^^ - | + | ::: $DIR/group-compat-hack.rs:46:5 | LL | arrays!(Foo); @@ -52,7 +52,7 @@ warning: using an old version of `actix-web` | LL | #[my_macro] struct Three($T); | ^^ - | + | ::: $DIR/group-compat-hack.rs:55:5 | LL | tuple_from_req!(Foo); @@ -68,7 +68,7 @@ warning: using an old version of `actix-web` | LL | #[my_macro] struct Three($T); | ^^ - | + | ::: $DIR/group-compat-hack.rs:63:5 | LL | tuple_from_req!(Foo); @@ -87,7 +87,7 @@ warning: using an old version of `time-macros-impl` | LL | #[my_macro] struct One($name); | ^^^^^ - | + | ::: $DIR/group-compat-hack.rs:27:5 | LL | impl_macros!(Foo); @@ -105,7 +105,7 @@ warning: using an old version of `time-macros-impl` | LL | #[my_macro] struct One($name); | ^^^^^ - | + | ::: $DIR/group-compat-hack.rs:44:5 | LL | impl_macros!(Foo); @@ -122,7 +122,7 @@ warning: using an old version of `js-sys` | LL | #[my_macro] struct Two($name); | ^^^^^ - | + | ::: $DIR/group-compat-hack.rs:46:5 | LL | arrays!(Foo); @@ -139,7 +139,7 @@ warning: using an old version of `actix-web` | LL | #[my_macro] struct Three($T); | ^^ - | + | ::: $DIR/group-compat-hack.rs:55:5 | LL | tuple_from_req!(Foo); @@ -156,7 +156,7 @@ warning: using an old version of `actix-web` | LL | #[my_macro] struct Three($T); | ^^ - | + | ::: $DIR/group-compat-hack.rs:63:5 | LL | tuple_from_req!(Foo); diff --git a/src/test/ui/proc-macro/parent-source-spans.stderr b/src/test/ui/proc-macro/parent-source-spans.stderr index 0af1b4a182295..071e103742e66 100644 --- a/src/test/ui/proc-macro/parent-source-spans.stderr +++ b/src/test/ui/proc-macro/parent-source-spans.stderr @@ -144,7 +144,7 @@ LL | parent_source_spans!($($tokens)*); ... LL | one!("hello", "world"); | ----------------------- in this macro invocation - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), @@ -160,7 +160,7 @@ LL | parent_source_spans!($($tokens)*); ... LL | two!("yay", "rust"); | -------------------- in this macro invocation - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), @@ -176,7 +176,7 @@ LL | parent_source_spans!($($tokens)*); ... LL | three!("hip", "hop"); | --------------------- in this macro invocation - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), diff --git a/src/test/ui/proc-macro/resolve-error.stderr b/src/test/ui/proc-macro/resolve-error.stderr index c5fbf0d1d99a4..e518c6ab80032 100644 --- a/src/test/ui/proc-macro/resolve-error.stderr +++ b/src/test/ui/proc-macro/resolve-error.stderr @@ -3,7 +3,7 @@ error: cannot find macro `bang_proc_macrp` in this scope | LL | bang_proc_macrp!(); | ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `bang_proc_macro` - | + | ::: $DIR/auxiliary/test-macros.rs:15:1 | LL | pub fn empty(_: TokenStream) -> TokenStream { @@ -50,7 +50,7 @@ error: cannot find derive macro `Dlona` in this scope | LL | #[derive(Dlona)] | ^^^^^ help: a derive macro with a similar name exists: `Clona` - | + | ::: $DIR/auxiliary/derive-clona.rs:11:1 | LL | pub fn derive_clonea(input: TokenStream) -> TokenStream { @@ -61,7 +61,7 @@ error: cannot find derive macro `Dlona` in this scope | LL | #[derive(Dlona)] | ^^^^^ help: a derive macro with a similar name exists: `Clona` - | + | ::: $DIR/auxiliary/derive-clona.rs:11:1 | LL | pub fn derive_clonea(input: TokenStream) -> TokenStream { @@ -72,7 +72,7 @@ error: cannot find derive macro `Dlone` in this scope | LL | #[derive(Dlone)] | ^^^^^ help: a derive macro with a similar name exists: `Clone` - | + | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | pub macro Clone($item:item) { @@ -83,7 +83,7 @@ error: cannot find derive macro `Dlone` in this scope | LL | #[derive(Dlone)] | ^^^^^ help: a derive macro with a similar name exists: `Clone` - | + | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | pub macro Clone($item:item) { @@ -100,7 +100,7 @@ error: cannot find attribute `attr_proc_macra` in this scope | LL | #[attr_proc_macra] | ^^^^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `attr_proc_macro` - | + | ::: $DIR/auxiliary/test-macros.rs:20:1 | LL | pub fn empty_attr(_: TokenStream, _: TokenStream) -> TokenStream { @@ -111,7 +111,7 @@ error: cannot find derive macro `FooWithLongNan` in this scope | LL | #[derive(FooWithLongNan)] | ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName` - | + | ::: $DIR/auxiliary/derive-foo.rs:11:1 | LL | pub fn derive_foo(input: TokenStream) -> TokenStream { @@ -122,7 +122,7 @@ error: cannot find derive macro `FooWithLongNan` in this scope | LL | #[derive(FooWithLongNan)] | ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName` - | + | ::: $DIR/auxiliary/derive-foo.rs:11:1 | LL | pub fn derive_foo(input: TokenStream) -> TokenStream { diff --git a/src/test/ui/proc-macro/span-from-proc-macro.stderr b/src/test/ui/proc-macro/span-from-proc-macro.stderr index c3904d62c8df3..11ee20e846d32 100644 --- a/src/test/ui/proc-macro/span-from-proc-macro.stderr +++ b/src/test/ui/proc-macro/span-from-proc-macro.stderr @@ -6,7 +6,7 @@ LL | pub fn error_from_attribute(_args: TokenStream, _input: TokenStream) -> Tok ... LL | field: MissingType | ^^^^^^^^^^^ not found in this scope - | + | ::: $DIR/span-from-proc-macro.rs:8:1 | LL | #[error_from_attribute] @@ -20,7 +20,7 @@ LL | pub fn error_from_derive(_input: TokenStream) -> TokenStream { ... LL | Variant(OtherMissingType) | ^^^^^^^^^^^^^^^^ not found in this scope - | + | ::: $DIR/span-from-proc-macro.rs:11:10 | LL | #[derive(ErrorFromDerive)] @@ -34,7 +34,7 @@ LL | pub fn other_error_from_bang(_input: TokenStream) -> TokenStream { LL | custom_quote::custom_quote! { LL | my_ident | ^^^^^^^^ not found in this scope - | + | ::: $DIR/span-from-proc-macro.rs:16:5 | LL | other_error_from_bang!(); @@ -50,7 +50,7 @@ LL | let bang_error: bool = 25; ... LL | pub fn error_from_bang(_input: TokenStream) -> TokenStream { | ---------------------------------------------------------- in this expansion of `error_from_bang!` - | + | ::: $DIR/span-from-proc-macro.rs:15:5 | LL | error_from_bang!(); diff --git a/src/test/ui/range/range-1.stderr b/src/test/ui/range/range-1.stderr index b282fa7803f03..53453ea04ddb4 100644 --- a/src/test/ui/range/range-1.stderr +++ b/src/test/ui/range/range-1.stderr @@ -23,7 +23,7 @@ error[E0277]: the size for values of type `[{integer}]` cannot be known at compi | LL | let range = *arr..; | ^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/ops/range.rs:LL:COL | LL | pub struct RangeFrom { diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr index dfb69a3cc1b42..f904a0ecd11cd 100644 --- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr +++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr @@ -3,7 +3,7 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered | LL | let Ok(x) = res; | ^^^^^ pattern `Err(_)` not covered - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), diff --git a/src/test/ui/resolve/issue-19452.stderr b/src/test/ui/resolve/issue-19452.stderr index 6c519d7348025..8df84067e6741 100644 --- a/src/test/ui/resolve/issue-19452.stderr +++ b/src/test/ui/resolve/issue-19452.stderr @@ -12,7 +12,7 @@ error[E0423]: expected value, found struct variant `issue_19452_aux::Homura::Mad | LL | let homura = issue_19452_aux::Homura::Madoka; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `issue_19452_aux::Homura::Madoka { /* fields */ }` - | + | ::: $DIR/auxiliary/issue-19452-aux.rs:2:5 | LL | Madoka { age: u32 } diff --git a/src/test/ui/resolve/levenshtein.stderr b/src/test/ui/resolve/levenshtein.stderr index 3c76f2684a702..a7f10f7719eac 100644 --- a/src/test/ui/resolve/levenshtein.stderr +++ b/src/test/ui/resolve/levenshtein.stderr @@ -18,7 +18,7 @@ error[E0412]: cannot find type `Opiton` in this scope | LL | type B = Opiton; // Misspelled type name from the prelude. | ^^^^^^ help: an enum with a similar name exists: `Option` - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | pub enum Option { diff --git a/src/test/ui/resolve/privacy-struct-ctor.stderr b/src/test/ui/resolve/privacy-struct-ctor.stderr index a72f69cf1cd8d..e5d6f7e9e24f0 100644 --- a/src/test/ui/resolve/privacy-struct-ctor.stderr +++ b/src/test/ui/resolve/privacy-struct-ctor.stderr @@ -103,7 +103,7 @@ error[E0603]: tuple struct constructor `S` is private | LL | xcrate::m::S; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18 | LL | pub struct S(u8); @@ -120,7 +120,7 @@ error[E0603]: tuple struct constructor `Z` is private | LL | xcrate::m::n::Z; | ^ private tuple struct constructor - | + | ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28 | LL | pub(in m) struct Z(pub(in m::n) u8); diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index e33253b19c4bd..e32d89fe6beeb 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -7,7 +7,7 @@ LL | / fn can_parse_zero_as_f32() -> Result { LL | | "0".parse() LL | | } | |_^ `main` can only return types that implement `Termination` - | + | ::: $SRC_DIR/test/src/lib.rs:LL:COL | LL | pub fn assert_test_result(result: T) { diff --git a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr index d023ba3096e68..141363fc32caa 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr @@ -15,7 +15,7 @@ error[E0603]: tuple struct constructor `TupleStruct` is private | LL | let ts_explicit = structs::TupleStruct(640, 480); | ^^^^^^^^^^^ private tuple struct constructor - | + | ::: $DIR/auxiliary/structs.rs:11:24 | LL | pub struct TupleStruct(pub u16, pub u16); diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr index 746c1fd4aceb7..d21a94a0d6498 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr @@ -30,7 +30,7 @@ error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covere | LL | match x {} | ^ patterns `Tuple(_)` and `Struct { .. }` not covered - | + | ::: $DIR/auxiliary/uninhabited.rs:17:23 | LL | #[non_exhaustive] Tuple(!), diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr index 46e84dc09a3ea..cc3dc6c29b904 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr @@ -30,7 +30,7 @@ error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covere | LL | match x {} | ^ patterns `Tuple(_)` and `Struct { .. }` not covered - | + | ::: $DIR/auxiliary/uninhabited.rs:17:23 | LL | #[non_exhaustive] Tuple(!), diff --git a/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr b/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr index ad9b8af00e467..7a63e6f6e686a 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr @@ -3,7 +3,7 @@ error[E0599]: no method named `try_into` found for type `u8` in the current scop | LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^ method not found in `u8` - | + | ::: $SRC_DIR/core/src/convert/mod.rs:LL:COL | LL | fn try_into(self) -> Result; diff --git a/src/test/ui/span/transitive-dep-span.stderr b/src/test/ui/span/transitive-dep-span.stderr index 68d8911a4351c..1787b0ee19ad6 100644 --- a/src/test/ui/span/transitive-dep-span.stderr +++ b/src/test/ui/span/transitive-dep-span.stderr @@ -6,7 +6,7 @@ LL | | () => { parse error } | | ^^^^^ expected one of `!` or `::` LL | | } | |_________- in this expansion of `transitive_dep_two::parse_error!` - | + | ::: $DIR/transitive-dep-span.rs:13:1 | LL | transitive_dep_two::parse_error!(); diff --git a/src/test/ui/suggestions/attribute-typos.stderr b/src/test/ui/suggestions/attribute-typos.stderr index 6a825c534b5e2..d6163a5a7cfe3 100644 --- a/src/test/ui/suggestions/attribute-typos.stderr +++ b/src/test/ui/suggestions/attribute-typos.stderr @@ -15,7 +15,7 @@ error: cannot find attribute `tests` in this scope | LL | #[tests] | ^^^^^ help: an attribute macro with a similar name exists: `test` - | + | ::: $SRC_DIR/core/src/macros/mod.rs:LL:COL | LL | pub macro test($item:item) { diff --git a/src/test/ui/suggestions/do-not-attempt-to-add-suggestions-with-no-changes.stderr b/src/test/ui/suggestions/do-not-attempt-to-add-suggestions-with-no-changes.stderr index 59ccb29e0901a..7bdc8e00f447d 100644 --- a/src/test/ui/suggestions/do-not-attempt-to-add-suggestions-with-no-changes.stderr +++ b/src/test/ui/suggestions/do-not-attempt-to-add-suggestions-with-no-changes.stderr @@ -3,7 +3,7 @@ error[E0573]: expected type, found module `result` | LL | impl result { | ^^^^^^ help: an enum with a similar name exists: `Result` - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | pub enum Result { diff --git a/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr b/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr index 119599c22a63b..c4eeb3aaa5709 100644 --- a/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr +++ b/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr @@ -77,7 +77,7 @@ LL | / async { LL | | 42 LL | | } | |_____^ expected struct `Pin`, found opaque type - | + | ::: $SRC_DIR/core/src/future/mod.rs:LL:COL | LL | pub const fn from_generator(gen: T) -> impl Future diff --git a/src/test/ui/suggestions/imm-ref-trait-object.stderr b/src/test/ui/suggestions/imm-ref-trait-object.stderr index 9f89dcd912e1d..42ca3a78d8f9f 100644 --- a/src/test/ui/suggestions/imm-ref-trait-object.stderr +++ b/src/test/ui/suggestions/imm-ref-trait-object.stderr @@ -3,7 +3,7 @@ error: the `min` method cannot be invoked on a trait object | LL | t.min().unwrap() | ^^^ - | + | ::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | LL | Self: Sized, diff --git a/src/test/ui/suggestions/import-trait-for-method-call.stderr b/src/test/ui/suggestions/import-trait-for-method-call.stderr index a2b9b9d14ab09..bac8de7987256 100644 --- a/src/test/ui/suggestions/import-trait-for-method-call.stderr +++ b/src/test/ui/suggestions/import-trait-for-method-call.stderr @@ -3,7 +3,7 @@ error[E0599]: no method named `finish` found for struct `DefaultHasher` in the c | LL | h.finish() | ^^^^^^ method not found in `DefaultHasher` - | + | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | LL | fn finish(&self) -> u64; diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr index 4d1b5306bb130..07fdffd8bedec 100644 --- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr +++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr @@ -16,7 +16,7 @@ error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satis | LL | let fp = BufWriter::new(fp); | ^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write` - | + | ::: $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL | LL | pub struct BufWriter { @@ -29,7 +29,7 @@ error[E0599]: the method `write_fmt` exists for struct `BufWriter<&dyn std::io:: | LL | writeln!(fp, "hello world").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `BufWriter<&dyn std::io::Write>` due to unsatisfied trait bounds - | + | ::: $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL | LL | pub struct BufWriter { diff --git a/src/test/ui/suggestions/suggest-change-mut.stderr b/src/test/ui/suggestions/suggest-change-mut.stderr index e68152d5fc3aa..8384f952b6849 100644 --- a/src/test/ui/suggestions/suggest-change-mut.stderr +++ b/src/test/ui/suggestions/suggest-change-mut.stderr @@ -27,7 +27,7 @@ error[E0599]: the method `read_until` exists for struct `BufReader<&T>`, but its | LL | stream_reader.read_until(b'\n', &mut buffer).expect("Reading into buffer failed"); | ^^^^^^^^^^ method cannot be called on `BufReader<&T>` due to unsatisfied trait bounds - | + | ::: $SRC_DIR/std/src/io/buffered/bufreader.rs:LL:COL | LL | pub struct BufReader { diff --git a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr index 7cf872eb6ac69..bfdd121012ae0 100644 --- a/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr +++ b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr @@ -3,7 +3,7 @@ error[E0404]: expected trait, found struct `String` | LL | struct Foo where T: Bar, ::Baz: String { | ^^^^^^ not a trait - | + | ::: $SRC_DIR/alloc/src/string.rs:LL:COL | LL | pub trait ToString { @@ -23,7 +23,7 @@ error[E0404]: expected trait, found struct `String` | LL | struct Qux<'a, T> where T: Bar, <&'a T as Bar>::Baz: String { | ^^^^^^ not a trait - | + | ::: $SRC_DIR/alloc/src/string.rs:LL:COL | LL | pub trait ToString { @@ -43,7 +43,7 @@ error[E0404]: expected trait, found struct `String` | LL | fn foo(_: T) where ::Baz: String { | ^^^^^^ not a trait - | + | ::: $SRC_DIR/alloc/src/string.rs:LL:COL | LL | pub trait ToString { @@ -63,7 +63,7 @@ error[E0404]: expected trait, found struct `String` | LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: String { | ^^^^^^ not a trait - | + | ::: $SRC_DIR/alloc/src/string.rs:LL:COL | LL | pub trait ToString { diff --git a/src/test/ui/traits/bad-sized.stderr b/src/test/ui/traits/bad-sized.stderr index 5a9d4286ce6d1..58e34cfe15c3d 100644 --- a/src/test/ui/traits/bad-sized.stderr +++ b/src/test/ui/traits/bad-sized.stderr @@ -14,7 +14,7 @@ error[E0277]: the size for values of type `dyn Trait` cannot be known at compila | LL | let x: Vec = Vec::new(); | ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | LL | pub struct Vec { @@ -40,7 +40,7 @@ error[E0277]: the size for values of type `dyn Trait` cannot be known at compila | LL | let x: Vec = Vec::new(); | ^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | LL | pub struct Vec { diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr b/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr index 0adb20d482877..91552d4ea07d4 100644 --- a/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `usize: Trait` is not satisfied | LL | fn explode(x: Foo) {} | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize` - | + | ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:5:18 | LL | pub struct Foo { @@ -14,7 +14,7 @@ error[E0277]: the trait bound `f32: Trait` is not satisfied | LL | fn kaboom(y: Bar) {} | ^^^^^^^^ the trait `Trait` is not implemented for `f32` - | + | ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16 | LL | pub enum Bar { diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr index ada2445c1c962..7d54a559e8b7e 100644 --- a/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `f64: Trait` is not satisfied | LL | let bar: Bar = return; | ^^^^^^^^ the trait `Trait` is not implemented for `f64` - | + | ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16 | LL | pub enum Bar { diff --git a/src/test/ui/traits/bound/same-crate-name.stderr b/src/test/ui/traits/bound/same-crate-name.stderr index c48f2f0efcfb2..ce163b501b79b 100644 --- a/src/test/ui/traits/bound/same-crate-name.stderr +++ b/src/test/ui/traits/bound/same-crate-name.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied | LL | a::try_foo(foo); | ^^^ the trait `main::a::Bar` is not implemented for `Foo` - | + | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} @@ -21,7 +21,7 @@ error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satis | LL | a::try_foo(implements_no_traits); | ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait` - | + | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} @@ -32,7 +32,7 @@ error[E0277]: the trait bound `ImplementsWrongTraitConditionally: main::a | LL | a::try_foo(other_variant_implements_mismatched_trait); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally` - | + | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} @@ -50,7 +50,7 @@ error[E0277]: the trait bound `ImplementsTraitForUsize: main::a::Bar` is | LL | a::try_foo(other_variant_implements_correct_trait); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize` - | + | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} diff --git a/src/test/ui/traits/mutual-recursion-issue-75860.stderr b/src/test/ui/traits/mutual-recursion-issue-75860.stderr index cf867ef78c3b1..91c4136a752fb 100644 --- a/src/test/ui/traits/mutual-recursion-issue-75860.stderr +++ b/src/test/ui/traits/mutual-recursion-issue-75860.stderr @@ -3,7 +3,7 @@ error[E0275]: overflow evaluating the requirement `Option<_>: Sized` | LL | iso(left, right) | ^^^ - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | pub enum Option { diff --git a/src/test/ui/traits/suggest-deferences/issue-39029.stderr b/src/test/ui/traits/suggest-deferences/issue-39029.stderr index 1005231d396e7..d1778a284dad8 100644 --- a/src/test/ui/traits/suggest-deferences/issue-39029.stderr +++ b/src/test/ui/traits/suggest-deferences/issue-39029.stderr @@ -6,7 +6,7 @@ LL | let _errors = TcpListener::bind(&bad); | | | the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs` | help: consider adding dereference here: `&*bad` - | + | ::: $SRC_DIR/std/src/net/tcp.rs:LL:COL | LL | pub fn bind(addr: A) -> io::Result { diff --git a/src/test/ui/traits/suggest-where-clause.stderr b/src/test/ui/traits/suggest-where-clause.stderr index 47f287807d4b9..c34e3261fe185 100644 --- a/src/test/ui/traits/suggest-where-clause.stderr +++ b/src/test/ui/traits/suggest-where-clause.stderr @@ -6,7 +6,7 @@ LL | fn check() { LL | // suggest a where-clause, if needed LL | mem::size_of::(); | ^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -25,7 +25,7 @@ LL | fn check() { ... LL | mem::size_of::>(); | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -90,7 +90,7 @@ error[E0277]: the size for values of type `[T]` cannot be known at compilation t | LL | mem::size_of::<[T]>(); | ^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { @@ -103,7 +103,7 @@ error[E0277]: the size for values of type `[&U]` cannot be known at compilation | LL | mem::size_of::<[&U]>(); | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub const fn size_of() -> usize { diff --git a/src/test/ui/typeck/issue-83693.stderr b/src/test/ui/typeck/issue-83693.stderr index e5ef0d0d59f73..0d8bbf1ce98c1 100644 --- a/src/test/ui/typeck/issue-83693.stderr +++ b/src/test/ui/typeck/issue-83693.stderr @@ -3,7 +3,7 @@ error[E0412]: cannot find type `F` in this scope | LL | impl F { | ^ help: a trait with a similar name exists: `Fn` - | + | ::: $SRC_DIR/core/src/ops/function.rs:LL:COL | LL | pub trait Fn: FnMut { diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr index 4f2f9e070fe52..b92ceb479bd3b 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr +++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr @@ -3,7 +3,7 @@ error[E0004]: non-exhaustive patterns: `Err(_)` not covered | LL | let _ = match x { | ^ pattern `Err(_)` not covered - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), @@ -57,7 +57,7 @@ error[E0004]: non-exhaustive patterns: `Err(_)` not covered | LL | let _ = match x { | ^ pattern `Err(_)` not covered - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), @@ -71,7 +71,7 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered | LL | let Ok(x) = x; | ^^^^^ pattern `Err(_)` not covered - | + | ::: $SRC_DIR/core/src/result.rs:LL:COL | LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), diff --git a/src/test/ui/union/union-derive-clone.mirunsafeck.stderr b/src/test/ui/union/union-derive-clone.mirunsafeck.stderr index 41e828c6d9515..9c4ee28a2adb4 100644 --- a/src/test/ui/union/union-derive-clone.mirunsafeck.stderr +++ b/src/test/ui/union/union-derive-clone.mirunsafeck.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `U1: Copy` is not satisfied | LL | #[derive(Clone)] | ^^^^^ the trait `Copy` is not implemented for `U1` - | + | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | pub struct AssertParamIsCopy { diff --git a/src/test/ui/union/union-derive-clone.thirunsafeck.stderr b/src/test/ui/union/union-derive-clone.thirunsafeck.stderr index 41e828c6d9515..9c4ee28a2adb4 100644 --- a/src/test/ui/union/union-derive-clone.thirunsafeck.stderr +++ b/src/test/ui/union/union-derive-clone.thirunsafeck.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `U1: Copy` is not satisfied | LL | #[derive(Clone)] | ^^^^^ the trait `Copy` is not implemented for `U1` - | + | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | pub struct AssertParamIsCopy { diff --git a/src/test/ui/union/union-derive-eq.mirunsafeck.stderr b/src/test/ui/union/union-derive-eq.mirunsafeck.stderr index c2fd8545f63ad..1d768315d9f65 100644 --- a/src/test/ui/union/union-derive-eq.mirunsafeck.stderr +++ b/src/test/ui/union/union-derive-eq.mirunsafeck.stderr @@ -6,7 +6,7 @@ LL | #[derive(Eq)] LL | union U2 { LL | a: PartialEqNotEq, | ^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `PartialEqNotEq` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { diff --git a/src/test/ui/union/union-derive-eq.thirunsafeck.stderr b/src/test/ui/union/union-derive-eq.thirunsafeck.stderr index c2fd8545f63ad..1d768315d9f65 100644 --- a/src/test/ui/union/union-derive-eq.thirunsafeck.stderr +++ b/src/test/ui/union/union-derive-eq.thirunsafeck.stderr @@ -6,7 +6,7 @@ LL | #[derive(Eq)] LL | union U2 { LL | a: PartialEqNotEq, | ^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `PartialEqNotEq` - | + | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { diff --git a/src/test/ui/union/union-drop.rs b/src/test/ui/union/union-drop.rs index 9edf582751152..c3d7d41ca35fb 100644 --- a/src/test/ui/union/union-drop.rs +++ b/src/test/ui/union/union-drop.rs @@ -1,4 +1,7 @@ // run-pass +// revisions: mirunsafeck thirunsafeck +// [thirunsafeck]compile-flags: -Z thir-unsafeck + #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/ui/union/union-drop.thirunsafeck.stderr b/src/test/ui/union/union-drop.thirunsafeck.stderr deleted file mode 100644 index 9766ae4e435f2..0000000000000 --- a/src/test/ui/union/union-drop.thirunsafeck.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: unnecessary `unsafe` block - --> $DIR/union-drop.rs:27:9 - | -LL | unsafe { CHECK += 1; } - | ^^^^^^ unnecessary `unsafe` block - | - = note: `#[warn(unused_unsafe)]` on by default - -warning: unnecessary `unsafe` block - --> $DIR/union-drop.rs:33:9 - | -LL | unsafe { CHECK += 1; } - | ^^^^^^ unnecessary `unsafe` block - -warning: unnecessary `unsafe` block - --> $DIR/union-drop.rs:40:5 - | -LL | unsafe { - | ^^^^^^ unnecessary `unsafe` block - -warning: 3 warnings emitted - diff --git a/src/test/ui/unique-object-noncopyable.stderr b/src/test/ui/unique-object-noncopyable.stderr index 6a355dd256286..5c40787febfb7 100644 --- a/src/test/ui/unique-object-noncopyable.stderr +++ b/src/test/ui/unique-object-noncopyable.stderr @@ -9,7 +9,7 @@ LL | trait Foo { ... LL | let _z = y.clone(); | ^^^^^ method cannot be called on `Box` due to unsatisfied trait bounds - | + | ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL | LL | / pub struct Box< diff --git a/src/test/ui/unique-pinned-nocopy.stderr b/src/test/ui/unique-pinned-nocopy.stderr index a4421bcf8097e..8e0804ebf9be9 100644 --- a/src/test/ui/unique-pinned-nocopy.stderr +++ b/src/test/ui/unique-pinned-nocopy.stderr @@ -6,7 +6,7 @@ LL | struct R { ... LL | let _j = i.clone(); | ^^^^^ method cannot be called on `Box` due to unsatisfied trait bounds - | + | ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL | LL | / pub struct Box< diff --git a/src/test/ui/unsafe/union-assignop.mirunsafeck.stderr b/src/test/ui/unsafe/union-assignop.mirunsafeck.stderr new file mode 100644 index 0000000000000..cd338ac9e3a27 --- /dev/null +++ b/src/test/ui/unsafe/union-assignop.mirunsafeck.stderr @@ -0,0 +1,59 @@ +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:20:5 + | +LL | foo.a += 5; + | ^^^^^^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:21:5 + | +LL | foo.b += Dropping; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: assignment to union field that might need dropping is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:22:5 + | +LL | foo.b = Dropping; + | ^^^^^^^^^^^^^^^^ assignment to union field that might need dropping + | + = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:23:5 + | +LL | foo.a; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:25:5 + | +LL | foo.b; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:27:13 + | +LL | foo.b = foo.b; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: assignment to union field that might need dropping is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:27:5 + | +LL | foo.b = foo.b; + | ^^^^^^^^^^^^^ assignment to union field that might need dropping + | + = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0133`. diff --git a/src/test/ui/unsafe/union-assignop.rs b/src/test/ui/unsafe/union-assignop.rs new file mode 100644 index 0000000000000..c4be20aa567b7 --- /dev/null +++ b/src/test/ui/unsafe/union-assignop.rs @@ -0,0 +1,30 @@ +// revisions: mirunsafeck thirunsafeck +// [thirunsafeck]compile-flags: -Z thir-unsafeck + +#![feature(untagged_unions)] + +use std::ops::AddAssign; + +struct Dropping; +impl AddAssign for Dropping { + fn add_assign(&mut self, _: Self) {} +} + +union Foo { + a: u8, // non-dropping + b: Dropping, // treated as dropping +} + +fn main() { + let mut foo = Foo { a: 42 }; + foo.a += 5; //~ ERROR access to union field is unsafe + foo.b += Dropping; //~ ERROR access to union field is unsafe + foo.b = Dropping; //~ ERROR assignment to union field that might need dropping is unsafe + foo.a; //~ ERROR access to union field is unsafe + let foo = Foo { a: 42 }; + foo.b; //~ ERROR access to union field is unsafe + let mut foo = Foo { a: 42 }; + foo.b = foo.b; + //~^ ERROR access to union field is unsafe + //~| ERROR assignment to union field that might need dropping +} diff --git a/src/test/ui/unsafe/union-assignop.thirunsafeck.stderr b/src/test/ui/unsafe/union-assignop.thirunsafeck.stderr new file mode 100644 index 0000000000000..71de421a2553e --- /dev/null +++ b/src/test/ui/unsafe/union-assignop.thirunsafeck.stderr @@ -0,0 +1,59 @@ +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:20:5 + | +LL | foo.a += 5; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:21:5 + | +LL | foo.b += Dropping; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: assignment to union field that might need dropping is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:22:5 + | +LL | foo.b = Dropping; + | ^^^^^^^^^^^^^^^^ assignment to union field that might need dropping + | + = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:23:5 + | +LL | foo.a; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:25:5 + | +LL | foo.b; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error[E0133]: assignment to union field that might need dropping is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:27:5 + | +LL | foo.b = foo.b; + | ^^^^^^^^^^^^^ assignment to union field that might need dropping + | + = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized + +error[E0133]: access to union field is unsafe and requires unsafe function or block + --> $DIR/union-assignop.rs:27:13 + | +LL | foo.b = foo.b; + | ^^^^^ access to union field + | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0133`. diff --git a/src/test/ui/wf/wf-impl-self-type.stderr b/src/test/ui/wf/wf-impl-self-type.stderr index bc30fc90f3a28..918e5feb28657 100644 --- a/src/test/ui/wf/wf-impl-self-type.stderr +++ b/src/test/ui/wf/wf-impl-self-type.stderr @@ -3,7 +3,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation | LL | impl Foo for Option<[u8]> {} | ^^^^^^^^^^^^ doesn't have a size known at compile-time - | + | ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | pub enum Option { diff --git a/src/test/ui/xc-private-method.stderr b/src/test/ui/xc-private-method.stderr index 69b414cc8f923..0eabc592aa41e 100644 --- a/src/test/ui/xc-private-method.stderr +++ b/src/test/ui/xc-private-method.stderr @@ -3,7 +3,7 @@ error[E0624]: associated function `static_meth_struct` is private | LL | let _ = xc_private_method_lib::Struct::static_meth_struct(); | ^^^^^^^^^^^^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/xc-private-method-lib.rs:8:5 | LL | fn static_meth_struct() -> Struct { @@ -14,7 +14,7 @@ error[E0624]: associated function `static_meth_enum` is private | LL | let _ = xc_private_method_lib::Enum::static_meth_enum(); | ^^^^^^^^^^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/xc-private-method-lib.rs:23:5 | LL | fn static_meth_enum() -> Enum { diff --git a/src/test/ui/xc-private-method2.stderr b/src/test/ui/xc-private-method2.stderr index 685ce0e0a186f..b569882f8c159 100644 --- a/src/test/ui/xc-private-method2.stderr +++ b/src/test/ui/xc-private-method2.stderr @@ -3,7 +3,7 @@ error[E0624]: associated function `meth_struct` is private | LL | let _ = xc_private_method_lib::Struct{ x: 10 }.meth_struct(); | ^^^^^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/xc-private-method-lib.rs:12:5 | LL | fn meth_struct(&self) -> isize { @@ -14,7 +14,7 @@ error[E0624]: associated function `meth_enum` is private | LL | let _ = xc_private_method_lib::Enum::Variant1(20).meth_enum(); | ^^^^^^^^^ private associated function - | + | ::: $DIR/auxiliary/xc-private-method-lib.rs:27:5 | LL | fn meth_enum(&self) -> isize { diff --git a/src/test/ui/xcrate/xcrate-unit-struct.stderr b/src/test/ui/xcrate/xcrate-unit-struct.stderr index 3dc8b90795c4d..cee314568887c 100644 --- a/src/test/ui/xcrate/xcrate-unit-struct.stderr +++ b/src/test/ui/xcrate/xcrate-unit-struct.stderr @@ -3,7 +3,7 @@ error[E0423]: expected value, found struct `xcrate_unit_struct::StructWithFields | LL | let _ = xcrate_unit_struct::StructWithFields; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `xcrate_unit_struct::StructWithFields { foo: val }` - | + | ::: $DIR/auxiliary/xcrate_unit_struct.rs:20:1 | LL | pub struct StructWithFields { diff --git a/src/tools/cargo b/src/tools/cargo index d21c22870e584..cc17afbb0067b 160000 --- a/src/tools/cargo +++ b/src/tools/cargo @@ -1 +1 @@ -Subproject commit d21c22870e58499d6c31f1bef3bf1255eb021666 +Subproject commit cc17afbb0067b1f57d8882640f63b2168d5b7624