You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#160244 - teor2345:extra-splat-renames, r=jieyouxu
Rename splat to rustc_splat in error messages
Tracking issue: rust-lang#153629
This PR renames "splat attribute" to "\`rustc_splat\` attribute" in error messages (and some comments).
It was meant to be part of rust-lang#159817 but I missed it.
The search and replace command I used was:
```sh
fastmod --extensions rs --fixed-strings 'splat attribute' '`rustc_splat` attribute'
```
This doesn't need to be backported, because those error messages only appear on nightly.
Part of rust-lang#159428
Copy file name to clipboardExpand all lines: tests/ui/splat/splat-dyn-asref-tuple-fail.stderr
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
error[E0277]: cannot use splat attribute; the splatted argument type must be a tuple or unit, not a Trait(std::convert::AsRef<std::string::String>)
1
+
error[E0277]: cannot use `rustc_splat` attribute; the splatted argument type must be a tuple or unit, not a Trait(std::convert::AsRef<std::string::String>)
Copy file name to clipboardExpand all lines: tests/ui/splat/splat-maybe-tuple.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
#![feature(splat)]
6
6
#![expect(unused)]
7
7
8
-
fnunbound_generic_arg<T>(#[rustc_splat]t:T){}//~ ERROR cannot use splat attribute; the splatted argument type must be a tuple or unit, not a u32
8
+
fnunbound_generic_arg<T>(#[rustc_splat]t:T){}//~ ERROR cannot use `rustc_splat` attribute; the splatted argument type must be a tuple or unit, not a u32
Copy file name to clipboardExpand all lines: tests/ui/splat/splat-non-tuple.rs
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@
4
4
#![feature(splat)]
5
5
#![expect(unused)]
6
6
7
-
fnprimitive_arg(#[rustc_splat]x:u32){}//~ ERROR cannot use splat attribute; the splatted argument type must be a tuple or unit, not a u32
7
+
fnprimitive_arg(#[rustc_splat]x:u32){}//~ ERROR cannot use `rustc_splat` attribute; the splatted argument type must be a tuple or unit, not a u32
8
8
9
9
enumNotATuple{
10
10
A(u32),
11
11
B(i8),
12
12
}
13
13
14
-
fnenum_arg(#[rustc_splat]y:NotATuple){}//~ ERROR cannot use splat attribute; the splatted argument type must be a tuple or unit, not a NotATuple
14
+
fnenum_arg(#[rustc_splat]y:NotATuple){}//~ ERROR cannot use `rustc_splat` attribute; the splatted argument type must be a tuple or unit, not a NotATuple
15
15
16
16
traitFooTrait{
17
17
fntuple_1(#[rustc_splat] _:(u32,));//~ NOTE type in trait
@@ -22,11 +22,12 @@ trait FooTrait {
22
22
23
23
structFoo;
24
24
25
-
fnstruct_arg(#[rustc_splat]z:Foo){}//~ ERROR cannot use splat attribute; the splatted argument type must be a tuple or unit, not a Foo
25
+
fnstruct_arg(#[rustc_splat]z:Foo){}//~ ERROR cannot use `rustc_splat` attribute; the splatted argument type must be a tuple or unit, not a Foo
26
26
27
27
implFoo{
28
-
// FIXME(splat): ERROR cannot use splat attribute; the splatted argument type must be a tuple
29
28
fntuple_2_self(
29
+
// FIXME(splat): ERROR cannot use `rustc_splat` attribute; the splatted argument type...
// FIXME(splat): ERROR cannot use splat attribute; the splatted argument type must be a tuple
45
45
fntuple_4(
46
+
// FIXME(splat): ERROR cannot use `rustc_splat` attribute; the splatted argument type...
47
+
// must be a tuple
46
48
#[rustc_splat]self,
47
49
_:(u32,i8,(),f32),
48
50
){
@@ -51,11 +53,12 @@ impl FooTrait for Foo {
51
53
52
54
structTupleStruct(u32,i8);
53
55
54
-
fntuple_struct_arg(#[rustc_splat]z:TupleStruct){}//~ ERROR cannot use splat attribute; the splatted argument type must be a tuple or unit, not a TupleStruct
56
+
fntuple_struct_arg(#[rustc_splat]z:TupleStruct){}//~ ERROR cannot use `rustc_splat` attribute; the splatted argument type must be a tuple or unit, not a TupleStruct
55
57
56
58
implTupleStruct{
57
-
// FIXME(splat): ERROR cannot use splat attribute; the splatted argument type must be a tuple
58
59
fntuple_2(
60
+
// FIXME(splat): ERROR cannot use `rustc_splat` attribute; the splatted argument type...
61
+
// must be a tuple
59
62
#[rustc_splat]self,
60
63
(a, b):(f32,f64),
61
64
) -> f32{
@@ -66,8 +69,9 @@ impl TupleStruct {
66
69
implFooTraitforTupleStruct{
67
70
fntuple_1(#[rustc_splat] _:(u32,)){}
68
71
69
-
// FIXME(splat): ERROR cannot use splat attribute; the splatted argument type must be a tuple
70
72
fntuple_4(
73
+
// FIXME(splat): ERROR cannot use `rustc_splat` attribute; the splatted argument type...
0 commit comments