Skip to content

Commit ae12434

Browse files
Rollup merge of rust-lang#151328 - diag-case, r=Urgau
Fix capitalization of diag messages Per https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-output-style-guide > Error, Warning, Note, and Help messages start with a lowercase letter and do not end with punctuation.
2 parents 0a3cd3b + f5a1fc7 commit ae12434

34 files changed

Lines changed: 166 additions & 166 deletions

compiler/rustc_attr_parsing/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ attr_parsing_unstable_cfg_target_compact =
230230
compact `cfg(target(..))` is experimental and subject to change
231231
232232
attr_parsing_unstable_feature_bound_incompatible_stability = item annotated with `#[unstable_feature_bound]` should not be stable
233-
.help = If this item is meant to be stable, do not use any functions annotated with `#[unstable_feature_bound]`. Otherwise, mark this item as unstable with `#[unstable]`
233+
.help = if this item is meant to be stable, do not use any functions annotated with `#[unstable_feature_bound]`. Otherwise, mark this item as unstable with `#[unstable]`
234234
235235
attr_parsing_unsupported_instruction_set = target `{$current_target}` does not support `#[instruction_set({$instruction_set}::*)]`
236236

compiler/rustc_const_eval/messages.ftl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ const_eval_incompatible_return_types =
140140
const_eval_interior_mutable_borrow_escaping =
141141
interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
142142
.label = this borrow of an interior mutable value refers to such a temporary
143-
.note = Temporaries in constants and statics can have their lifetime extended until the end of the program
144-
.note2 = To avoid accidentally creating global mutable state, such temporaries must be immutable
145-
.help = If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
143+
.note = temporaries in constants and statics can have their lifetime extended until the end of the program
144+
.note2 = to avoid accidentally creating global mutable state, such temporaries must be immutable
145+
.help = if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
146146
147147
const_eval_intern_kind = {$kind ->
148148
[static] static
@@ -225,9 +225,9 @@ const_eval_modified_global =
225225
const_eval_mutable_borrow_escaping =
226226
mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
227227
.label = this mutable borrow refers to such a temporary
228-
.note = Temporaries in constants and statics can have their lifetime extended until the end of the program
229-
.note2 = To avoid accidentally creating global mutable state, such temporaries must be immutable
230-
.help = If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
228+
.note = temporaries in constants and statics can have their lifetime extended until the end of the program
229+
.note2 = to avoid accidentally creating global mutable state, such temporaries must be immutable
230+
.help = if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
231231
232232
const_eval_mutable_ptr_in_final = encountered mutable pointer in final value of {const_eval_intern_kind}
233233

compiler/rustc_lint/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ lint_invalid_style = {$is_used_as_inner ->
542542
[false] crate-level attribute should be an inner attribute: add an exclamation mark: `#![{$name}]`
543543
*[other] the `#![{$name}]` attribute can only be used at the crate root
544544
}
545-
.note = This attribute does not have an `!`, which means it is applied to this {$target}
545+
.note = this attribute does not have an `!`, which means it is applied to this {$target}
546546
547547
lint_invalid_target = `#[{$name}]` attribute cannot be used on {$target}
548548
.warn = {-lint_previously_accepted}

compiler/rustc_monomorphize/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ monomorphize_encountered_error_while_instantiating_global_asm =
6262
monomorphize_large_assignments =
6363
moving {$size} bytes
6464
.label = value moved from here
65-
.note = The current maximum size is {$limit}, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]`
65+
.note = the current maximum size is {$limit}, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]`
6666
6767
monomorphize_no_optimized_mir =
6868
missing optimized MIR for `{$instance}` in the crate `{$crate_name}`

compiler/rustc_passes/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ passes_no_main_function =
376376
}
377377
.consider_adding_main_to_file = consider adding a `main` function to `{$filename}`
378378
.consider_adding_main_at_crate = consider adding a `main` function at the crate level
379-
.teach_note = If you don't know the basics of Rust, you can go look to the Rust Book to get started: https://doc.rust-lang.org/book/
379+
.teach_note = if you don't know the basics of Rust, you can go look to the Rust Book to get started: https://doc.rust-lang.org/book/
380380
.non_function_main = non-function item at `crate::main` is found
381381
382382
passes_non_exhaustive_with_default_field_values =

tests/ui/attributes/crate-only-as-outer.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: crate-level attribute should be an inner attribute: add an exclamation ma
44
LL | #[crate_name = "owo"]
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
7-
note: This attribute does not have an `!`, which means it is applied to this function
7+
note: this attribute does not have an `!`, which means it is applied to this function
88
--> $DIR/crate-only-as-outer.rs:5:1
99
|
1010
LL | fn main() {}

tests/ui/attributes/malformed-attrs.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
771771
LL | #[crate_name]
772772
| ^^^^^^^^^^^^^
773773
|
774-
note: This attribute does not have an `!`, which means it is applied to this function
774+
note: this attribute does not have an `!`, which means it is applied to this function
775775
--> $DIR/malformed-attrs.rs:116:1
776776
|
777777
LL | / fn test() {

tests/ui/attributes/malformed-no-std.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ error: crate-level attribute should be an inner attribute: add an exclamation ma
5858
LL | #[no_std]
5959
| ^^^^^^^^^
6060
|
61-
note: This attribute does not have an `!`, which means it is applied to this extern crate
61+
note: this attribute does not have an `!`, which means it is applied to this extern crate
6262
--> $DIR/malformed-no-std.rs:26:1
6363
|
6464
LL | extern crate core;
@@ -75,7 +75,7 @@ error: crate-level attribute should be an inner attribute: add an exclamation ma
7575
LL | #[no_core]
7676
| ^^^^^^^^^^
7777
|
78-
note: This attribute does not have an `!`, which means it is applied to this extern crate
78+
note: this attribute does not have an `!`, which means it is applied to this extern crate
7979
--> $DIR/malformed-no-std.rs:26:1
8080
|
8181
LL | extern crate core;

tests/ui/consts/const-mut-refs/issue-76510.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ error[E0764]: mutable borrows of temporaries that have their lifetime extended u
44
LL | const S: &'static mut str = &mut " hello ";
55
| ^^^^^^^^^^^^^^ this mutable borrow refers to such a temporary
66
|
7-
= note: Temporaries in constants and statics can have their lifetime extended until the end of the program
8-
= note: To avoid accidentally creating global mutable state, such temporaries must be immutable
9-
= help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
7+
= note: temporaries in constants and statics can have their lifetime extended until the end of the program
8+
= note: to avoid accidentally creating global mutable state, such temporaries must be immutable
9+
= help: if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
1010

1111
error: aborting due to 1 previous error
1212

tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ error[E0764]: mutable borrows of temporaries that have their lifetime extended u
44
LL | const B: *mut i32 = &mut 4;
55
| ^^^^^^ this mutable borrow refers to such a temporary
66
|
7-
= note: Temporaries in constants and statics can have their lifetime extended until the end of the program
8-
= note: To avoid accidentally creating global mutable state, such temporaries must be immutable
9-
= help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
7+
= note: temporaries in constants and statics can have their lifetime extended until the end of the program
8+
= note: to avoid accidentally creating global mutable state, such temporaries must be immutable
9+
= help: if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
1010

1111
error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
1212
--> $DIR/mut_ref_in_final.rs:21:35
1313
|
1414
LL | const B3: Option<&mut i32> = Some(&mut 42);
1515
| ^^^^^^^ this mutable borrow refers to such a temporary
1616
|
17-
= note: Temporaries in constants and statics can have their lifetime extended until the end of the program
18-
= note: To avoid accidentally creating global mutable state, such temporaries must be immutable
19-
= help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
17+
= note: temporaries in constants and statics can have their lifetime extended until the end of the program
18+
= note: to avoid accidentally creating global mutable state, such temporaries must be immutable
19+
= help: if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
2020

2121
error[E0716]: temporary value dropped while borrowed
2222
--> $DIR/mut_ref_in_final.rs:24:42
@@ -86,39 +86,39 @@ error[E0764]: mutable borrows of temporaries that have their lifetime extended u
8686
LL | static RAW_MUT_CAST_S: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
8787
| ^^^^^^^ this mutable borrow refers to such a temporary
8888
|
89-
= note: Temporaries in constants and statics can have their lifetime extended until the end of the program
90-
= note: To avoid accidentally creating global mutable state, such temporaries must be immutable
91-
= help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
89+
= note: temporaries in constants and statics can have their lifetime extended until the end of the program
90+
= note: to avoid accidentally creating global mutable state, such temporaries must be immutable
91+
= help: if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
9292

9393
error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
9494
--> $DIR/mut_ref_in_final.rs:73:54
9595
|
9696
LL | static RAW_MUT_COERCE_S: SyncPtr<i32> = SyncPtr { x: &mut 0 };
9797
| ^^^^^^ this mutable borrow refers to such a temporary
9898
|
99-
= note: Temporaries in constants and statics can have their lifetime extended until the end of the program
100-
= note: To avoid accidentally creating global mutable state, such temporaries must be immutable
101-
= help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
99+
= note: temporaries in constants and statics can have their lifetime extended until the end of the program
100+
= note: to avoid accidentally creating global mutable state, such temporaries must be immutable
101+
= help: if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
102102

103103
error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
104104
--> $DIR/mut_ref_in_final.rs:75:52
105105
|
106106
LL | const RAW_MUT_CAST_C: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
107107
| ^^^^^^^ this mutable borrow refers to such a temporary
108108
|
109-
= note: Temporaries in constants and statics can have their lifetime extended until the end of the program
110-
= note: To avoid accidentally creating global mutable state, such temporaries must be immutable
111-
= help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
109+
= note: temporaries in constants and statics can have their lifetime extended until the end of the program
110+
= note: to avoid accidentally creating global mutable state, such temporaries must be immutable
111+
= help: if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
112112

113113
error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
114114
--> $DIR/mut_ref_in_final.rs:77:53
115115
|
116116
LL | const RAW_MUT_COERCE_C: SyncPtr<i32> = SyncPtr { x: &mut 0 };
117117
| ^^^^^^ this mutable borrow refers to such a temporary
118118
|
119-
= note: Temporaries in constants and statics can have their lifetime extended until the end of the program
120-
= note: To avoid accidentally creating global mutable state, such temporaries must be immutable
121-
= help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
119+
= note: temporaries in constants and statics can have their lifetime extended until the end of the program
120+
= note: to avoid accidentally creating global mutable state, such temporaries must be immutable
121+
= help: if you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
122122

123123
error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (0x2a[noalloc] has no provenance)
124124
--> $DIR/mut_ref_in_final.rs:86:5

0 commit comments

Comments
 (0)