-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
unsatisfyable HKL error message prints broken bound (for<'b> 'b :
)
#35180
Comments
Another program which produces similar message: trait R<'a, 's: 'a> {}
impl<'a, 's: 'a> R<'a, 's> for u32 {}
struct S<X: for<'a> R<'a, 'static>>(X);
fn f(x: S<u32>) {} Error: error: main function not found
error[E0279]: the requirement `for<'a> : 'a` is not satisfied (`expected bound lifetime parameter 'a, found concrete lifetime`)
--> 1.rs:7:1
|
7 | fn f(x: S<u32>) {}
| ^^^^^^^^^^^^^^^^^^
|
= note: required because of the requirements on the impl of `for<'a> R<'a, 'static>` for `u32`
= note: required by `S`
error: aborting due to previous error BTW,
Version:
|
The case in the comment now compiles. Working on a PR to make the output:
|
Tweak unsatisfied HRTB errors r? @oli-obk Close rust-lang#35180.
Tweak unsatisfied HRTB errors r? @oli-obk Close rust-lang#35180.
Is it possible to reproduce E0279 using Rust stable nowadays? I am writing documentation for that error. Every code snippet which used to throw that error now returns implementation of |
@estebank Do you know this? |
@spastorino @nikomatsakis Do you know this? |
Theoretically, yes (the code is still there to produce the error), but we have no test for it in the test suite and it's possible that it has been shadowed by other, newer errors. |
the full error is
reproducible example on stable, beta and nightly:
The text was updated successfully, but these errors were encountered: