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

+1-1
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

+2-2
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+2-2
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

+6-6
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

src/test/ui/consts/min_const_fn/min_const_fn.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ LL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t }
137137
| ^
138138
|
139139
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
140-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
140+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
141141

142142
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
143143
--> $DIR/min_const_fn.rs:86:18
@@ -146,7 +146,7 @@ LL | const fn foo11_2<T: Send>(t: T) -> T { t }
146146
| ^
147147
|
148148
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
149-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
149+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
150150

151151
error[E0013]: constant functions cannot refer to statics
152152
--> $DIR/min_const_fn.rs:90:27
@@ -216,7 +216,7 @@ LL | impl<T: std::fmt::Debug> Foo<T> {
216216
| ^
217217
|
218218
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
219-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
219+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
220220

221221
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
222222
--> $DIR/min_const_fn.rs:115:6
@@ -225,7 +225,7 @@ LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
225225
| ^
226226
|
227227
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
228-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
228+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
229229

230230
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
231231
--> $DIR/min_const_fn.rs:120:6
@@ -234,7 +234,7 @@ LL | impl<T: Sync + Sized> Foo<T> {
234234
| ^
235235
|
236236
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
237-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
237+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
238238

239239
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
240240
--> $DIR/min_const_fn.rs:126:34
@@ -243,7 +243,7 @@ LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
243243
| ^^^^^^^^^^^^^^^^^^^^
244244
|
245245
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
246-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
246+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
247247

248248
error[E0493]: destructors cannot be evaluated at compile-time
249249
--> $DIR/min_const_fn.rs:126:19
@@ -260,7 +260,7 @@ LL | const fn no_apit(_x: impl std::fmt::Debug) {}
260260
| ^^^^^^^^^^^^^^^^^^^^
261261
|
262262
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
263-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
263+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
264264

265265
error[E0493]: destructors cannot be evaluated at compile-time
266266
--> $DIR/min_const_fn.rs:129:18
@@ -277,7 +277,7 @@ LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
277277
| ^^
278278
|
279279
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
280-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
280+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
281281

282282
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
283283
--> $DIR/min_const_fn.rs:134:32
@@ -286,7 +286,7 @@ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
286286
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
287287
|
288288
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
289-
= help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable
289+
= help: add `#![feature(const_fn_trait_bounds)]` to the crate attributes to enable
290290

291291
error[E0658]: unsizing casts to types besides slices are not allowed in const fn
292292
--> $DIR/min_const_fn.rs:134:63

src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | x.0.field;
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]: unsizing casts to types besides slices are not allowed in const fn
1111
--> $DIR/min_const_fn_dyn.rs:12:66

src/test/ui/consts/unstable-const-fn-in-libcore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![stable(feature = "core", since = "1.6.0")]
77
#![feature(rustc_const_unstable)]
88
#![feature(staged_api)]
9-
#![feature(const_fn_trait_bound)]
9+
#![feature(const_fn_trait_bounds)]
1010

1111
enum Opt<T> {
1212
Some(T),

src/test/ui/rfc-2632-const-trait-impl/call-generic-method-chain.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// check-pass
44

55
#![feature(const_trait_impl)]
6-
#![feature(const_fn_trait_bound)]
6+
#![feature(const_fn_trait_bounds)]
77
#![allow(incomplete_features)]
88

99
struct S;

src/test/ui/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#![feature(const_trait_impl)]
44
#![feature(const_trait_bound_opt_out)]
5-
#![feature(const_fn_trait_bound)]
5+
#![feature(const_fn_trait_bounds)]
66
#![allow(incomplete_features)]
77

88
struct S;

src/test/ui/rfc-2632-const-trait-impl/call-generic-method-pass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// check-pass
44

55
#![feature(const_trait_impl)]
6-
#![feature(const_fn_trait_bound)]
6+
#![feature(const_fn_trait_bounds)]
77
#![allow(incomplete_features)]
88

99
struct S;

src/test/ui/rfc-2632-const-trait-impl/generic-bound.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#![allow(incomplete_features)]
44
#![feature(const_trait_impl)]
5-
#![feature(const_fn_trait_bound)]
5+
#![feature(const_fn_trait_bounds)]
66

77
use std::marker::PhantomData;
88

0 commit comments

Comments
 (0)