2019-10-11 01:36:20 +00:00
|
|
|
#![feature(extern_types)]
|
2021-03-12 10:53:51 +00:00
|
|
|
// revisions: min_tait full_tait
|
|
|
|
#![feature(min_type_alias_impl_trait)]
|
|
|
|
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
|
2019-10-11 01:36:20 +00:00
|
|
|
|
2019-10-25 23:46:07 +00:00
|
|
|
#![warn(unused_attributes)]
|
|
|
|
|
2019-10-11 01:36:20 +00:00
|
|
|
trait Trait {
|
2019-10-25 23:46:07 +00:00
|
|
|
#[inline] //~ WARN `#[inline]` is ignored on constants
|
|
|
|
//~^ WARN this was previously accepted
|
2019-10-11 01:36:20 +00:00
|
|
|
const X: u32;
|
|
|
|
|
|
|
|
#[inline] //~ ERROR attribute should be applied to function or closure
|
|
|
|
type T;
|
2019-10-13 15:14:59 +00:00
|
|
|
|
|
|
|
type U;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait for () {
|
2019-10-25 23:46:07 +00:00
|
|
|
#[inline] //~ WARN `#[inline]` is ignored on constants
|
|
|
|
//~^ WARN this was previously accepted
|
2019-10-13 15:14:59 +00: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
|
|
|
|
type U = impl Trait; //~ ERROR could not find defining uses
|
2019-10-11 01:36:20 +00:00
|
|
|
}
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {
|
2019-10-11 01:36:20 +00: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() {}
|