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:
commit
de05565ba3
2 changed files with 19 additions and 2 deletions
|
|
@ -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 {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue