Procedural macros involve a few different parts of the language and its
standard libraries. First is the `proc_macro` crate, included with Rust,
that defines an interface for building a procedural macro. The
-`#[proc_macro_derive(Foo)]` attribute is used to mark the the deriving
+`#[proc_macro_derive(Foo)]` attribute is used to mark the deriving
function. This function must have the type signature:
```rust,ignore
/// If `true`, then this trait had the `#[rustc_paren_sugar]`
/// attribute, indicating that it should be used with `Foo()`
- /// sugar. This is a temporary thing -- eventually any trait wil
+ /// sugar. This is a temporary thing -- eventually any trait will
/// be usable with the sugar (or without it).
pub paren_sugar: bool,
/// should continue, returns a getopts::Matches object parsed from args,
/// otherwise returns None.
///
-/// The compiler's handling of options is a little complication as it ties into
+/// The compiler's handling of options is a little complicated as it ties into
/// our stability story, and it's even *more* complicated by historical
/// accidents. The current intention of each compiler option is to have one of
/// three modes:
}
});
- super::walk(&path.join("test/compile-fail"),
- &mut |path| super::filter_dirs(path),
- &mut |file| {
+ super::walk_many(&[&path.join("test/compile-fail"),
+ &path.join("test/compile-fail-fulldeps")],
+ &mut |path| super::filter_dirs(path),
+ &mut |file| {
let filename = file.file_name().unwrap().to_string_lossy();
if !filename.ends_with(".rs") || filename == "features.rs" ||
filename == "diagnostic_list.rs" {
"cfg_target_has_atomic", "staged_api", "const_indexing",
"unboxed_closures", "stmt_expr_attributes",
"cfg_target_thread_local", "unwind_attributes",
- "inclusive_range_syntax", "proc_macro"
+ "inclusive_range_syntax"
];
// Only check the number of lang features.
skip.iter().any(|p| path.ends_with(p))
}
+fn walk_many(paths: &[&Path], skip: &mut FnMut(&Path) -> bool, f: &mut FnMut(&Path)) {
+ for path in paths {
+ walk(path, skip, f);
+ }
+}
fn walk(path: &Path, skip: &mut FnMut(&Path) -> bool, f: &mut FnMut(&Path)) {
for entry in t!(fs::read_dir(path), path) {