-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialize additional data for procedural macros #63269
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,9 @@ pub use crate::cstore_impl::{provide, provide_extern}; | |
pub type CrateNumMap = IndexVec<CrateNum, CrateNum>; | ||
|
||
pub use rustc_data_structures::sync::MetadataRef; | ||
use crate::creader::Library; | ||
use syntax_pos::Span; | ||
use proc_macro::bridge::client::ProcMacro; | ||
|
||
pub struct MetadataBlob(pub MetadataRef); | ||
|
||
|
@@ -82,11 +85,19 @@ pub struct CrateMetadata { | |
pub dep_kind: Lock<DepKind>, | ||
pub source: CrateSource, | ||
|
||
pub proc_macros: Option<Vec<(ast::Name, Lrc<SyntaxExtension>)>>, | ||
|
||
/// Whether or not this crate should be consider a private dependency | ||
/// for purposes of the 'exported_private_dependencies' lint | ||
pub private_dep: bool | ||
pub private_dep: bool, | ||
|
||
pub host_lib: Option<Library>, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't needed anymore, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No - we need it in |
||
pub span: Span, | ||
|
||
pub raw_proc_macros: Option<&'static [ProcMacro]>, | ||
} | ||
|
||
pub struct FullProcMacro { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe call this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's already a struct called |
||
pub name: ast::Name, | ||
pub ext: Lrc<SyntaxExtension> | ||
} | ||
|
||
pub struct CStore { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
FIRST_FREE_DEF_INDEX
used anywhere else?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - I'll remove it.