diff --git a/compiler/rustc_monomorphize/src/collector/abi_check.rs b/compiler/rustc_monomorphize/src/collector/abi_check.rs index ecc378ecd3d96..7778573edffb5 100644 --- a/compiler/rustc_monomorphize/src/collector/abi_check.rs +++ b/compiler/rustc_monomorphize/src/collector/abi_check.rs @@ -48,7 +48,7 @@ fn do_check_abi<'tcx>( /// Checks that the ABI of a given instance of a function does not contain vector-passed arguments /// or return values for which the corresponding target feature is not enabled. -pub fn check_instance_abi<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) { +pub(crate) fn check_instance_abi<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) { let param_env = ParamEnv::reveal_all(); let Ok(abi) = tcx.fn_abi_of_instance(param_env.and((instance, ty::List::empty()))) else { // An error will be reported during codegen if we cannot determine the ABI of this @@ -65,7 +65,7 @@ pub fn check_instance_abi<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) { /// Checks that a call expression does not try to pass a vector-passed argument which requires a /// target feature that the caller does not have, as doing so causes UB because of ABI mismatch. -pub fn check_call_site_abi<'tcx>( +pub(crate) fn check_call_site_abi<'tcx>( tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, span: Span, diff --git a/compiler/rustc_monomorphize/src/errors.rs b/compiler/rustc_monomorphize/src/errors.rs index e99321252bdc9..3005374f16052 100644 --- a/compiler/rustc_monomorphize/src/errors.rs +++ b/compiler/rustc_monomorphize/src/errors.rs @@ -96,7 +96,7 @@ pub(crate) struct UnknownCguCollectionMode<'a> { #[derive(Diagnostic)] #[diag(monomorphize_abi_error_disabled_vector_type_def)] #[help] -pub struct AbiErrorDisabledVectorTypeDef<'a> { +pub(crate) struct AbiErrorDisabledVectorTypeDef<'a> { #[primary_span] pub span: Span, pub required_feature: &'a str, @@ -105,7 +105,7 @@ pub struct AbiErrorDisabledVectorTypeDef<'a> { #[derive(Diagnostic)] #[diag(monomorphize_abi_error_disabled_vector_type_call)] #[help] -pub struct AbiErrorDisabledVectorTypeCall<'a> { +pub(crate) struct AbiErrorDisabledVectorTypeCall<'a> { #[primary_span] pub span: Span, pub required_feature: &'a str, diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt index 66c176c6f4424..87b85315c55b2 100644 --- a/src/tools/tidy/src/issues.txt +++ b/src/tools/tidy/src/issues.txt @@ -1530,6 +1530,7 @@ ui/issues/issue-12920.rs ui/issues/issue-13027.rs ui/issues/issue-13058.rs ui/issues/issue-13105.rs +ui/issues/issue-131342-2.rs ui/issues/issue-13167.rs ui/issues/issue-13202.rs ui/issues/issue-13204.rs diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 41f7778c95272..1daf01234a95c 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -17,7 +17,7 @@ use ignore::Walk; const ENTRY_LIMIT: u32 = 901; // FIXME: The following limits should be reduced eventually. -const ISSUES_ENTRY_LIMIT: u32 = 1673; +const ISSUES_ENTRY_LIMIT: u32 = 1674; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/crashes/131342-2.rs b/tests/ui/issues/issue-131342-2.rs similarity index 96% rename from tests/crashes/131342-2.rs rename to tests/ui/issues/issue-131342-2.rs index 79b6a837a49fb..43bf70bde5841 100644 --- a/tests/crashes/131342-2.rs +++ b/tests/ui/issues/issue-131342-2.rs @@ -1,4 +1,4 @@ -//@ known-bug: #131342 +//@ check-pass // see also: 131342.rs fn main() { diff --git a/tests/ui/layout/post-mono-layout-cycle-2.rs b/tests/ui/layout/post-mono-layout-cycle-2.rs index 356f1e777c7d0..e9a5292fbbdfb 100644 --- a/tests/ui/layout/post-mono-layout-cycle-2.rs +++ b/tests/ui/layout/post-mono-layout-cycle-2.rs @@ -45,7 +45,6 @@ where T: Blah, { async fn ice(&mut self) { - //~^ ERROR a cycle occurred during layout computation let arr: [(); 0] = []; self.t.iter(arr.into_iter()).await; } diff --git a/tests/ui/layout/post-mono-layout-cycle-2.stderr b/tests/ui/layout/post-mono-layout-cycle-2.stderr index ad01c2694faf5..ea69b39706f48 100644 --- a/tests/ui/layout/post-mono-layout-cycle-2.stderr +++ b/tests/ui/layout/post-mono-layout-cycle-2.stderr @@ -12,12 +12,12 @@ LL | Blah::iter(self, iterator).await | = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future -error: a cycle occurred during layout computation - --> $DIR/post-mono-layout-cycle-2.rs:47:5 +note: the above error was encountered while instantiating `fn main::{closure#0}` + --> $DIR/post-mono-layout-cycle-2.rs:16:15 | -LL | async fn ice(&mut self) { - | ^^^^^^^^^^^^^^^^^^^^^^^ +LL | match fut.as_mut().poll(ctx) { + | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0733`. diff --git a/tests/ui/layout/post-mono-layout-cycle.rs b/tests/ui/layout/post-mono-layout-cycle.rs index 8d136190c0052..6753c01267ecd 100644 --- a/tests/ui/layout/post-mono-layout-cycle.rs +++ b/tests/ui/layout/post-mono-layout-cycle.rs @@ -14,7 +14,6 @@ struct Wrapper { } fn abi(_: Option>) {} -//~^ ERROR a cycle occurred during layout computation fn indirect() { abi::(None); diff --git a/tests/ui/layout/post-mono-layout-cycle.stderr b/tests/ui/layout/post-mono-layout-cycle.stderr index 47f7f30b1cb4c..e2f6ac595d006 100644 --- a/tests/ui/layout/post-mono-layout-cycle.stderr +++ b/tests/ui/layout/post-mono-layout-cycle.stderr @@ -5,12 +5,12 @@ error[E0391]: cycle detected when computing layout of `Wrapper<()>` = note: cycle used when computing layout of `core::option::Option>` = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information -error: a cycle occurred during layout computation - --> $DIR/post-mono-layout-cycle.rs:16:1 +note: the above error was encountered while instantiating `fn indirect::<()>` + --> $DIR/post-mono-layout-cycle.rs:23:5 | -LL | fn abi(_: Option>) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | indirect::<()>(); + | ^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0391`.