mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Make it build again
This commit is contained in:
parent
e94d3b70cb
commit
6054a30370
86
Cargo.lock
86
Cargo.lock
@ -3119,6 +3119,7 @@ dependencies = [
|
||||
"rustc-rayon",
|
||||
"rustc-rayon-core",
|
||||
"rustc_apfloat",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
@ -3132,7 +3133,6 @@ dependencies = [
|
||||
"scoped-tls",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3469,12 +3469,28 @@ dependencies = [
|
||||
"smallvec 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_ast"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc_data_structures",
|
||||
"rustc_index",
|
||||
"rustc_lexer",
|
||||
"rustc_macros",
|
||||
"rustc_span",
|
||||
"scoped-tls",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_ast_lowering"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
@ -3484,7 +3500,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3492,6 +3507,7 @@ name = "rustc_ast_passes"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
@ -3500,7 +3516,6 @@ dependencies = [
|
||||
"rustc_parse",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3508,15 +3523,16 @@ name = "rustc_ast_pretty"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc_ast",
|
||||
"rustc_data_structures",
|
||||
"rustc_span",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_attr"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
@ -3526,7 +3542,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3535,6 +3550,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"fmt_macros",
|
||||
"log",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
@ -3546,7 +3562,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3560,6 +3575,7 @@ dependencies = [
|
||||
"measureme",
|
||||
"rustc",
|
||||
"rustc-demangle",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_codegen_ssa",
|
||||
"rustc_codegen_utils",
|
||||
@ -3576,7 +3592,6 @@ dependencies = [
|
||||
"rustc_target",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3592,6 +3607,7 @@ dependencies = [
|
||||
"num_cpus",
|
||||
"rustc",
|
||||
"rustc_apfloat",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_codegen_utils",
|
||||
"rustc_data_structures",
|
||||
@ -3604,7 +3620,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"serialize",
|
||||
"syntax",
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
@ -3616,12 +3631,12 @@ dependencies = [
|
||||
"punycode",
|
||||
"rustc",
|
||||
"rustc-demangle",
|
||||
"rustc_ast",
|
||||
"rustc_data_structures",
|
||||
"rustc_hir",
|
||||
"rustc_metadata",
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3657,6 +3672,7 @@ dependencies = [
|
||||
"lazy_static 1.4.0",
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_codegen_ssa",
|
||||
"rustc_codegen_utils",
|
||||
@ -3675,7 +3691,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"serialize",
|
||||
"syntax",
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
@ -3704,6 +3719,7 @@ name = "rustc_expand"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc_ast",
|
||||
"rustc_ast_passes",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
@ -3716,7 +3732,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3737,6 +3752,7 @@ name = "rustc_hir"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
@ -3746,7 +3762,6 @@ dependencies = [
|
||||
"rustc_target",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3757,13 +3772,13 @@ dependencies = [
|
||||
"log",
|
||||
"rand 0.7.3",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_data_structures",
|
||||
"rustc_fs_util",
|
||||
"rustc_hir",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"serialize",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3782,6 +3797,7 @@ dependencies = [
|
||||
"graphviz",
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
"rustc_error_codes",
|
||||
@ -3793,7 +3809,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3804,6 +3819,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"rustc",
|
||||
"rustc-rayon",
|
||||
"rustc_ast",
|
||||
"rustc_ast_lowering",
|
||||
"rustc_ast_passes",
|
||||
"rustc_attr",
|
||||
@ -3834,7 +3850,6 @@ dependencies = [
|
||||
"rustc_typeck",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
"tempfile",
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
@ -3852,6 +3867,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
@ -3863,7 +3879,6 @@ dependencies = [
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"syntax",
|
||||
"unicode-security",
|
||||
]
|
||||
|
||||
@ -3894,6 +3909,7 @@ dependencies = [
|
||||
"log",
|
||||
"memmap",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
@ -3907,7 +3923,6 @@ dependencies = [
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"stable_deref_trait",
|
||||
"syntax",
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
@ -3923,6 +3938,7 @@ dependencies = [
|
||||
"polonius-engine",
|
||||
"rustc",
|
||||
"rustc_apfloat",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
@ -3936,7 +3952,6 @@ dependencies = [
|
||||
"rustc_target",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3947,6 +3962,7 @@ dependencies = [
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_apfloat",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
@ -3959,7 +3975,6 @@ dependencies = [
|
||||
"rustc_target",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3968,6 +3983,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"log",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
@ -3977,7 +3993,6 @@ dependencies = [
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
"unicode-normalization",
|
||||
]
|
||||
|
||||
@ -3987,6 +4002,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
@ -3997,7 +4013,6 @@ dependencies = [
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4005,12 +4020,12 @@ name = "rustc_plugin_impl"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_errors",
|
||||
"rustc_hir",
|
||||
"rustc_lint",
|
||||
"rustc_metadata",
|
||||
"rustc_span",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4019,13 +4034,13 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
"rustc_hir",
|
||||
"rustc_span",
|
||||
"rustc_typeck",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4036,6 +4051,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_ast_lowering",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr",
|
||||
@ -4049,7 +4065,6 @@ dependencies = [
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4060,6 +4075,7 @@ dependencies = [
|
||||
"rls-data",
|
||||
"rls-span",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_codegen_utils",
|
||||
"rustc_data_structures",
|
||||
@ -4067,7 +4083,6 @@ dependencies = [
|
||||
"rustc_parse",
|
||||
"rustc_span",
|
||||
"serde_json",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4076,6 +4091,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"num_cpus",
|
||||
"rustc_ast",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
"rustc_feature",
|
||||
@ -4084,7 +4100,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"serialize",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4132,6 +4147,7 @@ dependencies = [
|
||||
"chalk-engine",
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_data_structures",
|
||||
"rustc_hir",
|
||||
"rustc_infer",
|
||||
@ -4139,7 +4155,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4162,6 +4177,7 @@ dependencies = [
|
||||
"arena",
|
||||
"log",
|
||||
"rustc",
|
||||
"rustc_ast",
|
||||
"rustc_attr",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
@ -4171,7 +4187,6 @@ dependencies = [
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4683,21 +4698,6 @@ dependencies = [
|
||||
"unicode-xid 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syntax"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc_data_structures",
|
||||
"rustc_index",
|
||||
"rustc_lexer",
|
||||
"rustc_macros",
|
||||
"rustc_span",
|
||||
"scoped-tls",
|
||||
"serialize",
|
||||
"smallvec 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tar"
|
||||
version = "0.4.26"
|
||||
|
@ -996,7 +996,7 @@ impl Step for Src {
|
||||
"src/tools/rustc-std-workspace-alloc",
|
||||
"src/tools/rustc-std-workspace-std",
|
||||
"src/librustc",
|
||||
"src/libsyntax",
|
||||
"src/librustc_ast",
|
||||
];
|
||||
|
||||
copy_src_dirs(builder, &std_src_dirs[..], &[], &dst_src);
|
||||
|
@ -62,7 +62,7 @@ for details on how to format and write long error codes.
|
||||
* All of them are accessible [online](http://doc.rust-lang.org/error-index.html),
|
||||
which are auto-generated from rustc source code in different places:
|
||||
[librustc](https://github.com/rust-lang/rust/blob/master/src/librustc/error_codes.rs),
|
||||
[libsyntax](https://github.com/rust-lang/rust/blob/master/src/libsyntax/error_codes.rs),
|
||||
[librustc_ast](https://github.com/rust-lang/rust/blob/master/src/librustc_ast/error_codes.rs),
|
||||
[librustc_borrowck](https://github.com/rust-lang/rust/blob/master/src/librustc_borrowck/error_codes.rs),
|
||||
[librustc_metadata](https://github.com/rust-lang/rust/blob/master/src/librustc_metadata/error_codes.rs),
|
||||
[librustc_mir](https://github.com/rust-lang/rust/blob/master/src/librustc_mir/error_codes.rs),
|
||||
|
@ -23,7 +23,7 @@ mechanics of defining and loading a plugin.
|
||||
|
||||
In the vast majority of cases, a plugin should *only* be used through
|
||||
`#![plugin]` and not through an `extern crate` item. Linking a plugin would
|
||||
pull in all of libsyntax and librustc as dependencies of your crate. This is
|
||||
pull in all of librustc_ast and librustc as dependencies of your crate. This is
|
||||
generally unwanted unless you are building another plugin.
|
||||
|
||||
The usual practice is to put compiler plugins in their own crate, separate from
|
||||
|
@ -28,7 +28,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_index = { path = "../librustc_index" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
backtrace = "0.3.40"
|
||||
parking_lot = "0.9"
|
||||
|
@ -1,5 +1,5 @@
|
||||
//! This module contains `HashStable` implementations for various data types
|
||||
//! from libsyntax in no particular order.
|
||||
//! from librustc_ast in no particular order.
|
||||
|
||||
use crate::ich::StableHashingContext;
|
||||
|
||||
|
@ -1720,7 +1720,7 @@ pub mod tls {
|
||||
set_tlv(context as *const _ as usize, || f(&context))
|
||||
}
|
||||
|
||||
/// Enters `GlobalCtxt` by setting up libsyntax callbacks and
|
||||
/// Enters `GlobalCtxt` by setting up librustc_ast callbacks and
|
||||
/// creating a initial `TyCtxt` and `ImplicitCtxt`.
|
||||
/// This happens once per rustc session and `TyCtxt`s only exists
|
||||
/// inside the `f` function.
|
||||
|
@ -118,7 +118,7 @@ impl BoundRegion {
|
||||
}
|
||||
|
||||
/// N.B., if you change this, you'll probably want to change the corresponding
|
||||
/// AST structure in `libsyntax/ast.rs` as well.
|
||||
/// AST structure in `librustc_ast/ast.rs` as well.
|
||||
#[derive(
|
||||
Clone,
|
||||
PartialEq,
|
||||
|
@ -1,11 +1,11 @@
|
||||
[package]
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "syntax"
|
||||
name = "rustc_ast"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
name = "syntax"
|
||||
name = "rustc_ast"
|
||||
path = "lib.rs"
|
||||
doctest = false
|
||||
|
||||
|
@ -20,5 +20,5 @@ rustc_index = { path = "../librustc_index" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
@ -18,4 +18,4 @@ rustc_feature = { path = "../librustc_feature" }
|
||||
rustc_parse = { path = "../librustc_parse" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
|
@ -13,4 +13,4 @@ doctest = false
|
||||
log = "0.4"
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
|
@ -19,4 +19,4 @@ rustc_feature = { path = "../librustc_feature" }
|
||||
rustc_macros = { path = "../librustc_macros" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
|
@ -21,6 +21,6 @@ rustc_parse = { path = "../librustc_parse" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_expand = { path = "../librustc_expand" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
@ -33,5 +33,5 @@ rustc_session = { path = "../librustc_session" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
@ -20,7 +20,7 @@ jobserver = "0.1.11"
|
||||
tempfile = "3.1"
|
||||
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_apfloat = { path = "../librustc_apfloat" }
|
||||
|
@ -14,7 +14,7 @@ log = "0.4"
|
||||
punycode = "0.4.0"
|
||||
rustc-demangle = "0.1.16"
|
||||
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
|
@ -31,7 +31,7 @@ rustc_codegen_utils = { path = "../librustc_codegen_utils" }
|
||||
rustc_error_codes = { path = "../librustc_error_codes" }
|
||||
rustc_interface = { path = "../librustc_interface" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
|
@ -24,4 +24,4 @@ rustc_lexer = { path = "../librustc_lexer" }
|
||||
rustc_parse = { path = "../librustc_parse" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
|
@ -18,6 +18,6 @@ rustc_index = { path = "../librustc_index" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
lazy_static = "1"
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
@ -17,7 +17,7 @@ rustc = { path = "../librustc" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_fs_util = { path = "../librustc_fs_util" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
|
@ -25,4 +25,4 @@ rustc_session = { path = "../librustc_session" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
|
@ -13,7 +13,7 @@ doctest = false
|
||||
log = "0.4"
|
||||
rayon = { version = "0.3.0", package = "rustc-rayon" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_attr = { path = "../librustc_attr" }
|
||||
rustc_builtin_macros = { path = "../librustc_builtin_macros" }
|
||||
rustc_expand = { path = "../librustc_expand" }
|
||||
|
@ -13,7 +13,7 @@ use rustc::ty::tls;
|
||||
use rustc_errors::{Diagnostic, TRACK_DIAGNOSTICS};
|
||||
use std::fmt;
|
||||
|
||||
/// This is a callback from libsyntax as it cannot access the implicit state
|
||||
/// This is a callback from librustc_ast as it cannot access the implicit state
|
||||
/// in librustc otherwise.
|
||||
fn span_debug(span: rustc_span::Span, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
tls::with_opt(|tcx| {
|
||||
@ -25,7 +25,7 @@ fn span_debug(span: rustc_span::Span, f: &mut fmt::Formatter<'_>) -> fmt::Result
|
||||
})
|
||||
}
|
||||
|
||||
/// This is a callback from libsyntax as it cannot access the implicit state
|
||||
/// This is a callback from librustc_ast as it cannot access the implicit state
|
||||
/// in librustc otherwise. It is used to when diagnostic messages are
|
||||
/// emitted and stores them in the current query, if there is one.
|
||||
fn track_diagnostic(diagnostic: &Diagnostic) {
|
||||
|
@ -189,7 +189,7 @@ pub fn spawn_thread_pool<F: FnOnce() -> R + Send, R: Send>(
|
||||
// The main handler runs for each Rayon worker thread and sets up
|
||||
// the thread local rustc uses. syntax_globals and rustc_span_globals are
|
||||
// captured and set on the new threads. ty::tls::with_thread_locals sets up
|
||||
// thread local callbacks from libsyntax
|
||||
// thread local callbacks from librustc_ast
|
||||
let main_handler = move |thread: ThreadBuilder| {
|
||||
syntax::GLOBALS.set(syntax_globals, || {
|
||||
rustc_span::GLOBALS.set(rustc_span_globals, || {
|
||||
|
@ -17,7 +17,7 @@ rustc_attr = { path = "../librustc_attr" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_feature = { path = "../librustc_feature" }
|
||||
|
@ -251,7 +251,7 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
|
||||
|
||||
fn visit_mac(&mut self, mac: &'a ast::Mac) {
|
||||
// FIXME(#54110): So, this setup isn't really right. I think
|
||||
// that (a) the libsyntax visitor ought to be doing this as
|
||||
// that (a) the librustc_ast visitor ought to be doing this as
|
||||
// part of `walk_mac`, and (b) we should be calling
|
||||
// `visit_path`, *but* that would require a `NodeId`, and I
|
||||
// want to get #53686 fixed quickly. -nmatsakis
|
||||
|
@ -24,7 +24,7 @@ rustc_target = { path = "../librustc_target" }
|
||||
rustc_index = { path = "../librustc_index" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
stable_deref_trait = "1.0.0"
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_expand = { path = "../librustc_expand" }
|
||||
rustc_parse = { path = "../librustc_parse" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
@ -1616,7 +1616,7 @@ impl<'a, 'tcx> CrateMetadata {
|
||||
}
|
||||
|
||||
// Cannot be implemented on 'ProcMacro', as libproc_macro
|
||||
// does not depend on libsyntax
|
||||
// does not depend on librustc_ast
|
||||
fn macro_kind(raw: &ProcMacro) -> MacroKind {
|
||||
match raw {
|
||||
ProcMacro::CustomDerive { .. } => MacroKind::Derive,
|
||||
|
@ -28,7 +28,7 @@ rustc_lexer = { path = "../librustc_lexer" }
|
||||
rustc_macros = { path = "../librustc_macros" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_apfloat = { path = "../librustc_apfloat" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
@ -25,5 +25,5 @@ rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
@ -21,5 +21,5 @@ rustc_errors = { path = "../librustc_errors" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
unicode-normalization = "0.1.11"
|
||||
|
@ -172,7 +172,7 @@ impl<'a> StringReader<'a> {
|
||||
}
|
||||
|
||||
/// Turns simple `rustc_lexer::TokenKind` enum into a rich
|
||||
/// `libsyntax::TokenKind`. This turns strings into interned
|
||||
/// `librustc_ast::TokenKind`. This turns strings into interned
|
||||
/// symbols and runs additional validation.
|
||||
fn cook_lexer_token(&self, token: rustc_lexer::TokenKind, start: BytePos) -> TokenKind {
|
||||
match token {
|
||||
|
@ -269,7 +269,7 @@ pub fn stream_to_parser<'a>(
|
||||
/// # Note
|
||||
///
|
||||
/// The main usage of this function is outside of rustc, for those who uses
|
||||
/// libsyntax as a library. Please do not remove this function while refactoring
|
||||
/// librustc_ast as a library. Please do not remove this function while refactoring
|
||||
/// just because it is not used in rustc codebase!
|
||||
pub fn stream_to_parser_with_base_dir<'a>(
|
||||
sess: &'a ParseSess,
|
||||
|
@ -20,5 +20,5 @@ rustc_index = { path = "../librustc_index" }
|
||||
rustc_infer = { path = "../librustc_infer" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
@ -77,7 +77,7 @@ fn entry_fn(tcx: TyCtxt<'_>, cnum: CrateNum) -> Option<(DefId, EntryFnType)> {
|
||||
configure_main(tcx, &ctxt)
|
||||
}
|
||||
|
||||
// Beware, this is duplicated in `libsyntax/entry.rs`, so make sure to keep
|
||||
// Beware, this is duplicated in `librustc_ast/entry.rs`, so make sure to keep
|
||||
// them in sync.
|
||||
fn entry_point_type(item: &Item<'_>, at_root: bool) -> EntryPointType {
|
||||
match item.kind {
|
||||
|
@ -16,5 +16,5 @@ rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_lint = { path = "../librustc_lint" }
|
||||
rustc_metadata = { path = "../librustc_metadata" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
@ -14,7 +14,7 @@ rustc_attr = { path = "../librustc_attr" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_typeck = { path = "../librustc_typeck" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
log = "0.4"
|
||||
|
@ -13,7 +13,7 @@ doctest = false
|
||||
[dependencies]
|
||||
bitflags = "1.2.1"
|
||||
log = "0.4"
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
arena = { path = "../libarena" }
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_ast_lowering = { path = "../librustc_ast_lowering" }
|
||||
|
@ -17,7 +17,7 @@ rustc_codegen_utils = { path = "../librustc_codegen_utils" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_parse = { path = "../librustc_parse" }
|
||||
serde_json = "1"
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rls-data = "0.19"
|
||||
rls-span = "0.5"
|
||||
|
@ -19,4 +19,4 @@ rustc_span = { path = "../librustc_span" }
|
||||
rustc_index = { path = "../librustc_index" }
|
||||
rustc_fs_util = { path = "../librustc_fs_util" }
|
||||
num_cpus = "1.0"
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
|
@ -89,7 +89,7 @@ pub enum FileName {
|
||||
QuoteExpansion(u64),
|
||||
/// Command line.
|
||||
Anon(u64),
|
||||
/// Hack in `src/libsyntax/parse.rs`.
|
||||
/// Hack in `src/librustc_ast/parse.rs`.
|
||||
// FIXME(jseyfried)
|
||||
MacroExpansion(u64),
|
||||
ProcMacroSourceCode(u64),
|
||||
|
@ -15,7 +15,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_macros = { path = "../librustc_macros" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
chalk-engine = { version = "0.9.0", default-features=false }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
@ -20,7 +20,7 @@ rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_index = { path = "../librustc_index" }
|
||||
rustc_infer = { path = "../librustc_infer" }
|
||||
|
@ -38,7 +38,7 @@ pub fn krate(mut cx: &mut DocContext<'_>) -> Crate {
|
||||
}
|
||||
externs.sort_by(|&(a, _), &(b, _)| a.cmp(&b));
|
||||
|
||||
// Clean the crate, translating the entire libsyntax AST to one that is
|
||||
// Clean the crate, translating the entire librustc_ast AST to one that is
|
||||
// understood by rustdoc.
|
||||
let mut module = module.clean(cx);
|
||||
let mut masked_crates = FxHashSet::default();
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! Basic syntax highlighting functionality.
|
||||
//!
|
||||
//! This module uses libsyntax's lexer to provide token-based highlighting for
|
||||
//! This module uses librustc_ast's lexer to provide token-based highlighting for
|
||||
//! the HTML documentation generated by rustdoc.
|
||||
//!
|
||||
//! Use the `render_with_highlighting` to highlight some rust code.
|
||||
|
@ -17,6 +17,7 @@
|
||||
extern crate env_logger;
|
||||
extern crate getopts;
|
||||
extern crate rustc;
|
||||
extern crate rustc_ast as syntax;
|
||||
extern crate rustc_ast_pretty;
|
||||
extern crate rustc_attr;
|
||||
extern crate rustc_data_structures;
|
||||
@ -38,7 +39,6 @@ extern crate rustc_session;
|
||||
extern crate rustc_span as rustc_span;
|
||||
extern crate rustc_target;
|
||||
extern crate rustc_typeck;
|
||||
extern crate syntax;
|
||||
extern crate test as testing;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
@ -387,7 +387,7 @@ pub fn make_test(
|
||||
prog.push_str(&crate_attrs);
|
||||
prog.push_str(&crates);
|
||||
|
||||
// Uses libsyntax to parse the doctest and find if there's a main fn and the extern
|
||||
// Uses librustc_ast to parse the doctest and find if there's a main fn and the extern
|
||||
// crate already is included.
|
||||
let result = rustc_driver::catch_fatal_errors(|| {
|
||||
with_globals(edition, || {
|
||||
@ -401,7 +401,7 @@ pub fn make_test(
|
||||
let source = crates + everything_else;
|
||||
|
||||
// Any errors in parsing should also appear when the doctest is compiled for real, so just
|
||||
// send all the errors that libsyntax emits directly into a `Sink` instead of stderr.
|
||||
// send all the errors that librustc_ast emits directly into a `Sink` instead of stderr.
|
||||
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
|
||||
let emitter =
|
||||
EmitterWriter::new(box io::sink(), None, false, false, false, None, false);
|
||||
|
@ -273,7 +273,7 @@ fn parse_opts_impl(matches: getopts::Matches) -> OptRes {
|
||||
Ok(test_opts)
|
||||
}
|
||||
|
||||
// FIXME: Copied from libsyntax until linkage errors are resolved. Issue #47566
|
||||
// FIXME: Copied from librustc_ast until linkage errors are resolved. Issue #47566
|
||||
fn is_nightly() -> bool {
|
||||
// Whether this is a feature-staged build, i.e., on the beta or stable channel
|
||||
let disable_unstable_features = option_env!("CFG_DISABLE_UNSTABLE_FEATURES").is_some();
|
||||
|
@ -13,7 +13,7 @@
|
||||
// running tests while providing a base that other test frameworks may
|
||||
// build off of.
|
||||
|
||||
// N.B., this is also specified in this crate's Cargo.toml, but libsyntax contains logic specific to
|
||||
// N.B., this is also specified in this crate's Cargo.toml, but librustc_ast contains logic specific to
|
||||
// this crate, which relies on this attribute (rather than the value of `--crate-name` passed by
|
||||
// cargo) to detect this crate.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// compile-flags:--test
|
||||
|
||||
// comments, both doc comments and regular ones, used to trick rustdoc's doctest parser into
|
||||
// thinking that everything after it was part of the regular program. combined with the libsyntax
|
||||
// thinking that everything after it was part of the regular program. combined with the librustc_ast
|
||||
// parser loop failing to detect the manual main function, it would wrap everything in `fn main`,
|
||||
// which would cause the doctest to fail as the "extern crate" declaration was no longer valid.
|
||||
// oddly enough, it would pass in 2018 if a crate was in the extern prelude. see
|
||||
|
@ -1,5 +1,5 @@
|
||||
// run-pass
|
||||
// Testing that a libsyntax can parse modules with canonicalized base path
|
||||
// Testing that a librustc_ast can parse modules with canonicalized base path
|
||||
// ignore-cross-compile
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
@ -3,7 +3,7 @@
|
||||
// ignore-cross-compile
|
||||
//
|
||||
// empty_plugin will not compile on a cross-compiled target because
|
||||
// libsyntax is not compiled for it.
|
||||
// librustc_ast is not compiled for it.
|
||||
|
||||
extern crate empty_plugin; // OK, plugin crates are still crates
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// check-pass
|
||||
// This test is reduced from libsyntax. It is just checking that we
|
||||
// This test is reduced from librustc_ast. It is just checking that we
|
||||
// can successfully deal with a "deep" structure, which the drop-check
|
||||
// was hitting a recursion limit on at one point.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// This is a regression test for something that only came up while
|
||||
// attempting to bootstrap libsyntax; it is adapted from
|
||||
// attempting to bootstrap librustc_ast; it is adapted from
|
||||
// `syntax::ext::tt::generic_extension`.
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ const EXCEPTION_PATHS: &[&str] = &[
|
||||
"src/tools",
|
||||
"src/librustc",
|
||||
"src/librustdoc",
|
||||
"src/libsyntax",
|
||||
"src/librustc_ast",
|
||||
"src/bootstrap",
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user