2019-10-11 02:36:20 +01:00
|
|
|
#![feature(extern_types)]
|
2021-07-26 17:01:16 -03:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2019-10-11 02:36:20 +01:00
|
|
|
|
2019-10-26 00:46:07 +01:00
|
|
|
#![warn(unused_attributes)]
|
|
|
|
|
2019-10-11 02:36:20 +01:00
|
|
|
trait Trait {
|
2019-10-26 00:46:07 +01:00
|
|
|
#[inline] //~ WARN `#[inline]` is ignored on constants
|
|
|
|
//~^ WARN this was previously accepted
|
2019-10-11 02:36:20 +01:00
|
|
|
const X: u32;
|
|
|
|
|
|
|
|
#[inline] //~ ERROR attribute should be applied to function or closure
|
|
|
|
type T;
|
2019-10-13 16:14:59 +01:00
|
|
|
|
|
|
|
type U;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait for () {
|
2019-10-26 00:46:07 +01:00
|
|
|
#[inline] //~ WARN `#[inline]` is ignored on constants
|
|
|
|
//~^ WARN this was previously accepted
|
2019-10-13 16:14:59 +01: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 16:10:22 +00:00
|
|
|
type U = impl Trait; //~ ERROR unconstrained opaque type
|
2019-10-11 02:36:20 +01:00
|
|
|
}
|
|
|
|
|
2020-09-01 17:12:52 -04:00
|
|
|
extern "C" {
|
2019-10-11 02:36:20 +01: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() {}
|