2019-10-10 20:36:20 -05:00
|
|
|
#![feature(extern_types)]
|
2021-07-26 15:01:16 -05:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2019-10-10 20:36:20 -05:00
|
|
|
|
2019-10-25 18:46:07 -05:00
|
|
|
#![warn(unused_attributes)]
|
|
|
|
|
2019-10-10 20:36:20 -05:00
|
|
|
trait Trait {
|
2019-10-25 18:46:07 -05:00
|
|
|
#[inline] //~ WARN `#[inline]` is ignored on constants
|
|
|
|
//~^ WARN this was previously accepted
|
2019-10-10 20:36:20 -05:00
|
|
|
const X: u32;
|
|
|
|
|
|
|
|
#[inline] //~ ERROR attribute should be applied to function or closure
|
|
|
|
type T;
|
2019-10-13 10:14:59 -05:00
|
|
|
|
|
|
|
type U;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait for () {
|
2019-10-25 18:46:07 -05:00
|
|
|
#[inline] //~ WARN `#[inline]` is ignored on constants
|
|
|
|
//~^ WARN this was previously accepted
|
2019-10-13 10:14:59 -05:00
|
|
|
const X: u32 = 0;
|
|
|
|
|
|
|
|
#[inline] //~ ERROR attribute should be applied to function or closure
|
|
|
|
type T = Self;
|
|
|
|
|
|
|
|
#[inline] //~ ERROR attribute should be applied to function or closure
|
2022-02-14 10:10:22 -06:00
|
|
|
type U = impl Trait; //~ ERROR unconstrained opaque type
|
2019-10-10 20:36:20 -05:00
|
|
|
}
|
|
|
|
|
2020-09-01 16:12:52 -05:00
|
|
|
extern "C" {
|
2019-10-10 20:36:20 -05:00
|
|
|
#[inline] //~ ERROR attribute should be applied to function or closure
|
|
|
|
static X: u32;
|
|
|
|
|
|
|
|
#[inline] //~ ERROR attribute should be applied to function or closure
|
|
|
|
type T;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|