about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
AgeCommit message (Collapse)AuthorLines
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
2022-12-18higher-ranked lifetime messageMichael Goulet-6/+21
2022-12-13Rollup merge of #104864 - chenyukang:yukang/fix-104700-binding, r=estebankMatthias Krüger-1/+23
Account for item-local in inner scope for E0425 Fixes #104700
2022-12-09Fold `Definitions` into the untracked dataOli Scherer-25/+26
2022-12-09Move the untracked cstore and source_span into a structOli Scherer-26/+22
2022-12-09Generate crate loaders on the flyOli Scherer-25/+36
2022-12-09ResolverTree does not require access to the crate loader, only the storeOli Scherer-6/+6
2022-12-07Use `Symbol` for the crate name instead of `String`/`str`Oli Scherer-1/+1
2022-12-06Rollup merge of #105289 - Rageking8:fix-dupe-word-typos, r=cjgillotYuki Okushi-1/+1
Fix dupe word typos
2022-12-05Rollup merge of #105230 - cjgillot:issue-104312, r=petrochenkovMatthias Krüger-1/+1
Skip recording resolution for duplicated generic params. Turns out the fix was simpler than I thought. Fixes https://github.com/rust-lang/rust/issues/104312
2022-12-05fix dupe word typosRageking8-1/+1
2022-12-04Rollup merge of #101975 - chenyukang:fix-101749, r=compiler-errorsMatthias Krüger-12/+27
Suggest to use . instead of :: when accessing a method of an object Fixes #101749 Fixes #101542
2022-12-03Skip recording resolution for duplicated generic params.Camille GILLOT-1/+1
2022-12-03fix #101749, use . instead of :: when accessing a method of an objectyukang-12/+27
2022-12-03fix #105069, Add AmbiguityError for inconsistent resolution for an importyukang-5/+16
2022-12-01rustc_ast_lowering: Stop lowering imports into multiple itemsVadim Petrochenkov-49/+8
Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-11-29clean up pr 104954Rageking8-1/+1
2022-11-28Rollup merge of #104954 - vincenzopalazzo:macros/prinf, r=estebankMatthias Krüger-0/+8
make simple check of prinf function Fixes https://github.com/rust-lang/rust/issues/92898 With this commit we start to make some simple check when the name resolution fails, and we generate some helper messages in case the name is a C name like in the case of the `printf` and suggest the correct rust method. `@rustbot` r? `@pnkfelix` Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>