]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0445.stderr
Rollup merge of #97915 - tbu-:pr_os_string_fmt_write, r=joshtriplett
[rust.git] / src / test / ui / error-codes / E0445.stderr
1 error[E0445]: private trait `Foo` in public interface
2   --> $DIR/E0445.rs:5:1
3    |
4 LL | trait Foo {
5    | --------- `Foo` declared as private
6 ...
7 LL | pub trait Bar : Foo {}
8    | ^^^^^^^^^^^^^^^^^^^ can't leak private trait
9
10 error[E0445]: private trait `Foo` in public interface
11   --> $DIR/E0445.rs:7:1
12    |
13 LL | trait Foo {
14    | --------- `Foo` declared as private
15 ...
16 LL | pub struct Bar2<T: Foo>(pub T);
17    | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
18
19 error[E0445]: private trait `Foo` in public interface
20   --> $DIR/E0445.rs:9:1
21    |
22 LL | trait Foo {
23    | --------- `Foo` declared as private
24 ...
25 LL | pub fn foo<T: Foo> (t: T) {}
26    | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
27
28 error: aborting due to 3 previous errors
29
30 For more information about this error, try `rustc --explain E0445`.