about summary refs log tree commit diff
path: root/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.current.stderr
blob: c54c1bba028cbfe1476d7101e8ce7f21b95572d0 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
error[E0369]: cannot add `{integer}` to `impl Sized`
  --> $DIR/ambiguous-ops.rs:17:15
   |
LL |         add() + 1
   |         ----- ^ - {integer}
   |         |
   |         impl Sized

error[E0368]: binary assignment operation `*=` cannot be applied to type `impl Sized`
  --> $DIR/ambiguous-ops.rs:31:9
   |
LL |         temp *= 2;
   |         ----^^^^^
   |         |
   |         cannot use `*=` on type `impl Sized`

error[E0614]: type `DerefWrapper<impl Sized>` cannot be dereferenced
  --> $DIR/ambiguous-ops.rs:57:22
   |
LL |         let _rarw = &*explicit_deref();
   |                      ^^^^^^^^^^^^^^^^^ can't be dereferenced

error[E0614]: type `DerefWrapper<impl Sized>` cannot be dereferenced
  --> $DIR/ambiguous-ops.rs:69:9
   |
LL |         *explicit_deref_mut() = 1;
   |         ^^^^^^^^^^^^^^^^^^^^^ can't be dereferenced

error[E0277]: the type `impl Sized` cannot be indexed by `_`
  --> $DIR/ambiguous-ops.rs:94:18
   |
LL |         let _y = explicit_index()[0];
   |                  ^^^^^^^^^^^^^^^^ `impl Sized` cannot be indexed by `_`
   |
   = help: the trait `Index<_>` is not implemented for `impl Sized`
note: required for `IndexWrapper<impl Sized>` to implement `Index<_>`
  --> $DIR/ambiguous-ops.rs:81:22
   |
LL | impl<T: Index<U>, U> Index<U> for IndexWrapper<T> {
   |         --------     ^^^^^^^^     ^^^^^^^^^^^^^^^
   |         |
   |         unsatisfied trait bound introduced here

error[E0277]: the type `impl Sized` cannot be indexed by `_`
  --> $DIR/ambiguous-ops.rs:106:9
   |
LL |         explicit_index_mut()[0] = 1;
   |         ^^^^^^^^^^^^^^^^^^^^ `impl Sized` cannot be indexed by `_`
   |
   = help: the trait `Index<_>` is not implemented for `impl Sized`
note: required for `IndexWrapper<impl Sized>` to implement `Index<_>`
  --> $DIR/ambiguous-ops.rs:81:22
   |
LL | impl<T: Index<U>, U> Index<U> for IndexWrapper<T> {
   |         --------     ^^^^^^^^     ^^^^^^^^^^^^^^^
   |         |
   |         unsatisfied trait bound introduced here

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0277, E0368, E0369, E0614.
For more information about an error, try `rustc --explain E0277`.