]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0033.stderr
Rollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler
[rust.git] / src / test / ui / error-codes / E0033.stderr
1 error[E0423]: expected value, found trait `SomeTrait`
2   --> $DIR/E0033.rs:6:33
3    |
4 LL |     let trait_obj: &SomeTrait = SomeTrait;
5    |                                 ^^^^^^^^^ not a value
6
7 error[E0038]: the trait `SomeTrait` cannot be made into an object
8   --> $DIR/E0033.rs:6:20
9    |
10 LL |     let trait_obj: &SomeTrait = SomeTrait;
11    |                    ^^^^^^^^^^ the trait `SomeTrait` cannot be made into an object
12    |
13    = note: method `foo` has no receiver
14
15 error[E0033]: type `&dyn SomeTrait` cannot be dereferenced
16   --> $DIR/E0033.rs:11:9
17    |
18 LL |     let &invalid = trait_obj;
19    |         ^^^^^^^^ type `&dyn SomeTrait` cannot be dereferenced
20
21 error: aborting due to 3 previous errors
22
23 Some errors occurred: E0033, E0038, E0423.
24 For more information about an error, try `rustc --explain E0033`.