-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: extract source files of dependencies #19506
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
base: main
Are you sure you want to change the base?
Conversation
03e78be
to
69eed04
Compare
69eed04
to
e4ee4a9
Compare
if let Some(body) = syntax.parent().and_then(Fn::cast).and_then(|x| x.body()) { | ||
if body.syntax() == syntax { | ||
tracing::debug!("Skipping Fn body"); | ||
return true; | ||
} | ||
} |
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.
this should be equivalent and less nested, right?
if let Some(body) = syntax.parent().and_then(Fn::cast).and_then(|x| x.body()) { | |
if body.syntax() == syntax { | |
tracing::debug!("Skipping Fn body"); | |
return true; | |
} | |
} | |
if syntax.parent().and_then(Fn::cast).and_then(|x| x.body().syntax()) == Some(syntax) { | |
tracing::debug!("Skipping Fn body"); | |
return true; | |
} |
@@ -612,6 +620,31 @@ impl<'a> Translator<'a> { | ||
} | ||
|
||
pub(crate) fn should_be_excluded(&self, item: &impl ast::HasAttrs) -> bool { |
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.
I'm wondering, shouldn't we also skip private things? or is that too hard because of the re-exporting thing?
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.
I think we should, but I first want to make the tests work again before optimising things.
No description provided.