about summary refs log tree commit diff
path: root/compiler/rustc_resolve
AgeCommit message (Collapse)AuthorLines
2023-03-30Update non-derive macro error message to match suggestionTom Martin-9/+3
It's now split between two errors, one to remove the invalid derive macro and one suggesting adding a new non-derive macro
2023-03-28effvis: Stop considering crate root its own parentVadim Petrochenkov-7/+6
It helped to reuse `update_def` for the crate root, but it created confusion and caused some mistakes when I implemented #109500
2023-03-28effvis: Merge two similar code pathsVadim Petrochenkov-34/+23
2023-03-28Add `(..)` syntax for RTNMichael Goulet-0/+2
2023-03-27Rollup merge of #109354 - Swatinem:rm-closureid, r=compiler-errorsGuillaume Gomez-3/+1
Remove the `NodeId` of `ast::ExprKind::Async` This is a followup to https://github.com/rust-lang/rust/pull/104833#pullrequestreview-1314537416. In my original attempt, I was using `LoweringContext::expr`, which was not correct as it creates a fresh `DefId`. It now uses the correct `DefId` for the wrapping `Expr`, and also makes forwarding `#[track_caller]` attributes more explicit.
2023-03-26Add suggestion to remove derive() if invoked macro is non-deriveTom Martin-5/+17
2023-03-24Auto merge of #107932 - petrochenkov:onlyexport, r=jyn514bors-2/+19
rustdoc: Skip doc link resolution for non-exported items
2023-03-24Rollup merge of #109536 - petrochenkov:qcstore3, r=cjgillotMatthias Krüger-3/+8
resolve: Rename some cstore methods to match queries and add comments about costs associated with replacing them with query calls. Supersedes https://github.com/rust-lang/rust/pull/108346. r? `@cjgillot`
2023-03-23Rollup merge of #109487 - GuillaumeGomez:move-useless-reexport-check, ↵Matthias Krüger-2/+40
r=petrochenkov Move useless_anynous_reexport lint into unused_imports As mentioned in https://github.com/rust-lang/rust/pull/109003, this check should have been merged with `unused_imports` in the start. r? `@petrochenkov`
2023-03-23Rollup merge of #107880 - jieyouxu:issue-107563, r=petrochenkovMatthias Krüger-20/+85
Lint ambiguous glob re-exports Attempts to fix #107563. We currently already emit errors for ambiguous re-exports when two names are re-exported *specifically*, i.e. not from glob exports. This PR attempts to emit deny-by-default lints for ambiguous glob re-exports.
2023-03-23resolve: Rename some cstore methods to match queries and add commentsVadim Petrochenkov-3/+8
about costs associated with replacing them with query calls.
2023-03-23Auto merge of #108221 - petrochenkov:cratecfg, r=michaelwoeristerbors-7/+8
rustc_interface: Add a new query `pre_configure` It partially expands crate attributes before the main expansion pass (without modifying the crate), and the produced preliminary crate attribute list is used for querying a few attributes that are required very early. Crate-level cfg attributes on the crate itself are then expanded normally during the main expansion pass, like attributes on any other nodes. This is a continuation of https://github.com/rust-lang/rust/pull/92473 and one more step to very unstable crate-level proc macro attributes maybe actually working. Previously crate attributes were pre-configured simultaneously with feature extraction, and then written directly into `ast::Crate`.
2023-03-23Auto merge of #109517 - matthiaskrgr:rollup-m3orqzd, r=matthiaskrgrbors-31/+18
Rollup of 7 pull requests Successful merges: - #108541 (Suppress `opaque_hidden_inferred_bound` for nested RPITs) - #109137 (resolve: Querify most cstore access methods (subset 2)) - #109380 (add `known-bug` test for unsoundness issue) - #109462 (Make alias-eq have a relation direction (and rename it to alias-relate)) - #109475 (Simpler checked shifts in MIR building) - #109504 (Stabilize `arc_into_inner` and `rc_into_inner`.) - #109506 (make param bound vars visibly bound vars with -Zverbose) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-23rustdoc: Skip doc link resolution for non-exported itemsVadim Petrochenkov-2/+19
2023-03-23rustc_interface: Add a new query `pre_configure`Vadim Petrochenkov-7/+8
It partially expands crate attributes before the main expansion pass (without modifying the crate), and the produced preliminary crate attribute list is used for querying a few attributes that are required very early. Crate-level cfg attributes are then expanded normally during the main expansion pass, like attributes on any other nodes.
2023-03-23Rollup merge of #109137 - petrochenkov:qcstore2, r=cjgillotMatthias Krüger-31/+18
resolve: Querify most cstore access methods (subset 2) These changes are less likely to cause perf regressions than the rest of https://github.com/rust-lang/rust/pull/108346.
2023-03-23Auto merge of #109503 - matthiaskrgr:rollup-cnp7kdd, r=matthiaskrgrbors-21/+19
Rollup of 9 pull requests Successful merges: - #108954 (rustdoc: handle generics better when matching notable traits) - #109203 (refactor/feat: refactor identifier parsing a bit) - #109213 (Eagerly intern and check CrateNum/StableCrateId collisions) - #109358 (rustc: Remove unused `Session` argument from some attribute functions) - #109359 (Update stdarch) - #109378 (Remove Ty::is_region_ptr) - #109423 (Use region-erased self type during IAT selection) - #109447 (new solver cleanup + implement coherence) - #109501 (make link clickable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-22Rollup merge of #109358 - petrochenkov:nosess, r=cjgillotMatthias Krüger-21/+19
rustc: Remove unused `Session` argument from some attribute functions (One auxiliary test file containing one of these functions was unused, so I removed it instead of updating.)
2023-03-22Auto merge of #109497 - matthiaskrgr:rollup-6txuxm0, r=matthiaskrgrbors-2/+1
Rollup of 10 pull requests Successful merges: - #109373 (Set LLVM `LLVM_UNREACHABLE_OPTIMIZE` to `OFF`) - #109392 (Custom MIR: Allow optional RET type annotation) - #109394 (adapt tests/codegen/vec-shrink-panik for LLVM 17) - #109412 (rustdoc: Add GUI test for "Auto-hide item contents for large items" setting) - #109452 (Ignore the vendor directory for tidy tests.) - #109457 (Remove comment about reusing rib allocations) - #109461 (rustdoc: remove redundant `.content` prefix from span/a colors) - #109477 (`HirId` to `LocalDefId` cleanup) - #109489 (More general captures) - #109494 (Do not feed param_env for RPITITs impl side) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-22Rollup merge of #109489 - est31:generalize_captures, r=WaffleLapkinMatthias Krüger-1/+1
More general captures This avoids repetition of the binding.
2023-03-22Rollup merge of #109457 - Veykril:ribstack, r=petrochenkovMatthias Krüger-1/+0
Remove comment about reusing rib allocations Perf indicates this to not be worth the complexity cc #4948
2023-03-23Rollup merge of #109312 - petrochenkov:docice5, r=GuillaumeGomezDylan DPC-8/+10
rustdoc: Cleanup parent module tracking for doc links Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary. Fixes https://github.com/rust-lang/rust/issues/108501. That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since https://github.com/rust-lang/rust/pull/93805 anyway.
2023-03-22Move useless_anynous_reexport lint into unused_importsGuillaume Gomez-2/+40
2023-03-22More general capturesest31-1/+1
This avoids repetition
2023-03-22Remove comment about re-using Rib allocationsLukas Wirth-1/+0
2023-03-22rustc: Remove unused `Session` argument from some attribute functionsVadim Petrochenkov-21/+19
2023-03-21rustdoc: Cleanup parent module tracking for doc linksVadim Petrochenkov-8/+10
Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
2023-03-20Lint ambiguous glob re-exports许杰友 Jieyou Xu (Joe)-20/+85
2023-03-19Remove the `NodeId` of `ast::ExprKind::Async`Arpad Borsos-3/+1
2023-03-19fix: modify the condition that `resolve_imports` stopsbohan-15/+23
2023-03-18Rollup merge of #109257 - petrochenkov:bindebug, r=WaffleLapkinMatthias Krüger-4/+12
resolve: Improve debug impls for `NameBinding` Print at least the Some/None/Ok/Err status of the nested bindings if not the bindings themselves. Noticed while reviewing https://github.com/rust-lang/rust/pull/108729.
2023-03-18Rollup merge of #109222 - chenyukang:yukang/fix-109143, r=petrochenkovMatthias Krüger-2/+3
Do not ICE for unexpected lifetime with ConstGeneric rib Fixes #109143 r? ````@petrochenkov```` Combining this test with the previous test will affect the previous diagnostics, so I added a separate test case.
2023-03-17resolve: Improve debug impls for `NameBinding`Vadim Petrochenkov-4/+12
Print at least the Some/None/Ok/Err status of the nested bindings if not the bindings themselves.
2023-03-17Do not ICE for unexpected lifetime with ConstGeneric ribyukang-2/+3
2023-03-16resolve: Minor cleanup to `Resolver::get_module`Vadim Petrochenkov-19/+16
2023-03-16resolve: Use `item_name` and `opt_parent` in `Resolver::get_module`Vadim Petrochenkov-12/+5
This is a cleanup that doesn't introduce new query calls, but this way `def_key` is decoded twice which may matter for performance or may not
2023-03-16resolve: Remove `item_attrs_untracked`Vadim Petrochenkov-4/+1
2023-03-16resolve: Remove `item_generics_num_lifetimes`Vadim Petrochenkov-1/+1
2023-03-15error-msg: impl better suggestion for `E0532`Ezra Shaw-16/+32
2023-03-13metadata/resolve: Minor refactoring to "tcx -> cstore" conversionsVadim Petrochenkov-3/+5
2023-03-13resolve: Remove `struct_field_names_untracked`Vadim Petrochenkov-48/+51
2023-03-13resolve: Centralize retrieval of items span and item nameVadim Petrochenkov-69/+37
2023-03-13resolve: Remove `fn_has_self_parameter_untracked`Vadim Petrochenkov-10/+15
2023-03-13resolve: Remove `struct_field_visibilities_untracked`Vadim Petrochenkov-28/+35
2023-03-13resolve: Partially remove `item_attrs_untracked`Vadim Petrochenkov-8/+4
2023-03-13resolve: Remove `visibility_untracked`Vadim Petrochenkov-7/+4
2023-03-11Simplify message pathsest31-1/+1
This makes it easier to open the messages file while developing on features. The commit was the result of automatted changes: for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-03-11Auto merge of #109019 - matthiaskrgr:rollup-ihjntil, r=matthiaskrgrbors-10/+19
Rollup of 9 pull requests Successful merges: - #104363 (Make `unused_allocation` lint against `Box::new` too) - #106633 (Stabilize `nonzero_min_max`) - #106844 (allow negative numeric literals in `concat!`) - #108071 (Implement goal caching with the new solver) - #108542 (Force parentheses around `match` expression in binary expression) - #108690 (Place size limits on query keys and values) - #108708 (Prevent overflow through Arc::downgrade) - #108739 (Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time) - #108806 (Querify register_tools and post-expansion early lints) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-11Rollup merge of #108806 - cjgillot:query-lints, r=davidtwcoMatthias Krüger-10/+19
Querify register_tools and post-expansion early lints The 2 extra queries correspond to code that happen before and after macro expansion, and don't need the resolver to exist.
2023-03-10rustdoc: Don't crash on `crate` references in blocksAdrian Heine-10/+2
This is a regression from #94857.