-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Improve Style #67221
Improve Style #67221
Commits on Dec 11, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 9ef9015 - Browse repository at this point
Copy the full SHA 9ef9015View commit details
Commits on Dec 13, 2019
-
Configuration menu - View commit details
-
Copy full SHA for c2d6f0a - Browse repository at this point
Copy the full SHA c2d6f0aView commit details
Commits on Dec 16, 2019
-
Clarify
Box<T>
representation and its use in FFIThis officializes what was only shown as a code example in [the unsafe code guidelines](https://rust-lang.github.io/unsafe-code-guidelines/layout/function-pointers.html?highlight=box#use) and follows [the discussion](rust-lang/unsafe-code-guidelines#157) in the corresponding repository. It is also related to [the issue](#52976) regarding marking `Box<T>` `#[repr(transparent)]`.
Configuration menu - View commit details
-
Copy full SHA for b45e03c - Browse repository at this point
Copy the full SHA b45e03cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f39b864 - Browse repository at this point
Copy the full SHA f39b864View commit details -
- Use meaningful names - Clarify comments - Fix C function declaration
Configuration menu - View commit details
-
Copy full SHA for 1ce980e - Browse repository at this point
Copy the full SHA 1ce980eView commit details -
Optimize Ord trait implementation for bool
Casting the booleans to `i8`s and converting their difference into `Ordering` generates better assembly than casting them to `u8`s and comparing them.
Configuration menu - View commit details
-
Copy full SHA for c404b4c - Browse repository at this point
Copy the full SHA c404b4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2845b55 - Browse repository at this point
Copy the full SHA 2845b55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69a2249 - Browse repository at this point
Copy the full SHA 69a2249View commit details -
Configuration menu - View commit details
-
Copy full SHA for e05236b - Browse repository at this point
Copy the full SHA e05236bView commit details -
Configuration menu - View commit details
-
Copy full SHA for eac3b0a - Browse repository at this point
Copy the full SHA eac3b0aView commit details -
Apply suggestions from code review
Co-Authored-By: lzutao <taolzu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for dcd0468 - Browse repository at this point
Copy the full SHA dcd0468View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d320c6 - Browse repository at this point
Copy the full SHA 5d320c6View commit details -
const-prop: Restrict scalar pair propagation
We now only propagate a scalar pair if the Rvalue is a tuple with two scalars. This for example avoids propagating a (u8, u8) value when Rvalue has type `((), u8, u8)` (see the regression test). While this is a correct thing to do, implementation is tricky and will be done later. Fixes #66971 Fixes #66339 Fixes #67019
Configuration menu - View commit details
-
Copy full SHA for c14ad54 - Browse repository at this point
Copy the full SHA c14ad54View commit details -
async/await: more improvements to non-send errors
Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for 6e4788a - Browse repository at this point
Copy the full SHA 6e4788aView commit details -
async/await: correct diag note for
async move
This commit corrects the diagnostic note for `async move {}` so that `await` is mentioned, rather than `yield`. Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for 891ab30 - Browse repository at this point
Copy the full SHA 891ab30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95f2ca0 - Browse repository at this point
Copy the full SHA 95f2ca0View commit details -
Configuration menu - View commit details
-
Copy full SHA for cac6e98 - Browse repository at this point
Copy the full SHA cac6e98View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3e3e0f - Browse repository at this point
Copy the full SHA e3e3e0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ee69bb - Browse repository at this point
Copy the full SHA 5ee69bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd08bf7 - Browse repository at this point
Copy the full SHA dd08bf7View commit details -
Make const index and subslice array projections more useful
* `min_length` is now exact for const index elements. * const index elements are always from the start. * make array `Subslice` `PlaceElems` count both `from` and `to` from the start.
Configuration menu - View commit details
-
Copy full SHA for c96fd6f - Browse repository at this point
Copy the full SHA c96fd6fView commit details -
Remove
uniform_array_move_out
passesThese passes were buggy, MIR building is now responsible for canonicalizing `ConstantIndex` projections and `MoveData` is responsible for splitting `Subslice` projections.
Configuration menu - View commit details
-
Copy full SHA for 1678550 - Browse repository at this point
Copy the full SHA 1678550View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4793a34 - Browse repository at this point
Copy the full SHA 4793a34View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6f1279 - Browse repository at this point
Copy the full SHA d6f1279View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e2ac67 - Browse repository at this point
Copy the full SHA 4e2ac67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6699d58 - Browse repository at this point
Copy the full SHA 6699d58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 182becc - Browse repository at this point
Copy the full SHA 182beccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f8b040 - Browse repository at this point
Copy the full SHA 2f8b040View commit details -
Configuration menu - View commit details
-
Copy full SHA for 453605d - Browse repository at this point
Copy the full SHA 453605dView commit details -
Optimize
shallow_resolve_changed
.It can be made even more specialized.
Configuration menu - View commit details
-
Copy full SHA for ed28f79 - Browse repository at this point
Copy the full SHA ed28f79View commit details -
Change
PendingPredicateObligation::stalled_on
's type.From a `Vec<Ty>` to a `Vec<InferTy>`, because that's a more restrictive type. This is a perf win because the ultra-hot function `shallow_resolve_changed` has less pattern-matching to do.
Configuration menu - View commit details
-
Copy full SHA for 4d77427 - Browse repository at this point
Copy the full SHA 4d77427View commit details -
Fix
-Z print-type-sizes
's handling of zero-sized fields.Currently, the type `struct S { x: u32, y: u32, tag: () }` is incorrectly described like this: ``` print-type-size type: `S`: 8 bytes, alignment: 4 bytes print-type-size field `.x`: 4 bytes print-type-size field `.tag`: 0 bytes, offset: 0 bytes, alignment: 1 bytes print-type-size padding: 4 bytes print-type-size field `.y`: 4 bytes, alignment: 4 bytes ``` Specifically: - The `padding` line is wrong. (There is no padding.) - The `offset` and `alignment` on the `.tag` line shouldn't be printed. The problem is that multiple fields can end up with the same offset, and the printing code doesn't handle this correctly. This commit fixes it by adjusting the field sorting so that zero-sized fields are dealt with before non-zero-sized fields. With that in place, the printing code works correctly. The commit also corrects the "something is very wrong" comment. The new output looks like this: ``` print-type-size type: `S`: 8 bytes, alignment: 4 bytes print-type-size field `.tag`: 0 bytes print-type-size field `.x`: 4 bytes print-type-size field `.y`: 4 bytes ```
Configuration menu - View commit details
-
Copy full SHA for 62d372c - Browse repository at this point
Copy the full SHA 62d372cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8219c6f - Browse repository at this point
Copy the full SHA 8219c6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 147c7cd - Browse repository at this point
Copy the full SHA 147c7cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for b10ffdb - Browse repository at this point
Copy the full SHA b10ffdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for f48f742 - Browse repository at this point
Copy the full SHA f48f742View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb8871d - Browse repository at this point
Copy the full SHA cb8871dView commit details -
erase regions instead of using
builtin_deref
The reason we were invoking `builtin_deref` was to enable comparisons when the type was `&T`. For the reasons outlined in the comment, those comparisons failed because the regions disagreed.
Configuration menu - View commit details
-
Copy full SHA for 8db343f - Browse repository at this point
Copy the full SHA 8db343fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e86f974 - Browse repository at this point
Copy the full SHA e86f974View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42cc1d7 - Browse repository at this point
Copy the full SHA 42cc1d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c5047d - Browse repository at this point
Copy the full SHA 6c5047dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7bb1606 - Browse repository at this point
Copy the full SHA 7bb1606View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93adec3 - Browse repository at this point
Copy the full SHA 93adec3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e530df - Browse repository at this point
Copy the full SHA 7e530dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4529d78 - Browse repository at this point
Copy the full SHA 4529d78View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd07d5f - Browse repository at this point
Copy the full SHA fd07d5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e3072d - Browse repository at this point
Copy the full SHA 2e3072dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1637a4 - Browse repository at this point
Copy the full SHA f1637a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f57b003 - Browse repository at this point
Copy the full SHA f57b003View commit details