Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e539dd6

Browse files
committedAug 8, 2020
Eliminate the SessionGlobals from librustc_ast.
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
1 parent d6fa011 commit e539dd6

File tree

120 files changed

+816
-805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+816
-805
lines changed
 

‎Cargo.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,6 @@ dependencies = [
31953195
"rustc_macros",
31963196
"rustc_serialize",
31973197
"rustc_span",
3198-
"scoped-tls",
31993198
"smallvec 1.4.0",
32003199
"tracing",
32013200
]
@@ -3467,6 +3466,7 @@ dependencies = [
34673466
"rustc_index",
34683467
"rustc_macros",
34693468
"rustc_serialize",
3469+
"rustc_session",
34703470
"rustc_span",
34713471
"rustc_target",
34723472
"smallvec 1.4.0",

‎src/librustc_ast/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ doctest = false
1212
[dependencies]
1313
rustc_serialize = { path = "../librustc_serialize" }
1414
log = { package = "tracing", version = "0.1" }
15-
scoped-tls = "1.0"
1615
rustc_span = { path = "../librustc_span" }
1716
rustc_data_structures = { path = "../librustc_data_structures" }
1817
rustc_index = { path = "../librustc_index" }

0 commit comments

Comments
 (0)
Please sign in to comment.