mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
fix one
This commit is contained in:
parent
972a19f4cb
commit
f64eecd2e2
1 changed files with 1 additions and 1 deletions
|
@ -683,7 +683,7 @@ where
|
||||||
{
|
{
|
||||||
// This function should be only called with `Impl`, `Trait`, or `Function`, for which it's
|
// This function should be only called with `Impl`, `Trait`, or `Function`, for which it's
|
||||||
// infallible to get source ast.
|
// infallible to get source ast.
|
||||||
let node = ctx.sema.source(def).unwrap().value;
|
let node = ctx.sema.source(def).expect("definition's source couldn't be found").value;
|
||||||
let generic_params = node.generic_param_list().into_iter().flat_map(|it| it.generic_params());
|
let generic_params = node.generic_param_list().into_iter().flat_map(|it| it.generic_params());
|
||||||
let where_clauses = node.where_clause().into_iter().flat_map(|it| it.predicates());
|
let where_clauses = node.where_clause().into_iter().flat_map(|it| it.predicates());
|
||||||
(generic_params, where_clauses)
|
(generic_params, where_clauses)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue