mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-30 07:07:32 +00:00
Add test for proc-macro meta info retrieval
This commit is contained in:
parent
5f6d71cf0c
commit
a8c9c88292
4 changed files with 17 additions and 8 deletions
|
@ -11,14 +11,15 @@ use object::read::{File as BinaryFile, Object, ObjectSection};
|
|||
use snap::read::FrameDecoder as SnapDecoder;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct RustCInfo {
|
||||
pub(crate) version: (usize, usize, usize),
|
||||
pub(crate) channel: String,
|
||||
pub(crate) commit: String,
|
||||
pub(crate) date: String,
|
||||
pub struct RustCInfo {
|
||||
pub version: (usize, usize, usize),
|
||||
pub channel: String,
|
||||
pub commit: String,
|
||||
pub date: String,
|
||||
}
|
||||
|
||||
pub(crate) fn read_info(dylib_path: &Path) -> io::Result<RustCInfo> {
|
||||
/// Read rustc dylib information
|
||||
pub fn read_dylib_info(dylib_path: &Path) -> io::Result<RustCInfo> {
|
||||
macro_rules! err {
|
||||
($e:literal) => {
|
||||
io::Error::new(io::ErrorKind::InvalidData, $e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue