1
Fork 0

Forbid privacy in inner functions

Closes #10111
This commit is contained in:
Alex Crichton 2013-11-05 18:06:27 -08:00
parent ade310cbb6
commit dab8fec4af
10 changed files with 121 additions and 13 deletions

View file

@ -216,7 +216,7 @@ Now consider code like the following:
~~~~
# enum t1 { good_1(t2, uint), bad_1 };
# pub struct t2 { body: t3 }
# struct t2 { body: t3 }
# enum t3 { good_2(uint), bad_2};
# fn f(x: t1) -> uint {
match x {
@ -262,7 +262,7 @@ macro_rules! biased_match (
)
# enum t1 { good_1(t2, uint), bad_1 };
# pub struct t2 { body: t3 }
# struct t2 { body: t3 }
# enum t3 { good_2(uint), bad_2};
# fn f(x: t1) -> uint {
biased_match!((x) ~ (good_1(g1, val)) else { return 0 };
@ -364,7 +364,7 @@ macro_rules! biased_match (
# enum t1 { good_1(t2, uint), bad_1 };
# pub struct t2 { body: t3 }
# struct t2 { body: t3 }
# enum t3 { good_2(uint), bad_2};
# fn f(x: t1) -> uint {
biased_match!(