about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
AgeCommit message (Collapse)AuthorLines
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.
2023-03-07Simplify `sort_by` callsMaybe Waffle-1/+1
2023-03-06Querify early_lint_checks.Camille GILLOT-0/+2
2023-03-06Querify registered_tools.Camille GILLOT-10/+17
2023-03-05Auto merge of #108351 - petrochenkov:rmdit, r=cjgillotbors-33/+24
rustc_middle: Remove trait `DefIdTree` This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-03Match unmatched backticks in comments in compiler/est31-1/+1
2023-03-03Match unmatched backticks in compiler/ that are part of rustdocest31-1/+1
2023-03-02rustc_middle: Remove trait `DefIdTree`Vadim Petrochenkov-33/+24
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-02-28Auto merge of #108098 - notriddle:notriddle/rustdoc-tooltip-alloc, ↵bors-6/+10
r=GuillaumeGomez rustdoc: reduce allocations when generating tooltips An attempt to reduce the perf regression in https://github.com/rust-lang/rust/pull/108052#issuecomment-1430631861
2023-02-27Rollup merge of #108533 - notriddle:notriddle/resolver-def-descr, ↵Matthias Krüger-2/+6
r=compiler-errors diagnostics: avoid querying `associated_item` in the resolver Fixes #108529 CC #108324
2023-02-27Rollup merge of #108363 - cjgillot:unused-crate, r=WaffleLapkinMatthias Krüger-23/+121
Move the unused extern crate check back to the resolver. It doesn't have anything to do in `rustc_hir_typeck`.
2023-02-27diagnostics: avoid querying `associated_item` in the resolverMichael Howell-2/+6
Fixes #108529
2023-02-25Address review.Camille GILLOT-10/+6
2023-02-22rustdoc: reduce allocations when generating tooltipsMichael Howell-6/+10
An attempt to reduce the perf regression in https://github.com/rust-lang/rust/pull/108052#issuecomment-1430631861
2023-02-23Auto merge of #108324 - notriddle:notriddle/assoc-fn-method, ↵bors-2/+2
r=compiler-errors,davidtwco,estebank,oli-obk diagnostics: if AssocFn has self argument, describe as method Discussed in https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515 This commit also changes the tooltips on rustdoc intra-doc links targeting methods. For anyone not sure why this is being done, see the Reference definitions of these terms in <https://doc.rust-lang.org/1.67.1/reference/items/associated-items.html#methods> > Associated functions whose first parameter is named `self` are called methods and may be invoked using the [method call operator](https://doc.rust-lang.org/1.67.1/reference/expressions/method-call-expr.html), for example, `x.foo()`, as well as the usual function call notation. In particular, while this means it's technically correct for rustc to refer to a method as an associated function (and there are a few cases where it'll still do so), rustc *must never* use the term "method" to refer to an associated function that does not have a `self` parameter.
2023-02-22Remove some resolver outputs.Camille GILLOT-10/+0