Closed
Description
They are ignored, but silently. It is probably better if we make them errors to give us room to build some future system with those nice names.
This compiles without a peep from rustc:
#![allow(dead_code)]
#[stable]
fn foo() {}
#[deprecated]
struct Bar;
#[unstable]
type X = i8;
fn main() {}
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
nagisa commentedon Feb 26, 2015
Willing to pick this up.
One thing to note, that it will 100% cause breakage outside the compiler, and possibly inside as well.
brson commentedon Feb 26, 2015
I did it this way to avoid breakage for people who were using them. We might put in deprecation warnings for a few weeks.
huonw commentedon Feb 26, 2015
I'm in favour of a smooth deprecation path via warnings! :)
pnkfelix commentedon Feb 26, 2015
@alexcrichton asks whether the unused-attribute lint would catch these, or if they are unconditonally marked as used.
Either way, some sort of warning sounds good.
pnkfelix commentedon Feb 26, 2015
1.0 polish, P-high.
sfackler commentedon Feb 26, 2015
@pnkfelix they are unconditionally marked as used.
brson commentedon Apr 13, 2015
Ugh, I'm wishing I had done this a lot sooner. Working on a patch for this now, but it's probably going to cause some breakage. I'll see if I can guess how much.
brson commentedon Apr 13, 2015
Here's the list of current out-of-tree usage of stability attributes https://gist.github.com/brson/1dd62761ee8dff6cdcaa
Make use of the stability attributes issue a deprecation warning. rus…
Make use of the stability attributes issue a deprecation warning. rus…
Make stability attributes an error. rust-lang#22830
Make stability attributes an error. rust-lang#22830
Make stability attributes an error. rust-lang#22830
Make stability attributes an error. rust-lang#22830
Make stability attributes an error. rust-lang#22830
alexcrichton commentedon Apr 24, 2015
This was fixed and backported to beta recently, yay!
#[deprecated] is now blocked outside stdlib