about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2022-12-18don't clone Copy typesMatthias Krüger-1/+1
2022-12-09Fold `Definitions` into the untracked dataOli Scherer-19/+21
2022-12-09Move the untracked cstore and source_span into a structOli Scherer-20/+13
2022-12-09Generate crate loaders on the flyOli Scherer-12/+24
2022-12-09ResolverTree does not require access to the crate loader, only the storeOli Scherer-5/+5
2022-12-07Use `Symbol` for the crate name instead of `String`/`str`Oli Scherer-1/+1
2022-11-28Rename `NestedMetaItem::[Ll]iteral` as `NestedMetaItem::[Ll]it`.Nicholas Nethercote-1/+1
We already use a mix of `Literal` and `Lit`. The latter is better because it is shorter without causing any ambiguity.
2022-11-27Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errorsbors-0/+5
Separate lifetime ident from lifetime resolution in HIR Drive-by: change how suggested generic args are computed. Fixes https://github.com/rust-lang/rust/issues/103815 I recommend reviewing commit-by-commit.
2022-11-24Record in HIR whether lifetime elision was succesful.Camille GILLOT-0/+5
2022-11-22rustc_metadata: Switch module children decoding to an iteratorVadim Petrochenkov-1/+1
2022-11-18Rollup merge of #101162 - rajputrajat:master, r=davidtwcoMatthias Krüger-0/+1
Migrate rustc_resolve to use SessionDiagnostic, part # 1 crate a somewhat on larger size, so plz allow some time to get it finished.
2022-11-13rustdoc: Resolve doc links in external traits having local implsVadim Petrochenkov-0/+5
2022-11-13migrating rustc_resolve to SessionDiagnostic. work in progress. startRajput, Rajat-0/+1
implement binding_shadows migrate till self-in-generic-param-default use braces in fluent message as suggested by @compiler-errors. to fix lock file issue reported by CI migrate 'unreachable label' error run formatter name the variables correctly in fluent file SessionDiagnostic -> Diagnostic test "pattern/pat-tuple-field-count-cross.rs" passed test "resolve/bad-env-capture2.rs" passed test "enum/enum-in-scope.rs" and other depended on "resolve_binding_shadows_something_unacceptable" should be passed now. fix crash errors while running test-suite. there might be more. then_some(..) suits better here. all tests passed convert TraitImpl and InvalidAsm. TraitImpl is buggy yet. will fix after receiving help from Zulip migrate "Ralative-2018" migrate "ancestor only" migrate "expected found" migrate "Indeterminate" migrate "module only" revert to the older implementation for now. since this is failing at the moment. follow the convension for fluent variable order the diag attribute as suggested in review comment fix merge error. migrate trait-impl-duplicate make the changes compatible with "Flatten diagnostic slug modules #103345" fix merge remove commented code merge issues fix review comments fix tests
2022-11-05resolve: More detailed effective visibility tracking for importsVadim Petrochenkov-3/+16
Also drop `extern` blocks from the effective visibility table, they are nominally private and it doesn't make sense to keep them there.
2022-11-01Rollup merge of #103760 - petrochenkov:macimp, r=cjgillotDylan DPC-17/+24
resolve: Turn the binding from `#[macro_export]` into a proper `Import` Continuation of https://github.com/rust-lang/rust/pull/91795. ```rust #[macro_export] macro_rules! m { /*...*/ } ``` is desugared to something like ```rust macro_rules! m { /*...*/ } // Non-modularized macro_rules item pub use m; // It's modularized reexport ``` This PR adjusts the internal representation to better match this model.
2022-11-01Rollup merge of #84022 - Aaron1011:remove-derive-res-fallback, r=petrochenkovDylan DPC-4/+2
Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error r? `@ghost`
2022-10-31resolve: Turn the binding from `#[macro_export]` into a proper `Import`Vadim Petrochenkov-11/+14
2022-10-31resolve: Not all imports have their own `NodeId`Vadim Petrochenkov-6/+10
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-10/+11
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-25rustc_middle: Rearrange resolver outputs structures slightlyVadim Petrochenkov-14/+13
2022-10-24Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard errorAaron Hill-4/+2
2022-10-14more dupe word typosRageking8-1/+1
2022-10-11Rollup merge of #102889 - petrochenkov:partres, r=cjgillotMatthias Krüger-11/+5
rustc_hir: Less error-prone methods for accessing `PartialRes` resolution
2022-10-11Rollup merge of #100387 - cjgillot:hygiene-trait-impl, r=petrochenkovMatthias Krüger-0/+2
Check uniqueness of impl items by trait item when applicable. When checking uniqueness of item names in impl blocks, we currently use the same definition of hygiene as for toplevel items. This means that a plain item and one generated by a macro 2.0 do not collide. This hygiene rule does not match with how impl items resolve to associated trait items. As a consequence, we misdiagnose the trait impls. This PR proposes to consider that trait impl items are uses of the corresponding trait items during resolution, instead of checking for duplicates later. An error is emitted when a trait impl item is used twice. There should be no stable breakage, since macros 2.0 are still unstable. r? ``@petrochenkov`` cc ``@RalfJung`` Fixes https://github.com/rust-lang/rust/issues/71614.
2022-10-11Report duplicate definitions in trait impls during resolution.Camille GILLOT-0/+2
2022-10-11rustc_hir: Less error-prone methods for accessing `PartialRes` resolutionVadim Petrochenkov-11/+5
2022-10-10Move lifetime resolution module to rustc_hir_analysis.Camille GILLOT-5/+0
2022-10-05Delay function resolution error until typeckMichael Goulet-0/+2
2022-09-27rustc_typeck to rustc_hir_analysislcnr-1/+1
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-09-08Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, r=oli-obkDylan DPC-21/+2
Remove unnecessary `PartialOrd` and `Ord`
2022-09-08remove unnecessary `PartialOrd` and `Ord`Takayuki Maeda-21/+2
2022-09-07rustc: Parameterize `ty::Visibility` over used IDVadim Petrochenkov-7/+9
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
2022-09-05Remove generics_def_id_map from the resolver.Camille GILLOT-8/+0
2022-09-02Rollup merge of #100147 - Bryanskiy:private-in-public, r=petrochenkovGuillaume Gomez-0/+18
optimization of access level table construction Refactoring which was mentioned in #87487
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+0
by module
2022-08-31access_levels.rs refactorBryanskiy-0/+18
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-30Auto merge of #101183 - Dylan-DPC:rollup-6kewixv, r=Dylan-DPCbors-5/+1
Rollup of 9 pull requests Successful merges: - #95376 (Add `vec::Drain{,Filter}::keep_rest`) - #100092 (Fall back when relating two opaques by substs in MIR typeck) - #101019 (Suggest returning closure as `impl Fn`) - #101022 (Erase late bound regions before comparing types in `suggest_dereferences`) - #101101 (interpret: make read-pointer-as-bytes a CTFE-only error with extra information) - #101123 (Remove `register_attr` feature) - #101175 (Don't --bless in pre-push hook) - #101176 (rustdoc: remove unused CSS selectors for `.table-display`) - #101180 (Add another MaybeUninit array test with const) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-29Revert let_chains stabilizationNilstrieb-0/+1
This reverts commit 326646074940222d602f3683d0559088690830f4. This is the revert against master, the beta revert was already done in #100538.
2022-08-28Remove `register_attr` featureYuki Okushi-5/+1
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-08-23Improve local generic parameter suggestions.Camille GILLOT-0/+10
2022-08-12Adjust cfgsMark Rousskov-1/+0
2022-08-04Add docs to generics_def_id_mapSantiago Pastorino-1/+4
2022-08-04Implement def_id based remappingSantiago Pastorino-0/+5
2022-07-26Rollup merge of #99729 - cjgillot:rm-unused-tuple, r=michaelwoeristerMatthias Krüger-3/+3
Remove unused tuple fields Found by https://github.com/rust-lang/rust/pull/95977
2022-07-25Unused tuple fields in rustc_resolve.Camille GILLOT-3/+3
2022-07-25Report elision failures on the AST.Camille GILLOT-0/+1
2022-07-16Stabilize `let_chains`Caio-1/+1