rust/compiler/rustc_expand/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
..
mbe Fix remaining meta-variable expression TODOs 2022-03-14 08:29:20 -03:00
mut_visit rustc_ast: Turn MutVisitor::token_visiting_enabled into a constant 2021-10-18 00:23:24 +03:00
parse re-format with new rustfmt 2021-11-30 13:08:41 -05:00
tokenstream Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
base.rs Associate multiple with a crate too. 2022-03-03 18:45:25 -05:00
build.rs Include ignore message in libtest output 2022-02-24 17:36:36 -05:00
config.rs Move the set of features to the features query. 2022-03-03 18:08:30 +01:00
expand.rs Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
lib.rs Implement macro meta-variable expressions 2022-03-09 16:46:23 -03:00
mbe.rs Implement macro meta-variable expressions 2022-03-09 16:46:23 -03:00
module.rs Associate multiple with a crate too. 2022-03-03 18:45:25 -05:00
placeholders.rs Associate multiple with a crate too. 2022-03-03 18:45:25 -05:00
proc_macro.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
proc_macro_server.rs all: fix some typos 2022-03-03 19:47:23 +08:00
tests.rs Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00