Josh Soref
e09d0d2a29
Spelling - compiler
...
* account
* achieved
* advising
* always
* ambiguous
* analysis
* annotations
* appropriate
* build
* candidates
* cascading
* category
* character
* clarification
* compound
* conceptually
* constituent
* consts
* convenience
* corresponds
* debruijn
* debug
* debugable
* debuggable
* deterministic
* discriminant
* display
* documentation
* doesn't
* ellipsis
* erroneous
* evaluability
* evaluate
* evaluation
* explicitly
* fallible
* fulfill
* getting
* has
* highlighting
* illustrative
* imported
* incompatible
* infringing
* initialized
* into
* intrinsic
* introduced
* javascript
* liveness
* metadata
* monomorphization
* nonexistent
* nontrivial
* obligation
* obligations
* offset
* opaque
* opportunities
* opt-in
* outlive
* overlapping
* paragraph
* parentheses
* poisson
* precisely
* predecessors
* predicates
* preexisting
* propagated
* really
* reentrant
* referent
* responsibility
* rustonomicon
* shortcircuit
* simplifiable
* simplifications
* specify
* stabilized
* structurally
* suggestibility
* translatable
* transmuting
* two
* unclosed
* uninhabited
* visibility
* volatile
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-17 16:09:18 -04:00
Vadim Petrochenkov
60c6dc07de
resolve: Restore some effective visibility optimizations
...
Something similar was previously removed as a part of #104602 , but after this PR all table changes should also be "locally correct" after every update.
2023-03-31 17:07:59 +04:00
Vadim Petrochenkov
b3bfeaf765
effvis: Stop considering crate root its own parent
...
It helped to reuse `update_def` for the crate root, but it created confusion and caused some mistakes when I implemented #109500
2023-03-28 22:18:02 +04:00
Vadim Petrochenkov
ede21e8932
effvis: Merge two similar code paths
2023-03-28 22:12:45 +04:00
许杰友 Jieyou Xu (Joe)
1f67949f0e
Lint ambiguous glob re-exports
2023-03-20 03:22:31 +08:00
Vadim Petrochenkov
c83553da31
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-02 23:46:44 +04:00
Oli Scherer
0847b79ada
Remove ResolverTree
2023-02-20 15:28:59 +00:00
Oli Scherer
2a47113efa
Remove IntoDefIdTree
2023-02-20 15:28:59 +00:00
Oli Scherer
4953d70e2f
Stuff a TyCtxt into the Resolver
2023-02-20 15:28:59 +00:00
Oli Scherer
43a5cc383d
Separate the lifetime of the session and the arena in the resolver
2023-02-14 10:01:25 +00:00
Vadim Petrochenkov
9080b79f2b
rustdoc: Eliminate remaining uses of resolver
2023-02-13 00:10:15 +04:00
Oli Scherer
75ff5c7dd3
Fold Definitions
into the untracked data
2022-12-09 14:59:39 +00:00
Oli Scherer
1c1d3570ee
Move the untracked cstore and source_span into a struct
2022-12-09 14:53:24 +00:00
Oli Scherer
2cd36f2c89
Generate crate loaders on the fly
2022-12-09 14:53:23 +00:00
Oli Scherer
4b08fbaea8
ResolverTree does not require access to the crate loader, only the store
2022-12-09 14:50:09 +00:00
Vadim Petrochenkov
b32a4edb20
rustc_ast_lowering: Stop lowering imports into multiple items
...
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-12-01 18:51:20 +03:00
Vadim Petrochenkov
47cd844468
effective visibility: Stop recalculating current private visibility
...
It becomes relatively expensive if done often and shows up during perf profiling.
2022-11-24 01:30:58 +03:00
Vadim Petrochenkov
7e76d94a22
effective visibility: Always add table entries for nodes used as parents
...
Previously if the parent was not in the table, and there was nothing to inherit from, the child's private visibility was used, but that's not correct - the parent may have a larger visibility so we should set it to at least the parent's private visibility.
That parent's private visibility is also inserted into the table for caching, so it's not recalculated later if used again.
2022-11-24 01:28:41 +03:00
Vadim Petrochenkov
a45a302be5
effective visibility: Fix private visibility calculation for modules
...
Optimizations removed in the previous commit required this function to behave incorrectly, but now those optimizations are gone so we can fix the bug.
Fixes https://github.com/rust-lang/rust/issues/104249
2022-11-24 00:03:51 +03:00
Vadim Petrochenkov
f0843b89d1
effective visibility: Remove questionable optimizations
...
First, they require eagerly calculating private visibility (current normal module), which is somewhat expensive.
Private visibilities are also lost once calculated, instead of being cached in the table.
Second, I cannot prove that the optimizations are correct.
Maybe they can be partially reinstated in the future in cases when it's cheap and provably correct to do them.
They will also probably be merged into `fn update` in that case.
Partially fixes https://github.com/rust-lang/rust/issues/104249
Fixes https://github.com/rust-lang/rust/issues/104539
2022-11-24 00:03:51 +03:00
Vadim Petrochenkov
3f20f4ac42
effective visibility: Satisfy borrow checker to use resolver lazily from a closure
2022-11-24 00:03:51 +03:00
cui fliter
442f848d74
fix some typos in comments
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-11-13 15:26:17 +08:00
Vadim Petrochenkov
43bea6cf69
resolve: Fill effective visibilities for import def ids in a separate pass
...
This should result in less update calls than doing it repeatedly during the fix point iteration.
2022-11-05 17:55:20 +04:00
Vadim Petrochenkov
24093fc6bd
resolve: More detailed effective visibility tracking for imports
...
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-05 15:46:22 +04:00
Vadim Petrochenkov
84317518ff
resolve: Turn the binding from #[macro_export]
into a proper Import
2022-10-31 21:25:00 +04:00
Vadim Petrochenkov
637bfe68a1
resolve: Not all imports have their own NodeId
2022-10-31 20:25:27 +04:00
Vadim Petrochenkov
34eb73c72d
privacy: Rename "accessibility levels" to "effective visibilities"
...
And a couple of other naming tweaks
Related to https://github.com/rust-lang/rust/issues/48054
2022-10-26 16:34:53 +04:00