Skip to content

Commit f495500

Browse files
committed
Fix a failing test due to increased collection laziness
1 parent c4a0235 commit f495500

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/test/ui/feature-gate/stability-attribute-consistency.rs

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
#![stable(feature = "stable_test_feature", since = "1.0.0")]
1212

1313
#![feature(staged_api)]
14+
// Right now, stability attributes are only checked for consistency if we're
15+
// collecting lib feature attributes, for performance. We collect lib
16+
// feature attributes if there are non-lang feature attributes, or a crate
17+
// that depends on the current one has non-lang feature attributes. Thus,
18+
// we're enabling an arbitrary lib feature to force the check to kick in.
19+
#![feature(rustc_private)]
1420

1521
#[stable(feature = "foo", since = "1.0.0")]
1622
fn foo_stable_1_0_0() {}

src/test/ui/feature-gate/stability-attribute-consistency.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0711]: feature `foo` is declared stable since 1.29.0, but was previously declared stable since 1.0.0
2-
--> $DIR/stability-attribute-consistency.rs:18:1
2+
--> $DIR/stability-attribute-consistency.rs:24:1
33
|
44
LL | #[stable(feature = "foo", since = "1.29.0")]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error[E0711]: feature `foo` is declared unstable, but was previously declared stable
8-
--> $DIR/stability-attribute-consistency.rs:22:1
8+
--> $DIR/stability-attribute-consistency.rs:28:1
99
|
1010
LL | #[unstable(feature = "foo", issue = "0")]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)