mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Use lang item resolution instead of known paths
This commit is contained in:
parent
1535881836
commit
f8ed4d7ae4
6 changed files with 66 additions and 180 deletions
|
@ -28,6 +28,7 @@
|
|||
//! generator: pin
|
||||
//! hash:
|
||||
//! index: sized
|
||||
//! infallible:
|
||||
//! iterator: option
|
||||
//! iterators: iterator, fn
|
||||
//! non_zero:
|
||||
|
@ -40,7 +41,7 @@
|
|||
//! sized:
|
||||
//! slice:
|
||||
//! sync: sized
|
||||
//! try:
|
||||
//! try: infallible
|
||||
//! unsize: sized
|
||||
|
||||
pub mod marker {
|
||||
|
@ -172,6 +173,9 @@ pub mod convert {
|
|||
fn as_ref(&self) -> &T;
|
||||
}
|
||||
// endregion:as_ref
|
||||
// region:infallible
|
||||
pub enum Infallibe {}
|
||||
// endregion:infallible
|
||||
}
|
||||
|
||||
pub mod ops {
|
||||
|
@ -352,7 +356,7 @@ pub mod ops {
|
|||
#[lang = "from_residual"]
|
||||
fn from_residual(residual: R) -> Self;
|
||||
}
|
||||
#[lang = "try"]
|
||||
#[lang = "Try"]
|
||||
pub trait Try: FromResidual<Self::Residual> {
|
||||
type Output;
|
||||
type Residual;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue