about summary refs log tree commit diff
path: root/compiler/rustc_privacy/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2021-10-02Auto merge of #89405 - GuillaumeGomez:fix-clippy-lints, r=cjgillotbors-16/+16
Fix clippy lints I'm currently working on allowing clippy to run on librustdoc after a discussion I had with `@Mark-Simulacrum.` So in the meantime, I fixed a few lints on the compiler crates.
2021-10-01Fix clippy lintsGuillaume Gomez-16/+16
2021-09-29Avoid more invocations of hir_crate query.Camille GILLOT-3/+1
2021-09-20Do not store visibility in *ItemRef.Camille GILLOT-3/+8
2021-09-09add a `CastKind` to `Node::Cast`Ellen-1/+1
2021-09-09rename mir -> thir around abstract constsEllen-1/+1
2021-09-09tidyEllen-3/+3
2021-09-09dont support blocksEllen-2/+1
2021-09-09as casts and block exprsEllen-1/+1
2021-09-09WIP stateEllen-3/+4
2021-09-02Rename walk_crate.Camille GILLOT-3/+3
2021-09-02Stop using walk_crate.Camille GILLOT-3/+3
2021-08-30rename const_evaluatable_checked to generic_const_exprsEllen-2/+2
:sparkles:
2021-08-28Treat macros as HIR itemsinquisitivecrystal-47/+67
2021-08-26use `ty::Unevaluated` instead of def substs pairlcnr-2/+2
2021-08-26make unevaluated const substs optionallcnr-2/+2
2021-08-26require a `tcx` for `TypeVisitor`lcnr-0/+4
2021-08-24Auto merge of #87739 - Aaron1011:remove-used-attrs, r=wesleywiserbors-3/+1
Remove `Session.used_attrs` and move logic to `CheckAttrVisitor` Instead of updating global state to mark attributes as used, we now explicitly emit a warning when an attribute is used in an unsupported position. As a side effect, we are to emit more detailed warning messages (instead of just a generic "unused" message). `Session.check_name` is removed, since its only purpose was to mark the attribute as used. All of the callers are modified to use `Attribute.has_name` Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed used' attribute is implemented by simply not performing any checks in `CheckAttrVisitor` for a particular attribute. We no longer emit unused attribute warnings for the `#[rustc_dummy]` attribute - it's an internal attribute used for tests, so it doesn't mark sense to treat it as 'unused'. With this commit, a large source of global untracked state is removed.
2021-08-22Fix typos “a”→“an”Frank Steffahn-1/+1
2021-08-21Remove `Session.used_attrs` and move logic to `CheckAttrVisitor`Aaron Hill-3/+1
Instead of updating global state to mark attributes as used, we now explicitly emit a warning when an attribute is used in an unsupported position. As a side effect, we are to emit more detailed warning messages (instead of just a generic "unused" message). `Session.check_name` is removed, since its only purpose was to mark the attribute as used. All of the callers are modified to use `Attribute.has_name` Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed used' attribute is implemented by simply not performing any checks in `CheckAttrVisitor` for a particular attribute. We no longer emit unused attribute warnings for the `#[rustc_dummy]` attribute - it's an internal attribute used for tests, so it doesn't mark sense to treat it as 'unused'. With this commit, a large source of global untracked state is removed.
2021-08-19rustc_privacy: Replace `HirId`s and `DefId`s with `LocalDefId`s where possibleVadim Petrochenkov-63/+76
2021-08-13move Constness into TraitPredicateDeadbeef-1/+1
2021-07-31rustc: Replace `HirId`s with `LocalDefId`s in `AccessLevels` tablesVadim Petrochenkov-81/+80
and passes using them - primarily privacy checking, stability checking and dead code checking. WIP
2021-07-26Actually infer args in visitorskadmin-0/+7
2021-07-25Add inferred args to typeckkadmin-10/+18
2021-07-25Add generic arg inferkadmin-0/+25
2021-07-06Make resolutions a query.Camille GILLOT-1/+1
2021-06-09Add more tests + visit_ty in some placesEllen-4/+4
2021-06-08Support as casts in abstract constsEllen-3/+4
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-1/+1
2021-05-30Make resolutions a query.Camille GILLOT-1/+1
2021-05-24remove cfg(bootstrap)Pietro Albini-1/+0
2021-05-12Use () for privacy.Camille GILLOT-8/+4
2021-04-19fix few typosklensy-1/+1
2021-03-23Update with commentskadmin-4/+2
A bunch of nits fixed, and a new test for pretty printing the AST.
2021-03-23Some refactoringvarkor-0/+1
2021-03-23Add has_default to GenericParamDefKind::Constkadmin-2/+7
This currently creates a field which is always false on GenericParamDefKind for future use when consts are permitted to have defaults Update const_generics:default locations Previously just ignored them, now actually do something about them. Fix using type check instead of value Add parsing This adds all the necessary changes to lower const-generics defaults from parsing. Change P<Expr> to AnonConst This matches the arguments passed to instantiations of const generics, and makes it specific to just anonymous constants. Attempt to fix lowering bugs
2021-03-19stabilize or_patternsmark-1/+1
2021-03-16ast/hir: Rename field-related structuresVadim Petrochenkov-2/+2
StructField -> FieldDef ("field definition") Field -> ExprField ("expression field", not "field expression") FieldPat -> PatField ("pattern field", not "field pattern") Also rename visiting and other methods working on them.
2021-03-09Remove hir::MacroDef::attrs.Camille GILLOT-1/+2
2021-02-18Rollup merge of #82066 - matthewjasper:trait-ref-fix, r=jackh726Dylan DPC-4/+23
Ensure valid TraitRefs are created for GATs This fixes `ProjectionTy::trait_ref` to use the correct substs. Places that need all of the substs have been updated to not use `trait_ref`. r? ````@jackh726````
2021-02-18Auto merge of #81574 - tmiasko:p, r=oli-obkbors-33/+21
Precompute ancestors when checking privacy Precompute ancestors of the old error node set so that check for private types and traits in public interfaces can in constant time determine if the current item has any descendants in the old error set. This removes disparity in compilation time between public and private type aliases reported in #50614 (from 30 s to 5 s, in an example making extensive use of private type aliases). No functional changes intended.
2021-02-15Only store a LocalDefId in hir::MacroDef.Camille GILLOT-5/+3
2021-02-15Only store a LocalDefId in hir::ForeignItem.Camille GILLOT-6/+6
2021-02-15Only store a LocalDefId in hir::ImplItem.Camille GILLOT-13/+11
2021-02-15Only store a LocalDefId in hir::TraitItem.Camille GILLOT-4/+4
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-32/+32
Items are guaranteed to be HIR owner.
2021-02-15Use ItemId as a strongly typed index.Camille GILLOT-2/+2
2021-02-13Remove some unnecessary `trait_ref` callsMatthew Jasper-4/+23
2021-02-01more things are const evaluatable *sparkles*Ellen-1/+1