Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/performance/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use std::mem;
use std::ptr;
use std::str;
use std::os;
use std::from_str::FromStr;
use std::str::FromStr;

#[vertex_format]
struct Vertex {
Expand Down
4 changes: 2 additions & 2 deletions src/gfx_macros/shader_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn method_create(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
},
_ => {
cx.span_err(span, "Unable to implement `ShaderParam::create_link()` on a non-structure");
cx.expr_lit(span, ast::LitNil)
cx.expr_tuple(span, vec![])
},
}
}
Expand Down Expand Up @@ -203,7 +203,7 @@ fn method_fill(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
},
_ => {
cx.span_err(span, "Unable to implement `ShaderParam::bind()` on a non-structure");
cx.expr_lit(span, ast::LitNil)
cx.expr_tuple(span, vec![])
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/gfx_macros/vertex_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

use std::fmt;
use std::from_str::FromStr;
use std::str::FromStr;
use syntax::{ast, ext};
use syntax::ext::build::AstBuilder;
use syntax::ext::deriving::generic;
Expand Down Expand Up @@ -131,12 +131,12 @@ fn decode_type(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
not supported, but found: `{}`. Use an \
integer component with an explicit size \
instead.", ty_str).as_slice());
cx.expr_lit(span, ast::LitNil)
cx.expr_tuple(span, vec![])
},
ty_str => {
cx.span_err(span, format!("Unrecognized component type: `{}`",
ty_str).as_slice());
cx.expr_lit(span, ast::LitNil)
cx.expr_tuple(span, vec![])
},
}
}
Expand All @@ -157,13 +157,13 @@ fn decode_count_and_type(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
_ => {
cx.span_err(span, format!("Unsupported fixed vector sub-type: \
`{}`",pty.node).as_slice());
cx.expr_lit(span, ast::LitNil)
cx.expr_tuple(span, vec![])
},
}),
_ => {
cx.span_err(span, format!("Unsupported attribute type: `{}`",
field.node.ty.node).as_slice());
(cx.expr_lit(span, ast::LitNil), cx.expr_lit(span, ast::LitNil))
(cx.expr_tuple(span, vec![]), cx.expr_tuple(span, vec![]))
},
}
}
Expand Down Expand Up @@ -218,7 +218,7 @@ fn method_body(cx: &mut ext::base::ExtCtxt, span: codemap::Span,
_ => {
cx.span_err(span, "Unable to implement `gfx::VertexFormat::generate` \
on a non-structure");
cx.expr_lit(span, ast::LitNil)
cx.expr_tuple(span, vec![])
}
}
}
Expand Down