Move hir::check_attr::Target to librustc_lang_items.
This commit is contained in:
parent
60aaf90834
commit
a056817aae
15
Cargo.lock
15
Cargo.lock
@ -3100,6 +3100,7 @@ dependencies = [
|
||||
"rustc_feature",
|
||||
"rustc_hir",
|
||||
"rustc_index",
|
||||
"rustc_lang_items",
|
||||
"rustc_macros",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
@ -3698,6 +3699,19 @@ dependencies = [
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_lang_items"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0",
|
||||
"rustc_data_structures",
|
||||
"rustc_hir",
|
||||
"rustc_macros",
|
||||
"rustc_span",
|
||||
"serialize",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_lexer"
|
||||
version = "0.1.0"
|
||||
@ -3851,6 +3865,7 @@ dependencies = [
|
||||
"rustc_feature",
|
||||
"rustc_hir",
|
||||
"rustc_index",
|
||||
"rustc_lang_items",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
|
@ -24,6 +24,7 @@ rustc_apfloat = { path = "../librustc_apfloat" }
|
||||
rustc_attr = { path = "../librustc_attr" }
|
||||
rustc_feature = { path = "../librustc_feature" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_lang_items = { path = "../librustc_lang_items" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
rustc_macros = { path = "../librustc_macros" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
|
@ -2,7 +2,6 @@
|
||||
//!
|
||||
//! [rustc guide]: https://rust-lang.github.io/rustc-guide/hir.html
|
||||
|
||||
pub mod check_attr;
|
||||
pub mod exports;
|
||||
pub mod map;
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
pub use self::LangItem::*;
|
||||
|
||||
use crate::hir::check_attr::Target;
|
||||
use crate::middle::cstore::ExternCrate;
|
||||
use crate::middle::weak_lang_items;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
@ -19,6 +18,7 @@ use rustc_errors::struct_span_err;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
||||
use rustc_lang_items::Target;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
18
src/librustc_lang_items/Cargo.toml
Normal file
18
src/librustc_lang_items/Cargo.toml
Normal file
@ -0,0 +1,18 @@
|
||||
[package]
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "rustc_lang_items"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
name = "rustc_lang_items"
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
lazy_static = "1"
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_macros = { path = "../librustc_macros" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
syntax = { path = "../libsyntax" }
|
3
src/librustc_lang_items/lib.rs
Normal file
3
src/librustc_lang_items/lib.rs
Normal file
@ -0,0 +1,3 @@
|
||||
mod target;
|
||||
|
||||
pub use target::{MethodKind, Target};
|
@ -17,6 +17,7 @@ rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_feature = { path = "../librustc_feature" }
|
||||
rustc_hir = { path = "../librustc_hir" }
|
||||
rustc_index = { path = "../librustc_index" }
|
||||
rustc_lang_items = { path = "../librustc_lang_items" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
|
@ -4,7 +4,6 @@
|
||||
//! conflicts between multiple such attributes attached to the same
|
||||
//! item.
|
||||
|
||||
use rustc::hir::check_attr::{MethodKind, Target};
|
||||
use rustc::hir::map::Map;
|
||||
use rustc::ty::query::Providers;
|
||||
use rustc::ty::TyCtxt;
|
||||
@ -15,6 +14,7 @@ use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
|
||||
use rustc_hir::DUMMY_HIR_ID;
|
||||
use rustc_hir::{self, HirId, Item, ItemKind, TraitItem};
|
||||
use rustc_lang_items::{MethodKind, Target};
|
||||
use rustc_session::lint::builtin::{CONFLICTING_REPR_HINTS, UNUSED_ATTRIBUTES};
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
|
Loading…
x
Reference in New Issue
Block a user