diff options
| author | bors <bors@rust-lang.org> | 2024-12-31 05:51:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-31 05:51:35 +0000 |
| commit | 41b579660c0af700d42abe5b71856098db007783 (patch) | |
| tree | d11ccdd310eb80a02ab5e6933828dc3a21da8534 /compiler/rustc_errors/src | |
| parent | 80f5a81df9bdb6e11595b0ac8c0bc843786d926b (diff) | |
| parent | 2491edab30e58ef37563b9edec50a74fd01bf787 (diff) | |
| download | rust-41b579660c0af700d42abe5b71856098db007783.tar.gz rust-41b579660c0af700d42abe5b71856098db007783.zip | |
Auto merge of #134952 - Zalathar:rollup-i6g97md, r=Zalathar
Rollup of 8 pull requests Successful merges: - #134919 (bootstrap: Make `./x test compiler` actually run the compiler unit tests) - #134927 (Make slice::as_flattened_mut unstably const) - #134930 (ptr docs: make it clear that we are talking only about memory accesses) - #134932 (explicitly set float ABI for all ARM targets) - #134933 (Make sure we check the future type is `Sized` in `AsyncFn*`) - #134934 (Fix typos) - #134941 (compiler: Add a statement-of-intent to `rustc_abi`) - #134949 (Convert some `Into` impls into `From` impls) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 05b9cbfbc06..afce877547f 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -156,9 +156,9 @@ impl IntoDiagArg for DiagArgValue { } } -impl Into<FluentValue<'static>> for DiagArgValue { - fn into(self) -> FluentValue<'static> { - match self { +impl From<DiagArgValue> for FluentValue<'static> { + fn from(val: DiagArgValue) -> Self { + match val { DiagArgValue::Str(s) => From::from(s), DiagArgValue::Number(n) => From::from(n), DiagArgValue::StrListSepByAnd(l) => fluent_value_from_str_list_sep_by_and(l), |
