summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late
AgeCommit message (Collapse)AuthorLines
2023-01-16fix #104440Takayuki Maeda-3/+19
2023-01-12Don't suggest dyn as parameter to addMichael Goulet-1/+5
2023-01-11review comments: Tweak outputEsteban Küber-12/+3
* 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/+20
Fix #52144.
2022-12-28Rename `Rptr` to `Ref` in AST and HIRNilstrieb-2/+2
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-18use &str / String literals instead of format!()Matthias Krüger-6/+2
2022-12-13Rollup merge of #104864 - chenyukang:yukang/fix-104700-binding, r=estebankMatthias Krüger-0/+16
Account for item-local in inner scope for E0425 Fixes #104700
2022-12-09Generate crate loaders on the flyOli Scherer-4/+5
2022-11-29clean up pr 104954Rageking8-1/+1
2022-11-27make simple check of prinf function.Vincenzo Palazzo-0/+8
With this commit we start to make some simple check when the name resolution fails, and we generate some helper message in case the name is a C name like in the case of the `printf` and suggest the correct rust method. Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-11-25fix the crossing function issueyukang-1/+1
2022-11-25fix #104700, account for item-local in inner scope for E0425yukang-0/+16
2022-11-23resolve: Don't use constructor def ids in the map for field namesVadim Petrochenkov-2/+5
Also do some minor cleanup to insertion of those field names
2022-11-21Unreserve braced enum variants in value namespaceVadim Petrochenkov-10/+2
2022-11-17Use `ThinVec` in `ast::Path`.Nicholas Nethercote-2/+4
2022-11-17Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and ↵Nicholas Nethercote-10/+8
patterns.
2022-11-12Rollup merge of #103970 - oli-obk:unhide_unknown_spans, r=estebankDylan DPC-8/+10
Unhide unknown spans r? ```@estebank```
2022-11-11Rollup merge of #103531 - chenyukang:yukang/fix-103474, r=estebankManish Goregaokar-12/+12
Suggest calling the instance method of the same name when method not found Fixes #103474
2022-11-11Print all labels, even if they have no span. Fall back to main item's span.Oli Scherer-8/+10
2022-11-10Rollup merge of #104186 - chenyukang:yukang/fix-104086-let-binding-issue, ↵Manish Goregaokar-14/+7
r=oli-obk Tighten the 'introduce new binding' suggestion Fixes #104086
2022-11-09Make span_suggestions take IntoIteratorMichael Goulet-3/+3
2022-11-09DiagnosticBuilder -> DiagnosticMichael Goulet-5/+5
2022-11-10add 'is_assign_rhs' to avoid weird suggesting 'let'yukang-21/+7
2022-11-09fix tests and code cleanupyukang-5/+1
2022-11-09Fix #104086, Tighten the 'introduce new binding' suggestionyukang-7/+18
2022-11-05Do not make typo suggestions when suggesting pattern matchingDeadbeef-2/+13
Fixes #103909.
2022-10-30Rollup merge of #103560 - zbyrn:issue-103358-fix, r=cjgillotDylan DPC-15/+21
Point only to the identifiers in the typo suggestions of shadowed names instead of the entire struct Fixes #103358. As discussed in the issue, the `Span` of the candidate `Ident` for a typo replacement is stored alongside its `Symbol` in `TypoSuggestion`. Then, the span of the identifier is what the "you might have meant to refer to" note is pointed at, rather than the entire struct definition. Comments in #103111 and the issue both suggest that it is desirable to: 1. include names defined in the same crate as the typo, 2. ignore names defined elsewhere such as in `std`, _and_ 3. include names introduced indirectly via `use`. Since a name from another crate but introduced via `use` has non-local `def_id`, to achieve this, a suggestion is displayed if either the `def_id` of the suggested name is local, or the `span` of the suggested name is in the same file as the typo itself. Some UI tests have also been modified to reflect this change. r? `@cjgillot`
2022-10-29avoid unnecessary `&str` to `String` conversionsTakayuki Maeda-4/+1
2022-10-25Modify check to output 'you might have meant' for indirect referenceByron Zhong-2/+15
2022-10-25Add check to only output 'you might have meant' when the candidate name is ↵Byron Zhong-1/+2
in the same crate
2022-10-25Add Span in TypoSuggestion and TypoCandidateByron Zhong-16/+8
2022-10-26suggest calling the method of the same name when method not foundyukang-12/+12
2022-10-25Rollup merge of #103350 - clubby789:refer-to-assoc-method, r=wesleywiserYuki Okushi-13/+29
Change terminology for assoc method suggestions when they are not called Fixes #103325 ```@rustbot``` label +A-diagnostics
2022-10-23Rollup merge of #101908 - chenyukang:fix-101880, r=estebankDylan DPC-53/+43
Suggest let for assignment, and some code refactor Fixes #101880
2022-10-21Different suggestions for when associated functions are referred toclubby789-13/+29
2022-10-21Rollup merge of #103111 - cjgillot:shadow-label, r=estebankDylan DPC-9/+61
Account for hygiene in typo suggestions, and use them to point to shadowed names Fixes https://github.com/rust-lang/rust/issues/97459 r? `@estebank`
2022-10-20fix rust-lang#101880: suggest let for assignment, and some code refactoryukang-53/+43
2022-10-18Fix the bug of next_point in spanyukang-1/+1
2022-10-16Point to shadowed name when it exists.Camille GILLOT-5/+40
2022-10-16Account for hygiene when suggesting typos.Camille GILLOT-4/+21
2022-10-11Rollup merge of #102889 - petrochenkov:partres, r=cjgillotMatthias Krüger-22/+14
rustc_hir: Less error-prone methods for accessing `PartialRes` resolution
2022-10-11rustc_hir: Less error-prone methods for accessing `PartialRes` resolutionVadim Petrochenkov-22/+14
2022-10-10Move lifetime resolution module to rustc_hir_analysis.Camille GILLOT-1899/+0
2022-10-10Rollup merge of #102868 - compiler-errors:rename-assoc-tyalias-to-ty, r=TaKO8KiDylan DPC-2/+2
Rename `AssocItemKind::TyAlias` to `AssocItemKind::Type` Thanks `@camsteffen` for catching this in ast too, cc https://github.com/rust-lang/rust/pull/102829#issuecomment-1272649247
2022-10-10Rename AssocItemKind::TyAlias to AssocItemKind::TypeMichael Goulet-2/+2
2022-10-10Rollup merge of #102323 - Stoozy:master, r=cjgillotYuki Okushi-2/+31
Trying to suggest additional lifetime parameter ``@cjgillot`` This is what I have so far for #100615
2022-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-1/+1
2022-10-01Removed unnecessary for loopstoozy-16/+9
2022-09-29Auto merge of #101887 - nnethercote:shrink-Res, r=spastorinobors-1/+1
Shrink `hir::def::Res` r? `@spastorino`