diff options
Diffstat (limited to 'tests')
53 files changed, 311 insertions, 281 deletions
diff --git a/tests/mir-opt/pre-codegen/README.md b/tests/mir-opt/pre-codegen/README.md index a338c18e09e..f0598703cd9 100644 --- a/tests/mir-opt/pre-codegen/README.md +++ b/tests/mir-opt/pre-codegen/README.md @@ -1,3 +1,3 @@ -The goal of this directory is to track the quality of MIR that is given to codegen in a standard `-O` condiguration. +The goal of this directory is to track the quality of MIR that is given to codegen in a standard `-O` configuration. As such, feel free to `--bless` whatever changes you get here, so long as doing so doesn't add substantially more MIR. 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/SUMMARY.md b/tests/ui/SUMMARY.md index 8de74d41f39..1aeb0fcfbea 100644 --- a/tests/ui/SUMMARY.md +++ b/tests/ui/SUMMARY.md @@ -410,7 +410,7 @@ These tests revolve around command-line flags which change the way error/warning ## `tests/ui/diagnostic_namespace/` -Exercises `#[diagnostic::*]` namespaced attributes. See [RFC 3368 Diagnostic attribute namepsace](https://github.com/rust-lang/rfcs/blob/master/text/3368-diagnostic-attribute-namespace.md). +Exercises `#[diagnostic::*]` namespaced attributes. See [RFC 3368 Diagnostic attribute namespace](https://github.com/rust-lang/rfcs/blob/master/text/3368-diagnostic-attribute-namespace.md). ## `tests/ui/diagnostic-width/`: `--diagnostic-width` 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-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/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/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/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/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 |
