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

Invalid error: unmatched angle bracket #78565

Closed
glandium opened this issue Oct 30, 2020 · 1 comment
Closed

Invalid error: unmatched angle bracket #78565

glandium opened this issue Oct 30, 2020 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@glandium
Copy link
Contributor

The following code, reduced from glean-core 31.4.0, fails to compile on current master:

pub struct DebugOption<T, F = fn(T) -> Option<T>> {
  t: T,
  f: F,
}

The error is:

error: unmatched angle bracket
 --> src/lib.rs:1:49
  |
1 | pub struct DebugOption<T, F = fn(T) -> Option<T>> {
  |                                                 ^^ help: remove extra angle bracket

The last nightly that rustup allows me to install (rustc 1.49.0-nightly (ffa2e7a 2020-10-24)) compiles it fine.

Interestingly, this doesn't happen with:

pub struct DebugOption<T, F = fn(T) -> Option<T>>(T, F);

git bisect points to ff61949 (#78379)

@glandium glandium added the C-bug Category: This is a bug. label Oct 30, 2020
@glandium
Copy link
Contributor Author

I should have checked #78379 first, because it points to #78507 which is the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant