add test ensuring simd codegen checks don't run when a static assertion failed#122287
Merged
bors merged 2 commits intorust-lang:masterfrom Mar 14, 2024
Merged
add test ensuring simd codegen checks don't run when a static assertion failed#122287bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Collaborator
Member
Author
|
We do have this: rust/compiler/rustc_monomorphize/src/collector.rs Lines 824 to 832 in 9669934 This will show the const-error, but the collector keeps going. I guess somewhere it still then check if there was any error and stop before starting codegen? Is that this line here? So I think the key point is there's actually two phases here: collecting all the items, and then codegen'ing them. Const errors are "collection-time errors", not "codegen-time errors". |
This comment has been minimized.
This comment has been minimized.
2dc6689 to
4c57746
Compare
4c57746 to
d765fb8
Compare
Collaborator
|
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 14, 2024
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#119029 (Avoid closing invalid handles) - rust-lang#122238 (Document some builtin impls in the next solver) - rust-lang#122247 (rustdoc-search: depth limit `T<U>` -> `U` unboxing) - rust-lang#122287 (add test ensuring simd codegen checks don't run when a static assertion failed) - rust-lang#122368 (chore: remove repetitive words) - rust-lang#122397 (Various cleanups around the const eval query providers) - rust-lang#122406 (Fix WF for `AsyncFnKindHelper` in new trait solver) - rust-lang#122477 (Change some attribute to only_local) - rust-lang#122482 (Ungate the `UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES` lint) - rust-lang#122490 (Update build instructions for OpenHarmony) Failed merges: - rust-lang#122471 (preserve span when evaluating mir::ConstOperand) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 14, 2024
Rollup merge of rust-lang#122287 - RalfJung:simd-static-assert, r=pnkfelix add test ensuring simd codegen checks don't run when a static assertion failed stdarch relies on this to ensure that SIMD indices are in bounds. I would love to know why this works, but I can't figure out where codegen decides to not codegen a function if a required-const does not evaluate. `@oli-obk` `@bjorn3` do you have any idea?
bjorn3
pushed a commit
to bjorn3/rust
that referenced
this pull request
Mar 16, 2024
…felix add test ensuring simd codegen checks don't run when a static assertion failed stdarch relies on this to ensure that SIMD indices are in bounds. I would love to know why this works, but I can't figure out where codegen decides to not codegen a function if a required-const does not evaluate. `@oli-obk` `@bjorn3` do you have any idea?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
stdarch relies on this to ensure that SIMD indices are in bounds.
I would love to know why this works, but I can't figure out where codegen decides to not codegen a function if a required-const does not evaluate. @oli-obk @bjorn3 do you have any idea?