Skip to content

Commit f5e5bdb

Browse files
committed
Fix test
1 parent d02d4c3 commit f5e5bdb

File tree

2 files changed

+4
-41
lines changed

2 files changed

+4
-41
lines changed

src/test/auxiliary/lint_stability.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#![crate_type = "lib"]
1212
#![feature(staged_api)]
1313
#![staged_api]
14+
#![stable(feature = "lint_stability", since = "1.0.0")]
1415

1516
#[stable(feature = "test_feature", since = "1.0.0")]
1617
#[deprecated(since = "1.0.0")]
@@ -31,8 +32,6 @@ pub fn unstable() {}
3132
#[unstable(feature = "test_feature", reason = "text")]
3233
pub fn unstable_text() {}
3334

34-
pub fn unmarked() {}
35-
3635
#[stable(feature = "rust1", since = "1.0.0")]
3736
pub fn stable() {}
3837
#[stable(feature = "rust1", since = "1.0.0", reason = "text")]
@@ -61,8 +60,6 @@ impl MethodTester {
6160
#[unstable(feature = "test_feature", reason = "text")]
6261
pub fn method_unstable_text(&self) {}
6362

64-
pub fn method_unmarked(&self) {}
65-
6663
#[stable(feature = "rust1", since = "1.0.0")]
6764
pub fn method_stable(&self) {}
6865
#[stable(feature = "rust1", since = "1.0.0", reason = "text")]
@@ -79,6 +76,7 @@ impl MethodTester {
7976
pub fn method_frozen_text(&self) {}
8077
}
8178

79+
#[stable(feature = "test_feature", since = "1.0.0")]
8280
pub trait Trait {
8381
#[stable(feature = "test_feature", since = "1.0.0")]
8482
#[deprecated(since = "1.0.0")]
@@ -99,8 +97,6 @@ pub trait Trait {
9997
#[unstable(feature = "test_feature", reason = "text")]
10098
fn trait_unstable_text(&self) {}
10199

102-
fn trait_unmarked(&self) {}
103-
104100
#[stable(feature = "rust1", since = "1.0.0")]
105101
fn trait_stable(&self) {}
106102
#[stable(feature = "rust1", since = "1.0.0", reason = "text")]
@@ -130,7 +126,6 @@ pub struct DeprecatedStruct { pub i: int }
130126
pub struct DeprecatedUnstableStruct { pub i: int }
131127
#[unstable(feature = "test_feature")]
132128
pub struct UnstableStruct { pub i: int }
133-
pub struct UnmarkedStruct { pub i: int }
134129
#[stable(feature = "rust1", since = "1.0.0")]
135130
pub struct StableStruct { pub i: int }
136131

@@ -142,10 +137,10 @@ pub struct DeprecatedUnitStruct;
142137
pub struct DeprecatedUnstableUnitStruct;
143138
#[unstable(feature = "test_feature")]
144139
pub struct UnstableUnitStruct;
145-
pub struct UnmarkedUnitStruct;
146140
#[stable(feature = "rust1", since = "1.0.0")]
147141
pub struct StableUnitStruct;
148142

143+
#[stable(feature = "test_feature", since = "1.0.0")]
149144
pub enum Enum {
150145
#[stable(feature = "test_feature", since = "1.0.0")]
151146
#[deprecated(since = "1.0.0")]
@@ -156,7 +151,6 @@ pub enum Enum {
156151
#[unstable(feature = "test_feature")]
157152
UnstableVariant,
158153

159-
UnmarkedVariant,
160154
#[stable(feature = "rust1", since = "1.0.0")]
161155
StableVariant,
162156
}
@@ -169,7 +163,6 @@ pub struct DeprecatedTupleStruct(pub int);
169163
pub struct DeprecatedUnstableTupleStruct(pub int);
170164
#[unstable(feature = "test_feature")]
171165
pub struct UnstableTupleStruct(pub int);
172-
pub struct UnmarkedTupleStruct(pub int);
173166
#[stable(feature = "rust1", since = "1.0.0")]
174167
pub struct StableTupleStruct(pub int);
175168

src/test/compile-fail/lint-stability.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#![staged_api]
2121

2222
#[macro_use]
23-
extern crate lint_stability; //~ ERROR: use of unmarked library feature
23+
extern crate lint_stability;
2424

2525
mod cross_crate {
2626
extern crate stability_cfg1;
@@ -61,10 +61,6 @@ mod cross_crate {
6161
foo.method_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
6262
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
6363

64-
unmarked(); //~ ERROR use of unmarked library feature
65-
foo.method_unmarked(); //~ ERROR use of unmarked library feature
66-
foo.trait_unmarked(); //~ ERROR use of unmarked library feature
67-
6864
stable();
6965
foo.method_stable();
7066
foo.trait_stable();
@@ -77,28 +73,24 @@ mod cross_crate {
7773
let _ = DeprecatedUnstableStruct { i: 0 }; //~ ERROR use of deprecated item
7874
//~^ WARNING use of unstable library feature
7975
let _ = UnstableStruct { i: 0 }; //~ WARNING use of unstable library feature
80-
let _ = UnmarkedStruct { i: 0 }; //~ ERROR use of unmarked library feature
8176
let _ = StableStruct { i: 0 };
8277

8378
let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
8479
let _ = DeprecatedUnstableUnitStruct; //~ ERROR use of deprecated item
8580
//~^ WARNING use of unstable library feature
8681
let _ = UnstableUnitStruct; //~ WARNING use of unstable library feature
87-
let _ = UnmarkedUnitStruct; //~ ERROR use of unmarked library feature
8882
let _ = StableUnitStruct;
8983

9084
let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
9185
let _ = Enum::DeprecatedUnstableVariant; //~ ERROR use of deprecated item
9286
//~^ WARNING use of unstable library feature
9387
let _ = Enum::UnstableVariant; //~ WARNING use of unstable library feature
94-
let _ = Enum::UnmarkedVariant; //~ ERROR use of unmarked library feature
9588
let _ = Enum::StableVariant;
9689

9790
let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
9891
let _ = DeprecatedUnstableTupleStruct (1); //~ ERROR use of deprecated item
9992
//~^ WARNING use of unstable library feature
10093
let _ = UnstableTupleStruct (1); //~ WARNING use of unstable library feature
101-
let _ = UnmarkedTupleStruct (1); //~ ERROR use of unmarked library feature
10294
let _ = StableTupleStruct (1);
10395

10496
// At the moment, the lint checker only checks stability in
@@ -123,7 +115,6 @@ mod cross_crate {
123115
//~^ WARNING use of unstable library feature
124116
foo.trait_unstable(); //~ WARNING use of unstable library feature
125117
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
126-
foo.trait_unmarked(); //~ ERROR use of unmarked library feature
127118
foo.trait_stable();
128119
}
129120

@@ -136,7 +127,6 @@ mod cross_crate {
136127
//~^ WARNING use of unstable library feature
137128
foo.trait_unstable(); //~ WARNING use of unstable library feature
138129
foo.trait_unstable_text(); //~ WARNING use of unstable library feature 'test_feature': text
139-
foo.trait_unmarked(); //~ ERROR use of unmarked library feature
140130
foo.trait_stable();
141131
}
142132

@@ -183,8 +173,6 @@ mod this_crate {
183173
#[unstable(feature = "test_feature", reason = "text")]
184174
pub fn unstable_text() {}
185175

186-
pub fn unmarked() {}
187-
188176
#[stable(feature = "rust1", since = "1.0.0")]
189177
pub fn stable() {}
190178
#[stable(feature = "rust1", since = "1.0.0", reason = "text")]
@@ -206,8 +194,6 @@ mod this_crate {
206194
#[unstable(feature = "test_feature", reason = "text")]
207195
pub fn method_unstable_text(&self) {}
208196

209-
pub fn method_unmarked(&self) {}
210-
211197
#[stable(feature = "rust1", since = "1.0.0")]
212198
pub fn method_stable(&self) {}
213199
#[stable(feature = "rust1", since = "1.0.0", reason = "text")]
@@ -227,8 +213,6 @@ mod this_crate {
227213
#[unstable(feature = "test_feature", reason = "text")]
228214
fn trait_unstable_text(&self) {}
229215

230-
fn trait_unmarked(&self) {}
231-
232216
#[stable(feature = "rust1", since = "1.0.0")]
233217
fn trait_stable(&self) {}
234218
#[stable(feature = "rust1", since = "1.0.0", reason = "text")]
@@ -242,7 +226,6 @@ mod this_crate {
242226
pub struct DeprecatedStruct { i: isize }
243227
#[unstable(feature = "test_feature")]
244228
pub struct UnstableStruct { i: isize }
245-
pub struct UnmarkedStruct { i: isize }
246229
#[stable(feature = "rust1", since = "1.0.0")]
247230
pub struct StableStruct { i: isize }
248231

@@ -251,7 +234,6 @@ mod this_crate {
251234
pub struct DeprecatedUnitStruct;
252235
#[unstable(feature = "test_feature")]
253236
pub struct UnstableUnitStruct;
254-
pub struct UnmarkedUnitStruct;
255237
#[stable(feature = "rust1", since = "1.0.0")]
256238
pub struct StableUnitStruct;
257239

@@ -262,7 +244,6 @@ mod this_crate {
262244
#[unstable(feature = "test_feature")]
263245
UnstableVariant,
264246

265-
UnmarkedVariant,
266247
#[stable(feature = "rust1", since = "1.0.0")]
267248
StableVariant,
268249
}
@@ -272,7 +253,6 @@ mod this_crate {
272253
pub struct DeprecatedTupleStruct(isize);
273254
#[unstable(feature = "test_feature")]
274255
pub struct UnstableTupleStruct(isize);
275-
pub struct UnmarkedTupleStruct(isize);
276256
#[stable(feature = "rust1", since = "1.0.0")]
277257
pub struct StableTupleStruct(isize);
278258

@@ -299,10 +279,6 @@ mod this_crate {
299279
foo.method_unstable_text();
300280
foo.trait_unstable_text();
301281

302-
unmarked();
303-
foo.method_unmarked();
304-
foo.trait_unmarked();
305-
306282
stable();
307283
foo.method_stable();
308284
foo.trait_stable();
@@ -313,22 +289,18 @@ mod this_crate {
313289

314290
let _ = DeprecatedStruct { i: 0 }; //~ ERROR use of deprecated item
315291
let _ = UnstableStruct { i: 0 };
316-
let _ = UnmarkedStruct { i: 0 };
317292
let _ = StableStruct { i: 0 };
318293

319294
let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
320295
let _ = UnstableUnitStruct;
321-
let _ = UnmarkedUnitStruct;
322296
let _ = StableUnitStruct;
323297

324298
let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
325299
let _ = Enum::UnstableVariant;
326-
let _ = Enum::UnmarkedVariant;
327300
let _ = Enum::StableVariant;
328301

329302
let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
330303
let _ = UnstableTupleStruct (1);
331-
let _ = UnmarkedTupleStruct (1);
332304
let _ = StableTupleStruct (1);
333305
}
334306

@@ -337,7 +309,6 @@ mod this_crate {
337309
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
338310
foo.trait_unstable();
339311
foo.trait_unstable_text();
340-
foo.trait_unmarked();
341312
foo.trait_stable();
342313
}
343314

@@ -346,7 +317,6 @@ mod this_crate {
346317
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
347318
foo.trait_unstable();
348319
foo.trait_unstable_text();
349-
foo.trait_unmarked();
350320
foo.trait_stable();
351321
}
352322

0 commit comments

Comments
 (0)