2012-10-15 12:00:32 -07:00
|
|
|
fn foo<T>() {
|
2018-12-16 22:21:47 -05:00
|
|
|
struct Foo {
|
2019-02-07 14:59:59 +01:00
|
|
|
x: T, //~ ERROR can't use generic parameters from outer function
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
impl<T> Drop for Foo<T> {
|
2023-02-23 10:27:06 -07:00
|
|
|
//~^ ERROR struct takes 0 generic arguments but 1 generic argument
|
2013-09-16 21:18:07 -04:00
|
|
|
fn drop(&mut self) {}
|
2012-10-15 12:00:32 -07:00
|
|
|
}
|
|
|
|
}
|
2022-01-12 23:41:28 +01:00
|
|
|
fn main() {}
|