This fixes private statics and functions from being usable cross-crates, along
with some bad privacy error messages. This is a reopening of #8365 with all the
privacy checks in privacy.rs instead of resolve.rs (where they should be
anyway).
These maps of exported items will hopefully get used for generating
documentation by rustdoc
Closes #8592
ObsoleteNamedExternModule,
ObsoleteMultipleLocalDecl,
ObsoleteMutWithMultipleBindings,
- ObsoleteExternVisibility,
ObsoleteUnsafeExternFn,
- ObsoletePrivVisibility,
ObsoleteTraitFuncVisibility,
ObsoleteConstPointer,
+ ObsoleteEmptyImpl,
}
impl to_bytes::IterBytes for ObsoleteSyntax {
None
};
- // Do not allow visibility to be specified.
- if visibility != ast::inherited {
- self.obsolete(*self.span, ObsoleteImplVisibility);
- }
-
let mut meths = ~[];
- if !self.eat(&token::SEMI) {
+ if self.eat(&token::SEMI) {
+ self.obsolete(*self.span, ObsoleteEmptyImpl);
+ } else {
self.expect(&token::LBRACE);
while !self.eat(&token::RBRACE) {
meths.push(self.parse_method());
fn y(self) -> int { self }
}
-impl Z for int;
+impl Z for int {}
- fn main() {
+ pub fn main() {
assert_eq!(12.x(), 12);
}