mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 20:31:59 +00:00
Auto merge of #118817 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer` r? `@ghost`
This commit is contained in:
commit
be035e80e8
263 changed files with 9788 additions and 6258 deletions
|
|
@ -17,10 +17,11 @@ always-assert = { version = "0.1.2", features = ["log"] }
|
|||
jod-thread = "0.1.2"
|
||||
libc.workspace = true
|
||||
crossbeam-channel = "0.5.5"
|
||||
itertools.workspace = true
|
||||
# Think twice before adding anything here
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
miow = "0.5.0"
|
||||
miow = "0.6.0"
|
||||
winapi = { version = "0.3.9", features = ["winerror"] }
|
||||
|
||||
[features]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//! Missing batteries for standard libraries.
|
||||
|
||||
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use std::io as sio;
|
||||
use std::process::Command;
|
||||
|
|
@ -15,6 +15,7 @@ pub mod thread;
|
|||
pub mod anymap;
|
||||
|
||||
pub use always_assert::{always, never};
|
||||
pub use itertools;
|
||||
|
||||
#[inline(always)]
|
||||
pub fn is_ci() -> bool {
|
||||
|
|
@ -40,6 +41,24 @@ Uncomment `default = [ "backtrace" ]` in `crates/stdx/Cargo.toml`.
|
|||
);
|
||||
}
|
||||
|
||||
pub trait TupleExt {
|
||||
type Head;
|
||||
type Tail;
|
||||
fn head(self) -> Self::Head;
|
||||
fn tail(self) -> Self::Tail;
|
||||
}
|
||||
|
||||
impl<T, U> TupleExt for (T, U) {
|
||||
type Head = T;
|
||||
type Tail = U;
|
||||
fn head(self) -> Self::Head {
|
||||
self.0
|
||||
}
|
||||
fn tail(self) -> Self::Tail {
|
||||
self.1
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_lower_snake_case(s: &str) -> String {
|
||||
to_snake_case(s, char::to_lowercase)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue