Skip to content
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

Pass attributes to hir::TyParam #49242

Merged
merged 2 commits into from
Mar 22, 2018
Merged

Conversation

mrowqa
Copy link
Contributor

@mrowqa mrowqa commented Mar 21, 2018

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 21, 2018
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

I can't think of a way to test this, so I'm just going to approve it.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Mar 21, 2018

Note travis errors

@@ -809,7 +809,7 @@ impl<'a> LoweringContext<'a> {
}
}

fn lower_attrs(&mut self, attrs: &Vec<Attribute>) -> hir::HirVec<Attribute> {
fn lower_attrs(&mut self, attrs: &[Attribute]) -> hir::HirVec<Attribute> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cause tp.attrs below is ThinVec.

@@ -1019,6 +1019,7 @@ impl<'a> LoweringContext<'a> {
span,
pure_wrt_drop: false,
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
attrs: P::new(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what I should put here.

@petrochenkov
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 22, 2018

📌 Commit 99b49b5 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 22, 2018
@@ -203,7 +203,8 @@ impl_stable_hash_for!(struct hir::TyParam {
default,
span,
pure_wrt_drop,
synthetic
synthetic,
attrs
Copy link
Member

Choose a reason for hiding this comment

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

Please add trailing comma

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is inside macro which requires no trailing comma. Otherwise it fails to compile with:

error: no rules expected the token `}`
   --> librustc\ich\impls_hir.rs:208:1
    |
208 | });
    | ^

error: aborting due to previous error

error: Could not compile `rustc`.

You can look around this place in code - other calls to this macro don't have trailing commas.

Copy link
Member

Choose a reason for hiding this comment

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

Didnt notice it was in a macro.

kennytm added a commit to kennytm/rust that referenced this pull request Mar 22, 2018
bors added a commit that referenced this pull request Mar 22, 2018
@alexcrichton alexcrichton merged commit 99b49b5 into rust-lang:master Mar 22, 2018
@mrowqa mrowqa deleted the typaram-attrs branch March 22, 2018 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants