mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
error[E0261]: use of undeclared lifetime name `'missing`
|
|
--> $DIR/eval-caching-error-region.rs:7:6
|
|
|
|
|
LL | &'missing Self: Add<Self>,
|
|
| ^^^^^^^^ undeclared lifetime
|
|
|
|
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
|
|
help: consider making the bound lifetime-generic with a new `'missing` lifetime
|
|
|
|
|
LL | for<'missing> &'missing Self: Add<Self>,
|
|
| +++++++++++++
|
|
help: consider introducing lifetime `'missing` here
|
|
|
|
|
LL | pub trait Numoid<'missing>: Sized
|
|
| ++++++++++
|
|
|
|
error[E0369]: cannot add `N` to `&N`
|
|
--> $DIR/eval-caching-error-region.rs:19:16
|
|
|
|
|
LL | let _ = &a + a;
|
|
| -- ^ - N
|
|
| |
|
|
| &N
|
|
|
|
|
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
|
|
|
|
|
LL | pub fn compute<N: Numoid>(a: N) where &N: Add<N> {
|
|
| ++++++++++++++++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0261, E0369.
|
|
For more information about an error, try `rustc --explain E0261`.
|