rust/compiler
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
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
rustc_ast_lowering Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
rustc_ast_passes Rollup merge of #94635 - jhpratt:merge-deprecated-attrs, r=davidtwco 2022-03-10 12:20:51 +01:00
rustc_ast_pretty Change syntax for TyAlias where clauses 2022-03-05 13:13:45 -05:00
rustc_attr Rollup merge of #94635 - jhpratt:merge-deprecated-attrs, r=davidtwco 2022-03-10 12:20:51 +01:00
rustc_borrowck Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_builtin_macros Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
rustc_codegen_cranelift Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_codegen_gcc Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_codegen_llvm Rollup merge of #90621 - adamgemmell:dev/stabilise-target-feature, r=Amanieu 2022-03-14 17:24:56 +01:00
rustc_codegen_ssa Rollup merge of #90621 - adamgemmell:dev/stabilise-target-feature, r=Amanieu 2022-03-14 17:24:56 +01:00
rustc_const_eval Auto merge of #94733 - nnethercote:fix-AdtDef-interning, r=fee1-dead 2022-03-12 07:02:05 +00:00
rustc_data_structures add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
rustc_driver
rustc_error_codes
rustc_errors Rollup merge of #94670 - xFrednet:rfc-2383-expect-impl-after-party, r=flip1995,wesleywiser 2022-03-14 17:24:58 +01:00
rustc_expand Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
rustc_feature Rollup merge of #90621 - adamgemmell:dev/stabilise-target-feature, r=Amanieu 2022-03-14 17:24:56 +01:00
rustc_fs_util
rustc_graphviz
rustc_hir Identify anonymous lifetimes by their DefId in HIR. 2022-03-12 14:18:56 +01:00
rustc_hir_pretty
rustc_incremental
rustc_index Add comment linking to closed PR for future optimizers 2022-03-07 19:06:42 +01:00
rustc_infer Auto merge of #94733 - nnethercote:fix-AdtDef-interning, r=fee1-dead 2022-03-12 07:02:05 +00:00
rustc_interface Rollup merge of #94362 - Urgau:check-cfg-values, r=petrochenkov 2022-03-04 22:58:34 +01:00
rustc_lexer
rustc_lint Rollup merge of #94670 - xFrednet:rfc-2383-expect-impl-after-party, r=flip1995,wesleywiser 2022-03-14 17:24:58 +01:00
rustc_lint_defs Rollup merge of #94670 - xFrednet:rfc-2383-expect-impl-after-party, r=flip1995,wesleywiser 2022-03-14 17:24:58 +01:00
rustc_llvm RustWrapper: add missing include 2022-03-10 11:16:33 -05:00
rustc_log
rustc_macros add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
rustc_metadata Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
rustc_middle Rollup merge of #94670 - xFrednet:rfc-2383-expect-impl-after-party, r=flip1995,wesleywiser 2022-03-14 17:24:58 +01:00
rustc_mir_build Fix rebase conflicts with stderr files 2022-03-12 15:38:44 -05:00
rustc_mir_dataflow Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_mir_transform Auto merge of #94733 - nnethercote:fix-AdtDef-interning, r=fee1-dead 2022-03-12 07:02:05 +00:00
rustc_monomorphize Introduce ConstAllocation. 2022-03-07 08:25:50 +11:00
rustc_parse Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
rustc_parse_format
rustc_passes Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_plugin_impl
rustc_privacy Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_query_impl
rustc_query_system
rustc_resolve Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
rustc_save_analysis Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_serialize
rustc_session Rollup merge of #94274 - djkoloski:unknown_unstable_lints, r=tmandry 2022-03-10 23:12:57 +01:00
rustc_span Rollup merge of #90621 - adamgemmell:dev/stabilise-target-feature, r=Amanieu 2022-03-14 17:24:56 +01:00
rustc_symbol_mangling Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_target Add support for targeting riscv32im-unknown-none-elf 2022-03-09 13:51:29 -08:00
rustc_trait_selection Auto merge of #92285 - compiler-errors:dyn-proj-bounds, r=nikomatsakis 2022-03-15 01:31:42 +00:00
rustc_traits Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_ty_utils Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
rustc_type_ir
rustc_typeck Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00