Skip to content

save-analysis: handle << and >> operators inside [] in types #37776

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
Nov 18, 2016

Conversation

nrc
Copy link
Member

@nrc nrc commented Nov 15, 2016

Fixes #37700

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Nov 16, 2016

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 16, 2016

📌 Commit e003d05 has been approved by brson

prev.tok.is_ident() {
result = Some(prev.sp);
}

if bracket_count == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

So, this is a bit obscure. It seems like some comments might help to clarify what's going on.

Copy link
Member Author

Choose a reason for hiding this comment

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

will add

// Issue #37700
const LUT_BITS: usize = 3;
pub struct HuffmanTable {
ac_lut: Option<[(i16, u8); 1 << LUT_BITS]>,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really get what the logic is above, but I am wondering if it is going to work for something like Option<[u8; foo(X > Y)]> (where foo() is a const fn)?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah it should do, that is kind of the point - this basically ignores any angle bracket-like tokens which occur inside [ ... ] because they could be part of expressions.

@nrc nrc force-pushed the save-double-angle branch from e003d05 to 8a949df Compare November 18, 2016 00:06
@nrc
Copy link
Member Author

nrc commented Nov 18, 2016

Now with a comment.

@bors: r=@brson

@bors
Copy link
Collaborator

bors commented Nov 18, 2016

📌 Commit 8a949df has been approved by @brson

@bors
Copy link
Collaborator

bors commented Nov 18, 2016

⌛ Testing commit 8a949df with merge b7dfc2b...

bors added a commit that referenced this pull request Nov 18, 2016
save-analysis: handle << and >> operators inside [] in types

Fixes #37700
@bors bors merged commit 8a949df into rust-lang:master Nov 18, 2016
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