diff options
Diffstat (limited to 'tests')
77 files changed, 436 insertions, 353 deletions
diff --git a/tests/auxiliary/minicore.rs b/tests/auxiliary/minicore.rs index 392ad1cee14..47dadd51ce0 100644 --- a/tests/auxiliary/minicore.rs +++ b/tests/auxiliary/minicore.rs @@ -142,6 +142,10 @@ pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) { /* compiler built-in */ } +#[rustc_builtin_macro] +pub macro cfg_select($($tt:tt)*) { + /* compiler built-in */ +} #[rustc_builtin_macro] #[macro_export] diff --git a/tests/incremental/hashes/inherent_impls.rs b/tests/incremental/hashes/inherent_impls.rs index caea394977a..044c3d2b86c 100644 --- a/tests/incremental/hashes/inherent_impls.rs +++ b/tests/incremental/hashes/inherent_impls.rs @@ -150,7 +150,7 @@ impl Foo { } #[cfg(not(any(cfail1,cfail4)))] -#[rustc_clean(cfg="cfail2", except="opt_hir_owner_nodes")] +#[rustc_clean(cfg="cfail2")] #[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail5", except="opt_hir_owner_nodes")] #[rustc_clean(cfg="cfail6")] diff --git a/tests/incremental/hashes/trait_impls.rs b/tests/incremental/hashes/trait_impls.rs index 8faf6806b90..a89b5b3e782 100644 --- a/tests/incremental/hashes/trait_impls.rs +++ b/tests/incremental/hashes/trait_impls.rs @@ -141,7 +141,7 @@ pub trait ChangeMethodSelfnessTrait { } #[cfg(not(any(cfail1,cfail4)))] -#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail2")] +#[rustc_clean(cfg="cfail2")] #[rustc_clean(cfg="cfail3")] #[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail5")] #[rustc_clean(cfg="cfail6")] @@ -179,7 +179,7 @@ pub trait RemoveMethodSelfnessTrait { } #[cfg(not(any(cfail1,cfail4)))] -#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail2")] +#[rustc_clean(cfg="cfail2")] #[rustc_clean(cfg="cfail3")] #[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail5")] #[rustc_clean(cfg="cfail6")] diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr index be3de580983..5ce815b9aed 100644 --- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr +++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr @@ -16,7 +16,7 @@ error[E0658]: const trait impls are experimental LL | trait Bar: ~const Foo {} | ^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -26,7 +26,7 @@ error[E0658]: const trait impls are experimental LL | const fn foo<T: ~const Bar>(x: &T) { | ^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr index a23793580f7..3dc147e076f 100644 --- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr +++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr @@ -16,7 +16,7 @@ error[E0658]: const trait impls are experimental 7 | trait Bar: ~const Foo {} | ^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information error[E0658]: const trait impls are experimental --> const-super-trait.rs:9:17 @@ -24,7 +24,7 @@ error[E0658]: const trait impls are experimental 9 | const fn foo<T: ~const Bar>(x: &T) { | ^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information error: `[const]` can only be applied to `#[const_trait]` traits --> const-super-trait.rs:7:12 diff --git a/tests/ui-fulldeps/stable-mir/check_abi.rs b/tests/ui-fulldeps/stable-mir/check_abi.rs index 9d83dd9ce1a..fc2227d147d 100644 --- a/tests/ui-fulldeps/stable-mir/check_abi.rs +++ b/tests/ui-fulldeps/stable-mir/check_abi.rs @@ -14,17 +14,17 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::abi::{ +use rustc_public::abi::{ ArgAbi, CallConvention, FieldsShape, IntegerLength, PassMode, Primitive, Scalar, ValueAbi, VariantsShape, }; -use stable_mir::mir::MirVisitor; -use stable_mir::mir::mono::Instance; -use stable_mir::target::MachineInfo; -use stable_mir::ty::{AdtDef, RigidTy, Ty, TyKind}; -use stable_mir::{CrateDef, CrateItem, CrateItems, ItemKind}; +use rustc_public::mir::MirVisitor; +use rustc_public::mir::mono::Instance; +use rustc_public::target::MachineInfo; +use rustc_public::ty::{AdtDef, RigidTy, Ty, TyKind}; +use rustc_public::{CrateDef, CrateItem, CrateItems, ItemKind}; use std::assert_matches::assert_matches; use std::collections::HashSet; use std::convert::TryFrom; @@ -36,7 +36,7 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { // Find items in the local crate. - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); // Test fn_abi let target_fn = *get_item(&items, (ItemKind::Fn, "fn_abi")).unwrap(); @@ -69,7 +69,7 @@ fn test_stable_mir() -> ControlFlow<()> { assert!(ptr_variadic_fn_abi.c_variadic); assert_eq!(ptr_variadic_fn_abi.args.len(), 1); - let entry = stable_mir::entry_fn().unwrap(); + let entry = rustc_public::entry_fn().unwrap(); let main_fn = Instance::try_from(entry).unwrap(); let mut visitor = AdtDefVisitor::default(); visitor.visit_body(&main_fn.body().unwrap()); @@ -147,7 +147,7 @@ fn check_niche(abi: &ArgAbi) { fn get_item<'a>( items: &'a CrateItems, item: (ItemKind, &str), -) -> Option<&'a stable_mir::CrateItem> { +) -> Option<&'a rustc_public::CrateItem> { items.iter().find(|crate_item| (item.0 == crate_item.kind()) && crate_item.name() == item.1) } @@ -157,7 +157,7 @@ struct AdtDefVisitor { } impl MirVisitor for AdtDefVisitor { - fn visit_ty(&mut self, ty: &Ty, _location: stable_mir::mir::visit::Location) { + fn visit_ty(&mut self, ty: &Ty, _location: rustc_public::mir::visit::Location) { if let TyKind::RigidTy(RigidTy::Adt(adt, _)) = ty.kind() { self.adt_defs.insert(adt); } diff --git a/tests/ui-fulldeps/stable-mir/check_allocation.rs b/tests/ui-fulldeps/stable-mir/check_allocation.rs index c2d1d5d873b..83845a9aa42 100644 --- a/tests/ui-fulldeps/stable-mir/check_allocation.rs +++ b/tests/ui-fulldeps/stable-mir/check_allocation.rs @@ -17,7 +17,7 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use std::ascii::Char; use std::assert_matches::assert_matches; @@ -27,19 +27,19 @@ use std::ffi::CStr; use std::io::Write; use std::ops::ControlFlow; -use stable_mir::crate_def::CrateDef; -use stable_mir::mir::Body; -use stable_mir::mir::alloc::GlobalAlloc; -use stable_mir::mir::mono::{Instance, StaticDef}; -use stable_mir::ty::{Allocation, ConstantKind}; -use stable_mir::{CrateItem, CrateItems, ItemKind}; +use rustc_public::crate_def::CrateDef; +use rustc_public::mir::Body; +use rustc_public::mir::alloc::GlobalAlloc; +use rustc_public::mir::mono::{Instance, StaticDef}; +use rustc_public::ty::{Allocation, ConstantKind}; +use rustc_public::{CrateItem, CrateItems, ItemKind}; const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { // Find items in the local crate. - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); check_foo(*get_item(&items, (ItemKind::Static, "FOO")).unwrap()); check_bar(*get_item(&items, (ItemKind::Static, "BAR")).unwrap()); check_len(*get_item(&items, (ItemKind::Static, "LEN")).unwrap()); @@ -164,7 +164,7 @@ fn check_other_consts(item: CrateItem) { } let bool_id = bool_id.unwrap(); let char_id = char_id.unwrap(); - // FIXME(stable_mir): add `read_ptr` to `Allocation` + // FIXME(rustc_public): add `read_ptr` to `Allocation` assert_ne!(bool_id, char_id); } @@ -196,7 +196,7 @@ fn check_len(item: CrateItem) { fn get_item<'a>( items: &'a CrateItems, item: (ItemKind, &str), -) -> Option<&'a stable_mir::CrateItem> { +) -> Option<&'a rustc_public::CrateItem> { items.iter().find(|crate_item| (item.0 == crate_item.kind()) && crate_item.name() == item.1) } diff --git a/tests/ui-fulldeps/stable-mir/check_assoc_items.rs b/tests/ui-fulldeps/stable-mir/check_assoc_items.rs index 574f7797854..1557991f8ca 100644 --- a/tests/ui-fulldeps/stable-mir/check_assoc_items.rs +++ b/tests/ui-fulldeps/stable-mir/check_assoc_items.rs @@ -14,20 +14,20 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; -extern crate stable_mir; +extern crate rustc_public; use std::collections::HashSet; use std::io::Write; use std::ops::ControlFlow; -use stable_mir::ty::*; -use stable_mir::{CrateDef, *}; +use rustc_public::ty::*; +use rustc_public::{CrateDef, *}; const CRATE_NAME: &str = "crate_assoc_items"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_assoc_items() -> ControlFlow<()> { - let local_crate = stable_mir::local_crate(); + let local_crate = rustc_public::local_crate(); check_items( &local_crate.fn_defs(), &[ diff --git a/tests/ui-fulldeps/stable-mir/check_attribute.rs b/tests/ui-fulldeps/stable-mir/check_attribute.rs index f234c658dfd..d8807872ec4 100644 --- a/tests/ui-fulldeps/stable-mir/check_attribute.rs +++ b/tests/ui-fulldeps/stable-mir/check_attribute.rs @@ -13,9 +13,9 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::{CrateDef, CrateItems}; +use rustc_public::{CrateDef, CrateItems}; use std::io::Write; use std::ops::ControlFlow; @@ -24,7 +24,7 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { // Find items in the local crate. - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); test_tool(&items); @@ -46,7 +46,7 @@ fn test_tool(items: &CrateItems) { fn get_item<'a>( items: &'a CrateItems, name: &str, -) -> Option<&'a stable_mir::CrateItem> { +) -> Option<&'a rustc_public::CrateItem> { items.iter().find(|crate_item| crate_item.name() == name) } diff --git a/tests/ui-fulldeps/stable-mir/check_binop.rs b/tests/ui-fulldeps/stable-mir/check_binop.rs index 748c2088a30..aa089a5d125 100644 --- a/tests/ui-fulldeps/stable-mir/check_binop.rs +++ b/tests/ui-fulldeps/stable-mir/check_binop.rs @@ -13,12 +13,12 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::mir::mono::Instance; -use stable_mir::mir::visit::{Location, MirVisitor}; -use stable_mir::mir::{LocalDecl, Rvalue, Statement, StatementKind, Terminator, TerminatorKind}; -use stable_mir::ty::{RigidTy, TyKind}; +use rustc_public::mir::mono::Instance; +use rustc_public::mir::visit::{Location, MirVisitor}; +use rustc_public::mir::{LocalDecl, Rvalue, Statement, StatementKind, Terminator, TerminatorKind}; +use rustc_public::ty::{RigidTy, TyKind}; use std::collections::HashSet; use std::convert::TryFrom; use std::io::Write; @@ -27,7 +27,7 @@ use std::ops::ControlFlow; /// This function tests that we can correctly get type information from binary operations. fn test_binops() -> ControlFlow<()> { // Find items in the local crate. - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); let mut instances = items.into_iter().map(|item| Instance::try_from(item).unwrap()).collect::<Vec<_>>(); while let Some(instance) = instances.pop() { diff --git a/tests/ui-fulldeps/stable-mir/check_coroutine_body.rs b/tests/ui-fulldeps/stable-mir/check_coroutine_body.rs index 2af32afc1f7..725b538b0fe 100644 --- a/tests/ui-fulldeps/stable-mir/check_coroutine_body.rs +++ b/tests/ui-fulldeps/stable-mir/check_coroutine_body.rs @@ -14,18 +14,18 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use std::io::Write; use std::ops::ControlFlow; -use stable_mir::mir::Body; -use stable_mir::ty::{RigidTy, TyKind}; +use rustc_public::mir::Body; +use rustc_public::ty::{RigidTy, TyKind}; const CRATE_NAME: &str = "crate_coroutine_body"; fn test_coroutine_body() -> ControlFlow<()> { - let crate_items = stable_mir::all_local_items(); + let crate_items = rustc_public::all_local_items(); if let Some(body) = crate_items.iter().find_map(|item| { let item_ty = item.ty(); if let TyKind::RigidTy(RigidTy::Coroutine(def, ..)) = &item_ty.kind() { diff --git a/tests/ui-fulldeps/stable-mir/check_crate_defs.rs b/tests/ui-fulldeps/stable-mir/check_crate_defs.rs index d3929c5e48b..27d5b0bc238 100644 --- a/tests/ui-fulldeps/stable-mir/check_crate_defs.rs +++ b/tests/ui-fulldeps/stable-mir/check_crate_defs.rs @@ -14,9 +14,9 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::CrateDef; +use rustc_public::CrateDef; use std::collections::HashSet; use std::io::Write; use std::ops::ControlFlow; @@ -26,7 +26,7 @@ const CRATE_NAME: &str = "crate_defs"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { // Find items in the local crate. - let local = stable_mir::local_crate(); + let local = rustc_public::local_crate(); check_items(&local.statics(), &["PRIVATE_STATIC", "dummy::PUBLIC_STATIC"]); check_items( &local.fn_defs(), @@ -44,7 +44,7 @@ fn test_stable_mir() -> ControlFlow<()> { // Find items inside core crate. // FIXME: We are currently missing primitive type methods and trait implementations for external // crates. - let core = stable_mir::find_crates("core").pop().expect("Cannot find `core` crate"); + let core = rustc_public::find_crates("core").pop().expect("Cannot find `core` crate"); contains( &core.fn_defs(), &[ diff --git a/tests/ui-fulldeps/stable-mir/check_def_ty.rs b/tests/ui-fulldeps/stable-mir/check_def_ty.rs index 101e7eb9121..b5954352dc0 100644 --- a/tests/ui-fulldeps/stable-mir/check_def_ty.rs +++ b/tests/ui-fulldeps/stable-mir/check_def_ty.rs @@ -14,10 +14,10 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::ty::{Ty, ForeignItemKind}; -use stable_mir::*; +use rustc_public::ty::{Ty, ForeignItemKind}; +use rustc_public::*; use std::io::Write; use std::ops::ControlFlow; @@ -25,7 +25,7 @@ const CRATE_NAME: &str = "crate_def_ty"; /// Test if we can retrieve type information from different definitions. fn test_def_tys() -> ControlFlow<()> { - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); for item in &items { // Type from crate items. let ty = item.ty(); @@ -37,7 +37,7 @@ fn test_def_tys() -> ControlFlow<()> { } } - let foreign_items = stable_mir::local_crate().foreign_modules(); + let foreign_items = rustc_public::local_crate().foreign_modules(); for item in foreign_items[0].module().items() { // Type from foreign items. let ty = item.ty(); diff --git a/tests/ui-fulldeps/stable-mir/check_defs.rs b/tests/ui-fulldeps/stable-mir/check_defs.rs index 65db50ee3ff..5e45f19cac8 100644 --- a/tests/ui-fulldeps/stable-mir/check_defs.rs +++ b/tests/ui-fulldeps/stable-mir/check_defs.rs @@ -13,13 +13,13 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; -extern crate stable_mir; +extern crate rustc_public; use std::assert_matches::assert_matches; use mir::{mono::Instance, TerminatorKind::*}; -use stable_mir::mir::mono::InstanceKind; -use stable_mir::ty::{RigidTy, TyKind, Ty, UintTy}; -use stable_mir::*; +use rustc_public::mir::mono::InstanceKind; +use rustc_public::ty::{RigidTy, TyKind, Ty, UintTy}; +use rustc_public::*; use std::io::Write; use std::ops::ControlFlow; @@ -27,7 +27,7 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { - let entry = stable_mir::entry_fn().unwrap(); + let entry = rustc_public::entry_fn().unwrap(); let main_fn = Instance::try_from(entry).unwrap(); assert_eq!(main_fn.name(), "main"); assert_eq!(main_fn.trimmed_name(), "main"); diff --git a/tests/ui-fulldeps/stable-mir/check_foreign.rs b/tests/ui-fulldeps/stable-mir/check_foreign.rs index 2947d51b63b..9aee067f41b 100644 --- a/tests/ui-fulldeps/stable-mir/check_foreign.rs +++ b/tests/ui-fulldeps/stable-mir/check_foreign.rs @@ -14,9 +14,9 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; extern crate rustc_span; -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::{ +use rustc_public::{ ty::{Abi, ForeignItemKind}, *, }; diff --git a/tests/ui-fulldeps/stable-mir/check_instance.rs b/tests/ui-fulldeps/stable-mir/check_instance.rs index 9b1e4176531..18971076043 100644 --- a/tests/ui-fulldeps/stable-mir/check_instance.rs +++ b/tests/ui-fulldeps/stable-mir/check_instance.rs @@ -13,21 +13,21 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; -extern crate stable_mir; +extern crate rustc_public; use std::io::Write; use std::ops::ControlFlow; use mir::mono::Instance; use mir::TerminatorKind::*; -use stable_mir::ty::{RigidTy, TyKind}; -use stable_mir::*; +use rustc_public::ty::{RigidTy, TyKind}; +use rustc_public::*; const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); // Get all items and split generic vs monomorphic items. let (generic, mono): (Vec<_>, Vec<_>) = diff --git a/tests/ui-fulldeps/stable-mir/check_intrinsics.rs b/tests/ui-fulldeps/stable-mir/check_intrinsics.rs index 2fce367c7a0..854ac77956e 100644 --- a/tests/ui-fulldeps/stable-mir/check_intrinsics.rs +++ b/tests/ui-fulldeps/stable-mir/check_intrinsics.rs @@ -18,12 +18,12 @@ extern crate rustc_hir; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::mir::mono::{Instance, InstanceKind}; -use stable_mir::mir::visit::{Location, MirVisitor}; -use stable_mir::mir::{LocalDecl, Terminator, TerminatorKind}; -use stable_mir::ty::{FnDef, GenericArgs, RigidTy, TyKind}; +use rustc_public::mir::mono::{Instance, InstanceKind}; +use rustc_public::mir::visit::{Location, MirVisitor}; +use rustc_public::mir::{LocalDecl, Terminator, TerminatorKind}; +use rustc_public::ty::{FnDef, GenericArgs, RigidTy, TyKind}; use std::assert_matches::assert_matches; use std::convert::TryFrom; use std::io::Write; @@ -32,7 +32,7 @@ use std::ops::ControlFlow; /// This function tests that we can correctly get type information from binary operations. fn test_intrinsics() -> ControlFlow<()> { // Find items in the local crate. - let main_def = stable_mir::all_local_items()[0]; + let main_def = rustc_public::all_local_items()[0]; let main_instance = Instance::try_from(main_def).unwrap(); let main_body = main_instance.body().unwrap(); let mut visitor = CallsVisitor { locals: main_body.locals(), calls: Default::default() }; diff --git a/tests/ui-fulldeps/stable-mir/check_item_kind.rs b/tests/ui-fulldeps/stable-mir/check_item_kind.rs index 20b9e86ff92..58e740bdaef 100644 --- a/tests/ui-fulldeps/stable-mir/check_item_kind.rs +++ b/tests/ui-fulldeps/stable-mir/check_item_kind.rs @@ -13,9 +13,9 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::*; +use rustc_public::*; use std::io::Write; use std::ops::ControlFlow; @@ -23,7 +23,7 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_item_kind() -> ControlFlow<()> { - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); assert_eq!(items.len(), 4); // Constructor item. for item in items { diff --git a/tests/ui-fulldeps/stable-mir/check_normalization.rs b/tests/ui-fulldeps/stable-mir/check_normalization.rs index bb5cd49e1b0..aa6a257dac6 100644 --- a/tests/ui-fulldeps/stable-mir/check_normalization.rs +++ b/tests/ui-fulldeps/stable-mir/check_normalization.rs @@ -12,11 +12,11 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; -extern crate stable_mir; +extern crate rustc_public; use mir::mono::Instance; use ty::{Ty, TyKind, RigidTy}; -use stable_mir::*; +use rustc_public::*; use std::io::Write; use std::ops::ControlFlow; @@ -24,7 +24,7 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); // Get all items and split generic vs monomorphic items. let instances: Vec<_> = diff --git a/tests/ui-fulldeps/stable-mir/check_trait_queries.rs b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs index 73ba0ea23c9..a6c37883643 100644 --- a/tests/ui-fulldeps/stable-mir/check_trait_queries.rs +++ b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs @@ -14,9 +14,9 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::CrateDef; +use rustc_public::CrateDef; use std::collections::HashSet; use std::io::Write; use std::ops::ControlFlow; @@ -25,7 +25,7 @@ const CRATE_NAME: &str = "trait_test"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_traits() -> ControlFlow<()> { - let local_crate = stable_mir::local_crate(); + let local_crate = rustc_public::local_crate(); let local_traits = local_crate.trait_decls(); assert_eq!(local_traits.len(), 1, "Expected `Max` trait, but found {:?}", local_traits); assert_eq!(&local_traits[0].name(), "Max"); @@ -42,14 +42,14 @@ fn test_traits() -> ControlFlow<()> { assert_impl(&impl_names, "<u64 as Max>"); assert_impl(&impl_names, "<impl std::convert::From<Positive> for u64>"); - let all_traits = stable_mir::all_trait_decls(); + let all_traits = rustc_public::all_trait_decls(); assert!(all_traits.len() > local_traits.len()); assert!( local_traits.iter().all(|t| all_traits.contains(t)), "Local: {local_traits:#?}, All: {all_traits:#?}" ); - let all_impls = stable_mir::all_trait_impls(); + let all_impls = rustc_public::all_trait_impls(); assert!(all_impls.len() > local_impls.len()); assert!( local_impls.iter().all(|t| all_impls.contains(t)), diff --git a/tests/ui-fulldeps/stable-mir/check_transform.rs b/tests/ui-fulldeps/stable-mir/check_transform.rs index 460f1b9e963..3209fcf9ede 100644 --- a/tests/ui-fulldeps/stable-mir/check_transform.rs +++ b/tests/ui-fulldeps/stable-mir/check_transform.rs @@ -15,13 +15,13 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::mir::alloc::GlobalAlloc; -use stable_mir::mir::mono::Instance; -use stable_mir::mir::{Body, ConstOperand, Operand, Rvalue, StatementKind, TerminatorKind}; -use stable_mir::ty::{ConstantKind, MirConst}; -use stable_mir::{CrateDef, CrateItems, ItemKind}; +use rustc_public::mir::alloc::GlobalAlloc; +use rustc_public::mir::mono::Instance; +use rustc_public::mir::{Body, ConstOperand, Operand, Rvalue, StatementKind, TerminatorKind}; +use rustc_public::ty::{ConstantKind, MirConst}; +use rustc_public::{CrateDef, CrateItems, ItemKind}; use std::convert::TryFrom; use std::io::Write; use std::ops::ControlFlow; @@ -31,7 +31,7 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to transform the MIR. fn test_transform() -> ControlFlow<()> { // Find items in the local crate. - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); // Test fn_abi let target_fn = *get_item(&items, (ItemKind::Fn, "dummy")).unwrap(); @@ -109,7 +109,7 @@ fn change_panic_msg(mut body: Body, new_msg: &str) -> Body { fn get_item<'a>( items: &'a CrateItems, item: (ItemKind, &str), -) -> Option<&'a stable_mir::CrateItem> { +) -> Option<&'a rustc_public::CrateItem> { items.iter().find(|crate_item| (item.0 == crate_item.kind()) && crate_item.name() == item.1) } diff --git a/tests/ui-fulldeps/stable-mir/check_ty_fold.rs b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs index 1a21757d038..07ef0d2bb50 100644 --- a/tests/ui-fulldeps/stable-mir/check_ty_fold.rs +++ b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs @@ -15,13 +15,13 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::mir::{ +use rustc_public::mir::{ Body, FieldIdx, MirVisitor, Place, ProjectionElem, visit::{Location, PlaceContext}, }; -use stable_mir::ty::{RigidTy, Ty, TyKind}; +use rustc_public::ty::{RigidTy, Ty, TyKind}; use std::io::Write; use std::ops::ControlFlow; @@ -29,7 +29,7 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { - let main_fn = stable_mir::entry_fn(); + let main_fn = rustc_public::entry_fn(); let body = main_fn.unwrap().expect_body(); let mut visitor = PlaceVisitor { body: &body, tested: false }; visitor.visit_body(&body); diff --git a/tests/ui-fulldeps/stable-mir/check_variant.rs b/tests/ui-fulldeps/stable-mir/check_variant.rs index 4cff57308f6..ebe76bd89d5 100644 --- a/tests/ui-fulldeps/stable-mir/check_variant.rs +++ b/tests/ui-fulldeps/stable-mir/check_variant.rs @@ -15,15 +15,15 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use std::io::Write; use std::ops::ControlFlow; -use stable_mir::CrateItem; -use stable_mir::crate_def::CrateDef; -use stable_mir::mir::{AggregateKind, Rvalue, Statement, StatementKind}; -use stable_mir::ty::{IntTy, RigidTy, Ty}; +use rustc_public::CrateItem; +use rustc_public::crate_def::CrateDef; +use rustc_public::mir::{AggregateKind, Rvalue, Statement, StatementKind}; +use rustc_public::ty::{IntTy, RigidTy, Ty}; const CRATE_NAME: &str = "crate_variant_ty"; @@ -97,7 +97,7 @@ fn check_adt_poly2() { } fn get_fn(name: &str) -> CrateItem { - stable_mir::all_local_items().into_iter().find(|it| it.name().eq(name)).unwrap() + rustc_public::all_local_items().into_iter().find(|it| it.name().eq(name)).unwrap() } fn check_statement_is_aggregate_assign( diff --git a/tests/ui-fulldeps/stable-mir/closure-generic-body.rs b/tests/ui-fulldeps/stable-mir/closure-generic-body.rs index 6b3447e5839..e5f910fbda1 100644 --- a/tests/ui-fulldeps/stable-mir/closure-generic-body.rs +++ b/tests/ui-fulldeps/stable-mir/closure-generic-body.rs @@ -14,18 +14,18 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use std::io::Write; use std::ops::ControlFlow; -use stable_mir::mir::{Body, ConstOperand, Operand, TerminatorKind}; -use stable_mir::ty::{FnDef, RigidTy, TyKind}; +use rustc_public::mir::{Body, ConstOperand, Operand, TerminatorKind}; +use rustc_public::ty::{FnDef, RigidTy, TyKind}; const CRATE_NAME: &str = "crate_closure_body"; fn test_closure_body() -> ControlFlow<()> { - let crate_items = stable_mir::all_local_items(); + let crate_items = rustc_public::all_local_items(); for item in crate_items { let item_ty = item.ty(); match &item_ty.kind() { diff --git a/tests/ui-fulldeps/stable-mir/closure_body.rs b/tests/ui-fulldeps/stable-mir/closure_body.rs index a1c97e7549b..f5f9f23ad12 100644 --- a/tests/ui-fulldeps/stable-mir/closure_body.rs +++ b/tests/ui-fulldeps/stable-mir/closure_body.rs @@ -14,18 +14,18 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use std::io::Write; use std::ops::ControlFlow; -use stable_mir::mir::{Body, ConstOperand, Operand, TerminatorKind}; -use stable_mir::ty::{FnDef, RigidTy, TyKind}; +use rustc_public::mir::{Body, ConstOperand, Operand, TerminatorKind}; +use rustc_public::ty::{FnDef, RigidTy, TyKind}; const CRATE_NAME: &str = "crate_closure_body"; fn test_closure_body() -> ControlFlow<()> { - let crate_items = stable_mir::all_local_items(); + let crate_items = rustc_public::all_local_items(); for item in crate_items { let item_ty = item.ty(); match &item_ty.kind() { diff --git a/tests/ui-fulldeps/stable-mir/compilation-result.rs b/tests/ui-fulldeps/stable-mir/compilation-result.rs index d577de48c55..ed013375c71 100644 --- a/tests/ui-fulldeps/stable-mir/compilation-result.rs +++ b/tests/ui-fulldeps/stable-mir/compilation-result.rs @@ -14,7 +14,7 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use std::io::Write; @@ -40,7 +40,7 @@ fn test_continue(args: &[String]) { fn test_break(args: &[String]) { let result = run!(args, || ControlFlow::Break::<bool, i32>(false)); - assert_eq!(result, Err(stable_mir::CompilerError::Interrupted(false))); + assert_eq!(result, Err(rustc_public::CompilerError::Interrupted(false))); } #[allow(unreachable_code)] @@ -48,7 +48,7 @@ fn test_skipped(args: &[String]) { let mut args = args.to_vec(); args.push("--version".to_string()); let result = run!(&args, || unreachable!() as ControlFlow<()>); - assert_eq!(result, Err(stable_mir::CompilerError::Skipped)); + assert_eq!(result, Err(rustc_public::CompilerError::Skipped)); } #[allow(unreachable_code)] @@ -56,7 +56,7 @@ fn test_failed(args: &[String]) { let mut args = args.to_vec(); args.push("--cfg=broken".to_string()); let result = run!(&args, || unreachable!() as ControlFlow<()>); - assert_eq!(result, Err(stable_mir::CompilerError::Failed)); + assert_eq!(result, Err(rustc_public::CompilerError::Failed)); } /// Test that we are able to pass a closure and set the return according to the captured value. diff --git a/tests/ui-fulldeps/stable-mir/crate-info.rs b/tests/ui-fulldeps/stable-mir/crate-info.rs index fd7c2032b6d..4f46dff9b82 100644 --- a/tests/ui-fulldeps/stable-mir/crate-info.rs +++ b/tests/ui-fulldeps/stable-mir/crate-info.rs @@ -15,13 +15,13 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use rustc_hir::def::DefKind; -use stable_mir::ItemKind; -use stable_mir::crate_def::CrateDef; -use stable_mir::mir::mono::Instance; -use stable_mir::ty::{RigidTy, TyKind}; +use rustc_public::ItemKind; +use rustc_public::crate_def::CrateDef; +use rustc_public::mir::mono::Instance; +use rustc_public::ty::{RigidTy, TyKind}; use std::assert_matches::assert_matches; use std::io::Write; use std::ops::ControlFlow; @@ -30,18 +30,18 @@ const CRATE_NAME: &str = "input"; /// This function uses the Stable MIR APIs to get information about the test crate. fn test_stable_mir() -> ControlFlow<()> { - // Get the local crate using stable_mir API. - let local = stable_mir::local_crate(); + // Get the local crate using rustc_public API. + let local = rustc_public::local_crate(); assert_eq!(&local.name, CRATE_NAME); - assert_eq!(stable_mir::entry_fn(), None); + assert_eq!(rustc_public::entry_fn(), None); // Find items in the local crate. - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); assert!(get_item(&items, (DefKind::Fn, "foo::bar")).is_some()); // Find the `std` crate and assert that there is only one of it. - assert!(stable_mir::find_crates("std").len() == 1); + assert!(rustc_public::find_crates("std").len() == 1); let bar = get_item(&items, (DefKind::Fn, "bar")).unwrap(); let body = bar.expect_body(); @@ -50,11 +50,11 @@ fn test_stable_mir() -> ControlFlow<()> { let block = &body.blocks[0]; assert_eq!(block.statements.len(), 1); match &block.statements[0].kind { - stable_mir::mir::StatementKind::Assign(..) => {} + rustc_public::mir::StatementKind::Assign(..) => {} other => panic!("{other:?}"), } match &block.terminator.kind { - stable_mir::mir::TerminatorKind::Return => {} + rustc_public::mir::TerminatorKind::Return => {} other => panic!("{other:?}"), } @@ -64,7 +64,7 @@ fn test_stable_mir() -> ControlFlow<()> { assert_eq!(body.blocks.len(), 4); let block = &body.blocks[0]; match &block.terminator.kind { - stable_mir::mir::TerminatorKind::Call { .. } => {} + rustc_public::mir::TerminatorKind::Call { .. } => {} other => panic!("{other:?}"), } @@ -73,28 +73,32 @@ fn test_stable_mir() -> ControlFlow<()> { assert_eq!(body.locals().len(), 6); assert_matches!( body.locals()[0].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Bool) + rustc_public::ty::TyKind::RigidTy(rustc_public::ty::RigidTy::Bool) ); assert_matches!( body.locals()[1].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Bool) + rustc_public::ty::TyKind::RigidTy(rustc_public::ty::RigidTy::Bool) ); assert_matches!( body.locals()[2].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Char) + rustc_public::ty::TyKind::RigidTy(rustc_public::ty::RigidTy::Char) ); assert_matches!( body.locals()[3].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Int(stable_mir::ty::IntTy::I32)) + rustc_public::ty::TyKind::RigidTy( + rustc_public::ty::RigidTy::Int(rustc_public::ty::IntTy::I32) + ) ); assert_matches!( body.locals()[4].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Uint(stable_mir::ty::UintTy::U64)) + rustc_public::ty::TyKind::RigidTy( + rustc_public::ty::RigidTy::Uint(rustc_public::ty::UintTy::U64) + ) ); assert_matches!( body.locals()[5].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Float( - stable_mir::ty::FloatTy::F64 + rustc_public::ty::TyKind::RigidTy(rustc_public::ty::RigidTy::Float( + rustc_public::ty::FloatTy::F64 )) ); @@ -103,7 +107,7 @@ fn test_stable_mir() -> ControlFlow<()> { assert_eq!(body.blocks.len(), 2); let block = &body.blocks[0]; match &block.terminator.kind { - stable_mir::mir::TerminatorKind::Drop { .. } => {} + rustc_public::mir::TerminatorKind::Drop { .. } => {} other => panic!("{other:?}"), } @@ -112,7 +116,7 @@ fn test_stable_mir() -> ControlFlow<()> { assert_eq!(body.blocks.len(), 2); let block = &body.blocks[0]; match &block.terminator.kind { - stable_mir::mir::TerminatorKind::Assert { .. } => {} + rustc_public::mir::TerminatorKind::Assert { .. } => {} other => panic!("{other:?}"), } @@ -120,7 +124,7 @@ fn test_stable_mir() -> ControlFlow<()> { let instance = Instance::try_from(monomorphic.clone()).unwrap(); for block in instance.body().unwrap().blocks { match &block.terminator.kind { - stable_mir::mir::TerminatorKind::Call { func, .. } => { + rustc_public::mir::TerminatorKind::Call { func, .. } => { let TyKind::RigidTy(ty) = func.ty(&body.locals()).unwrap().kind() else { unreachable!() }; @@ -131,7 +135,7 @@ fn test_stable_mir() -> ControlFlow<()> { other => panic!("{other:?}"), } } - stable_mir::mir::TerminatorKind::Return => {} + rustc_public::mir::TerminatorKind::Return => {} other => panic!("{other:?}"), } } @@ -145,22 +149,26 @@ fn test_stable_mir() -> ControlFlow<()> { assert_eq!(body.locals().len(), 4); assert_matches!( body.ret_local().ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Char) + rustc_public::ty::TyKind::RigidTy(rustc_public::ty::RigidTy::Char) ); assert_eq!(body.arg_locals().len(), 2); assert_matches!( body.arg_locals()[0].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Int(stable_mir::ty::IntTy::I32)) + rustc_public::ty::TyKind::RigidTy( + rustc_public::ty::RigidTy::Int(rustc_public::ty::IntTy::I32) + ) ); assert_matches!( body.arg_locals()[1].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Uint(stable_mir::ty::UintTy::U64)) + rustc_public::ty::TyKind::RigidTy( + rustc_public::ty::RigidTy::Uint(rustc_public::ty::UintTy::U64) + ) ); assert_eq!(body.inner_locals().len(), 1); // If conditions have an extra inner local to hold their results assert_matches!( body.inner_locals()[0].ty.kind(), - stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Bool) + rustc_public::ty::TyKind::RigidTy(rustc_public::ty::RigidTy::Bool) ); ControlFlow::Continue(()) @@ -168,9 +176,9 @@ fn test_stable_mir() -> ControlFlow<()> { // Use internal API to find a function in a crate. fn get_item<'a>( - items: &'a stable_mir::CrateItems, + items: &'a rustc_public::CrateItems, item: (DefKind, &str), -) -> Option<&'a stable_mir::CrateItem> { +) -> Option<&'a rustc_public::CrateItem> { items.iter().find(|crate_item| { matches!( (item.0, crate_item.kind()), diff --git a/tests/ui-fulldeps/stable-mir/projections.rs b/tests/ui-fulldeps/stable-mir/projections.rs index f8104287700..3b360cd2fcf 100644 --- a/tests/ui-fulldeps/stable-mir/projections.rs +++ b/tests/ui-fulldeps/stable-mir/projections.rs @@ -15,12 +15,12 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::ItemKind; -use stable_mir::crate_def::CrateDef; -use stable_mir::mir::{ProjectionElem, Rvalue, StatementKind}; -use stable_mir::ty::{RigidTy, TyKind, UintTy}; +use rustc_public::ItemKind; +use rustc_public::crate_def::CrateDef; +use rustc_public::mir::{ProjectionElem, Rvalue, StatementKind}; +use rustc_public::ty::{RigidTy, TyKind, UintTy}; use std::assert_matches::assert_matches; use std::io::Write; use std::ops::ControlFlow; @@ -29,15 +29,15 @@ const CRATE_NAME: &str = "input"; /// Tests projections within Place objects fn test_place_projections() -> ControlFlow<()> { - let items = stable_mir::all_local_items(); + let items = rustc_public::all_local_items(); let body = get_item(&items, (ItemKind::Fn, "projections")).unwrap().expect_body(); assert_eq!(body.blocks.len(), 4); // The first statement assigns `&s.c` to a local. The projections include a deref for `s`, since // `s` is passed as a reference argument, and a field access for field `c`. match &body.blocks[0].statements[0].kind { StatementKind::Assign( - place @ stable_mir::mir::Place { local: _, projection: local_proj }, - Rvalue::Ref(_, _, stable_mir::mir::Place { local: _, projection: r_proj }), + place @ rustc_public::mir::Place { local: _, projection: local_proj }, + Rvalue::Ref(_, _, rustc_public::mir::Place { local: _, projection: r_proj }), ) => { // We can't match on vecs, only on slices. Comparing statements for equality wouldn't be // any easier since we'd then have to add in the expected local and region values @@ -48,7 +48,7 @@ fn test_place_projections() -> ControlFlow<()> { [ProjectionElem::Deref, ProjectionElem::Field(2, ty)] => { assert_matches!( ty.kind(), - TyKind::RigidTy(RigidTy::Uint(stable_mir::ty::UintTy::U8)) + TyKind::RigidTy(RigidTy::Uint(rustc_public::ty::UintTy::U8)) ); let ty = place.ty(body.locals()).unwrap(); assert_matches!(ty.kind().rigid(), Some(RigidTy::Ref(..))); @@ -70,8 +70,8 @@ fn test_place_projections() -> ControlFlow<()> { // since `slice` is a reference, and an index. match &body.blocks[2].statements[0].kind { StatementKind::Assign( - place @ stable_mir::mir::Place { local: _, projection: local_proj }, - Rvalue::Use(stable_mir::mir::Operand::Copy(stable_mir::mir::Place { + place @ rustc_public::mir::Place { local: _, projection: local_proj }, + Rvalue::Use(rustc_public::mir::Operand::Copy(rustc_public::mir::Place { local: _, projection: r_proj, })), @@ -93,18 +93,18 @@ fn test_place_projections() -> ControlFlow<()> { // The first terminator gets a slice of an array via the Index operation. Specifically it // performs `&vals[1..3]`. There are no projections in this case, the arguments are just locals. match &body.blocks[0].terminator.kind { - stable_mir::mir::TerminatorKind::Call { args, .. } => + rustc_public::mir::TerminatorKind::Call { args, .. } => // We can't match on vecs, only on slices. Comparing for equality wouldn't be any easier // since we'd then have to add in the expected local values instead of matching on // wildcards. { match &args[..] { [ - stable_mir::mir::Operand::Move(stable_mir::mir::Place { + rustc_public::mir::Operand::Move(rustc_public::mir::Place { local: _, projection: arg1_proj, }), - stable_mir::mir::Operand::Move(stable_mir::mir::Place { + rustc_public::mir::Operand::Move(rustc_public::mir::Place { local: _, projection: arg2_proj, }), @@ -133,9 +133,9 @@ fn test_place_projections() -> ControlFlow<()> { // Use internal API to find a function in a crate. fn get_item<'a>( - items: &'a stable_mir::CrateItems, + items: &'a rustc_public::CrateItems, item: (ItemKind, &str), -) -> Option<&'a stable_mir::CrateItem> { +) -> Option<&'a rustc_public::CrateItem> { items.iter().find(|crate_item| crate_item.kind() == item.0 && crate_item.name() == item.1) } diff --git a/tests/ui-fulldeps/stable-mir/smir_internal.rs b/tests/ui-fulldeps/stable-mir/smir_internal.rs index 287f4353d51..dd70cfe5f5e 100644 --- a/tests/ui-fulldeps/stable-mir/smir_internal.rs +++ b/tests/ui-fulldeps/stable-mir/smir_internal.rs @@ -14,17 +14,17 @@ extern crate rustc_driver; extern crate rustc_interface; extern crate rustc_middle; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use rustc_middle::ty::TyCtxt; -use stable_mir::rustc_internal; +use rustc_public::rustc_internal; use std::io::Write; use std::ops::ControlFlow; const CRATE_NAME: &str = "input"; fn test_translation(tcx: TyCtxt<'_>) -> ControlFlow<()> { - let main_fn = stable_mir::entry_fn().unwrap(); + let main_fn = rustc_public::entry_fn().unwrap(); let body = main_fn.expect_body(); let orig_ty = body.locals()[0].ty; let rustc_ty = rustc_internal::internal(tcx, &orig_ty); diff --git a/tests/ui-fulldeps/stable-mir/smir_serde.rs b/tests/ui-fulldeps/stable-mir/smir_serde.rs index c2f00e56c2c..31642c6cb94 100644 --- a/tests/ui-fulldeps/stable-mir/smir_serde.rs +++ b/tests/ui-fulldeps/stable-mir/smir_serde.rs @@ -16,11 +16,11 @@ extern crate rustc_middle; extern crate serde; extern crate serde_json; #[macro_use] -extern crate stable_mir; +extern crate rustc_public; use rustc_middle::ty::TyCtxt; use serde_json::to_string; -use stable_mir::mir::Body; +use rustc_public::mir::Body; use std::io::{BufWriter, Write}; use std::ops::ControlFlow; @@ -29,9 +29,9 @@ const CRATE_NAME: &str = "input"; fn serialize_to_json(_tcx: TyCtxt<'_>) -> ControlFlow<()> { let path = "output.json"; let mut writer = BufWriter::new(std::fs::File::create(path).expect("Failed to create path")); - let local_crate = stable_mir::local_crate(); + let local_crate = rustc_public::local_crate(); let items: Vec<Body> = - stable_mir::all_local_items().iter().map(|item| item.expect_body()).collect(); + rustc_public::all_local_items().iter().map(|item| item.expect_body()).collect(); let crate_data = (local_crate.name, items); writer .write_all(to_string(&crate_data).expect("serde_json failed").as_bytes()) diff --git a/tests/ui-fulldeps/stable-mir/smir_visitor.rs b/tests/ui-fulldeps/stable-mir/smir_visitor.rs index 46f85a992ef..66787e2927b 100644 --- a/tests/ui-fulldeps/stable-mir/smir_visitor.rs +++ b/tests/ui-fulldeps/stable-mir/smir_visitor.rs @@ -13,11 +13,11 @@ extern crate rustc_middle; extern crate rustc_driver; extern crate rustc_interface; -extern crate stable_mir; +extern crate rustc_public; -use stable_mir::mir::MirVisitor; -use stable_mir::mir::MutMirVisitor; -use stable_mir::*; +use rustc_public::mir::MirVisitor; +use rustc_public::mir::MutMirVisitor; +use rustc_public::*; use std::collections::HashSet; use std::io::Write; use std::ops::ControlFlow; @@ -25,7 +25,7 @@ use std::ops::ControlFlow; const CRATE_NAME: &str = "input"; fn test_visitor() -> ControlFlow<()> { - let main_fn = stable_mir::entry_fn(); + let main_fn = rustc_public::entry_fn(); let main_body = main_fn.unwrap().expect_body(); let main_visitor = TestVisitor::collect(&main_body); assert!(main_visitor.ret_val.is_some()); @@ -99,7 +99,7 @@ impl<'a> mir::MirVisitor for TestVisitor<'a> { } fn test_mut_visitor() -> ControlFlow<()> { - let main_fn = stable_mir::entry_fn(); + let main_fn = rustc_public::entry_fn(); let mut main_body = main_fn.unwrap().expect_body(); let locals = main_body.locals().to_vec(); let mut main_visitor = TestMutVisitor::collect(locals); diff --git a/tests/ui/associated-consts/issue-58022.stderr b/tests/ui/associated-consts/issue-58022.stderr index 37cb162b2b2..5d57e01d6f5 100644 --- a/tests/ui/associated-consts/issue-58022.stderr +++ b/tests/ui/associated-consts/issue-58022.stderr @@ -16,7 +16,7 @@ error[E0790]: cannot refer to the associated constant on trait without specifyin --> $DIR/issue-58022.rs:4:25 | LL | const SIZE: usize; - | ------------------ `Foo::SIZE` defined here + | ----------------- `Foo::SIZE` defined here LL | LL | fn new(slice: &[u8; Foo::SIZE]) -> Self; | ^^^^^^^^^ cannot refer to the associated constant of trait diff --git a/tests/ui/associated-consts/issue-63496.stderr b/tests/ui/associated-consts/issue-63496.stderr index f2a4e01adea..bdd2769afc8 100644 --- a/tests/ui/associated-consts/issue-63496.stderr +++ b/tests/ui/associated-consts/issue-63496.stderr @@ -2,7 +2,7 @@ error[E0790]: cannot refer to the associated constant on trait without specifyin --> $DIR/issue-63496.rs:4:21 | LL | const C: usize; - | --------------- `A::C` defined here + | -------------- `A::C` defined here LL | LL | fn f() -> ([u8; A::C], [u8; A::C]); | ^^^^ cannot refer to the associated constant of trait @@ -11,7 +11,7 @@ error[E0790]: cannot refer to the associated constant on trait without specifyin --> $DIR/issue-63496.rs:4:33 | LL | const C: usize; - | --------------- `A::C` defined here + | -------------- `A::C` defined here LL | LL | fn f() -> ([u8; A::C], [u8; A::C]); | ^^^^ cannot refer to the associated constant of trait diff --git a/tests/ui/associated-item/issue-48027.stderr b/tests/ui/associated-item/issue-48027.stderr index 513961e2bd0..e5c1ced9341 100644 --- a/tests/ui/associated-item/issue-48027.stderr +++ b/tests/ui/associated-item/issue-48027.stderr @@ -18,7 +18,7 @@ error[E0790]: cannot refer to the associated constant on trait without specifyin --> $DIR/issue-48027.rs:3:32 | LL | const X: usize; - | --------------- `Bar::X` defined here + | -------------- `Bar::X` defined here LL | fn return_n(&self) -> [u8; Bar::X]; | ^^^^^^ cannot refer to the associated constant of trait diff --git a/tests/ui/associated-types/defaults-in-other-trait-items.stderr b/tests/ui/associated-types/defaults-in-other-trait-items.stderr index bdcfadd3955..56abd6ebf73 100644 --- a/tests/ui/associated-types/defaults-in-other-trait-items.stderr +++ b/tests/ui/associated-types/defaults-in-other-trait-items.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/defaults-in-other-trait-items.rs:9:13 | LL | type A = (); - | ------------ associated type defaults can't be assumed inside the trait defining them + | ------ associated type defaults can't be assumed inside the trait defining them ... LL | let () = p; | ^^ - this expression has type `<Self as Tr>::A` @@ -16,7 +16,7 @@ error[E0308]: mismatched types --> $DIR/defaults-in-other-trait-items.rs:36:25 | LL | type Ty = u8; - | ------------- associated type defaults can't be assumed inside the trait defining them + | ------- associated type defaults can't be assumed inside the trait defining them ... LL | const C: Self::Ty = 0u8; | ^^^ expected associated type, found `u8` @@ -28,7 +28,7 @@ error[E0308]: mismatched types --> $DIR/defaults-in-other-trait-items.rs:54:9 | LL | type Res = isize; - | ----------------- associated type defaults can't be assumed inside the trait defining them + | -------- associated type defaults can't be assumed inside the trait defining them LL | LL | fn infer_me_correctly() -> Self::Res { | --------- expected `<Self as Trait>::Res` because of return type diff --git a/tests/ui/associated-types/defaults-specialization.stderr b/tests/ui/associated-types/defaults-specialization.stderr index fd2a1a0c2d1..7d19ac85982 100644 --- a/tests/ui/associated-types/defaults-specialization.stderr +++ b/tests/ui/associated-types/defaults-specialization.stderr @@ -31,7 +31,7 @@ error[E0053]: method `make` has an incompatible type for trait --> $DIR/defaults-specialization.rs:35:18 | LL | default type Ty = bool; - | ----------------------- associated type is `default` and may be overridden + | --------------- associated type is `default` and may be overridden LL | LL | fn make() -> bool { true } | ^^^^ expected associated type, found `bool` @@ -53,7 +53,7 @@ error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:10:9 | LL | type Ty = u8; - | ------------- associated type defaults can't be assumed inside the trait defining them + | ------- associated type defaults can't be assumed inside the trait defining them LL | LL | fn make() -> Self::Ty { | -------- expected `<Self as Tr>::Ty` because of return type @@ -80,7 +80,7 @@ error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:44:29 | LL | default type Ty = bool; - | ----------------------- associated type is `default` and may be overridden + | --------------- associated type is `default` and may be overridden LL | LL | fn make() -> Self::Ty { true } | -------- ^^^^ expected associated type, found `bool` diff --git a/tests/ui/associated-types/issue-26681.stderr b/tests/ui/associated-types/issue-26681.stderr index b64bcee07f0..5fb1a4ef3f5 100644 --- a/tests/ui/associated-types/issue-26681.stderr +++ b/tests/ui/associated-types/issue-26681.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-26681.rs:17:39 | LL | type Fv: Foo = u8; - | ------------------ associated type defaults can't be assumed inside the trait defining them + | ------------ associated type defaults can't be assumed inside the trait defining them LL | const C: <Self::Fv as Foo>::Bar = 6665; | ^^^^ expected associated type, found integer | diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr index f16ba706485..3dc3c32c936 100644 --- a/tests/ui/attributes/malformed-attrs.stderr +++ b/tests/ui/attributes/malformed-attrs.stderr @@ -22,12 +22,6 @@ error[E0463]: can't find crate for `wloop` LL | extern crate wloop; | ^^^^^^^^^^^^^^^^^^^ can't find crate -error: malformed `omit_gdb_pretty_printer_section` attribute input - --> $DIR/malformed-attrs.rs:26:1 - | -LL | #![omit_gdb_pretty_printer_section = 1] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![omit_gdb_pretty_printer_section]` - error: malformed `windows_subsystem` attribute input --> $DIR/malformed-attrs.rs:29:1 | @@ -116,12 +110,6 @@ error: malformed `cfi_encoding` attribute input LL | #[cfi_encoding] | ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]` -error: malformed `link_ordinal` attribute input - --> $DIR/malformed-attrs.rs:167:5 - | -LL | #[link_ordinal] - | ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_ordinal(ordinal)]` - error: malformed `linkage` attribute input --> $DIR/malformed-attrs.rs:173:5 | @@ -164,12 +152,6 @@ error: malformed `debugger_visualizer` attribute input LL | #[debugger_visualizer] | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]` -error: malformed `automatically_derived` attribute input - --> $DIR/malformed-attrs.rs:191:1 - | -LL | #[automatically_derived = 18] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[automatically_derived]` - error: malformed `thread_local` attribute input --> $DIR/malformed-attrs.rs:203:1 | @@ -283,6 +265,15 @@ LL | #[debugger_visualizer] = note: OR = note: expected: `gdb_script_file = "..."` +error[E0565]: malformed `omit_gdb_pretty_printer_section` attribute input + --> $DIR/malformed-attrs.rs:26:1 + | +LL | #![omit_gdb_pretty_printer_section = 1] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^ + | | | + | | didn't expect any arguments here + | help: must be of the form: `#[omit_gdb_pretty_printer_section]` + error[E0539]: malformed `export_name` attribute input --> $DIR/malformed-attrs.rs:32:1 | @@ -537,6 +528,15 @@ LL | #[unsafe(ffi_pure = 1)] | | didn't expect any arguments here | help: must be of the form: `#[ffi_pure]` +error[E0539]: malformed `link_ordinal` attribute input + --> $DIR/malformed-attrs.rs:167:5 + | +LL | #[link_ordinal] + | ^^^^^^^^^^^^^^^ + | | + | expected this to be a list + | help: must be of the form: `#[link_ordinal(ordinal)]` + error[E0565]: malformed `ffi_const` attribute input --> $DIR/malformed-attrs.rs:171:5 | @@ -546,6 +546,15 @@ LL | #[unsafe(ffi_const = 1)] | | didn't expect any arguments here | help: must be of the form: `#[ffi_const]` +error[E0565]: malformed `automatically_derived` attribute input + --> $DIR/malformed-attrs.rs:191:1 + | +LL | #[automatically_derived = 18] + | ^^^^^^^^^^^^^^^^^^^^^^^^----^ + | | | + | | didn't expect any arguments here + | help: must be of the form: `#[automatically_derived]` + error[E0565]: malformed `non_exhaustive` attribute input --> $DIR/malformed-attrs.rs:197:1 | diff --git a/tests/ui/consts/issue-54954.stderr b/tests/ui/consts/issue-54954.stderr index b8c983eb7b8..2ef3abcf760 100644 --- a/tests/ui/consts/issue-54954.stderr +++ b/tests/ui/consts/issue-54954.stderr @@ -10,14 +10,11 @@ LL | const fn const_val<T: Sized>() -> usize { error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type --> $DIR/issue-54954.rs:1:24 | -LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait +LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait ... -LL | / const fn const_val<T: Sized>() -> usize { -LL | | -LL | | core::mem::size_of::<T>() -LL | | } - | |_____- `Tt::const_val` defined here +LL | const fn const_val<T: Sized>() -> usize { + | --------------------------------------- `Tt::const_val` defined here error: aborting due to 2 previous errors diff --git a/tests/ui/consts/issue-90870.stderr b/tests/ui/consts/issue-90870.stderr index 60993f25864..c5a78531026 100644 --- a/tests/ui/consts/issue-90870.stderr +++ b/tests/ui/consts/issue-90870.stderr @@ -5,7 +5,7 @@ LL | a == b | ^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider dereferencing here @@ -31,7 +31,7 @@ LL | a == b | ^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider dereferencing here @@ -57,7 +57,7 @@ LL | if l == r { | ^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider dereferencing here diff --git a/tests/ui/error-codes/E0790.stderr b/tests/ui/error-codes/E0790.stderr index 106554b2425..93c43020768 100644 --- a/tests/ui/error-codes/E0790.stderr +++ b/tests/ui/error-codes/E0790.stderr @@ -16,7 +16,7 @@ error[E0790]: cannot refer to the associated constant on trait without specifyin --> $DIR/E0790.rs:21:17 | LL | const MY_ASSOC_CONST: (); - | ------------------------- `MyTrait::MY_ASSOC_CONST` defined here + | ------------------------ `MyTrait::MY_ASSOC_CONST` defined here ... LL | let _ = MyTrait::MY_ASSOC_CONST; | ^^^^^^^^^^^^^^^^^^^^^^^ cannot refer to the associated constant of trait @@ -44,7 +44,7 @@ error[E0790]: cannot refer to the associated constant on trait without specifyin --> $DIR/E0790.rs:30:13 | LL | const MY_ASSOC_CONST: (); - | ------------------------- `MyTrait::MY_ASSOC_CONST` defined here + | ------------------------ `MyTrait::MY_ASSOC_CONST` defined here ... LL | let _ = inner::MyTrait::MY_ASSOC_CONST; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot refer to the associated constant of trait diff --git a/tests/ui/feature-gates/feature-gate-async-drop.stderr b/tests/ui/feature-gates/feature-gate-async-drop.stderr index e795c3a3422..80f6228a16f 100644 --- a/tests/ui/feature-gates/feature-gate-async-drop.stderr +++ b/tests/ui/feature-gates/feature-gate-async-drop.stderr @@ -12,7 +12,7 @@ error[E0658]: use of unstable library feature `async_drop` --> $DIR/feature-gate-async-drop.rs:13:5 | LL | async fn drop(self: Pin<&mut Self>) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information = help: add `#![feature(async_drop)]` to the crate attributes to enable diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr index 49c666f498f..4cba54bf67c 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr @@ -121,21 +121,6 @@ LL - #![rustc_main] LL + #[rustc_main] | -error: `automatically_derived` attribute cannot be used at crate level - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:23:1 - | -LL | #![automatically_derived] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ -... -LL | mod inline { - | ------ the inner attribute doesn't annotate this module - | -help: perhaps you meant to use an outer attribute - | -LL - #![automatically_derived] -LL + #[automatically_derived] - | - error: `repr` attribute cannot be used at crate level --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:19:1 | @@ -166,6 +151,21 @@ LL - #![path = "3800"] LL + #[path = "3800"] | +error: `automatically_derived` attribute cannot be used at crate level + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:23:1 + | +LL | #![automatically_derived] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | mod inline { + | ------ the inner attribute doesn't annotate this module + | +help: perhaps you meant to use an outer attribute + | +LL - #![automatically_derived] +LL + #[automatically_derived] + | + error[E0518]: attribute should be applied to function or closure --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:42:17 | diff --git a/tests/ui/generics/export-name-on-generics.stderr b/tests/ui/generics/export-name-on-generics.stderr index 7bc7b8ca559..e08b2b1c8f3 100644 --- a/tests/ui/generics/export-name-on-generics.stderr +++ b/tests/ui/generics/export-name-on-generics.stderr @@ -4,7 +4,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ | note: the lint level is defined here --> $DIR/export-name-on-generics.rs:3:9 @@ -18,7 +18,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:21:5 @@ -26,7 +26,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:24:5 @@ -34,7 +34,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:42:5 @@ -42,7 +42,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | fn foo<T>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:45:5 @@ -50,7 +50,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:64:5 @@ -58,7 +58,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:67:5 @@ -66,7 +66,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo2"] | ----------------------- help: remove this attribute LL | fn foo2<U>() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:70:5 @@ -74,7 +74,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:73:5 @@ -82,7 +82,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | fn baz(x: &i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:76:5 @@ -90,7 +90,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "qux"] | ---------------------- help: remove this attribute LL | fn qux<'a>(x: &'a i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:83:5 @@ -98,7 +98,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:86:5 @@ -106,7 +106,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | pub extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:89:5 @@ -114,7 +114,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | pub fn baz<U>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:105:5 @@ -122,7 +122,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:108:5 @@ -130,7 +130,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:111:5 @@ -138,7 +138,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | fn baz<U>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: aborting due to 17 previous errors diff --git a/tests/ui/generics/generic-no-mangle.stderr b/tests/ui/generics/generic-no-mangle.stderr index adfddbe9ca7..39fbe4dd76d 100644 --- a/tests/ui/generics/generic-no-mangle.stderr +++ b/tests/ui/generics/generic-no-mangle.stderr @@ -4,7 +4,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ | note: the lint level is defined here --> $DIR/generic-no-mangle.rs:3:9 @@ -18,7 +18,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:21:5 @@ -26,7 +26,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:24:5 @@ -34,7 +34,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:42:5 @@ -42,7 +42,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo<T>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:45:5 @@ -50,7 +50,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:64:5 @@ -58,7 +58,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:67:5 @@ -66,7 +66,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo2<U>() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:70:5 @@ -74,7 +74,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:73:5 @@ -82,7 +82,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn baz(x: &i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:76:5 @@ -90,7 +90,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn qux<'a>(x: &'a i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:83:5 @@ -98,7 +98,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:86:5 @@ -106,7 +106,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:89:5 @@ -114,7 +114,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn baz<U>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:105:5 @@ -122,7 +122,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:108:5 @@ -130,7 +130,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:111:5 @@ -138,7 +138,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn baz<U>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: aborting due to 17 previous errors diff --git a/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr b/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr index d4b5b47b41b..deab31c251f 100644 --- a/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr +++ b/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr @@ -63,7 +63,7 @@ error[E0658]: const trait impls are experimental LL | fn constness() -> impl Sized + const use<> {} | ^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.rs b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.rs index 9b7e8d70743..87b4999c5f9 100644 --- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.rs +++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.rs @@ -1,10 +1,10 @@ #[link(name = "foo")] extern "C" { #[link_ordinal("JustMonika")] - //~^ ERROR illegal ordinal format in `link_ordinal` + //~^ ERROR malformed `link_ordinal` attribute input fn foo(); #[link_ordinal("JustMonika")] - //~^ ERROR illegal ordinal format in `link_ordinal` + //~^ ERROR malformed `link_ordinal` attribute input static mut imported_variable: i32; } diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr index 6341e57a0be..ffae30aabcc 100644 --- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr +++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr @@ -1,18 +1,21 @@ -error: illegal ordinal format in `link_ordinal` +error[E0539]: malformed `link_ordinal` attribute input --> $DIR/link-ordinal-invalid-format.rs:3:5 | LL | #[link_ordinal("JustMonika")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: an unsuffixed integer value, e.g., `1`, is expected + | ^^^^^^^^^^^^^^^------------^^ + | | | + | | expected an integer literal here + | help: must be of the form: `#[link_ordinal(ordinal)]` -error: illegal ordinal format in `link_ordinal` +error[E0539]: malformed `link_ordinal` attribute input --> $DIR/link-ordinal-invalid-format.rs:6:5 | LL | #[link_ordinal("JustMonika")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: an unsuffixed integer value, e.g., `1`, is expected + | ^^^^^^^^^^^^^^^------------^^ + | | | + | | expected an integer literal here + | help: must be of the form: `#[link_ordinal(ordinal)]` error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0539`. diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs index 6b8cd49566d..2a8b9ebacf7 100644 --- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs +++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs @@ -1,10 +1,12 @@ #[link(name = "foo")] extern "C" { #[link_ordinal()] - //~^ ERROR incorrect number of arguments to `#[link_ordinal]` + //~^ ERROR malformed `link_ordinal` attribute input + //~| NOTE expected a single argument fn foo(); #[link_ordinal()] - //~^ ERROR incorrect number of arguments to `#[link_ordinal]` + //~^ ERROR malformed `link_ordinal` attribute input + //~| NOTE expected a single argument static mut imported_variable: i32; } diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr index 1b04bb228e7..c6b8a18d03a 100644 --- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr +++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr @@ -1,18 +1,21 @@ -error: incorrect number of arguments to `#[link_ordinal]` +error[E0805]: malformed `link_ordinal` attribute input --> $DIR/link-ordinal-missing-argument.rs:3:5 | LL | #[link_ordinal()] - | ^^^^^^^^^^^^^^^^^ - | - = note: the attribute requires exactly one argument + | ^^^^^^^^^^^^^^--^ + | | | + | | expected a single argument here + | help: must be of the form: `#[link_ordinal(ordinal)]` -error: incorrect number of arguments to `#[link_ordinal]` - --> $DIR/link-ordinal-missing-argument.rs:6:5 +error[E0805]: malformed `link_ordinal` attribute input + --> $DIR/link-ordinal-missing-argument.rs:7:5 | LL | #[link_ordinal()] - | ^^^^^^^^^^^^^^^^^ - | - = note: the attribute requires exactly one argument + | ^^^^^^^^^^^^^^--^ + | | | + | | expected a single argument here + | help: must be of the form: `#[link_ordinal(ordinal)]` error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0805`. diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs index 9988115fd8b..ddf9583352f 100644 --- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs +++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs @@ -1,10 +1,12 @@ #[link(name = "foo")] extern "C" { #[link_ordinal(3, 4)] - //~^ ERROR incorrect number of arguments to `#[link_ordinal]` + //~^ ERROR malformed `link_ordinal` attribute input + //~| NOTE expected a single argument fn foo(); #[link_ordinal(3, 4)] - //~^ ERROR incorrect number of arguments to `#[link_ordinal]` + //~^ ERROR malformed `link_ordinal` attribute input + //~| NOTE expected a single argument static mut imported_variable: i32; } diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr index d5ce8aff34f..7d63304f598 100644 --- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr +++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr @@ -1,18 +1,21 @@ -error: incorrect number of arguments to `#[link_ordinal]` +error[E0805]: malformed `link_ordinal` attribute input --> $DIR/link-ordinal-too-many-arguments.rs:3:5 | LL | #[link_ordinal(3, 4)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: the attribute requires exactly one argument + | ^^^^^^^^^^^^^^------^ + | | | + | | expected a single argument here + | help: must be of the form: `#[link_ordinal(ordinal)]` -error: incorrect number of arguments to `#[link_ordinal]` - --> $DIR/link-ordinal-too-many-arguments.rs:6:5 +error[E0805]: malformed `link_ordinal` attribute input + --> $DIR/link-ordinal-too-many-arguments.rs:7:5 | LL | #[link_ordinal(3, 4)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: the attribute requires exactly one argument + | ^^^^^^^^^^^^^^------^ + | | | + | | expected a single argument here + | help: must be of the form: `#[link_ordinal(ordinal)]` error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0805`. diff --git a/tests/ui/lint/lint-stability.stderr b/tests/ui/lint/lint-stability.stderr index a22fce70a4a..fd57908a77b 100644 --- a/tests/ui/lint/lint-stability.stderr +++ b/tests/ui/lint/lint-stability.stderr @@ -290,7 +290,7 @@ error[E0658]: use of unstable library feature `unstable_test_feature` --> $DIR/lint-stability.rs:179:9 | LL | fn trait_unstable(&self) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/lint/suggestions.stderr b/tests/ui/lint/suggestions.stderr index a4871ead74b..c35e92f5980 100644 --- a/tests/ui/lint/suggestions.stderr +++ b/tests/ui/lint/suggestions.stderr @@ -65,7 +65,7 @@ LL | #[no_mangle] | ------------ help: remove this attribute LL | LL | pub fn defiant<T>(_t: T) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(no_mangle_generic_items)]` on by default @@ -89,7 +89,7 @@ warning: functions generic over types or consts must be mangled --> $DIR/suggestions.rs:26:18 | LL | #[no_mangle] pub fn val_jean<T>() {} - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ + | ------------ ^^^^^^^^^^^^^^^^^^^^ | | | help: remove this attribute @@ -105,7 +105,7 @@ warning: functions generic over types or consts must be mangled --> $DIR/suggestions.rs:35:18 | LL | #[no_mangle] pub(crate) fn crossfield<T>() {} - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: remove this attribute diff --git a/tests/ui/lint/unused/unused-attr-duplicate.stderr b/tests/ui/lint/unused/unused-attr-duplicate.stderr index 2310c12c80b..6db6af823f4 100644 --- a/tests/ui/lint/unused/unused-attr-duplicate.stderr +++ b/tests/ui/lint/unused/unused-attr-duplicate.stderr @@ -41,18 +41,6 @@ LL | #[should_panic] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! error: unused attribute - --> $DIR/unused-attr-duplicate.rs:70:1 - | -LL | #[automatically_derived] - | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute - | -note: attribute also specified here - --> $DIR/unused-attr-duplicate.rs:69:1 - | -LL | #[automatically_derived] - | ^^^^^^^^^^^^^^^^^^^^^^^^ - -error: unused attribute --> $DIR/unused-attr-duplicate.rs:14:1 | LL | #![crate_name = "unused_attr_duplicate2"] @@ -191,6 +179,18 @@ LL | #[non_exhaustive] | ^^^^^^^^^^^^^^^^^ error: unused attribute + --> $DIR/unused-attr-duplicate.rs:70:1 + | +LL | #[automatically_derived] + | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute + | +note: attribute also specified here + --> $DIR/unused-attr-duplicate.rs:69:1 + | +LL | #[automatically_derived] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: unused attribute --> $DIR/unused-attr-duplicate.rs:74:1 | LL | #[inline(never)] diff --git a/tests/ui/macros/cfg_select.rs b/tests/ui/macros/cfg_select.rs new file mode 100644 index 00000000000..a4d94836a09 --- /dev/null +++ b/tests/ui/macros/cfg_select.rs @@ -0,0 +1,27 @@ +#![feature(cfg_select)] +#![crate_type = "lib"] + +fn print() { + println!(cfg_select! { + unix => { "unix" } + _ => { "not unix" } + }); +} + +fn arm_rhs_must_be_in_braces() -> i32 { + cfg_select! { + true => 1 + //~^ ERROR: expected `{`, found `1` + } +} + +cfg_select! { + _ => {} + true => {} + //~^ WARN unreachable rule +} + +cfg_select! { + //~^ ERROR none of the rules in this `cfg_select` evaluated to true + false => {} +} diff --git a/tests/ui/macros/cfg_select.stderr b/tests/ui/macros/cfg_select.stderr new file mode 100644 index 00000000000..fef5e95a6bc --- /dev/null +++ b/tests/ui/macros/cfg_select.stderr @@ -0,0 +1,25 @@ +error: expected `{`, found `1` + --> $DIR/cfg_select.rs:13:17 + | +LL | true => 1 + | ^ expected `{` + +warning: unreachable rule + --> $DIR/cfg_select.rs:20:5 + | +LL | _ => {} + | - always matches +LL | true => {} + | ^^^^ this rules is never reached + +error: none of the rules in this `cfg_select` evaluated to true + --> $DIR/cfg_select.rs:24:1 + | +LL | / cfg_select! { +LL | | +LL | | false => {} +LL | | } + | |_^ + +error: aborting due to 2 previous errors; 1 warning emitted + diff --git a/tests/ui/specialization/specialization-default-types.current.stderr b/tests/ui/specialization/specialization-default-types.current.stderr index 67477f9a6d5..09689681740 100644 --- a/tests/ui/specialization/specialization-default-types.current.stderr +++ b/tests/ui/specialization/specialization-default-types.current.stderr @@ -12,7 +12,7 @@ error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:19:9 | LL | default type Output = Box<T>; - | ----------------------------- associated type is `default` and may be overridden + | ------------------- associated type is `default` and may be overridden LL | default fn generate(self) -> Self::Output { | ------------ expected `<T as Example>::Output` because of return type LL | Box::new(self) diff --git a/tests/ui/specialization/specialization-default-types.next.stderr b/tests/ui/specialization/specialization-default-types.next.stderr index 4f7c4765446..1535c6473bd 100644 --- a/tests/ui/specialization/specialization-default-types.next.stderr +++ b/tests/ui/specialization/specialization-default-types.next.stderr @@ -12,7 +12,7 @@ error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:19:9 | LL | default type Output = Box<T>; - | ----------------------------- associated type is `default` and may be overridden + | ------------------- associated type is `default` and may be overridden LL | default fn generate(self) -> Self::Output { | ------------ expected `<T as Example>::Output` because of return type LL | Box::new(self) diff --git a/tests/ui/stats/input-stats.stderr b/tests/ui/stats/input-stats.stderr index eb038bbcaf1..72a9820bb64 100644 --- a/tests/ui/stats/input-stats.stderr +++ b/tests/ui/stats/input-stats.stderr @@ -107,17 +107,17 @@ hir-stats WherePredicate 72 (NN.N%) 3 24 hir-stats - BoundPredicate 72 (NN.N%) 3 hir-stats Local 72 (NN.N%) 1 72 hir-stats InlineAsm 72 (NN.N%) 1 72 -hir-stats ImplItemRef 72 (NN.N%) 2 36 hir-stats Body 72 (NN.N%) 3 24 hir-stats Param 64 (NN.N%) 2 32 hir-stats GenericArg 64 (NN.N%) 4 16 hir-stats - Type 16 (NN.N%) 1 hir-stats - Lifetime 48 (NN.N%) 3 -hir-stats TraitItemRef 56 (NN.N%) 2 28 hir-stats ExprField 40 (NN.N%) 1 40 hir-stats Mod 32 (NN.N%) 1 32 hir-stats Lifetime 28 (NN.N%) 1 28 -hir-stats ForeignItemRef 24 (NN.N%) 1 24 +hir-stats TraitItemId 8 (NN.N%) 2 4 +hir-stats ImplItemId 8 (NN.N%) 2 4 +hir-stats ForeignItemId 4 (NN.N%) 1 4 hir-stats ---------------------------------------------------------------- -hir-stats Total 8_716 173 +hir-stats Total 8_584 173 hir-stats ================================================================ diff --git a/tests/ui/suggestions/issue-104327.stderr b/tests/ui/suggestions/issue-104327.stderr index 1bad82d471e..4515fe223c7 100644 --- a/tests/ui/suggestions/issue-104327.stderr +++ b/tests/ui/suggestions/issue-104327.stderr @@ -2,7 +2,7 @@ error[E0790]: cannot call associated function on trait without specifying the co --> $DIR/issue-104327.rs:10:5 | LL | fn f() {} - | --------- `Foo::f` defined here + | ------ `Foo::f` defined here ... LL | Foo::f(); | ^^^^^^^^ cannot call associated function of trait diff --git a/tests/ui/traits/const-traits/cross-crate.stock.stderr b/tests/ui/traits/const-traits/cross-crate.stock.stderr index 7cdde5a079f..44a60c99ae9 100644 --- a/tests/ui/traits/const-traits/cross-crate.stock.stderr +++ b/tests/ui/traits/const-traits/cross-crate.stock.stderr @@ -5,7 +5,7 @@ LL | Const.func(); | ^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/cross-crate.stocknc.stderr b/tests/ui/traits/const-traits/cross-crate.stocknc.stderr index fb47bf9169f..766c20aa821 100644 --- a/tests/ui/traits/const-traits/cross-crate.stocknc.stderr +++ b/tests/ui/traits/const-traits/cross-crate.stocknc.stderr @@ -13,7 +13,7 @@ LL | Const.func(); | ^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/feature-gate.stock.stderr b/tests/ui/traits/const-traits/feature-gate.stock.stderr index f9d966f0362..f3ba3039a23 100644 --- a/tests/ui/traits/const-traits/feature-gate.stock.stderr +++ b/tests/ui/traits/const-traits/feature-gate.stock.stderr @@ -4,7 +4,7 @@ error[E0658]: const trait impls are experimental LL | impl const T for S {} | ^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -14,7 +14,7 @@ error[E0658]: const trait impls are experimental LL | const fn f<A: [const] T>() {} | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -24,7 +24,7 @@ error[E0658]: const trait impls are experimental LL | fn g<A: const T>() {} | ^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -34,7 +34,7 @@ error[E0658]: const trait impls are experimental LL | discard! { impl [const] T } | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -44,7 +44,7 @@ error[E0658]: const trait impls are experimental LL | discard! { impl const T } | ^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -54,7 +54,7 @@ error[E0658]: `const_trait` is a temporary placeholder for marking a trait that LL | #[const_trait] | ^^^^^^^^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/macro-bare-trait-objects-const-trait-bounds.stderr b/tests/ui/traits/const-traits/macro-bare-trait-objects-const-trait-bounds.stderr index bc0e48112b9..a4e77154b17 100644 --- a/tests/ui/traits/const-traits/macro-bare-trait-objects-const-trait-bounds.stderr +++ b/tests/ui/traits/const-traits/macro-bare-trait-objects-const-trait-bounds.stderr @@ -13,7 +13,7 @@ error[E0658]: const trait impls are experimental LL | check! { [const] Trait } | ^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr b/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr index 5dd648554c9..b500e4858d1 100644 --- a/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr +++ b/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr @@ -26,7 +26,7 @@ error[E0658]: const trait impls are experimental LL | demo! { impl const Trait } | ^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -36,7 +36,7 @@ error[E0658]: const trait impls are experimental LL | demo! { dyn const Trait } | ^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/staged-api-user-crate.stderr b/tests/ui/traits/const-traits/staged-api-user-crate.stderr index 8ac83770cf7..81611da9e74 100644 --- a/tests/ui/traits/const-traits/staged-api-user-crate.stderr +++ b/tests/ui/traits/const-traits/staged-api-user-crate.stderr @@ -5,7 +5,7 @@ LL | Unstable::func(); | ^^^^^^^^^^^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/staged-api.stderr b/tests/ui/traits/const-traits/staged-api.stderr index 4756c490cb1..3e85834eb94 100644 --- a/tests/ui/traits/const-traits/staged-api.stderr +++ b/tests/ui/traits/const-traits/staged-api.stderr @@ -21,7 +21,7 @@ error: trait implementations cannot be const stable yet LL | impl const U for u16 {} | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information error: const stability on the impl does not match the const stability on the trait --> $DIR/staged-api.rs:102:1 @@ -46,7 +46,7 @@ error: trait implementations cannot be const stable yet LL | impl const S for u16 {} | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information error: const stability on the impl does not match the const stability on the trait --> $DIR/staged-api.rs:117:1 diff --git a/tests/ui/traits/const-traits/std-impl-gate.stock.stderr b/tests/ui/traits/const-traits/std-impl-gate.stock.stderr index 1fa71e41a98..261f68bebdb 100644 --- a/tests/ui/traits/const-traits/std-impl-gate.stock.stderr +++ b/tests/ui/traits/const-traits/std-impl-gate.stock.stderr @@ -5,7 +5,7 @@ LL | Default::default() | ^^^^^^^^^^^^^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr index eb1beb41e37..3f48375dd04 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr @@ -16,7 +16,7 @@ error[E0658]: const trait impls are experimental LL | trait Bar: [const] Foo {} | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -26,7 +26,7 @@ error[E0658]: const trait impls are experimental LL | const fn foo<T: [const] Bar>(x: &T) { | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr index eb1beb41e37..3f48375dd04 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr @@ -16,7 +16,7 @@ error[E0658]: const trait impls are experimental LL | trait Bar: [const] Foo {} | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -26,7 +26,7 @@ error[E0658]: const trait impls are experimental LL | const fn foo<T: [const] Bar>(x: &T) { | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr index 7c465731a99..b00ad706a5f 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr @@ -4,7 +4,7 @@ error[E0658]: const trait impls are experimental LL | trait Bar: [const] Foo {} | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -14,7 +14,7 @@ error[E0658]: const trait impls are experimental LL | const fn foo<T: [const] Bar>(x: &T) { | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -24,7 +24,7 @@ error[E0658]: `const_trait` is a temporary placeholder for marking a trait that LL | #[cfg_attr(any(yyy, yyn, nyy, nyn), const_trait)] | ^^^^^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -34,7 +34,7 @@ error[E0658]: `const_trait` is a temporary placeholder for marking a trait that LL | #[cfg_attr(any(yyy, yny, nyy, nyn), const_trait)] | ^^^^^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -45,7 +45,7 @@ LL | x.a(); | ^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr index 7c465731a99..b00ad706a5f 100644 --- a/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr +++ b/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr @@ -4,7 +4,7 @@ error[E0658]: const trait impls are experimental LL | trait Bar: [const] Foo {} | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -14,7 +14,7 @@ error[E0658]: const trait impls are experimental LL | const fn foo<T: [const] Bar>(x: &T) { | ^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -24,7 +24,7 @@ error[E0658]: `const_trait` is a temporary placeholder for marking a trait that LL | #[cfg_attr(any(yyy, yyn, nyy, nyn), const_trait)] | ^^^^^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -34,7 +34,7 @@ error[E0658]: `const_trait` is a temporary placeholder for marking a trait that LL | #[cfg_attr(any(yyy, yny, nyy, nyn), const_trait)] | ^^^^^^^^^^^ | - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date @@ -45,7 +45,7 @@ LL | x.a(); | ^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information + = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr b/tests/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr index 38e692521ca..cf197d035b3 100644 --- a/tests/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr +++ b/tests/ui/traits/default-method/rustc_must_implement_one_of_misuse.stderr @@ -50,7 +50,7 @@ error: not a function --> $DIR/rustc_must_implement_one_of_misuse.rs:26:5 | LL | const A: u8 = 1; - | ^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ | note: required by this annotation --> $DIR/rustc_must_implement_one_of_misuse.rs:24:1 @@ -63,7 +63,7 @@ error: not a function --> $DIR/rustc_must_implement_one_of_misuse.rs:28:5 | LL | type B; - | ^^^^^^^ + | ^^^^^^ | note: required by this annotation --> $DIR/rustc_must_implement_one_of_misuse.rs:24:1 diff --git a/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr b/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr index 0d7f957a50e..6744899e951 100644 --- a/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr +++ b/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr @@ -5,7 +5,7 @@ LL | impl<'a> Deref for dyn Foo + 'a { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo` implements `Deref<Target = dyn Bar<u32>>` which conflicts with supertrait `Bar<i32>` LL | LL | type Target = dyn Bar<u32> + 'a; - | -------------------------------- target type is a supertrait of `dyn Foo` + | ----------- target type is a supertrait of `dyn Foo` | note: the lint level is defined here --> $DIR/deref-upcast-shadowing-lint.rs:2:9 diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr index 806c57e44a2..0d43563e1ab 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr +++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr @@ -5,7 +5,7 @@ LL | impl<'a> Deref for dyn Foo<'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo<'_>` implements `Deref<Target = dyn Bar<'_>>` which conflicts with supertrait `Bar<'_>` LL | LL | type Target = dyn Bar<'a>; - | -------------------------- target type is a supertrait of `dyn Foo<'_>` + | ----------- target type is a supertrait of `dyn Foo<'_>` | note: the lint level is defined here --> $DIR/migrate-lint-deny-regions.rs:2:9 diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr index 86cff5233ff..a483e98efea 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr +++ b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.stderr @@ -5,7 +5,7 @@ LL | impl<'a> Deref for dyn Foo + 'a { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo` implements `Deref<Target = dyn Bar<u32>>` which conflicts with supertrait `Bar<i32>` LL | LL | type Target = dyn Bar<u32> + 'a; - | -------------------------------- target type is a supertrait of `dyn Foo` + | ----------- target type is a supertrait of `dyn Foo` | note: the lint level is defined here --> $DIR/migrate-lint-different-substs.rs:2:9 |
