diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2017-09-28 17:08:28 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2017-10-04 23:51:43 -0300 |
| commit | 271a492cb2028090c0198e893c18024c19bb6fc7 (patch) | |
| tree | a0c91f823ac97cec4ac769a547ac33d98a3b78d6 /src/librustc_data_structures/indexed_vec.rs | |
| parent | 8ee16f4352f3621be75084167185c1f9617859eb (diff) | |
| download | rust-271a492cb2028090c0198e893c18024c19bb6fc7.tar.gz rust-271a492cb2028090c0198e893c18024c19bb6fc7.zip | |
Generate ScopeId using newtype_index macro
Diffstat (limited to 'src/librustc_data_structures/indexed_vec.rs')
| -rw-r--r-- | src/librustc_data_structures/indexed_vec.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs index ce2468fb9f1..4b7f55eba06 100644 --- a/src/librustc_data_structures/indexed_vec.rs +++ b/src/librustc_data_structures/indexed_vec.rs @@ -51,7 +51,8 @@ macro_rules! newtype_index { impl $name { // HACK use for constants - pub const fn const_new(x: u32) -> Self { + #[allow(unused)] + const fn const_new(x: u32) -> Self { $name(x) } } |
