Uh oh!
There was an error while loading. Please reload this page.
librustc: Can mark functions as deprecated. - #4643
Conversation
brson
commented
Jan 28, 2013
Awesome. Can you add a test? Here's an example: https://github.com/mozilla/rust/blob/incoming/src/test/compile-fail/lint-deprecated-self.rs Checking use of deprecated types will require either looking through the types of all the nodes in the type context, or possibly adding a new table of 'used types' to the type context. Types would be added to this table by the type checker during unification. |
luqmana
commented
Jan 28, 2013
Hmm ok. Also, are methods handled differently than regular fn's in the def_map? There's def_fn and def_static_method. |
brson
commented
Jan 29, 2013
I am not familiar enough with resolve to know what's in def_map, but @pcwalton, @nikomatsakis or @catamorphism might be. |
catamorphism
commented
Jan 29, 2013
@luqmana This should all be documented, but isn't. Feel free to ask follow-up questions... |
catamorphism
commented
Jan 29, 2013
(see |
luqmana
commented
Jan 29, 2013
So how could I get the ast::def_id associated with a ast::expr_method_call to lookup the ast::item? |
catamorphism
commented
Jan 29, 2013
@luqmana You can't, because the method you're actually calling isn't known until trans time. For example: Does So you could do this check as part of trans (as a sort of link-time lint check) or just punt on allowing impl methods to have a |
catamorphism
commented
Feb 15, 2013
I'm not sure what the status of this is; closing. @luqmana -- feel free to open a new pull requests, or ask questions on IRC if you're blocked! |
…cargo-toml Avoid panicking when `Cargo.toml` is not present
…cargo-toml Avoid panicking when `Cargo.toml` is not present
…cargo-toml Avoid panicking when `Cargo.toml` is not present
#723 - Add a deprecated items check to lint.
So far it actually only works for functions. I'm not exactly sure how to go about doing it for things like types, structs etc and catching only their uses.