1
Fork 0

Rollup merge of #82240 - matthiaskrgr:qmark, r=Dylan-DPC

remove useless ?s (clippy::needless_question_marks)

Example code:
```rust
fn opts() -> Option<String> {
    let s: Option<String> = Some(String::new());
    Some(s?) // this can just be "s"
}
```
This commit is contained in:
Yuki Okushi 2021-02-18 15:57:33 +09:00 committed by GitHub
commit ce6367f479
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 18 deletions

View file

@ -507,12 +507,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
// Unify the original value for each variable with the value
// taken from `query_response` (after applying `result_subst`).
Ok(self.unify_canonical_vars(
cause,
param_env,
original_values,
substituted_query_response,
)?)
self.unify_canonical_vars(cause, param_env, original_values, substituted_query_response)
}
/// Converts the region constraints resulting from a query into an