-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 7 pull requests #118433
Rollup of 7 pull requests #118433
Commits on Oct 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 03301f2 - Browse repository at this point
Copy the full SHA 03301f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2dc6ba2 - Browse repository at this point
Copy the full SHA 2dc6ba2View commit details
Commits on Nov 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7304220 - Browse repository at this point
Copy the full SHA 7304220View commit details -
Configuration menu - View commit details
-
Copy full SHA for e511cc7 - Browse repository at this point
Copy the full SHA e511cc7View commit details
Commits on Nov 27, 2023
-
Rework
ast::BinOpKind::to_string
andast::UnOp::to_string
.- Rename them both `as_str`, which is the typical name for a function that returns a `&str`. (`to_string` is appropriate for functions returning `String` or maybe `Cow<'a, str>`.) - Change `UnOp::as_str` from an associated function (weird!) to a method. - Avoid needless `self` dereferences.
Configuration menu - View commit details
-
Copy full SHA for 0efd2a9 - Browse repository at this point
Copy the full SHA 0efd2a9View commit details -
Rename
BinOpKind::lazy
asBinOpKind::is_lazy
.To match `BinOpKind::is_comparison` and `hir::BinOpKind::is_lazy`.
Configuration menu - View commit details
-
Copy full SHA for 705b484 - Browse repository at this point
Copy the full SHA 705b484View commit details
Commits on Nov 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c751bfa - Browse repository at this point
Copy the full SHA c751bfaView commit details -
Remove
hir::BinOp
,hir::BinOpKind
, andhir::UnOp
.They're identical to the same-named types from `ast`. I find it silly (and inefficient) to have all this boilerplate code to convert one type to an identical type. There is already a small amount of type sharing between the AST and HIR, e.g. `Attribute`, `MacroDef`. The commit adds a `pub use` to `rustc_hir` so that, for example, `ast::BinOp` can also be referred to as `hir::BinOp`. This is so the many existing `hir`-qualified mentions of these types don't need to change. The commit also moves a couple of operations from the (removed) HIR types to the AST types, e.g. `is_by_value`.
Configuration menu - View commit details
-
Copy full SHA for d9fef77 - Browse repository at this point
Copy the full SHA d9fef77View commit details -
Configuration menu - View commit details
-
Copy full SHA for a76d2e1 - Browse repository at this point
Copy the full SHA a76d2e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2c500b - Browse repository at this point
Copy the full SHA f2c500bView commit details -
Fix coroutine validation for mixed panic strategy
Validation introduced in rust-lang#113124 allows UnwindAction::Continue and TerminatorKind::Resume to occur only in functions with ABI that can unwind. The function ABI depends on the panic strategy, which can vary across crates. Usually MIR is built and validated in the same crate. The coroutine drop glue thus far was an exception. As a result validation could fail when mixing different panic strategies. Avoid the problem by executing AbortUnwindingCalls along with the validation.
Configuration menu - View commit details
-
Copy full SHA for 5161b22 - Browse repository at this point
Copy the full SHA 5161b22View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd5abb5 - Browse repository at this point
Copy the full SHA dd5abb5View commit details
Commits on Nov 29, 2023
-
Rollup merge of rust-lang#116839 - joboet:xous_thread_parking, r=m-ou-se
Implement thread parking for xous This follows the pattern set by [the Windows parker](https://github.com/rust-lang/rust/blob/ddef56d5dfa18f169af9db912dc8e8343797eebb/library/std/src/sys/windows/thread_parking.rs) when it uses keyed events. An atomic variable is used to track the state and optimize the fast path, while notifications are send via the ticktime server to block and unblock the thread. ping `@xobs` `@rustbot` label +T-libs +A-atomic r? libs
Configuration menu - View commit details
-
Copy full SHA for 2eec51c - Browse repository at this point
Copy the full SHA 2eec51cView commit details -
Rollup merge of rust-lang#118265 - RalfJung:memcpy, r=cuviper
remove the memcpy-on-equal-ptrs assumption One of the libc we support, musl, [defines `memcpy` with `restrict` pointers](https://git.musl-libc.org/cgit/musl/tree/src/string/memcpy.c#n5). This in fact matches the definition in the C standard. Calling that `memcpy` with overlapping pointers is clearly UB, who knows what the compiler did when optimizing this `memcpy` -- it certainly assumed source and destination to be disjoint. Lucky enough, it does not seem like we actually need this assumption that `memcpy(p, p, n)` is always allowed. clang and GCC need it since they use `memcpy` to compile C assignments, but [we use memmove for similar code](https://godbolt.org/z/bcW85WYcM). There are no known cases where LLVM introduces calls to memcpy on equal pointers itself. (And if there were, that would be a soundness bug in rustc due to the musl issue mentioned above.) This does mean we must make sure to never call the LLVM `memcpy` builtin on equal ranges even though the LangRef says that is allowed. Currently that is the case so we just need to make sure it remains the case. :) Cc `@rust-lang/opsem` `@rust-lang/wg-llvm`
Configuration menu - View commit details
-
Copy full SHA for 92a74e4 - Browse repository at this point
Copy the full SHA 92a74e4View commit details -
Rollup merge of rust-lang#118269 - compiler-errors:poly, r=wesleywiser
Unify `TraitRefs` and `PolyTraitRefs` in `ValuePairs` I did this recently with `FnSigs` and `PolyFnSigs` but didn't think to do it with `TraitRefs` and `PolyTraitRefs`.
Configuration menu - View commit details
-
Copy full SHA for 68d31b1 - Browse repository at this point
Copy the full SHA 68d31b1View commit details -
Rollup merge of rust-lang#118394 - nnethercote:rm-hir-Ops, r=cjgillot
Remove HIR opkinds `hir::BinOp`, `hir::BinOpKind`, and `hir::UnOp` are identical to `ast::BinOp`, `ast::BinOpKind`, and `ast::UnOp`, respectively. This seems silly, so this PR removes the HIR ones. (A re-export lets the AST ones be referred to using a `hir::` qualifier, which avoids renaming churn.) r? `@cjgillot`
Configuration menu - View commit details
-
Copy full SHA for 20473eb - Browse repository at this point
Copy the full SHA 20473ebView commit details -
Rollup merge of rust-lang#118398 - mu001999:std/add_cfgs, r=thomcc
Add proper cfgs in std Detected by rust-lang#118257
Configuration menu - View commit details
-
Copy full SHA for b7016ae - Browse repository at this point
Copy the full SHA b7016aeView commit details -
Rollup merge of rust-lang#118419 - compiler-errors:await-span2, r=cjg…
…illot Eagerly return `ExprKind::Err` on `yield`/`await` in wrong coroutine context This PR does 2 things: 1. Refuses to lower `.await` or `yield` when we are outside of the right coroutine context for the operator. Instead, we lower to `hir::ExprKind::Err`, to silence subsequent redundant errors. 2. Reworks a bit of the span tracking in `LoweringContext` to fix a bad span when we have something like `let x = [0; async_fn().await]` where the `await` is inside of an anon const. The span for the "item" still kinda sucks, since it overlaps with the `await` span, but at least it's accurate.
Configuration menu - View commit details
-
Copy full SHA for 8cfdccf - Browse repository at this point
Copy the full SHA 8cfdccfView commit details -
Rollup merge of rust-lang#118422 - tmiasko:mix, r=compiler-errors
Fix coroutine validation for mixed panic strategy Validation introduced in rust-lang#113124 allows `UnwindAction::Continue` and `TerminatorKind::Resume` to occur only in functions with ABI that can unwind. The function ABI depends on the panic strategy, which can vary across crates. Usually MIR is built and validated in the same crate. The coroutine drop glue thus far was an exception. As a result validation could fail when mixing different panic strategies. Avoid the problem by executing `AbortUnwindingCalls` along with the validation. Fixes rust-lang#116953.
Configuration menu - View commit details
-
Copy full SHA for e8d0c56 - Browse repository at this point
Copy the full SHA e8d0c56View commit details