Skip to content

Commit bcf87e4

Browse files
committed
Update error message
1 parent 9a8facb commit bcf87e4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

compiler/rustc_passes/messages.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ passes_rustc_std_internal_symbol =
669669
.label = not a function or static
670670
671671
passes_rustc_unstable_feature_bound =
672-
attribute should be applied to `impl` or free function outside of any `impl` or trait
673-
.label = not an `impl` or free function
672+
attribute should be applied to `impl`, trait or free function
673+
.label = not an `impl`, trait or free function
674674
675675
passes_should_be_applied_to_fn =
676676
attribute should be applied to a function definition

tests/ui/unstable-feature-bound/unstable_inherent_method.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
pub trait Trait {
1010
#[unstable(feature = "feat", issue = "none" )]
1111
#[unstable_feature_bound(foo)]
12-
//~^ ERROR: attribute should be applied to `impl` or free function outside of any `impl` or trait
12+
//~^ ERROR: attribute should be applied to `impl`, trait or free function
1313
fn foo();
1414
}
1515

1616
#[stable(feature = "a", since = "1.1.1" )]
1717
impl Trait for u8 {
1818
#[unstable_feature_bound(foo)]
19-
//~^ ERROR: attribute should be applied to `impl` or free function outside of any `impl` or trait
19+
//~^ ERROR: attribute should be applied to `impl`, trait or free function
2020
fn foo() {}
2121
}
2222

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
error: attribute should be applied to `impl` or free function outside of any `impl` or trait
1+
error: attribute should be applied to `impl`, trait or free function
22
--> $DIR/unstable_inherent_method.rs:11:5
33
|
44
LL | #[unstable_feature_bound(foo)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
LL |
77
LL | fn foo();
8-
| --------- not an `impl` or free function
8+
| --------- not an `impl`, trait or free function
99

10-
error: attribute should be applied to `impl` or free function outside of any `impl` or trait
10+
error: attribute should be applied to `impl`, trait or free function
1111
--> $DIR/unstable_inherent_method.rs:18:5
1212
|
1313
LL | #[unstable_feature_bound(foo)]
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515
LL |
1616
LL | fn foo() {}
17-
| ----------- not an `impl` or free function
17+
| ----------- not an `impl`, trait or free function
1818

1919
error: aborting due to 2 previous errors
2020

0 commit comments

Comments
 (0)