-
Notifications
You must be signed in to change notification settings - Fork 136
Fix a "will be a hard error" warning + drive-by #245
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emilio
approved these changes
Apr 23, 2019
procedural-masquerade/lib.rs
Outdated
// Using `stringify!` enables passing arbitrary tokens | ||
// rather than only what can be parsed as a const expression. | ||
Input = (0, stringify! $paren ).0 | ||
($proc_macro_name: ident ! $paren: tt) => { |
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 looks like a bug, probably I'd manually de-indent this macro for now.
That’s when `trim_start` was added
``` warning[E0506]: cannot assign to `self.input.cached_token` because it is borrowed --> src/parser.rs:591:17 | 566 | pub fn next_including_whitespace_and_comments(&mut self) -> Result<&Token<'i>, BasicParseError<'i>> { | - let's call the lifetime of this reference `'1` ... 579 | Some(ref cached_token) | ---------------- borrow of `self.input.cached_token` occurs here ... 591 | self.input.cached_token = Some(CachedToken { | ^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.input.cached_token` occurs here ... 603 | Ok(token) | --------- returning this value requires that `self.input.cached_token.0` is borrowed for `'1` | = warning: this error has been downgraded to a warning for backwards compatibility with previous releases = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future ```
@bors-servo r+ |
📌 Commit 16dbe6e has been approved by |
bors-servo
pushed a commit
that referenced
this pull request
Apr 24, 2019
Fix a "will be a hard error" warning + drive-by See individual commits <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/245) <!-- Reviewable:end -->
💔 Test failed - checks-travis |
@bors-servo retry |
bors-servo
pushed a commit
that referenced
this pull request
Apr 24, 2019
Fix a "will be a hard error" warning + drive-by See individual commits <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/245) <!-- Reviewable:end -->
Closed
☀️ Test successful - checks-travis |
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See individual commits
This change is