Skip to content

Extended save-analysis to support generated code #31097

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

Merged
merged 1 commit into from
Jan 25, 2016

Conversation

DanielJCampbell
Copy link
Contributor

Also altered the format_args! syntax extension, and #[derive(debug)], to maintain compatability.
r? @ nrc

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@DanielJCampbell
Copy link
Contributor Author

@nrc Heads up

@nrc nrc assigned nrc and unassigned brson Jan 21, 2016
@@ -909,6 +914,20 @@ impl CodeMap {
output
}

pub fn root_callsite(&self, sp: Span) -> Span {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to source_callsite and add a comment

@nrc
Copy link
Member

nrc commented Jan 22, 2016

Could you add some test stuff to the DXR test please?

mod_data.scope,
&mod_data.filename);
if let Some(mod_data) = self.save_ctxt.get_item_data(item) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove blank line

@nrc
Copy link
Member

nrc commented Jan 22, 2016

Looks good, needs a few style nits addressing and some minor refactoring, then r+

@nrc
Copy link
Member

nrc commented Jan 22, 2016

and a tidy error to fix

@DanielJCampbell
Copy link
Contributor Author

Applied nits, it should be good to go now, if the linter allows it. Only added a few tests - deriving everything, various forms of printing, and some macros inside a macro_use module.

@nrc
Copy link
Member

nrc commented Jan 22, 2016

@DanielJCampbell you can quickly check the formatting with make tidy

if enum_data.is_none() {
return;
}
let enum_data = enum_data.unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer let enum_data = match enum_data ... instead of if then unwrap

@nrc
Copy link
Member

nrc commented Jan 22, 2016

Nice, r+ with the last couple of nits tidied up.

… in format_args! and derive to maintain compatability
@DanielJCampbell
Copy link
Contributor Author

Seems good now

@nrc
Copy link
Member

nrc commented Jan 25, 2016

@bors: r+

@bors
Copy link
Collaborator

bors commented Jan 25, 2016

📌 Commit 616bfb6 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Jan 25, 2016

⌛ Testing commit 616bfb6 with merge eceb96b...

bors added a commit that referenced this pull request Jan 25, 2016
Also altered the format_args! syntax extension, and \#[derive(debug)], to maintain compatability.
r? @ nrc
@bors bors merged commit 616bfb6 into rust-lang:master Jan 25, 2016
@DanielJCampbell DanielJCampbell deleted the SaveAnalysis branch January 26, 2016 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants