Skip to content

Commit e8612fd

Browse files
authored
Rollup merge of #108484 - Nilstrieb:˂DiagnosticItem˂FromFn˃ as From˂˂LangItemFromFn˃˃˃꞉꞉from, r=cjgillot
Remove `from` lang item It was probably a leftover from the old `?` desugaring but anyways, it's unused now except for clippy, which can just use a diagnostics item.
2 parents 43915a1 + 3084161 commit e8612fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/convert/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ pub trait Into<T>: Sized {
542542
#[const_trait]
543543
pub trait From<T>: Sized {
544544
/// Converts to this type from the input type.
545-
#[lang = "from"]
545+
#[rustc_diagnostic_item = "from_fn"]
546546
#[must_use]
547547
#[stable(feature = "rust1", since = "1.0.0")]
548548
fn from(value: T) -> Self;

0 commit comments

Comments
 (0)