]> git.lizzy.rs Git - rust.git/commitdiff
Touch up and rebase previous commits
authorAlex Crichton <alex@alexcrichton.com>
Sun, 11 May 2014 00:39:08 +0000 (17:39 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 14 May 2014 00:24:08 +0000 (17:24 -0700)
* Added `// no-pretty-expanded` to pretty-print a test, but not run it through
  the `expanded` variant.
* Removed #[deriving] and other expanded attributes after they are expanded
* Removed hacks around &str and &&str and friends (from both the parser and the
  pretty printer).
* Un-ignored a bunch of tests

33 files changed:
src/compiletest/compiletest.rs
src/compiletest/header.rs
src/compiletest/runtest.rs
src/librustc/middle/lint.rs
src/librustdoc/html/highlight.rs
src/librustdoc/html/markdown.rs
src/libsyntax/ext/expand.rs
src/libsyntax/parse/parser.rs
src/libsyntax/print/pprust.rs
src/test/bench/core-set.rs
src/test/bench/shootout-k-nucleotide-pipes.rs
src/test/bench/shootout-k-nucleotide.rs
src/test/bench/shootout-mandelbrot.rs
src/test/bench/shootout-reverse-complement.rs
src/test/bench/sudoku.rs
src/test/bench/task-perf-jargon-metal-smoke.rs
src/test/compile-fail/borrowck-lend-flow-match.rs
src/test/compile-fail/borrowck-pat-reassign-binding.rs
src/test/compile-fail/borrowck-preserve-box-in-field.rs
src/test/compile-fail/borrowck-preserve-box-in-uniq.rs
src/test/compile-fail/borrowck-preserve-box.rs
src/test/compile-fail/borrowck-preserve-expl-deref.rs
src/test/run-pass/anon-extern-mod-cross-crate-2.rs
src/test/run-pass/big-literals.rs
src/test/run-pass/borrowck-pat-enum.rs
src/test/run-pass/closure-syntax.rs
src/test/run-pass/deriving-global.rs
src/test/run-pass/ifmt.rs
src/test/run-pass/invoke-external-foreign.rs
src/test/run-pass/numeric-method-autoexport.rs
src/test/run-pass/objects-owned-object-borrowed-method-header.rs
src/test/run-pass/super-fast-paren-parsing.rs
src/test/run-pass/trait-bounds-in-arc.rs

index d23182b5225986a50936785e971d46eaff838ed8..ee0fe2065303b852d0b014522c70c82cfa0b9f0a 100644 (file)
@@ -29,7 +29,7 @@
 use std::from_str::FromStr;
 use getopts::{optopt, optflag, reqopt};
 use common::Config;
-use common::{Pretty, DebugInfo, Codegen};
+use common::{Pretty, DebugInfoGdb, Codegen};
 use util::logv;
 
 pub mod procsrv;
@@ -199,7 +199,7 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
 }
 
 pub fn run_tests(config: &Config) {
-    if config.target == ~"arm-linux-androideabi" {
+    if config.target == "arm-linux-androideabi".to_owned() {
         match config.mode {
             DebugInfoGdb => {
                 println!("arm-linux-androideabi debug-info \
index e9c41a137d9019dcd9a34ed587bf225e1baa89fc..047be9554774632734624f18a845ef6fb8573879 100644 (file)
@@ -34,6 +34,8 @@ pub struct TestProps {
     pub check_stdout: bool,
     // Don't force a --crate-type=dylib flag on the command line
     pub no_prefer_dynamic: bool,
+    // Don't run --pretty expanded when running pretty printing tests
+    pub no_pretty_expanded: bool,
 }
 
 // Load any test directives embedded in the file
@@ -48,6 +50,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
     let mut force_host = false;
     let mut check_stdout = false;
     let mut no_prefer_dynamic = false;
+    let mut no_pretty_expanded = false;
     iter_header(testfile, |ln| {
         match parse_error_pattern(ln) {
           Some(ep) => error_patterns.push(ep),
@@ -78,6 +81,10 @@ pub fn load_props(testfile: &Path) -> TestProps {
             no_prefer_dynamic = parse_no_prefer_dynamic(ln);
         }
 
+        if !no_pretty_expanded {
+            no_pretty_expanded = parse_no_pretty_expanded(ln);
+        }
+
         match parse_aux_build(ln) {
             Some(ab) => { aux_builds.push(ab); }
             None => {}
@@ -107,6 +114,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
         force_host: force_host,
         check_stdout: check_stdout,
         no_prefer_dynamic: no_prefer_dynamic,
+        no_pretty_expanded: no_pretty_expanded,
     }
 }
 
@@ -180,6 +188,10 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
     parse_name_directive(line, "no-prefer-dynamic")
 }
 
+fn parse_no_pretty_expanded(line: &str) -> bool {
+    parse_name_directive(line, "no-pretty-expanded")
+}
+
 fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
     parse_name_value_directive(line, "exec-env".to_owned()).map(|nv| {
         // nv is either FOO or FOO=BAR
index bd909c8f0693f4e80cbec70ac88761c390b3fdca..d7fa4f209d4da686f357c9fe3c9a2c56648487e7 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use common::Config;
-use common::{CompileFail, Pretty, RunFail, RunPass};
+use common::{CompileFail, Pretty, RunFail, RunPass, DebugInfoGdb, DebugInfoLldb};
 use errors;
 use header::TestProps;
 use header;
@@ -64,7 +64,7 @@ pub fn run_metrics(config: Config, testfile: ~str, mm: &mut MetricMap) {
       Pretty => run_pretty_test(&config, &props, &testfile),
       DebugInfoGdb => run_debuginfo_gdb_test(&config, &props, &testfile),
       DebugInfoLldb => run_debuginfo_lldb_test(&config, &props, &testfile),
-      Codegen => run_codegen_test(&config, &props, &testfile, mm)
+      Codegen => run_codegen_test(&config, &props, &testfile, mm),
     }
 }
 
@@ -194,6 +194,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
     if !proc_res.status.success() {
         fatal_ProcRes("pretty-printed source does not typecheck".to_owned(), &proc_res);
     }
+    if props.no_pretty_expanded { return }
 
     // additionally, run `--pretty expanded` and try to build it.
     let proc_res = print_source(config, props, testfile, (*srcs.get(round)).clone(), "expanded");
@@ -219,10 +220,17 @@ fn print_source(config: &Config,
                         Vec::new(), config.compile_lib_path, Some(src))
     }
 
-    fn make_pp_args(config: &Config, _testfile: &Path) -> ProcArgs {
-        let args = vec!("-".to_owned(), "--pretty".to_owned(), "normal".to_owned(),
-                     "--target=".to_owned() + config.target);
+    fn make_pp_args(config: &Config,
+                    props: &TestProps,
+                    testfile: &Path,
+                    pretty_type: ~str) -> ProcArgs {
+        let aux_dir = aux_output_dir_name(config, testfile);
         // FIXME (#9639): This needs to handle non-utf8 paths
+        let mut args = vec!("-".to_owned(), "--pretty".to_owned(), pretty_type,
+                            "--target=".to_owned() + config.target,
+                            "-L".to_owned(), aux_dir.as_str().unwrap().to_owned());
+        args.push_all_move(split_maybe_args(&config.target_rustcflags));
+        args.push_all_move(split_maybe_args(&props.compile_flags));
         return ProcArgs {prog: config.rustc_path.as_str().unwrap().to_owned(), args: args};
     }
 
@@ -419,14 +427,14 @@ fn debugger() -> ~str { "gdb".to_owned() }
     check_debugger_output(&debugger_run_result, check_lines.as_slice());
 }
 
-fn run_debuginfo_lldb_test(config: &config, props: &TestProps, testfile: &Path) {
+fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path) {
     use std::io::process::{Process, ProcessConfig, ProcessOutput};
 
     if config.lldb_python_dir.is_none() {
         fatal("Can't run LLDB test because LLDB's python path is not set.".to_owned());
     }
 
-    let mut config = config {
+    let mut config = Config {
         target_rustcflags: cleanup_debug_info_options(&config.target_rustcflags),
         host_rustcflags: cleanup_debug_info_options(&config.host_rustcflags),
         .. config.clone()
@@ -481,7 +489,7 @@ fn run_debuginfo_lldb_test(config: &config, props: &TestProps, testfile: &Path)
 
     check_debugger_output(&debugger_run_result, check_lines.as_slice());
 
-    fn run_lldb(config: &config, test_executable: &Path, debugger_script: &Path) -> ProcRes {
+    fn run_lldb(config: &Config, test_executable: &Path, debugger_script: &Path) -> ProcRes {
         // Prepare the lldb_batchmode which executes the debugger script
         let lldb_batchmode_script = "./src/etc/lldb_batchmode.py".to_owned();
         let test_executable_str = test_executable.as_str().unwrap().to_owned();
index cc0697ce527693813d09b88e6d4f1555c30601db..1bf4d0a02faf099b642250e456d4a289244237b4 100644 (file)
@@ -46,6 +46,7 @@
 use middle::typeck::infer;
 use middle::typeck;
 use util::ppaux::{ty_to_str};
+use util::nodemap::NodeSet;
 
 use std::cmp;
 use collections::HashMap;
@@ -453,10 +454,13 @@ struct Context<'a> {
     // When recursing into an attributed node of the ast which modifies lint
     // levels, this stack keeps track of the previous lint levels of whatever
     // was modified.
-    lint_stack: Vec<(Lint, level, LintSource)> ,
+    lint_stack: Vec<(Lint, level, LintSource)>,
 
     // id of the last visited negated expression
-    negated_expr_id: ast::NodeId
+    negated_expr_id: ast::NodeId,
+
+    // ids of structs/enums which have been checked for raw_pointer_deriving
+    checked_raw_pointers: NodeSet,
 }
 
 impl<'a> Context<'a> {
@@ -1014,10 +1018,26 @@ fn visit_expr(&mut self, _: &ast::Expr, _: ()) {}
     fn visit_block(&mut self, _: &ast::Block, _: ()) {}
 }
 
-fn check_raw_ptr_deriving(cx: &Context, item: &ast::Item) {
-    if !attr::contains_name(item.attrs.as_slice(), "deriving") {
+fn check_raw_ptr_deriving(cx: &mut Context, item: &ast::Item) {
+    if !attr::contains_name(item.attrs.as_slice(), "automatically_derived") {
         return
     }
+    let did = match item.node {
+        ast::ItemImpl(..) => {
+            match ty::get(ty::node_id_to_type(cx.tcx, item.id)).sty {
+                ty::ty_enum(did, _) => did,
+                ty::ty_struct(did, _) => did,
+                _ => return,
+            }
+        }
+        _ => return,
+    };
+    if !ast_util::is_local(did) { return }
+    let item = match cx.tcx.map.find(did.node) {
+        Some(ast_map::NodeItem(item)) => item,
+        _ => return,
+    };
+    if !cx.checked_raw_pointers.insert(item.id) { return }
     match item.node {
         ast::ItemStruct(..) | ast::ItemEnum(..) => {
             let mut visitor = RawPtrDerivingVisitor { cx: cx };
@@ -1848,7 +1868,8 @@ pub fn check_crate(tcx: &ty::ctxt,
         cur_struct_def_id: -1,
         is_doc_hidden: false,
         lint_stack: Vec::new(),
-        negated_expr_id: -1
+        negated_expr_id: -1,
+        checked_raw_pointers: NodeSet::new(),
     };
 
     // Install default lint levels, followed by the command line levels, and
index 590086e9d3ac168bcfc1bf705962b2284bf8da9a..5d4350f8fb5cd9479191c631f85c2d79e0a1e652 100644 (file)
@@ -26,6 +26,7 @@
 
 /// Highlights some source code, returning the HTML output.
 pub fn highlight(src: &str, class: Option<&str>) -> StrBuf {
+    debug!("highlighting: ================\n{}\n==============", src);
     let sess = parse::new_parse_sess();
     let fm = parse::string_to_filemap(&sess,
                                       src.to_strbuf(),
index 76f7949bcf9c2d90e9add8fe965356a09898c05f..d6831e225bc2931384cf9a663a44170146e9386b 100644 (file)
@@ -149,6 +149,7 @@ pub fn render(w: &mut io::Writer, s: &str, print_toc: bool) -> fmt::Result {
             let my_opaque: &MyOpaque = &*((*opaque).opaque as *MyOpaque);
             slice::raw::buf_as_slice((*text).data, (*text).size as uint, |text| {
                 let text = str::from_utf8(text).unwrap();
+                debug!("docblock: ==============\n{}\n=======", text);
                 let mut lines = text.lines().filter(|l| {
                     stripped_filtered_line(*l).is_none()
                 });
index ccc9d73d5447fb7c2df93ee1a241b86a26c72d32..1898e8bf000a8c581e047f3408c69df4c98f3af5 100644 (file)
@@ -262,7 +262,8 @@ pub fn expand_item(it: @ast::Item, fld: &mut MacroExpander)
     let it = expand_item_modifiers(it, fld);
 
     let mut decorator_items = SmallVector::zero();
-    for attr in it.attrs.iter().rev() {
+    let mut new_attrs = Vec::new();
+    for attr in it.attrs.iter() {
         let mname = attr.name();
 
         match fld.extsbox.find(&intern(mname.get())) {
@@ -286,7 +287,7 @@ pub fn expand_item(it: @ast::Item, fld: &mut MacroExpander)
 
                 fld.cx.bt_pop();
             }
-            _ => {}
+            _ => new_attrs.push((*attr).clone()),
         }
     }
 
@@ -294,14 +295,21 @@ pub fn expand_item(it: @ast::Item, fld: &mut MacroExpander)
         ast::ItemMac(..) => expand_item_mac(it, fld),
         ast::ItemMod(_) | ast::ItemForeignMod(_) => {
             fld.cx.mod_push(it.ident);
-            let macro_escape = contains_macro_escape(it.attrs.as_slice());
+            let macro_escape = contains_macro_escape(new_attrs.as_slice());
             let result = with_exts_frame!(fld.extsbox,
                                           macro_escape,
                                           noop_fold_item(it, fld));
             fld.cx.mod_pop();
             result
         },
-        _ => noop_fold_item(it, fld)
+        _ => {
+            let it = @ast::Item {
+                attrs: new_attrs,
+                ..(*it).clone()
+
+            };
+            noop_fold_item(it, fld)
+        }
     };
 
     new_items.push_all(decorator_items);
index 2201b08f2ca48fb6e0e2a276d25a69f8a2be4b0c..a83bb7d1bf5751bc1bdff1636a22583378d90a04 100644 (file)
@@ -2241,9 +2241,6 @@ pub fn parse_prefix_expr(&mut self) -> @Expr {
               ExprVec(..) if m == MutImmutable => {
                 ExprVstore(e, ExprVstoreSlice)
               }
-              ExprLit(lit) if lit_is_str(lit) && m == MutImmutable => {
-                ExprVstore(e, ExprVstoreSlice)
-              }
               ExprVec(..) if m == MutMutable => {
                 ExprVstore(e, ExprVstoreMutSlice)
               }
index a039959557267a6de73e1203975df662b73212cb..326f31d11e958e050442e4ba2863b8b703cd67db 100644 (file)
@@ -168,7 +168,7 @@ pub fn tt_to_str(tt: &ast::TokenTree) -> StrBuf {
 }
 
 pub fn tts_to_str(tts: &[ast::TokenTree]) -> StrBuf {
-    to_str(|s| s.print_tts(&tts))
+    to_str(|s| s.print_tts(tts))
 }
 
 pub fn stmt_to_str(stmt: &ast::Stmt) -> StrBuf {
@@ -1258,28 +1258,7 @@ pub fn print_expr(&mut self, expr: &ast::Expr) -> IoResult<()> {
             }
             ast::ExprAddrOf(m, expr) => {
                 try!(word(&mut self.s, "&"));
-
-                // `ExprAddrOf(ExprLit("str"))` should be `&&"str"` instead of `&"str"`
-                // since `&"str"` is `ExprVstore(ExprLit("str"))` which has same meaning to
-                // `"str"`.
-                // In many cases adding parentheses (`&("str")`) would help, but it become invalid
-                // if expr is in `PatLit()`.
-                let needs_extra_amp = match expr.node {
-                    ast::ExprLit(lit) => {
-                        match lit.node {
-                            ast::LitStr(..) => true,
-                            _ => false,
-                        }
-                    }
-                    ast::ExprVec(..) => true,
-                    _ => false,
-                };
-                if needs_extra_amp {
-                    try!(word(&mut self.s, "&"));
-                }
-
                 try!(self.print_mutability(m));
-
                 try!(self.print_expr_maybe_paren(expr));
             }
             ast::ExprLit(lit) => try!(self.print_literal(lit)),
index b1181a3c17c5ad24d8a3666e45043236fbcf8229..53b371e06cbe0d14f02dcebce2f1cceafff67ef0 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
@@ -10,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-pretty very bad with line comments
+
 extern crate collections;
 extern crate rand;
 extern crate time;
index e2bcc55d139828ca5da5186c4f25b242ce27a17a..04032c4aa3903661c0ea30b1639672d67038e34b 100644 (file)
@@ -9,8 +9,8 @@
 // except according to those terms.
 
 // ignore-android: FIXME(#10393)
+// ignore-pretty very bad with line comments
 
-// ignore-pretty the `let to_child` line gets an extra newline
 // multi tasking k-nucleotide
 
 extern crate collections;
index dfa287459f33cc85acdcb1d146ba9bd5cb286f4b..1434838e59bce81008381670be25f4a830cc4a95 100644 (file)
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 // ignore-android see #10393 #13206
-// ignore-pretty
 
 extern crate sync;
 
index ee715aecec4fcb9ff1a76ed6658dfdbf372b3bf9..e17324ee596491dfb58a87439bd880ce37e70060 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-pretty very bad with line comments
+
 extern crate sync;
 
 use std::io;
index 4ee4f94d4354bc8e8e3685f9f267c9b3a6f52433..fdd711d22c760f93e9eb79f1ffb679f0746f0fba 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-pretty very bad with line comments
 // ignore-android doesn't terminate?
-// ignore-pretty
 
 use std::iter::range_step;
 use std::io::{stdin, stdout, File};
index bd47734c3da8971a87b37c533b899252d0664dff..58568282e1584ab1c71d89254c1e55233f6577c6 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
@@ -10,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-pretty very bad with line comments
+
 #![feature(managed_boxes)]
 
 use std::io;
index 35c314dac93cc007af49989e89790132fa778845..442386e30586eb631cff7f9a4dc925f150fd137c 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
@@ -17,6 +15,8 @@
 //
 // The filename is a song reference; google it in quotes.
 
+// ignore-pretty very bad with line comments
+
 use std::comm;
 use std::os;
 use std::task;
index ea0f5d34b72e52578135807161b32aa296d44976..6b875ff268dd8dd3926423204b3e7f5378b6a24b 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty -- comments are unfaithfully preserved
-
 #![allow(unused_variable)]
 #![allow(dead_assignment)]
 
index 47f92d9f4b1a0a2c934847cbe2dc931c862be7c9..f33e5e9b02d59d46826147fffc2762980697089b 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty -- comments are unfaithfully preserved
-
 fn main() {
     let mut x: Option<int> = None;
     match x {
index 168a331e9fe29bbc63bc361371d9ba08c27f8b6c..68410ae4fe1965c0ccb3b8b6d44ba6fa1366c493 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
index d79b7e040c769f88d0e73fce2fe4c81992ffa9ac..0db097ec003c20665f41a24e4cd24e90769d44c7 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
index 1a920c7871e1cecc421141e75fb2561aaca689d2..cd36d930604621f662f4a073aaee0e87843dc8d1 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
index 9b7966b0af05b9f58d298f998478537f5fd6db03..ca24192e797e23d205a88a5dc0c1ac00e3cec7e0 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
index fd600907ddb2bc43b3e3c0102373b4f39aaf7649..0ef666031114eacaae619625919022eb65fdaf95 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty
 // aux-build:anon-extern-mod-cross-crate-1.rs
 extern crate anonexternmod;
 
index 9da3a7079df62240b135f96ef754500db33ddfe3..f8eaa99b5f0bc655d85c4c1afd478c713b6d282a 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
index ade286663a19ccf4bc7ff2f4b7710d314483f11e..7b6680294999f7c7ca0748a4bbc71373891cdfca 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
index 983cd00f39cb8f1339d7e152528e93542966283a..30c01ba9d51510c80bb8ebd48bc53ae232afe445 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty #13324
-
 #![allow(dead_code)]
 
 fn foo<T>() {}
index 55e2615835ab4c162f071250ac63f0bb823ea3a4..3cd50bfff32552a639b47d4d61f6da50e4af2882 100644 (file)
@@ -8,18 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty - does not converge
-
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 extern crate serialize; // {En,De}codable
 extern crate rand; // Rand
 
index 4d445db302b0bffb2191520020bdd71616ec1f2f..b5245275617228cde6a0070c32ed9d787b364a60 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty: `--pretty expand` creates unnecessary `unsafe` block
-
 #![feature(macro_rules, managed_boxes)]
 #![deny(warnings)]
 #![allow(unused_must_use)]
@@ -77,6 +75,7 @@ pub fn main() {
     t!(format!("{foo} {1} {bar} {0}", 0, 1, foo=2, bar=3), "2 1 3 0");
     t!(format!("{} {0}", "a"), "a a");
     t!(format!("{foo_bar}", foo_bar=1), "1");
+    t!(format!("{:d}", 5 + 5), "10");
 
     // Methods should probably work
     t!(format!("{0, plural, =1{a#} =2{b#} zero{c#} other{d#}}", 0u), "c0");
index 2603e2d1b099c26d0231a22f236067e590f16318..ef5ef2f215cc25fdcab8966cc3ff9d75cee4f0cb 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty
 // aux-build:foreign_lib.rs
 
 // The purpose of this test is to check that we can
index fbb404b3809d720d578a3a08385d1862bedf7711..585ade71fc6037278aef2a9d93733a5b2ec38a0b 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// no-pretty-expanded
+
 // This file is intended to test only that methods are automatically
 // reachable for each numeric type, for each exported impl, with no imports
 // necessary. Testing the methods of the impls is done within the source
 // file for each numeric type.
+
 pub fn main() {
 // ints
     // num
index 456a5c5d2975366bd50f5fa41a49a4b05c0ab7ff..7752aed7236a687616f2e1e04a1e9c7d7e40847b 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
index 70c7200bee9aeb4433866b5bcb5707e2285bdf15..759b066c8dbf5d257fb7056bf2abb6e36116a6f5 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-pretty
-
 static a: int =
 (((((((((((((((((((((((((((((((((((((((((((((((((((
 (((((((((((((((((((((((((((((((((((((((((((((((((((
index 0a6e5ce0b6796e58a28fd603f68b973232ceb626..98dd3772a4f9276be8cb9aa836ee6aff114c6120 100644 (file)
@@ -1,5 +1,3 @@
-// ignore-pretty
-
 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.