1
Fork 0

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.
This commit is contained in:
Matthias Krüger 2023-02-26 12:05:01 +01:00 committed by GitHub
commit 9c27fc7d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 8 deletions

View file

@ -542,7 +542,7 @@ pub trait Into<T>: Sized {
#[const_trait]
pub trait From<T>: Sized {
/// Converts to this type from the input type.
#[lang = "from"]
#[rustc_diagnostic_item = "from_fn"]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
fn from(value: T) -> Self;