1 error: the trait `X` cannot be made into an object
2 --> $DIR/issue-50781.rs:16:5
4 LL | fn foo(&self) where Self: Trait; //~ ERROR the trait `X` cannot be made into an object
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 note: lint level defined here
8 --> $DIR/issue-50781.rs:11:9
10 LL | #![deny(where_clauses_object_safety)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13 = note: for more information, see issue #51443 <https://github.com/rust-lang/rust/issues/51443>
14 = note: method `foo` references the `Self` type in where clauses
16 error: aborting due to previous error