-
Notifications
You must be signed in to change notification settings - Fork 13.9k
error on non-rustic ABIs using unsized parameters #148302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| extern "C" fn c_polymorphic<T: ?Sized>(_: T) {} | ||
| //~^ ERROR this function definition uses unsized type `[u8]` which is not supported with the chosen ABI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mention of [u8] here is a bit unfortunate, but I think it's the best we can do.
b594a4e to
52bfde2
Compare
|
Would have been nice if we could also get rid of the checks for unsized params in the call conv calculation code, but alas this checks runs after the call conv calculation code, so removing those checks would probably cause issues. |
|
@bors try @rust-timer queue r=me if perf is neutral |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
error on non-rustic ABIs using unsized parameters
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (6c023aa): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary -3.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 476.459s -> 473.98s (-0.52%) |
|
@bors r+ |
error on non-rustic ABIs using unsized parameters tracking issue: #48055 This came up in #144529 (comment). The idea is that the layout of an unsized type is unstable (following the rust layout rules), and hence stable ABIs should not use unsized types. On stable, unsized types (or generics with a `?Sized` bound) are not accepted as parameters, so the errors introduced by this PR can only be observed when the unstable `unsized_fn_params` feature is enabled. r? `@bjorn3` cc `@RalfJung`
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
52bfde2 to
8e44e3f
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r+ |
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 53efb3d (parent) -> 1ef7943 (this PR) Test differencesShow 14 test diffsStage 0
Stage 1
Stage 2
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 1ef7943ee607160a564655b6596f83670ef95df5 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (1ef7943): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.5%, secondary -2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.5%, secondary -1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 473.384s -> 474.243s (0.18%) |
tracking issue: #48055
This came up in #144529 (comment).
The idea is that the layout of an unsized type is unstable (following the rust layout rules), and hence stable ABIs should not use unsized types. On stable, unsized types (or generics with a
?Sizedbound) are not accepted as parameters, so the errors introduced by this PR can only be observed when the unstableunsized_fn_paramsfeature is enabled.r? @bjorn3
cc @RalfJung