]> git.lizzy.rs Git - rust.git/commit
Stability: tweak rules for trait impls
authorAaron Turon <aturon@mozilla.com>
Thu, 18 Dec 2014 04:12:41 +0000 (20:12 -0800)
committerAaron Turon <aturon@mozilla.com>
Thu, 18 Dec 2014 04:40:15 +0000 (20:40 -0800)
commit9bb5380d80dc961fc3bd7edd13d6584f5cc48b66
tree9530a69d6d4df21fa4217d87406739d7ff0a02d7
parent22a9f250b5e2de64c13c0f056aec13eb086ef79d
Stability: tweak rules for trait impls

There is currently no way to specify the stability level for a trait
impl produced by `deriving`. This patch is a stopgap solution that:

* Turns of stability inheritance for trait impls, and
* Uses the stability level of the *trait* if no level is directly
  specified.

That is, manual trait impls may still provide a directly stability
level, but `deriving` will use the level of the trait. While not a
perfect solution, it should be good enough for 1.0 API stabilization, as
we will like *remove* any unwanted impls outright.
src/librustc/middle/stability.rs