diff --git a/mk/tests.mk b/mk/tests.mk index 2fb33eb7db898..e9f1baa8d4ef0 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -569,6 +569,11 @@ ifeq ($(CFG_OSTYPE),apple-darwin) CTEST_DISABLE_debuginfo-gdb = "gdb on darwin needs root" endif +ifeq ($(findstring android, $(CFG_TARGET)), android) +CTEST_DISABLE_debuginfo-gdb = +CTEST_DISABLE_debuginfo-lldb = "lldb tests are disabled on android" +endif + # CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that # test group to be disabled *unless* the target is able to build a # compiler (i.e. when the target triple is in the set of of host diff --git a/src/doc/trpl/README.md b/src/doc/trpl/README.md index eb9e2b24ac900..f5dd92f5a3dbe 100644 --- a/src/doc/trpl/README.md +++ b/src/doc/trpl/README.md @@ -29,7 +29,12 @@ and will be able to understand most Rust code and write more complex programs. In a similar fashion to "Intermediate," this section is full of individual, deep-dive chapters, which stand alone and can be read in any order. These -chapters focus on the most complex features, as well as some things that -are only available in upcoming versions of Rust. +chapters focus on the most complex features, -After reading "Advanced," you'll be a Rust expert! +
-Warning: Plugins are an advanced, unstable feature! For many details,
-the only available documentation is the libsyntax
and librustc
API docs, or even the source
-code itself. These internal compiler APIs are also subject to change at any
-time.
-
-For defining new syntax it is often much easier to use Rust's built-in macro system. -
- --The code in this document uses language features not covered in the Rust -Guide. See the Reference Manual for more -information. -
- -> { + use visit; + + struct Visitor<'a> { + ty_param_names: &'a [ast::Name], + types: Vec
>,
+ }
+
+ impl<'a> visit::Visitor<'a> for Visitor<'a> {
+ fn visit_ty(&mut self, ty: &'a ast::Ty) {
+ match ty.node {
+ ast::TyPath(_, ref path) if !path.global => {
+ match path.segments.first() {
+ Some(segment) => {
+ if self.ty_param_names.contains(&segment.identifier.name) {
+ self.types.push(P(ty.clone()));
+ }
+ }
+ None => {}
+ }
+ }
+ _ => {}
+ }
+
+ visit::walk_ty(self, ty)
+ }
+ }
+
+ let mut visitor = Visitor {
+ ty_param_names: ty_param_names,
+ types: Vec::new(),
+ };
+
+ visit::Visitor::visit_ty(&mut visitor, ty);
+
+ visitor.types
+}
impl<'a> TraitDef<'a> {
pub fn expand >,
methods: Vec >) -> P > = struct_def.fields.iter()
+ .map(|field| field.node.ty.clone())
+ .collect();
+
let methods = self.methods.iter().map(|method_def| {
let (explicit_self, self_args, nonself_args, tys) =
method_def.split_self_nonself_args(
@@ -550,7 +647,7 @@ impl<'a> TraitDef<'a> {
body)
}).collect();
- self.create_derived_impl(cx, type_ident, generics, methods)
+ self.create_derived_impl(cx, type_ident, generics, field_tys, methods)
}
fn expand_enum_def(&self,
@@ -558,6 +655,21 @@ impl<'a> TraitDef<'a> {
enum_def: &EnumDef,
type_ident: Ident,
generics: &Generics) -> P