Skip to content

Commit c9ab336

Browse files
arielb1Ariel Ben-Yehuda
authored and
Ariel Ben-Yehuda
committed
split the metadata code into rustc_metadata
tests & rustdoc still broken
1 parent 852db8b commit c9ab336

Some content is hidden

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

64 files changed

+629
-908
lines changed

mk/crates.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ TARGET_CRATES := libc std flate arena term \
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
60-
rustc_plugin
60+
rustc_plugin rustc_metadata
6161
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6262
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6363

@@ -88,22 +88,23 @@ DEPS_test := std getopts serialize rbml term native:rust_test_helpers
8888

8989
DEPS_syntax := std term serialize log fmt_macros arena libc rustc_bitflags
9090

91-
DEPS_rustc := syntax flate arena serialize getopts rbml rustc_front\
91+
DEPS_rustc := syntax flate arena serialize getopts rustc_front\
9292
log graphviz rustc_llvm rustc_back rustc_data_structures
9393
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
9494
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
9595
DEPS_rustc_data_structures := std log serialize
9696
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
9797
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
98-
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin
99-
98+
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
99+
rustc_metadata
100100
DEPS_rustc_front := std syntax log serialize
101101
DEPS_rustc_lint := rustc log syntax
102102
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
103+
DEPS_rustc_metadata := rustc rustc_front syntax rbml
103104
DEPS_rustc_mir := rustc rustc_front syntax
104105
DEPS_rustc_resolve := rustc rustc_front log syntax
105106
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
106-
DEPS_rustc_plugin := rustc syntax
107+
DEPS_rustc_plugin := rustc rustc_metadata syntax
107108
DEPS_rustc_privacy := rustc rustc_front log syntax
108109
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
109110
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics

src/librustc/diagnostics.rs

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,51 +1899,6 @@ contain references (with a maximum lifetime of `'a`).
18991899
[1]: https://github.com/rust-lang/rfcs/pull/1156
19001900
"##,
19011901

1902-
E0454: r##"
1903-
A link name was given with an empty name. Erroneous code example:
1904-
1905-
```
1906-
#[link(name = "")] extern {} // error: #[link(name = "")] given with empty name
1907-
```
1908-
1909-
The rust compiler cannot link to an external library if you don't give it its
1910-
name. Example:
1911-
1912-
```
1913-
#[link(name = "some_lib")] extern {} // ok!
1914-
```
1915-
"##,
1916-
1917-
E0458: r##"
1918-
An unknown "kind" was specified for a link attribute. Erroneous code example:
1919-
1920-
```
1921-
#[link(kind = "wonderful_unicorn")] extern {}
1922-
// error: unknown kind: `wonderful_unicorn`
1923-
```
1924-
1925-
Please specify a valid "kind" value, from one of the following:
1926-
* static
1927-
* dylib
1928-
* framework
1929-
"##,
1930-
1931-
E0459: r##"
1932-
A link was used without a name parameter. Erroneous code example:
1933-
1934-
```
1935-
#[link(kind = "dylib")] extern {}
1936-
// error: #[link(...)] specified without `name = "foo"`
1937-
```
1938-
1939-
Please add the name parameter to allow the rust compiler to find the library
1940-
you want. Example:
1941-
1942-
```
1943-
#[link(kind = "dylib", name = "some_lib")] extern {} // ok!
1944-
```
1945-
"##,
1946-
19471902
E0493: r##"
19481903
A type with a destructor was assigned to an invalid type of variable. Erroneous
19491904
code example:
@@ -2144,20 +2099,6 @@ register_diagnostics! {
21442099
E0400, // overloaded derefs are not allowed in constants
21452100
E0452, // malformed lint attribute
21462101
E0453, // overruled by outer forbid
2147-
E0455, // native frameworks are only available on OSX targets
2148-
E0456, // plugin `..` is not available for triple `..`
2149-
E0457, // plugin `..` only found in rlib format, but must be available...
2150-
E0460, // found possibly newer version of crate `..`
2151-
E0461, // couldn't find crate `..` with expected target triple ..
2152-
E0462, // found staticlib `..` instead of rlib or dylib
2153-
E0463, // can't find crate for `..`
2154-
E0464, // multiple matching crates for `..`
2155-
E0465, // multiple .. candidates for `..` found
2156-
E0466, // bad macro import
2157-
E0467, // bad macro reexport
2158-
E0468, // an `extern crate` loading macros must be at the crate root
2159-
E0469, // imported macro not found
2160-
E0470, // reexported macro not found
21612102
E0471, // constant evaluation error: ..
21622103
E0472, // asm! is unsupported on this target
21632104
E0473, // dereference of reference outside its lifetime
@@ -2181,5 +2122,4 @@ register_diagnostics! {
21812122
E0491, // in type `..`, reference has a longer lifetime than the data it...
21822123
E0492, // cannot borrow a constant which contains interior mutability
21832124
E0495, // cannot infer an appropriate lifetime due to conflicting requirements
2184-
E0514, // metadata version mismatch
21852125
}

src/librustc/front/map/definitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use metadata::cstore::LOCAL_CRATE;
11+
use middle::cstore::LOCAL_CRATE;
1212
use middle::def_id::{DefId, DefIndex};
1313
use rustc_data_structures::fnv::FnvHashMap;
1414
use rustc_front::hir;

src/librustc/front/map/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use self::MapEntry::*;
1414
use self::collector::NodeCollector;
1515
pub use self::definitions::{Definitions, DefKey, DefPath, DefPathData, DisambiguatedDefPathData};
1616

17-
use metadata::inline::InlinedItem;
18-
use metadata::inline::InlinedItem as II;
17+
use middle::cstore::InlinedItem;
18+
use middle::cstore::InlinedItem as II;
1919
use middle::def_id::DefId;
2020

2121
use syntax::abi;

src/librustc/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ extern crate rustc_back;
6767
extern crate rustc_front;
6868
extern crate rustc_data_structures;
6969
extern crate serialize;
70-
extern crate rbml;
7170
extern crate collections;
7271
#[macro_use] extern crate log;
7372
#[macro_use] extern crate syntax;
@@ -101,7 +100,6 @@ pub mod front {
101100
pub mod middle {
102101
pub mod astconv_util;
103102
pub mod expr_use_visitor; // STAGE0: increase glitch immunity
104-
pub mod astencode;
105103
pub mod cfg;
106104
pub mod check_const;
107105
pub mod check_static_recursion;
@@ -110,6 +108,7 @@ pub mod middle {
110108
pub mod check_no_asm;
111109
pub mod check_rvalues;
112110
pub mod const_eval;
111+
pub mod cstore;
113112
pub mod dataflow;
114113
pub mod dead;
115114
pub mod def;
@@ -137,8 +136,6 @@ pub mod middle {
137136
pub mod weak_lang_items;
138137
}
139138

140-
pub mod metadata;
141-
142139
pub mod session;
143140

144141
pub mod lint;

0 commit comments

Comments
 (0)