Skip to content

Commit

Permalink
Update pointee tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Brezak committed Aug 6, 2024
1 parent d05c2fc commit 027b6db
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
#![feature(derive_smart_pointer)]

#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
//~^ ERROR: cannot find attribute `pointee` in this scope
struct AStruct<
#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
//~^ ERROR: cannot find attribute `pointee` in this scope
'lifetime,
#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
//~^ ERROR: cannot find attribute `pointee` in this scope
const CONST: usize
> {
#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
//~^ ERROR: cannot find attribute `pointee` in this scope
val: &'lifetime ()
}

#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
//~^ ERROR: cannot find attribute `pointee` in this scope
enum AnEnum {
#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
//~^ ERROR: cannot find attribute `pointee` in this scope
AVariant
}

#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
mod AModule {}
//~^ ERROR: cannot find attribute `pointee` in this scope
mod a_module {}

#[pointee]
//~^ ERROR: attribute should be applied to generic type parameters
//~^ ERROR: cannot find attribute `pointee` in this scope
fn a_function(
) {}

type AType<#[pointee] T> = T; //~ ERROR: cannot find attribute `pointee` in this scope

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:3:1
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:35:14
|
LL | type AType<#[pointee] T> = T;
| ^^^^^^^

error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:30:3
|
LL | #[pointee]
| ^^^^^^^^^^
| ^^^^^^^

error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:6:5
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:26:3
|
LL | #[pointee]
| ^^^^^^^^^^
LL | #[pointee]
| ^^^^^^^

error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:9:5
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:18:3
|
LL | #[pointee]
| ^^^^^^^^^^
LL | #[pointee]
| ^^^^^^^

error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:13:5
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:21:7
|
LL | #[pointee]
| ^^^^^^^^^^
| ^^^^^^^

error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:18:1
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:3:3
|
LL | #[pointee]
| ^^^^^^^^^^
| ^^^^^^^

error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:21:5
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:6:7
|
LL | #[pointee]
| ^^^^^^^^^^
| ^^^^^^^

error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:26:1
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:9:7
|
LL | #[pointee]
| ^^^^^^^^^^
LL | #[pointee]
| ^^^^^^^

error: attribute should be applied to generic type parameters
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:30:1
error: cannot find attribute `pointee` in this scope
--> $DIR/deriving-smart-pointer-pointee-in-strange-places.rs:13:7
|
LL | #[pointee]
| ^^^^^^^^^^
LL | #[pointee]
| ^^^^^^^

error: aborting due to 8 previous errors
error: aborting due to 9 previous errors

0 comments on commit 027b6db

Please sign in to comment.