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

Error message when a non-pure function is used as a constraint could be clearer #1883

Closed
bzbarsky opened this issue Feb 22, 2012 · 1 comment

Comments

@bzbarsky
Copy link

Testcase:

  fn foo() -> bool { true }
  fn bar() : foo() {}

I get this error message: "error: Non-predicate in constraint: foo"

It would be nice if it just said something like "foo is not a pure function" instead.

@catamorphism
Copy link
Contributor

Indeed, keep reporting those not-very-good error messages. Fix is coming.

@ghost ghost assigned catamorphism Feb 22, 2012
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
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

No branches or pull requests

2 participants