Commit Graph

432 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
81434cbf84
Rollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebank
Cleanup: rename node_id_to_type(_opt)

Renames `node_id_to_type(_opt)` to `hir_id_to_type(_opt)`; this makes it clear we are dealing with HIR nodes and their IDs here.

In addition, a drive-by commit removing `ty::item_path::hir_path_str` (as requested by @eddyb).
2019-02-13 04:37:00 +01:00
bors
b244f61b77 Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik
Cosmetic improvements to doc comments

This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).

r? @steveklabnik

Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12 19:09:24 +00:00
Alexander Regueiro
c3e182cf43 rustc: doc comments 2019-02-10 23:42:32 +00:00
Taiki Endo
2be0993c4e Revert removed #![feature(nll)] 2019-02-10 16:13:30 +09:00
ljedrz
3a1a704903 cleanup: rename node_id_to_type(_opt) 2019-02-09 16:37:15 +01:00
Guillaume Gomez
8b886e07f5 Remove images' url to make it work even without internet connection 2019-02-07 11:06:19 +01:00
kennytm
49509a506c
Rollup merge of #58109 - Centril:librustc_privacy-2018, r=oli-obk
librustc_privacy => 2018

Transitions `librustc_privacy` to Rust 2018; cc #58099

r? @oli-obk
2019-02-06 00:28:56 +09:00
Mazdak Farrokhzad
582bbcc161 librustc_privacy => 2018 2019-02-03 15:56:35 +01:00
David Wood
7102339477
Update visibility of intermediate use items.
Currently, the target of a use statement will be updated with
the visibility of the use statement itself (if the use statement was
visible).

This commit ensures that if the path to the target item is via another
use statement then that intermediate use statement will also have the
visibility updated like the target. This silences incorrect
`unreachable_pub` lints with inactionable suggestions.
2019-02-02 15:29:13 +01:00
bors
742fcc7167 Auto merge of #57586 - Aaron1011:feature/pub-priv-dep, r=petrochenkov
Implement public/private dependency feature

Implements https://github.com/rust-lang/rust/issues/44663

The core implementation is done - however, there are a few issues that still need to be resolved:

- [x] The `EXTERNAL_PRIVATE_DEPENDENCY` lint currently does notthing when the `public_private_dependencies` is not enabled. Should mentioning the lint (in an `allow` or `deny` attribute) be an error if the feature is not enabled? (Resolved- the feature was removed)
- [x] Crates with the name `core` and `std` are always marked public, without the need to explcitily specify them on the command line. Is this what we want to do? Do we want to allow`no_std`/`no_core` crates to explicitly control this in some way? (Resolved - private crates are now explicitly specified)
- [x] Should I add additional UI tests? (Resolved - added more tests)
- [x] Does it make sense to be able to allow/deny the `EXTERNAL_PRIVATE_DEPENDENCY` on an individual item? (Resolved - this is implemented)
2019-02-01 15:24:26 +00:00
Aaron Hill
369faaeaff
Cleanup unecessary code 2019-02-01 09:43:57 -05:00
Aaron Hill
24f3595c02
Remove unnecessary is_local() check 2019-02-01 09:43:57 -05:00
Aaron Hill
48ec29d38e
Replace --extern-public with --extern-private 2019-02-01 09:43:57 -05:00
Aaron Hill
45486cce2c
Tidy fixes 2019-02-01 09:43:57 -05:00
Aaron Hill
fe15f7177f
Move --extern-public behind -Z unstable-options 2019-02-01 09:43:57 -05:00
Aaron Hill
3fa36471e8
Rename external_private_dependency to exported_private_dependencies 2019-02-01 09:43:56 -05:00
Aaron Hill
dfd2669667
Delete dead code 2019-02-01 09:43:56 -05:00
Aaron Hill
d60214cdf7
Clippy fixes, rename stuff to match RFC 2019-02-01 09:43:56 -05:00
Aaron Hill
afb1921c79
Fixup code 2019-02-01 09:43:55 -05:00
Aaron Hill
09ff0bacef
Fix emitting lint 2019-02-01 09:43:55 -05:00
Aaron Hill
8b6f3ddf23
Initial implementation work 2019-02-01 09:43:55 -05:00
John Kåre Alsaker
0c2bf6fe2a Add an ensure() method to TyCtxt used to ensure queries are run 2019-01-29 21:10:33 +01:00
Mazdak Farrokhzad
4eeb095437
Rollup merge of #57649 - petrochenkov:privexist, r=arielb1
privacy: Account for associated existential types

Turns out they *can* be associated (but only in impls, not traits).
Fixes https://github.com/rust-lang/rust/issues/53546#issuecomment-454372879

r? @arielb1
2019-01-19 14:21:21 +01:00
Vadim Petrochenkov
d34b3e9bf2 privacy: Account for associated existential types 2019-01-18 01:06:08 +03:00
John Kåre Alsaker
e301f90f22 Address comments 2019-01-15 00:55:22 +01:00
John Kåre Alsaker
e459000bc1 Make privacy checking, intrinsic checking and liveness checking incremental 2019-01-15 00:55:21 +01:00
Vadim Petrochenkov
f8028b0b6c privacy: Fix private-in-public check for existential types 2019-01-13 00:41:11 +03:00
Vadim Petrochenkov
fb00313c0d Address review comments 2019-01-06 03:31:43 +03:00
Vadim Petrochenkov
9503c56ff7 privacy: Mark everything in a header of a reachable impl as reachable 2019-01-05 23:46:19 +03:00
Vadim Petrochenkov
67713f5b7f privacy: Fix regression in impl reachability 2019-01-05 23:46:19 +03:00
Vadim Petrochenkov
60d1fa70bb Address review comments
Say "trait" instead of "type" in diagnostics for `dyn Trait`
2019-01-01 01:39:55 +03:00
Vadim Petrochenkov
8b1c424b6d privacy: Use common DefId visiting infra for all privacy visitors 2019-01-01 01:39:55 +03:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Alexander Regueiro
ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
John Kåre Alsaker
a70babed03 Use a function to access the Hir map to be able to turn it into a query later 2018-12-06 17:24:36 +01:00
Dan Robertson
a0fec9488e
Fix panic with outlives in existential type
Don't panic in determining the privacy of a type if a lifetime outlives
generic exists in an existential type.
2018-11-30 02:04:10 +00:00
Eduard-Mihai Burtescu
da622a3796 rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns. 2018-11-21 07:27:02 +02:00
Vadim Petrochenkov
a38f903114 Fix ICEs from imports of items not defined in modules 2018-11-18 13:57:03 +03:00
Oliver Scherer
ee81739dc1 Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
Oliver Scherer
78aaa3e546 Check the invariant for principal inside the method 2018-10-13 11:32:49 +02:00
bors
6310be458f Auto merge of #54601 - cuviper:prep-1.31, r=Mark-Simulacrum
Bump to 1.31.0 and bootstrap from 1.30 beta

Closes #54594.
2018-09-30 01:45:50 +00:00
Eduard-Mihai Burtescu
7020326bea rustc: keep a Span for each predicate in ty::GenericPredicates. 2018-09-28 17:19:35 +03:00
Josh Stone
ce034951fb Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
toidiu
731f4efae5 stabalize infer outlives requirements (RFC 2093).
Co-authored-by: nikomatsakis
2018-09-11 11:40:04 -04:00
bors
b24330fb7d Auto merge of #53705 - ms2300:tmp, r=oli-obk
#53576 Renaming TyAnon -> TyOpaque

Fixes #53576
2018-09-08 14:16:37 +00:00
bors
20ca02569a Auto merge of #53721 - arielb1:exhaustively-unpun, r=nikomatsakis
fix `is_non_exhaustive` confusion between structs and enums

Structs and enums can both be non-exhaustive, with a very different
meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1
for structs, and another for enums, and fixes the places that got the
usage confused.

Fixes #53549.

r? @eddyb
2018-09-06 06:42:19 +00:00
ms2300
6c14360c32 Changing TyAnon -> TyOpaque and relevant functions 2018-09-05 13:01:16 -06:00
Ariel Ben-Yehuda
ae2ad30bf1 move the is_field_list_non_exhaustive flag to VariantDef
This completely splits the IS_NON_EXHAUSTIVE flag. No functional
changes intended.
2018-09-01 19:10:26 +03:00
varkor
e2a1cce9c5 Rename hir::map::NodeKind to hir::Node 2018-08-27 21:46:23 +01:00
varkor
11665ca45a Remove path prefixes from NodeKind 2018-08-27 21:46:13 +01:00