Skip to content

Commit

Permalink
Fix errors after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Oct 14, 2024
1 parent 4179239 commit b95feaa
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_monomorphize/src/collector/abi_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_monomorphize/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/tools/tidy/src/issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion tests/ui/layout/post-mono-layout-cycle-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/layout/post-mono-layout-cycle-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
1 change: 0 additions & 1 deletion tests/ui/layout/post-mono-layout-cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ struct Wrapper<T: Trait> {
}

fn abi<T: Trait>(_: Option<Wrapper<T>>) {}
//~^ ERROR a cycle occurred during layout computation

fn indirect<T: Trait>() {
abi::<T>(None);
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/layout/post-mono-layout-cycle.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ error[E0391]: cycle detected when computing layout of `Wrapper<()>`
= note: cycle used when computing layout of `core::option::Option<Wrapper<()>>`
= 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<T: Trait>(_: Option<Wrapper<T>>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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`.

0 comments on commit b95feaa

Please sign in to comment.