2019-10-11 02:36:20 +01:00
|
|
|
#![feature(extern_types)]
|
2023-04-12 13:32:15 +00:00
|
|
|
#![feature(impl_trait_in_assoc_type)]
|
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 {
|
2025-08-09 20:41:01 +02:00
|
|
|
#[inline] //~ WARN attribute cannot be used on
|
|
|
|
|
//~| WARN previously accepted
|
2019-10-11 02:36:20 +01:00
|
|
|
const X: u32;
|
|
|
|
|
|
2025-08-09 20:41:01 +02:00
|
|
|
#[inline] //~ ERROR attribute cannot be used on
|
2019-10-11 02:36:20 +01:00
|
|
|
type T;
|
2019-10-13 16:14:59 +01:00
|
|
|
|
|
|
|
|
type U;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Trait for () {
|
2025-08-09 20:41:01 +02:00
|
|
|
#[inline] //~ WARN attribute cannot be used on
|
|
|
|
|
//~| WARN previously accepted
|
2019-10-13 16:14:59 +01:00
|
|
|
const X: u32 = 0;
|
|
|
|
|
|
2025-08-09 20:41:01 +02:00
|
|
|
#[inline] //~ ERROR attribute cannot be used on
|
2019-10-13 16:14:59 +01:00
|
|
|
type T = Self;
|
|
|
|
|
|
2025-08-09 20:41:01 +02:00
|
|
|
#[inline] //~ ERROR attribute cannot be used on
|
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" {
|
2025-08-09 20:41:01 +02:00
|
|
|
#[inline] //~ ERROR attribute cannot be used on
|
2019-10-11 02:36:20 +01:00
|
|
|
static X: u32;
|
|
|
|
|
|
2025-08-09 20:41:01 +02:00
|
|
|
#[inline] //~ ERROR attribute cannot be used on
|
2019-10-11 02:36:20 +01:00
|
|
|
type T;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|