summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/import-after-macro-expand-4.stderr
blob: 01f70cfc5bffaf49a10688babf4241536029bc5d (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
warning: trait objects without an explicit `dyn` are deprecated
  --> $DIR/import-after-macro-expand-4.rs:12:22
   |
LL |     pub struct S(Vec<P>);
   |                      ^
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
   = note: `#[warn(bare_trait_objects)]` on by default
help: use `dyn`
   |
LL |     pub struct S(Vec<dyn P>);
   |                      +++

warning: trait objects without an explicit `dyn` are deprecated
  --> $DIR/import-after-macro-expand-4.rs:12:22
   |
LL |     pub struct S(Vec<P>);
   |                      ^
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
help: use `dyn`
   |
LL |     pub struct S(Vec<dyn P>);
   |                      +++

warning: trait objects without an explicit `dyn` are deprecated
  --> $DIR/import-after-macro-expand-4.rs:12:22
   |
LL |     pub struct S(Vec<P>);
   |                      ^
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
help: use `dyn`
   |
LL |     pub struct S(Vec<dyn P>);
   |                      +++

error[E0277]: the size for values of type `(dyn a::P + 'static)` cannot be known at compilation time
  --> $DIR/import-after-macro-expand-4.rs:12:18
   |
LL |     pub struct S(Vec<P>);
   |                  ^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn a::P + 'static)`
note: required by a bound in `Vec`
  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL

error: aborting due to previous error; 3 warnings emitted

For more information about this error, try `rustc --explain E0277`.