Repository navigation
Rollup of 21 pull requests - #165056
Rollup of 21 pull requests#165056JonathanBrouwer wants to merge 56 commits into
Conversation
Previously, expressions behind stmt_expr_attributes were only rejected when the cfg condition evaluated to false. If the condition was true, the code compiled successfully. This meant code like an attributed binary operand could compile on one platform but fail on another, even though removing the operand would leave an invalid expression. This change always rejects cfg in expression positions where removing the expression would produce invalid code. Expression positions where removal is safe continue to work as before. Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
```
error[E0310]: the parameter type `R` may not live long enough
--> $DIR/implicit-static-lifetime-in-dyn-trait-return-type.rs:10:5
|
LL | fn bb<R>(r: R) -> Box<dyn Foo> {
| ------- this `dyn Trait` has an implicit `'static` lifetime bound 3
LL | Box::new(Bar(r))
| ^^^^^^^^^^^^^^^^
| |
| the parameter type `R` must be valid for the static lifetime...
| ...so that the type `R` will meet its required lifetime bounds
|
help: consider adding an explicit lifetime bound
|
LL | fn bb<R: 'static>(r: R) -> Box<dyn Foo> {
| +++++++++
help: consider adding an explicit lifetime bound
|
LL | fn bb<'a, R>(r: R) -> Box<dyn Foo + 'a> {
| +++ ++++
```
Report the same error for true and false cfg predicates when the surrounding expression cannot be removed. Apply it consistently during normal expansion and cfg_eval. Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
This is the abstraction that clang/flang both use. It simplifies the code by quite a bit (although not until we delete the old version). Mainly this enables the use of the NewPM for LLVM targets that opt-in (currently only Lanai and MSP430, but more soon).
It's an error to have `#[inline]#[rustc_force_inline]fn blah(){}`, but they both lower to the same `InlineAttr`, so this would error and then have an attribute list of multiple inline attrs
``` error[E0803]: cannot infer an appropriate lifetime for lifetime parameter `'s` in generic type due to conflicting requirements ```
Fixes a side effect of 127a5d9 reported on Zulip.
…td::no_code` macro
|
@bors try jobs=test-aarch64-apple-macos-26-2 |
This comment has been minimized.
This comment has been minimized.
Rollup of 21 pull requests try-job: test-aarch64-apple-macos-26-2
@bors retry That's been the spurious failure of the week unfortunately, likely related to the disk space issues |
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 21 pull requests Successful merges: - #159580 (Reject cfg on expressions that cannot be safely removed) - #162597 (raise ambiguity error on attribute macro that could be tool attribute) - #162808 (Enable `--generate-link-to-definition` rustdoc option on std docs) - #163059 (Recover invalid return type until `{`, `}` or `;`) - #163672 (Use runCodeGen Abstraction for new LLVM) - #164028 (Add a future incompat warning for #[no_link]) - #164188 (Suggest adding lifetime for `dyn Trait` in return type) - #164345 (fix: handle `false` in root contexts) - #164494 (drop ands which are a superset of other ands) - #164785 (delegation: emit error when there is no field for `Self` mapping) - #164799 (Don't use `IntoIterator` in parallel API) - #164871 (Refactor call argument codegen) - #164648 (parse inline and rustc_force_inline with same parser) - #164811 (fix: Prevent ICE when comparing EII impl against generic declaration) - #164900 (make tool_attrs method to retrieve tool attributes.) - #164993 (copy_nonoverlapping: dont skip ovelrap check when src is fully uninit) - #164996 (miri: add missing alignment check in write_bytes) - #165012 (Remove Span::eq_ctxt()) - #165013 ([tiny] Add missing backticks around lifetime name) - #165024 (rustdoc-search: rank re-export lower) - #165028 (Update enzyme to fix one bug related to higher-order derivatives)
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for 0cf65bb failed: CI. Failed job:
|
|
@bors retry This time, it's this spurious error #t-compiler/rust-analyzer > miri failing test |
|
What's the record for the most retries 🤔 |
|
Has to be getting close! I felt lucky when I got three of the same spurious failures in a row at #128349 |
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 21 pull requests Successful merges: - #159580 (Reject cfg on expressions that cannot be safely removed) - #162597 (raise ambiguity error on attribute macro that could be tool attribute) - #162808 (Enable `--generate-link-to-definition` rustdoc option on std docs) - #163059 (Recover invalid return type until `{`, `}` or `;`) - #163672 (Use runCodeGen Abstraction for new LLVM) - #164028 (Add a future incompat warning for #[no_link]) - #164188 (Suggest adding lifetime for `dyn Trait` in return type) - #164345 (fix: handle `false` in root contexts) - #164494 (drop ands which are a superset of other ands) - #164785 (delegation: emit error when there is no field for `Self` mapping) - #164799 (Don't use `IntoIterator` in parallel API) - #164871 (Refactor call argument codegen) - #164648 (parse inline and rustc_force_inline with same parser) - #164811 (fix: Prevent ICE when comparing EII impl against generic declaration) - #164900 (make tool_attrs method to retrieve tool attributes.) - #164993 (copy_nonoverlapping: dont skip ovelrap check when src is fully uninit) - #164996 (miri: add missing alignment check in write_bytes) - #165012 (Remove Span::eq_ctxt()) - #165013 ([tiny] Add missing backticks around lifetime name) - #165024 (rustdoc-search: rank re-export lower) - #165028 (Update enzyme to fix one bug related to higher-order derivatives)
|
test-aarch64-apple-macos-26-2 might be stuck? |
|
It looks to be still making progress actually, just very slowly. Lets let it live for now? |
|
💔 Test for f7ed956 failed: CI. Failed job:
|
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
|
@bors retry |
View all comments
Successful merges:
--generate-link-to-definitionrustdoc option on std docs #162808 (Enable--generate-link-to-definitionrustdoc option on std docs){,}or;#163059 (Recover invalid return type until{,}or;)dyn Traitin return type #164188 (Suggest adding lifetime fordyn Traitin return type)falsein root contexts #164345 (fix: handlefalsein root contexts)Selfmapping #164785 (delegation: emit error when there is no field forSelfmapping)IntoIteratorin parallel API #164799 (Don't useIntoIteratorin parallel API)r? @ghost
Create a similar rollup