Repository navigation
Rollup of 14 pull requests - #164640
Rollup of 14 pull requests#164640JonathanBrouwer wants to merge 48 commits into
Conversation
…mpiler-flags=<flags>`
If we try to eagerly process our skip count, we might see the end of the inner iterator. `Iterator::advance_by` is supposed to return a non-zero `Err` count when exhausted, but there's no room for `Skip` to report anything in this case. So, it's better that we don't even try.
Invalid lifetime suggested:
```
error[E0311]: the parameter type `S` may not live long enough
--> $DIR/do-not-suggest-anon-lifetime.rs:16:10
|
LL | ) -> impl Future<Output = Result<Self::Response, Self::Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `impl Future<Output = Result<<Foo as Service<S, Request>>::Response, <Foo as Service<S, Request>>::Error>>` will meet its required lifetime bounds...
|
::: $DIR/auxiliary/anon_lifetime.rs:14:9
|
LL | &self,
| - the parameter type `S` must be valid for the anonymous lifetime as defined here...
|
note: ...that is required by this bound
--> $DIR/auxiliary/anon_lifetime.rs:17:77
|
LL | ) -> impl Future<Output = Result<Self::Response, Self::Error>> + Send + '_;
| ^^
help: consider adding an explicit lifetime bound
|
LL | ) -> impl Future<Output = Result<Self::Response, Self::Error>> where S: anon {
| +++++++++++++
```
Given
```rust
---
packag.edition = "2024"
[dependencies]
rama = "0.2.0"
---
fn main() {}
struct Foo;
impl<S, Request: 'static> rama::Service<S, Request> for Foo {
type Response = ();
type Error = ();
fn serve(
&self,
_ctx: rama::Context<S>,
_req: Request,
) -> impl Future<Output = Result<Self::Response, Self::Error>> {
async { todo!() }
}
}
```
emit
```
error[E0311]: the parameter type `S` may not live long enough
--> f20.rs:20:10
|
20 | ) -> impl Future<Output = Result<Self::Response, Self::Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `impl Future<Output = Result<<Foo as Service<S, Request>>::Response, <Foo as Service<S, Request>>::Error>>` will meet its required lifetime bounds...
|
::: /home/gh-estebank/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rama-core-0.2.0/src/service/svc.rs:19:9
|
19 | &self,
| - the parameter type `S` must be valid for the anonymous lifetime as defined here...
|
note: ...that is required by this bound
--> /home/gh-estebank/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rama-core-0.2.0/src/service/svc.rs:22:77
|
22 | ) -> impl Future<Output = Result<Self::Response, Self::Error>> + Send + '_;
| ^^
```
without the incorrect suggestion
```
help: consider adding an explicit lifetime bound
|
22 | ) -> impl Future<Output = Result<Self::Response, Self::Error>> where S: anon {
| +++++++++++++
```
It does not have any use, and it is a no-op we have to process on the hot path of macro parsing.
The parsing code is much hotter than `compute_locs()`, so perform the match over there. This might mildly change the debug representation of computed `[MatcherLoc]`s, but it's probably worthwhile for perf.
…Only` and fix docs
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 14 pull requests Successful merges: - #163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - #163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - #163701 (add ReadDir::dir to get the directory handle of the underlying directory) - #164488 (Don't try to skip anything in `Skip::advance_by(0)`) - #164611 (Improve bit permutation codegen) - #164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - #148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - #162668 (document that `!` does bitwise and logical negation) - #164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - #164509 (layout invariant: turn delayed bug back into proper assertion) - #164540 (Minor optimizations around macro parsing) - #164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - #164595 (Allow attributes in function trait parameters) - #164629 (arch::breakpoint: avoid confusing 'equivalent' terminology)
|
@bors treeopen |
|
Tree is now open for merging. |
|
💔 Test for b0cdc90 failed: CI. Failed job:
|
|
@bors retry |
|
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. |
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 14 pull requests Successful merges: - #163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - #163104 ([debuginfo] Emit `usize` and `isize` as typedefs) - #163701 (add ReadDir::dir to get the directory handle of the underlying directory) - #164488 (Don't try to skip anything in `Skip::advance_by(0)`) - #164611 (Improve bit permutation codegen) - #164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - #148842 (Avoid incorrect lifetime suggestion involving `sym::anon`) - #162668 (document that `!` does bitwise and logical negation) - #164264 (lint: suggest `fXX::is_nan` for unsuffixed NaN comparisons) - #164509 (layout invariant: turn delayed bug back into proper assertion) - #164540 (Minor optimizations around macro parsing) - #164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - #164595 (Allow attributes in function trait parameters) - #164629 (arch::breakpoint: avoid confusing 'equivalent' terminology)
|
💔 Test for f2d75f8 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 |
|
PR #164629, which is a member of this rollup, was unapproved. This rollup was thus unapproved. |
|
PR #164629, which is a member of this rollup, changed its commit SHA to This rollup was closed. |
Successful merges:
RUSTC_BOOTSTRAP=-allow-unstable-compiler-flagsmode for testing stable compiler behavior in UI tests #163664 (Add newRUSTC_BOOTSTRAP=-allow-unstable-compiler-flagsmode for testing stable compiler behavior in UI tests)usizeandisizeas typedefs #163104 ([debuginfo] Emitusizeandisizeas typedefs)Skip::advance_by(0)#164488 (Don't try to skip anything inSkip::advance_by(0))is_powerpc64_feature_detectedintois_powerpc_feature_detected#164612 (std: Combineis_powerpc64_feature_detectedintois_powerpc_feature_detected)sym::anon#148842 (Avoid incorrect lifetime suggestion involvingsym::anon)!does bitwise and logical negation #162668 (document that!does bitwise and logical negation)fXX::is_nanfor unsuffixed NaN comparisons #164264 (lint: suggestfXX::is_nanfor unsuffixed NaN comparisons)deprecatedattribute on modules #164594 (rustdoc: Correctly handle innerdeprecatedattribute on modules)r? @ghost
Create a similar rollup