mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Auto merge of #16469 - Young-Flash:ci_typos, r=lnicola
internal: add typos check CI (part 2) follow up https://github.com/rust-lang/rust-analyzer/pull/16448
This commit is contained in:
commit
8f6a72871e
22 changed files with 450 additions and 208 deletions
|
@ -106,9 +106,9 @@ fn read_section<'a>(dylib_binary: &'a [u8], section_name: &str) -> io::Result<&'
|
|||
/// <https://github.com/rust-lang/rust-analyzer/issues/6174>
|
||||
pub fn read_version(dylib_path: &AbsPath) -> io::Result<String> {
|
||||
let dylib_file = File::open(dylib_path)?;
|
||||
let dylib_mmaped = unsafe { Mmap::map(&dylib_file) }?;
|
||||
let dylib_mmapped = unsafe { Mmap::map(&dylib_file) }?;
|
||||
|
||||
let dot_rustc = read_section(&dylib_mmaped, ".rustc")?;
|
||||
let dot_rustc = read_section(&dylib_mmapped, ".rustc")?;
|
||||
|
||||
// check if magic is valid
|
||||
if &dot_rustc[0..4] != b"rust" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue