about summary refs log tree commit diff
path: root/tests/ui/traits/eval-caching-error-region.stderr
blob: 6365d242d2e6badbc5a097de90332aff6ab75a20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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`.