bors
126ad2b813
Auto merge of #68708 - Mark-Simulacrum:stage0-step, r=pietroalbini
...
Step stage0 to bootstrap from 1.42
This also includes a commit which fixes the rustfmt downloading logic to redownload when the rustfmt channel changes, and bumps rustfmt to a more recent version.
2020-02-04 14:16:18 +00:00
Mazdak Farrokhzad
eadff06823
syntax: reexport attr globals
2020-02-01 18:59:49 +01:00
Mazdak Farrokhzad
e233331a51
syntax::print -> new crate rustc_ast_pretty
2020-02-01 18:59:49 +01:00
Mazdak Farrokhzad
097d5e1c5e
1. move node_id to syntax
...
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
2020-02-01 18:58:08 +01:00
Mazdak Farrokhzad
e03d1064f0
syntax: move GLOBALS to attr module
2020-02-01 18:54:55 +01:00
Mazdak Farrokhzad
50f0e2e9e6
{syntax -> rustc_ast_passes}::node_count
2020-02-01 18:54:55 +01:00
Mark Rousskov
31dcdc9e13
Drop cfg(bootstrap) code
2020-01-31 12:31:09 -05:00
Mazdak Farrokhzad
3ccb0f9b8f
slice_patterns: remove internal uses of gate
2020-01-18 19:33:47 +01:00
Mazdak Farrokhzad
50d76d6471
Rollup merge of #68114 - ecstatic-morse:fix-feature-gating, r=Centril
...
Don't require `allow_internal_unstable` unless `staged_api` is enabled.
#63770 changed `qualify_min_const_fn` to require `allow_internal_unstable` for *all* crates that used an unstable feature, regardless of whether `staged_api` was enabled or the `fn` that used that feature was stably const. In practice, this meant that every crate in the ecosystem that wanted to use nightly features added `#![feature(const_fn)]`, which skips `qualify_min_const_fn` entirely.
After this PR, crates that do not have `#![feature(staged_api)]` will only need to enable the feature they are interested in. For example, `#![feature(const_if_match)]` will be enough to enable `if` and `match` in constants. Crates with `staged_api` (e.g., `libstd`) require `#[allow_internal_unstable]` to be added to a function if it uses nightly features unless that function is also marked `#[rustc_const_unstable]`. This prevents proliferation of `#[allow_internal_unstable]` into functions that are not callable in a `const` context on stable.
r? @oli-obk (author of #63770 )
cc @Centril
2020-01-11 12:36:14 +01:00
Dylan MacKenzie
09b5c854de
Remove unnecessary const_fn feature gates
...
This flag opts out of the min-const-fn checks entirely, which is usually
not what we want. The few cases where the flag is still necessary have
been annotated.
2020-01-10 18:51:12 -08:00
Mazdak Farrokhzad
ae213db0f5
{syntax -> rustc_ast_passes}::show_span
2020-01-11 03:30:20 +01:00
Mazdak Farrokhzad
6cbcb83022
{syntax -> rustc_ast_passes}::feature_gate
2020-01-11 03:30:20 +01:00
Mazdak Farrokhzad
f361b71a7d
nix syntax::early_buffered_lints
2020-01-11 03:26:16 +01:00
Mazdak Farrokhzad
1af8c10bd4
simplify feature_err imports
2020-01-11 03:19:50 +01:00
Mazdak Farrokhzad
7c78090690
get_features -> rustc_parse::config
2020-01-11 03:17:36 +01:00
Mazdak Farrokhzad
6007641d21
gating diagnostics -> rustc_session::parse
2020-01-11 03:15:32 +01:00
Mazdak Farrokhzad
8bd3d240e3
nix syntax::errors & prefer rustc_errors over errors
2020-01-10 07:41:30 +01:00
Mazdak Farrokhzad
2c3e5d3de0
- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
...
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
2020-01-08 04:25:33 +01:00
Mazdak Farrokhzad
ef08662613
hir::{hir,def,itemlikevisit,pat_util,print} -> rustc_hir
...
Also fix fallout wrt. HashStable.
2020-01-04 19:03:27 +01:00
Mazdak Farrokhzad
b1aad76586
Normalize syntax::edition imports.
2020-01-02 19:31:38 +01:00
Mazdak Farrokhzad
4ff12ce4c1
Normalize syntax::symbol imports.
2020-01-02 13:57:04 +01:00
Mazdak Farrokhzad
75e4783f63
Normalize syntax::source_map imports.
2020-01-02 13:57:04 +01:00
Vadim Petrochenkov
70f1d57048
Rename syntax_pos to rustc_span in source code
2020-01-01 09:15:18 +03:00
Simon Sapin
1c572a2d6e
Stabilize the matches! macro
...
Fixes https://github.com/rust-lang/rust/issues/65721
FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119
2019-12-27 14:07:16 +01:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
Mazdak Farrokhzad
a0d20935cc
introduce 'type AttrVec'
2019-12-20 22:53:40 +01:00
varkor
e3a8ea4e18
Use to_option in various places
2019-12-06 12:23:23 +00:00
Mark Rousskov
52d4d478a1
Move ParseSess to librustc_session
2019-12-03 12:19:16 -05:00
Vadim Petrochenkov
a81804b4d5
syntax: Introduce a struct MacArgs for macro arguments
2019-12-02 21:56:34 +03:00
Mazdak Farrokhzad
79077f13ff
move GateIssue to rustc_feature & simplify emit_feature_err
2019-11-30 07:40:28 +01:00
Mazdak Farrokhzad
b45f21d38e
move UnstableFeatures -> rustc_feature
2019-11-30 02:50:47 +01:00
Mazdak Farrokhzad
db89679ebc
inline two explanation constants
2019-11-30 02:40:45 +01:00
Mazdak Farrokhzad
70234f16df
builtin_attrs.rs -> rustc_feature
2019-11-30 02:34:18 +01:00
Mazdak Farrokhzad
d04b838a44
move is_builtin_attr to syntax::attr
2019-11-30 02:20:07 +01:00
Mazdak Farrokhzad
6cab02cf14
simplify gated cfgs logic
2019-11-30 01:57:53 +01:00
Mazdak Farrokhzad
8ad4d15f38
move AttributeTemplate to builtin_attrs
2019-11-30 00:56:46 +01:00
Mazdak Farrokhzad
048201fa7a
move Stability to rustc_feature
2019-11-30 00:39:51 +01:00
Mazdak Farrokhzad
3d080a4a77
introduce crate rustc_feature and move active, accepted, and removed to it
2019-11-30 00:25:40 +01:00
Camille GILLOT
782cc9f65c
Derive HashStable for TokenKind.
2019-11-23 18:52:23 +01:00
Camille GILLOT
ce301075c0
Rename StableHashingContextLike to HashStableContext.
2019-11-23 17:57:00 +01:00
Camille GILLOT
31298b41d6
Invert implementations for TokenKind.
...
Also export a bunch of Token-related impls.
2019-11-22 20:01:45 +01:00
Camille GILLOT
0073d3be97
Export HashStable for DelimSpan, Lit and Path.
2019-11-22 20:01:43 +01:00
Camille GILLOT
1de5fdb5ba
Add StableHashingContextLike to HashStable_Generic derive.
2019-11-22 19:56:20 +01:00
Mark Rousskov
c31a8754e3
Move JSON emitter to rustc_errors
2019-11-15 08:45:49 -05:00
Mark Rousskov
942f0a6f7a
Move SourceMap to syntax_pos
...
This does not update the use sites or delete the now unnecessary
SourceMapper trait, to allow git to interpret the file move as a rename
rather than a new file.
2019-11-15 08:38:31 -05:00
Guillaume Gomez
798e389e57
Update to use new librustc_error_codes library
2019-11-14 13:05:42 +01:00
Mazdak Farrokhzad
4ae2728fa8
move syntax::parse -> librustc_parse
...
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10 03:57:18 +01:00
Mazdak Farrokhzad
be023ebe85
move config.rs to libsyntax_expand
2019-11-10 02:46:17 +01:00
Mazdak Farrokhzad
cc9c139694
move syntax::{parse::literal -> util::literal}
2019-11-07 13:59:13 +01:00
Mazdak Farrokhzad
27f97aa468
move syntax::parse::lexer::comments -> syntax::util::comments
2019-11-07 13:59:13 +01:00