Skip to content

Commit 8d88452

Browse files
committed
Fix spurious test change
1 parent 6004916 commit 8d88452

File tree

7 files changed

+21
-16
lines changed

7 files changed

+21
-16
lines changed

tests/ui/const-generics/adt_const_params/suggest_feature_only_when_possible.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
// Can never be used as const generics.
66
fn uwu_0<const N: &'static mut ()>() {}
77
//~^ ERROR: forbidden as the type of a const generic
8+
//~| HELP: add `#![feature(adt_const_params)]`
9+
//~| HELP: add `#![feature(adt_const_params)]`
10+
//~| HELP: add `#![feature(adt_const_params)]`
11+
//~| HELP: add `#![feature(unsized_const_params)]`
12+
//~| HELP: add `#![feature(unsized_const_params)]`
813

914
// Needs the feature but can be used, so suggest adding the feature.
1015
fn owo_0<const N: &'static u32>() {}

tests/ui/const-generics/adt_const_params/suggest_feature_only_when_possible.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn uwu_0<const N: &'static mut ()>() {}
77
= note: the only supported types are integers, `bool`, and `char`
88

99
error: `&'static u32` is forbidden as the type of a const generic parameter
10-
--> $DIR/suggest_feature_only_when_possible.rs:10:19
10+
--> $DIR/suggest_feature_only_when_possible.rs:15:19
1111
|
1212
LL | fn owo_0<const N: &'static u32>() {}
1313
| ^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL + #![feature(unsized_const_params)]
2323
|
2424

2525
error: `Meow` is forbidden as the type of a const generic parameter
26-
--> $DIR/suggest_feature_only_when_possible.rs:18:20
26+
--> $DIR/suggest_feature_only_when_possible.rs:23:20
2727
|
2828
LL | fn meow_0<const N: Meow>() {}
2929
| ^^^^
@@ -35,7 +35,7 @@ LL + #![feature(adt_const_params)]
3535
|
3636

3737
error: `&'static Meow` is forbidden as the type of a const generic parameter
38-
--> $DIR/suggest_feature_only_when_possible.rs:20:20
38+
--> $DIR/suggest_feature_only_when_possible.rs:25:20
3939
|
4040
LL | fn meow_1<const N: &'static Meow>() {}
4141
| ^^^^^^^^^^^^^
@@ -51,39 +51,39 @@ LL + #![feature(unsized_const_params)]
5151
|
5252

5353
error: `[Meow; 100]` is forbidden as the type of a const generic parameter
54-
--> $DIR/suggest_feature_only_when_possible.rs:22:20
54+
--> $DIR/suggest_feature_only_when_possible.rs:27:20
5555
|
5656
LL | fn meow_2<const N: [Meow; 100]>() {}
5757
| ^^^^^^^^^^^
5858
|
5959
= note: the only supported types are integers, `bool`, and `char`
6060

6161
error: `(Meow, u8)` is forbidden as the type of a const generic parameter
62-
--> $DIR/suggest_feature_only_when_possible.rs:24:20
62+
--> $DIR/suggest_feature_only_when_possible.rs:29:20
6363
|
6464
LL | fn meow_3<const N: (Meow, u8)>() {}
6565
| ^^^^^^^^^^
6666
|
6767
= note: the only supported types are integers, `bool`, and `char`
6868

6969
error: `(Meow, String)` is forbidden as the type of a const generic parameter
70-
--> $DIR/suggest_feature_only_when_possible.rs:29:20
70+
--> $DIR/suggest_feature_only_when_possible.rs:34:20
7171
|
7272
LL | fn meow_4<const N: (Meow, String)>() {}
7373
| ^^^^^^^^^^^^^^
7474
|
7575
= note: the only supported types are integers, `bool`, and `char`
7676

7777
error: `String` is forbidden as the type of a const generic parameter
78-
--> $DIR/suggest_feature_only_when_possible.rs:33:19
78+
--> $DIR/suggest_feature_only_when_possible.rs:38:19
7979
|
8080
LL | fn nya_0<const N: String>() {}
8181
| ^^^^^^
8282
|
8383
= note: the only supported types are integers, `bool`, and `char`
8484

8585
error: `Vec<u32>` is forbidden as the type of a const generic parameter
86-
--> $DIR/suggest_feature_only_when_possible.rs:35:19
86+
--> $DIR/suggest_feature_only_when_possible.rs:40:19
8787
|
8888
LL | fn nya_1<const N: Vec<u32>>() {}
8989
| ^^^^^^^^

tests/ui/const-generics/defaults/concrete-const-param-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
22
//~^ WARN the feature `generic_const_parameter_types` is incomplete
3-
//~^^ WARN the feature `unsized_const_params` is incomplete
3+
//~| WARN the feature `unsized_const_params` is incomplete
44
// Make sure that we test the const param type of default const parameters
55
// if both the type of the default and the type of the parameter are concrete.
66

tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//@ check-pass
22

33
#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
4-
//~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
5-
//~^^ WARN the feature `unsized_const_params` is incomplete
4+
//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
5+
//~^^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
66

77
pub struct Changes<const CHANGES: &'static [&'static str]>
88
where

tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//@ check-pass
22

33
#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
4-
//~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
5-
//~^^ WARN the feature `unsized_const_params` is incomplete
4+
//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
5+
//~^^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
66

77
pub struct Changes<const CHANGES: &'static [&'static str]>
88
where

tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Ensure that we actually treat `N`'s type as `&'a u32` in MIR typeck.
22

33
#![feature(unsized_const_params, adt_const_params, generic_const_parameter_types)]
4-
//~^ WARN the feature `generic_const_parameter_types` is incomplete
5-
//~^^ WARN the feature `unsized_const_params` is incomplete
4+
//~^ WARN the feature `unsized_const_params` is incomplete
5+
//~| WARN the feature `generic_const_parameter_types` is incomplete
66

77
fn foo<'a, const N: &'a u32>() {
88
let b: &'static u32 = N;

tests/ui/consts/refs_check_const_eq-issue-88384.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(fn_traits)]
22
#![feature(adt_const_params, unsized_const_params)]
3-
//~^ WARN the feature `unsized_const_params` is incomplete
3+
//~^ WARNING the feature `unsized_const_params` is incomplete
44

55
#[derive(PartialEq, Eq)]
66
struct CompileTimeSettings {

0 commit comments

Comments
 (0)