Skip to content

Commit c6e946d

Browse files
committed
Change wording
1 parent 4284bca commit c6e946d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

compiler/rustc_ast_lowering/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ast_lowering_abi_specified_multiple_times =
55
66
ast_lowering_arbitrary_expression_in_pattern =
77
arbitrary expressions aren't allowed in patterns
8-
.pattern_from_macro_note = the :expr fragment specifier forces the metavariable's content to be an expression
8+
.pattern_from_macro_note = the `expr` fragment specifier forces the metavariable's content to be an expression
99
1010
ast_lowering_argument = argument
1111

tests/ui/issues/issue-43250.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ error: arbitrary expressions aren't allowed in patterns
44
LL | m!(y);
55
| ^
66
|
7-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
7+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
88

99
error: arbitrary expressions aren't allowed in patterns
1010
--> $DIR/issue-43250.rs:11:8
1111
|
1212
LL | m!(C);
1313
| ^
1414
|
15-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
15+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
1616

1717
error: aborting due to 2 previous errors
1818

tests/ui/lowering/expr-in-pat-issue-99380.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: arbitrary expressions aren't allowed in patterns
44
LL | foo!(Some(3));
55
| ^^^^^^^
66
|
7-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
7+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
88

99
error: aborting due to 1 previous error
1010

tests/ui/macros/vec-macro-in-pattern.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: arbitrary expressions aren't allowed in patterns
44
LL | Some(vec![43]) => {}
55
| ^^^^^^^^
66
|
7-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
7+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
88
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
99

1010
error: aborting due to 1 previous error

tests/ui/match/expr_before_ident_pat.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error: arbitrary expressions aren't allowed in patterns
1010
LL | funny!(a, a);
1111
| ^
1212
|
13-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
13+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
1414

1515
error: aborting due to 2 previous errors
1616

tests/ui/pattern/issue-92074-macro-ice.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | () => { force_expr!(Vec::new()) }
77
LL | assert!(matches!(x, En::A(make_vec!())));
88
| ----------- in this macro invocation
99
|
10-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
10+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
1111
= note: this error originates in the macro `make_vec` (in Nightly builds, run with -Z macro-backtrace for more info)
1212

1313
error: arbitrary expressions aren't allowed in patterns
@@ -19,7 +19,7 @@ LL | () => { force_pat!(get_usize(), get_usize()) }
1919
LL | assert!(matches!(5, make_pat!()));
2020
| ----------- in this macro invocation
2121
|
22-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
22+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
2323
= note: this error originates in the macro `make_pat` (in Nightly builds, run with -Z macro-backtrace for more info)
2424

2525
error: arbitrary expressions aren't allowed in patterns
@@ -31,7 +31,7 @@ LL | () => { force_pat!(get_usize(), get_usize()) }
3131
LL | assert!(matches!(5, make_pat!()));
3232
| ----------- in this macro invocation
3333
|
34-
= note: the :expr fragment specifier forces the metavariable's content to be an expression
34+
= note: the `expr` fragment specifier forces the metavariable's content to be an expression
3535
= note: this error originates in the macro `make_pat` (in Nightly builds, run with -Z macro-backtrace for more info)
3636

3737
error: aborting due to 3 previous errors

0 commit comments

Comments
 (0)