Skip to content

Commit 6e349d1

Browse files
committed
make feature name plural: const_fn_trait_bound → const_fn_trait_bounds
1 parent ee8382f commit 6e349d1

File tree

17 files changed

+32
-32
lines changed

17 files changed

+32
-32
lines changed

compiler/rustc_feature/src/active.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ declare_features! (
650650
(active, wasm_abi, "1.53.0", Some(83788), None),
651651

652652
/// Allows trait bounds in `const fn`.
653-
(active, const_fn_trait_bound, "1.53.0", Some(57563), None),
653+
(active, const_fn_trait_bounds, "1.53.0", Some(57563), None),
654654

655655
/// Allows unsizing coercions in `const fn`.
656656
(active, const_fn_unsize, "1.53.0", Some(64992), None),

compiler/rustc_mir/src/transform/check_consts/ops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,14 +650,14 @@ pub mod ty {
650650
if ccx.const_kind() != hir::ConstContext::ConstFn {
651651
Status::Allowed
652652
} else {
653-
Status::Unstable(sym::const_fn_trait_bound)
653+
Status::Unstable(sym::const_fn_trait_bounds)
654654
}
655655
}
656656

657657
fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx> {
658658
feature_err(
659659
&ccx.tcx.sess.parse_sess,
660-
sym::const_fn_trait_bound,
660+
sym::const_fn_trait_bounds,
661661
span,
662662
"trait bounds other than `Sized` on const fn parameters are unstable",
663663
)

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ symbols! {
382382
const_fn,
383383
const_fn_floating_point_arithmetic,
384384
const_fn_fn_ptr_basics,
385-
const_fn_trait_bound,
385+
const_fn_trait_bounds,
386386
const_fn_transmute,
387387
const_fn_union,
388388
const_fn_unsize,

library/alloc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
#![feature(coerce_unsized)]
9191
#![feature(const_btree_new)]
9292
#![cfg_attr(bootstrap, feature(const_fn))]
93-
#![cfg_attr(not(bootstrap), feature(const_fn_trait_bound))]
93+
#![cfg_attr(not(bootstrap), feature(const_fn_trait_bounds))]
9494
#![feature(cow_is_borrowed)]
9595
#![feature(const_cow_is_borrowed)]
9696
#![feature(destructuring_assignment)]

library/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
#![feature(const_impl_trait)]
8787
#![feature(const_fn_floating_point_arithmetic)]
8888
#![feature(const_fn_fn_ptr_basics)]
89-
#![cfg_attr(not(bootstrap), feature(const_fn_trait_bound))]
89+
#![cfg_attr(not(bootstrap), feature(const_fn_trait_bounds))]
9090
#![feature(const_option)]
9191
#![feature(const_precise_live_drops)]
9292
#![feature(const_ptr_offset)]

src/test/ui/consts/const-eval/issue-49296.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// issue-49296: Unsafe shenigans in constants can result in missing errors
22

33
#![feature(const_fn_union)]
4-
#![feature(const_fn_trait_bound)]
4+
#![feature(const_fn_trait_bounds)]
55

66
const unsafe fn transmute<T: Copy, U: Copy>(t: T) -> U {
77
#[repr(C)]

src/test/ui/consts/const-fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// A very basic test of const fn functionality.
55

66
#![feature(const_indexing)]
7-
#![feature(const_fn_trait_bound)]
7+
#![feature(const_fn_trait_bounds)]
88

99
const fn add(x: u32, y: u32) -> u32 {
1010
x + y

src/test/ui/consts/const_fn_trait_bound.gated.stderr renamed to src/test/ui/consts/const_fn_trait_bounds.gated.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: fatal error triggered by #[rustc_error]
2-
--> $DIR/const_fn_trait_bound.rs:17:1
2+
--> $DIR/const_fn_trait_bounds.rs:17:1
33
|
44
LL | fn main() {}
55
| ^^^^^^^^^

src/test/ui/consts/const_fn_trait_bound.rs renamed to src/test/ui/consts/const_fn_trait_bounds.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// gate-test-const_fn_trait_bound
1+
// gate-test-const_fn_trait_bounds
22

33
// revisions: stock gated
44

55
#![feature(rustc_attrs)]
6-
#![cfg_attr(gated, feature(const_fn_trait_bound))]
6+
#![cfg_attr(gated, feature(const_fn_trait_bounds))]
77

88
const fn test1<T: std::ops::Add>() {}
99
//[stock]~^ trait bounds

src/test/ui/consts/const_fn_trait_bound.stock.stderr renamed to src/test/ui/consts/const_fn_trait_bounds.stock.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
2-
--> $DIR/const_fn_trait_bound.rs:8:16
2+
--> $DIR/const_fn_trait_bounds.rs:8:16
33
|
44
LL | const fn test1<T: std::ops::Add>() {}
55
| ^
66
|
77
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
8-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
8+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
99

1010
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
11-
--> $DIR/const_fn_trait_bound.rs:10:16
11+
--> $DIR/const_fn_trait_bounds.rs:10:16
1212
|
1313
LL | const fn test2(_x: &dyn Send) {}
1414
| ^^
1515
|
1616
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
17-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
17+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
1818

1919
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
20-
--> $DIR/const_fn_trait_bound.rs:12:21
20+
--> $DIR/const_fn_trait_bounds.rs:12:21
2121
|
2222
LL | const fn test3() -> &'static dyn Send { loop {} }
2323
| ^^^^^^^^^^^^^^^^^
2424
|
2525
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
26-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
26+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
2727

2828
error: aborting due to 3 previous errors
2929

0 commit comments

Comments
 (0)