-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
50 deletions.
There are no files selected for viewing
20 changes: 11 additions & 9 deletions
20
tests/ui/deriving/deriving-smart-pointer-pointee-in-strange-places.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() {} |
64 changes: 35 additions & 29 deletions
64
tests/ui/deriving/deriving-smart-pointer-pointee-in-strange-places.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters