Skip to content

Commit 9aaf26e

Browse files
committed
rustc: rework stability to be on-demand for type-directed lookup.
1 parent f97c132 commit 9aaf26e

File tree

97 files changed

+1774
-858
lines changed

Some content is hidden

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

97 files changed

+1774
-858
lines changed

src/etc/generate-deriving-span-tests.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
3838
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
3939
40-
extern crate rand;
41-
4240
{error_deriving}
4341
struct Error;
4442
{code}
@@ -106,7 +104,6 @@ def write_file(name, string):
106104
ALL = STRUCT | ENUM
107105

108106
traits = {
109-
'Zero': (STRUCT, [], 1),
110107
'Default': (STRUCT, [], 1),
111108
'FromPrimitive': (0, [], 0), # only works for C-like enums
112109

@@ -116,7 +113,7 @@ def write_file(name, string):
116113

117114
for (trait, supers, errs) in [('Clone', [], 1),
118115
('PartialEq', [], 2),
119-
('PartialOrd', ['PartialEq'], 8),
116+
('PartialOrd', ['PartialEq'], 9),
120117
('Eq', ['PartialEq'], 1),
121118
('Ord', ['Eq', 'PartialOrd', 'PartialEq'], 1),
122119
('Debug', [], 1),

src/librustc/dep_graph/dep_node.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub enum DepNode<D: Clone + Debug> {
9090
RvalueCheck(D),
9191
Reachability,
9292
DeadCheck,
93-
StabilityCheck,
93+
StabilityCheck(D),
9494
LateLintCheck,
9595
TransCrate,
9696
TransCrateItem(D),
@@ -189,7 +189,6 @@ impl<D: Clone + Debug> DepNode<D> {
189189
Privacy => Some(Privacy),
190190
Reachability => Some(Reachability),
191191
DeadCheck => Some(DeadCheck),
192-
StabilityCheck => Some(StabilityCheck),
193192
LateLintCheck => Some(LateLintCheck),
194193
TransCrate => Some(TransCrate),
195194
TransWriteMetadata => Some(TransWriteMetadata),
@@ -217,6 +216,7 @@ impl<D: Clone + Debug> DepNode<D> {
217216
Mir(ref d) => op(d).map(Mir),
218217
BorrowCheck(ref d) => op(d).map(BorrowCheck),
219218
RvalueCheck(ref d) => op(d).map(RvalueCheck),
219+
StabilityCheck(ref d) => op(d).map(StabilityCheck),
220220
TransCrateItem(ref d) => op(d).map(TransCrateItem),
221221
TransInlinedItem(ref d) => op(d).map(TransInlinedItem),
222222
AssociatedItems(ref d) => op(d).map(AssociatedItems),

src/librustc/hir/lowering.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,8 @@ impl<'a> LoweringContext<'a> {
13621362
} else {
13631363
let fields = fields.into_iter().map(|&(s, e)| {
13641364
let expr = P(this.lower_expr(&e));
1365-
this.field(Symbol::intern(s), expr, e.span)
1365+
let unstable_span = this.allow_internal_unstable("...", e.span);
1366+
this.field(Symbol::intern(s), expr, unstable_span)
13661367
}).collect();
13671368
let attrs = ast_expr.attrs.clone();
13681369

src/librustc/lint/builtin.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ declare_lint! {
211211
not named `mod.rs`"
212212
}
213213

214+
declare_lint! {
215+
pub DEPRECATED,
216+
Warn,
217+
"detects use of deprecated items"
218+
}
219+
214220
/// Does nothing as a lint pass, but registers some `Lint`s
215221
/// which are used by other parts of the compiler.
216222
#[derive(Copy, Clone)]
@@ -250,7 +256,8 @@ impl LintPass for HardwiredLints {
250256
SAFE_EXTERN_STATICS,
251257
PATTERNS_IN_FNS_WITHOUT_BODY,
252258
EXTRA_REQUIREMENT_IN_IMPL,
253-
LEGACY_DIRECTORY_OWNERSHIP
259+
LEGACY_DIRECTORY_OWNERSHIP,
260+
DEPRECATED
254261
)
255262
}
256263
}

0 commit comments

Comments
 (0)