You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0279]: the requirement `for<'b> 'b : ` is not satisfied (`expected bound lifetime parameter 'b, found concrete lifetime`)
--> <anon>:2:5
|
2 | test::<FooS>(&mut 42);
| ^^^^^^^^^^^^
|
= note: required because of the requirements on the impl of `for<'b> Foo<'b>` for `FooS<'_>`
= note: required by `test`
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
error: implementation of `Foo` is not general enough
--> src/main.rs:2:5
|
2 | test::<FooS>(&mut 42);
| ^^^^^^^^^^^^
|
= note: Due to a where-clause on `test`,
= note: `FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`
= note: but `FooS<'_>` actually implements `Foo<'1>`, for some specific lifetime `'1`
The case in the comment now compiles.
Working on a PR to make the output:
error: implementation of `Foo` is not general enough
--> file.rs:2:5
|
2 | test::<FooS>(&mut 42);
| ^^^^^^^^^^^^
...
13 | fn test<'a, F>(data: &'a mut u32) where F: for<'b> Foo<'b> {}
| ------------------------------------------------------------- due to a where-clause on `test`...
|
= note: ...`FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`...
= note: ...but `FooS<'_>` actually implements `Foo<'1>`, for some specific lifetime `'1`
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 X is not general enough
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 X is not general enough
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 X is not general enough
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.
error: implementation of `Foo` is not general enough
--> src/main.rs:2:5
|
2 | test::<FooS>(&mut 42);
| ^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
= note: `FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`...
= note: ...but `FooS<'_>` actually implements `Foo<'1>`, for some specific lifetime `'1`
The actual bug (for<'b> 'b :) has been gone for a while. The error isn't great and I would like to revamp it at some point.
error[E0277]: the trait bound `for<'b> FooS<'_>: Foo<'b>` is not satisfied
--> src/main.rs:2:12
|
2 | test::<FooS>(&mut 42);
| ^^^^ unsatisfied trait bound
|
help: the trait `Foo<'b>` is not implemented for `FooS<'_>`
but trait `Foo<'_>` is implemented for it
--> src/main.rs:11:1
|
11 | impl<'a, 'b: 'a> Foo<'b> for FooS<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `test`
--> src/main.rs:13:44
|
13 | fn test<'a, F>(data: &'a mut u32) where F: for<'b> Foo<'b> {}
| ^^^^^^^^^^^^^^^ required by this bound in `test`
I feel confident we can close this ticket once we enable the new trait solver.
Activity
kennytm commentedon Apr 11, 2017
Another program which produces similar message:
Error:
BTW,
u32does implementR<'a, 'static>for every'a.Version:
estebank commentedon Sep 2, 2019
Current output:
The case in the comment now compiles.
Working on a PR to make the output:
Rollup merge of rust-lang#64085 - estebank:hrtb-errors, r=oli-obk
Rollup merge of rust-lang#64085 - estebank:hrtb-errors, r=oli-obk
Rollup merge of rust-lang#64085 - estebank:hrtb-errors, r=oli-obk
onlineSoftwareDevOK commentedon Jun 18, 2022
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
Xis not general enoughonlineSoftwareDevOK commentedon Jun 21, 2022
@estebank Do you know this?
onlineSoftwareDevOK commentedon Jun 22, 2022
@spastorino @nikomatsakis Do you know this?
estebank commentedon Jun 22, 2022
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.
estebank commentedon Jul 30, 2026
Current output:
The actual bug (
for<'b> 'b :) has been gone for a while. The error isn't great and I would like to revamp it at some point.estebank commentedon Sep 9, 2026
Current output on nightly:
I feel confident we can close this ticket once we enable the new trait solver.