-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Fix the span of trait bound modifier [const]
#143171
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: master
Are you sure you want to change the base?
Conversation
@bors r+ rollup |
&& self.look_ahead(1, |t| t.is_keyword(kw::Const)) | ||
&& self.look_ahead(2, |t| *t == token::CloseBracket) |
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 pretty sure we don't need the careful lookahead logic and could just if eat("[") then expect("const") expect("]")
, there shouldn't be ambiguity issues (I'll post another, tangentially related PR later that goes into more detail) but that will likely regress diagnostics (because if we fail to parse a bound, we try to reparse it as a type to give "expected trait, found type"
) and I didn't want to deal with that rn and maybe that's why oli chose this approach)
This comment has been minimized.
This comment has been minimized.
@bors r- |
7a55709
to
f77fead
Compare
@bors r=compiler-errors |
…, r=compiler-errors Fix the span of trait bound modifier `[const]` r? project-const-traits or anyone
Rollup of 11 pull requests Successful merges: - #142021 (Doc: clarify priority of lint level sources) - #142367 (Add regression test for #137857 to ensure that we generate intra doc links for extern crate items.) - #142641 (Generate symbols.o for proc-macros too) - #142889 (Clarify doc comment on unix OpenOptions) - #143063 (explain `ImportData::imported_module`) - #143088 (Improve documentation of `TagEncoding`) - #143135 (fix typos on some doc comments) - #143138 (Port `#[link_name]` to the new attribute parsing infrastructure) - #143155 (`librustdoc` house-keeping 🧹) - #143169 (Remove unused feature gates) - #143171 (Fix the span of trait bound modifier `[const]`) r? `@ghost` `@rustbot` modify labels: rollup
r? project-const-traits or anyone