about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
AgeCommit message (Collapse)AuthorLines
2023-01-31Rollup merge of #107508 - WaffleLapkin:uneq'15, r=oli-obkGuillaume Gomez-3/+2
`Edition` micro refactor r? ``@oli-obk``
2023-01-31Don't do `.edition().rust_*()`Maybe Waffle-1/+1
2023-01-31Use `Edition` methods a bit moreMaybe Waffle-3/+2
2023-01-30Replace enum `==`s with `match`es where it makes senseMaybe Waffle-14/+15
2023-01-25suggest qualifying bare associated constantsAndy Russell-5/+12
2023-01-22Auto merge of #107185 - compiler-errors:rollup-wkomjma, r=compiler-errorsbors-3/+19
Rollup of 8 pull requests Successful merges: - #103418 (Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report) - #106113 (llvm-wrapper: adapt for LLVM API change) - #106144 (Improve the documentation of `black_box`) - #106578 (Label closure captures/generator locals that make opaque types recursive) - #106749 (Update cc to 1.0.77) - #106935 (Fix `SingleUseLifetime` ICE) - #107015 (Re-enable building rust-analyzer on riscv64) - #107029 (Add new bootstrap members to triagebot.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-21Rollup merge of #106935 - TaKO8Ki:fix-104440, r=cjgillotMichael Goulet-3/+19
Fix `SingleUseLifetime` ICE Fixes #104440 cc: ``@matthiaskrgr``
2023-01-22Auto merge of #107133 - pnkfelix:revert-pr-84022-for-issue-106337, ↵bors-13/+70
r=Mark-Simulacrum Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error" This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36 aka PR #84022 I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-21Auto merge of #106977 - michaelwoerister:unord_id_collections, r=oli-obkbors-5/+5
Use UnordMap and UnordSet for id collections (DefIdMap, LocalDefIdMap, etc) This PR changes the `rustc_data_structures::define_id_collections!` macro to use `UnordMap` and `UnordSet` instead of `FxHashMap` and `FxHashSet`. This should account for a large portion of hash-maps being used in places where they can cause trouble. The changes required are moderate but non-zero: - In some places the collections are extracted into sorted vecs. - There are a few instances where for-loops have been changed to extends. ~~Let's see what the performance impact is. With a bit more refactoring, we might be able to get rid of some of the additional sorting -- but the change set is already big enough. Unless there's a performance impact, I'd like to do further changes in subsequent PRs.~~ Performance does not seem to be negatively affected ([perf-run here](https://github.com/rust-lang/rust/pull/106977#issuecomment-1396776699)). Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). r? `@ghost`
2023-01-20Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error"Felix S. Klock II-13/+70
This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36. I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-20diagnostics: remvoe unnecessary use of `source_map.start_point`Michael Howell-1/+1
2023-01-20diagnostics: use `module_path` to check crate import instead of stringsMichael Howell-20/+4
2023-01-20diagnostics: add `};` only if `{` was added tooMichael Howell-5/+5
2023-01-20diagnostics: suggest changing `s@self::{macro}@::macro` for exportedMichael Howell-1/+29
Fixes #99695
2023-01-19Use UnordMap instead of FxHashMap in define_id_collections!().Michael Woerister-5/+5
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-6/+6
Remove double spaces after dots in comments Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-6/+6
2023-01-17note -> helpMichael Goulet-1/+1
2023-01-17Fix use suggestion spanMichael Goulet-7/+9
2023-01-16fix #104440Takayuki Maeda-3/+19
2023-01-15Only suggest adding type param if path being resolved was a typeMichael Goulet-1/+1
2023-01-13Rollup merge of #106813 - oli-obk:sess_cleanup, r=GuillaumeGomez,petrochenkovMatthias Krüger-1/+5
Remove redundant session field There was already a session available in the resolver, so we access that session.
2023-01-13Remove redundant session fieldOli Scherer-1/+5
2023-01-12Don't suggest dyn as parameter to addMichael Goulet-1/+5
2023-01-12Render missing generics suggestion verboselyMichael Goulet-1/+1
2023-01-11review comments: Tweak outputEsteban Küber-14/+29
* Account for `struct S(pub(super)Ty);` in suggestion * Suggest changing field visibility in E0603 too
2023-01-11review commentEsteban Küber-1/+1
2023-01-11Suggest making private tuple struct field publicEsteban Küber-0/+27
Fix #52144.
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-1/+1
2023-01-10Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obkYuki Okushi-29/+65
Fix bad import suggestion with nested `use` tree Fixes #105566 Fixes #105373 Ideally, we'd find some way to turn these into structured suggestions -- perhaps on a separate line as a different `use` statement, but I have no idea how to access the span for the whole `use` from this point in the import resolution code.
2023-01-09review commentMichael Goulet-8/+13
2023-01-07Rollup merge of #105859 - compiler-errors:hr-lifetime-add, r=davidtwcoMatthias Krüger-6/+21
Point out span where we could introduce higher-ranked lifetime Somewhat addresses #105422, but not really. We don't have that much useful information here since we're still in resolution :^( Maybe this suggestion isn't worth it. If the reviewer has an idea how we can get a more succinct binder information for a structured suggestion, it would be appreciated.
2023-01-04Simplify some iterator combinatorsMichael Goulet-5/+4
2022-12-29Rollup merge of #106221 - Nilstrieb:rptr-more-like-ref-actually, ↵Matthias Krüger-4/+4
r=compiler-errors Rename `Rptr` to `Ref` in AST and HIR The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-28Rename `Rptr` to `Ref` in AST and HIRNilstrieb-4/+4
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-27Make resolve suggestion more genericEsteban Küber-1/+1
2022-12-27review comments: make suggestion more accurateEsteban Küber-2/+10
2022-12-27Fix some totally useless suggestionsMichael Goulet-1/+1
2022-12-27Dont clobber `as ..` rename in import suggestionMichael Goulet-3/+12
2022-12-27Note alternative import candidates in nested use treeMichael Goulet-11/+23
2022-12-27Suppress suggestions for nested use treeMichael Goulet-17/+27
2022-12-26Detect likely `.` -> `..` typo in method callsEsteban Küber-7/+25
Fix #65015.
2022-12-22Rollup merge of #105769 - lyming2007:issue-105177-fix, r=eholkMatthias Krüger-2/+24
add function to tell the identical errors for ambiguity_errors if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same we call these 2 ambiguity errors identical prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix #105177
2022-12-21Change comment to doc commentEric Holk-1/+1
2022-12-19add function to tell if the current ambiguity error matches a previous one ↵Yiming Lei-2/+24
in ambiguity_errors if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same then these 2 ambiguity errors matched prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix #105177
2022-12-18Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=NilstriebMatthias Krüger-6/+2
use &str / String literals instead of format!()
2022-12-18Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errorsMatthias Krüger-1/+1
don't clone Copy types
2022-12-18don't restuct references just to reborrowMatthias Krüger-1/+1
2022-12-18use &str / String literals instead of format!()Matthias Krüger-6/+2
2022-12-18don't clone Copy typesMatthias Krüger-1/+1