-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
interpret/cast: make more matches on FloatTy properly exhaustive #121997
Conversation
Failed to set assignee to
|
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
r? compiler |
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.
Can't r but this looks great, thanks for making my work easier :)
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.
thanks ralf, i love exhaustive matches
@bors r+ rollup |
Talk about excellent timing. Getting Miri tests to work with stage0 was a pain point for the proof of concept at https://github.com/rust-lang/rust/pull/114607/files#diff-24bd7b5e2ca32dd28044509d08e68ec5be1c382735128742baec9383acbd6fea. But with a beta branch in only 11 days, that won't be a concern as long as #121926 and some libs support land before then 🎉 |
Co-authored-by: Rémy Rakic <[email protected]>
@bors r=compiler-errors |
That's only an issue for operations that need host floats. Most operations use soft floats which you can implement without any support in the bootstrap compiler. It'd be entirely fine to only land the softfloat operations in the first round. The tests are a lot of work just because there's so many float operations.^^ And they have so many nasty corner-cases, too. |
…-errors interpret/cast: make more matches on FloatTy properly exhaustive Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in rust-lang#121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work. There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^ r? `@tgross35`
Rollup of 15 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121202 (Limit the number of names and values in check-cfg diagnostics) - rust-lang#121213 (Add an example to demonstrate how Rc::into_inner works) - rust-lang#121262 (Add vector time complexity) - rust-lang#121287 (Clarify/add `must_use` message for Rc/Arc/Weak::into_raw.) - rust-lang#121664 (Adjust error `yield`/`await` lowering) - rust-lang#121838 (Use the correct logic for nested impl trait in assoc types) - rust-lang#121860 (Add a tidy check that checks whether the fluent slugs only appear once) - rust-lang#121913 (Don't panic when waiting on poisoned queries) - rust-lang#121959 (Removing absolute path in proc-macro) - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`) - rust-lang#121978 (Fix duplicated path in the "not found dylib" error) - rust-lang#121987 (pattern analysis: abort on arity mismatch) - rust-lang#121993 (Avoid using unnecessary queries when printing the query stack in panics) - rust-lang#121997 (interpret/cast: make more matches on FloatTy properly exhaustive) r? `@ghost` `@rustbot` modify labels: rollup
…-errors interpret/cast: make more matches on FloatTy properly exhaustive Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in rust-lang#121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work. There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^ r? ``@tgross35``
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#121213 (Add an example to demonstrate how Rc::into_inner works) - rust-lang#121262 (Add vector time complexity) - rust-lang#121287 (Clarify/add `must_use` message for Rc/Arc/Weak::into_raw.) - rust-lang#121664 (Adjust error `yield`/`await` lowering) - rust-lang#121826 (Use root obligation on E0277 for some cases) - rust-lang#121838 (Use the correct logic for nested impl trait in assoc types) - rust-lang#121913 (Don't panic when waiting on poisoned queries) - rust-lang#121987 (pattern analysis: abort on arity mismatch) - rust-lang#121993 (Avoid using unnecessary queries when printing the query stack in panics) - rust-lang#121997 (interpret/cast: make more matches on FloatTy properly exhaustive) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121997 - RalfJung:cast-float-ty, r=compiler-errors interpret/cast: make more matches on FloatTy properly exhaustive Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in rust-lang#121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work. There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^ r? ```@tgross35```
Add a spot that was missed in <rust-lang#121997>.
Add a spot that was missed in <rust-lang#121997>.
Add a spot that was missed in <rust-lang#121997>.
Add a spot that was missed in <rust-lang#121997>.
Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in #121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work.
There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^
r? @tgross35