rollup merge of #19029: vberger/stability_function_body

Items defined in the body of a function has no visibility outside it, and thus have no reason to inherit its stability.

Closes #17488
This commit is contained in:
Jakub Bukaj 2014-11-18 00:24:07 +01:00
commit de05565ba3
2 changed files with 19 additions and 2 deletions

View file

@ -459,6 +459,20 @@ mod this_crate {
foo.trait_stable();
}
#[deprecated]
fn test_fn_body() {
fn fn_in_body() {}
fn_in_body();
}
impl MethodTester {
#[deprecated]
fn test_method_body(&self) {
fn fn_in_body() {}
fn_in_body();
}
}
#[deprecated]
pub trait DeprecatedTrait {}