-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
- Loading branch information
Showing
15 changed files
with
105 additions
and
40 deletions.
There are no files selected for viewing
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,18 +1,7 @@ | ||
[package] | ||
name = "proc-macro-warning" | ||
version = "0.3.1" | ||
edition = "2021" | ||
license = "GPL-3.0 OR Apache-2.0" | ||
authors = ["Oliver Tale-Yazdi <oliver@tasty.limo>"] | ||
description = "Emit warnings from inside proc macros." | ||
repository = "/~https://github.com/ggwpez/proc-macro-warning" | ||
[workspace] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
proc-macro2 = { version = "1.0.56", default-features = false } | ||
quote = { version = "1.0.26", default-features = false } | ||
syn = { version = "2.0.15", default-features = false } | ||
|
||
[features] | ||
default = [] | ||
members = [ | ||
"proc-macro-warning", | ||
"ui-tests/derive", | ||
"ui-tests/ui", | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[package] | ||
name = "proc-macro-warning" | ||
version = "0.3.1" | ||
edition = "2021" | ||
license = "GPL-3.0 OR Apache-2.0" | ||
authors = ["Oliver Tale-Yazdi <oliver@tasty.limo>"] | ||
description = "Emit warnings from inside proc macros." | ||
repository = "/~https://github.com/ggwpez/proc-macro-warning" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
proc-macro2 = { version = "1.0.56", default-features = false } | ||
quote = { version = "1.0.26", default-features = false } | ||
syn = { version = "2.0.15", default-features = false } | ||
|
||
[dev-dependencies] | ||
derive = { path = "../ui-tests/derive" } | ||
|
||
[features] | ||
default = [] |
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
File renamed without changes.
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
File renamed without changes.
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,3 +1,5 @@ | ||
//! TESTING ONLY - DO NOT USE. | ||
#[test] | ||
#[cfg(test)] | ||
fn ui_warm() { | ||
|
File renamed without changes.
5 changes: 1 addition & 4 deletions
5
tests/ui/src/warn/derive_basic.rs → ui-tests/ui/src/warn/derive_basic.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,8 +1,5 @@ | ||
#[derive(derive::Deprecated)] | ||
struct Test { | ||
|
||
} | ||
struct Test; | ||
|
||
fn main() { | ||
let _ = Test { }; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#[derive(derive::Deprecated)] | ||
struct Test; | ||
|
||
#[derive(derive::Deprecated)] | ||
struct Test2; | ||
|
||
fn main() { | ||
} |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
error[E0428]: the name `test` is defined multiple times | ||
--> src/warn/derive_twice_errors.rs:5:1 | ||
| | ||
2 | struct Test; | ||
| ------------ previous definition of the value `test` here | ||
... | ||
5 | struct Test2; | ||
| ^^^^^^^^^^^^^ `test` redefined here | ||
| | ||
= note: `test` must be defined only once in the value namespace of this module | ||
|
||
error: use of deprecated constant `test::_w`: | ||
It is deprecated to foo. | ||
Please instead bar. | ||
--> src/warn/derive_twice_errors.rs:2:1 | ||
| | ||
2 | struct Test; | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: `-D deprecated` implied by `-D warnings` | ||
|
||
error: use of deprecated constant `test::_w`: | ||
It is deprecated to foo. | ||
Please instead bar. | ||
--> src/warn/derive_twice_errors.rs:5:1 | ||
| | ||
5 | struct Test2; | ||
| ^^^^^^^^^^^^^ |