Skip to content

libsyntax: Stop parsing + with no bounds after it. #15062

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
Jun 21, 2014

Conversation

pcwalton
Copy link
Contributor

This will break code that looks like Box<Trait+>. Change that code to
Box<Trait> instead.

Closes #14925.

[breaking-change]

r? @brson

self.span_err(last_span,
"at least one type parameter bound must \
be specified after the `+`");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Has the token stream here been modified? Because this is eating a token::COLON and then claiming in the error that it was a +.

It seems this should also be making proc(): into an error, but brson's comment on the commit suggests that proc(): is supposed to still be valid.

This will break code that looks like `Box<Trait+>`. Change that code to
`Box<Trait>` instead.

Closes rust-lang#14925.

[breaking-change]
@brson
Copy link
Contributor

brson commented Jun 20, 2014

After talking with @pcwalton, the proc(): syntax is obsolete since proc no longer has default bounds, so he removed it in passing (it was in related code). That is fine with me.

@pcwalton
Copy link
Contributor Author

@bors: retry

bors added a commit that referenced this pull request Jun 21, 2014
This will break code that looks like `Box<Trait+>`. Change that code to
`Box<Trait>` instead.

Closes #14925.

[breaking-change]

r? @brson
@bors bors closed this Jun 21, 2014
@bors bors merged commit ae06747 into rust-lang:master Jun 21, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Jun 19, 2023
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.

Stop parsing trailing + in trait bounds
4 participants