1 error: defining existential type use differs from previous
2 --> $DIR/existential_type.rs:23:1
4 LL | / fn bar() -> Foo { //~ ERROR defining existential type use differs from previous
9 note: previous use here
10 --> $DIR/existential_type.rs:19:1
12 LL | / fn foo() -> Foo {
17 error[E0308]: mismatched types
18 --> $DIR/existential_type.rs:36:5
20 LL | fn bomp() -> boo::Boo {
21 | -------- expected `Boo` because of return type
22 LL | "" //~ ERROR mismatched types
23 | ^^ expected anonymized type, found reference
25 = note: expected type `Boo`
26 found type `&'static str`
28 error[E0308]: mismatched types
29 --> $DIR/existential_type.rs:50:23
31 LL | let _: &str = bomp(); //~ ERROR mismatched types
32 | ^^^^^^ expected &str, found anonymized type
34 = note: expected type `&str`
37 error[E0308]: mismatched types
38 --> $DIR/existential_type.rs:54:9
40 LL | fn bomp() -> boo::Boo {
41 | -------- expected `Boo` because of return type
42 LL | "" //~ ERROR mismatched types
43 | ^^ expected anonymized type, found reference
45 = note: expected type `Boo`
46 found type `&'static str`
48 error[E0277]: the trait bound `T: Trait` is not satisfied
49 --> $DIR/existential_type.rs:61:1
51 LL | existential type Underconstrained<T: Trait>: 'static; //~ ERROR the trait bound `T: Trait`
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
54 = help: consider adding a `where T: Trait` bound
55 = note: the return type of a function must have a statically known size
57 warning: not reporting region error due to nll
58 --> $DIR/existential_type.rs:78:1
60 LL | existential type WrongGeneric<T>: 'static;
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63 error[E0308]: mismatched types
64 --> $DIR/existential_type.rs:93:27
66 LL | let _: &'static str = x; //~ mismatched types
67 | ^ expected reference, found anonymized type
69 = note: expected type `&'static str`
72 error[E0605]: non-primitive cast: `NoReveal` as `&'static str`
73 --> $DIR/existential_type.rs:94:13
75 LL | let _ = x as &'static str; //~ non-primitive cast
78 = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
80 error: could not find defining uses
81 --> $DIR/existential_type.rs:28:1
83 LL | existential type Bar: std::fmt::Debug; //~ ERROR could not find defining uses
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 error: could not find defining uses
87 --> $DIR/existential_type.rs:32:5
89 LL | pub existential type Boo: ::std::fmt::Debug; //~ ERROR could not find defining uses
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92 error: defining existential type use differs from previous
93 --> $DIR/existential_type.rs:74:1
95 LL | / fn my_iter2<T>(t: T) -> MyIter<T> { //~ ERROR defining existential type use differs from previous
96 LL | | Some(t).into_iter()
100 note: previous use here
101 --> $DIR/existential_type.rs:70:1
103 LL | / fn my_iter<T>(t: T) -> MyIter<T> {
104 LL | | std::iter::once(t)
108 error: aborting due to 10 previous errors
110 Some errors occurred: E0277, E0308, E0605.
111 For more information about an error, try `rustc --explain E0277`.