Skip to content

Commit fd8b150

Browse files
committed
feature(const_generics) -> feature(const_param_types)
1 parent 0b526fd commit fd8b150

File tree

6 files changed

+11
-19
lines changed

6 files changed

+11
-19
lines changed

tests/ui/crashes/ice-4775.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![feature(const_generics)]
2-
#![allow(incomplete_features)]
3-
41
pub struct ArrayWrapper<const N: usize>([usize; N]);
52

63
impl<const N: usize> ArrayWrapper<{ N }> {

tests/ui/crashes/ice-5223.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
// Regression test for #5233
2-
3-
#![feature(const_generics)]
4-
#![allow(incomplete_features)]
52
#![warn(clippy::indexing_slicing, clippy::iter_cloned_collect)]
63

74
pub struct KotomineArray<T, const N: usize> {

tests/ui/doc/doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
#![allow(dead_code, incomplete_features)]
44
#![warn(clippy::doc_markdown)]
5-
#![feature(custom_inner_attributes, const_generics, generic_const_exprs, const_option)]
5+
#![feature(custom_inner_attributes, generic_const_exprs, const_option)]
66
#![rustfmt::skip]
77

88
/// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)

tests/ui/missing_const_for_fn/cant_be_const.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// aux-build:helper.rs
66

77
#![warn(clippy::missing_const_for_fn)]
8-
#![allow(incomplete_features)]
9-
#![feature(start, const_generics)]
8+
#![feature(start)]
109
#![feature(custom_inner_attributes)]
1110

1211
extern crate helper;

tests/ui/missing_const_for_fn/could_be_const.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![warn(clippy::missing_const_for_fn)]
22
#![allow(incomplete_features, clippy::let_and_return)]
3-
#![feature(const_generics)]
43
#![feature(custom_inner_attributes)]
54

65
use std::mem::transmute;

tests/ui/missing_const_for_fn/could_be_const.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this could be a `const fn`
2-
--> $DIR/could_be_const.rs:14:5
2+
--> $DIR/could_be_const.rs:13:5
33
|
44
LL | / pub fn new() -> Self {
55
LL | | Self { guess: 42 }
@@ -9,23 +9,23 @@ LL | | }
99
= note: `-D clippy::missing-const-for-fn` implied by `-D warnings`
1010

1111
error: this could be a `const fn`
12-
--> $DIR/could_be_const.rs:18:5
12+
--> $DIR/could_be_const.rs:17:5
1313
|
1414
LL | / fn const_generic_params<'a, T, const N: usize>(&self, b: &'a [T; N]) -> &'a [T; N] {
1515
LL | | b
1616
LL | | }
1717
| |_____^
1818

1919
error: this could be a `const fn`
20-
--> $DIR/could_be_const.rs:24:1
20+
--> $DIR/could_be_const.rs:23:1
2121
|
2222
LL | / fn one() -> i32 {
2323
LL | | 1
2424
LL | | }
2525
| |_^
2626

2727
error: this could be a `const fn`
28-
--> $DIR/could_be_const.rs:29:1
28+
--> $DIR/could_be_const.rs:28:1
2929
|
3030
LL | / fn two() -> i32 {
3131
LL | | let abc = 2;
@@ -34,39 +34,39 @@ LL | | }
3434
| |_^
3535

3636
error: this could be a `const fn`
37-
--> $DIR/could_be_const.rs:35:1
37+
--> $DIR/could_be_const.rs:34:1
3838
|
3939
LL | / fn string() -> String {
4040
LL | | String::new()
4141
LL | | }
4242
| |_^
4343

4444
error: this could be a `const fn`
45-
--> $DIR/could_be_const.rs:40:1
45+
--> $DIR/could_be_const.rs:39:1
4646
|
4747
LL | / unsafe fn four() -> i32 {
4848
LL | | 4
4949
LL | | }
5050
| |_^
5151

5252
error: this could be a `const fn`
53-
--> $DIR/could_be_const.rs:45:1
53+
--> $DIR/could_be_const.rs:44:1
5454
|
5555
LL | / fn generic<T>(t: T) -> T {
5656
LL | | t
5757
LL | | }
5858
| |_^
5959

6060
error: this could be a `const fn`
61-
--> $DIR/could_be_const.rs:68:9
61+
--> $DIR/could_be_const.rs:67:9
6262
|
6363
LL | / pub fn b(self, a: &A) -> B {
6464
LL | | B
6565
LL | | }
6666
| |_________^
6767

6868
error: this could be a `const fn`
69-
--> $DIR/could_be_const.rs:78:5
69+
--> $DIR/could_be_const.rs:77:5
7070
|
7171
LL | / fn const_fn_stabilized_before_msrv(byte: u8) {
7272
LL | | byte.is_ascii_digit();

0 commit comments

Comments
 (0)