rust/compiler/rustc_ast/src
bors 95561b336c Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber
More robust fallback for `use` suggestion

Our old way to suggest where to add `use`s would first look for pre-existing `use`s in the relevant crate/module, and if there are *no* uses, it would fallback on trying to use another item as the basis for the suggestion.

But this was fragile, as illustrated in issue #87613

This PR instead identifies span of the first token after any inner attributes, and uses *that* as the fallback for the `use` suggestion.

Fix #87613
2022-03-15 03:56:33 +00:00
..
ast mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
attr 2 - Make more use of let_chains 2022-02-26 13:45:43 -03:00
expand Make allocator_kind a query. 2021-06-20 11:52:51 +02:00
util Implement macro meta-variable expressions 2022-03-09 16:46:23 -03:00
ast_like.rs expand: Refactor InvocationCollector visitor for better code reuse 2022-01-07 14:41:22 +08:00
ast.rs Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
entry.rs Fix ICE when main is declared in an extern block 2021-06-09 23:14:02 -04:00
lib.rs 2 - Make more use of let_chains 2022-02-26 13:45:43 -03:00
mut_visit.rs Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
node_id.rs Use LocalExpnId where possible. 2021-07-17 19:41:02 +02:00
ptr.rs Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
token.rs 2 - Make more use of let_chains 2022-02-26 13:45:43 -03:00
tokenstream.rs 2 - Make more use of let_chains 2022-02-26 13:45:43 -03:00
visit.rs Change syntax for TyAlias where clauses 2022-03-05 13:13:45 -05:00