Files
google-apis-rs/src/mako/api/lib.rs.mako
Sebastian Thiel b0a41c4e78 fix(api): first big step towards syntex
Even though there is a bug that caues {} to be used in stead of
(),
when exanding macros, which causes syntax errors that we have to
workaround, it's not a real issue.

What's happening additionally is missing hyper macros, which
now have to be expanded manually. Shouldn't be a problem,
pretty-printing when compiling is made for just that ;).

No, it's sad that `include!()` works so badly, it makes
using serde so difficult ... it's no fun i must say.

Just for stable ... I am not sure if it is worth it."
2015-06-18 22:51:17 +02:00

22 lines
836 B
Mako

<%namespace name="lib" file="lib/lib.mako"/>\
<%namespace name="util" file="../lib/util.mako"/>\
<%
from util import (new_context, rust_comment, rust_module_doc_comment)
c = new_context(schemas, resources, context.get('methods'))
%>\
<%block filter="rust_comment">\
<%util:gen_info source="${self.uri}" />\
</%block>
<%block filter="rust_module_doc_comment">\
${lib.docs(c)}
</%block>
// Unused attributes happen thanks to defined, but unused structures
// We don't warn about this, as depending on the API, some data structures or facilities are never used.
// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any
// unused imports in fully featured APIs. Same with unused_mut ... .
#![allow(unused_imports, unused_mut, dead_code)]
include!(concat!(env!("OUT_DIR"), "/lib.rs"));