1
Fork 0

Add a "diagnostic item" scheme

This allows lints and other diagnostics to refer to items
by a unique ID instead of relying on whacky path
resolution schemes that may break when items are
relocated.
This commit is contained in:
Oliver Scherer 2019-05-19 20:16:04 +02:00
parent fbdf1d2a71
commit 26e9990198
22 changed files with 260 additions and 18 deletions

View file

@ -291,6 +291,7 @@ use crate::raw_vec::RawVec;
/// [`reserve`]: ../../std/vec/struct.Vec.html#method.reserve
/// [owned slice]: ../../std/boxed/struct.Box.html
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(all(not(bootstrap), not(test)), rustc_diagnostic_item = "vec_type")]
pub struct Vec<T> {
buf: RawVec<T>,
len: usize,