]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-3214.stderr
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-3214.stderr
1 error[E0401]: can't use generic parameters from outer function
2   --> $DIR/issue-3214.rs:3:12
3    |
4 LL | fn foo<T>() {
5    |    --- - type parameter from outer function
6    |    |
7    |    try adding a local generic parameter in this method instead
8 LL |     struct Foo {
9 LL |         x: T,
10    |            ^ use of generic parameter from outer function
11
12 error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied
13   --> $DIR/issue-3214.rs:6:22
14    |
15 LL |     impl<T> Drop for Foo<T> {
16    |                      ^^^--- help: remove these generics
17    |                      |
18    |                      expected 0 generic arguments
19    |
20 note: struct defined here, with 0 generic parameters
21   --> $DIR/issue-3214.rs:2:12
22    |
23 LL |     struct Foo {
24    |            ^^^
25
26 error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
27   --> $DIR/issue-3214.rs:6:10
28    |
29 LL |     impl<T> Drop for Foo<T> {
30    |          ^ unconstrained type parameter
31
32 error: aborting due to 3 previous errors
33
34 Some errors have detailed explanations: E0107, E0207, E0401.
35 For more information about an error, try `rustc --explain E0107`.