Skip to content

Commit a056817

Browse files
committed
Move hir::check_attr::Target to librustc_lang_items.
1 parent 60aaf90 commit a056817

File tree

9 files changed

+40
-3
lines changed

9 files changed

+40
-3
lines changed

Cargo.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,6 +3100,7 @@ dependencies = [
31003100
"rustc_feature",
31013101
"rustc_hir",
31023102
"rustc_index",
3103+
"rustc_lang_items",
31033104
"rustc_macros",
31043105
"rustc_session",
31053106
"rustc_span",
@@ -3698,6 +3699,19 @@ dependencies = [
36983699
"winapi 0.3.8",
36993700
]
37003701

3702+
[[package]]
3703+
name = "rustc_lang_items"
3704+
version = "0.0.0"
3705+
dependencies = [
3706+
"lazy_static 1.4.0",
3707+
"rustc_data_structures",
3708+
"rustc_hir",
3709+
"rustc_macros",
3710+
"rustc_span",
3711+
"serialize",
3712+
"syntax",
3713+
]
3714+
37013715
[[package]]
37023716
name = "rustc_lexer"
37033717
version = "0.1.0"
@@ -3851,6 +3865,7 @@ dependencies = [
38513865
"rustc_feature",
38523866
"rustc_hir",
38533867
"rustc_index",
3868+
"rustc_lang_items",
38543869
"rustc_session",
38553870
"rustc_span",
38563871
"rustc_target",

src/librustc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ rustc_apfloat = { path = "../librustc_apfloat" }
2424
rustc_attr = { path = "../librustc_attr" }
2525
rustc_feature = { path = "../librustc_feature" }
2626
rustc_hir = { path = "../librustc_hir" }
27+
rustc_lang_items = { path = "../librustc_lang_items" }
2728
rustc_target = { path = "../librustc_target" }
2829
rustc_macros = { path = "../librustc_macros" }
2930
rustc_data_structures = { path = "../librustc_data_structures" }

src/librustc/hir/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//!
33
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/hir.html
44
5-
pub mod check_attr;
65
pub mod exports;
76
pub mod map;
87

src/librustc/middle/lang_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
1010
pub use self::LangItem::*;
1111

12-
use crate::hir::check_attr::Target;
1312
use crate::middle::cstore::ExternCrate;
1413
use crate::middle::weak_lang_items;
1514
use crate::ty::{self, TyCtxt};
@@ -19,6 +18,7 @@ use rustc_errors::struct_span_err;
1918
use rustc_hir as hir;
2019
use rustc_hir::def_id::DefId;
2120
use rustc_hir::itemlikevisit::ItemLikeVisitor;
21+
use rustc_lang_items::Target;
2222
use rustc_macros::HashStable;
2323
use rustc_span::symbol::{sym, Symbol};
2424
use rustc_span::Span;

src/librustc_lang_items/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
authors = ["The Rust Project Developers"]
3+
name = "rustc_lang_items"
4+
version = "0.0.0"
5+
edition = "2018"
6+
7+
[lib]
8+
name = "rustc_lang_items"
9+
path = "lib.rs"
10+
11+
[dependencies]
12+
lazy_static = "1"
13+
rustc_data_structures = { path = "../librustc_data_structures" }
14+
rustc_hir = { path = "../librustc_hir" }
15+
rustc_macros = { path = "../librustc_macros" }
16+
rustc_serialize = { path = "../libserialize", package = "serialize" }
17+
rustc_span = { path = "../librustc_span" }
18+
syntax = { path = "../libsyntax" }

src/librustc_lang_items/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mod target;
2+
3+
pub use target::{MethodKind, Target};
File renamed without changes.

src/librustc_passes/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ rustc_errors = { path = "../librustc_errors" }
1717
rustc_feature = { path = "../librustc_feature" }
1818
rustc_hir = { path = "../librustc_hir" }
1919
rustc_index = { path = "../librustc_index" }
20+
rustc_lang_items = { path = "../librustc_lang_items" }
2021
rustc_session = { path = "../librustc_session" }
2122
rustc_target = { path = "../librustc_target" }
2223
syntax = { path = "../libsyntax" }

src/librustc_passes/check_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! conflicts between multiple such attributes attached to the same
55
//! item.
66
7-
use rustc::hir::check_attr::{MethodKind, Target};
87
use rustc::hir::map::Map;
98
use rustc::ty::query::Providers;
109
use rustc::ty::TyCtxt;
@@ -15,6 +14,7 @@ use rustc_hir::def_id::DefId;
1514
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
1615
use rustc_hir::DUMMY_HIR_ID;
1716
use rustc_hir::{self, HirId, Item, ItemKind, TraitItem};
17+
use rustc_lang_items::{MethodKind, Target};
1818
use rustc_session::lint::builtin::{CONFLICTING_REPR_HINTS, UNUSED_ATTRIBUTES};
1919
use rustc_span::symbol::sym;
2020
use rustc_span::Span;

0 commit comments

Comments
 (0)