From 9c906da7ade767925aca1da06f139152835b661b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 14 Mar 2015 23:40:12 -0700 Subject: [PATCH 01/69] std: Fix create_dir_all for empty paths Recent changes in path semantics meant that if none of the components in a relative path existed as a part of a call to `create_dir_all` then the call would fail as `create_dir("")` would be attempted and would fail with an OS error. --- src/libstd/fs/mod.rs | 2 +- src/test/run-pass/create-dir-all-bare.rs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/test/run-pass/create-dir-all-bare.rs diff --git a/src/libstd/fs/mod.rs b/src/libstd/fs/mod.rs index ac1f5993aa145..813283ed16465 100644 --- a/src/libstd/fs/mod.rs +++ b/src/libstd/fs/mod.rs @@ -570,7 +570,7 @@ pub fn create_dir(path: &P) -> io::Result<()> { #[stable(feature = "rust1", since = "1.0.0")] pub fn create_dir_all(path: &P) -> io::Result<()> { let path = path.as_path(); - if path.is_dir() { return Ok(()) } + if path == Path::new("") || path.is_dir() { return Ok(()) } if let Some(p) = path.parent() { try!(create_dir_all(p)) } create_dir(path) } diff --git a/src/test/run-pass/create-dir-all-bare.rs b/src/test/run-pass/create-dir-all-bare.rs new file mode 100644 index 0000000000000..3a4286c292709 --- /dev/null +++ b/src/test/run-pass/create-dir-all-bare.rs @@ -0,0 +1,18 @@ +// Copyright 2015 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::env; +use std::fs::{self, TempDir}; + +fn main() { + let td = TempDir::new("create-dir-all-bare").unwrap(); + env::set_current_dir(td.path()).unwrap(); + fs::create_dir_all("create-dir-all-bare").unwrap(); +} From a7f00cbc0cde133bca5fd308fa1df43fa691e68c Mon Sep 17 00:00:00 2001 From: Jordan Woehr Date: Tue, 17 Mar 2015 23:23:13 -0600 Subject: [PATCH 02/69] Fix a bug in inline assembly codegen where host clobbers were always used regardless of target --- src/librustc_trans/trans/asm.rs | 73 ++++++++++++--------------------- 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/src/librustc_trans/trans/asm.rs b/src/librustc_trans/trans/asm.rs index a3bd0cf6b1a62..df0d212f9e26c 100644 --- a/src/librustc_trans/trans/asm.rs +++ b/src/librustc_trans/trans/asm.rs @@ -76,43 +76,34 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm) // no failure occurred preparing operands, no need to cleanup fcx.pop_custom_cleanup_scope(temp_scope); - let mut constraints = constraints.iter() - .map(|s| s.to_string()) - .chain(ext_constraints.into_iter()) - .collect::>() - .connect(","); - - let mut clobbers = ia.clobbers.iter() - .map(|s| format!("~{{{}}}", &s)) - .collect::>() - .connect(","); - let more_clobbers = get_clobbers(); - if !more_clobbers.is_empty() { - if !clobbers.is_empty() { - clobbers.push(','); - } - clobbers.push_str(&more_clobbers[..]); - } - - // Add the clobbers to our constraints list - if clobbers.len() != 0 && constraints.len() != 0 { - constraints.push(','); - constraints.push_str(&clobbers[..]); - } else { - constraints.push_str(&clobbers[..]); - } + let clobbers = ia.clobbers.iter() + .map(|s| format!("~{{{}}}", &s)) + .collect::>(); + + // Default per-arch clobbers + // Basically what clang does + let arch_clobbers = match bcx.sess().target.target.arch.as_slice() { + "x86" | "x86_64" => vec!("~{dirflag}", "~{fpsr}", "~{flags}"), + _ => Vec::new() + }; - debug!("Asm Constraints: {}", &constraints[..]); + let all_constraints= constraints.iter() + .map(|s| s.to_string()) + .chain(ext_constraints.into_iter()) + .chain(clobbers.into_iter()) + .chain(arch_clobbers.into_iter() + .map(|s| s.to_string())) + .collect::>() + .connect(","); - let num_outputs = outputs.len(); + debug!("Asm Constraints: {}", &all_constraints[..]); // Depending on how many outputs we have, the return type is different - let output_type = if num_outputs == 0 { - Type::void(bcx.ccx()) - } else if num_outputs == 1 { - output_types[0] - } else { - Type::struct_(bcx.ccx(), &output_types[..], false) + let num_outputs = outputs.len(); + let output_type = match num_outputs { + 0 => Type::void(bcx.ccx()), + 1 => output_types[0], + _ => Type::struct_(bcx.ccx(), &output_types[..], false) }; let dialect = match ia.dialect { @@ -121,10 +112,10 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm) }; let asm = CString::new(ia.asm.as_bytes()).unwrap(); - let constraints = CString::new(constraints).unwrap(); + let constraint_cstr = CString::new(all_constraints).unwrap(); let r = InlineAsmCall(bcx, asm.as_ptr(), - constraints.as_ptr(), + constraint_cstr.as_ptr(), &inputs, output_type, ia.volatile, @@ -158,15 +149,3 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm) } -// Default per-arch clobbers -// Basically what clang does - -#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] -fn get_clobbers() -> String { - "".to_string() -} - -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn get_clobbers() -> String { - "~{dirflag},~{fpsr},~{flags}".to_string() -} From b92fee9a871bbf260201d41b90b40931d995e5c1 Mon Sep 17 00:00:00 2001 From: Jordan Woehr Date: Wed, 18 Mar 2015 07:43:01 -0600 Subject: [PATCH 03/69] Remove unnecessary vector creation. --- src/librustc_trans/trans/asm.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/librustc_trans/trans/asm.rs b/src/librustc_trans/trans/asm.rs index df0d212f9e26c..33817bb952e98 100644 --- a/src/librustc_trans/trans/asm.rs +++ b/src/librustc_trans/trans/asm.rs @@ -77,8 +77,7 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm) fcx.pop_custom_cleanup_scope(temp_scope); let clobbers = ia.clobbers.iter() - .map(|s| format!("~{{{}}}", &s)) - .collect::>(); + .map(|s| format!("~{{{}}}", &s)); // Default per-arch clobbers // Basically what clang does @@ -90,8 +89,8 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm) let all_constraints= constraints.iter() .map(|s| s.to_string()) .chain(ext_constraints.into_iter()) - .chain(clobbers.into_iter()) - .chain(arch_clobbers.into_iter() + .chain(clobbers) + .chain(arch_clobbers.iter() .map(|s| s.to_string())) .collect::>() .connect(","); From 959a0e69c9d2e4cabef77d97880dbeb2168f7f81 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 18 Mar 2015 11:43:46 -0700 Subject: [PATCH 04/69] std: Stabilize marker::MarkerTrait This trait has proven quite useful when defining marker traits to avoid the semi-confusing `PhantomFn` trait and it looks like it will continue to be a useful tool for defining these traits. --- src/libcore/marker.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 1b866501b8ea1..38b07027b0ebe 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -270,6 +270,7 @@ macro_rules! impls{ /// any methods, but instead is used to gate access to data. /// /// FIXME. Better documentation needed here! +#[stable(feature = "rust1", since = "1.0.0")] pub trait MarkerTrait : PhantomFn { } // ~~~~~ <-- FIXME(#22806)? // From f945190e6352a1bc965a117569532643319b400f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 18 Mar 2015 11:54:06 -0700 Subject: [PATCH 05/69] rustc: Remove some long deprecated features: * no_split_stack was renamed to no_stack_check * deriving was renamed to derive * `use foo::mod` was renamed to `use foo::self`; * legacy lifetime definitions in closures have been replaced with `for` syntax * `fn foo() -> &A + B` has been deprecated for some time (needs parens) * Obsolete `for Sized?` syntax * Obsolete `Sized? Foo` syntax * Obsolete `|T| -> U` syntax --- src/librustc_trans/trans/base.rs | 5 - src/libsyntax/ext/deriving/mod.rs | 10 - src/libsyntax/feature_gate.rs | 2 - src/libsyntax/parse/obsolete.rs | 19 -- src/libsyntax/parse/parser.rs | 276 +----------------- src/libsyntax/print/pprust.rs | 14 +- .../compile-fail/deriving-is-deprecated.rs | 15 - .../hrtb-precedence-of-plus-error-message.rs | 36 --- src/test/parse-fail/obsolete-for-sized.rs | 17 -- .../run-pass/deprecated-no-split-stack.rs | 14 - 10 files changed, 29 insertions(+), 379 deletions(-) delete mode 100644 src/test/compile-fail/deriving-is-deprecated.rs delete mode 100644 src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs delete mode 100644 src/test/parse-fail/obsolete-for-sized.rs delete mode 100644 src/test/run-pass/deprecated-no-split-stack.rs diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index f584de7c47f3b..d247adc3581e2 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -428,11 +428,6 @@ pub fn set_llvm_fn_attrs(ccx: &CrateContext, attrs: &[ast::Attribute], llfn: Val let mut used = true; match &attr.name()[..] { "no_stack_check" => unset_split_stack(llfn), - "no_split_stack" => { - unset_split_stack(llfn); - ccx.sess().span_warn(attr.span, - "no_split_stack is a deprecated synonym for no_stack_check"); - } "cold" => unsafe { llvm::LLVMAddFunctionAttribute(llfn, llvm::FunctionIndex as c_uint, diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs index 2631c28cf2fe9..d8c50b5a0942a 100644 --- a/src/libsyntax/ext/deriving/mod.rs +++ b/src/libsyntax/ext/deriving/mod.rs @@ -78,14 +78,6 @@ pub mod totalord; pub mod generic; -fn expand_deprecated_deriving(cx: &mut ExtCtxt, - span: Span, - _: &MetaItem, - _: &Item, - _: &mut FnMut(P)) { - cx.span_err(span, "`deriving` has been renamed to `derive`"); -} - fn expand_derive(cx: &mut ExtCtxt, _: Span, mitem: &MetaItem, @@ -151,8 +143,6 @@ macro_rules! derive_traits { env.insert(intern("derive"), Modifier(Box::new(expand_derive))); - env.insert(intern("deriving"), - Decorator(Box::new(expand_deprecated_deriving))); } fn is_builtin_trait(name: &str) -> bool { diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 0a9980c892527..ac11febd7464f 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -201,7 +201,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[ ("no_mangle", Normal), ("no_link", Normal), ("derive", Normal), - ("deriving", Normal), // deprecation err in expansion ("should_fail", Normal), ("should_panic", Normal), ("ignore", Normal), @@ -259,7 +258,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[ ("link_section", Whitelisted), ("no_builtins", Whitelisted), ("no_mangle", Whitelisted), - ("no_split_stack", Whitelisted), ("no_stack_check", Whitelisted), ("packed", Whitelisted), ("static_assert", Gated("static_assert", diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index ee646d95f35a4..7da0a6de5479c 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -22,9 +22,6 @@ use ptr::P; /// The specific types of unsupported syntax #[derive(Copy, PartialEq, Eq, Hash)] pub enum ObsoleteSyntax { - Sized, - ForSized, - ClosureType, ClosureKind, EmptyIndex, } @@ -49,27 +46,11 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> { /// Reports an obsolete syntax non-fatal error. fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) { let (kind_str, desc, error) = match kind { - ObsoleteSyntax::ForSized => ( - "for Sized?", - "no longer required. Traits (and their `Self` type) do not have the `Sized` bound \ - by default", - true, - ), - ObsoleteSyntax::ClosureType => ( - "`|usize| -> bool` closure type", - "use unboxed closures instead, no type annotation needed", - true, - ), ObsoleteSyntax::ClosureKind => ( "`:`, `&mut:`, or `&:`", "rely on inference instead", true, ), - ObsoleteSyntax::Sized => ( - "`Sized? T` for removing the `Sized` bound", - "write `T: ?Sized` instead", - true, - ), ObsoleteSyntax::EmptyIndex => ( "[]", "write `[..]` instead", diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index bf2b2c0afe6c3..28f015f4f3f6e 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -518,11 +518,7 @@ impl<'a> Parser<'a> { pub fn parse_path_list_item(&mut self) -> ast::PathListItem { let lo = self.span.lo; - let node = if self.eat_keyword_noexpect(keywords::Mod) { - let span = self.last_span; - self.span_warn(span, "deprecated syntax; use the `self` keyword now"); - ast::PathListMod { id: ast::DUMMY_NODE_ID } - } else if self.eat_keyword(keywords::SelfValue) { + let node = if self.eat_keyword(keywords::SelfValue) { ast::PathListMod { id: ast::DUMMY_NODE_ID } } else { let ident = self.parse_ident(); @@ -621,23 +617,6 @@ impl<'a> Parser<'a> { } } - /// Expect and consume a `|`. If `||` is seen, replace it with a single - /// `|` and continue. If a `|` is not seen, signal an error. - fn expect_or(&mut self) { - self.expected_tokens.push(TokenType::Token(token::BinOp(token::Or))); - match self.token { - token::BinOp(token::Or) => self.bump(), - token::OrOr => { - let span = self.span; - let lo = span.lo + BytePos(1); - self.replace_token(token::BinOp(token::Or), lo, span.hi) - } - _ => { - self.expect_one_of(&[], &[]); - } - } - } - pub fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option) { match suffix { None => {/* everything ok */} @@ -677,28 +656,6 @@ impl<'a> Parser<'a> { } } - /// Parse a sequence bracketed by `|` and `|`, stopping before the `|`. - fn parse_seq_to_before_or(&mut self, - sep: &token::Token, - mut f: F) - -> Vec where - F: FnMut(&mut Parser) -> T, - { - let mut first = true; - let mut vector = Vec::new(); - while self.token != token::BinOp(token::Or) && - self.token != token::OrOr { - if first { - first = false - } else { - self.expect(sep) - } - - vector.push(f(self)) - } - vector - } - /// Expect and consume a GT. if a >> is seen, replace it /// with a single > and continue. If a GT is not seen, /// signal an error. @@ -1010,11 +967,6 @@ impl<'a> Parser<'a> { self.check_keyword(keywords::Extern) } - /// Is the current token one of the keywords that signals a closure type? - pub fn token_is_closure_keyword(&mut self) -> bool { - self.check_keyword(keywords::Unsafe) - } - pub fn get_lifetime(&mut self) -> ast::Ident { match self.token { token::Lifetime(ref ident) => *ident, @@ -1044,12 +996,9 @@ impl<'a> Parser<'a> { let lifetime_defs = self.parse_late_bound_lifetime_defs(); // examine next token to decide to do - if self.token_is_bare_fn_keyword() || self.token_is_closure_keyword() { - self.parse_ty_bare_fn_or_ty_closure(lifetime_defs) - } else if self.check(&token::ModSep) || - self.token.is_ident() || - self.token.is_path() - { + if self.token_is_bare_fn_keyword() { + self.parse_ty_bare_fn(lifetime_defs) + } else { let hi = self.span.hi; let trait_ref = self.parse_trait_ref(); let poly_trait_ref = ast::PolyTraitRef { bound_lifetimes: lifetime_defs, @@ -1065,8 +1014,6 @@ impl<'a> Parser<'a> { .chain(other_bounds.into_vec().into_iter()) .collect(); ast::TyPolyTraitRef(all_bounds) - } else { - self.parse_ty_closure(lifetime_defs) } } @@ -1096,7 +1043,6 @@ impl<'a> Parser<'a> { }; self.expect_keyword(keywords::Fn); - let lifetime_defs = self.parse_legacy_lifetime_defs(lifetime_defs); let (inputs, variadic) = self.parse_fn_args(false, true); let ret_ty = self.parse_ret_ty(); let decl = P(FnDecl { @@ -1141,71 +1087,6 @@ impl<'a> Parser<'a> { self.obsolete(span, ObsoleteSyntax::ClosureKind); } - pub fn parse_ty_bare_fn_or_ty_closure(&mut self, lifetime_defs: Vec) -> Ty_ { - // Both bare fns and closures can begin with stuff like unsafe - // and extern. So we just scan ahead a few tokens to see if we see - // a `fn`. - // - // Closure: [unsafe] <'lt> |S| [:Bounds] -> T - // Fn: [unsafe] [extern "ABI"] fn <'lt> (S) -> T - - if self.check_keyword(keywords::Fn) { - self.parse_ty_bare_fn(lifetime_defs) - } else if self.check_keyword(keywords::Extern) { - self.parse_ty_bare_fn(lifetime_defs) - } else if self.check_keyword(keywords::Unsafe) { - if self.look_ahead(1, |t| t.is_keyword(keywords::Fn) || - t.is_keyword(keywords::Extern)) { - self.parse_ty_bare_fn(lifetime_defs) - } else { - self.parse_ty_closure(lifetime_defs) - } - } else { - self.parse_ty_closure(lifetime_defs) - } - } - - /// Parse a TyClosure type - pub fn parse_ty_closure(&mut self, lifetime_defs: Vec) -> Ty_ { - /* - - [unsafe] <'lt> |S| [:Bounds] -> T - ^~~~~~~^ ^~~~^ ^ ^~~~~~~~^ ^ - | | | | | - | | | | Return type - | | | Closure bounds - | | Argument types - | Deprecated lifetime defs - | - Function Style - - */ - - let ty_closure_span = self.last_span; - - // To be helpful, parse the closure type as ever - let _ = self.parse_unsafety(); - - let _ = self.parse_legacy_lifetime_defs(lifetime_defs); - - if !self.eat(&token::OrOr) { - self.expect_or(); - - let _ = self.parse_seq_to_before_or( - &token::Comma, - |p| p.parse_arg_general(false)); - self.expect_or(); - } - - let _ = self.parse_colon_then_ty_param_bounds(BoundParsingMode::Bare); - - let _ = self.parse_ret_ty(); - - self.obsolete(ty_closure_span, ObsoleteSyntax::ClosureType); - - TyInfer - } - pub fn parse_unsafety(&mut self) -> Unsafety { if self.eat_keyword(keywords::Unsafe) { return Unsafety::Unsafe; @@ -1214,27 +1095,6 @@ impl<'a> Parser<'a> { } } - /// Parses `[ 'for' '<' lifetime_defs '>' ]' - fn parse_legacy_lifetime_defs(&mut self, - lifetime_defs: Vec) - -> Vec - { - if self.token == token::Lt { - self.bump(); - if lifetime_defs.is_empty() { - self.warn("deprecated syntax; use the `for` keyword now \ - (e.g. change `fn<'a>` to `for<'a> fn`)"); - let lifetime_defs = self.parse_lifetime_defs(); - self.expect_gt(); - lifetime_defs - } else { - self.fatal("cannot use new `for` keyword and older syntax together"); - } - } else { - lifetime_defs - } - } - /// Parse the items in a trait declaration pub fn parse_trait_items(&mut self) -> Vec> { self.parse_unspanned_seq( @@ -1323,19 +1183,7 @@ impl<'a> Parser<'a> { if self.eat(&token::Not) { NoReturn(self.span) } else { - let t = self.parse_ty(); - - // We used to allow `fn foo() -> &T + U`, but don't - // anymore. If we see it, report a useful error. This - // only makes sense because `parse_ret_ty` is only - // used in fn *declarations*, not fn types or where - // clauses (i.e., not when parsing something like - // `FnMut() -> T + Send`, where the `+` is legal). - if self.token == token::BinOp(token::Plus) { - self.warn("deprecated syntax: `()` are required, see RFC 438 for details"); - } - - Return(t) + Return(self.parse_ty()) } } else { let pos = self.span.lo; @@ -1423,18 +1271,9 @@ impl<'a> Parser<'a> { self.parse_borrowed_pointee() } else if self.check_keyword(keywords::For) { self.parse_for_in_type() - } else if self.token_is_bare_fn_keyword() || - self.token_is_closure_keyword() { - // BARE FUNCTION OR CLOSURE - self.parse_ty_bare_fn_or_ty_closure(Vec::new()) - } else if self.check(&token::BinOp(token::Or)) || - self.token == token::OrOr || - (self.token == token::Lt && - self.look_ahead(1, |t| { - *t == token::Gt || t.is_lifetime() - })) { - // CLOSURE - self.parse_ty_closure(Vec::new()) + } else if self.token_is_bare_fn_keyword() { + // BARE FUNCTION + self.parse_ty_bare_fn(Vec::new()) } else if self.eat_keyword_noexpect(keywords::Typeof) { // TYPEOF // In order to not be ambiguous, the type must be surrounded by parens. @@ -3968,56 +3807,19 @@ impl<'a> Parser<'a> { return OwnedSlice::from_vec(result); } - fn trait_ref_from_ident(ident: Ident, span: Span) -> TraitRef { - let segment = ast::PathSegment { - identifier: ident, - parameters: ast::PathParameters::none() - }; - let path = ast::Path { - span: span, - global: false, - segments: vec![segment], - }; - ast::TraitRef { - path: path, - ref_id: ast::DUMMY_NODE_ID, - } - } - - /// Matches typaram = (unbound `?`)? IDENT (`?` unbound)? optbounds ( EQ ty )? + /// Matches typaram = IDENT (`?` unbound)? optbounds ( EQ ty )? fn parse_ty_param(&mut self) -> TyParam { - // This is a bit hacky. Currently we are only interested in a single - // unbound, and it may only be `Sized`. To avoid backtracking and other - // complications, we parse an ident, then check for `?`. If we find it, - // we use the ident as the unbound, otherwise, we use it as the name of - // type param. Even worse, we need to check for `?` before or after the - // bound. - let mut span = self.span; - let mut ident = self.parse_ident(); - let mut unbound = None; - if self.eat(&token::Question) { - let tref = Parser::trait_ref_from_ident(ident, span); - unbound = Some(tref); - span = self.span; - ident = self.parse_ident(); - self.obsolete(span, ObsoleteSyntax::Sized); - } + let span = self.span; + let ident = self.parse_ident(); - let mut bounds = self.parse_colon_then_ty_param_bounds(BoundParsingMode::Modified); - if let Some(unbound) = unbound { - let mut bounds_as_vec = bounds.into_vec(); - bounds_as_vec.push(TraitTyParamBound(PolyTraitRef { bound_lifetimes: vec![], - trait_ref: unbound, - span: span }, - TraitBoundModifier::Maybe)); - bounds = OwnedSlice::from_vec(bounds_as_vec); - }; + let bounds = self.parse_colon_then_ty_param_bounds(BoundParsingMode::Modified); let default = if self.check(&token::Eq) { self.bump(); Some(self.parse_ty_sum()) - } - else { None }; + } else { + None + }; TyParam { ident: ident, @@ -4648,22 +4450,9 @@ impl<'a> Parser<'a> { let ident = self.parse_ident(); let mut tps = self.parse_generics(); - // This is not very accurate, but since unbound only exists to catch - // obsolete syntax, the span is unlikely to ever be used. - let unbound_span = self.span; - let unbound = self.parse_for_sized(); // Parse supertrait bounds. - let mut bounds = self.parse_colon_then_ty_param_bounds(BoundParsingMode::Bare); - - if let Some(unbound) = unbound { - let mut bounds_as_vec = bounds.into_vec(); - bounds_as_vec.push(TraitTyParamBound(PolyTraitRef { bound_lifetimes: vec![], - trait_ref: unbound, - span: unbound_span }, - TraitBoundModifier::Maybe)); - bounds = OwnedSlice::from_vec(bounds_as_vec); - }; + let bounds = self.parse_colon_then_ty_param_bounds(BoundParsingMode::Bare); self.parse_where_clause(&mut tps); @@ -4950,39 +4739,6 @@ impl<'a> Parser<'a> { else { Inherited } } - fn parse_for_sized(&mut self) -> Option { - // FIXME, this should really use TraitBoundModifier, but it will get - // re-jigged shortly in any case, so leaving the hacky version for now. - if self.eat_keyword(keywords::For) { - let span = self.span; - - let mut ate_question = false; - if self.eat(&token::Question) { - ate_question = true; - } - let ident = self.parse_ident(); - if self.eat(&token::Question) { - if ate_question { - self.span_err(span, - "unexpected `?`"); - } - ate_question = true; - } - if !ate_question { - self.span_err(span, - "expected `?Sized` after `for` in trait item"); - return None; - } - let _tref = Parser::trait_ref_from_ident(ident, span); - - self.obsolete(span, ObsoleteSyntax::ForSized); - - None - } else { - None - } - } - /// Given a termination token, parse all of the items in a module fn parse_mod_items(&mut self, term: &token::Token, inner_lo: BytePos) -> Mod { let mut items = vec![]; diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 07303ba51ff70..94643d4412e2b 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2699,8 +2699,20 @@ impl<'a> State<'a> { opt_explicit_self: Option<&ast::ExplicitSelf_>) -> io::Result<()> { try!(self.ibox(indent_unit)); + if generics.lifetimes.len() > 0 || generics.ty_params.len() > 0 { + try!(word(&mut self.s, "for")); + try!(self.print_generics(generics)); + } + let generics = ast::Generics { + lifetimes: Vec::new(), + ty_params: OwnedSlice::empty(), + where_clause: ast::WhereClause { + id: ast::DUMMY_NODE_ID, + predicates: Vec::new(), + }, + }; try!(self.print_fn(decl, unsafety, abi, name, - generics, opt_explicit_self, + &generics, opt_explicit_self, ast::Inherited)); self.end() } diff --git a/src/test/compile-fail/deriving-is-deprecated.rs b/src/test/compile-fail/deriving-is-deprecated.rs deleted file mode 100644 index 060e178eef2b4..0000000000000 --- a/src/test/compile-fail/deriving-is-deprecated.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2015 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -#[deriving(Clone)] //~ ERROR `deriving` has been renamed to `derive` -struct Foo; - -fn main() {} diff --git a/src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs b/src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs deleted file mode 100644 index db67249bbd93a..0000000000000 --- a/src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(unboxed_closures)] - -// Test that we suggest the correct parentheses - -trait Bar { - fn dummy(&self) { } -} - -struct Foo<'a> { - a: &'a Bar+'a, - //~^ ERROR E0178 - //~^^ HELP perhaps you meant `&'a (Bar + 'a)`? - - b: &'a mut Bar+'a, - //~^ ERROR E0178 - //~^^ HELP perhaps you meant `&'a mut (Bar + 'a)`? - - c: Box, // OK, no paren needed in this context - - d: fn() -> Bar+'a, - //~^ ERROR E0178 - //~^^ HELP perhaps you forgot parentheses - //~^^^ WARN deprecated syntax -} - -fn main() { } diff --git a/src/test/parse-fail/obsolete-for-sized.rs b/src/test/parse-fail/obsolete-for-sized.rs deleted file mode 100644 index 1b86d08a50dff..0000000000000 --- a/src/test/parse-fail/obsolete-for-sized.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2015 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Test that we generate obsolete syntax errors around usages of `for Sized?` - -trait Foo for Sized? {} //~ ERROR obsolete syntax: for Sized? - -trait Bar for ?Sized {} //~ ERROR obsolete syntax: for Sized? - -fn main() { } diff --git a/src/test/run-pass/deprecated-no-split-stack.rs b/src/test/run-pass/deprecated-no-split-stack.rs deleted file mode 100644 index 31ba5dde8155d..0000000000000 --- a/src/test/run-pass/deprecated-no-split-stack.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//~ WARNING no_split_stack is a deprecated synonym for no_stack_check -#[no_split_stack] -fn main() { -} From 6f693e94868b12fcffa9d5b53b2ca02778ff8daa Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Wed, 18 Mar 2015 23:36:19 -0700 Subject: [PATCH 06/69] Stabilize Entry types This commit marks as `#[stable]` the `Entry` types for the maps provided by `std`. The main reason these had been left unstable previously was uncertainty about an eventual trait design, but several plausible designs have been proposed that all work fine with the current type definitions. --- src/libcollections/btree/map.rs | 16 ++++++++-------- src/libcollections/vec_map.rs | 16 +++++++++------- src/libstd/collections/hash/map.rs | 16 ++++++++-------- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index c7e1e3c91766e..75c0ec486cfa9 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -124,26 +124,26 @@ pub struct RangeMut<'a, K: 'a, V: 'a> { } /// A view into a single entry in a map, which may either be vacant or occupied. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub enum Entry<'a, K:'a, V:'a> { /// A vacant Entry + #[stable(feature = "rust1", since = "1.0.0")] Vacant(VacantEntry<'a, K, V>), + /// An occupied Entry + #[stable(feature = "rust1", since = "1.0.0")] Occupied(OccupiedEntry<'a, K, V>), } /// A vacant Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct VacantEntry<'a, K:'a, V:'a> { key: K, stack: stack::SearchStack<'a, K, V, node::handle::Edge, node::handle::Leaf>, } /// An occupied Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct OccupiedEntry<'a, K:'a, V:'a> { stack: stack::SearchStack<'a, K, V, node::handle::KV, node::handle::LeafOrInternal>, } @@ -1124,9 +1124,9 @@ impl<'a, K, V> DoubleEndedIterator for RangeMut<'a, K, V> { } impl<'a, K: Ord, V> Entry<'a, K, V> { - #[unstable(feature = "collections", - reason = "matches collection reform v2 specification, waiting for dust to settle")] /// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant + #[unstable(feature = "std_misc", + reason = "will soon be replaced by or_insert")] pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, K, V>> { match self { Occupied(entry) => Ok(entry.into_mut()), diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index 6e67d8763273d..056be4acaeb80 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -67,26 +67,28 @@ pub struct VecMap { } /// A view into a single entry in a map, which may either be vacant or occupied. -#[unstable(feature = "collections", - reason = "precise API still under development")] + +#[stable(feature = "rust1", since = "1.0.0")] pub enum Entry<'a, V:'a> { /// A vacant Entry + #[stable(feature = "rust1", since = "1.0.0")] Vacant(VacantEntry<'a, V>), + /// An occupied Entry + #[stable(feature = "rust1", since = "1.0.0")] Occupied(OccupiedEntry<'a, V>), } /// A vacant Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] + +#[stable(feature = "rust1", since = "1.0.0")] pub struct VacantEntry<'a, V:'a> { map: &'a mut VecMap, index: usize, } /// An occupied Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct OccupiedEntry<'a, V:'a> { map: &'a mut VecMap, index: usize, @@ -651,7 +653,7 @@ impl VecMap { impl<'a, V> Entry<'a, V> { #[unstable(feature = "collections", - reason = "matches collection reform v2 specification, waiting for dust to settle")] + reason = "will soon be replaced by or_insert")] /// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, V>> { match self { diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 60b1738d2c989..43e60d4dc4f1c 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1335,15 +1335,13 @@ pub struct Drain<'a, K: 'a, V: 'a> { } /// A view into a single occupied location in a HashMap. -#[unstable(feature = "std_misc", - reason = "precise API still being fleshed out")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct OccupiedEntry<'a, K: 'a, V: 'a> { elem: FullBucket>, } /// A view into a single empty location in a HashMap. -#[unstable(feature = "std_misc", - reason = "precise API still being fleshed out")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct VacantEntry<'a, K: 'a, V: 'a> { hash: SafeHash, key: K, @@ -1351,12 +1349,14 @@ pub struct VacantEntry<'a, K: 'a, V: 'a> { } /// A view into a single location in a map, which may be vacant or occupied. -#[unstable(feature = "std_misc", - reason = "precise API still being fleshed out")] +#[stable(feature = "rust1", since = "1.0.0")] pub enum Entry<'a, K: 'a, V: 'a> { /// An occupied Entry. + #[stable(feature = "rust1", since = "1.0.0")] Occupied(OccupiedEntry<'a, K, V>), + /// A vacant Entry. + #[stable(feature = "rust1", since = "1.0.0")] Vacant(VacantEntry<'a, K, V>), } @@ -1477,10 +1477,10 @@ impl<'a, K, V> ExactSizeIterator for Drain<'a, K, V> { #[inline] fn len(&self) -> usize { self.inner.len() } } -#[unstable(feature = "std_misc", - reason = "matches collection reform v2 specification, waiting for dust to settle")] impl<'a, K, V> Entry<'a, K, V> { /// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant. + #[unstable(feature = "std_misc", + reason = "will soon be replaced by or_insert")] pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, K, V>> { match self { Occupied(entry) => Ok(entry.into_mut()), From a848ce4d383429c5c43fd78f7021f9c56cd6ed78 Mon Sep 17 00:00:00 2001 From: Drew Crawford Date: Sat, 14 Mar 2015 22:31:45 -0500 Subject: [PATCH 07/69] Adding sys/socket.h constants for iOS/Mac, particularly for SO_SOCKET options. This is probably more broadly applicable than these two platforms (since it's part of the bsd4.4 standard) but that's outside my problem domain today. If this goes well, I may submit Linux/64 support in a separate PR. Reviewers should take a look at http://www.opensource.apple.com/source/xnu/xnu-792.17.14/bsd/sys/socket.h?txt which defines constants for OSX. iOS uses the same header. I release this patch under the MIT license. --- src/liblibc/lib.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 893781e622090..b74a313b13ee9 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -4820,10 +4820,25 @@ pub mod consts { pub const TCP_NODELAY: c_int = 0x01; pub const TCP_KEEPALIVE: c_int = 0x10; pub const SOL_SOCKET: c_int = 0xffff; + + pub const SO_DEBUG: c_int = 0x01; + pub const SO_ACCEPTCONN: c_int = 0x0002; + pub const SO_REUSEADDR: c_int = 0x0004; pub const SO_KEEPALIVE: c_int = 0x0008; + pub const SO_DONTROUTE: c_int = 0x0010; pub const SO_BROADCAST: c_int = 0x0020; - pub const SO_REUSEADDR: c_int = 0x0004; + pub const SO_USELOOPBACK: c_int = 0x0040; + pub const SO_LINGER: c_int = 0x0080; + pub const SO_OOBINLINE: c_int = 0x0100; + pub const SO_REUSEPORT: c_int = 0x0200; + pub const SO_SNDBUF: c_int = 0x1001; + pub const SO_RCVBUF: c_int = 0x1002; + pub const SO_SNDLOWAT: c_int = 0x1003; + pub const SO_RCVLOWAT: c_int = 0x1004; + pub const SO_SNDTIMEO: c_int = 0x1005; + pub const SO_RCVTIMEO: c_int = 0x1006; pub const SO_ERROR: c_int = 0x1007; + pub const SO_TYPE: c_int = 0x1008; pub const IFF_LOOPBACK: c_int = 0x8; From 6f09dfc23a330b2992b6ee16fe36433944f8e95c Mon Sep 17 00:00:00 2001 From: Valerii Hiora Date: Thu, 19 Mar 2015 16:47:20 +0200 Subject: [PATCH 08/69] Socket options constants for *BSD/Linux/Windows --- src/liblibc/lib.rs | 103 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 91 insertions(+), 12 deletions(-) diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index b74a313b13ee9..f9783f40f7b66 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -2495,10 +2495,24 @@ pub mod consts { pub const TCP_NODELAY: c_int = 0x0001; pub const SOL_SOCKET: c_int = 0xffff; - pub const SO_KEEPALIVE: c_int = 8; - pub const SO_BROADCAST: c_int = 32; - pub const SO_REUSEADDR: c_int = 4; + + pub const SO_DEBUG: c_int = 0x0001; + pub const SO_ACCEPTCONN: c_int = 0x0002; + pub const SO_REUSEADDR: c_int = 0x0004; + pub const SO_KEEPALIVE: c_int = 0x0008; + pub const SO_DONTROUTE: c_int = 0x0010; + pub const SO_BROADCAST: c_int = 0x0020; + pub const SO_USELOOPBACK: c_int = 0x0040; + pub const SO_LINGER: c_int = 0x0080; + pub const SO_OOBINLINE: c_int = 0x0100; + pub const SO_SNDBUF: c_int = 0x1001; + pub const SO_RCVBUF: c_int = 0x1002; + pub const SO_SNDLOWAT: c_int = 0x1003; + pub const SO_RCVLOWAT: c_int = 0x1004; + pub const SO_SNDTIMEO: c_int = 0x1005; + pub const SO_RCVTIMEO: c_int = 0x1006; pub const SO_ERROR: c_int = 0x1007; + pub const SO_TYPE: c_int = 0x1008; pub const IFF_LOOPBACK: c_int = 4; @@ -3441,10 +3455,24 @@ pub mod consts { pub const TCP_NODELAY: c_int = 1; pub const SOL_SOCKET: c_int = 1; - pub const SO_KEEPALIVE: c_int = 9; - pub const SO_BROADCAST: c_int = 6; + + pub const SO_DEBUG: c_int = 1; pub const SO_REUSEADDR: c_int = 2; + pub const SO_TYPE: c_int = 3; pub const SO_ERROR: c_int = 4; + pub const SO_DONTROUTE: c_int = 5; + pub const SO_BROADCAST: c_int = 6; + pub const SO_SNDBUF: c_int = 7; + pub const SO_RCVBUF: c_int = 8; + pub const SO_KEEPALIVE: c_int = 9; + pub const SO_OOBINLINE: c_int = 10; + pub const SO_LINGER: c_int = 13; + pub const SO_REUSEPORT: c_int = 15; + pub const SO_RCVLOWAT: c_int = 18; + pub const SO_SNDLOWAT: c_int = 19; + pub const SO_RCVTIMEO: c_int = 20; + pub const SO_SNDTIMEO: c_int = 21; + pub const SO_ACCEPTCONN: c_int = 30; pub const SHUT_RD: c_int = 0; pub const SHUT_WR: c_int = 1; @@ -3487,10 +3515,24 @@ pub mod consts { pub const TCP_NODELAY: c_int = 1; pub const SOL_SOCKET: c_int = 65535; - pub const SO_KEEPALIVE: c_int = 8; - pub const SO_BROADCAST: c_int = 32; - pub const SO_REUSEADDR: c_int = 4; - pub const SO_ERROR: c_int = 4103; + + pub const SO_DEBUG: c_int = 0x0001; + pub const SO_REUSEADDR: c_int = 0x0004; + pub const SO_KEEPALIVE: c_int = 0x0008; + pub const SO_DONTROUTE: c_int = 0x0010; + pub const SO_BROADCAST: c_int = 0x0020; + pub const SO_LINGER: c_int = 0x0080; + pub const SO_OOBINLINE: c_int = 0x100; + pub const SO_REUSEPORT: c_int = 0x0200; + pub const SO_SNDBUF: c_int = 0x1001; + pub const SO_RCVBUF: c_int = 0x1002; + pub const SO_SNDLOWAT: c_int = 0x1003; + pub const SO_RCVLOWAT: c_int = 0x1004; + pub const SO_SNDTIMEO: c_int = 0x1005; + pub const SO_RCVTIMEO: c_int = 0x1006; + pub const SO_ERROR: c_int = 0x1007; + pub const SO_TYPE: c_int = 0x1008; + pub const SO_ACCEPTCONN: c_int = 0x1009; pub const SHUT_RD: c_int = 0; pub const SHUT_WR: c_int = 1; @@ -4002,10 +4044,24 @@ pub mod consts { pub const TCP_NODELAY: c_int = 1; pub const TCP_KEEPIDLE: c_int = 256; pub const SOL_SOCKET: c_int = 0xffff; + pub const SO_DEBUG: c_int = 0x01; + pub const SO_ACCEPTCONN: c_int = 0x0002; + pub const SO_REUSEADDR: c_int = 0x0004; pub const SO_KEEPALIVE: c_int = 0x0008; + pub const SO_DONTROUTE: c_int = 0x0010; pub const SO_BROADCAST: c_int = 0x0020; - pub const SO_REUSEADDR: c_int = 0x0004; + pub const SO_USELOOPBACK: c_int = 0x0040; + pub const SO_LINGER: c_int = 0x0080; + pub const SO_OOBINLINE: c_int = 0x0100; + pub const SO_REUSEPORT: c_int = 0x0200; + pub const SO_SNDBUF: c_int = 0x1001; + pub const SO_RCVBUF: c_int = 0x1002; + pub const SO_SNDLOWAT: c_int = 0x1003; + pub const SO_RCVLOWAT: c_int = 0x1004; + pub const SO_SNDTIMEO: c_int = 0x1005; + pub const SO_RCVTIMEO: c_int = 0x1006; pub const SO_ERROR: c_int = 0x1007; + pub const SO_TYPE: c_int = 0x1008; pub const IFF_LOOPBACK: c_int = 0x8; @@ -4403,10 +4459,24 @@ pub mod consts { pub const TCP_NODELAY: c_int = 0x01; pub const SOL_SOCKET: c_int = 0xffff; + pub const SO_DEBUG: c_int = 0x01; + pub const SO_ACCEPTCONN: c_int = 0x0002; + pub const SO_REUSEADDR: c_int = 0x0004; pub const SO_KEEPALIVE: c_int = 0x0008; + pub const SO_DONTROUTE: c_int = 0x0010; pub const SO_BROADCAST: c_int = 0x0020; - pub const SO_REUSEADDR: c_int = 0x0004; + pub const SO_USELOOPBACK: c_int = 0x0040; + pub const SO_LINGER: c_int = 0x0080; + pub const SO_OOBINLINE: c_int = 0x0100; + pub const SO_REUSEPORT: c_int = 0x0200; + pub const SO_SNDBUF: c_int = 0x1001; + pub const SO_RCVBUF: c_int = 0x1002; + pub const SO_SNDLOWAT: c_int = 0x1003; + pub const SO_RCVLOWAT: c_int = 0x1004; + pub const SO_SNDTIMEO: c_int = 0x1005; + pub const SO_RCVTIMEO: c_int = 0x1006; pub const SO_ERROR: c_int = 0x1007; + pub const SO_TYPE: c_int = 0x1008; pub const IFF_LOOPBACK: c_int = 0x8; @@ -4820,7 +4890,7 @@ pub mod consts { pub const TCP_NODELAY: c_int = 0x01; pub const TCP_KEEPALIVE: c_int = 0x10; pub const SOL_SOCKET: c_int = 0xffff; - + pub const SO_DEBUG: c_int = 0x01; pub const SO_ACCEPTCONN: c_int = 0x0002; pub const SO_REUSEADDR: c_int = 0x0004; @@ -4864,6 +4934,15 @@ pub mod consts { pub const MAP_STACK : c_int = 0; pub const IPPROTO_RAW : c_int = 255; + + pub const SO_NREAD: c_int = 0x1020; + pub const SO_NKE: c_int = 0x1021; + pub const SO_NOSIGPIPE: c_int = 0x1022; + pub const SO_NOADDRERR: c_int = 0x1023; + pub const SO_NWRITE: c_int = 0x1024; + pub const SO_DONTTRUNC: c_int = 0x2000; + pub const SO_WANTMORE: c_int = 0x4000; + pub const SO_WANTOOBFLAG: c_int = 0x8000; } pub mod sysconf { use types::os::arch::c95::c_int; From 6a5148bda1364bd46607a3c4ebdcfb0f408e0850 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Sat, 14 Mar 2015 19:34:21 -0400 Subject: [PATCH 09/69] Introduce rsplit --- src/libcollections/str.rs | 32 ++++++++++++- src/libcollectionstest/str.rs | 14 ++++++ src/libcore/str/mod.rs | 89 ++++++++++++++++++++++++++++++++++- 3 files changed, 132 insertions(+), 3 deletions(-) diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 3a289e4ef3738..6379155800b17 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -74,8 +74,8 @@ use slice::SliceConcatExt; pub use core::str::{FromStr, Utf8Error, Str}; pub use core::str::{Lines, LinesAny, MatchIndices, SplitStr, CharRange}; -pub use core::str::{Split, SplitTerminator}; -pub use core::str::{SplitN, RSplitN}; +pub use core::str::{Split, SplitTerminator, SplitN}; +pub use core::str::{RSplit, RSplitN}; pub use core::str::{from_utf8, CharEq, Chars, CharIndices, Bytes}; pub use core::str::{from_utf8_unchecked, from_c_str, ParseBoolError}; pub use unicode::str::{Words, Graphemes, GraphemeIndices}; @@ -699,6 +699,34 @@ impl str { core_str::StrExt::split_terminator(&self[..], pat) } + /// An iterator over substrings of `self`, separated by a pattern, + /// starting from the end of the string. + /// + /// # Examples + /// + /// Simple patterns: + /// + /// ``` + /// let v: Vec<&str> = "Mary had a little lamb".rsplit(' ').collect(); + /// assert_eq!(v, ["lamb", "little", "a", "had", "Mary"]); + /// + /// let v: Vec<&str> = "lion::tiger::leopard".rsplit("::").collect(); + /// assert_eq!(v, ["leopard", "tiger", "lion"]); + /// ``` + /// + /// More complex patterns with a lambda: + /// + /// ``` + /// let v: Vec<&str> = "abc1def2ghi".rsplit(|c: char| c.is_numeric()).collect(); + /// assert_eq!(v, ["ghi", "def", "abc"]); + /// ``` + #[stable(feature = "rust1", since = "1.0.0")] + pub fn rsplit<'a, P: Pattern<'a>>(&'a self, pat: P) -> RSplit<'a, P> + where P::Searcher: ReverseSearcher<'a> + { + core_str::StrExt::rsplit(&self[..], pat) + } + /// An iterator over substrings of `self`, separated by characters matched by a pattern, /// starting from the end of the string. /// diff --git a/src/libcollectionstest/str.rs b/src/libcollectionstest/str.rs index 79c2d719862a9..2498b27395a4c 100644 --- a/src/libcollectionstest/str.rs +++ b/src/libcollectionstest/str.rs @@ -910,6 +910,20 @@ fn test_split_char_iterator_no_trailing() { assert_eq!(split, ["", "Märy häd ä little lämb", "Little lämb"]); } +#[test] +fn test_rsplit() { + let data = "\nMäry häd ä little lämb\nLittle lämb\n"; + + let split: Vec<&str> = data.rsplit(' ').collect(); + assert_eq!(split, ["lämb\n", "lämb\nLittle", "little", "ä", "häd", "\nMäry"]); + + let split: Vec<&str> = data.rsplit("lämb").collect(); + assert_eq!(split, ["\n", "\nLittle ", "\nMäry häd ä little "]); + + let split: Vec<&str> = data.rsplit(|c: char| c == 'ä').collect(); + assert_eq!(split, ["mb\n", "mb\nLittle l", " little l", "d ", "ry h", "\nM"]); +} + #[test] fn test_words() { let data = "\n \tMäry häd\tä little lämb\nLittle lämb\n"; diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index e8181395b5c1e..fc2aa256f05f4 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -111,7 +111,24 @@ macro_rules! delegate_iter { self.0.size_hint() } } - } + }; + (pattern reverse $te:ty : $ti:ty) => { + #[stable(feature = "rust1", since = "1.0.0")] + impl<'a, P: Pattern<'a>> Iterator for $ti + where P::Searcher: ReverseSearcher<'a> + { + type Item = $te; + + #[inline] + fn next(&mut self) -> Option<$te> { + self.0.next() + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.0.size_hint() + } + } + }; } /// A trait to abstract the idea of creating a new instance of a type from a @@ -553,6 +570,19 @@ struct CharSplitsN<'a, P: Pattern<'a>> { invert: bool, } +/// An iterator over the substrings of a string, separated by a +/// pattern, in reverse order. +struct RCharSplits<'a, P: Pattern<'a>> { + /// The slice remaining to be iterated + start: usize, + end: usize, + matcher: P::Searcher, + /// Whether an empty string at the end of iteration is allowed + allow_final_empty: bool, + finished: bool, +} + + /// An iterator over the lines of a string, separated by `\n`. #[stable(feature = "rust1", since = "1.0.0")] pub struct Lines<'a> { @@ -646,6 +676,43 @@ where P::Searcher: DoubleEndedSearcher<'a> { } } +impl<'a, P: Pattern<'a>> RCharSplits<'a, P> { + #[inline] + fn get_remainder(&mut self) -> Option<&'a str> { + if !self.finished && (self.allow_final_empty || self.end - self.start > 0) { + self.finished = true; + unsafe { + let string = self.matcher.haystack().slice_unchecked(self.start, self.end); + Some(string) + } + } else { + None + } + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a, P: Pattern<'a>> Iterator for RCharSplits<'a, P> + where P::Searcher: ReverseSearcher<'a> +{ + type Item = &'a str; + + #[inline] + fn next(&mut self) -> Option<&'a str> { + if self.finished { return None } + + let haystack = self.matcher.haystack(); + match self.matcher.next_match_back() { + Some((a, b)) => unsafe { + let elt = haystack.slice_unchecked(b, self.end); + self.end = a; + Some(elt) + }, + None => self.get_remainder(), + } + } +} + /// The internal state of an iterator that searches for matches of a substring /// within a larger string using two-way search #[derive(Clone)] @@ -1321,6 +1388,11 @@ delegate_iter!{pattern &'a str : SplitTerminator<'a, P>} pub struct SplitN<'a, P: Pattern<'a>>(CharSplitsN<'a, P>); delegate_iter!{pattern forward &'a str : SplitN<'a, P>} +/// Return type of `StrExt::rsplit` +#[stable(feature = "rust1", since = "1.0.0")] +pub struct RSplit<'a, P: Pattern<'a>>(RCharSplits<'a, P>); +delegate_iter!{pattern reverse &'a str : RSplit<'a, P>} + /// Return type of `StrExt::rsplitn` #[stable(feature = "rust1", since = "1.0.0")] pub struct RSplitN<'a, P: Pattern<'a>>(CharSplitsN<'a, P>); @@ -1340,6 +1412,8 @@ pub trait StrExt { fn split<'a, P: Pattern<'a>>(&'a self, pat: P) -> Split<'a, P>; fn splitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> SplitN<'a, P>; fn split_terminator<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitTerminator<'a, P>; + fn rsplit<'a, P: Pattern<'a>>(&'a self, pat: P) -> RSplit<'a, P> + where P::Searcher: ReverseSearcher<'a>; fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P>; fn match_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> MatchIndices<'a, P>; #[allow(deprecated) /* for SplitStr */] @@ -1436,6 +1510,19 @@ impl StrExt for str { }) } + #[inline] + fn rsplit<'a, P: Pattern<'a>>(&'a self, pat: P) -> RSplit<'a, P> + where P::Searcher: ReverseSearcher<'a> + { + RSplit(RCharSplits { + start: 0, + end: self.len(), + matcher: pat.into_searcher(self), + allow_final_empty: true, + finished: false, + }) + } + #[inline] fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> { RSplitN(CharSplitsN { From c6ca2205eae522387237057812b7901a2c5d3906 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Sat, 14 Mar 2015 20:07:13 -0400 Subject: [PATCH 10/69] StrExt::splitn should not require a DoubleEndedSearcher Closes #23262 --- src/libcollections/str.rs | 19 +++++----- src/libcollectionstest/str.rs | 14 ++++++++ src/libcore/str/mod.rs | 65 +++++++++++++++++++---------------- 3 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 6379155800b17..67b7039a1959e 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -727,23 +727,20 @@ impl str { core_str::StrExt::rsplit(&self[..], pat) } - /// An iterator over substrings of `self`, separated by characters matched by a pattern, - /// starting from the end of the string. - /// - /// Restricted to splitting at most `count` times. - /// - /// The pattern can be a simple `&str`, or a closure that determines the split. + /// An iterator over substrings of `self`, separated by a pattern, + /// starting from the end of the string, restricted to splitting + /// at most `count` times. /// /// # Examples /// - /// Simple `&str` patterns: + /// Simple patterns: /// /// ``` /// let v: Vec<&str> = "Mary had a little lamb".rsplitn(2, ' ').collect(); /// assert_eq!(v, ["lamb", "little", "Mary had a"]); /// - /// let v: Vec<&str> = "lionXXtigerXleopard".rsplitn(2, 'X').collect(); - /// assert_eq!(v, ["leopard", "tiger", "lionX"]); + /// let v: Vec<&str> = "lion::tiger::leopard".rsplitn(1, "::").collect(); + /// assert_eq!(v, ["leopard", "lion::tiger"]); /// ``` /// /// More complex patterns with a lambda: @@ -753,7 +750,9 @@ impl str { /// assert_eq!(v, ["ghi", "abc1def"]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> { + pub fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> + where P::Searcher: ReverseSearcher<'a> + { core_str::StrExt::rsplitn(&self[..], count, pat) } diff --git a/src/libcollectionstest/str.rs b/src/libcollectionstest/str.rs index 2498b27395a4c..5cfa800905415 100644 --- a/src/libcollectionstest/str.rs +++ b/src/libcollectionstest/str.rs @@ -924,6 +924,20 @@ fn test_rsplit() { assert_eq!(split, ["mb\n", "mb\nLittle l", " little l", "d ", "ry h", "\nM"]); } +#[test] +fn test_rsplitn() { + let data = "\nMäry häd ä little lämb\nLittle lämb\n"; + + let split: Vec<&str> = data.rsplitn(1, ' ').collect(); + assert_eq!(split, ["lämb\n", "\nMäry häd ä little lämb\nLittle"]); + + let split: Vec<&str> = data.rsplitn(1, "lämb").collect(); + assert_eq!(split, ["\n", "\nMäry häd ä little lämb\nLittle "]); + + let split: Vec<&str> = data.rsplitn(1, |c: char| c == 'ä').collect(); + assert_eq!(split, ["mb\n", "\nMäry häd ä little lämb\nLittle l"]); +} + #[test] fn test_words() { let data = "\n \tMäry häd\tä little lämb\nLittle lämb\n"; diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index fc2aa256f05f4..4734e9b7a9fe5 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -567,7 +567,6 @@ struct CharSplitsN<'a, P: Pattern<'a>> { iter: CharSplits<'a, P>, /// The number of splits remaining count: usize, - invert: bool, } /// An iterator over the substrings of a string, separated by a @@ -582,6 +581,13 @@ struct RCharSplits<'a, P: Pattern<'a>> { finished: bool, } +/// An iterator over the substrings of a string, separated by a +/// pattern, splitting at most `count` times, in reverse order. +struct RCharSplitsN<'a, P: Pattern<'a>> { + iter: RCharSplits<'a, P>, + /// The number of splits remaining + count: usize, +} /// An iterator over the lines of a string, separated by `\n`. #[stable(feature = "rust1", since = "1.0.0")] @@ -661,15 +667,14 @@ where P::Searcher: DoubleEndedSearcher<'a> { } #[stable(feature = "rust1", since = "1.0.0")] -impl<'a, P: Pattern<'a>> Iterator for CharSplitsN<'a, P> -where P::Searcher: DoubleEndedSearcher<'a> { +impl<'a, P: Pattern<'a>> Iterator for CharSplitsN<'a, P> { type Item = &'a str; #[inline] fn next(&mut self) -> Option<&'a str> { if self.count != 0 { self.count -= 1; - if self.invert { self.iter.next_back() } else { self.iter.next() } + self.iter.next() } else { self.iter.get_end() } @@ -713,6 +718,23 @@ impl<'a, P: Pattern<'a>> Iterator for RCharSplits<'a, P> } } +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a, P: Pattern<'a>> Iterator for RCharSplitsN<'a, P> + where P::Searcher: ReverseSearcher<'a> +{ + type Item = &'a str; + + #[inline] + fn next(&mut self) -> Option<&'a str> { + if self.count != 0 { + self.count -= 1; + self.iter.next() + } else { + self.iter.get_remainder() + } + } +} + /// The internal state of an iterator that searches for matches of a substring /// within a larger string using two-way search #[derive(Clone)] @@ -1360,23 +1382,7 @@ impl<'a, S: ?Sized> Str for &'a S where S: Str { /// Return type of `StrExt::split` #[stable(feature = "rust1", since = "1.0.0")] pub struct Split<'a, P: Pattern<'a>>(CharSplits<'a, P>); -#[stable(feature = "rust1", since = "1.0.0")] -impl<'a, P: Pattern<'a>> Iterator for Split<'a, P> { - type Item = &'a str; - - #[inline] - fn next(&mut self) -> Option<&'a str> { - self.0.next() - } -} -#[stable(feature = "rust1", since = "1.0.0")] -impl<'a, P: Pattern<'a>> DoubleEndedIterator for Split<'a, P> -where P::Searcher: DoubleEndedSearcher<'a> { - #[inline] - fn next_back(&mut self) -> Option<&'a str> { - self.0.next_back() - } -} +delegate_iter!{pattern &'a str : Split<'a, P>} /// Return type of `StrExt::split_terminator` #[stable(feature = "rust1", since = "1.0.0")] @@ -1395,8 +1401,8 @@ delegate_iter!{pattern reverse &'a str : RSplit<'a, P>} /// Return type of `StrExt::rsplitn` #[stable(feature = "rust1", since = "1.0.0")] -pub struct RSplitN<'a, P: Pattern<'a>>(CharSplitsN<'a, P>); -delegate_iter!{pattern forward &'a str : RSplitN<'a, P>} +pub struct RSplitN<'a, P: Pattern<'a>>(RCharSplitsN<'a, P>); +delegate_iter!{pattern reverse &'a str : RSplitN<'a, P>} /// Methods for string slices #[allow(missing_docs)] @@ -1414,7 +1420,8 @@ pub trait StrExt { fn split_terminator<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitTerminator<'a, P>; fn rsplit<'a, P: Pattern<'a>>(&'a self, pat: P) -> RSplit<'a, P> where P::Searcher: ReverseSearcher<'a>; - fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P>; + fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> + where P::Searcher: ReverseSearcher<'a>; fn match_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> MatchIndices<'a, P>; #[allow(deprecated) /* for SplitStr */] fn split_str<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitStr<'a, P>; @@ -1498,7 +1505,6 @@ impl StrExt for str { SplitN(CharSplitsN { iter: self.split(pat).0, count: count, - invert: false, }) } @@ -1524,11 +1530,12 @@ impl StrExt for str { } #[inline] - fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> { - RSplitN(CharSplitsN { - iter: self.split(pat).0, + fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> + where P::Searcher: ReverseSearcher<'a> + { + RSplitN(RCharSplitsN { + iter: self.rsplit(pat).0, count: count, - invert: true, }) } From 9ae144f05526ce8963af265d3b33f6c565c85e43 Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Sun, 8 Mar 2015 22:32:57 -0430 Subject: [PATCH 11/69] Add default impls for Send/Sync --- src/libcore/marker.rs | 4 ++++ src/librustc/middle/ty.rs | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 1b866501b8ea1..e980858c443bc 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -39,6 +39,8 @@ pub unsafe trait Send : MarkerTrait { // empty. } +impl Send for .. { } + impl !Send for *const T { } impl !Send for *mut T { } impl !Send for Managed { } @@ -203,6 +205,8 @@ pub unsafe trait Sync : MarkerTrait { // Empty } +impl Sync for .. { } + impl !Sync for *const T { } impl !Sync for *mut T { } impl !Sync for Managed { } diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 99c35c6e54258..c4fcf882cfb03 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -5980,10 +5980,7 @@ pub fn item_variances(tcx: &ctxt, item_id: ast::DefId) -> Rc { pub fn trait_has_default_impl(tcx: &ctxt, trait_def_id: DefId) -> bool { populate_implementations_for_trait_if_necessary(tcx, trait_def_id); - match tcx.lang_items.to_builtin_kind(trait_def_id) { - Some(BoundSend) | Some(BoundSync) => true, - _ => tcx.traits_with_default_impls.borrow().contains_key(&trait_def_id), - } + tcx.traits_with_default_impls.borrow().contains_key(&trait_def_id) } /// Records a trait-to-implementation mapping. From 01d24297eb6fe16abdf7869c60519650e3490faf Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Wed, 11 Mar 2015 01:51:50 +0100 Subject: [PATCH 12/69] Feature gate defaulted traits --- src/libsyntax/feature_gate.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 0a9980c892527..f5e891a9dd643 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -563,6 +563,13 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> { } } + ast::ItemDefaultImpl(..) => { + self.gate_feature("optin_builtin_traits", + i.span, + "default trait implementations are experimental \ + and possibly buggy"); + } + ast::ItemImpl(_, polarity, _, _, _, _) => { match polarity { ast::ImplPolarity::Negative => { From 38dbcb2e3718eab4bac9f5a3ec8226d7ee4f40a7 Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Wed, 11 Mar 2015 18:53:55 -0500 Subject: [PATCH 13/69] Check trait unsafety for defaulted traits --- src/libcore/marker.rs | 4 +- src/librustc_typeck/coherence/unsafety.rs | 93 +++++++++++-------- .../coherence-default-trait-impl.rs | 10 ++ 3 files changed, 64 insertions(+), 43 deletions(-) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index e980858c443bc..0197ee82c7740 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -39,7 +39,7 @@ pub unsafe trait Send : MarkerTrait { // empty. } -impl Send for .. { } +unsafe impl Send for .. { } impl !Send for *const T { } impl !Send for *mut T { } @@ -205,7 +205,7 @@ pub unsafe trait Sync : MarkerTrait { // Empty } -impl Sync for .. { } +unsafe impl Sync for .. { } impl !Sync for *const T { } impl !Sync for *mut T { } diff --git a/src/librustc_typeck/coherence/unsafety.rs b/src/librustc_typeck/coherence/unsafety.rs index 867dea9588568..e4926b119d5db 100644 --- a/src/librustc_typeck/coherence/unsafety.rs +++ b/src/librustc_typeck/coherence/unsafety.rs @@ -27,55 +27,66 @@ struct UnsafetyChecker<'cx, 'tcx:'cx> { tcx: &'cx ty::ctxt<'tcx> } -impl<'cx, 'tcx,'v> visit::Visitor<'v> for UnsafetyChecker<'cx, 'tcx> { - fn visit_item(&mut self, item: &'v ast::Item) { - match item.node { - ast::ItemImpl(unsafety, polarity, _, _, _, _) => { - match ty::impl_trait_ref(self.tcx, ast_util::local_def(item.id)) { - None => { - // Inherent impl. - match unsafety { - ast::Unsafety::Normal => { /* OK */ } - ast::Unsafety::Unsafe => { - span_err!(self.tcx.sess, item.span, E0197, - "inherent impls cannot be declared as unsafe"); - } - } +impl<'cx, 'tcx, 'v> UnsafetyChecker<'cx, 'tcx> { + fn check_unsafety_coherence(&mut self, item: &'v ast::Item, + unsafety: ast::Unsafety, + polarity: ast::ImplPolarity) { + match ty::impl_trait_ref(self.tcx, ast_util::local_def(item.id)) { + None => { + // Inherent impl. + match unsafety { + ast::Unsafety::Normal => { /* OK */ } + ast::Unsafety::Unsafe => { + span_err!(self.tcx.sess, item.span, E0197, + "inherent impls cannot be declared as unsafe"); } + } + } - Some(trait_ref) => { - let trait_def = ty::lookup_trait_def(self.tcx, trait_ref.def_id); - match (trait_def.unsafety, unsafety, polarity) { - (ast::Unsafety::Unsafe, - ast::Unsafety::Unsafe, ast::ImplPolarity::Negative) => { - span_err!(self.tcx.sess, item.span, E0198, - "negative implementations are not unsafe"); - } + Some(trait_ref) => { + let trait_def = ty::lookup_trait_def(self.tcx, trait_ref.def_id); + match (trait_def.unsafety, unsafety, polarity) { + (ast::Unsafety::Unsafe, + ast::Unsafety::Unsafe, ast::ImplPolarity::Negative) => { + span_err!(self.tcx.sess, item.span, E0198, + "negative implementations are not unsafe"); + } - (ast::Unsafety::Normal, ast::Unsafety::Unsafe, _) => { - span_err!(self.tcx.sess, item.span, E0199, - "implementing the trait `{}` is not unsafe", - trait_ref.user_string(self.tcx)); - } + (ast::Unsafety::Normal, ast::Unsafety::Unsafe, _) => { + span_err!(self.tcx.sess, item.span, E0199, + "implementing the trait `{}` is not unsafe", + trait_ref.user_string(self.tcx)); + } - (ast::Unsafety::Unsafe, - ast::Unsafety::Normal, ast::ImplPolarity::Positive) => { - span_err!(self.tcx.sess, item.span, E0200, - "the trait `{}` requires an `unsafe impl` declaration", - trait_ref.user_string(self.tcx)); - } + (ast::Unsafety::Unsafe, + ast::Unsafety::Normal, ast::ImplPolarity::Positive) => { + span_err!(self.tcx.sess, item.span, E0200, + "the trait `{}` requires an `unsafe impl` declaration", + trait_ref.user_string(self.tcx)); + } - (ast::Unsafety::Unsafe, - ast::Unsafety::Normal, ast::ImplPolarity::Negative) | - (ast::Unsafety::Unsafe, - ast::Unsafety::Unsafe, ast::ImplPolarity::Positive) | - (ast::Unsafety::Normal, ast::Unsafety::Normal, _) => { - /* OK */ - } - } + (ast::Unsafety::Unsafe, + ast::Unsafety::Normal, ast::ImplPolarity::Negative) | + (ast::Unsafety::Unsafe, + ast::Unsafety::Unsafe, ast::ImplPolarity::Positive) | + (ast::Unsafety::Normal, ast::Unsafety::Normal, _) => { + /* OK */ } } } + } + } +} + +impl<'cx, 'tcx,'v> visit::Visitor<'v> for UnsafetyChecker<'cx, 'tcx> { + fn visit_item(&mut self, item: &'v ast::Item) { + match item.node { + ast::ItemDefaultImpl(unsafety, _) => { + self.check_unsafety_coherence(item, unsafety, ast::ImplPolarity::Positive); + } + ast::ItemImpl(unsafety, polarity, _, _, _, _) => { + self.check_unsafety_coherence(item, unsafety, polarity); + } _ => { } } diff --git a/src/test/compile-fail/coherence-default-trait-impl.rs b/src/test/compile-fail/coherence-default-trait-impl.rs index 6bcbefb904d9e..a5b317307379e 100644 --- a/src/test/compile-fail/coherence-default-trait-impl.rs +++ b/src/test/compile-fail/coherence-default-trait-impl.rs @@ -21,4 +21,14 @@ impl MyTrait for .. {} impl MyTrait for .. {} //~^ ERROR conflicting implementations for trait `MyTrait` +trait MySafeTrait: MarkerTrait {} + +unsafe impl MySafeTrait for .. {} +//~^ ERROR implementing the trait `MySafeTrait` is not unsafe + +unsafe trait MyUnsafeTrait: MarkerTrait {} + +impl MyUnsafeTrait for .. {} +//~^ ERROR the trait `MyUnsafeTrait` requires an `unsafe impl` declaration + fn main() {} From 04d57729fcf058026d35acdd65fd5539166d838f Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Fri, 20 Mar 2015 16:45:57 +0100 Subject: [PATCH 14/69] fix fallout --- src/test/run-make/rustdoc-default-impl/foo.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/run-make/rustdoc-default-impl/foo.rs b/src/test/run-make/rustdoc-default-impl/foo.rs index 08f3bd10e74a7..4c30c7b22a60d 100644 --- a/src/test/run-make/rustdoc-default-impl/foo.rs +++ b/src/test/run-make/rustdoc-default-impl/foo.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(optin_builtin_traits)] + pub mod bar { use std::marker; From 0c040b07f00f8cb1e59c4811c59e2adf81e6e167 Mon Sep 17 00:00:00 2001 From: Ches Martin Date: Sun, 1 Mar 2015 23:45:53 -0500 Subject: [PATCH 15/69] guide: minor copy edits --- src/doc/trpl/compound-data-types.md | 3 ++- src/doc/trpl/concurrency.md | 11 +++++------ src/doc/trpl/crates-and-modules.md | 2 +- src/doc/trpl/standard-input.md | 8 ++++++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/doc/trpl/compound-data-types.md b/src/doc/trpl/compound-data-types.md index e09922fd390a9..868874e3589d9 100644 --- a/src/doc/trpl/compound-data-types.md +++ b/src/doc/trpl/compound-data-types.md @@ -47,7 +47,7 @@ This pattern is very powerful, and we'll see it repeated more later. There are also a few things you can do with a tuple as a whole, without destructuring. You can assign one tuple into another, if they have the same -contained types and arity. Tuples have the same arity when they have the same +contained types and [arity]. Tuples have the same arity when they have the same length. ```rust @@ -357,6 +357,7 @@ tool that will let us deconstruct this sum type (the type theory term for enums) in a very elegant way and avoid all these messy `if`/`else`s. +[arity]: ./glossary.html#arity [match]: ./match.html [game]: ./guessing-game.html#comparing-guesses [generics]: ./generics.html diff --git a/src/doc/trpl/concurrency.md b/src/doc/trpl/concurrency.md index 4a16db63950dd..5d301cc0aef6e 100644 --- a/src/doc/trpl/concurrency.md +++ b/src/doc/trpl/concurrency.md @@ -40,14 +40,14 @@ us enforce that it can't leave the current thread. ### `Sync` -The second of these two trait is called [`Sync`](../std/marker/trait.Sync.html). +The second of these traits is called [`Sync`](../std/marker/trait.Sync.html). When a type `T` implements `Sync`, it indicates to the compiler that something of this type has no possibility of introducing memory unsafety when used from multiple threads concurrently. For example, sharing immutable data with an atomic reference count is threadsafe. Rust provides a type like this, `Arc`, and it implements `Sync`, -so that it could be safely shared between threads. +so it is safe to share between threads. These two traits allow you to use the type system to make strong guarantees about the properties of your code under concurrency. Before we demonstrate @@ -69,7 +69,7 @@ fn main() { } ``` -The `Thread::scoped()` method accepts a closure, which is executed in a new +The `thread::scoped()` method accepts a closure, which is executed in a new thread. It's called `scoped` because this thread returns a join guard: ``` @@ -208,10 +208,10 @@ Here's the error: ```text :11:9: 11:22 error: the trait `core::marker::Send` is not implemented for the type `std::sync::mutex::MutexGuard<'_, collections::vec::Vec>` [E0277] -:11 Thread::spawn(move || { +:11 thread::spawn(move || { ^~~~~~~~~~~~~ :11:9: 11:22 note: `std::sync::mutex::MutexGuard<'_, collections::vec::Vec>` cannot be sent between threads safely -:11 Thread::spawn(move || { +:11 thread::spawn(move || { ^~~~~~~~~~~~~ ``` @@ -322,7 +322,6 @@ While this channel is just sending a generic signal, we can send any data that is `Send` over the channel! ``` -use std::sync::{Arc, Mutex}; use std::thread; use std::sync::mpsc; diff --git a/src/doc/trpl/crates-and-modules.md b/src/doc/trpl/crates-and-modules.md index 65ff42ffdcef4..37785c030e6e5 100644 --- a/src/doc/trpl/crates-and-modules.md +++ b/src/doc/trpl/crates-and-modules.md @@ -430,7 +430,7 @@ fn main() { } ``` -But it is not idiomatic. This is significantly more likely to introducing a +But it is not idiomatic. This is significantly more likely to introduce a naming conflict. In our short program, it's not a big deal, but as it grows, it becomes a problem. If we have conflicting names, Rust will give a compilation error. For example, if we made the `japanese` functions public, and tried to do diff --git a/src/doc/trpl/standard-input.md b/src/doc/trpl/standard-input.md index 794b1df7563de..228891f9f052b 100644 --- a/src/doc/trpl/standard-input.md +++ b/src/doc/trpl/standard-input.md @@ -115,8 +115,9 @@ doesn't work, so we're okay with that. In most cases, we would want to handle the error case explicitly. `expect()` allows us to give an error message if this crash happens. -We will cover the exact details of how all of this works later in the Guide. -For now, this gives you enough of a basic understanding to work with. +We will cover the exact details of how all of this works later in the Guide in +[Error Handling]. For now, this gives you enough of a basic understanding to +work with. Back to the code we were working on! Here's a refresher: @@ -157,3 +158,6 @@ here. That's all you need to get basic input from the standard input! It's not too complicated, but there are a number of small parts. + + +[Error Handling]: ./error-handling.html From 92294e7aedf26c1b276b4a721e18b7a43217848d Mon Sep 17 00:00:00 2001 From: Ches Martin Date: Sun, 1 Mar 2015 23:54:37 -0500 Subject: [PATCH 16/69] guide: Improvements to language covering enums --- src/doc/trpl/compound-data-types.md | 68 +++++++++++++++-------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/src/doc/trpl/compound-data-types.md b/src/doc/trpl/compound-data-types.md index 868874e3589d9..d531a22d0e0dd 100644 --- a/src/doc/trpl/compound-data-types.md +++ b/src/doc/trpl/compound-data-types.md @@ -196,8 +196,9 @@ Now, we have actual names, rather than positions. Good names are important, and with a struct, we have actual names. There _is_ one case when a tuple struct is very useful, though, and that's a -tuple struct with only one element. We call this a *newtype*, because it lets -you create a new type that's similar to another one: +tuple struct with only one element. We call this the *newtype* pattern, because +it allows you to create a new type, distinct from that of its contained value +and expressing its own semantic meaning: ```{rust} struct Inches(i32); @@ -216,7 +217,7 @@ destructuring `let`, as we discussed previously in 'tuples.' In this case, the Finally, Rust has a "sum type", an *enum*. Enums are an incredibly useful feature of Rust, and are used throughout the standard library. An `enum` is -a type which ties a set of alternates to a specific name. For example, below +a type which relates a set of alternates to a specific name. For example, below we define `Character` to be either a `Digit` or something else. These can be used via their fully scoped names: `Character::Other` (more about `::` below). @@ -228,8 +229,8 @@ enum Character { } ``` -An `enum` variant can be defined as most normal types. Below are some example -types which also would be allowed in an `enum`. +Most normal types are allowed as the variant components of an `enum`. Here are +some examples: ```rust struct Empty; @@ -239,15 +240,15 @@ struct Status { Health: i32, Mana: i32, Attack: i32, Defense: i32 } struct HeightDatabase(Vec); ``` -So you see that depending on the sub-datastructure, the `enum` variant, same as -a struct, may or may not hold data. That is, in `Character`, `Digit` is a name -tied to an `i32` where `Other` is just a name. However, the fact that they are -distinct makes this very useful. +You see that, depending on its type, an `enum` variant may or may not hold data. +In `Character`, for instance, `Digit` gives a meaningful name for an `i32` +value, where `Other` is only a name. However, the fact that they represent +distinct categories of `Character` is a very useful property. -As with structures, enums don't by default have access to operators such as -compare ( `==` and `!=`), binary operations (`*` and `+`), and order -(`<` and `>=`). As such, using the previous `Character` type, the -following code is invalid: +As with structures, the variants of an enum by default are not comparable with +equality operators (`==`, `!=`), have no ordering (`<`, `>=`, etc.), and do not +support other binary operations such as `*` and `+`. As such, the following code +is invalid for the example `Character` type: ```{rust,ignore} // These assignments both succeed @@ -265,9 +266,10 @@ let four_equals_ten = four == ten; ``` This may seem rather limiting, but it's a limitation which we can overcome. -There are two ways: by implementing equality ourselves, or by using the -[`match`][match] keyword. We don't know enough about Rust to implement equality -yet, but we can use the `Ordering` enum from the standard library, which does: +There are two ways: by implementing equality ourselves, or by pattern matching +variants with [`match`][match] expressions, which you'll learn in the next +chapter. We don't know enough about Rust to implement equality yet, but we can +use the `Ordering` enum from the standard library, which does: ``` enum Ordering { @@ -277,9 +279,8 @@ enum Ordering { } ``` -Because we did not define `Ordering`, we must import it (from the std -library) with the `use` keyword. Here's an example of how `Ordering` is -used: +Because `Ordering` has already been defined for us, we will import it with the +`use` keyword. Here's an example of how it is used: ```{rust} use std::cmp::Ordering; @@ -313,17 +314,17 @@ the standard library if you need them. Okay, let's talk about the actual code in the example. `cmp` is a function that compares two things, and returns an `Ordering`. We return either -`Ordering::Less`, `Ordering::Greater`, or `Ordering::Equal`, depending on if -the two values are less, greater, or equal. Note that each variant of the -`enum` is namespaced under the `enum` itself: it's `Ordering::Greater` not -`Greater`. +`Ordering::Less`, `Ordering::Greater`, or `Ordering::Equal`, depending on +whether the first value is less than, greater than, or equal to the second. Note +that each variant of the `enum` is namespaced under the `enum` itself: it's +`Ordering::Greater`, not `Greater`. The `ordering` variable has the type `Ordering`, and so contains one of the three values. We then do a bunch of `if`/`else` comparisons to check which one it is. -This `Ordering::Greater` notation is too long. Let's use `use` to import the -`enum` variants instead. This will avoid full scoping: +This `Ordering::Greater` notation is too long. Let's use another form of `use` +to import the `enum` variants instead. This will avoid full scoping: ```{rust} use std::cmp::Ordering::{self, Equal, Less, Greater}; @@ -347,14 +348,15 @@ fn main() { ``` Importing variants is convenient and compact, but can also cause name conflicts, -so do this with caution. It's considered good style to rarely import variants -for this reason. - -As you can see, `enum`s are quite a powerful tool for data representation, and are -even more useful when they're [generic][generics] across types. Before we -get to generics, though, let's talk about how to use them with pattern matching, a -tool that will let us deconstruct this sum type (the type theory term for enums) -in a very elegant way and avoid all these messy `if`/`else`s. +so do this with caution. For this reason, it's normally considered better style +to `use` an enum rather than its variants directly. + +As you can see, `enum`s are quite a powerful tool for data representation, and +are even more useful when they're [generic][generics] across types. Before we +get to generics, though, let's talk about how to use enums with pattern +matching, a tool that will let us deconstruct sum types (the type theory term +for enums) like `Ordering` in a very elegant way that avoids all these messy +and brittle `if`/`else`s. [arity]: ./glossary.html#arity From c175b35495487da6a62bb5d4d9ed7df64186b106 Mon Sep 17 00:00:00 2001 From: FuGangqiang Date: Sat, 21 Mar 2015 22:56:05 +0800 Subject: [PATCH 17/69] fix the attributes sytax --- src/doc/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index 92573d7921773..b23a8d91069ee 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1982,7 +1982,7 @@ the namespace hierarchy as it normally would. ## Attributes ```{.ebnf .gram} -attribute : "#!" ? '[' meta_item ']' ; +attribute : '#' '!' ? '[' meta_item ']' ; meta_item : ident [ '=' literal | '(' meta_seq ')' ] ? ; meta_seq : meta_item [ ',' meta_seq ] ? ; From bc9d9f20db488dae2b6a80e4b30d1cf3d69058c1 Mon Sep 17 00:00:00 2001 From: FuGangqiang Date: Sat, 21 Mar 2015 23:59:30 +0800 Subject: [PATCH 18/69] add lifetime for `while` and `for` expression --- src/doc/reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index b23a8d91069ee..415ec4e4fbf0a 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -3158,7 +3158,7 @@ ten_times(|j| println!("hello, {}", j)); ### While loops ```{.ebnf .gram} -while_expr : "while" no_struct_literal_expr '{' block '}' ; +while_expr : [ lifetime ':' ] "while" no_struct_literal_expr '{' block '}' ; ``` A `while` loop begins by evaluating the boolean loop conditional expression. @@ -3223,7 +3223,7 @@ A `continue` expression is only permitted in the body of a loop. ### For expressions ```{.ebnf .gram} -for_expr : "for" pat "in" no_struct_literal_expr '{' block '}' ; +for_expr : [ lifetime ':' ] "for" pat "in" no_struct_literal_expr '{' block '}' ; ``` A `for` expression is a syntactic construct for looping over elements provided From e24fe5b8cfabb65a763a67403e7b0c91aaa848a9 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 18 Mar 2015 19:51:10 -0700 Subject: [PATCH 19/69] std: Remove deprecated ptr functions The method with which backwards compatibility was retained ended up leading to documentation that rustdoc didn't handle well and largely ended up confusing. --- src/libcollectionstest/slice.rs | 2 +- src/libcore/intrinsics.rs | 34 +++++++++++++++---- src/libcore/ptr.rs | 20 ++--------- src/libcoretest/ptr.rs | 14 ++++---- src/librustc_trans/trans/intrinsic.rs | 6 ++-- src/librustc_typeck/check/mod.rs | 4 +-- src/libstd/old_io/extensions.rs | 4 +-- src/test/bench/shootout-reverse-complement.rs | 6 ++-- 8 files changed, 49 insertions(+), 41 deletions(-) diff --git a/src/libcollectionstest/slice.rs b/src/libcollectionstest/slice.rs index 0c3c82eea780f..4168fe88a4b56 100644 --- a/src/libcollectionstest/slice.rs +++ b/src/libcollectionstest/slice.rs @@ -1428,7 +1428,7 @@ mod bench { let mut v = Vec::::with_capacity(1024); unsafe { let vp = v.as_mut_ptr(); - ptr::set_memory(vp, 0, 1024); + ptr::write_bytes(vp, 0, 1024); v.set_len(1024); } v diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 1462d07652d08..297c3192ecb5e 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -44,6 +44,10 @@ use marker::Sized; +#[cfg(stage0)] pub use self::copy_memory as copy; +#[cfg(stage0)] pub use self::set_memory as write_bytes; +#[cfg(stage0)] pub use self::copy_nonoverlapping_memory as copy_nonoverlapping; + extern "rust-intrinsic" { // NB: These intrinsics take unsafe pointers because they mutate aliased @@ -246,7 +250,7 @@ extern "rust-intrinsic" { /// Copies `count * size_of` bytes from `src` to `dst`. The source /// and destination may *not* overlap. /// - /// `copy_nonoverlapping_memory` is semantically equivalent to C's `memcpy`. + /// `copy_nonoverlapping` is semantically equivalent to C's `memcpy`. /// /// # Safety /// @@ -271,9 +275,9 @@ extern "rust-intrinsic" { /// let mut t: T = mem::uninitialized(); /// /// // Perform the swap, `&mut` pointers never alias - /// ptr::copy_nonoverlapping_memory(&mut t, &*x, 1); - /// ptr::copy_nonoverlapping_memory(x, &*y, 1); - /// ptr::copy_nonoverlapping_memory(y, &t, 1); + /// ptr::copy_nonoverlapping(&mut t, &*x, 1); + /// ptr::copy_nonoverlapping(x, &*y, 1); + /// ptr::copy_nonoverlapping(y, &t, 1); /// /// // y and t now point to the same thing, but we need to completely forget `tmp` /// // because it's no longer relevant. @@ -282,12 +286,18 @@ extern "rust-intrinsic" { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg(not(stage0))] + pub fn copy_nonoverlapping(dst: *mut T, src: *const T, count: usize); + + /// dox + #[stable(feature = "rust1", since = "1.0.0")] + #[cfg(stage0)] pub fn copy_nonoverlapping_memory(dst: *mut T, src: *const T, count: usize); /// Copies `count * size_of` bytes from `src` to `dst`. The source /// and destination may overlap. /// - /// `copy_memory` is semantically equivalent to C's `memmove`. + /// `copy` is semantically equivalent to C's `memmove`. /// /// # Safety /// @@ -306,16 +316,28 @@ extern "rust-intrinsic" { /// unsafe fn from_buf_raw(ptr: *const T, elts: uint) -> Vec { /// let mut dst = Vec::with_capacity(elts); /// dst.set_len(elts); - /// ptr::copy_memory(dst.as_mut_ptr(), ptr, elts); + /// ptr::copy(dst.as_mut_ptr(), ptr, elts); /// dst /// } /// ``` /// + #[cfg(not(stage0))] + #[stable(feature = "rust1", since = "1.0.0")] + pub fn copy(dst: *mut T, src: *const T, count: usize); + + /// dox + #[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] pub fn copy_memory(dst: *mut T, src: *const T, count: usize); /// Invokes memset on the specified pointer, setting `count * size_of::()` /// bytes of memory starting at `dst` to `c`. + #[cfg(not(stage0))] + #[stable(feature = "rust1", since = "1.0.0")] + pub fn write_bytes(dst: *mut T, val: u8, count: usize); + + /// dox + #[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] pub fn set_memory(dst: *mut T, val: u8, count: usize); diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 1cbea057e8842..0c0cb81a89ec7 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -105,27 +105,13 @@ use cmp::Ordering::{self, Less, Equal, Greater}; // FIXME #19649: intrinsic docs don't render, so these have no docs :( #[stable(feature = "rust1", since = "1.0.0")] -pub use intrinsics::copy_nonoverlapping_memory as copy_nonoverlapping; +pub use intrinsics::copy_nonoverlapping; #[stable(feature = "rust1", since = "1.0.0")] -pub use intrinsics::copy_memory as copy; +pub use intrinsics::copy; #[stable(feature = "rust1", since = "1.0.0")] -pub use intrinsics::set_memory as write_bytes; - -extern "rust-intrinsic" { - #[unstable(feature = "core")] - #[deprecated(since = "1.0.0", reason = "renamed to `copy_nonoverlapping`")] - pub fn copy_nonoverlapping_memory(dst: *mut T, src: *const T, count: usize); - #[unstable(feature = "core")] - #[deprecated(since = "1.0.0", reason = "renamed to `copy`")] - pub fn copy_memory(dst: *mut T, src: *const T, count: usize); - - #[unstable(feature = "core", - reason = "uncertain about naming and semantics")] - #[deprecated(since = "1.0.0", reason = "renamed to `write_bytes`")] - pub fn set_memory(dst: *mut T, val: u8, count: usize); -} +pub use intrinsics::write_bytes; /// Creates a null raw pointer. /// diff --git a/src/libcoretest/ptr.rs b/src/libcoretest/ptr.rs index 6a25c8be14e5a..adc15b9fbc27f 100644 --- a/src/libcoretest/ptr.rs +++ b/src/libcoretest/ptr.rs @@ -35,18 +35,18 @@ fn test() { let v0 = vec![32000u16, 32001u16, 32002u16]; let mut v1 = vec![0u16, 0u16, 0u16]; - copy_memory(v1.as_mut_ptr().offset(1), - v0.as_ptr().offset(1), 1); + copy(v1.as_mut_ptr().offset(1), + v0.as_ptr().offset(1), 1); assert!((v1[0] == 0u16 && v1[1] == 32001u16 && v1[2] == 0u16)); - copy_memory(v1.as_mut_ptr(), - v0.as_ptr().offset(2), 1); + copy(v1.as_mut_ptr(), + v0.as_ptr().offset(2), 1); assert!((v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 0u16)); - copy_memory(v1.as_mut_ptr().offset(2), - v0.as_ptr(), 1); + copy(v1.as_mut_ptr().offset(2), + v0.as_ptr(), 1); assert!((v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 32000u16)); @@ -164,7 +164,7 @@ fn test_ptr_subtraction() { fn test_set_memory() { let mut xs = [0u8; 20]; let ptr = xs.as_mut_ptr(); - unsafe { set_memory(ptr, 5u8, xs.len()); } + unsafe { write_bytes(ptr, 5u8, xs.len()); } assert!(xs == [5u8; 20]); } diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs index 69ca9a5e81cbc..7f4b0b02d53fe 100644 --- a/src/librustc_trans/trans/intrinsic.rs +++ b/src/librustc_trans/trans/intrinsic.rs @@ -386,7 +386,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, InBoundsGEP(bcx, ptr, &[offset]) } - (_, "copy_nonoverlapping_memory") => { + (_, "copy_nonoverlapping") => { copy_intrinsic(bcx, false, false, @@ -396,7 +396,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, llargs[2], call_debug_location) } - (_, "copy_memory") => { + (_, "copy") => { copy_intrinsic(bcx, true, false, @@ -406,7 +406,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, llargs[2], call_debug_location) } - (_, "set_memory") => { + (_, "write_bytes") => { memset_intrinsic(bcx, false, *substs.types.get(FnSpace, 0), diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 45d4a1edc6b24..b9a6a05fda9e8 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -5365,7 +5365,7 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) { mutbl: ast::MutImmutable })) } - "copy_memory" | "copy_nonoverlapping_memory" | + "copy" | "copy_nonoverlapping" | "volatile_copy_memory" | "volatile_copy_nonoverlapping_memory" => { (1, vec!( @@ -5381,7 +5381,7 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) { ), ty::mk_nil(tcx)) } - "set_memory" | "volatile_set_memory" => { + "write_bytes" | "volatile_set_memory" => { (1, vec!( ty::mk_ptr(tcx, ty::mt { diff --git a/src/libstd/old_io/extensions.rs b/src/libstd/old_io/extensions.rs index 2990c1c265d54..5b1b9471b075c 100644 --- a/src/libstd/old_io/extensions.rs +++ b/src/libstd/old_io/extensions.rs @@ -159,7 +159,7 @@ pub fn u64_to_be_bytes(n: u64, size: uint, f: F) -> T where /// that many bytes are parsed. For example, if `size` is 4, then a /// 32-bit value is parsed. pub fn u64_from_be_bytes(data: &[u8], start: uint, size: uint) -> u64 { - use ptr::{copy_nonoverlapping_memory}; + use ptr::{copy_nonoverlapping}; assert!(size <= 8); @@ -171,7 +171,7 @@ pub fn u64_from_be_bytes(data: &[u8], start: uint, size: uint) -> u64 { unsafe { let ptr = data.as_ptr().offset(start as int); let out = buf.as_mut_ptr(); - copy_nonoverlapping_memory(out.offset((8 - size) as int), ptr, size); + copy_nonoverlapping(out.offset((8 - size) as int), ptr, size); (*(out as *const u64)).to_be() } } diff --git a/src/test/bench/shootout-reverse-complement.rs b/src/test/bench/shootout-reverse-complement.rs index 93aa5f2571bfb..0ab552cf047a0 100644 --- a/src/test/bench/shootout-reverse-complement.rs +++ b/src/test/bench/shootout-reverse-complement.rs @@ -46,7 +46,7 @@ extern crate libc; use std::old_io::stdio::{stdin_raw, stdout_raw}; use std::old_io::*; -use std::ptr::{copy_memory, Unique}; +use std::ptr::{copy, Unique}; use std::thread; struct Tables { @@ -181,8 +181,8 @@ fn reverse_complement(seq: &mut [u8], tables: &Tables) { let mut i = LINE_LEN; while i < len { unsafe { - copy_memory(seq.as_mut_ptr().offset((i - off + 1) as int), - seq.as_ptr().offset((i - off) as int), off); + copy(seq.as_mut_ptr().offset((i - off + 1) as int), + seq.as_ptr().offset((i - off) as int), off); *seq.get_unchecked_mut(i - off) = b'\n'; } i += LINE_LEN + 1; From 13812492650e9530bc940f944fda7c55b485b32d Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Sat, 21 Mar 2015 22:55:52 -0400 Subject: [PATCH 20/69] implement `Clone` for `btree` iterators --- src/libcollections/btree/map.rs | 13 +++++++++++++ src/libcollections/btree/node.rs | 2 ++ src/libcollections/btree/set.rs | 26 ++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index c7e1e3c91766e..b0ec559113b51 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -78,6 +78,7 @@ pub struct BTreeMap { } /// An abstract base over-which all other BTree iterators are built. +#[derive(Clone)] struct AbsIter { traversals: VecDeque, size: usize, @@ -1034,6 +1035,9 @@ impl DoubleEndedIterator for AbsIter where } } +impl<'a, K, V> Clone for Iter<'a, K, V> { + fn clone(&self) -> Iter<'a, K, V> { Iter { inner: self.inner.clone() } } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Iterator for Iter<'a, K, V> { type Item = (&'a K, &'a V); @@ -1076,6 +1080,9 @@ impl DoubleEndedIterator for IntoIter { #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for IntoIter {} +impl<'a, K, V> Clone for Keys<'a, K, V> { + fn clone(&self) -> Keys<'a, K, V> { Keys { inner: self.inner.clone() } } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Iterator for Keys<'a, K, V> { type Item = &'a K; @@ -1091,6 +1098,9 @@ impl<'a, K, V> DoubleEndedIterator for Keys<'a, K, V> { impl<'a, K, V> ExactSizeIterator for Keys<'a, K, V> {} +impl<'a, K, V> Clone for Values<'a, K, V> { + fn clone(&self) -> Values<'a, K, V> { Values { inner: self.inner.clone() } } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Iterator for Values<'a, K, V> { type Item = &'a V; @@ -1105,6 +1115,9 @@ impl<'a, K, V> DoubleEndedIterator for Values<'a, K, V> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> {} +impl<'a, K, V> Clone for Range<'a, K, V> { + fn clone(&self) -> Range<'a, K, V> { Range { inner: self.inner.clone() } } +} impl<'a, K, V> Iterator for Range<'a, K, V> { type Item = (&'a K, &'a V); diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs index bfac3b2df5a5c..0af83280a41cf 100644 --- a/src/libcollections/btree/node.rs +++ b/src/libcollections/btree/node.rs @@ -1326,6 +1326,7 @@ trait TraversalImpl { /// A `TraversalImpl` that actually is backed by two iterators. This works in the non-moving case, /// as no deallocation needs to be done. +#[derive(Clone)] struct ElemsAndEdges(Elems, Edges); impl @@ -1404,6 +1405,7 @@ impl Drop for MoveTraversalImpl { } /// An abstraction over all the different kinds of traversals a node supports +#[derive(Clone)] struct AbsTraversal { inner: Impl, head_is_edge: bool, diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index 5616d36ce0ba9..c0e4a32eee09e 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -628,6 +628,9 @@ impl Debug for BTreeSet { } } +impl<'a, T> Clone for Iter<'a, T> { + fn clone(&self) -> Iter<'a, T> { Iter { iter: self.iter.clone() } } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Iterator for Iter<'a, T> { type Item = &'a T; @@ -658,6 +661,9 @@ impl DoubleEndedIterator for IntoIter { impl ExactSizeIterator for IntoIter {} +impl<'a, T> Clone for Range<'a, T> { + fn clone(&self) -> Range<'a, T> { Range { iter: self.iter.clone() } } +} impl<'a, T> Iterator for Range<'a, T> { type Item = &'a T; @@ -677,6 +683,11 @@ fn cmp_opt(x: Option<&T>, y: Option<&T>, } } +impl<'a, T> Clone for Difference<'a, T> { + fn clone(&self) -> Difference<'a, T> { + Difference { a: self.a.clone(), b: self.b.clone() } + } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: Ord> Iterator for Difference<'a, T> { type Item = &'a T; @@ -692,6 +703,11 @@ impl<'a, T: Ord> Iterator for Difference<'a, T> { } } +impl<'a, T> Clone for SymmetricDifference<'a, T> { + fn clone(&self) -> SymmetricDifference<'a, T> { + SymmetricDifference { a: self.a.clone(), b: self.b.clone() } + } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: Ord> Iterator for SymmetricDifference<'a, T> { type Item = &'a T; @@ -707,6 +723,11 @@ impl<'a, T: Ord> Iterator for SymmetricDifference<'a, T> { } } +impl<'a, T> Clone for Intersection<'a, T> { + fn clone(&self) -> Intersection<'a, T> { + Intersection { a: self.a.clone(), b: self.b.clone() } + } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: Ord> Iterator for Intersection<'a, T> { type Item = &'a T; @@ -728,6 +749,11 @@ impl<'a, T: Ord> Iterator for Intersection<'a, T> { } } +impl<'a, T> Clone for Union<'a, T> { + fn clone(&self) -> Union<'a, T> { + Union { a: self.a.clone(), b: self.b.clone() } + } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: Ord> Iterator for Union<'a, T> { type Item = &'a T; From 90c8592889187681b9766b7507c090e180f61a78 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Sun, 22 Mar 2015 17:16:26 +0200 Subject: [PATCH 21/69] Refine Cursor docstring --- src/libstd/io/cursor.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index 87e5a2a448855..1ca424f7c6104 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -17,17 +17,14 @@ use iter::repeat; use num::Int; use slice; -/// A `Cursor` is a type which wraps another I/O object to provide a `Seek` +/// A `Cursor` is a type which wraps a non-I/O object to provide a `Seek` /// implementation. /// -/// Cursors are currently typically used with memory buffer objects in order to -/// allow `Seek` plus `Read` and `Write` implementations. For example, common -/// cursor types include: +/// Cursors are typically used with memory buffer objects in order to allow +/// `Seek`, `Read`, and `Write` implementations. For example, common cursor types +/// include `Cursor>` and `Cursor<&[u8]>`. /// -/// * `Cursor>` -/// * `Cursor<&[u8]>` -/// -/// Implementations of the I/O traits for `Cursor` are not currently generic +/// Implementations of the I/O traits for `Cursor` are currently not generic /// over `T` itself. Instead, specific implementations are provided for various /// in-memory buffer types like `Vec` and `&[u8]`. #[stable(feature = "rust1", since = "1.0.0")] From cfe7a8db06f8e42c08ac026754d384cca595ed3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Steinbrink?= Date: Sun, 22 Mar 2015 19:18:07 +0100 Subject: [PATCH 22/69] Reduce code bloat in closure For the rust-call ABI, the last function argument is a tuple that gets untupled for the actual call. For bare functions using this ABI, the code has access to the tuple, so we need to tuple the arguments again. But closures can't actually access the tuple. Their arguments map to the elements in the tuple. So what we currently do is to tuple the arguments and then immediately untuple them again, which is pretty useless and we can just omit it. --- src/librustc_trans/trans/base.rs | 80 ++++---------------------------- 1 file changed, 8 insertions(+), 72 deletions(-) diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index f584de7c47f3b..a9e6e988338e8 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -1575,55 +1575,6 @@ fn copy_args_to_allocas<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, bcx } -fn copy_closure_args_to_allocas<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, - arg_scope: cleanup::CustomScopeIndex, - args: &[ast::Arg], - arg_datums: Vec>, - monomorphized_arg_types: &[Ty<'tcx>]) - -> Block<'blk, 'tcx> { - let _icx = push_ctxt("copy_closure_args_to_allocas"); - let arg_scope_id = cleanup::CustomScope(arg_scope); - - assert_eq!(arg_datums.len(), 1); - - let arg_datum = arg_datums.into_iter().next().unwrap(); - - // Untuple the rest of the arguments. - let tuple_datum = - unpack_datum!(bcx, - arg_datum.to_lvalue_datum_in_scope(bcx, - "argtuple", - arg_scope_id)); - let untupled_arg_types = match monomorphized_arg_types[0].sty { - ty::ty_tup(ref types) => &types[..], - _ => { - bcx.tcx().sess.span_bug(args[0].pat.span, - "first arg to `rust-call` ABI function \ - wasn't a tuple?!") - } - }; - for j in 0..args.len() { - let tuple_element_type = untupled_arg_types[j]; - let tuple_element_datum = - tuple_datum.get_element(bcx, - tuple_element_type, - |llval| GEPi(bcx, llval, &[0, j])); - let tuple_element_datum = tuple_element_datum.to_expr_datum(); - let tuple_element_datum = - unpack_datum!(bcx, - tuple_element_datum.to_rvalue_datum(bcx, - "arg")); - bcx = _match::store_arg(bcx, - &*args[j].pat, - tuple_element_datum, - arg_scope_id); - - debuginfo::create_argument_metadata(bcx, &args[j]); - } - - bcx -} - // Ties up the llstaticallocas -> llloadenv -> lltop edges, // and builds the return block. pub fn finish_fn<'blk, 'tcx>(fcx: &'blk FunctionContext<'blk, 'tcx>, @@ -1781,33 +1732,18 @@ pub fn trans_closure<'a, 'b, 'tcx>(ccx: &CrateContext<'a, 'tcx>, debug!("trans_closure: function lltype: {}", bcx.fcx.ccx.tn().val_to_string(bcx.fcx.llfn)); - let arg_datums = if abi != RustCall { - create_datums_for_fn_args(&fcx, - &monomorphized_arg_types[..]) - } else { - create_datums_for_fn_args_under_call_abi( - bcx, - arg_scope, - &monomorphized_arg_types[..]) - }; - - bcx = match closure_env { - closure::ClosureEnv::NotClosure => { - copy_args_to_allocas(bcx, - arg_scope, - &decl.inputs, - arg_datums) + let arg_datums = match closure_env { + closure::ClosureEnv::NotClosure if abi == RustCall => { + create_datums_for_fn_args_under_call_abi(bcx, arg_scope, &monomorphized_arg_types[..]) } - closure::ClosureEnv::Closure(_) => { - copy_closure_args_to_allocas( - bcx, - arg_scope, - &decl.inputs, - arg_datums, - &monomorphized_arg_types[..]) + _ => { + let arg_tys = untuple_arguments_if_necessary(ccx, &monomorphized_arg_types, abi); + create_datums_for_fn_args(&fcx, &arg_tys) } }; + bcx = copy_args_to_allocas(bcx, arg_scope, &decl.inputs, arg_datums); + bcx = closure_env.load(bcx, cleanup::CustomScope(arg_scope)); // Up until here, IR instructions for this function have explicitly not been annotated with From 5321d22afa2593cc4bd0418298ce7c247ff45ffe Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sun, 22 Mar 2015 15:04:54 -0400 Subject: [PATCH 23/69] Remove bad reference to std::io Closes #23540 --- src/libstd/macros.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index f4a7e8b1b9824..0b9cb14e04c1b 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -90,8 +90,7 @@ macro_rules! println { } /// Helper macro for unwrapping `Result` values while returning early with an -/// error if the value of the expression is `Err`. For more information, see -/// `std::io`. +/// error if the value of the expression is `Err`. #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] macro_rules! try { From fbc823d1e337e546b5bf7e6fc53f26b51a8583f2 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sun, 22 Mar 2015 15:26:23 -0400 Subject: [PATCH 24/69] Document how to document macros Fixes #23571 --- src/doc/trpl/documentation.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 8e5b3b6a7f0af..7300753cc66d0 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -333,6 +333,41 @@ By repeating all parts of the example, you can ensure that your example still compiles, while only showing the parts that are relevant to that part of your explanation. +### Documenting macros + +Here’s an example of documenting a macro: + +``` +/// Panic with a given message unless an expression evaluates to true. +/// +/// # Examples +/// +/// ``` +/// # #[macro_use] extern crate foo; +/// # fn main() { +/// panic_unless!(1 + 1 == 2, “Math is broken.”); +/// # } +/// ``` +/// +/// ```should_fail +/// # #[macro_use] extern crate foo; +/// # fn main() { +/// panic_unless!(true == false, “I’m broken.”); +/// # } +/// ``` +#[macro_export] +macro_rules! panic_unless { + ($condition:expr, $($rest:expr),+) => ({ if ! $condition { panic!($($rest),+); } }); +} +``` + +You’ll note three things: we need to add our own `extern crate` line, so that +we can add the `#[macro_use]` attribute. Second, we’ll need to add our own +`main()` as well. Finally, a judicious use of `#` to comment out those two +things, so they don’t show up in the output. + +### Running documentation tests + To run the tests, either ```bash From 29aca83eb46cdc39dc695852ab30bb0ad06bea8f Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 21 Mar 2015 10:34:15 +0100 Subject: [PATCH 25/69] Remove an unsafe function definition in __thread_local_inner. This fixes a build error when using thread_local!() in a deny(unsafe_code) scope in Servo for Android. --- src/libstd/thread_local/mod.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs index 08780292c88b1..380ac0c838e1f 100644 --- a/src/libstd/thread_local/mod.rs +++ b/src/libstd/thread_local/mod.rs @@ -205,15 +205,13 @@ macro_rules! __thread_local_inner { #[cfg(any(not(any(target_os = "macos", target_os = "linux")), target_arch = "aarch64"))] const _INIT: ::std::thread_local::__impl::KeyInner<$t> = { - unsafe extern fn __destroy(ptr: *mut u8) { - ::std::thread_local::__impl::destroy_value::<$t>(ptr); - } - ::std::thread_local::__impl::KeyInner { inner: ::std::cell::UnsafeCell { value: $init }, os: ::std::thread_local::__impl::OsStaticKey { inner: ::std::thread_local::__impl::OS_INIT_INNER, - dtor: ::std::option::Option::Some(__destroy as unsafe extern fn(*mut u8)), + dtor: ::std::option::Option::Some( + ::std::thread_local::__impl::destroy_value::<$t> + ), }, } }; From 81801f2171d4a7dddbb9cbffe95e4afe93251cb7 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sun, 22 Mar 2015 15:36:24 -0400 Subject: [PATCH 26/69] Re-word explanation on closures in intro Fixes #23571 --- src/doc/intro.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/doc/intro.md b/src/doc/intro.md index 51280e5885476..b711085ddbd9c 100644 --- a/src/doc/intro.md +++ b/src/doc/intro.md @@ -446,16 +446,16 @@ It gives us this error: error: aborting due to previous error ``` -It mentions that "captured outer variable in an `FnMut` closure". -Because we declared the closure as a moving closure, and it referred -to `numbers`, the closure will try to take ownership of the -vector. But the closure itself is created in a loop, and hence we will -actually create three closures, one for every iteration of the -loop. This means that all three of those closures would try to own -`numbers`, which is impossible -- `numbers` must have just one -owner. Rust detects this and gives us the error: we claim that -`numbers` has ownership, but our code tries to make three owners. This -may cause a safety problem, so Rust disallows it. +This is a little confusing because there are two closures here: the one passed +to `map`, and the one passed to `thread::scoped`. In this case, the closure for +`thread::scoped` is attempting to reference `numbers`, a `Vec`. This +closure is a `FnOnce` closure, as that’s what `thread::scoped` takes as an +argument. `FnOnce` closures take ownership of their environment. That’s fine, +but there’s one detail: because of `map`, we’re going to make three of these +closures. And since all three try to take ownership of `numbers`, that would be +a problem. That’s what it means by ‘cannot move out of captured outer +variable’: our `thread::scoped` closure wants to take ownership, and it can’t, +because the closure for `map` won’t let it. What to do here? Rust has two types that helps us: `Arc` and `Mutex`. *Arc* stands for "atomically reference counted". In other words, an Arc will From 8a500dea0e38cda0a52bd7797168e9e8cbfcf390 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 14 Mar 2015 05:55:01 +0200 Subject: [PATCH 27/69] book: some Crates and Modules nits --- src/doc/trpl/crates-and-modules.md | 100 +++++++---------------------- 1 file changed, 24 insertions(+), 76 deletions(-) diff --git a/src/doc/trpl/crates-and-modules.md b/src/doc/trpl/crates-and-modules.md index 8eaad5067f09e..e81770dd65201 100644 --- a/src/doc/trpl/crates-and-modules.md +++ b/src/doc/trpl/crates-and-modules.md @@ -1,6 +1,6 @@ % Crates and Modules -When a project starts getting large, it's considered a good software +When a project starts getting large, it's considered good software engineering practice to split it up into a bunch of smaller pieces, and then fit them together. It's also important to have a well-defined interface, so that some of your functionality is private, and some is public. To facilitate @@ -24,23 +24,23 @@ in different languages. To keep things simple, we'll stick to "greetings" and two languages for those phrases to be in. We'll use this module layout: ```text - +-----------+ - +---| greetings | - | +-----------+ - +---------+ | - | english |---+ - +---------+ | +-----------+ - | +---| farewells | -+---------+ | +-----------+ + +-----------+ + +---| greetings | + | +-----------+ + +---------+ | + +---| english |---+ + | +---------+ | +-----------+ + | +---| farewells | ++---------+ | +-----------+ | phrases |---+ -+---------+ | +-----------+ - | +---| greetings | - +----------+ | +-----------+ - | japanese |---+ - +----------+ | - | +-----------+ - +---| farewells | - +-----------+ ++---------+ | +-----------+ + | +---| greetings | + | +----------+ | +-----------+ + +---| japanese |--+ + +----------+ | + | +-----------+ + +---| farewells | + +-----------+ ``` In this example, `phrases` is the name of our crate. All of the rest are @@ -76,25 +76,19 @@ To define each of our modules, we use the `mod` keyword. Let's make our `src/lib.rs` look like this: ``` -// in src/lib.rs - mod english { mod greetings { - } mod farewells { - } } mod japanese { mod greetings { - } mod farewells { - } } ``` @@ -145,11 +139,7 @@ mod english; ``` If we do that, Rust will expect to find either a `english.rs` file, or a -`english/mod.rs` file with the contents of our module: - -```{rust,ignore} -// contents of our module go here -``` +`english/mod.rs` file with the contents of our module. Note that in these files, you don't need to re-declare the module: that's already been done with the initial `mod` declaration. @@ -181,10 +171,7 @@ $ tree . `src/lib.rs` is our crate root, and looks like this: ```{rust,ignore} -// in src/lib.rs - mod english; - mod japanese; ``` @@ -195,10 +182,7 @@ chosen the second. Both `src/english/mod.rs` and `src/japanese/mod.rs` look like this: ```{rust,ignore} -// both src/english/mod.rs and src/japanese/mod.rs - mod greetings; - mod farewells; ``` @@ -214,8 +198,6 @@ both empty at the moment. Let's add some functions. Put this in `src/english/greetings.rs`: ```rust -// in src/english/greetings.rs - fn hello() -> String { "Hello!".to_string() } @@ -224,8 +206,6 @@ fn hello() -> String { Put this in `src/english/farewells.rs`: ```rust -// in src/english/farewells.rs - fn goodbye() -> String { "Goodbye.".to_string() } @@ -248,8 +228,6 @@ about the module system. Put this in `src/japanese/farewells.rs`: ```rust -// in src/japanese/farewells.rs - fn goodbye() -> String { "さようなら".to_string() } @@ -265,11 +243,9 @@ another crate. We have a library crate. Let's make an executable crate that imports and uses our library. -Make a `src/main.rs` and put this in it: (it won't quite compile yet) +Make a `src/main.rs` and put this in it (it won't quite compile yet): ```rust,ignore -// in src/main.rs - extern crate phrases; fn main() { @@ -320,8 +296,6 @@ keyword. Let's focus on the `english` module first, so let's reduce our `src/mai to just this: ```{rust,ignore} -// in src/main.rs - extern crate phrases; fn main() { @@ -333,28 +307,20 @@ fn main() { In our `src/lib.rs`, let's add `pub` to the `english` module declaration: ```{rust,ignore} -// in src/lib.rs - pub mod english; - mod japanese; ``` And in our `src/english/mod.rs`, let's make both `pub`: ```{rust,ignore} -// in src/english/mod.rs - pub mod greetings; - pub mod farewells; ``` In our `src/english/greetings.rs`, let's add `pub` to our `fn` declaration: ```{rust,ignore} -// in src/english/greetings.rs - pub fn hello() -> String { "Hello!".to_string() } @@ -363,8 +329,6 @@ pub fn hello() -> String { And also in `src/english/farewells.rs`: ```{rust,ignore} -// in src/english/farewells.rs - pub fn goodbye() -> String { "Goodbye.".to_string() } @@ -400,8 +364,6 @@ Rust has a `use` keyword, which allows us to import names into our local scope. Let's change our `src/main.rs` to look like this: ```{rust,ignore} -// in src/main.rs - extern crate phrases; use phrases::english::greetings; @@ -430,7 +392,7 @@ fn main() { } ``` -But it is not idiomatic. This is significantly more likely to introducing a +But it is not idiomatic: it is more likely to introduce a naming conflict. In our short program, it's not a big deal, but as it grows, it becomes a problem. If we have conflicting names, Rust will give a compilation error. For example, if we made the `japanese` functions public, and tried to do @@ -460,21 +422,19 @@ Could not compile `phrases`. ``` If we're importing multiple names from the same module, we don't have to type it out -twice. Rust has a shortcut syntax for writing this: +twice. Instead of this: ```{rust,ignore} use phrases::english::greetings; use phrases::english::farewells; ``` -You use curly braces: +We can use this shortcut: ```{rust,ignore} use phrases::english::{greetings, farewells}; ``` -These two declarations are equivalent, but the second is a lot less typing. - ## Re-exporting with `pub use` You don't just use `use` to shorten identifiers. You can also use it inside of your crate @@ -484,8 +444,6 @@ interface that may not directly map to your internal code organization. Let's look at an example. Modify your `src/main.rs` to read like this: ```{rust,ignore} -// in src/main.rs - extern crate phrases; use phrases::english::{greetings,farewells}; @@ -503,18 +461,13 @@ fn main() { Then, modify your `src/lib.rs` to make the `japanese` mod public: ```{rust,ignore} -// in src/lib.rs - pub mod english; - pub mod japanese; ``` Next, make the two functions public, first in `src/japanese/greetings.rs`: ```{rust,ignore} -// in src/japanese/greetings.rs - pub fn hello() -> String { "こんにちは".to_string() } @@ -523,8 +476,6 @@ pub fn hello() -> String { And then in `src/japanese/farewells.rs`: ```{rust,ignore} -// in src/japanese/farewells.rs - pub fn goodbye() -> String { "さようなら".to_string() } @@ -533,13 +484,10 @@ pub fn goodbye() -> String { Finally, modify your `src/japanese/mod.rs` to read like this: ```{rust,ignore} -// in src/japanese/mod.rs - pub use self::greetings::hello; pub use self::farewells::goodbye; mod greetings; - mod farewells; ``` @@ -551,9 +499,9 @@ module, we now have a `phrases::japanese::hello()` function and a `phrases::japanese::farewells::goodbye()`. Our internal organization doesn't define our external interface. -Here we have a `pub use` for each function we want to bring into the +Here we have a `pub use` for each function we want to bring into the `japanese` scope. We could alternatively use the wildcard syntax to include -everything from `greetings` into the current scope: `pub use self::greetings::*`. +everything from `greetings` into the current scope: `pub use self::greetings::*`. What about the `self`? Well, by default, `use` declarations are absolute paths, starting from your crate root. `self` makes that path relative to your current From 0090e01f08f7ed564a62fb3cd2e3b652317d39d7 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 23 Mar 2015 00:58:19 -0400 Subject: [PATCH 28/69] Get __pthread_get_minstack at runtime with dlsym MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linking __pthread_get_minstack, even weakly, was causing Debian’s dpkg-shlibdeps to detect an unnecessarily strict versioned dependency on libc6. Closes #23628. Signed-off-by: Anders Kaseorg --- src/libstd/sys/unix/thread.rs | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index c5f07c6c75a70..1d3cb43465b04 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -13,12 +13,14 @@ use core::prelude::*; use cmp; +use dynamic_lib::DynamicLibrary; use ffi::CString; use io; use libc::consts::os::posix01::PTHREAD_STACK_MIN; use libc; use mem; use ptr; +use sync::{Once, ONCE_INIT}; use sys::os; use thunk::Thunk; use time::Duration; @@ -314,21 +316,30 @@ pub fn sleep(dur: Duration) { // is created in an application with big thread-local storage requirements. // See #6233 for rationale and details. // -// Link weakly to the symbol for compatibility with older versions of glibc. -// Assumes that we've been dynamically linked to libpthread but that is -// currently always the case. Note that you need to check that the symbol -// is non-null before calling it! +// Use dlsym to get the symbol value at runtime, for compatibility +// with older versions of glibc. Assumes that we've been dynamically +// linked to libpthread but that is currently always the case. We +// previously used weak linkage (under the same assumption), but that +// caused Debian to detect an unnecessarily strict versioned +// dependency on libc6 (#23628). #[cfg(target_os = "linux")] fn min_stack_size(attr: *const libc::pthread_attr_t) -> libc::size_t { type F = unsafe extern "C" fn(*const libc::pthread_attr_t) -> libc::size_t; - extern { - #[linkage = "extern_weak"] - static __pthread_get_minstack: *const (); - } - if __pthread_get_minstack.is_null() { - PTHREAD_STACK_MIN - } else { - unsafe { mem::transmute::<*const (), F>(__pthread_get_minstack)(attr) } + static INIT: Once = ONCE_INIT; + static mut __pthread_get_minstack: Option = None; + + INIT.call_once(|| { + let lib = DynamicLibrary::open(None).unwrap(); + unsafe { + if let Ok(f) = lib.symbol("__pthread_get_minstack") { + __pthread_get_minstack = Some(mem::transmute::<*const (), F>(f)); + } + } + }); + + match unsafe { __pthread_get_minstack } { + None => PTHREAD_STACK_MIN, + Some(f) => unsafe { f(attr) }, } } From b6641c1595687a6c7c8ba381b46b931a58a3ada4 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 23 Mar 2015 03:48:06 -0400 Subject: [PATCH 29/69] min_stack_size: update non-Linux implementation comment Signed-off-by: Anders Kaseorg --- src/libstd/sys/unix/thread.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 1d3cb43465b04..b3594dcaa7565 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -343,8 +343,8 @@ fn min_stack_size(attr: *const libc::pthread_attr_t) -> libc::size_t { } } -// __pthread_get_minstack() is marked as weak but extern_weak linkage is -// not supported on OS X, hence this kludge... +// No point in looking up __pthread_get_minstack() on non-glibc +// platforms. #[cfg(not(target_os = "linux"))] fn min_stack_size(_: *const libc::pthread_attr_t) -> libc::size_t { PTHREAD_STACK_MIN From 737bb30f0af5b27785a006a91a8792a06478de87 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 23 Mar 2015 04:02:02 -0400 Subject: [PATCH 30/69] min_stack_size: clarify both reasons to use dlsym Signed-off-by: Anders Kaseorg --- src/libstd/sys/unix/thread.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index b3594dcaa7565..c66d86b76250f 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -316,11 +316,12 @@ pub fn sleep(dur: Duration) { // is created in an application with big thread-local storage requirements. // See #6233 for rationale and details. // -// Use dlsym to get the symbol value at runtime, for compatibility -// with older versions of glibc. Assumes that we've been dynamically -// linked to libpthread but that is currently always the case. We -// previously used weak linkage (under the same assumption), but that -// caused Debian to detect an unnecessarily strict versioned +// Use dlsym to get the symbol value at runtime, both for +// compatibility with older versions of glibc, and to avoid creating +// dependencies on GLIBC_PRIVATE symbols. Assumes that we've been +// dynamically linked to libpthread but that is currently always the +// case. We previously used weak linkage (under the same assumption), +// but that caused Debian to detect an unnecessarily strict versioned // dependency on libc6 (#23628). #[cfg(target_os = "linux")] fn min_stack_size(attr: *const libc::pthread_attr_t) -> libc::size_t { From 50ea6f6886f3315ad93b035e918b8a4165325132 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 19 Mar 2015 07:16:40 -0400 Subject: [PATCH 31/69] Remove incorrect subtyping for `&mut Trait` and introduce coercion for `&mut (Trait+'a)` to `&mut (Trait+'b)` if `'a:'b`. Fixes #14985. --- src/librustc/middle/infer/combine.rs | 13 +----- src/librustc_typeck/check/coercion.rs | 45 ++++++++++++++----- .../regions-trait-object-subtyping.rs | 35 +++++++++++++++ 3 files changed, 71 insertions(+), 22 deletions(-) create mode 100644 src/test/compile-fail/regions-trait-object-subtyping.rs diff --git a/src/librustc/middle/infer/combine.rs b/src/librustc/middle/infer/combine.rs index 94c9699e30cc4..930e95d1f939a 100644 --- a/src/librustc/middle/infer/combine.rs +++ b/src/librustc/middle/infer/combine.rs @@ -557,18 +557,7 @@ pub fn super_tys<'tcx, C>(this: &C, (&ty::ty_rptr(a_r, ref a_mt), &ty::ty_rptr(b_r, ref b_mt)) => { let r = try!(this.regions_with_variance(ty::Contravariant, *a_r, *b_r)); - - // FIXME(14985) If we have mutable references to trait objects, we - // used to use covariant subtyping. I have preserved this behaviour, - // even though it is probably incorrect. So don't go down the usual - // path which would require invariance. - let mt = match (&a_mt.ty.sty, &b_mt.ty.sty) { - (&ty::ty_trait(..), &ty::ty_trait(..)) if a_mt.mutbl == b_mt.mutbl => { - let ty = try!(this.tys(a_mt.ty, b_mt.ty)); - ty::mt { ty: ty, mutbl: a_mt.mutbl } - } - _ => try!(this.mts(a_mt, b_mt)) - }; + let mt = try!(this.mts(a_mt, b_mt)); Ok(ty::mk_rptr(tcx, tcx.mk_region(r), mt)) } diff --git a/src/librustc_typeck/check/coercion.rs b/src/librustc_typeck/check/coercion.rs index a82ebcd9175fa..f731507ba906d 100644 --- a/src/librustc_typeck/check/coercion.rs +++ b/src/librustc_typeck/check/coercion.rs @@ -92,6 +92,12 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { Ok(None) // No coercion required. } + fn outlives(&self, a: ty::Region, b: ty::Region) -> cres<'tcx, ()> { + let sub = Sub(self.fcx.infcx().combine_fields(false, self.trace.clone())); + try!(sub.regions(b, a)); + Ok(()) + } + fn unpack_actual_value(&self, a: Ty<'tcx>, f: F) -> T where F: FnOnce(Ty<'tcx>) -> T, { @@ -340,21 +346,40 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { Some((ty, ty::UnsizeLength(len))) } (&ty::ty_trait(ref data_a), &ty::ty_trait(ref data_b)) => { - // For now, we only support upcasts from - // `Foo+Send` to `Foo` (really, any time there are - // fewer builtin bounds then before). These are - // convenient because they don't require any sort - // of change to the vtable at runtime. - if data_a.bounds.builtin_bounds != data_b.bounds.builtin_bounds && - data_a.bounds.builtin_bounds.is_superset(&data_b.bounds.builtin_bounds) - { + // Upcasts permit two things: + // + // 1. Dropping builtin bounds, e.g. `Foo+Send` to `Foo` + // 2. Tightening the region bound, e.g. `Foo+'a` to `Foo+'b` if `'a : 'b` + // + // Note that neither of these changes requires any + // change at runtime. Eventually this will be + // generalized. + // + // We always upcast when we can because of reason + // #2 (region bounds). + if data_a.bounds.builtin_bounds.is_superset(&data_b.bounds.builtin_bounds) { + // construct a type `a1` which is a version of + // `a` using the upcast bounds from `b` let bounds_a1 = ty::ExistentialBounds { - region_bound: data_a.bounds.region_bound, + // From type b + region_bound: data_b.bounds.region_bound, builtin_bounds: data_b.bounds.builtin_bounds, + + // From type a projection_bounds: data_a.bounds.projection_bounds.clone(), }; let ty_a1 = ty::mk_trait(tcx, data_a.principal.clone(), bounds_a1); - match self.fcx.infcx().try(|_| self.subtype(ty_a1, ty_b)) { + + // relate `a1` to `b` + let result = self.fcx.infcx().try(|_| { + // it's ok to upcast from Foo+'a to Foo+'b so long as 'a : 'b + try!(self.outlives(data_a.bounds.region_bound, + data_b.bounds.region_bound)); + self.subtype(ty_a1, ty_b) + }); + + // if that was successful, we have a coercion + match result { Ok(_) => Some((ty_b, ty::UnsizeUpcast(ty_b))), Err(_) => None, } diff --git a/src/test/compile-fail/regions-trait-object-subtyping.rs b/src/test/compile-fail/regions-trait-object-subtyping.rs new file mode 100644 index 0000000000000..8d05cb67e77b1 --- /dev/null +++ b/src/test/compile-fail/regions-trait-object-subtyping.rs @@ -0,0 +1,35 @@ +// Copyright 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +trait Dummy { fn dummy(&self); } + +fn foo1<'a:'b,'b>(x: &'a mut (Dummy+'a)) -> &'b mut (Dummy+'b) { + // Here, we are able to coerce + x +} + +fn foo2<'a:'b,'b>(x: &'b mut (Dummy+'a)) -> &'b mut (Dummy+'b) { + // Here, we are able to coerce + x +} + +fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy { + // Without knowing 'a:'b, we can't coerce + x //~ ERROR mismatched types + //~^ ERROR cannot infer +} + +struct Wrapper(T); +fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> { + // We can't coerce because it is packed in `Wrapper` + x //~ ERROR mismatched types +} + +fn main() {} From 45fae882568d9bf36ade39f210a2721d05e556dd Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 6 Mar 2015 10:14:12 -0500 Subject: [PATCH 32/69] When matching against a pattern (either via `match` or `let`) that contains ref-bindings, do not permit any upcasting from the type of the value being matched. Similarly, do not permit coercion in a `let`. This is a [breaking-change] in that it closes a type hole that previously existed, and in that coercion is not performed. You should be able to work around the latter by converting: ```rust let ref mut x: T = expr; ``` into ```rust let x: T = expr; let ref mut x = x; ``` Restricting coercion not to apply in the case of `let ref` or `let ref mut` is sort of unexciting to me, but seems the best solution: 1. Mixing coercion and `let ref` or `let ref mut` is a bit odd, because you are taking the address of a (coerced) temporary, but only sometimes. It's not syntactically evident, in other words, what's going on. When you're doing a coercion, you're kind of 2. Put another way, I would like to preserve the relationship that `equality <= subtyping <= coercion <= as-coercion`, where this is an indication of the number of `(T1,T2)` pairs that are accepted by the various relations. Trying to mix `let ref mut` and coercion would create another kind of relation that is like coercion, but acts differently in the case where a precise match is needed. 3. In any case, this is strictly more conservative than what we had before and we can undo it in the future if we find a way to make coercion mix with type equality. The change to match I feel ok about but similarly unthrilled. There is some subtle text already concerning whether to use eqtype or subtype for identifier bindings. The best fix I think would be to always have match use strict equality but use subtyping on identifier bindings, but the comment `(*)` explains why that's not working at the moment. As above, I think we can change this as we clean up the code there. --- src/librustc/middle/pat_util.rs | 18 +++++++++++++ src/librustc/middle/ty.rs | 9 +++++++ src/librustc_typeck/check/_match.rs | 26 ++++++++++++++----- src/librustc_typeck/check/mod.rs | 24 ++++++++++++++--- .../compile-fail/match-ref-mut-invariance.rs | 24 +++++++++++++++++ .../match-ref-mut-let-invariance.rs | 25 ++++++++++++++++++ 6 files changed, 116 insertions(+), 10 deletions(-) create mode 100644 src/test/compile-fail/match-ref-mut-invariance.rs create mode 100644 src/test/compile-fail/match-ref-mut-let-invariance.rs diff --git a/src/librustc/middle/pat_util.rs b/src/librustc/middle/pat_util.rs index c5abff3b96360..4f365beed213f 100644 --- a/src/librustc/middle/pat_util.rs +++ b/src/librustc/middle/pat_util.rs @@ -119,6 +119,24 @@ pub fn pat_contains_bindings(dm: &DefMap, pat: &ast::Pat) -> bool { contains_bindings } +/// Checks if the pattern contains any `ref` or `ref mut` bindings. +pub fn pat_contains_ref_binding(dm: &DefMap, pat: &ast::Pat) -> bool { + let mut result = false; + pat_bindings(dm, pat, |mode, _, _, _| { + match mode { + ast::BindingMode::BindByRef(_) => { result = true; } + ast::BindingMode::BindByValue(_) => { } + } + }); + result +} + +/// Checks if the patterns for this arm contain any `ref` or `ref mut` +/// bindings. +pub fn arm_contains_ref_binding(dm: &DefMap, arm: &ast::Arm) -> bool { + arm.pats.iter().any(|pat| pat_contains_ref_binding(dm, pat)) +} + /// Checks if the pattern contains any patterns that bind something to /// an ident or wildcard, e.g. `foo`, or `Foo(_)`, `foo @ Bar(..)`, pub fn pat_contains_bindings_or_wild(dm: &DefMap, pat: &ast::Pat) -> bool { diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 99c35c6e54258..b490de335c5a0 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -52,6 +52,7 @@ use middle::mem_categorization as mc; use middle::region; use middle::resolve_lifetime; use middle::infer; +use middle::pat_util; use middle::stability; use middle::subst::{self, ParamSpace, Subst, Substs, VecPerParamSpace}; use middle::traits; @@ -2684,6 +2685,14 @@ impl<'tcx> ctxt<'tcx> { { self.ty_param_defs.borrow()[node_id].clone() } + + pub fn pat_contains_ref_binding(&self, pat: &ast::Pat) -> bool { + pat_util::pat_contains_ref_binding(&self.def_map, pat) + } + + pub fn arm_contains_ref_binding(&self, arm: &ast::Arm) -> bool { + pat_util::arm_contains_ref_binding(&self.def_map, arm) + } } // Interns a type/name combination, stores the resulting box in cx.interner, diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs index 8e2f4dcefa022..a66c0f351bf49 100644 --- a/src/librustc_typeck/check/_match.rs +++ b/src/librustc_typeck/check/_match.rs @@ -287,10 +287,11 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>, // (nmatsakis) an hour or two debugging to remember, so I thought // I'd write them down this time. // - // 1. Most importantly, there is no loss of expressiveness - // here. What we are saying is that the type of `x` - // becomes *exactly* what is expected. This might seem - // like it will cause errors in a case like this: + // 1. There is no loss of expressiveness here, though it does + // cause some inconvenience. What we are saying is that the type + // of `x` becomes *exactly* what is expected. This can cause unnecessary + // errors in some cases, such as this one: + // it will cause errors in a case like this: // // ``` // fn foo<'x>(x: &'x int) { @@ -361,8 +362,21 @@ pub fn check_match<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, match_src: ast::MatchSource) { let tcx = fcx.ccx.tcx; - let discrim_ty = fcx.infcx().next_ty_var(); - check_expr_has_type(fcx, discrim, discrim_ty); + // Not entirely obvious: if matches may create ref bindings, we + // want to use the *precise* type of the discriminant, *not* some + // supertype, as the "discriminant type" (issue #23116). + let contains_ref_bindings = arms.iter().any(|a| tcx.arm_contains_ref_binding(a)); + let discrim_ty; + if contains_ref_bindings { + check_expr(fcx, discrim); + discrim_ty = fcx.expr_ty(discrim); + } else { + // ...but otherwise we want to use any supertype of the + // discriminant. This is sort of a workaround, see note (*) in + // `check_pat` for some details. + discrim_ty = fcx.infcx().next_ty_var(); + check_expr_has_type(fcx, discrim, discrim_ty); + }; // Typecheck the patterns first, so that we get types for all the // bindings. diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 45d4a1edc6b24..09309c7bbeb88 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -4242,11 +4242,27 @@ impl<'tcx> Repr<'tcx> for Expectation<'tcx> { } pub fn check_decl_initializer<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>, - nid: ast::NodeId, + local: &'tcx ast::Local, init: &'tcx ast::Expr) { - let local_ty = fcx.local_ty(init.span, nid); - check_expr_coercable_to_type(fcx, init, local_ty) + let ref_bindings = fcx.tcx().pat_contains_ref_binding(&local.pat); + + let local_ty = fcx.local_ty(init.span, local.id); + if !ref_bindings { + check_expr_coercable_to_type(fcx, init, local_ty) + } else { + // Somewhat subtle: if we have a `ref` binding in the pattern, + // we want to avoid introducing coercions for the RHS. This is + // both because it helps preserve sanity and, in the case of + // ref mut, for soundness (issue #23116). In particular, in + // the latter case, we need to be clear that the type of the + // referent for the reference that results is *equal to* the + // type of the lvalue it is referencing, and not some + // supertype thereof. + check_expr(fcx, init); + let init_ty = fcx.expr_ty(init); + demand::eqtype(fcx, init.span, init_ty, local_ty); + }; } pub fn check_decl_local<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>, local: &'tcx ast::Local) { @@ -4256,7 +4272,7 @@ pub fn check_decl_local<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>, local: &'tcx ast::Local) fcx.write_ty(local.id, t); if let Some(ref init) = local.init { - check_decl_initializer(fcx, local.id, &**init); + check_decl_initializer(fcx, local, &**init); let init_ty = fcx.expr_ty(&**init); if ty::type_is_error(init_ty) { fcx.write_ty(local.id, init_ty); diff --git a/src/test/compile-fail/match-ref-mut-invariance.rs b/src/test/compile-fail/match-ref-mut-invariance.rs new file mode 100644 index 0000000000000..c2b54a972bdc0 --- /dev/null +++ b/src/test/compile-fail/match-ref-mut-invariance.rs @@ -0,0 +1,24 @@ +// Copyright 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Check that when making a ref mut binding with type `&mut T`, the +// type `T` must match precisely the type `U` of the value being +// matched, and in particular cannot be some supertype of `U`. Issue +// #23116. This test focuses on a `match`. + +#![allow(dead_code)] +struct S<'b>(&'b i32); +impl<'b> S<'b> { + fn bar<'a>(&'a mut self) -> &'a mut &'a i32 { + match self.0 { ref mut x => x } //~ ERROR mismatched types + } +} + +fn main() {} diff --git a/src/test/compile-fail/match-ref-mut-let-invariance.rs b/src/test/compile-fail/match-ref-mut-let-invariance.rs new file mode 100644 index 0000000000000..ea16c61dfd4d1 --- /dev/null +++ b/src/test/compile-fail/match-ref-mut-let-invariance.rs @@ -0,0 +1,25 @@ +// Copyright 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Check that when making a ref mut binding with type `&mut T`, the +// type `T` must match precisely the type `U` of the value being +// matched, and in particular cannot be some supertype of `U`. Issue +// #23116. This test focuses on a `let`. + +#![allow(dead_code)] +struct S<'b>(&'b i32); +impl<'b> S<'b> { + fn bar<'a>(&'a mut self) -> &'a mut &'a i32 { + let ref mut x = self.0; + x //~ ERROR mismatched types + } +} + +fn main() {} From d944689cf6c702170c663a073810b019adc8bcca Mon Sep 17 00:00:00 2001 From: Wangshan Lu Date: Mon, 23 Mar 2015 19:11:03 +0800 Subject: [PATCH 33/69] Fix dead link for std::sync::mpsc. --- src/libstd/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b055796ba547f..244a51e5efcc2 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -75,7 +75,7 @@ //! //! The [`thread`](thread/index.html) module contains Rust's threading abstractions. //! [`sync`](sync/index.html) contains further, primitive, shared memory types, -//! including [`atomic`](sync/atomic/index.html), and [`mpsc`](sync/mpmc/index.html), +//! including [`atomic`](sync/atomic/index.html), and [`mpsc`](sync/mpsc/index.html), //! which contains the channel types for message passing. //! //! Common types of I/O, including files, TCP, UDP, pipes, Unix domain sockets, From 64532f7f0001e4627be839d877ded1ba0326b615 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 23 Mar 2015 08:50:47 -0400 Subject: [PATCH 34/69] implement `Clone` for various iterators --- src/libcollections/bit.rs | 4 ++++ src/libcollections/vec_deque.rs | 1 + src/libstd/collections/hash/set.rs | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index 90fbe04d3482f..1e6171af4d890 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -1792,12 +1792,16 @@ struct TwoBitPositions<'a> { next_idx: usize } +#[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Union<'a>(TwoBitPositions<'a>); +#[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Intersection<'a>(Take>); +#[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Difference<'a>(TwoBitPositions<'a>); +#[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct SymmetricDifference<'a>(TwoBitPositions<'a>); diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 56ca74dab1f0f..2ade67f26bb4a 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -1573,6 +1573,7 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> { impl<'a, T> ExactSizeIterator for IterMut<'a, T> {} /// A by-value VecDeque iterator +#[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct IntoIter { inner: VecDeque, diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index de3f080de8296..8d69ab430d344 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -853,6 +853,9 @@ impl IntoIterator for HashSet } } +impl<'a, K> Clone for Iter<'a, K> { + fn clone(&self) -> Iter<'a, K> { Iter { iter: self.iter.clone() } } +} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K> Iterator for Iter<'a, K> { type Item = &'a K; @@ -889,6 +892,12 @@ impl<'a, K> ExactSizeIterator for Drain<'a, K> { fn len(&self) -> usize { self.iter.len() } } +impl<'a, T, S> Clone for Intersection<'a, T, S> { + fn clone(&self) -> Intersection<'a, T, S> { + Intersection { iter: self.iter.clone(), ..*self } + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Iterator for Intersection<'a, T, S> where T: Eq + Hash, S: HashState @@ -912,6 +921,12 @@ impl<'a, T, S> Iterator for Intersection<'a, T, S> } } +impl<'a, T, S> Clone for Difference<'a, T, S> { + fn clone(&self) -> Difference<'a, T, S> { + Difference { iter: self.iter.clone(), ..*self } + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Iterator for Difference<'a, T, S> where T: Eq + Hash, S: HashState @@ -935,6 +950,12 @@ impl<'a, T, S> Iterator for Difference<'a, T, S> } } +impl<'a, T, S> Clone for SymmetricDifference<'a, T, S> { + fn clone(&self) -> SymmetricDifference<'a, T, S> { + SymmetricDifference { iter: self.iter.clone() } + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> where T: Eq + Hash, S: HashState @@ -945,6 +966,10 @@ impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } } +impl<'a, T, S> Clone for Union<'a, T, S> { + fn clone(&self) -> Union<'a, T, S> { Union { iter: self.iter.clone() } } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Iterator for Union<'a, T, S> where T: Eq + Hash, S: HashState From 7934d524b51c0220ef67c0f9951a41e4bee2beb2 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 23 Mar 2015 08:51:13 -0400 Subject: [PATCH 35/69] implement `ExactSizeIterator` for `linked_list::IntoIter` --- src/libcollections/linked_list.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs index 9e0a6d0438100..9d30c0d9d42c3 100644 --- a/src/libcollections/linked_list.rs +++ b/src/libcollections/linked_list.rs @@ -832,6 +832,8 @@ impl DoubleEndedIterator for IntoIter { fn next_back(&mut self) -> Option { self.list.pop_back() } } +impl ExactSizeIterator for IntoIter {} + #[stable(feature = "rust1", since = "1.0.0")] impl FromIterator for LinkedList { fn from_iter>(iter: T) -> LinkedList { From 88edf9774caf32ff77e7bad096b624d37cd66b76 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 23 Mar 2015 08:51:29 -0400 Subject: [PATCH 36/69] document iteration order for `vec_deque::IntoIter` --- src/libcollections/vec_deque.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 2ade67f26bb4a..1a167d26bbaf2 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -556,7 +556,7 @@ impl VecDeque { } } - /// Consumes the list into an iterator yielding elements by value. + /// Consumes the list into a front-to-back iterator yielding elements by value. #[stable(feature = "rust1", since = "1.0.0")] pub fn into_iter(self) -> IntoIter { IntoIter { From 2750e3c83e7cfbad779877ac213bd815c6aa65bb Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Fri, 20 Mar 2015 15:22:57 -0400 Subject: [PATCH 37/69] Add note about pointer state after the call. Fixes #23422 --- src/liballoc/heap.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index aaf6e76237ca5..3733350412e49 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -26,6 +26,9 @@ pub unsafe fn allocate(size: usize, align: usize) -> *mut u8 { /// /// On failure, return a null pointer and leave the original allocation intact. /// +/// If the allocation was relocated, the memory at the passed-in pointer is +/// undefined after the call. +/// /// Behavior is undefined if the requested size is 0 or the alignment is not a /// power of 2. The alignment must be no larger than the largest supported page /// size on the platform. From d6fb7e9da8d0c1216a1f60ea71ee91080f7b24ae Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sun, 22 Mar 2015 16:16:04 +0100 Subject: [PATCH 38/69] derive missing trait implementations for cursor --- src/libstd/io/cursor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index 365f5e37b0b30..e6debeb2a9ce7 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -31,6 +31,7 @@ use slice; /// over `T` itself. Instead, specific implementations are provided for various /// in-memory buffer types like `Vec` and `&[u8]`. #[stable(feature = "rust1", since = "1.0.0")] +#[derive(Clone, Debug)] pub struct Cursor { inner: T, pos: u64, From 2625bf9ae4a46000ae3a138f938f8f1dd3c095a8 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 10 Mar 2015 13:35:24 -0700 Subject: [PATCH 39/69] Fix regression in -C rpath that causes failures with symlinks The new `relative_from` method no longer supports the case on unix where both paths are absolute, which `-C rpath` depended on. This version fixes the problem by copying the old path_relative_from function into the rpath module. Fixes #23140 --- src/librustc_back/rpath.rs | 58 ++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/src/librustc_back/rpath.rs b/src/librustc_back/rpath.rs index 4f9f1447d8a73..68d21abb50ef5 100644 --- a/src/librustc_back/rpath.rs +++ b/src/librustc_back/rpath.rs @@ -99,30 +99,58 @@ fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path) -> String lib.pop(); let mut output = (config.realpath)(&cwd.join(&config.out_filename)).unwrap(); output.pop(); - let relative = relativize(&lib, &output); + let relative = path_relative_from(&lib, &output) + .expect(&format!("couldn't create relative path from {:?} to {:?}", output, lib)); // FIXME (#9639): This needs to handle non-utf8 paths format!("{}/{}", prefix, relative.to_str().expect("non-utf8 component in path")) } -fn relativize(path: &Path, rel: &Path) -> PathBuf { - let mut res = PathBuf::new(""); - let mut cur = rel; - while !path.starts_with(cur) { - res.push(".."); - match cur.parent() { - Some(p) => cur = p, - None => panic!("can't create relative paths across filesystems"), +// This routine is adapted from the *old* Path's `path_relative_from` +// function, which works differently from the new `relative_from` function. +// In particular, this handles the case on unix where both paths are +// absolute but with only the root as the common directory. +fn path_relative_from(path: &Path, base: &Path) -> Option { + use std::path::Component; + + if path.is_absolute() != base.is_absolute() { + if path.is_absolute() { + Some(PathBuf::new(path)) + } else { + None } + } else { + let mut ita = path.components(); + let mut itb = base.components(); + let mut comps: Vec = vec![]; + loop { + match (ita.next(), itb.next()) { + (None, None) => break, + (Some(a), None) => { + comps.push(a); + comps.extend(ita.by_ref()); + break; + } + (None, _) => comps.push(Component::ParentDir), + (Some(a), Some(b)) if comps.is_empty() && a == b => (), + (Some(a), Some(b)) if b == Component::CurDir => comps.push(a), + (Some(_), Some(b)) if b == Component::ParentDir => return None, + (Some(a), Some(_)) => { + comps.push(Component::ParentDir); + for _ in itb { + comps.push(Component::ParentDir); + } + comps.push(a); + comps.extend(ita.by_ref()); + break; + } + } + } + Some(comps.iter().map(|c| c.as_os_str()).collect()) } - match path.relative_from(cur) { - Some(s) => { res.push(s); res } - None => panic!("couldn't create relative path from {:?} to {:?}", - rel, path), - } - } + fn get_install_prefix_rpath(config: &mut RPathConfig) -> String { let path = (config.get_install_prefix_lib_path)(); let path = env::current_dir().unwrap().join(&path); From 9ec9bc68fb310aac29e984d26cc37952de328f1e Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 11 Mar 2015 10:55:31 -0700 Subject: [PATCH 40/69] Clarify behavior of Path::relative_from --- src/libstd/path.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index ddceed14cc6ce..05c7761be7b5d 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1243,6 +1243,9 @@ impl Path { } /// Returns a path that, when joined onto `base`, yields `self`. + /// + /// If `base` is not a prefix of `self` (i.e. `starts_with` + /// returns false), then `relative_from` returns `None`. #[unstable(feature = "path_relative_from", reason = "see #23284")] pub fn relative_from<'a, P: ?Sized>(&'a self, base: &'a P) -> Option<&Path> where P: AsPath From a5e1cbe1915f9fd31900f25f72533fb296ff9a3a Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sun, 22 Mar 2015 18:38:40 -0400 Subject: [PATCH 41/69] Beef up BufRead::consume documentation. Fixes #23196 --- src/libstd/io/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 237435d6dfbfa..39c718c96b38a 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -558,6 +558,12 @@ pub trait BufRead: Read { /// This function does not perform any I/O, it simply informs this object /// that some amount of its buffer, returned from `fill_buf`, has been /// consumed and should no longer be returned. + /// + /// This function is used to tell the buffer how many bytes you've consumed + /// from the return value of `fill_buf`, and so may do odd things if + /// `fill_buf` isn't called before calling this. + /// + /// The `amt` must be `<=` the number of bytes in the buffer returned by `fill_buf`. #[stable(feature = "rust1", since = "1.0.0")] fn consume(&mut self, amt: usize); From d52c36246a2e7e1d263b31709424798cfdaa00e3 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 23 Mar 2015 13:40:41 -0400 Subject: [PATCH 42/69] Clarify that slices don't just point to arrays Fixes #23632 --- src/libstd/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b055796ba547f..6833b6a0a21b8 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -40,11 +40,11 @@ //! //! ## Vectors, slices and strings //! -//! The common container type, `Vec`, a growable vector backed by an -//! array, lives in the [`vec`](vec/index.html) module. References to -//! arrays, `&[T]`, more commonly called "slices", are built-in types -//! for which the [`slice`](slice/index.html) module defines many -//! methods. +//! The common container type, `Vec`, a growable vector backed by an array, +//! lives in the [`vec`](vec/index.html) module. Contiguous, unsized regions +//! of memory, `[T]`, commonly called "slices", and their borrowed versions, +//! `&[T]`, commonly called "borrowed slices", are built-in types for which the +//! for which the [`slice`](slice/index.html) module defines many methods. //! //! `&str`, a UTF-8 string, is a built-in type, and the standard library //! defines methods for it on a variety of traits in the From d29d5545b6a5485bb1a51e035889e20330b2e4f7 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Mon, 23 Mar 2015 19:06:09 +0200 Subject: [PATCH 43/69] prctl instead of pthread on linux for name setup This is more portable as far as linux is concerned. --- src/libstd/sys/unix/thread.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index c5f07c6c75a70..4ba0d6472b62e 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -227,19 +227,16 @@ pub unsafe fn create(stack: usize, p: Thunk) -> io::Result { #[cfg(any(target_os = "linux", target_os = "android"))] pub unsafe fn set_name(name: &str) { - // pthread_setname_np() since glibc 2.12 - // availability autodetected via weak linkage - type F = unsafe extern fn(libc::pthread_t, *const libc::c_char) - -> libc::c_int; + // pthread wrapper only appeared in glibc 2.12, so we use syscall directly. extern { - #[linkage = "extern_weak"] - static pthread_setname_np: *const (); - } - if !pthread_setname_np.is_null() { - let cname = CString::new(name).unwrap(); - mem::transmute::<*const (), F>(pthread_setname_np)(pthread_self(), - cname.as_ptr()); + fn prctl(option: libc::c_int, arg2: libc::c_ulong, arg3: libc::c_ulong, + arg4: libc::c_ulong, arg5: libc::c_ulong) -> libc::c_int; } + const PR_SET_NAME: libc::c_int = 15; + let cname = CString::new(name).unwrap_or_else(|_| { + panic!("thread name may not contain interior null bytes") + }); + prctl(PR_SET_NAME, cname.as_ptr() as libc::c_ulong, 0, 0, 0); } #[cfg(any(target_os = "freebsd", From 9231ceb6dd273d8101e1b3906e6060f802e6423d Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Thu, 19 Mar 2015 16:37:34 -0700 Subject: [PATCH 44/69] Stabilize the Error trait This small commit stabilizes the `Error` trait as-is, except that `Send` and `Debug` are added as constraints. The `Send` constraint is because most uses of `Error` will be for trait objects, and by default we would like these objects to be transferrable between threads. The `Debug` constraint is to ensure that e.g. `Box` is `Debug`, and because types that implement `Display` should certainly implement `Debug` in any case. In the near future we expect to add `Any`-like downcasting features to `Error`, but this is waiting on some additional mechanisms (`Reflect`). It will be added before 1.0 via default methods. [breaking-change] --- src/libcore/error.rs | 15 ++++++++++----- src/libstd/io/buffered.rs | 2 +- src/libstd/sync/mpsc/mod.rs | 4 ++-- src/libstd/sync/poison.rs | 8 ++++---- src/rustbook/error.rs | 1 + 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/libcore/error.rs b/src/libcore/error.rs index 161f6c7892163..d29964d63a58e 100644 --- a/src/libcore/error.rs +++ b/src/libcore/error.rs @@ -82,16 +82,21 @@ #![stable(feature = "rust1", since = "1.0.0")] use prelude::*; -use fmt::Display; +use fmt::{Debug, Display}; /// Base functionality for all errors in Rust. -#[unstable(feature = "core", - reason = "the exact API of this trait may change")] -pub trait Error: Display { - /// A short description of the error; usually a static string. +#[stable(feature = "rust1", since = "1.0.0")] +pub trait Error: Debug + Display + Send { + /// A short description of the error. + /// + /// The description should not contain newlines or sentence-ending + /// punctuation, to facilitate embedding in larger user-facing + /// strings. + #[stable(feature = "rust1", since = "1.0.0")] fn description(&self) -> &str; /// The lower-level cause of this error, if any. + #[stable(feature = "rust1", since = "1.0.0")] fn cause(&self) -> Option<&Error> { None } } diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 43eec69527420..4def601f1c0e7 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -258,7 +258,7 @@ impl FromError> for Error { } #[stable(feature = "rust1", since = "1.0.0")] -impl error::Error for IntoInnerError { +impl error::Error for IntoInnerError { fn description(&self) -> &str { error::Error::description(self.error()) } diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 01eeed4fb54d0..2cf0df305c21c 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -977,7 +977,7 @@ impl fmt::Display for SendError { } #[stable(feature = "rust1", since = "1.0.0")] -impl error::Error for SendError { +impl error::Error for SendError { fn description(&self) -> &str { "sending on a closed channel" @@ -1013,7 +1013,7 @@ impl fmt::Display for TrySendError { } #[stable(feature = "rust1", since = "1.0.0")] -impl error::Error for TrySendError { +impl error::Error for TrySendError { fn description(&self) -> &str { match *self { diff --git a/src/libstd/sync/poison.rs b/src/libstd/sync/poison.rs index 2587ff5238ea7..c07c83d37f488 100644 --- a/src/libstd/sync/poison.rs +++ b/src/libstd/sync/poison.rs @@ -105,11 +105,11 @@ impl fmt::Debug for PoisonError { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Display for PoisonError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.description().fmt(f) + "poisoned lock: another task failed inside".fmt(f) } } -impl Error for PoisonError { +impl Error for PoisonError { fn description(&self) -> &str { "poisoned lock: another task failed inside" } @@ -161,13 +161,13 @@ impl fmt::Debug for TryLockError { } #[stable(feature = "rust1", since = "1.0.0")] -impl fmt::Display for TryLockError { +impl fmt::Display for TryLockError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.description().fmt(f) } } -impl Error for TryLockError { +impl Error for TryLockError { fn description(&self) -> &str { match *self { TryLockError::Poisoned(ref p) => p.description(), diff --git a/src/rustbook/error.rs b/src/rustbook/error.rs index 294b4e556694a..e896dee27919e 100644 --- a/src/rustbook/error.rs +++ b/src/rustbook/error.rs @@ -20,6 +20,7 @@ pub type CommandError = Box; pub type CommandResult = Result; pub fn err(s: &str) -> CliError { + #[derive(Debug)] struct E(String); impl Error for E { From 6bd3ab0d8140053475a901ad4e2e80e98955bcb0 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Fri, 20 Mar 2015 00:46:13 -0700 Subject: [PATCH 45/69] Implement RFC 909: move thread_local into thread This commit implements [RFC 909](https://github.com/rust-lang/rfcs/pull/909): The `std::thread_local` module is now deprecated, and its contents are available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and `ScopedKey`. The macros remain exactly as they were, which means little if any code should break. Nevertheless, this is technically a: [breaking-change] Closes #23547 --- src/libstd/lib.rs | 23 ++--- src/libstd/sys/common/thread_info.rs | 4 +- .../{thread_local/mod.rs => thread/local.rs} | 99 +++++++------------ src/libstd/{thread.rs => thread/mod.rs} | 66 +++++++++++++ src/libstd/{thread_local => thread}/scoped.rs | 26 ++--- 5 files changed, 127 insertions(+), 91 deletions(-) rename src/libstd/{thread_local/mod.rs => thread/local.rs} (87%) rename src/libstd/{thread.rs => thread/mod.rs} (91%) rename src/libstd/{thread_local => thread}/scoped.rs (91%) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b055796ba547f..970074f79306c 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -249,30 +249,23 @@ pub mod num; /* Runtime and platform support */ #[macro_use] -pub mod thread_local; +pub mod thread; +pub mod collections; pub mod dynamic_lib; +pub mod env; pub mod ffi; -pub mod old_io; -pub mod io; pub mod fs; +pub mod io; pub mod net; +pub mod old_io; +pub mod old_path; pub mod os; -pub mod env; pub mod path; -pub mod old_path; pub mod process; pub mod rand; -pub mod time; - -/* Common data structures */ - -pub mod collections; - -/* Threads and communication */ - -pub mod thread; pub mod sync; +pub mod time; #[macro_use] #[path = "sys/common/mod.rs"] mod sys_common; @@ -305,7 +298,7 @@ mod std { pub use rt; // used for panic!() pub use vec; // used for vec![] pub use cell; // used for tls! - pub use thread_local; // used for thread_local! + pub use thread; // used for thread_local! pub use marker; // used for tls! pub use ops; // used for bitflags! diff --git a/src/libstd/sys/common/thread_info.rs b/src/libstd/sys/common/thread_info.rs index e4985e703ba76..90526b8f4f318 100644 --- a/src/libstd/sys/common/thread_info.rs +++ b/src/libstd/sys/common/thread_info.rs @@ -15,7 +15,7 @@ use core::prelude::*; use cell::RefCell; use string::String; use thread::Thread; -use thread_local::State; +use thread::LocalKeyState; struct ThreadInfo { stack_guard: uint, @@ -26,7 +26,7 @@ thread_local! { static THREAD_INFO: RefCell> = RefCell::new(N impl ThreadInfo { fn with(f: F) -> R where F: FnOnce(&mut ThreadInfo) -> R { - if THREAD_INFO.state() == State::Destroyed { + if THREAD_INFO.state() == LocalKeyState::Destroyed { panic!("Use of std::thread::current() is not possible after \ the thread's local data has been destroyed"); } diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread/local.rs similarity index 87% rename from src/libstd/thread_local/mod.rs rename to src/libstd/thread/local.rs index 08780292c88b1..43142d2e5bc0b 100644 --- a/src/libstd/thread_local/mod.rs +++ b/src/libstd/thread/local.rs @@ -9,40 +9,13 @@ // except according to those terms. //! Thread local storage -//! -//! This module provides an implementation of thread local storage for Rust -//! programs. Thread local storage is a method of storing data into a global -//! variable which each thread in the program will have its own copy of. -//! Threads do not share this data, so accesses do not need to be synchronized. -//! -//! At a high level, this module provides two variants of storage: -//! -//! * Owning thread local storage. This is a type of thread local key which -//! owns the value that it contains, and will destroy the value when the -//! thread exits. This variant is created with the `thread_local!` macro and -//! can contain any value which is `'static` (no borrowed pointers. -//! -//! * Scoped thread local storage. This type of key is used to store a reference -//! to a value into local storage temporarily for the scope of a function -//! call. There are no restrictions on what types of values can be placed -//! into this key. -//! -//! Both forms of thread local storage provide an accessor function, `with`, -//! which will yield a shared reference to the value to the specified -//! closure. Thread local keys only allow shared access to values as there is no -//! way to guarantee uniqueness if a mutable borrow was allowed. Most values -//! will want to make use of some form of **interior mutability** through the -//! `Cell` or `RefCell` types. - -#![stable(feature = "rust1", since = "1.0.0")] + +#![unstable(feature = "thread_local_internals")] use prelude::v1::*; use cell::UnsafeCell; -#[macro_use] -pub mod scoped; - // Sure wish we had macro hygiene, no? #[doc(hidden)] #[unstable(feature = "thread_local_internals")] @@ -95,7 +68,7 @@ pub mod __impl { /// }); /// ``` #[stable(feature = "rust1", since = "1.0.0")] -pub struct Key { +pub struct LocalKey { // The key itself may be tagged with #[thread_local], and this `Key` is // stored as a `static`, and it's not valid for a static to reference the // address of another thread_local static. For this reason we kinda wonkily @@ -114,15 +87,15 @@ pub struct Key { pub init: fn() -> T, } -/// Declare a new thread local storage key of type `std::thread_local::Key`. +/// Declare a new thread local storage key of type `std::thread::LocalKey`. #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable] macro_rules! thread_local { (static $name:ident: $t:ty = $init:expr) => ( - static $name: ::std::thread_local::Key<$t> = { + static $name: ::std::thread::LocalKey<$t> = { use std::cell::UnsafeCell as __UnsafeCell; - use std::thread_local::__impl::KeyInner as __KeyInner; + use std::thread::__local::__impl::KeyInner as __KeyInner; use std::option::Option as __Option; use std::option::Option::None as __None; @@ -133,13 +106,13 @@ macro_rules! thread_local { fn __getit() -> &'static __KeyInner<__UnsafeCell<__Option<$t>>> { &__KEY } - ::std::thread_local::Key { inner: __getit, init: __init } + ::std::thread::LocalKey { inner: __getit, init: __init } }; ); (pub static $name:ident: $t:ty = $init:expr) => ( - pub static $name: ::std::thread_local::Key<$t> = { + pub static $name: ::std::thread::LocalKey<$t> = { use std::cell::UnsafeCell as __UnsafeCell; - use std::thread_local::__impl::KeyInner as __KeyInner; + use std::thread::__local::__impl::KeyInner as __KeyInner; use std::option::Option as __Option; use std::option::Option::None as __None; @@ -150,7 +123,7 @@ macro_rules! thread_local { fn __getit() -> &'static __KeyInner<__UnsafeCell<__Option<$t>>> { &__KEY } - ::std::thread_local::Key { inner: __getit, init: __init } + ::std::thread::LocalKey { inner: __getit, init: __init } }; ); } @@ -183,20 +156,20 @@ macro_rules! __thread_local_inner { #[cfg_attr(all(any(target_os = "macos", target_os = "linux"), not(target_arch = "aarch64")), thread_local)] - static $name: ::std::thread_local::__impl::KeyInner<$t> = + static $name: ::std::thread::__local::__impl::KeyInner<$t> = __thread_local_inner!($init, $t); ); (pub static $name:ident: $t:ty = $init:expr) => ( #[cfg_attr(all(any(target_os = "macos", target_os = "linux"), not(target_arch = "aarch64")), thread_local)] - pub static $name: ::std::thread_local::__impl::KeyInner<$t> = + pub static $name: ::std::thread::__local::__impl::KeyInner<$t> = __thread_local_inner!($init, $t); ); ($init:expr, $t:ty) => ({ #[cfg(all(any(target_os = "macos", target_os = "linux"), not(target_arch = "aarch64")))] - const _INIT: ::std::thread_local::__impl::KeyInner<$t> = { - ::std::thread_local::__impl::KeyInner { + const _INIT: ::std::thread::__local::__impl::KeyInner<$t> = { + ::std::thread::__local::__impl::KeyInner { inner: ::std::cell::UnsafeCell { value: $init }, dtor_registered: ::std::cell::UnsafeCell { value: false }, dtor_running: ::std::cell::UnsafeCell { value: false }, @@ -204,15 +177,15 @@ macro_rules! __thread_local_inner { }; #[cfg(any(not(any(target_os = "macos", target_os = "linux")), target_arch = "aarch64"))] - const _INIT: ::std::thread_local::__impl::KeyInner<$t> = { + const _INIT: ::std::thread::__local::__impl::KeyInner<$t> = { unsafe extern fn __destroy(ptr: *mut u8) { - ::std::thread_local::__impl::destroy_value::<$t>(ptr); + ::std::thread::__local::__impl::destroy_value::<$t>(ptr); } - ::std::thread_local::__impl::KeyInner { + ::std::thread::__local::__impl::KeyInner { inner: ::std::cell::UnsafeCell { value: $init }, - os: ::std::thread_local::__impl::OsStaticKey { - inner: ::std::thread_local::__impl::OS_INIT_INNER, + os: ::std::thread::__local::__impl::OsStaticKey { + inner: ::std::thread::__local::__impl::OS_INIT_INNER, dtor: ::std::option::Option::Some(__destroy as unsafe extern fn(*mut u8)), }, } @@ -226,7 +199,7 @@ macro_rules! __thread_local_inner { #[unstable(feature = "std_misc", reason = "state querying was recently added")] #[derive(Eq, PartialEq, Copy)] -pub enum State { +pub enum LocalKeyState { /// All keys are in this state whenever a thread starts. Keys will /// transition to the `Valid` state once the first call to `with` happens /// and the initialization expression succeeds. @@ -253,7 +226,7 @@ pub enum State { Destroyed, } -impl Key { +impl LocalKey { /// Acquire a reference to the value in this TLS key. /// /// This will lazily initialize the value if this thread has not referenced @@ -309,16 +282,16 @@ impl Key { /// any call to `with`. #[unstable(feature = "std_misc", reason = "state querying was recently added")] - pub fn state(&'static self) -> State { + pub fn state(&'static self) -> LocalKeyState { unsafe { match (self.inner)().get() { Some(cell) => { match *cell.get() { - Some(..) => State::Valid, - None => State::Uninitialized, + Some(..) => LocalKeyState::Valid, + None => LocalKeyState::Uninitialized, } } - None => State::Destroyed, + None => LocalKeyState::Destroyed, } } } @@ -327,7 +300,7 @@ impl Key { #[unstable(feature = "std_misc")] #[deprecated(since = "1.0.0", reason = "function renamed to state() and returns more info")] - pub fn destroyed(&'static self) -> bool { self.state() == State::Destroyed } + pub fn destroyed(&'static self) -> bool { self.state() == LocalKeyState::Destroyed } } #[cfg(all(any(target_os = "macos", target_os = "linux"), not(target_arch = "aarch64")))] @@ -553,7 +526,7 @@ mod tests { use sync::mpsc::{channel, Sender}; use cell::UnsafeCell; - use super::State; + use super::LocalKeyState; use thread; struct Foo(Sender<()>); @@ -592,21 +565,21 @@ mod tests { struct Foo; impl Drop for Foo { fn drop(&mut self) { - assert!(FOO.state() == State::Destroyed); + assert!(FOO.state() == LocalKeyState::Destroyed); } } fn foo() -> Foo { - assert!(FOO.state() == State::Uninitialized); + assert!(FOO.state() == LocalKeyState::Uninitialized); Foo } thread_local!(static FOO: Foo = foo()); thread::spawn(|| { - assert!(FOO.state() == State::Uninitialized); + assert!(FOO.state() == LocalKeyState::Uninitialized); FOO.with(|_| { - assert!(FOO.state() == State::Valid); + assert!(FOO.state() == LocalKeyState::Valid); }); - assert!(FOO.state() == State::Valid); + assert!(FOO.state() == LocalKeyState::Valid); }).join().ok().unwrap(); } @@ -642,7 +615,7 @@ mod tests { fn drop(&mut self) { unsafe { HITS += 1; - if K2.state() == State::Destroyed { + if K2.state() == LocalKeyState::Destroyed { assert_eq!(HITS, 3); } else { if HITS == 1 { @@ -658,7 +631,7 @@ mod tests { fn drop(&mut self) { unsafe { HITS += 1; - assert!(K1.state() != State::Destroyed); + assert!(K1.state() != LocalKeyState::Destroyed); assert_eq!(HITS, 2); K1.with(|s| *s.get() = Some(S1)); } @@ -679,7 +652,7 @@ mod tests { impl Drop for S1 { fn drop(&mut self) { - assert!(K1.state() == State::Destroyed); + assert!(K1.state() == LocalKeyState::Destroyed); } } @@ -702,7 +675,7 @@ mod tests { fn drop(&mut self) { let S1(ref tx) = *self; unsafe { - if K2.state() != State::Destroyed { + if K2.state() != LocalKeyState::Destroyed { K2.with(|s| *s.get() = Some(Foo(tx.clone()))); } } diff --git a/src/libstd/thread.rs b/src/libstd/thread/mod.rs similarity index 91% rename from src/libstd/thread.rs rename to src/libstd/thread/mod.rs index ab74442cac99f..57baeb1fb7486 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread/mod.rs @@ -138,9 +138,43 @@ //! synchronization primitives; the threads already provide basic blocking/signaling. //! //! * It can be implemented very efficiently on many platforms. +//! +//! ## Thread-local storage +//! +//! This module also provides an implementation of thread local storage for Rust +//! programs. Thread local storage is a method of storing data into a global +//! variable which each thread in the program will have its own copy of. +//! Threads do not share this data, so accesses do not need to be synchronized. +//! +//! At a high level, this module provides two variants of storage: +//! +//! * Owned thread-local storage. This is a type of thread local key which +//! owns the value that it contains, and will destroy the value when the +//! thread exits. This variant is created with the `thread_local!` macro and +//! can contain any value which is `'static` (no borrowed pointers). +//! +//! * Scoped thread-local storage. This type of key is used to store a reference +//! to a value into local storage temporarily for the scope of a function +//! call. There are no restrictions on what types of values can be placed +//! into this key. +//! +//! Both forms of thread local storage provide an accessor function, `with`, +//! which will yield a shared reference to the value to the specified +//! closure. Thread-local keys only allow shared access to values as there is no +//! way to guarantee uniqueness if a mutable borrow was allowed. Most values +//! will want to make use of some form of **interior mutability** through the +//! `Cell` or `RefCell` types. #![stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "rust1", since = "1.0.0")] +pub use self::__local::{LocalKey, LocalKeyState}; + +#[unstable(feature = "scoped_tls", + reason = "scoped TLS has yet to have wide enough use to fully consider \ + stabilizing its interface")] +pub use self::__scoped::ScopedKey; + use prelude::v1::*; use any::Any; @@ -157,6 +191,22 @@ use time::Duration; #[allow(deprecated)] use old_io::Writer; +//////////////////////////////////////////////////////////////////////////////// +// Thread-local storage +//////////////////////////////////////////////////////////////////////////////// + +#[macro_use] +#[doc(hidden)] +#[path = "local.rs"] pub mod __local; + +#[macro_use] +#[doc(hidden)] +#[path = "scoped.rs"] pub mod __scoped; + +//////////////////////////////////////////////////////////////////////////////// +// Builder +//////////////////////////////////////////////////////////////////////////////// + /// Thread configuration. Provides detailed control over the properties /// and behavior of new threads. #[stable(feature = "rust1", since = "1.0.0")] @@ -322,6 +372,10 @@ impl Builder { } } +//////////////////////////////////////////////////////////////////////////////// +// Free functions +//////////////////////////////////////////////////////////////////////////////// + /// Spawn a new thread, returning a `JoinHandle` for it. /// /// The join handle will implicitly *detach* the child thread upon being @@ -433,6 +487,10 @@ pub fn park_timeout(duration: Duration) { *guard = false; } +//////////////////////////////////////////////////////////////////////////////// +// Thread +//////////////////////////////////////////////////////////////////////////////// + /// The internal representation of a `Thread` handle struct Inner { name: Option, @@ -557,6 +615,10 @@ impl thread_info::NewThread for Thread { fn new(name: Option) -> Thread { Thread::new(name) } } +//////////////////////////////////////////////////////////////////////////////// +// JoinHandle and JoinGuard +//////////////////////////////////////////////////////////////////////////////// + /// Indicates the manner in which a thread exited. /// /// A thread that completes without panicking is considered to exit successfully. @@ -689,6 +751,10 @@ impl<'a, T: Send + 'a> Drop for JoinGuard<'a, T> { } } +//////////////////////////////////////////////////////////////////////////////// +// Tests +//////////////////////////////////////////////////////////////////////////////// + #[cfg(test)] mod test { use prelude::v1::*; diff --git a/src/libstd/thread_local/scoped.rs b/src/libstd/thread/scoped.rs similarity index 91% rename from src/libstd/thread_local/scoped.rs rename to src/libstd/thread/scoped.rs index 86e6c059a70db..2a8be2ad82cea 100644 --- a/src/libstd/thread_local/scoped.rs +++ b/src/libstd/thread/scoped.rs @@ -38,9 +38,7 @@ //! }); //! ``` -#![unstable(feature = "std_misc", - reason = "scoped TLS has yet to have wide enough use to fully consider \ - stabilizing its interface")] +#![unstable(feature = "thread_local_internals")] use prelude::v1::*; @@ -58,7 +56,10 @@ pub mod __impl { /// type `T` scoped to a particular lifetime. Keys provides two methods, `set` /// and `with`, both of which currently use closures to control the scope of /// their contents. -pub struct Key { #[doc(hidden)] pub inner: __impl::KeyInner } +#[unstable(feature = "scoped_tls", + reason = "scoped TLS has yet to have wide enough use to fully consider \ + stabilizing its interface")] +pub struct ScopedKey { #[doc(hidden)] pub inner: __impl::KeyInner } /// Declare a new scoped thread local storage key. /// @@ -86,7 +87,7 @@ macro_rules! __scoped_thread_local_inner { target_os = "openbsd", target_arch = "aarch64")), thread_local)] - static $name: ::std::thread_local::scoped::Key<$t> = + static $name: ::std::thread::ScopedKey<$t> = __scoped_thread_local_inner!($t); ); (pub static $name:ident: $t:ty) => ( @@ -96,11 +97,11 @@ macro_rules! __scoped_thread_local_inner { target_os = "openbsd", target_arch = "aarch64")), thread_local)] - pub static $name: ::std::thread_local::scoped::Key<$t> = + pub static $name: ::std::thread::ScopedKey<$t> = __scoped_thread_local_inner!($t); ); ($t:ty) => ({ - use std::thread_local::scoped::Key as __Key; + use std::thread::ScopedKey as __Key; #[cfg(not(any(windows, target_os = "android", @@ -108,7 +109,7 @@ macro_rules! __scoped_thread_local_inner { target_os = "openbsd", target_arch = "aarch64")))] const _INIT: __Key<$t> = __Key { - inner: ::std::thread_local::scoped::__impl::KeyInner { + inner: ::std::thread::__scoped::__impl::KeyInner { inner: ::std::cell::UnsafeCell { value: 0 as *mut _ }, } }; @@ -119,8 +120,8 @@ macro_rules! __scoped_thread_local_inner { target_os = "openbsd", target_arch = "aarch64"))] const _INIT: __Key<$t> = __Key { - inner: ::std::thread_local::scoped::__impl::KeyInner { - inner: ::std::thread_local::scoped::__impl::OS_INIT, + inner: ::std::thread::__scoped::__impl::KeyInner { + inner: ::std::thread::__scoped::__impl::OS_INIT, marker: ::std::marker::PhantomData::<::std::cell::Cell<$t>>, } }; @@ -129,7 +130,10 @@ macro_rules! __scoped_thread_local_inner { }) } -impl Key { +#[unstable(feature = "scoped_tls", + reason = "scoped TLS has yet to have wide enough use to fully consider \ + stabilizing its interface")] +impl ScopedKey { /// Insert a value into this scoped thread local storage slot for a /// duration of a closure. /// From 05c9728c6943bc313e29cdf8140caecda0c62715 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 23 Mar 2015 14:47:14 -0400 Subject: [PATCH 46/69] Don't conflate regions and affine types Fixes #23642 --- src/doc/trpl/pointers.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/doc/trpl/pointers.md b/src/doc/trpl/pointers.md index 39106aaf85751..bd9b449fc087e 100644 --- a/src/doc/trpl/pointers.md +++ b/src/doc/trpl/pointers.md @@ -498,13 +498,10 @@ they go out of scope: However, boxes do _not_ use reference counting or garbage collection. Boxes are what's called an *affine type*. This means that the Rust compiler, at compile time, determines when the box comes into and goes out of scope, and inserts the -appropriate calls there. Furthermore, boxes are a specific kind of affine type, -known as a *region*. You can read more about regions [in this paper on the -Cyclone programming -language](http://www.cs.umd.edu/projects/cyclone/papers/cyclone-regions.pdf). +appropriate calls there. -You don't need to fully grok the theory of affine types or regions to grok -boxes, though. As a rough approximation, you can treat this Rust code: +You don't need to fully grok the theory of affine types to grok boxes, though. +As a rough approximation, you can treat this Rust code: ```{rust} { From 1be8fcb4a955457b9ec6e16e34bdfbb7e4d849c7 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 23 Mar 2015 13:06:25 -0400 Subject: [PATCH 47/69] Make note of str in 'more strings' chapter Fixes #21035 --- src/doc/trpl/more-strings.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/doc/trpl/more-strings.md b/src/doc/trpl/more-strings.md index 6567cd448f998..0f19b9249f549 100644 --- a/src/doc/trpl/more-strings.md +++ b/src/doc/trpl/more-strings.md @@ -12,7 +12,7 @@ Additionally, strings are not null-terminated and can contain null bytes. Rust has two main types of strings: `&str` and `String`. -# &str +# `&str` The first kind is a `&str`. This is pronounced a 'string slice'. String literals are of the type `&str`: @@ -36,7 +36,36 @@ Like vector slices, string slices are simply a pointer plus a length. This means that they're a 'view' into an already-allocated string, such as a string literal or a `String`. -# String +## `str` + +You may occasionally see references to a `str` type, without the `&`. While +this type does exist, it’s not something you want to use yourself. Sometimes, +people confuse `str` for `String`, and write this: + +```rust +struct S { + s: str, +} +``` + +This leads to ugly errors: + +```text +error: the trait `core::marker::Sized` is not implemented for the type `str` [E0277] +note: `str` does not have a constant size known at compile-time +``` + +Instead, this `struct` should be + +```rust +struct S { + s: String, +} +``` + +So let’s talk about `String`s. + +# `String` A `String` is a heap-allocated string. This string is growable, and is also guaranteed to be UTF-8. `String`s are commonly created by From bc1dde468c1613743c919cb9f33923cc9916c5b4 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 21 Mar 2015 19:30:06 -0400 Subject: [PATCH 48/69] Compiler and trait changes to make indexing by value. --- src/libcollections/bit.rs | 12 ++++++++++++ src/libcore/ops.rs | 12 ++++++++++++ src/librustc/middle/expr_use_visitor.rs | 2 +- src/librustc_trans/trans/expr.rs | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index 90fbe04d3482f..e494527b6a67c 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -169,6 +169,8 @@ pub struct BitVec { impl Index for BitVec { type Output = bool; + + #[cfg(stage0)] #[inline] fn index(&self, i: &usize) -> &bool { if self.get(*i).expect("index out of bounds") { @@ -177,6 +179,16 @@ impl Index for BitVec { &FALSE } } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, i: usize) -> &bool { + if self.get(i).expect("index out of bounds") { + &TRUE + } else { + &FALSE + } + } } /// Computes how many blocks are needed to store that many bits diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 6324e8fa87443..e1e352b5b640c 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -917,8 +917,14 @@ pub trait Index { type Output: ?Sized; /// The method for the indexing (`Foo[Bar]`) operation + #[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] fn index<'a>(&'a self, index: &Idx) -> &'a Self::Output; + + /// The method for the indexing (`Foo[Bar]`) operation + #[cfg(not(stage0))] + #[stable(feature = "rust1", since = "1.0.0")] + fn index<'a>(&'a self, index: Idx) -> &'a Self::Output; } /// The `IndexMut` trait is used to specify the functionality of indexing @@ -960,8 +966,14 @@ pub trait Index { #[stable(feature = "rust1", since = "1.0.0")] pub trait IndexMut: Index { /// The method for the indexing (`Foo[Bar]`) operation + #[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] fn index_mut<'a>(&'a mut self, index: &Idx) -> &'a mut Self::Output; + + /// The method for the indexing (`Foo[Bar]`) operation + #[cfg(not(stage0))] + #[stable(feature = "rust1", since = "1.0.0")] + fn index_mut<'a>(&'a mut self, index: Idx) -> &'a mut Self::Output; } /// An unbounded range. diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs index 6d2392054f9d5..975bf01fdef6f 100644 --- a/src/librustc/middle/expr_use_visitor.rs +++ b/src/librustc/middle/expr_use_visitor.rs @@ -442,7 +442,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> { if !self.walk_overloaded_operator(expr, &**lhs, vec![&**rhs], - PassArgs::ByRef) { + PassArgs::ByValue) { self.select_from_expr(&**lhs); self.consume_expr(&**rhs); } diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs index 4653ef2980a78..4aff28122bbb3 100644 --- a/src/librustc_trans/trans/expr.rs +++ b/src/librustc_trans/trans/expr.rs @@ -843,7 +843,7 @@ fn trans_index<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, base_datum, vec![(ix_datum, idx.id)], Some(SaveIn(scratch.val)), - true)); + false)); let datum = scratch.to_expr_datum(); if type_is_sized(bcx.tcx(), elt_ty) { Datum::new(datum.to_llscalarish(bcx), elt_ty, LvalueExpr) From b4d4daf007753dfb04d87b1ffe1c2ad2d8811d5a Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 21 Mar 2015 19:33:27 -0400 Subject: [PATCH 49/69] Adjust Index/IndexMut impls. For generic collections, we take references. For collections whose keys are integers, we take both references and by-value. --- src/libcollections/btree/map.rs | 15 +++ src/libcollections/string.rs | 32 +++++ src/libcollections/vec.rs | 82 ++++++++++++ src/libcollections/vec_deque.rs | 14 ++ src/libcollections/vec_map.rs | 42 +++++- src/libcore/ops.rs | 6 +- src/libcore/slice.rs | 201 +++++++++++++++++++++++++++++ src/libcore/str/mod.rs | 78 +++++++++++ src/libserialize/json.rs | 23 ++++ src/libstd/collections/hash/map.rs | 24 +++- src/libstd/ffi/os_str.rs | 12 ++ src/libstd/sys/common/wtf8.rs | 79 ++++++++++++ 12 files changed, 600 insertions(+), 8 deletions(-) diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index a9e1ce8d7ce50..0a72f24b43740 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -914,12 +914,27 @@ impl Debug for BTreeMap { } } +#[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] impl Index for BTreeMap where K: Borrow, Q: Ord { type Output = V; + #[inline] + fn index(&self, key: &Q) -> &V { + self.get(key).expect("no entry found for key") + } +} + +#[cfg(not(stage0))] +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a, K: Ord, Q: ?Sized, V> Index<&'a Q> for BTreeMap + where K: Borrow, Q: Ord +{ + type Output = V; + + #[inline] fn index(&self, key: &Q) -> &V { self.get(key).expect("no entry found for key") } diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index cd6f27bf65f6e..3f869d0b8ae45 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -870,34 +870,66 @@ impl<'a> Add<&'a str> for String { #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for String { type Output = str; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::Range) -> &str { &self[..][*index] } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::Range) -> &str { + &self[..][index] + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for String { type Output = str; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeTo) -> &str { &self[..][*index] } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeTo) -> &str { + &self[..][index] + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for String { type Output = str; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeFrom) -> &str { &self[..][*index] } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeFrom) -> &str { + &self[..][index] + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index for String { type Output = str; + + #[cfg(stage0)] #[inline] fn index(&self, _index: &ops::RangeFull) -> &str { unsafe { mem::transmute(&*self.vec) } } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, _index: ops::RangeFull) -> &str { + unsafe { mem::transmute(&*self.vec) } + } } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index b0e8dc7d0b622..3e46ebfc44634 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1323,83 +1323,165 @@ impl Hash for Vec { impl Index for Vec { type Output = T; + + #[cfg(stage0)] #[inline] fn index(&self, index: &usize) -> &T { // NB built-in indexing via `&[T]` &(**self)[*index] } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: usize) -> &T { + // NB built-in indexing via `&[T]` + &(**self)[index] + } } #[stable(feature = "rust1", since = "1.0.0")] impl IndexMut for Vec { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &usize) -> &mut T { // NB built-in indexing via `&mut [T]` &mut (**self)[*index] } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: usize) -> &mut T { + // NB built-in indexing via `&mut [T]` + &mut (**self)[index] + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for Vec { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::Range) -> &[T] { Index::index(&**self, index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::Range) -> &[T] { + Index::index(&**self, index) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for Vec { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeTo) -> &[T] { Index::index(&**self, index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeTo) -> &[T] { + Index::index(&**self, index) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for Vec { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeFrom) -> &[T] { Index::index(&**self, index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeFrom) -> &[T] { + Index::index(&**self, index) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index for Vec { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, _index: &ops::RangeFull) -> &[T] { self.as_slice() } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, _index: ops::RangeFull) -> &[T] { + self.as_slice() + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for Vec { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::Range) -> &mut [T] { IndexMut::index_mut(&mut **self, index) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::Range) -> &mut [T] { + IndexMut::index_mut(&mut **self, index) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for Vec { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::RangeTo) -> &mut [T] { IndexMut::index_mut(&mut **self, index) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::RangeTo) -> &mut [T] { + IndexMut::index_mut(&mut **self, index) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for Vec { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::RangeFrom) -> &mut [T] { IndexMut::index_mut(&mut **self, index) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::RangeFrom) -> &mut [T] { + IndexMut::index_mut(&mut **self, index) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut for Vec { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, _index: &ops::RangeFull) -> &mut [T] { self.as_mut_slice() } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, _index: ops::RangeFull) -> &mut [T] { + self.as_mut_slice() + } } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 56ca74dab1f0f..591ad48f57912 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -1689,18 +1689,32 @@ impl Hash for VecDeque { impl Index for VecDeque { type Output = A; + #[cfg(stage0)] #[inline] fn index(&self, i: &usize) -> &A { self.get(*i).expect("Out of bounds access") } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, i: usize) -> &A { + self.get(i).expect("Out of bounds access") + } } #[stable(feature = "rust1", since = "1.0.0")] impl IndexMut for VecDeque { + #[cfg(stage0)] #[inline] fn index_mut(&mut self, i: &usize) -> &mut A { self.get_mut(*i).expect("Out of bounds access") } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, i: usize) -> &mut A { + self.get_mut(i).expect("Out of bounds access") + } } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index 6e67d8763273d..05693ec52756a 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -798,6 +798,7 @@ impl Extend<(usize, V)> for VecMap { } } +#[cfg(stage0)] impl Index for VecMap { type Output = V; @@ -807,10 +808,49 @@ impl Index for VecMap { } } +#[cfg(not(stage0))] +impl Index for VecMap { + type Output = V; + + #[inline] + fn index<'a>(&'a self, i: usize) -> &'a V { + self.get(&i).expect("key not present") + } +} + +#[cfg(not(stage0))] +impl<'a,V> Index<&'a usize> for VecMap { + type Output = V; + + #[inline] + fn index(&self, i: &usize) -> &V { + self.get(i).expect("key not present") + } +} + +#[cfg(stage0)] +#[stable(feature = "rust1", since = "1.0.0")] +impl IndexMut for VecMap { + #[inline] + fn index_mut(&mut self, i: &usize) -> &mut V { + self.get_mut(&i).expect("key not present") + } +} + +#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl IndexMut for VecMap { #[inline] - fn index_mut<'a>(&'a mut self, i: &usize) -> &'a mut V { + fn index_mut(&mut self, i: usize) -> &mut V { + self.get_mut(&i).expect("key not present") + } +} + +#[cfg(not(stage0))] +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a, V> IndexMut<&'a usize> for VecMap { + #[inline] + fn index_mut(&mut self, i: &usize) -> &mut V { self.get_mut(i).expect("key not present") } } diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index e1e352b5b640c..6e6f97a7af7d9 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -898,7 +898,7 @@ shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } /// impl Index for Foo { /// type Output = Foo; /// -/// fn index<'a>(&'a self, _index: &Bar) -> &'a Foo { +/// fn index<'a>(&'a self, _index: Bar) -> &'a Foo { /// println!("Indexing!"); /// self /// } @@ -945,13 +945,13 @@ pub trait Index { /// impl Index for Foo { /// type Output = Foo; /// -/// fn index<'a>(&'a self, _index: &Bar) -> &'a Foo { +/// fn index<'a>(&'a self, _index: Bar) -> &'a Foo { /// self /// } /// } /// /// impl IndexMut for Foo { -/// fn index_mut<'a>(&'a mut self, _index: &Bar) -> &'a mut Foo { +/// fn index_mut<'a>(&'a mut self, _index: Bar) -> &'a mut Foo { /// println!("Indexing!"); /// self /// } diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 907b2eba80c5b..04b425416f3af 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -263,6 +263,7 @@ impl SliceExt for [T] { #[inline] fn as_mut_slice(&mut self) -> &mut [T] { self } + #[cfg(stage0)] #[inline] fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { unsafe { @@ -273,6 +274,17 @@ impl SliceExt for [T] { } } + #[cfg(not(stage0))] + #[inline] + fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { + unsafe { + let self2: &mut [T] = mem::transmute_copy(&self); + + (ops::IndexMut::index_mut(self, ops::RangeTo { end: mid } ), + ops::IndexMut::index_mut(self2, ops::RangeFrom { start: mid } )) + } + } + #[inline] fn iter_mut<'a>(&'a mut self) -> IterMut<'a, T> { unsafe { @@ -495,25 +507,45 @@ impl SliceExt for [T] { impl ops::Index for [T] { type Output = T; + #[cfg(stage0)] fn index(&self, &index: &usize) -> &T { assert!(index < self.len()); unsafe { mem::transmute(self.repr().data.offset(index as isize)) } } + + #[cfg(not(stage0))] + fn index(&self, index: usize) -> &T { + assert!(index < self.len()); + + unsafe { mem::transmute(self.repr().data.offset(index as isize)) } + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut for [T] { + #[cfg(stage0)] + #[inline] fn index_mut(&mut self, &index: &usize) -> &mut T { assert!(index < self.len()); unsafe { mem::transmute(self.repr().data.offset(index as isize)) } } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: usize) -> &mut T { + assert!(index < self.len()); + + unsafe { mem::transmute(self.repr().data.offset(index as isize)) } + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for [T] { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::Range) -> &[T] { assert!(index.start <= index.end); @@ -525,34 +557,72 @@ impl ops::Index> for [T] { ) } } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::Range) -> &[T] { + assert!(index.start <= index.end); + assert!(index.end <= self.len()); + unsafe { + from_raw_parts ( + self.as_ptr().offset(index.start as isize), + index.end - index.start + ) + } + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for [T] { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeTo) -> &[T] { self.index(&ops::Range{ start: 0, end: index.end }) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeTo) -> &[T] { + self.index(ops::Range{ start: 0, end: index.end }) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for [T] { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeFrom) -> &[T] { self.index(&ops::Range{ start: index.start, end: self.len() }) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeFrom) -> &[T] { + self.index(ops::Range{ start: index.start, end: self.len() }) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index for [T] { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, _index: &RangeFull) -> &[T] { self } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, _index: RangeFull) -> &[T] { + self + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for [T] { + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::Range) -> &mut [T] { assert!(index.start <= index.end); @@ -564,28 +634,64 @@ impl ops::IndexMut> for [T] { ) } } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::Range) -> &mut [T] { + assert!(index.start <= index.end); + assert!(index.end <= self.len()); + unsafe { + from_raw_parts_mut( + self.as_mut_ptr().offset(index.start as isize), + index.end - index.start + ) + } + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for [T] { + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::RangeTo) -> &mut [T] { self.index_mut(&ops::Range{ start: 0, end: index.end }) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::RangeTo) -> &mut [T] { + self.index_mut(ops::Range{ start: 0, end: index.end }) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for [T] { + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::RangeFrom) -> &mut [T] { let len = self.len(); self.index_mut(&ops::Range{ start: index.start, end: len }) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::RangeFrom) -> &mut [T] { + let len = self.len(); + self.index_mut(ops::Range{ start: index.start, end: len }) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut for [T] { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, _index: &RangeFull) -> &mut [T] { self } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, _index: RangeFull) -> &mut [T] { + self + } } @@ -763,37 +869,69 @@ unsafe impl<'a, T: Sync> Send for Iter<'a, T> {} #[unstable(feature = "core")] impl<'a, T> ops::Index> for Iter<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::Range) -> &[T] { self.as_slice().index(index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::Range) -> &[T] { + self.as_slice().index(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::Index> for Iter<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeTo) -> &[T] { self.as_slice().index(index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeTo) -> &[T] { + self.as_slice().index(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::Index> for Iter<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeFrom) -> &[T] { self.as_slice().index(index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeFrom) -> &[T] { + self.as_slice().index(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::Index for Iter<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, _index: &RangeFull) -> &[T] { self.as_slice() } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, _index: RangeFull) -> &[T] { + self.as_slice() + } } impl<'a, T> Iter<'a, T> { @@ -856,63 +994,126 @@ unsafe impl<'a, T: Send> Send for IterMut<'a, T> {} #[unstable(feature = "core")] impl<'a, T> ops::Index> for IterMut<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::Range) -> &[T] { self.index(&RangeFull).index(index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::Range) -> &[T] { + self.index(RangeFull).index(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::Index> for IterMut<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeTo) -> &[T] { self.index(&RangeFull).index(index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeTo) -> &[T] { + self.index(RangeFull).index(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::Index> for IterMut<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeFrom) -> &[T] { self.index(&RangeFull).index(index) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeFrom) -> &[T] { + self.index(RangeFull).index(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::Index for IterMut<'a, T> { type Output = [T]; + + #[cfg(stage0)] #[inline] fn index(&self, _index: &RangeFull) -> &[T] { make_slice!(T => &[T]: self.ptr, self.end) } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, _index: RangeFull) -> &[T] { + make_slice!(T => &[T]: self.ptr, self.end) + } } #[unstable(feature = "core")] impl<'a, T> ops::IndexMut> for IterMut<'a, T> { + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::Range) -> &mut [T] { self.index_mut(&RangeFull).index_mut(index) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::Range) -> &mut [T] { + self.index_mut(RangeFull).index_mut(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::IndexMut> for IterMut<'a, T> { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::RangeTo) -> &mut [T] { self.index_mut(&RangeFull).index_mut(index) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::RangeTo) -> &mut [T] { + self.index_mut(RangeFull).index_mut(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::IndexMut> for IterMut<'a, T> { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, index: &ops::RangeFrom) -> &mut [T] { self.index_mut(&RangeFull).index_mut(index) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, index: ops::RangeFrom) -> &mut [T] { + self.index_mut(RangeFull).index_mut(index) + } } #[unstable(feature = "core")] impl<'a, T> ops::IndexMut for IterMut<'a, T> { + + #[cfg(stage0)] #[inline] fn index_mut(&mut self, _index: &RangeFull) -> &mut [T] { make_mut_slice!(T => &mut [T]: self.ptr, self.end) } + + #[cfg(not(stage0))] + #[inline] + fn index_mut(&mut self, _index: RangeFull) -> &mut [T] { + make_mut_slice!(T => &mut [T]: self.ptr, self.end) + } } diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index e8181395b5c1e..b9a655c6d4e28 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1203,6 +1203,7 @@ mod traits { /// // byte 100 is outside the string /// // &s[3 .. 100]; /// ``` + #[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for str { type Output = str; @@ -1219,6 +1220,49 @@ mod traits { } } + /// Returns a slice of the given string from the byte range + /// [`begin`..`end`). + /// + /// This operation is `O(1)`. + /// + /// Panics when `begin` and `end` do not point to valid characters + /// or point beyond the last character of the string. + /// + /// # Examples + /// + /// ``` + /// let s = "Löwe 老虎 Léopard"; + /// assert_eq!(&s[0 .. 1], "L"); + /// + /// assert_eq!(&s[1 .. 9], "öwe 老"); + /// + /// // these will panic: + /// // byte 2 lies within `ö`: + /// // &s[2 ..3]; + /// + /// // byte 8 lies within `老` + /// // &s[1 .. 8]; + /// + /// // byte 100 is outside the string + /// // &s[3 .. 100]; + /// ``` + #[cfg(not(stage0))] + #[stable(feature = "rust1", since = "1.0.0")] + impl ops::Index> for str { + type Output = str; + #[inline] + fn index(&self, index: ops::Range) -> &str { + // is_char_boundary checks that the index is in [0, .len()] + if index.start <= index.end && + self.is_char_boundary(index.start) && + self.is_char_boundary(index.end) { + unsafe { self.slice_unchecked(index.start, index.end) } + } else { + super::slice_error_fail(self, index.start, index.end) + } + } + } + /// Returns a slice of the string from the beginning to byte /// `end`. /// @@ -1229,6 +1273,8 @@ mod traits { #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for str { type Output = str; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeTo) -> &str { // is_char_boundary checks that the index is in [0, .len()] @@ -1238,6 +1284,17 @@ mod traits { super::slice_error_fail(self, 0, index.end) } } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeTo) -> &str { + // is_char_boundary checks that the index is in [0, .len()] + if self.is_char_boundary(index.end) { + unsafe { self.slice_unchecked(0, index.end) } + } else { + super::slice_error_fail(self, 0, index.end) + } + } } /// Returns a slice of the string from `begin` to its end. @@ -1249,6 +1306,8 @@ mod traits { #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for str { type Output = str; + + #[cfg(stage0)] #[inline] fn index(&self, index: &ops::RangeFrom) -> &str { // is_char_boundary checks that the index is in [0, .len()] @@ -1258,15 +1317,34 @@ mod traits { super::slice_error_fail(self, index.start, self.len()) } } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, index: ops::RangeFrom) -> &str { + // is_char_boundary checks that the index is in [0, .len()] + if self.is_char_boundary(index.start) { + unsafe { self.slice_unchecked(index.start, self.len()) } + } else { + super::slice_error_fail(self, index.start, self.len()) + } + } } #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index for str { type Output = str; + + #[cfg(stage0)] #[inline] fn index(&self, _index: &ops::RangeFull) -> &str { self } + + #[cfg(not(stage0))] + #[inline] + fn index(&self, _index: ops::RangeFull) -> &str { + self + } } } diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index 096c72e6af2db..abbfc82319f5b 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1218,6 +1218,7 @@ impl Json { } } +#[cfg(stage0)] impl<'a> Index<&'a str> for Json { type Output = Json; @@ -1226,6 +1227,16 @@ impl<'a> Index<&'a str> for Json { } } +#[cfg(not(stage0))] +impl<'a> Index<&'a str> for Json { + type Output = Json; + + fn index(&self, idx: &'a str) -> &Json { + self.find(idx).unwrap() + } +} + +#[cfg(stage0)] impl Index for Json { type Output = Json; @@ -1237,6 +1248,18 @@ impl Index for Json { } } +#[cfg(not(stage0))] +impl Index for Json { + type Output = Json; + + fn index<'a>(&'a self, idx: uint) -> &'a Json { + match self { + &Json::Array(ref v) => &v[idx], + _ => panic!("can only index Json with uint if it is an array") + } + } +} + /// The output of the streaming parser. #[derive(PartialEq, Clone, Debug)] pub enum JsonEvent { diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 9139e182ce479..86664d7eb0cf1 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1088,7 +1088,7 @@ impl HashMap /// Some(x) => *x = "b", /// None => (), /// } - /// assert_eq!(map[1], "b"); + /// assert_eq!(map[&1], "b"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> @@ -1111,7 +1111,7 @@ impl HashMap /// /// map.insert(37, "b"); /// assert_eq!(map.insert(37, "c"), Some("b")); - /// assert_eq!(map[37], "c"); + /// assert_eq!(map[&37], "c"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn insert(&mut self, k: K, v: V) -> Option { @@ -1244,6 +1244,7 @@ impl Default for HashMap } } +#[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] impl Index for HashMap where K: Eq + Hash + Borrow, @@ -1258,6 +1259,21 @@ impl Index for HashMap } } +#[cfg(not(stage0))] +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap + where K: Eq + Hash + Borrow, + Q: Eq + Hash, + S: HashState, +{ + type Output = V; + + #[inline] + fn index(&self, index: &Q) -> &V { + self.get(index).expect("no entry found for key") + } +} + /// HashMap iterator. #[stable(feature = "rust1", since = "1.0.0")] pub struct Iter<'a, K: 'a, V: 'a> { @@ -2185,7 +2201,7 @@ mod test_map { map.insert(2, 1); map.insert(3, 4); - assert_eq!(map[2], 1); + assert_eq!(map[&2], 1); } #[test] @@ -2197,7 +2213,7 @@ mod test_map { map.insert(2, 1); map.insert(3, 4); - map[4]; + map[&4]; } #[test] diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index feacbf1e98b81..290c48b1310d5 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -103,6 +103,7 @@ impl OsString { } } +#[cfg(stage0)] #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index for OsString { type Output = OsStr; @@ -113,6 +114,17 @@ impl ops::Index for OsString { } } +#[cfg(not(stage0))] +#[stable(feature = "rust1", since = "1.0.0")] +impl ops::Index for OsString { + type Output = OsStr; + + #[inline] + fn index(&self, _index: ops::RangeFull) -> &OsStr { + unsafe { mem::transmute(self.inner.as_slice()) } + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl ops::Deref for OsString { type Target = OsStr; diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 3cc91bf54b4d9..9f3dae34c7a4b 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -634,6 +634,7 @@ impl Wtf8 { /// /// Panics when `begin` and `end` do not point to code point boundaries, /// or point beyond the end of the string. +#[cfg(stage0)] impl ops::Index> for Wtf8 { type Output = Wtf8; @@ -650,12 +651,36 @@ impl ops::Index> for Wtf8 { } } +/// Return a slice of the given string for the byte range [`begin`..`end`). +/// +/// # Panics +/// +/// Panics when `begin` and `end` do not point to code point boundaries, +/// or point beyond the end of the string. +#[cfg(not(stage0))] +impl ops::Index> for Wtf8 { + type Output = Wtf8; + + #[inline] + fn index(&self, range: ops::Range) -> &Wtf8 { + // is_code_point_boundary checks that the index is in [0, .len()] + if range.start <= range.end && + is_code_point_boundary(self, range.start) && + is_code_point_boundary(self, range.end) { + unsafe { slice_unchecked(self, range.start, range.end) } + } else { + slice_error_fail(self, range.start, range.end) + } + } +} + /// Return a slice of the given string from byte `begin` to its end. /// /// # Panics /// /// Panics when `begin` is not at a code point boundary, /// or is beyond the end of the string. +#[cfg(stage0)] impl ops::Index> for Wtf8 { type Output = Wtf8; @@ -670,12 +695,34 @@ impl ops::Index> for Wtf8 { } } +/// Return a slice of the given string from byte `begin` to its end. +/// +/// # Panics +/// +/// Panics when `begin` is not at a code point boundary, +/// or is beyond the end of the string. +#[cfg(not(stage0))] +impl ops::Index> for Wtf8 { + type Output = Wtf8; + + #[inline] + fn index(&self, range: ops::RangeFrom) -> &Wtf8 { + // is_code_point_boundary checks that the index is in [0, .len()] + if is_code_point_boundary(self, range.start) { + unsafe { slice_unchecked(self, range.start, self.len()) } + } else { + slice_error_fail(self, range.start, self.len()) + } + } +} + /// Return a slice of the given string from its beginning to byte `end`. /// /// # Panics /// /// Panics when `end` is not at a code point boundary, /// or is beyond the end of the string. +#[cfg(stage0)] impl ops::Index> for Wtf8 { type Output = Wtf8; @@ -690,6 +737,28 @@ impl ops::Index> for Wtf8 { } } +/// Return a slice of the given string from its beginning to byte `end`. +/// +/// # Panics +/// +/// Panics when `end` is not at a code point boundary, +/// or is beyond the end of the string. +#[cfg(not(stage0))] +impl ops::Index> for Wtf8 { + type Output = Wtf8; + + #[inline] + fn index(&self, range: ops::RangeTo) -> &Wtf8 { + // is_code_point_boundary checks that the index is in [0, .len()] + if is_code_point_boundary(self, range.end) { + unsafe { slice_unchecked(self, 0, range.end) } + } else { + slice_error_fail(self, 0, range.end) + } + } +} + +#[cfg(stage0)] impl ops::Index for Wtf8 { type Output = Wtf8; @@ -699,6 +768,16 @@ impl ops::Index for Wtf8 { } } +#[cfg(not(stage0))] +impl ops::Index for Wtf8 { + type Output = Wtf8; + + #[inline] + fn index(&self, _range: ops::RangeFull) -> &Wtf8 { + self + } +} + #[inline] fn decode_surrogate(second_byte: u8, third_byte: u8) -> u16 { // The first byte is assumed to be 0xED From 8e58af40044a69a9a88de86e222c287eb79a4dcc Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 21 Mar 2015 21:15:47 -0400 Subject: [PATCH 50/69] Fallout in stdlib, rustdoc, rustc, etc. For most maps, converted uses of `[]` on maps to `get` in rustc, since stage0 and stage1+ disagree about how to use `[]`. --- src/libcollections/btree/map.rs | 4 +- src/libcollections/btree/node.rs | 61 +++++++++++++++++++ src/librustc/metadata/cstore.rs | 2 +- src/librustc/metadata/encoder.rs | 6 +- src/librustc/middle/astencode.rs | 2 +- src/librustc/middle/check_match.rs | 4 +- src/librustc/middle/const_eval.rs | 2 +- src/librustc/middle/dead.rs | 4 +- src/librustc/middle/effect.rs | 2 +- src/librustc/middle/expr_use_visitor.rs | 2 +- .../middle/infer/region_inference/mod.rs | 2 +- src/librustc/middle/liveness.rs | 8 ++- src/librustc/middle/mem_categorization.rs | 2 +- src/librustc/middle/reachable.rs | 2 +- src/librustc/middle/stability.rs | 2 +- src/librustc/middle/traits/project.rs | 4 +- src/librustc/middle/ty.rs | 8 +-- src/librustc_borrowck/borrowck/move_data.rs | 2 +- src/librustc_lint/builtin.rs | 2 +- src/librustc_privacy/lib.rs | 18 +++--- src/librustc_trans/back/link.rs | 4 +- src/librustc_trans/save/mod.rs | 31 ++++++---- src/librustc_trans/trans/_match.rs | 2 +- src/librustc_trans/trans/base.rs | 4 +- src/librustc_trans/trans/callee.rs | 2 +- src/librustc_trans/trans/common.rs | 4 +- src/librustc_trans/trans/consts.rs | 6 +- src/librustc_trans/trans/expr.rs | 18 +++--- src/librustc_typeck/astconv.rs | 2 +- src/librustc_typeck/check/_match.rs | 8 +-- src/librustc_typeck/check/mod.rs | 10 +-- src/librustc_typeck/check/upvar.rs | 2 +- src/librustc_typeck/coherence/mod.rs | 4 +- src/librustc_typeck/collect.rs | 14 +++-- src/librustdoc/html/format.rs | 6 +- src/librustdoc/html/render.rs | 6 +- src/librustdoc/visit_ast.rs | 2 +- src/libstd/thread_local/mod.rs | 2 +- src/libsyntax/ext/format.rs | 2 +- src/libsyntax/ext/tt/macro_rules.rs | 4 +- src/test/auxiliary/issue-2631-a.rs | 2 +- src/test/auxiliary/procedural_mbe_matching.rs | 2 +- ...k-overloaded-index-and-overloaded-deref.rs | 2 +- .../borrowck-overloaded-index-autoderef.rs | 45 +++++++++----- src/test/compile-fail/dst-index.rs | 4 +- src/test/run-pass/dst-index.rs | 4 +- src/test/run-pass/issue-15734.rs | 10 +-- src/test/run-pass/issue-2804-2.rs | 2 +- src/test/run-pass/issue-2804.rs | 5 +- src/test/run-pass/issue-5521.rs | 2 +- src/test/run-pass/issue-7660.rs | 4 +- src/test/run-pass/operator-overloading.rs | 4 +- .../run-pass/overloaded-index-assoc-list.rs | 10 +-- .../run-pass/overloaded-index-autoderef.rs | 8 +-- .../run-pass/overloaded-index-in-field.rs | 4 +- src/test/run-pass/overloaded-index.rs | 8 +-- src/test/run-pass/slice.rs | 16 ++--- 57 files changed, 245 insertions(+), 159 deletions(-) diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index 0a72f24b43740..755f564621a0f 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -264,7 +264,7 @@ impl BTreeMap { /// Some(x) => *x = "b", /// None => (), /// } - /// assert_eq!(map[1], "b"); + /// assert_eq!(map[&1], "b"); /// ``` // See `get` for implementation notes, this is basically a copy-paste with mut's added #[stable(feature = "rust1", since = "1.0.0")] @@ -326,7 +326,7 @@ impl BTreeMap { /// /// map.insert(37, "b"); /// assert_eq!(map.insert(37, "c"), Some("b")); - /// assert_eq!(map[37], "c"); + /// assert_eq!(map[&37], "c"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn insert(&mut self, mut key: K, mut value: V) -> Option { diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs index bfac3b2df5a5c..5b8a5f029762e 100644 --- a/src/libcollections/btree/node.rs +++ b/src/libcollections/btree/node.rs @@ -1522,6 +1522,7 @@ macro_rules! node_slice_impl { } /// Returns a sub-slice with elements starting with `min_key`. + #[cfg(stage0)] pub fn slice_from(self, min_key: &K) -> $NodeSlice<'a, K, V> { // _______________ // |_1_|_3_|_5_|_7_| @@ -1549,7 +1550,37 @@ macro_rules! node_slice_impl { } } + /// Returns a sub-slice with elements starting with `min_key`. + #[cfg(not(stage0))] + pub fn slice_from(self, min_key: &K) -> $NodeSlice<'a, K, V> { + // _______________ + // |_1_|_3_|_5_|_7_| + // | | | | | + // 0 0 1 1 2 2 3 3 4 index + // | | | | | + // \___|___|___|___/ slice_from(&0); pos = 0 + // \___|___|___/ slice_from(&2); pos = 1 + // |___|___|___/ slice_from(&3); pos = 1; result.head_is_edge = false + // \___|___/ slice_from(&4); pos = 2 + // \___/ slice_from(&6); pos = 3 + // \|/ slice_from(&999); pos = 4 + let (pos, pos_is_kv) = self.search_linear(min_key); + $NodeSlice { + has_edges: self.has_edges, + edges: if !self.has_edges { + self.edges + } else { + self.edges.$index(pos ..) + }, + keys: &self.keys[pos ..], + vals: self.vals.$index(pos ..), + head_is_edge: !pos_is_kv, + tail_is_edge: self.tail_is_edge, + } + } + /// Returns a sub-slice with elements up to and including `max_key`. + #[cfg(stage0)] pub fn slice_to(self, max_key: &K) -> $NodeSlice<'a, K, V> { // _______________ // |_1_|_3_|_5_|_7_| @@ -1577,6 +1608,36 @@ macro_rules! node_slice_impl { tail_is_edge: !pos_is_kv, } } + + /// Returns a sub-slice with elements up to and including `max_key`. + #[cfg(not(stage0))] + pub fn slice_to(self, max_key: &K) -> $NodeSlice<'a, K, V> { + // _______________ + // |_1_|_3_|_5_|_7_| + // | | | | | + // 0 0 1 1 2 2 3 3 4 index + // | | | | | + //\|/ | | | | slice_to(&0); pos = 0 + // \___/ | | | slice_to(&2); pos = 1 + // \___|___| | | slice_to(&3); pos = 1; result.tail_is_edge = false + // \___|___/ | | slice_to(&4); pos = 2 + // \___|___|___/ | slice_to(&6); pos = 3 + // \___|___|___|___/ slice_to(&999); pos = 4 + let (pos, pos_is_kv) = self.search_linear(max_key); + let pos = pos + if pos_is_kv { 1 } else { 0 }; + $NodeSlice { + has_edges: self.has_edges, + edges: if !self.has_edges { + self.edges + } else { + self.edges.$index(.. (pos + 1)) + }, + keys: &self.keys[..pos], + vals: self.vals.$index(.. pos), + head_is_edge: self.head_is_edge, + tail_is_edge: !pos_is_kv, + } + } } impl<'a, K: 'a, V: 'a> $NodeSlice<'a, K, V> { diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs index 47ec31c0f1ab7..2499853ace1e3 100644 --- a/src/librustc/metadata/cstore.rs +++ b/src/librustc/metadata/cstore.rs @@ -111,7 +111,7 @@ impl CStore { } pub fn get_crate_data(&self, cnum: ast::CrateNum) -> Rc { - (*self.metas.borrow())[cnum].clone() + self.metas.borrow().get(&cnum).unwrap().clone() } pub fn get_crate_hash(&self, cnum: ast::CrateNum) -> Svh { diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs index 10461e3d2aedf..fa8d0b2a56e4e 100644 --- a/src/librustc/metadata/encoder.rs +++ b/src/librustc/metadata/encoder.rs @@ -375,7 +375,7 @@ fn encode_reexported_static_base_methods(ecx: &EncodeContext, match ecx.tcx.inherent_impls.borrow().get(&exp.def_id) { Some(implementations) => { for base_impl_did in &**implementations { - for &method_did in &*(*impl_items)[*base_impl_did] { + for &method_did in impl_items.get(base_impl_did).unwrap() { let impl_item = ty::impl_or_trait_item( ecx.tcx, method_did.def_id()); @@ -1175,7 +1175,7 @@ fn encode_info_for_item(ecx: &EncodeContext, // We need to encode information about the default methods we // have inherited, so we drive this based on the impl structure. let impl_items = tcx.impl_items.borrow(); - let items = &(*impl_items)[def_id]; + let items = impl_items.get(&def_id).unwrap(); add_to_index(item, rbml_w, index); rbml_w.start_tag(tag_items_data_item); @@ -1816,7 +1816,7 @@ struct ImplVisitor<'a, 'b:'a, 'c:'a, 'tcx:'b> { impl<'a, 'b, 'c, 'tcx, 'v> Visitor<'v> for ImplVisitor<'a, 'b, 'c, 'tcx> { fn visit_item(&mut self, item: &ast::Item) { if let ast::ItemImpl(_, _, _, Some(ref trait_ref), _, _) = item.node { - let def_id = self.ecx.tcx.def_map.borrow()[trait_ref.ref_id].def_id(); + let def_id = self.ecx.tcx.def_map.borrow().get(&trait_ref.ref_id).unwrap().def_id(); // Load eagerly if this is an implementation of the Drop trait // or if the trait is not defined in this crate. diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs index bffcb93bc6d06..801350e8a1e9c 100644 --- a/src/librustc/middle/astencode.rs +++ b/src/librustc/middle/astencode.rs @@ -1228,7 +1228,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext, var_id: var_id, closure_expr_id: id }; - let upvar_capture = tcx.upvar_capture_map.borrow()[upvar_id].clone(); + let upvar_capture = tcx.upvar_capture_map.borrow().get(&upvar_id).unwrap().clone(); var_id.encode(rbml_w); upvar_capture.encode(rbml_w); }) diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs index 496c96c7c8adc..97cd9456098b1 100644 --- a/src/librustc/middle/check_match.rs +++ b/src/librustc/middle/check_match.rs @@ -874,7 +874,7 @@ pub fn specialize<'a>(cx: &MatchCheckCtxt, r: &[&'a Pat], } ast::PatEnum(_, ref args) => { - let def = cx.tcx.def_map.borrow()[pat_id].full_def(); + let def = cx.tcx.def_map.borrow().get(&pat_id).unwrap().full_def(); match def { DefConst(..) => cx.tcx.sess.span_bug(pat_span, "const pattern should've \ @@ -892,7 +892,7 @@ pub fn specialize<'a>(cx: &MatchCheckCtxt, r: &[&'a Pat], ast::PatStruct(_, ref pattern_fields, _) => { // Is this a struct or an enum variant? - let def = cx.tcx.def_map.borrow()[pat_id].full_def(); + let def = cx.tcx.def_map.borrow().get(&pat_id).unwrap().full_def(); let class_id = match def { DefConst(..) => cx.tcx.sess.span_bug(pat_span, "const pattern should've \ diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs index 96433729a9b96..f9598237ff460 100644 --- a/src/librustc/middle/const_eval.rs +++ b/src/librustc/middle/const_eval.rs @@ -150,7 +150,7 @@ pub fn const_expr_to_pat(tcx: &ty::ctxt, expr: &Expr, span: Span) -> P ast::PatTup(exprs.iter().map(|expr| const_expr_to_pat(tcx, &**expr, span)).collect()), ast::ExprCall(ref callee, ref args) => { - let def = tcx.def_map.borrow()[callee.id]; + let def = *tcx.def_map.borrow().get(&callee.id).unwrap(); if let Vacant(entry) = tcx.def_map.borrow_mut().entry(expr.id) { entry.insert(def); } diff --git a/src/librustc/middle/dead.rs b/src/librustc/middle/dead.rs index 5efea66ab0c6c..6d4d759476ed5 100644 --- a/src/librustc/middle/dead.rs +++ b/src/librustc/middle/dead.rs @@ -158,7 +158,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> { fn handle_field_pattern_match(&mut self, lhs: &ast::Pat, pats: &[codemap::Spanned]) { - let id = match self.tcx.def_map.borrow()[lhs.id].full_def() { + let id = match self.tcx.def_map.borrow().get(&lhs.id).unwrap().full_def() { def::DefVariant(_, id, _) => id, _ => { match ty::ty_to_def_id(ty::node_id_to_type(self.tcx, @@ -496,7 +496,7 @@ impl<'a, 'tcx> DeadVisitor<'a, 'tcx> { None => (), Some(impl_list) => { for impl_did in &**impl_list { - for item_did in &(*impl_items)[*impl_did] { + for item_did in &*impl_items.get(impl_did).unwrap() { if self.live_symbols.contains(&item_did.def_id() .node) { return true; diff --git a/src/librustc/middle/effect.rs b/src/librustc/middle/effect.rs index 378f3db082339..5d970c59f639b 100644 --- a/src/librustc/middle/effect.rs +++ b/src/librustc/middle/effect.rs @@ -141,7 +141,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EffectCheckVisitor<'a, 'tcx> { match expr.node { ast::ExprMethodCall(_, _, _) => { let method_call = MethodCall::expr(expr.id); - let base_type = (*self.tcx.method_map.borrow())[method_call].ty; + let base_type = self.tcx.method_map.borrow().get(&method_call).unwrap().ty; debug!("effect: method call case, base type is {}", ppaux::ty_to_string(self.tcx, base_type)); if type_is_unsafe_function(base_type) { diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs index 975bf01fdef6f..97314b57ef656 100644 --- a/src/librustc/middle/expr_use_visitor.rs +++ b/src/librustc/middle/expr_use_visitor.rs @@ -1012,7 +1012,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> { // Each match binding is effectively an assignment to the // binding being produced. - let def = def_map.borrow()[pat.id].full_def(); + let def = def_map.borrow().get(&pat.id).unwrap().full_def(); match mc.cat_def(pat.id, pat.span, pat_ty, def) { Ok(binding_cmt) => { delegate.mutate(pat.id, pat.span, binding_cmt, Init); diff --git a/src/librustc/middle/infer/region_inference/mod.rs b/src/librustc/middle/infer/region_inference/mod.rs index 759d7357df193..553e360180667 100644 --- a/src/librustc/middle/infer/region_inference/mod.rs +++ b/src/librustc/middle/infer/region_inference/mod.rs @@ -1533,7 +1533,7 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> { ConstrainVarSubReg(_, region) => { state.result.push(RegionAndOrigin { region: region, - origin: this.constraints.borrow()[edge.data].clone() + origin: this.constraints.borrow().get(&edge.data).unwrap().clone() }); } } diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index 932c9c61ef1fb..705f20559afde 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -448,7 +448,7 @@ fn visit_expr(ir: &mut IrMaps, expr: &Expr) { match expr.node { // live nodes required for uses or definitions of variables: ast::ExprPath(..) => { - let def = ir.tcx.def_map.borrow()[expr.id].full_def(); + let def = ir.tcx.def_map.borrow().get(&expr.id).unwrap().full_def(); debug!("expr {}: path that leads to {:?}", expr.id, def); if let DefLocal(..) = def { ir.add_live_node_for_node(expr.id, ExprNode(expr.span)); @@ -1302,7 +1302,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { fn access_path(&mut self, expr: &Expr, succ: LiveNode, acc: u32) -> LiveNode { - match self.ir.tcx.def_map.borrow()[expr.id].full_def() { + match self.ir.tcx.def_map.borrow().get(&expr.id).unwrap().full_def() { DefLocal(nid) => { let ln = self.live_node(expr.id, expr.span); if acc != 0 { @@ -1564,7 +1564,9 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { fn check_lvalue(&mut self, expr: &Expr) { match expr.node { ast::ExprPath(..) => { - if let DefLocal(nid) = self.ir.tcx.def_map.borrow()[expr.id].full_def() { + if let DefLocal(nid) = self.ir.tcx.def_map.borrow().get(&expr.id) + .unwrap() + .full_def() { // Assignment to an immutable variable or argument: only legal // if there is no later assignment. If this local is actually // mutable, then check for a reassignment to flag the mutability diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs index 5237a86ebb630..bdcfc67f92b99 100644 --- a/src/librustc/middle/mem_categorization.rs +++ b/src/librustc/middle/mem_categorization.rs @@ -531,7 +531,7 @@ impl<'t,'tcx,TYPER:Typer<'tcx>> MemCategorizationContext<'t,TYPER> { } ast::ExprPath(..) => { - let def = self.tcx().def_map.borrow()[expr.id].full_def(); + let def = self.tcx().def_map.borrow().get(&expr.id).unwrap().full_def(); self.cat_def(expr.id, expr.span, expr_ty, def) } diff --git a/src/librustc/middle/reachable.rs b/src/librustc/middle/reachable.rs index 7ded344414ce6..1bd45b5fc8601 100644 --- a/src/librustc/middle/reachable.rs +++ b/src/librustc/middle/reachable.rs @@ -128,7 +128,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for ReachableContext<'a, 'tcx> { } ast::ExprMethodCall(..) => { let method_call = ty::MethodCall::expr(expr.id); - match (*self.tcx.method_map.borrow())[method_call].origin { + match (*self.tcx.method_map.borrow()).get(&method_call).unwrap().origin { ty::MethodStatic(def_id) => { if is_local(def_id) { if self.def_id_represents_local_inlined_item(def_id) { diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs index 01766b0de085f..d12b737619c8d 100644 --- a/src/librustc/middle/stability.rs +++ b/src/librustc/middle/stability.rs @@ -319,7 +319,7 @@ pub fn check_item(tcx: &ty::ctxt, item: &ast::Item, warn_about_defns: bool, // individually as it's possible to have a stable trait with unstable // items. ast::ItemImpl(_, _, _, Some(ref t), _, ref impl_items) => { - let trait_did = tcx.def_map.borrow()[t.ref_id].def_id(); + let trait_did = tcx.def_map.borrow().get(&t.ref_id).unwrap().def_id(); let trait_items = ty::trait_items(tcx, trait_did); for impl_item in impl_items { diff --git a/src/librustc/middle/traits/project.rs b/src/librustc/middle/traits/project.rs index 6b66d7227d300..a9504910ac162 100644 --- a/src/librustc/middle/traits/project.rs +++ b/src/librustc/middle/traits/project.rs @@ -854,10 +854,10 @@ fn confirm_impl_candidate<'cx,'tcx>( let impl_items_map = selcx.tcx().impl_items.borrow(); let impl_or_trait_items_map = selcx.tcx().impl_or_trait_items.borrow(); - let impl_items = &impl_items_map[impl_vtable.impl_def_id]; + let impl_items = impl_items_map.get(&impl_vtable.impl_def_id).unwrap(); let mut impl_ty = None; for impl_item in impl_items { - let assoc_type = match impl_or_trait_items_map[impl_item.def_id()] { + let assoc_type = match *impl_or_trait_items_map.get(&impl_item.def_id()).unwrap() { ty::TypeTraitItem(ref assoc_type) => assoc_type.clone(), ty::MethodTraitItem(..) => { continue; } }; diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 99c35c6e54258..5088b733c4abb 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -2667,7 +2667,7 @@ impl<'tcx> ctxt<'tcx> { } pub fn closure_kind(&self, def_id: ast::DefId) -> ty::ClosureKind { - self.closure_kinds.borrow()[def_id] + *self.closure_kinds.borrow().get(&def_id).unwrap() } pub fn closure_type(&self, @@ -2675,14 +2675,14 @@ impl<'tcx> ctxt<'tcx> { substs: &subst::Substs<'tcx>) -> ty::ClosureTy<'tcx> { - self.closure_tys.borrow()[def_id].subst(self, substs) + self.closure_tys.borrow().get(&def_id).unwrap().subst(self, substs) } pub fn type_parameter_def(&self, node_id: ast::NodeId) -> TypeParameterDef<'tcx> { - self.ty_param_defs.borrow()[node_id].clone() + self.ty_param_defs.borrow().get(&node_id).unwrap().clone() } } @@ -6540,7 +6540,7 @@ impl<'tcx> ctxt<'tcx> { } pub fn upvar_capture(&self, upvar_id: ty::UpvarId) -> Option { - Some(self.upvar_capture_map.borrow()[upvar_id].clone()) + Some(self.upvar_capture_map.borrow().get(&upvar_id).unwrap().clone()) } } diff --git a/src/librustc_borrowck/borrowck/move_data.rs b/src/librustc_borrowck/borrowck/move_data.rs index 8846f70fbd335..2834fce5278c8 100644 --- a/src/librustc_borrowck/borrowck/move_data.rs +++ b/src/librustc_borrowck/borrowck/move_data.rs @@ -486,7 +486,7 @@ impl<'tcx> MoveData<'tcx> { match path.loan_path.kind { LpVar(..) | LpUpvar(..) | LpDowncast(..) => { let kill_scope = path.loan_path.kill_scope(tcx); - let path = self.path_map.borrow()[path.loan_path]; + let path = *self.path_map.borrow().get(&path.loan_path).unwrap(); self.kill_moves(path, kill_scope.node_id(), dfcx_moves); } LpExtend(..) => {} diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index f6f82c65374bd..f788a02adc4c0 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -418,7 +418,7 @@ struct ImproperCTypesVisitor<'a, 'tcx: 'a> { impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> { fn check_def(&mut self, sp: Span, id: ast::NodeId) { - match self.cx.tcx.def_map.borrow()[id].full_def() { + match self.cx.tcx.def_map.borrow().get(&id).unwrap().full_def() { def::DefPrimTy(ast::TyInt(ast::TyIs(_))) => { self.cx.span_lint(IMPROPER_CTYPES, sp, "found rust type `isize` in foreign module, while \ diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index bfce2f0062de4..2e7fe91365a13 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -253,7 +253,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> { ast::ItemImpl(_, _, _, _, ref ty, ref impl_items) => { let public_ty = match ty.node { ast::TyPath(..) => { - match self.tcx.def_map.borrow()[ty.id].full_def() { + match self.tcx.def_map.borrow().get(&ty.id).unwrap().full_def() { def::DefPrimTy(..) => true, def => { let did = def.def_id(); @@ -317,7 +317,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> { ast::ItemTy(ref ty, _) if public_first => { if let ast::TyPath(..) = ty.node { - match self.tcx.def_map.borrow()[ty.id].full_def() { + match self.tcx.def_map.borrow().get(&ty.id).unwrap().full_def() { def::DefPrimTy(..) | def::DefTyParam(..) => {}, def => { let did = def.def_id(); @@ -349,7 +349,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> { // crate module gets processed as well. if self.prev_exported { assert!(self.export_map.contains_key(&id), "wut {}", id); - for export in &self.export_map[id] { + for export in self.export_map.get(&id).unwrap() { if is_local(export.def_id) { self.reexports.insert(export.def_id.node); } @@ -525,7 +525,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> { // if we've reached the root, then everything was allowable and this // access is public. if closest_private_id == ast::CRATE_NODE_ID { return Allowable } - closest_private_id = self.parents[closest_private_id]; + closest_private_id = *self.parents.get(&closest_private_id).unwrap(); // If we reached the top, then we were public all the way down and // we can allow this access. @@ -543,7 +543,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> { /// whether the node is accessible by the current module that iteration is /// inside. fn private_accessible(&self, id: ast::NodeId) -> bool { - let parent = self.parents[id]; + let parent = *self.parents.get(&id).unwrap(); debug!("privacy - accessible parent {}", self.nodestr(parent)); // After finding `did`'s closest private member, we roll ourselves back @@ -567,7 +567,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> { _ => {} } - cur = self.parents[cur]; + cur = *self.parents.get(&cur).unwrap(); } } @@ -622,7 +622,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> { ast::TyPath(..) => {} _ => return Some((err_span, err_msg, None)), }; - let def = self.tcx.def_map.borrow()[ty.id].full_def(); + let def = self.tcx.def_map.borrow().get(&ty.id).unwrap().full_def(); let did = def.def_id(); assert!(is_local(did)); match self.tcx.map.get(did.node) { @@ -708,7 +708,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> { // Checks that a path is in scope. fn check_path(&mut self, span: Span, path_id: ast::NodeId, last: ast::Ident) { debug!("privacy - path {}", self.nodestr(path_id)); - let path_res = self.tcx.def_map.borrow()[path_id]; + let path_res = *self.tcx.def_map.borrow().get(&path_id).unwrap(); let ck = |tyname: &str| { let ck_public = |def: ast::DefId| { debug!("privacy - ck_public {:?}", def); @@ -881,7 +881,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for PrivacyVisitor<'a, 'tcx> { } } ty::ty_enum(_, _) => { - match self.tcx.def_map.borrow()[expr.id].full_def() { + match self.tcx.def_map.borrow().get(&expr.id).unwrap().full_def() { def::DefVariant(_, variant_id, _) => { for field in fields { self.check_field(expr.span, variant_id, diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 34a23f3efac42..679f1ce79b28c 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -1141,9 +1141,9 @@ fn add_upstream_rust_crates(cmd: &mut Command, sess: &Session, // involves just passing the right -l flag. let data = if dylib { - &trans.crate_formats[config::CrateTypeDylib] + trans.crate_formats.get(&config::CrateTypeDylib).unwrap() } else { - &trans.crate_formats[config::CrateTypeExecutable] + trans.crate_formats.get(&config::CrateTypeExecutable).unwrap() }; // Invoke get_used_crates to ensure that we get a topological sorting of diff --git a/src/librustc_trans/save/mod.rs b/src/librustc_trans/save/mod.rs index 83bb5efb425d2..6a55d6d4adfe3 100644 --- a/src/librustc_trans/save/mod.rs +++ b/src/librustc_trans/save/mod.rs @@ -219,7 +219,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { self.sess.bug(&format!("def_map has no key for {} in lookup_type_ref", ref_id)); } - let def = self.analysis.ty_cx.def_map.borrow()[ref_id].full_def(); + let def = self.analysis.ty_cx.def_map.borrow().get(&ref_id).unwrap().full_def(); match def { def::DefPrimTy(_) => None, _ => Some(def.def_id()), @@ -232,7 +232,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { self.sess.span_bug(span, &format!("def_map has no key for {} in lookup_def_kind", ref_id)); } - let def = def_map[ref_id].full_def(); + let def = def_map.get(&ref_id).unwrap().full_def(); match def { def::DefMod(_) | def::DefForeignMod(_) => Some(recorder::ModRef), @@ -269,8 +269,10 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { self.collecting = false; let span_utils = self.span.clone(); for &(id, ref p, _, _) in &self.collected_paths { - let typ = ppaux::ty_to_string(&self.analysis.ty_cx, - (*self.analysis.ty_cx.node_types.borrow())[id]); + let typ = + ppaux::ty_to_string( + &self.analysis.ty_cx, + *self.analysis.ty_cx.node_types.borrow().get(&id).unwrap()); // get the span only for the name of the variable (I hope the path is only ever a // variable name, but who knows?) self.fmt.formal_str(p.span, @@ -431,8 +433,10 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { ast::NamedField(ident, _) => { let name = get_ident(ident); let qualname = format!("{}::{}", qualname, name); - let typ = ppaux::ty_to_string(&self.analysis.ty_cx, - (*self.analysis.ty_cx.node_types.borrow())[field.node.id]); + let typ = + ppaux::ty_to_string( + &self.analysis.ty_cx, + *self.analysis.ty_cx.node_types.borrow().get(&field.node.id).unwrap()); match self.span.sub_span_before_token(field.span, token::Colon) { Some(sub_span) => self.fmt.field_str(field.span, Some(sub_span), @@ -789,7 +793,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { self.sess.span_bug(span, &format!("def_map has no key for {} in visit_expr", id)); } - let def = def_map[id].full_def(); + let def = def_map.get(&id).unwrap().full_def(); let sub_span = self.span.span_for_last_ident(span); match def { def::DefUpvar(..) | @@ -832,7 +836,8 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { .ty_cx .impl_items .borrow(); - Some((*impl_items)[def_id] + Some(impl_items.get(&def_id) + .unwrap() .iter() .find(|mr| { ty::impl_or_trait_item( @@ -941,7 +946,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { ex: &ast::Expr, args: &Vec>) { let method_map = self.analysis.ty_cx.method_map.borrow(); - let method_callee = &(*method_map)[ty::MethodCall::expr(ex.id)]; + let method_callee = method_map.get(&ty::MethodCall::expr(ex.id)).unwrap(); let (def_id, decl_id) = match method_callee.origin { ty::MethodStatic(def_id) | ty::MethodStaticClosure(def_id) => { @@ -1001,7 +1006,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { self.collected_paths.push((p.id, path.clone(), false, recorder::StructRef)); visit::walk_path(self, path); - let def = self.analysis.ty_cx.def_map.borrow()[p.id].full_def(); + let def = self.analysis.ty_cx.def_map.borrow().get(&p.id).unwrap().full_def(); let struct_def = match def { def::DefConst(..) => None, def::DefVariant(_, variant_id, _) => Some(variant_id), @@ -1113,7 +1118,7 @@ impl<'l, 'tcx, 'v> Visitor<'v> for DxrVisitor<'l, 'tcx> { let glob_map = &self.analysis.glob_map; let glob_map = glob_map.as_ref().unwrap(); if glob_map.contains_key(&item.id) { - for n in &glob_map[item.id] { + for n in glob_map.get(&item.id).unwrap() { if name_string.len() > 0 { name_string.push_str(", "); } @@ -1406,7 +1411,7 @@ impl<'l, 'tcx, 'v> Visitor<'v> for DxrVisitor<'l, 'tcx> { &format!("def_map has no key for {} in visit_arm", id)); } - let def = def_map[id].full_def(); + let def = def_map.get(&id).unwrap().full_def(); match def { def::DefLocal(id) => { let value = if *immut { @@ -1467,7 +1472,7 @@ impl<'l, 'tcx, 'v> Visitor<'v> for DxrVisitor<'l, 'tcx> { for &(id, ref p, ref immut, _) in &self.collected_paths { let value = if *immut { value.to_string() } else { "".to_string() }; let types = self.analysis.ty_cx.node_types.borrow(); - let typ = ppaux::ty_to_string(&self.analysis.ty_cx, (*types)[id]); + let typ = ppaux::ty_to_string(&self.analysis.ty_cx, *types.get(&id).unwrap()); // Get the span only for the name of the variable (I hope the path // is only ever a variable name, but who knows?). let sub_span = self.span.span_for_last_ident(p.span); diff --git a/src/librustc_trans/trans/_match.rs b/src/librustc_trans/trans/_match.rs index c08d3b2be53dd..eb759393ac6ec 100644 --- a/src/librustc_trans/trans/_match.rs +++ b/src/librustc_trans/trans/_match.rs @@ -1017,7 +1017,7 @@ fn compile_submatch<'a, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>, None => { let data = &m[0].data; for &(ref ident, ref value_ptr) in &m[0].bound_ptrs { - let binfo = data.bindings_map[*ident]; + let binfo = *data.bindings_map.get(ident).unwrap(); call_lifetime_start(bcx, binfo.llmatch); if binfo.trmode == TrByRef && type_is_fat_ptr(bcx.tcx(), binfo.ty) { expr::copy_fat_ptr(bcx, *value_ptr, binfo.llmatch); diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index ebd92faaf0f53..bdc810bd83746 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -269,7 +269,7 @@ pub fn self_type_for_closure<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, } pub fn kind_for_closure(ccx: &CrateContext, closure_id: ast::DefId) -> ty::ClosureKind { - ccx.tcx().closure_kinds.borrow()[closure_id] + *ccx.tcx().closure_kinds.borrow().get(&closure_id).unwrap() } pub fn decl_rust_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, @@ -2322,7 +2322,7 @@ pub fn trans_item(ccx: &CrateContext, item: &ast::Item) { static"); } - let v = ccx.static_values().borrow()[item.id].clone(); + let v = ccx.static_values().borrow().get(&item.id).unwrap().clone(); unsafe { if !(llvm::LLVMConstIntGetZExtValue(v) != 0) { ccx.sess().span_fatal(expr.span, "static assertion failed"); diff --git a/src/librustc_trans/trans/callee.rs b/src/librustc_trans/trans/callee.rs index cf36ec1f3ed96..088a34857e753 100644 --- a/src/librustc_trans/trans/callee.rs +++ b/src/librustc_trans/trans/callee.rs @@ -511,7 +511,7 @@ pub fn trans_fn_ref_with_substs<'a, 'tcx>( let ref_ty = match node { ExprId(id) => ty::node_id_to_type(tcx, id), MethodCallKey(method_call) => { - (*tcx.method_map.borrow())[method_call].ty + tcx.method_map.borrow().get(&method_call).unwrap().ty } }; let ref_ty = monomorphize::apply_param_substs(tcx, diff --git a/src/librustc_trans/trans/common.rs b/src/librustc_trans/trans/common.rs index 8f5dbfe2ec000..8754d50597bd0 100644 --- a/src/librustc_trans/trans/common.rs +++ b/src/librustc_trans/trans/common.rs @@ -709,7 +709,7 @@ impl<'blk, 'tcx> mc::Typer<'tcx> for BlockS<'blk, 'tcx> { } fn upvar_capture(&self, upvar_id: ty::UpvarId) -> Option { - Some(self.tcx().upvar_capture_map.borrow()[upvar_id].clone()) + Some(self.tcx().upvar_capture_map.borrow().get(&upvar_id).unwrap().clone()) } fn type_moves_by_default(&self, span: Span, ty: Ty<'tcx>) -> bool { @@ -1213,7 +1213,7 @@ pub fn node_id_substs<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ty::node_id_item_substs(tcx, id).substs } MethodCallKey(method_call) => { - (*tcx.method_map.borrow())[method_call].substs.clone() + tcx.method_map.borrow().get(&method_call).unwrap().substs.clone() } }; diff --git a/src/librustc_trans/trans/consts.rs b/src/librustc_trans/trans/consts.rs index 2a3fcd66195b3..f0947cd471242 100644 --- a/src/librustc_trans/trans/consts.rs +++ b/src/librustc_trans/trans/consts.rs @@ -187,7 +187,7 @@ pub fn get_const_expr_as_global<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, // Special-case constants to cache a common global for all uses. match expr.node { ast::ExprPath(..) => { - let def = ccx.tcx().def_map.borrow()[expr.id].full_def(); + let def = ccx.tcx().def_map.borrow().get(&expr.id).unwrap().full_def(); match def { def::DefConst(def_id) => { if !ccx.tcx().adjustments.borrow().contains_key(&expr.id) { @@ -665,7 +665,7 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, } } ast::ExprPath(..) => { - let def = cx.tcx().def_map.borrow()[e.id].full_def(); + let def = cx.tcx().def_map.borrow().get(&e.id).unwrap().full_def(); match def { def::DefFn(..) | def::DefMethod(..) => { expr::trans_def_fn_unadjusted(cx, e, def, param_substs).val @@ -751,7 +751,7 @@ pub fn trans_static(ccx: &CrateContext, m: ast::Mutability, id: ast::NodeId) { let g = base::get_item_val(ccx, id); // At this point, get_item_val has already translated the // constant's initializer to determine its LLVM type. - let v = ccx.static_values().borrow()[id].clone(); + let v = ccx.static_values().borrow().get(&id).unwrap().clone(); // boolean SSA values are i1, but they have to be stored in i8 slots, // otherwise some LLVM optimization passes don't work as expected let v = if llvm::LLVMTypeOf(v) == Type::i1(ccx).to_ref() { diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs index 4aff28122bbb3..28ac7da3cfce8 100644 --- a/src/librustc_trans/trans/expr.rs +++ b/src/librustc_trans/trans/expr.rs @@ -126,7 +126,7 @@ pub fn trans_into<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, return datum.store_to_dest(bcx, dest, expr.id); } - let qualif = bcx.tcx().const_qualif_map.borrow()[expr.id]; + let qualif = *bcx.tcx().const_qualif_map.borrow().get(&expr.id).unwrap(); if !qualif.intersects(check_const::NOT_CONST | check_const::NEEDS_DROP) { if !qualif.intersects(check_const::PREFER_IN_PLACE) { if let SaveIn(lldest) = dest { @@ -209,7 +209,7 @@ pub fn trans<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, let mut bcx = bcx; let fcx = bcx.fcx; - let qualif = bcx.tcx().const_qualif_map.borrow()[expr.id]; + let qualif = *bcx.tcx().const_qualif_map.borrow().get(&expr.id).unwrap(); let adjusted_global = !qualif.intersects(check_const::NON_STATIC_BORROWS); let global = if !qualif.intersects(check_const::NOT_CONST | check_const::NEEDS_DROP) { let global = consts::get_const_expr_as_global(bcx.ccx(), expr, qualif, @@ -1405,7 +1405,7 @@ pub fn with_field_tys<'tcx, R, F>(tcx: &ty::ctxt<'tcx>, ty.repr(tcx))); } Some(node_id) => { - let def = tcx.def_map.borrow()[node_id].full_def(); + let def = tcx.def_map.borrow().get(&node_id).unwrap().full_def(); match def { def::DefVariant(enum_id, variant_id, _) => { let variant_info = ty::enum_variant_with_id(tcx, enum_id, variant_id); @@ -1961,7 +1961,7 @@ fn trans_overloaded_op<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, dest: Option, autoref: bool) -> Result<'blk, 'tcx> { - let method_ty = (*bcx.tcx().method_map.borrow())[method_call].ty; + let method_ty = bcx.tcx().method_map.borrow().get(&method_call).unwrap().ty; callee::trans_call_inner(bcx, expr.debug_loc(), monomorphize_type(bcx, method_ty), @@ -1982,10 +1982,12 @@ fn trans_overloaded_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, dest: Option) -> Block<'blk, 'tcx> { let method_call = MethodCall::expr(expr.id); - let method_type = (*bcx.tcx() - .method_map - .borrow())[method_call] - .ty; + let method_type = bcx.tcx() + .method_map + .borrow() + .get(&method_call) + .unwrap() + .ty; let mut all_args = vec!(callee); all_args.extend(args.iter().map(|e| &**e)); unpack_result!(bcx, diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 28e7027b2124a..71900855266e9 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -1046,7 +1046,7 @@ fn associated_path_def_to_ty<'tcx>(this: &AstConv<'tcx>, return (tcx.types.err, ty_path_def); }; - let ty_param_name = tcx.ty_param_defs.borrow()[ty_param_node_id].name; + let ty_param_name = tcx.ty_param_defs.borrow().get(&ty_param_node_id).unwrap().name; let bounds = match this.get_type_parameter_bounds(span, ty_param_node_id) { Ok(v) => v, diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs index 8e2f4dcefa022..e71386a9b42b1 100644 --- a/src/librustc_typeck/check/_match.rs +++ b/src/librustc_typeck/check/_match.rs @@ -119,7 +119,7 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>, demand::eqtype(fcx, pat.span, expected, lhs_ty); } ast::PatEnum(..) | ast::PatIdent(..) if pat_is_const(&tcx.def_map, pat) => { - let const_did = tcx.def_map.borrow()[pat.id].def_id(); + let const_did = tcx.def_map.borrow().get(&pat.id).unwrap().def_id(); let const_scheme = ty::lookup_item_type(tcx, const_did); assert!(const_scheme.generics.is_empty()); let const_ty = pcx.fcx.instantiate_type_scheme(pat.span, @@ -163,7 +163,7 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>, // if there are multiple arms, make sure they all agree on // what the type of the binding `x` ought to be - let canon_id = pcx.map[path.node]; + let canon_id = *pcx.map.get(&path.node).unwrap(); if canon_id != pat.id { let ct = fcx.local_ty(pat.span, canon_id); demand::eqtype(fcx, pat.span, ct, typ); @@ -449,7 +449,7 @@ pub fn check_pat_struct<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>, pat: &'tcx ast::Pat, let fcx = pcx.fcx; let tcx = pcx.fcx.ccx.tcx; - let def = tcx.def_map.borrow()[pat.id].full_def(); + let def = tcx.def_map.borrow().get(&pat.id).unwrap().full_def(); let (enum_def_id, variant_def_id) = match def { def::DefTrait(_) => { let name = pprust::path_to_string(path); @@ -518,7 +518,7 @@ pub fn check_pat_enum<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>, let fcx = pcx.fcx; let tcx = pcx.fcx.ccx.tcx; - let def = tcx.def_map.borrow()[pat.id].full_def(); + let def = tcx.def_map.borrow().get(&pat.id).unwrap().full_def(); let enum_def = def.variant_def_ids() .map_or_else(|| def.def_id(), |(enum_def, _)| enum_def); diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 45d4a1edc6b24..f319adac1a16e 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -368,7 +368,7 @@ impl<'a, 'tcx> ty::ClosureTyper<'tcx> for FnCtxt<'a, 'tcx> { substs: &subst::Substs<'tcx>) -> ty::ClosureTy<'tcx> { - self.inh.closure_tys.borrow()[def_id].subst(self.tcx(), substs) + self.inh.closure_tys.borrow().get(&def_id).unwrap().subst(self.tcx(), substs) } fn closure_upvars(&self, @@ -549,7 +549,7 @@ impl<'a, 'tcx> Visitor<'tcx> for GatherLocalsVisitor<'a, 'tcx> { debug!("Local variable {} is assigned type {}", self.fcx.pat_to_string(&*local.pat), self.fcx.infcx().ty_to_string( - self.fcx.inh.locals.borrow()[local.id].clone())); + self.fcx.inh.locals.borrow().get(&local.id).unwrap().clone())); visit::walk_local(self, local); } @@ -565,7 +565,7 @@ impl<'a, 'tcx> Visitor<'tcx> for GatherLocalsVisitor<'a, 'tcx> { debug!("Pattern binding {} is assigned to {} with type {}", token::get_ident(path1.node), self.fcx.infcx().ty_to_string( - self.fcx.inh.locals.borrow()[p.id].clone()), + self.fcx.inh.locals.borrow().get(&p.id).unwrap().clone()), var_ty.repr(self.fcx.tcx())); } } @@ -3327,7 +3327,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>, let mut missing_fields = Vec::new(); for class_field in field_types { let name = class_field.name; - let (_, seen) = class_field_map[name]; + let (_, seen) = *class_field_map.get(&name).unwrap(); if !seen { missing_fields.push( format!("`{}`", &token::get_name(name))) @@ -4428,7 +4428,7 @@ fn check_const<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>, let inh = static_inherited_fields(ccx); let rty = ty::node_id_to_type(ccx.tcx, id); let fcx = blank_fn_ctxt(ccx, &inh, ty::FnConverging(rty), e.id); - let declty = (*fcx.ccx.tcx.tcache.borrow())[local_def(id)].ty; + let declty = fcx.ccx.tcx.tcache.borrow().get(&local_def(id)).unwrap().ty; check_const_with_ty(&fcx, sp, e, declty); } diff --git a/src/librustc_typeck/check/upvar.rs b/src/librustc_typeck/check/upvar.rs index ce4bb4465517b..340cca7d47e7a 100644 --- a/src/librustc_typeck/check/upvar.rs +++ b/src/librustc_typeck/check/upvar.rs @@ -448,7 +448,7 @@ impl<'a,'tcx> AdjustBorrowKind<'a,'tcx> { let closure_def_id = ast_util::local_def(closure_id); let mut closure_kinds = self.fcx.inh.closure_kinds.borrow_mut(); - let existing_kind = closure_kinds[closure_def_id]; + let existing_kind = *closure_kinds.get(&closure_def_id).unwrap(); debug!("adjust_closure_kind: closure_id={}, existing_kind={:?}, new_kind={:?}", closure_id, existing_kind, new_kind); diff --git a/src/librustc_typeck/coherence/mod.rs b/src/librustc_typeck/coherence/mod.rs index 6b0fb8ac71af0..ffd99ff2eece0 100644 --- a/src/librustc_typeck/coherence/mod.rs +++ b/src/librustc_typeck/coherence/mod.rs @@ -269,7 +269,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> { fn get_self_type_for_implementation(&self, impl_did: DefId) -> TypeScheme<'tcx> { - self.crate_context.tcx.tcache.borrow()[impl_did].clone() + self.crate_context.tcx.tcache.borrow().get(&impl_did).unwrap().clone() } // Converts an implementation in the AST to a vector of items. @@ -387,7 +387,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> { }; for &impl_did in &*trait_impls.borrow() { - let items = &(*impl_items)[impl_did]; + let items = impl_items.get(&impl_did).unwrap(); if items.len() < 1 { // We'll error out later. For now, just don't ICE. continue; diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 97cc3ac7c48a7..6be45b26751de 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -194,7 +194,7 @@ impl<'a,'tcx> CrateCtxt<'a,'tcx> { fn method_ty(&self, method_id: ast::NodeId) -> Rc> { let def_id = local_def(method_id); - match self.tcx.impl_or_trait_items.borrow()[def_id] { + match *self.tcx.impl_or_trait_items.borrow().get(&def_id).unwrap() { ty::MethodTraitItem(ref mty) => mty.clone(), ty::TypeTraitItem(..) => { self.tcx.sess.bug(&format!("method with id {} has the wrong type", method_id)); @@ -545,7 +545,7 @@ fn is_param<'tcx>(tcx: &ty::ctxt<'tcx>, -> bool { if let ast::TyPath(None, _) = ast_ty.node { - let path_res = tcx.def_map.borrow()[ast_ty.id]; + let path_res = *tcx.def_map.borrow().get(&ast_ty.id).unwrap(); match path_res.base_def { def::DefSelfTy(node_id) => path_res.depth == 0 && node_id == param_id, @@ -1040,9 +1040,13 @@ fn convert_struct<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, tcx.predicates.borrow_mut().insert(local_def(ctor_id), predicates); } else if struct_def.fields[0].node.kind.is_unnamed() { // Tuple-like. - let inputs: Vec<_> = struct_def.fields.iter().map( - |field| (*tcx.tcache.borrow())[ - local_def(field.node.id)].ty).collect(); + let inputs: Vec<_> = + struct_def.fields + .iter() + .map(|field| tcx.tcache.borrow().get(&local_def(field.node.id)) + .unwrap() + .ty) + .collect(); let ctor_fn_ty = ty::mk_ctor_fn(tcx, local_def(ctor_id), &inputs[..], diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 03a2d708ee43a..4d15abb91dc14 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -290,7 +290,7 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, p: &clean::Path, if ast_util::is_local(did) || cache.inlined.contains(&did) { Some(repeat("../").take(loc.len()).collect::()) } else { - match cache.extern_locations[did.krate] { + match cache.extern_locations[&did.krate] { render::Remote(ref s) => Some(s.to_string()), render::Local => { Some(repeat("../").take(loc.len()).collect::()) @@ -404,11 +404,11 @@ fn primitive_link(f: &mut fmt::Formatter, needs_termination = true; } Some(&cnum) => { - let path = &m.paths[ast::DefId { + let path = &m.paths[&ast::DefId { krate: cnum, node: ast::CRATE_NODE_ID, }]; - let loc = match m.extern_locations[cnum] { + let loc = match m.extern_locations[&cnum] { render::Remote(ref s) => Some(s.to_string()), render::Local => { let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len()); diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 81daac7b90f0d..5ceb0238aa081 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1404,8 +1404,8 @@ impl<'a> Item<'a> { // located, then we return `None`. } else { let cache = cache(); - let path = &cache.external_paths[self.item.def_id]; - let root = match cache.extern_locations[self.item.def_id.krate] { + let path = &cache.external_paths[&self.item.def_id]; + let root = match cache.extern_locations[&self.item.def_id.krate] { Remote(ref s) => s.to_string(), Local => self.cx.root_path.clone(), Unknown => return None, @@ -1863,7 +1863,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, path = if ast_util::is_local(it.def_id) { cx.current.connect("/") } else { - let path = &cache.external_paths[it.def_id]; + let path = &cache.external_paths[&it.def_id]; path[..path.len() - 1].connect("/") }, ty = shortty(it).to_static_str(), diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index d53954b29b585..11e10cc2aa7a1 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -196,7 +196,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { Some(tcx) => tcx, None => return false }; - let def = tcx.def_map.borrow()[id].def_id(); + let def = tcx.def_map.borrow()[&id].def_id(); if !ast_util::is_local(def) { return false } let analysis = match self.analysis { Some(analysis) => analysis, None => return false diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs index 08780292c88b1..b2fd8a8e6164f 100644 --- a/src/libstd/thread_local/mod.rs +++ b/src/libstd/thread_local/mod.rs @@ -745,7 +745,7 @@ mod dynamic_tests { thread_local!(static FOO: RefCell> = map()); FOO.with(|map| { - assert_eq!(map.borrow()[1], 2); + assert_eq!(map.borrow()[&1], 2); }); } diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index 0eaca9af4f08d..2fe77bf7a5411 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -513,7 +513,7 @@ impl<'a, 'b> Context<'a, 'b> { let lname = self.ecx.ident_of(&format!("__arg{}", *name)); pats.push(self.ecx.pat_ident(e.span, lname)); - names[self.name_positions[*name]] = + names[*self.name_positions.get(name).unwrap()] = Some(Context::format_arg(self.ecx, e.span, arg_ty, self.ecx.expr_ident(e.span, lname))); heads.push(self.ecx.expr_addr_of(e.span, e)); diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 7a2ae55e91494..5940b79184379 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -236,7 +236,7 @@ pub fn compile<'cx>(cx: &'cx mut ExtCtxt, argument_gram); // Extract the arguments: - let lhses = match *argument_map[lhs_nm] { + let lhses = match **argument_map.get(&lhs_nm).unwrap() { MatchedSeq(ref s, _) => /* FIXME (#2543) */ (*s).clone(), _ => cx.span_bug(def.span, "wrong-structured lhs") }; @@ -245,7 +245,7 @@ pub fn compile<'cx>(cx: &'cx mut ExtCtxt, check_lhs_nt_follows(cx, &**lhs, def.span); } - let rhses = match *argument_map[rhs_nm] { + let rhses = match **argument_map.get(&rhs_nm).unwrap() { MatchedSeq(ref s, _) => /* FIXME (#2543) */ (*s).clone(), _ => cx.span_bug(def.span, "wrong-structured rhs") }; diff --git a/src/test/auxiliary/issue-2631-a.rs b/src/test/auxiliary/issue-2631-a.rs index dd1ad413a3d27..604a3e69a2176 100644 --- a/src/test/auxiliary/issue-2631-a.rs +++ b/src/test/auxiliary/issue-2631-a.rs @@ -19,6 +19,6 @@ pub type header_map = HashMap>>>>; // the unused ty param is necessary so this gets monomorphized pub fn request(req: &header_map) { - let data = req["METHOD".to_string()].clone(); + let data = req[&"METHOD".to_string()].clone(); let _x = data.borrow().clone()[0].clone(); } diff --git a/src/test/auxiliary/procedural_mbe_matching.rs b/src/test/auxiliary/procedural_mbe_matching.rs index d9a2b06e0393f..18db50a831ca8 100644 --- a/src/test/auxiliary/procedural_mbe_matching.rs +++ b/src/test/auxiliary/procedural_mbe_matching.rs @@ -33,7 +33,7 @@ fn expand_mbe_matches(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree]) let mac_expr = match TokenTree::parse(cx, &mbe_matcher[..], args) { Success(map) => { - match (&*map[str_to_ident("matched")], &*map[str_to_ident("pat")]) { + match (&*map[&str_to_ident("matched")], &*map[&str_to_ident("pat")]) { (&MatchedNonterminal(NtExpr(ref matched_expr)), &MatchedSeq(ref pats, seq_sp)) => { let pats: Vec> = pats.iter().map(|pat_nt| diff --git a/src/test/compile-fail/borrowck-overloaded-index-and-overloaded-deref.rs b/src/test/compile-fail/borrowck-overloaded-index-and-overloaded-deref.rs index 430f2fcc13a73..bee56c9bf390b 100644 --- a/src/test/compile-fail/borrowck-overloaded-index-and-overloaded-deref.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-and-overloaded-deref.rs @@ -19,7 +19,7 @@ struct MyVec { x: T } impl Index for MyVec { type Output = T; - fn index(&self, _: &usize) -> &T { + fn index(&self, _: usize) -> &T { &self.x } } diff --git a/src/test/compile-fail/borrowck-overloaded-index-autoderef.rs b/src/test/compile-fail/borrowck-overloaded-index-autoderef.rs index 99f396ef81432..55a6e2ac7b8d6 100644 --- a/src/test/compile-fail/borrowck-overloaded-index-autoderef.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-autoderef.rs @@ -18,6 +18,7 @@ struct Foo { y: isize, } +#[cfg(stage0)] impl Index for Foo { type Output = isize; @@ -30,8 +31,20 @@ impl Index for Foo { } } -impl IndexMut for Foo { - fn index_mut<'a>(&'a mut self, z: &String) -> &'a mut isize { +impl<'a> Index<&'a String> for Foo { + type Output = isize; + + fn index(&self, z: &String) -> &isize { + if *z == "x" { + &self.x + } else { + &self.y + } + } +} + +impl<'a> IndexMut<&'a String> for Foo { + fn index_mut(&mut self, z: &String) -> &mut isize { if *z == "x" { &mut self.x } else { @@ -41,13 +54,13 @@ impl IndexMut for Foo { } fn test1(mut f: Box, s: String) { - let _p = &mut f[s]; - let _q = &f[s]; //~ ERROR cannot borrow + let _p = &mut f[&s]; + let _q = &f[&s]; //~ ERROR cannot borrow } fn test2(mut f: Box, s: String) { - let _p = &mut f[s]; - let _q = &mut f[s]; //~ ERROR cannot borrow + let _p = &mut f[&s]; + let _q = &mut f[&s]; //~ ERROR cannot borrow } struct Bar { @@ -55,37 +68,37 @@ struct Bar { } fn test3(mut f: Box, s: String) { - let _p = &mut f.foo[s]; - let _q = &mut f.foo[s]; //~ ERROR cannot borrow + let _p = &mut f.foo[&s]; + let _q = &mut f.foo[&s]; //~ ERROR cannot borrow } fn test4(mut f: Box, s: String) { - let _p = &f.foo[s]; - let _q = &f.foo[s]; + let _p = &f.foo[&s]; + let _q = &f.foo[&s]; } fn test5(mut f: Box, s: String) { - let _p = &f.foo[s]; - let _q = &mut f.foo[s]; //~ ERROR cannot borrow + let _p = &f.foo[&s]; + let _q = &mut f.foo[&s]; //~ ERROR cannot borrow } fn test6(mut f: Box, g: Foo, s: String) { - let _p = &f.foo[s]; + let _p = &f.foo[&s]; f.foo = g; //~ ERROR cannot assign } fn test7(mut f: Box, g: Bar, s: String) { - let _p = &f.foo[s]; + let _p = &f.foo[&s]; *f = g; //~ ERROR cannot assign } fn test8(mut f: Box, g: Foo, s: String) { - let _p = &mut f.foo[s]; + let _p = &mut f.foo[&s]; f.foo = g; //~ ERROR cannot assign } fn test9(mut f: Box, g: Bar, s: String) { - let _p = &mut f.foo[s]; + let _p = &mut f.foo[&s]; *f = g; //~ ERROR cannot assign } diff --git a/src/test/compile-fail/dst-index.rs b/src/test/compile-fail/dst-index.rs index 91f3432048256..021ef7343cbb4 100644 --- a/src/test/compile-fail/dst-index.rs +++ b/src/test/compile-fail/dst-index.rs @@ -20,7 +20,7 @@ struct S; impl Index for S { type Output = str; - fn index<'a>(&'a self, _: &usize) -> &'a str { + fn index(&self, _: usize) -> &str { "hello" } } @@ -31,7 +31,7 @@ struct T; impl Index for T { type Output = Debug + 'static; - fn index<'a>(&'a self, idx: &usize) -> &'a (Debug + 'static) { + fn index<'a>(&'a self, idx: usize) -> &'a (Debug + 'static) { static x: usize = 42; &x } diff --git a/src/test/run-pass/dst-index.rs b/src/test/run-pass/dst-index.rs index 0c7ecfcefff34..9539486118b81 100644 --- a/src/test/run-pass/dst-index.rs +++ b/src/test/run-pass/dst-index.rs @@ -19,7 +19,7 @@ struct S; impl Index for S { type Output = str; - fn index<'a>(&'a self, _: &uint) -> &'a str { + fn index<'a>(&'a self, _: uint) -> &'a str { "hello" } } @@ -29,7 +29,7 @@ struct T; impl Index for T { type Output = Debug + 'static; - fn index<'a>(&'a self, idx: &uint) -> &'a (Debug + 'static) { + fn index<'a>(&'a self, idx: uint) -> &'a (Debug + 'static) { static X: uint = 42; &X as &(Debug + 'static) } diff --git a/src/test/run-pass/issue-15734.rs b/src/test/run-pass/issue-15734.rs index 18e4190ee459f..76a5b6488b5a3 100644 --- a/src/test/run-pass/issue-15734.rs +++ b/src/test/run-pass/issue-15734.rs @@ -29,7 +29,7 @@ impl Mat { impl Index<(uint, uint)> for Mat { type Output = T; - fn index<'a>(&'a self, &(row, col): &(uint, uint)) -> &'a T { + fn index<'a>(&'a self, (row, col): (uint, uint)) -> &'a T { &self.data[row * self.cols + col] } } @@ -37,7 +37,7 @@ impl Index<(uint, uint)> for Mat { impl<'a, T> Index<(uint, uint)> for &'a Mat { type Output = T; - fn index<'b>(&'b self, index: &(uint, uint)) -> &'b T { + fn index<'b>(&'b self, index: (uint, uint)) -> &'b T { (*self).index(index) } } @@ -47,8 +47,8 @@ struct Row { mat: M, row: uint, } impl> Index for Row { type Output = T; - fn index<'a>(&'a self, col: &uint) -> &'a T { - &self.mat[(self.row, *col)] + fn index<'a>(&'a self, col: uint) -> &'a T { + &self.mat[(self.row, col)] } } @@ -56,7 +56,7 @@ fn main() { let m = Mat::new(vec!(1, 2, 3, 4, 5, 6), 3); let r = m.row(1); - assert!(r.index(&2) == &6); + assert!(r.index(2) == &6); assert!(r[2] == 6); assert!(r[2] == 6); assert!(6 == r[2]); diff --git a/src/test/run-pass/issue-2804-2.rs b/src/test/run-pass/issue-2804-2.rs index 4f89d28332a23..b04ae0edbed87 100644 --- a/src/test/run-pass/issue-2804-2.rs +++ b/src/test/run-pass/issue-2804-2.rs @@ -16,7 +16,7 @@ extern crate collections; use std::collections::HashMap; fn add_interfaces(managed_ip: String, device: HashMap) { - println!("{}, {}", managed_ip, device["interfaces".to_string()]); + println!("{}, {}", managed_ip, device["interfaces"]); } pub fn main() {} diff --git a/src/test/run-pass/issue-2804.rs b/src/test/run-pass/issue-2804.rs index b9b5aec62fcda..619bd08141fb6 100644 --- a/src/test/run-pass/issue-2804.rs +++ b/src/test/run-pass/issue-2804.rs @@ -56,8 +56,7 @@ fn add_interface(_store: int, managed_ip: String, data: json::Json) -> (String, fn add_interfaces(store: int, managed_ip: String, device: HashMap) -> Vec<(String, object)> { - match device["interfaces".to_string()] - { + match device["interfaces"] { Json::Array(ref interfaces) => { interfaces.iter().map(|interface| { @@ -67,7 +66,7 @@ fn add_interfaces(store: int, managed_ip: String, device: HashMap { println!("Expected list for {} interfaces, found {}", managed_ip, - device["interfaces".to_string()]); + device["interfaces"]); Vec::new() } } diff --git a/src/test/run-pass/issue-5521.rs b/src/test/run-pass/issue-5521.rs index fb0e8e599eb2a..7016e28f2ee02 100644 --- a/src/test/run-pass/issue-5521.rs +++ b/src/test/run-pass/issue-5521.rs @@ -17,7 +17,7 @@ fn bar(a: foo::map) { if false { panic!(); } else { - let _b = &(*a)[2]; + let _b = &(*a)[&2]; } } diff --git a/src/test/run-pass/issue-7660.rs b/src/test/run-pass/issue-7660.rs index 9e36b1f5082d0..78318e083ba40 100644 --- a/src/test/run-pass/issue-7660.rs +++ b/src/test/run-pass/issue-7660.rs @@ -21,6 +21,6 @@ pub fn main() { let mut m: HashMap = HashMap::new(); m.insert(1, A(0, 0)); - let A(ref _a, ref _b) = m[1]; - let (a, b) = match m[1] { A(ref _a, ref _b) => (_a, _b) }; + let A(ref _a, ref _b) = m[&1]; + let (a, b) = match m[&1] { A(ref _a, ref _b) => (_a, _b) }; } diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs index 3ddc666cd384c..801e71b303862 100644 --- a/src/test/run-pass/operator-overloading.rs +++ b/src/test/run-pass/operator-overloading.rs @@ -52,8 +52,8 @@ impl ops::Not for Point { impl ops::Index for Point { type Output = int; - fn index(&self, x: &bool) -> &int { - if *x { + fn index(&self, x: bool) -> &int { + if x { &self.x } else { &self.y diff --git a/src/test/run-pass/overloaded-index-assoc-list.rs b/src/test/run-pass/overloaded-index-assoc-list.rs index 0064748e88369..b5c9962fe9c3f 100644 --- a/src/test/run-pass/overloaded-index-assoc-list.rs +++ b/src/test/run-pass/overloaded-index-assoc-list.rs @@ -28,7 +28,7 @@ impl AssociationList { } } -impl Index for AssociationList { +impl<'a, K: PartialEq + std::fmt::Debug, V:Clone> Index<&'a K> for AssociationList { type Output = V; fn index<'a>(&'a self, index: &K) -> &'a V { @@ -49,9 +49,9 @@ pub fn main() { list.push(foo.clone(), 22); list.push(bar.clone(), 44); - assert!(list[foo] == 22); - assert!(list[bar] == 44); + assert!(list[&foo] == 22); + assert!(list[&bar] == 44); - assert!(list[foo] == 22); - assert!(list[bar] == 44); + assert!(list[&foo] == 22); + assert!(list[&bar] == 44); } diff --git a/src/test/run-pass/overloaded-index-autoderef.rs b/src/test/run-pass/overloaded-index-autoderef.rs index 8f655f0517ddf..107f0fbc20904 100644 --- a/src/test/run-pass/overloaded-index-autoderef.rs +++ b/src/test/run-pass/overloaded-index-autoderef.rs @@ -23,8 +23,8 @@ struct Foo { impl Index for Foo { type Output = int; - fn index(&self, z: &int) -> &int { - if *z == 0 { + fn index(&self, z: int) -> &int { + if z == 0 { &self.x } else { &self.y @@ -33,8 +33,8 @@ impl Index for Foo { } impl IndexMut for Foo { - fn index_mut(&mut self, z: &int) -> &mut int { - if *z == 0 { + fn index_mut(&mut self, z: int) -> &mut int { + if z == 0 { &mut self.x } else { &mut self.y diff --git a/src/test/run-pass/overloaded-index-in-field.rs b/src/test/run-pass/overloaded-index-in-field.rs index 487fb93c9fee8..f01e5541c423b 100644 --- a/src/test/run-pass/overloaded-index-in-field.rs +++ b/src/test/run-pass/overloaded-index-in-field.rs @@ -25,8 +25,8 @@ struct Bar { impl Index for Foo { type Output = int; - fn index(&self, z: &int) -> &int { - if *z == 0 { + fn index(&self, z: int) -> &int { + if z == 0 { &self.x } else { &self.y diff --git a/src/test/run-pass/overloaded-index.rs b/src/test/run-pass/overloaded-index.rs index 10ca3804eaedb..60e0ed9bfdd0f 100644 --- a/src/test/run-pass/overloaded-index.rs +++ b/src/test/run-pass/overloaded-index.rs @@ -18,8 +18,8 @@ struct Foo { impl Index for Foo { type Output = int; - fn index(&self, z: &int) -> &int { - if *z == 0 { + fn index(&self, z: int) -> &int { + if z == 0 { &self.x } else { &self.y @@ -28,8 +28,8 @@ impl Index for Foo { } impl IndexMut for Foo { - fn index_mut(&mut self, z: &int) -> &mut int { - if *z == 0 { + fn index_mut(&mut self, z: int) -> &mut int { + if z == 0 { &mut self.x } else { &mut self.y diff --git a/src/test/run-pass/slice.rs b/src/test/run-pass/slice.rs index 30b53dbb0ad5b..ee9bb80356164 100644 --- a/src/test/run-pass/slice.rs +++ b/src/test/run-pass/slice.rs @@ -21,53 +21,53 @@ struct Foo; impl Index> for Foo { type Output = Foo; - fn index(&self, index: &Range) -> &Foo { + fn index(&self, index: Range) -> &Foo { unsafe { COUNT += 1; } self } } impl Index> for Foo { type Output = Foo; - fn index(&self, index: &RangeTo) -> &Foo { + fn index(&self, index: RangeTo) -> &Foo { unsafe { COUNT += 1; } self } } impl Index> for Foo { type Output = Foo; - fn index(&self, index: &RangeFrom) -> &Foo { + fn index(&self, index: RangeFrom) -> &Foo { unsafe { COUNT += 1; } self } } impl Index for Foo { type Output = Foo; - fn index(&self, _index: &RangeFull) -> &Foo { + fn index(&self, _index: RangeFull) -> &Foo { unsafe { COUNT += 1; } self } } impl IndexMut> for Foo { - fn index_mut(&mut self, index: &Range) -> &mut Foo { + fn index_mut(&mut self, index: Range) -> &mut Foo { unsafe { COUNT += 1; } self } } impl IndexMut> for Foo { - fn index_mut(&mut self, index: &RangeTo) -> &mut Foo { + fn index_mut(&mut self, index: RangeTo) -> &mut Foo { unsafe { COUNT += 1; } self } } impl IndexMut> for Foo { - fn index_mut(&mut self, index: &RangeFrom) -> &mut Foo { + fn index_mut(&mut self, index: RangeFrom) -> &mut Foo { unsafe { COUNT += 1; } self } } impl IndexMut for Foo { - fn index_mut(&mut self, _index: &RangeFull) -> &mut Foo { + fn index_mut(&mut self, _index: RangeFull) -> &mut Foo { unsafe { COUNT += 1; } self } From 57cf2decf755c6eea3275e2a87862756eb8c62ca Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 21 Mar 2015 21:16:57 -0400 Subject: [PATCH 51/69] Update borrowck tests to test that index is by-move now --- ...orrowck-overloaded-index-move-from-vec.rs} | 2 +- .../borrowck-overloaded-index-move-index.rs | 74 +++++++++++++++++++ ...=> borrowck-overloaded-index-ref-index.rs} | 14 ++-- 3 files changed, 82 insertions(+), 8 deletions(-) rename src/test/compile-fail/{borrowck-overloaded-index-2.rs => borrowck-overloaded-index-move-from-vec.rs} (95%) create mode 100644 src/test/compile-fail/borrowck-overloaded-index-move-index.rs rename src/test/compile-fail/{borrowck-overloaded-index.rs => borrowck-overloaded-index-ref-index.rs} (82%) diff --git a/src/test/compile-fail/borrowck-overloaded-index-2.rs b/src/test/compile-fail/borrowck-overloaded-index-move-from-vec.rs similarity index 95% rename from src/test/compile-fail/borrowck-overloaded-index-2.rs rename to src/test/compile-fail/borrowck-overloaded-index-move-from-vec.rs index 58668b73cbffb..1b62d9c326d77 100644 --- a/src/test/compile-fail/borrowck-overloaded-index-2.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-move-from-vec.rs @@ -19,7 +19,7 @@ struct MyVec { impl Index for MyVec { type Output = T; - fn index(&self, &i: &usize) -> &T { + fn index(&self, i: usize) -> &T { &self.data[i] } } diff --git a/src/test/compile-fail/borrowck-overloaded-index-move-index.rs b/src/test/compile-fail/borrowck-overloaded-index-move-index.rs new file mode 100644 index 0000000000000..d8615d1905338 --- /dev/null +++ b/src/test/compile-fail/borrowck-overloaded-index-move-index.rs @@ -0,0 +1,74 @@ +// Copyright 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::ops::{Index, IndexMut}; + +struct Foo { + x: isize, + y: isize, +} + +impl Index for Foo { + type Output = isize; + + fn index(&self, z: String) -> &isize { + if z == "x" { + &self.x + } else { + &self.y + } + } +} + +impl IndexMut for Foo { + fn index_mut(&mut self, z: String) -> &mut isize { + if z == "x" { + &mut self.x + } else { + &mut self.y + } + } +} + +struct Bar { + x: isize, +} + +impl Index for Bar { + type Output = isize; + + fn index<'a>(&'a self, z: isize) -> &'a isize { + &self.x + } +} + +fn main() { + let mut f = Foo { + x: 1, + y: 2, + }; + let mut s = "hello".to_string(); + let rs = &mut s; + + println!("{}", f[s]); + //~^ ERROR cannot move out of `s` because it is borrowed + + f[s] = 10; + //~^ ERROR cannot move out of `s` because it is borrowed + //~| ERROR use of moved value: `s` + + let s = Bar { + x: 1, + }; + let i = 2; + let _j = &i; + println!("{}", s[i]); // no error, i is copy + println!("{}", s[i]); +} diff --git a/src/test/compile-fail/borrowck-overloaded-index.rs b/src/test/compile-fail/borrowck-overloaded-index-ref-index.rs similarity index 82% rename from src/test/compile-fail/borrowck-overloaded-index.rs rename to src/test/compile-fail/borrowck-overloaded-index-ref-index.rs index 2d752abe7e3c2..4c50caf49768d 100644 --- a/src/test/compile-fail/borrowck-overloaded-index.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-ref-index.rs @@ -15,10 +15,10 @@ struct Foo { y: isize, } -impl Index for Foo { +impl<'a> Index<&'a String> for Foo { type Output = isize; - fn index<'a>(&'a self, z: &String) -> &'a isize { + fn index(&self, z: &String) -> &isize { if *z == "x" { &self.x } else { @@ -27,8 +27,8 @@ impl Index for Foo { } } -impl IndexMut for Foo { - fn index_mut<'a>(&'a mut self, z: &String) -> &'a mut isize { +impl<'a> IndexMut<&'a String> for Foo { + fn index_mut(&mut self, z: &String) -> &mut isize { if *z == "x" { &mut self.x } else { @@ -44,7 +44,7 @@ struct Bar { impl Index for Bar { type Output = isize; - fn index<'a>(&'a self, z: &isize) -> &'a isize { + fn index<'a>(&'a self, z: isize) -> &'a isize { &self.x } } @@ -56,9 +56,9 @@ fn main() { }; let mut s = "hello".to_string(); let rs = &mut s; - println!("{}", f[s]); + println!("{}", f[&s]); //~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable - f[s] = 10; + f[&s] = 10; //~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable let s = Bar { x: 1, From 2df8830642fffa6c68aa6318985cfcd2e63db81b Mon Sep 17 00:00:00 2001 From: Tom Jakubowski Date: Mon, 23 Mar 2015 14:01:28 -0700 Subject: [PATCH 52/69] rustdoc: Support for "array" primitive Impls on `clean::Type::FixedVector` are now collected in the array primitive page instead of the slice primitive page. Also add a primitive docs for arrays to `std`. --- src/libcore/array.rs | 2 ++ src/librustdoc/clean/mod.rs | 6 +++++- src/librustdoc/html/format.rs | 2 +- src/librustdoc/html/render.rs | 19 ++++++++++++------- src/libstd/array.rs | 13 +++++++++++++ src/libstd/lib.rs | 6 +++++- 6 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 src/libstd/array.rs diff --git a/src/libcore/array.rs b/src/libcore/array.rs index edb11df54894c..b2c23f051d5f1 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -14,6 +14,8 @@ #![unstable(feature = "core")] // not yet reviewed +#![doc(primitive = "array")] + use clone::Clone; use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; use fmt; diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 421549f8b7ecb..3db51ff86a336 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1322,7 +1322,8 @@ pub enum Type { /// For parameterized types, so the consumer of the JSON don't go /// looking for types which don't exist anywhere. Generic(String), - /// Primitives are just the fixed-size numeric types (plus int/uint/float), and char. + /// Primitives are the fixed-size numeric types (plus int/uint/float), char, + /// arrays, slices, and tuples. Primitive(PrimitiveType), /// extern "ABI" fn BareFunction(Box), @@ -1362,6 +1363,7 @@ pub enum PrimitiveType { Bool, Str, Slice, + Array, PrimitiveTuple, } @@ -1396,6 +1398,7 @@ impl PrimitiveType { "str" => Some(Str), "f32" => Some(F32), "f64" => Some(F64), + "array" => Some(Array), "slice" => Some(Slice), "tuple" => Some(PrimitiveTuple), _ => None, @@ -1440,6 +1443,7 @@ impl PrimitiveType { Str => "str", Bool => "bool", Char => "char", + Array => "array", Slice => "slice", PrimitiveTuple => "tuple", } diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 03a2d708ee43a..0e6e008c61652 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -486,7 +486,7 @@ impl fmt::Display for clean::Type { primitive_link(f, clean::Slice, &format!("[{}]", **t)) } clean::FixedVector(ref t, ref s) => { - primitive_link(f, clean::Slice, + primitive_link(f, clean::PrimitiveType::Array, &format!("[{}; {}]", **t, *s)) } clean::Bottom => f.write_str("!"), diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 81daac7b90f0d..2018de17e7922 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1026,7 +1026,8 @@ impl DocFolder for Cache { match item { clean::Item{ attrs, inner: clean::ImplItem(i), .. } => { use clean::{Primitive, Vector, ResolvedPath, BorrowedRef}; - use clean::{FixedVector, Slice, Tuple, PrimitiveTuple}; + use clean::PrimitiveType::{Array, Slice, PrimitiveTuple}; + use clean::{FixedVector, Tuple}; // extract relevant documentation for this impl let dox = match attrs.into_iter().find(|a| { @@ -1056,12 +1057,16 @@ impl DocFolder for Cache { Some(ast_util::local_def(p.to_node_id())) } - // In a DST world, we may only need - // Vector/FixedVector, but for now we also pick up - // borrowed references - Vector(..) | FixedVector(..) | - BorrowedRef{ type_: box Vector(..), .. } | - BorrowedRef{ type_: box FixedVector(..), .. } => + FixedVector(..) | + BorrowedRef { type_: box FixedVector(..), .. } => + { + Some(ast_util::local_def(Array.to_node_id())) + } + + // In a DST world, we may only need Vector, but for now we + // also pick up borrowed references + Vector(..) | + BorrowedRef{ type_: box Vector(..), .. } => { Some(ast_util::local_def(Slice.to_node_id())) } diff --git a/src/libstd/array.rs b/src/libstd/array.rs new file mode 100644 index 0000000000000..a6b8cd71a3b3d --- /dev/null +++ b/src/libstd/array.rs @@ -0,0 +1,13 @@ +// Copyright 2015 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! The fixed-size array type (`[T; n]`). + +#![doc(primitive = "array")] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b055796ba547f..5839e3fb63887 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -212,6 +212,9 @@ pub mod prelude; /* Primitive types */ +// NB: slice and str are primitive types too, but their module docs + primitive doc pages +// are inlined from the public re-exports of core_collections::{slice, str} above. + #[path = "num/float_macros.rs"] #[macro_use] mod float_macros; @@ -285,8 +288,9 @@ pub mod sync; pub mod rt; mod panicking; -// Documentation for primitive types +// Modules that exist purely to document + host impl docs for primitive types +mod array; mod bool; mod unit; mod tuple; From 1aa75cea1de6b318d015b205f584ec5760f866e3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 23 Mar 2015 14:27:09 -0700 Subject: [PATCH 53/69] configure: Fix detection of 32-bit Linux userspace The variable '$SHELL' is not actually defined by 'sh'. --- configure | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/configure b/configure index fdc28eee8c8ef..683c7fd056396 100755 --- a/configure +++ b/configure @@ -479,10 +479,19 @@ esac # Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ] then - file -L "$SHELL" | grep -q "x86[_-]64" - if [ $? != 0 ]; then - CFG_CPUTYPE=i686 + # $SHELL does not exist in standard 'sh', so probably only exists + # if configure is running in an interactive bash shell. /usr/bin/env + # exists *everywhere*. + BIN_TO_PROBE="$SHELL" + if [ -z "$BIN_TO_PROBE" -a -e "/usr/bin/env" ]; then + BIN_TO_PROBE="/usr/bin/env" fi + if [ -n "$BIN_TO_PROBE" ]; then + file -L "$BIN_TO_PROBE" | grep -q "x86[_-]64" + if [ $? != 0 ]; then + CFG_CPUTYPE=i686 + fi + fi fi From 3d365f6a01c4ebd7847ef7ec64afdcc54129a055 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 12 Mar 2015 13:01:06 -0700 Subject: [PATCH 54/69] rustdoc: interpret all leading feature attributes in examples as crate attributes This makes it possible to write `#![feature(foo)]` in doc tests. --- src/doc/trpl/documentation.md | 19 ++++++++++-------- src/librustdoc/lib.rs | 1 + src/librustdoc/test.rs | 37 +++++++++++++++++++++++++++++++++-- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 8e5b3b6a7f0af..643554e656333 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -237,14 +237,17 @@ fn main() { } ``` -Here's the full algorithm: - -1. Given a code block, if it does not contain `fn main()`, it is wrapped in - `fn main() { your_code }` -2. Given that result, if it contains no `extern crate` directives but it also - contains the name of the crate being tested, then `extern crate ` is - injected at the top. -3. Some common allow attributes are added for documentation examples at the top. +Here's the full algorithm rustdoc uses to postprocess examples: + +1. Any leading `#![foo]` attributes are left intact as crate attributes. +2. Some common `allow` attributes are inserted, including + `unused_variables`, `unused_assignments`, `unused_mut`, + `unused_attributes`, and `dead_code`. Small examples often trigger + these lints. +3. If the example does not contain `extern crate`, then `extern crate + ;` is inserted. +2. Finally, if the example does not contain `fn main`, the remainder of the + text is wrapped in `fn main() { your_code }` Sometimes, this isn't enough, though. For example, all of these code samples with `///` we've been talking about? The raw text: diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index d747ed3f119c2..aa0f60d0d1c90 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -51,6 +51,7 @@ extern crate rustc_back; extern crate serialize; extern crate syntax; extern crate "test" as testing; +extern crate unicode; #[macro_use] extern crate log; extern crate "serialize" as rustc_serialize; // used by deriving diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index e2f8a6f82c644..3bd466caf0b7f 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -219,7 +219,14 @@ fn runtest(test: &str, cratename: &str, libs: SearchPaths, } pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, dont_insert_main: bool) -> String { + let (crate_attrs, everything_else) = partition_source(s); + let mut prog = String::new(); + + // First push any outer attributes from the example, assuming they + // are intended to be crate attributes. + prog.push_str(&crate_attrs); + if lints { prog.push_str(r" #![allow(unused_variables, unused_assignments, unused_mut, unused_attributes, dead_code)] @@ -240,16 +247,42 @@ pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, dont_insert_main: } } if dont_insert_main || s.contains("fn main") { - prog.push_str(s); + prog.push_str(&everything_else); } else { prog.push_str("fn main() {\n "); - prog.push_str(&s.replace("\n", "\n ")); + prog.push_str(&everything_else.replace("\n", "\n ")); prog.push_str("\n}"); } + info!("final test program: {}", prog); + return prog } +fn partition_source(s: &str) -> (String, String) { + use unicode::str::UnicodeStr; + + let mut after_header = false; + let mut before = String::new(); + let mut after = String::new(); + + for line in s.lines() { + let trimline = StrExt::trim(line); + let header = trimline.is_whitespace() || + trimline.starts_with("#![feature"); + if !header || after_header { + after_header = true; + after.push_str(line); + after.push_str("\n"); + } else { + before.push_str(line); + before.push_str("\n"); + } + } + + return (before, after); +} + pub struct Collector { pub tests: Vec, names: Vec, From 7770ea706b2ba10ebf9112b38af9aaad5cc6f24c Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 15 Mar 2015 17:54:30 -0700 Subject: [PATCH 55/69] rustdoc: Add #[doc(test(no_inject_crate))] attribute So that collections doctests don't automatically fail themselves by injecting `extern crate collections` when they are mostly using the std facade. --- src/librustdoc/html/markdown.rs | 2 +- src/librustdoc/markdown.rs | 2 +- src/librustdoc/test.rs | 56 +++++++++++++++++++++++++++------ 3 files changed, 49 insertions(+), 11 deletions(-) diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 7ea5bd569e199..cdd8457687ac6 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -230,7 +230,7 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result { stripped_filtered_line(l).unwrap_or(l) }).collect::>().connect("\n"); let krate = krate.as_ref().map(|s| &**s); - let test = test::maketest(&test, krate, false, false); + let test = test::maketest(&test, krate, false, false, true); s.push_str(&format!("{}", Escape(&test))); }); s.push_str(&highlight::highlight(&text, diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs index 09b4915222b39..f3d7ae19f4d3c 100644 --- a/src/librustdoc/markdown.rs +++ b/src/librustdoc/markdown.rs @@ -143,7 +143,7 @@ pub fn test(input: &str, libs: SearchPaths, externs: core::Externs, mut test_args: Vec) -> int { let input_str = load_or_return!(input, 1, 2); - let mut collector = Collector::new(input.to_string(), libs, externs, true); + let mut collector = Collector::new(input.to_string(), libs, externs, true, false); find_testable_code(&input_str, &mut collector); test_args.insert(0, "rustdoctest".to_string()); testing::test_main(&test_args, collector.tests); diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 3bd466caf0b7f..1b596e65a784f 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -76,6 +76,8 @@ pub fn run(input: &str, "rustdoc-test", None) .expect("phase_2_configure_and_expand aborted in rustdoc!"); + let inject_crate = should_inject_crate(&krate); + let ctx = core::DocContext { krate: &krate, maybe_typed: core::NotTyped(sess), @@ -100,7 +102,8 @@ pub fn run(input: &str, let mut collector = Collector::new(krate.name.to_string(), libs, externs, - false); + false, + inject_crate); collector.fold_crate(krate); test_args.insert(0, "rustdoctest".to_string()); @@ -110,13 +113,42 @@ pub fn run(input: &str, 0 } +// Look for #![doc(test(no_crate_inject))], used by crates in the std facade +fn should_inject_crate(krate: &::syntax::ast::Crate) -> bool { + use syntax::attr::AttrMetaMethods; + + let mut inject_crate = true; + + for attr in &krate.attrs { + if attr.check_name("doc") { + for list in attr.meta_item_list().into_iter() { + for attr in list { + if attr.check_name("test") { + for list in attr.meta_item_list().into_iter() { + for attr in list { + if attr.check_name("no_crate_inject") { + inject_crate = false; + } + } + } + } + } + } + } + } + + return inject_crate; +} + #[allow(deprecated)] fn runtest(test: &str, cratename: &str, libs: SearchPaths, externs: core::Externs, - should_panic: bool, no_run: bool, as_test_harness: bool) { + should_panic: bool, no_run: bool, as_test_harness: bool, + inject_crate: bool) { // the test harness wants its own `main` & top level functions, so // never wrap the test in `fn main() { ... }` - let test = maketest(test, Some(cratename), true, as_test_harness); + let test = maketest(test, Some(cratename), true, as_test_harness, + inject_crate); let input = config::Input::Str(test.to_string()); let sessopts = config::Options { @@ -218,7 +250,8 @@ fn runtest(test: &str, cratename: &str, libs: SearchPaths, } } -pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, dont_insert_main: bool) -> String { +pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, + dont_insert_main: bool, inject_crate: bool) -> String { let (crate_attrs, everything_else) = partition_source(s); let mut prog = String::new(); @@ -235,7 +268,7 @@ pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, dont_insert_main: // Don't inject `extern crate std` because it's already injected by the // compiler. - if !s.contains("extern crate") && cratename != Some("std") { + if !s.contains("extern crate") && cratename != Some("std") && inject_crate { match cratename { Some(cratename) => { if s.contains(cratename) { @@ -267,7 +300,7 @@ fn partition_source(s: &str) -> (String, String) { let mut after = String::new(); for line in s.lines() { - let trimline = StrExt::trim(line); + let trimline = line.trim(); let header = trimline.is_whitespace() || trimline.starts_with("#![feature"); if !header || after_header { @@ -292,11 +325,12 @@ pub struct Collector { use_headers: bool, current_header: Option, cratename: String, + inject_crate: bool } impl Collector { pub fn new(cratename: String, libs: SearchPaths, externs: core::Externs, - use_headers: bool) -> Collector { + use_headers: bool, inject_crate: bool) -> Collector { Collector { tests: Vec::new(), names: Vec::new(), @@ -306,11 +340,13 @@ impl Collector { use_headers: use_headers, current_header: None, cratename: cratename, + inject_crate: inject_crate } } pub fn add_test(&mut self, test: String, - should_panic: bool, no_run: bool, should_ignore: bool, as_test_harness: bool) { + should_panic: bool, no_run: bool, should_ignore: bool, + as_test_harness: bool) { let name = if self.use_headers { let s = self.current_header.as_ref().map(|s| &**s).unwrap_or(""); format!("{}_{}", s, self.cnt) @@ -321,6 +357,7 @@ impl Collector { let libs = self.libs.clone(); let externs = self.externs.clone(); let cratename = self.cratename.to_string(); + let inject_crate = self.inject_crate; debug!("Creating test {}: {}", name, test); self.tests.push(testing::TestDescAndFn { desc: testing::TestDesc { @@ -335,7 +372,8 @@ impl Collector { externs, should_panic, no_run, - as_test_harness); + as_test_harness, + inject_crate); })) }); } From df290f127e923e0aacfe8223dd77f0fa222f0bc8 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 5 Mar 2015 18:33:58 -0800 Subject: [PATCH 56/69] Require feature attributes, and add them where necessary --- src/compiletest/compiletest.rs | 1 + src/libcollections/lib.rs | 2 +- src/libcollectionstest/lib.rs | 1 + src/libcoretest/lib.rs | 2 + src/libflate/lib.rs | 1 + src/librand/lib.rs | 2 +- src/librustc/lint/context.rs | 2 +- src/librustc/middle/stability.rs | 4 +- src/librustc_back/lib.rs | 1 + src/librustc_bitflags/lib.rs | 1 + src/libserialize/lib.rs | 2 +- src/libstd/lib.rs | 2 +- src/libtest/lib.rs | 1 + src/libunicode/char.rs | 4 + .../anon-extern-mod-cross-crate-1.rs | 1 + .../check_static_recursion_foreign_helper.rs | 2 + .../auxiliary/extern-crosscrate-source.rs | 1 + src/test/auxiliary/foreign_lib.rs | 1 + src/test/auxiliary/issue-3012-1.rs | 1 + src/test/auxiliary/issue13507.rs | 2 + .../issue_16723_multiple_items_syntax_ext.rs | 2 +- src/test/auxiliary/issue_3907.rs | 2 + src/test/auxiliary/issue_5844_aux.rs | 2 + src/test/auxiliary/linkage-visibility.rs | 2 + src/test/auxiliary/lint_for_crate.rs | 2 +- src/test/auxiliary/lint_group_plugin_test.rs | 2 +- src/test/auxiliary/lint_plugin_test.rs | 2 +- src/test/auxiliary/logging_right_crate.rs | 2 + .../auxiliary/macro_crate_MacroRulesTT.rs | 2 +- src/test/auxiliary/macro_crate_test.rs | 2 +- src/test/auxiliary/plugin_args.rs | 2 +- .../plugin_crate_outlive_expansion_phase.rs | 2 +- src/test/auxiliary/plugin_with_plugin_lib.rs | 2 +- src/test/auxiliary/private_trait_xc.rs | 2 + src/test/auxiliary/procedural_mbe_matching.rs | 2 +- src/test/auxiliary/rlib_crate_test.rs | 2 +- src/test/auxiliary/roman_numerals.rs | 2 +- src/test/auxiliary/svh-a-base.rs | 1 + src/test/auxiliary/svh-a-change-lit.rs | 1 + .../auxiliary/svh-a-change-significant-cfg.rs | 1 + .../auxiliary/svh-a-change-trait-bound.rs | 1 + src/test/auxiliary/svh-a-change-type-arg.rs | 1 + src/test/auxiliary/svh-a-change-type-ret.rs | 1 + .../auxiliary/svh-a-change-type-static.rs | 1 + src/test/auxiliary/svh-a-comment.rs | 1 + src/test/auxiliary/svh-a-doc.rs | 1 + src/test/auxiliary/svh-a-macro.rs | 1 + src/test/auxiliary/svh-a-no-change.rs | 1 + src/test/auxiliary/svh-a-redundant-cfg.rs | 1 + src/test/auxiliary/svh-a-whitespace.rs | 1 + .../syntax_extension_with_dll_deps_2.rs | 2 +- src/test/auxiliary/trait_impl_conflict.rs | 2 + ...lt-trait-impl-cross-crate-coherence-lib.rs | 2 +- src/test/auxiliary/typeid-intrinsic.rs | 2 + src/test/auxiliary/typeid-intrinsic2.rs | 2 + src/test/auxiliary/weak-lang-items.rs | 2 +- src/test/bench/core-map.rs | 2 +- src/test/bench/core-set.rs | 2 +- src/test/bench/core-std.rs | 2 +- src/test/bench/msgsend-pipes-shared.rs | 2 + src/test/bench/msgsend-pipes.rs | 2 + src/test/bench/msgsend-ring-mutex-arcs.rs | 2 + src/test/bench/noise.rs | 2 + src/test/bench/shootout-binarytrees.rs | 2 + src/test/bench/shootout-fannkuch-redux.rs | 2 + src/test/bench/shootout-fasta-redux.rs | 2 + src/test/bench/shootout-fasta.rs | 2 + src/test/bench/shootout-k-nucleotide-pipes.rs | 2 +- src/test/bench/shootout-k-nucleotide.rs | 2 +- src/test/bench/shootout-mandelbrot.rs | 2 +- src/test/bench/shootout-meteor.rs | 2 + src/test/bench/shootout-nbody.rs | 2 + src/test/bench/shootout-pfib.rs | 2 + src/test/bench/shootout-reverse-complement.rs | 2 +- src/test/bench/shootout-spectralnorm.rs | 2 +- src/test/bench/std-smallintmap.rs | 2 + src/test/bench/sudoku.rs | 2 +- src/test/bench/task-perf-alloc-unwind.rs | 2 +- .../compile-fail/internal-unstable-noallow.rs | 3 - .../internal-unstable-thread-local.rs | 6 +- src/test/compile-fail/internal-unstable.rs | 15 +- src/test/compile-fail/lint-output-format.rs | 4 +- .../compile-fail/lint-stability-fields.rs | 84 +++++----- src/test/compile-fail/lint-stability.rs | 144 +++++++++--------- src/test/debuginfo/constant-debug-locs.rs | 1 + .../debuginfo/function-arg-initialization.rs | 2 + ...nction-prologue-stepping-no-stack-check.rs | 2 + src/test/debuginfo/issue13213.rs | 3 + src/test/debuginfo/simd.rs | 1 + src/test/run-fail/extern-panic.rs | 1 + src/test/run-fail/rt-set-exit-status-panic.rs | 2 + .../run-fail/rt-set-exit-status-panic2.rs | 2 + src/test/run-fail/rt-set-exit-status.rs | 2 + .../allow-warnings-cmdline-stability/foo.rs | 2 + .../create_and_compile.rs | 2 + src/test/run-make/extern-fn-reachable/main.rs | 2 + .../intrinsic-unreachable/exit-unreachable.rs | 2 +- src/test/run-make/issue-19371/foo.rs | 2 + src/test/run-make/link-path-order/main.rs | 2 + .../run-make/lto-syntax-extension/main.rs | 2 + src/test/run-make/no-duplicate-libs/bar.rs | 2 +- src/test/run-make/no-duplicate-libs/foo.rs | 2 +- src/test/run-make/rustdoc-default-impl/foo.rs | 2 + src/test/run-make/save-analysis/foo.rs | 2 +- .../run-make/unicode-input/multiple_files.rs | 2 + .../run-make/unicode-input/span_length.rs | 2 + src/test/run-make/volatile-intrinsics/main.rs | 2 + src/test/run-pass-fulldeps/compiler-calls.rs | 2 +- src/test/run-pass-fulldeps/issue-16992.rs | 2 +- .../issue-18763-quote-token-tree.rs | 2 +- src/test/run-pass-fulldeps/quote-tokens.rs | 2 +- .../quote-unused-sp-no-warning.rs | 2 +- .../syntax-extension-with-dll-deps.rs | 2 +- src/test/run-pass-valgrind/cleanup-stdin.rs | 2 + src/test/run-pass/anon-extern-mod.rs | 2 + src/test/run-pass/associated-types-basic.rs | 2 + .../run-pass/associated-types-issue-20371.rs | 2 + .../associated-types-nested-projections.rs | 2 + ...iated-types-normalize-in-bounds-binding.rs | 1 + ...om-type-param-via-bound-in-where-clause.rs | 2 + src/test/run-pass/attr-before-view-item.rs | 2 +- src/test/run-pass/attr-before-view-item2.rs | 2 +- src/test/run-pass/backtrace.rs | 2 +- src/test/run-pass/bitv-perf-test.rs | 2 +- src/test/run-pass/c-stack-as-value.rs | 2 + src/test/run-pass/c-stack-returning-int64.rs | 2 + src/test/run-pass/capturing-logging.rs | 2 +- .../check-static-recursion-foreign.rs | 2 +- src/test/run-pass/child-outlives-parent.rs | 2 + src/test/run-pass/cleanup-arm-conditional.rs | 2 +- src/test/run-pass/clone-with-exterior.rs | 2 +- src/test/run-pass/closure-reform.rs | 2 +- src/test/run-pass/comm.rs | 2 + .../run-pass/conditional-debug-macro-off.rs | 2 + src/test/run-pass/const-cast.rs | 2 + src/test/run-pass/core-run-destroy.rs | 1 + src/test/run-pass/derive-no-std.rs | 2 +- .../deriving-encodable-decodable-box.rs | 2 +- ...riving-encodable-decodable-cell-refcell.rs | 2 +- src/test/run-pass/deriving-global.rs | 2 +- src/test/run-pass/deriving-hash.rs | 2 + src/test/run-pass/deriving-primitive.rs | 2 + src/test/run-pass/deriving-rand.rs | 2 + .../run-pass/drop-with-type-ascription-1.rs | 2 + .../run-pass/drop-with-type-ascription-2.rs | 2 + src/test/run-pass/dropck_tarena_sound_drop.rs | 2 +- src/test/run-pass/dst-index.rs | 2 + src/test/run-pass/enum-null-pointer-opt.rs | 1 + src/test/run-pass/env-home-dir.rs | 2 + src/test/run-pass/exponential-notation.rs | 2 + src/test/run-pass/extern-call-deep.rs | 2 + src/test/run-pass/extern-call-deep2.rs | 2 + src/test/run-pass/extern-call-indirect.rs | 2 + src/test/run-pass/extern-call-scrub.rs | 2 + src/test/run-pass/extern-crosscrate.rs | 2 + src/test/run-pass/extern-methods.rs | 2 + src/test/run-pass/extern-mod-syntax.rs | 1 + src/test/run-pass/float-nan.rs | 2 + src/test/run-pass/for-loop-no-std.rs | 2 +- ...xternal-iterators-hashmap-break-restart.rs | 2 + .../foreach-external-iterators-hashmap.rs | 2 + src/test/run-pass/foreign-call-no-runtime.rs | 1 + src/test/run-pass/foreign-dupe.rs | 2 + src/test/run-pass/foreign-fn-linkname.rs | 2 + src/test/run-pass/foreign-mod-unused-const.rs | 2 + src/test/run-pass/foreign-no-abi.rs | 2 + src/test/run-pass/foreign2.rs | 2 + src/test/run-pass/format-no-std.rs | 2 +- src/test/run-pass/fsu-moves-and-copies.rs | 2 +- src/test/run-pass/generic-extern-mangle.rs | 2 + src/test/run-pass/getopts_ref.rs | 2 + src/test/run-pass/hashmap-memory.rs | 2 +- src/test/run-pass/init-large-type.rs | 2 +- .../into-iterator-type-inference-shift.rs | 2 + src/test/run-pass/intrinsic-assume.rs | 2 + src/test/run-pass/intrinsic-unreachable.rs | 2 + src/test/run-pass/intrinsics-math.rs | 2 +- src/test/run-pass/issue-10626.rs | 2 + src/test/run-pass/issue-11709.rs | 2 + src/test/run-pass/issue-11736.rs | 2 + src/test/run-pass/issue-11881.rs | 2 +- src/test/run-pass/issue-11958.rs | 1 + src/test/run-pass/issue-1251.rs | 2 + src/test/run-pass/issue-12684.rs | 2 + src/test/run-pass/issue-12699.rs | 2 + src/test/run-pass/issue-12860.rs | 1 + src/test/run-pass/issue-13105.rs | 2 + .../run-pass/issue-13259-windows-tcb-trash.rs | 2 + src/test/run-pass/issue-13304.rs | 1 + src/test/run-pass/issue-13352.rs | 2 + src/test/run-pass/issue-13494.rs | 2 + src/test/run-pass/issue-13507-2.rs | 3 + src/test/run-pass/issue-13655.rs | 2 +- src/test/run-pass/issue-13763.rs | 2 + src/test/run-pass/issue-14021.rs | 2 +- src/test/run-pass/issue-14456.rs | 2 + src/test/run-pass/issue-14901.rs | 2 + src/test/run-pass/issue-14940.rs | 2 + src/test/run-pass/issue-14958.rs | 2 +- src/test/run-pass/issue-14959.rs | 2 +- src/test/run-pass/issue-15673.rs | 2 + src/test/run-pass/issue-15734.rs | 2 +- src/test/run-pass/issue-15924.rs | 2 +- src/test/run-pass/issue-16530.rs | 2 + src/test/run-pass/issue-16739.rs | 2 +- src/test/run-pass/issue-1696.rs | 2 + src/test/run-pass/issue-17322.rs | 2 +- src/test/run-pass/issue-17351.rs | 2 + .../issue-17718-static-unsafe-interior.rs | 2 + src/test/run-pass/issue-17718.rs | 2 + src/test/run-pass/issue-17897.rs | 2 +- src/test/run-pass/issue-18188.rs | 2 +- src/test/run-pass/issue-18619.rs | 2 + src/test/run-pass/issue-18661.rs | 2 +- src/test/run-pass/issue-19098.rs | 2 +- .../run-pass/issue-19811-escape-unicode.rs | 2 + src/test/run-pass/issue-20091.rs | 1 + src/test/run-pass/issue-20454.rs | 2 + src/test/run-pass/issue-20644.rs | 2 + src/test/run-pass/issue-20797.rs | 2 + src/test/run-pass/issue-21058.rs | 1 + src/test/run-pass/issue-2190-1.rs | 2 + src/test/run-pass/issue-2214.rs | 2 + src/test/run-pass/issue-22577.rs | 2 + src/test/run-pass/issue-2383.rs | 2 + src/test/run-pass/issue-2718.rs | 2 +- src/test/run-pass/issue-2804-2.rs | 2 + src/test/run-pass/issue-2804.rs | 3 + src/test/run-pass/issue-2904.rs | 4 +- src/test/run-pass/issue-3012-2.rs | 2 +- src/test/run-pass/issue-3026.rs | 2 +- src/test/run-pass/issue-3424.rs | 2 +- src/test/run-pass/issue-3559.rs | 2 + src/test/run-pass/issue-3563-3.rs | 2 + src/test/run-pass/issue-3609.rs | 1 + src/test/run-pass/issue-3656.rs | 2 + src/test/run-pass/issue-3753.rs | 2 + src/test/run-pass/issue-4016.rs | 1 + src/test/run-pass/issue-4036.rs | 2 + src/test/run-pass/issue-4333.rs | 2 + src/test/run-pass/issue-4446.rs | 2 + src/test/run-pass/issue-4735.rs | 2 +- src/test/run-pass/issue-5791.rs | 2 + src/test/run-pass/issue-5988.rs | 2 + src/test/run-pass/issue-6128.rs | 2 +- src/test/run-pass/issue-6898.rs | 2 + src/test/run-pass/issue-7660.rs | 2 + src/test/run-pass/issue-8398.rs | 2 + src/test/run-pass/issue-8460.rs | 2 + src/test/run-pass/issue-8827.rs | 2 + src/test/run-pass/issue-9396.rs | 2 + src/test/run-pass/issue22346.rs | 2 + src/test/run-pass/istr.rs | 2 + src/test/run-pass/item-attributes.rs | 2 +- src/test/run-pass/ivec-tag.rs | 2 + .../kindck-implicit-close-over-mut-var.rs | 2 + src/test/run-pass/last-use-in-cap-clause.rs | 2 +- src/test/run-pass/linkage-visibility.rs | 2 + src/test/run-pass/logging-enabled-debug.rs | 2 + src/test/run-pass/logging-enabled.rs | 2 + src/test/run-pass/logging-separate-lines.rs | 2 + .../macro-with-braces-in-expr-position.rs | 2 + ...thod-mut-self-modifies-mut-slice-lvalue.rs | 2 + ...o-traits-distinguished-via-where-clause.rs | 2 + ...nomorphized-callees-with-ty-params-3314.rs | 2 + .../moves-based-on-type-capture-clause.rs | 2 + src/test/run-pass/new-box-syntax.rs | 2 +- src/test/run-pass/new-unicode-escapes.rs | 2 + src/test/run-pass/newtype-struct-with-dtor.rs | 2 + .../run-pass/numeric-method-autoexport.rs | 2 + src/test/run-pass/operator-overloading.rs | 2 + src/test/run-pass/option-ext.rs | 2 + src/test/run-pass/osx-frameworks.rs | 2 + .../out-of-stack-new-thread-no-split.rs | 2 +- src/test/run-pass/out-of-stack.rs | 2 +- src/test/run-pass/overloaded-autoderef.rs | 2 +- .../overloaded-calls-param-vtables.rs | 2 +- src/test/run-pass/overloaded-calls-simple.rs | 2 +- .../run-pass/overloaded-calls-zero-args.rs | 2 +- src/test/run-pass/overloaded-deref.rs | 2 + .../run-pass/overloaded-index-assoc-list.rs | 2 + .../run-pass/overloaded-index-autoderef.rs | 2 +- .../run-pass/overloaded-index-in-field.rs | 2 + src/test/run-pass/overloaded-index.rs | 2 + src/test/run-pass/placement-new-arena.rs | 2 + src/test/run-pass/process-remove-from-env.rs | 2 + .../process-spawn-with-unicode-params.rs | 1 + src/test/run-pass/realloc-16687.rs | 2 + src/test/run-pass/regions-copy-closure.rs | 2 +- src/test/run-pass/regions-mock-tcx.rs | 2 + src/test/run-pass/regions-mock-trans.rs | 2 + src/test/run-pass/regions-static-closure.rs | 2 +- src/test/run-pass/rename-directory.rs | 2 + src/test/run-pass/running-with-no-runtime.rs | 2 +- src/test/run-pass/rust-log-filter.rs | 2 +- src/test/run-pass/segfault-no-out-of-stack.rs | 2 + src/test/run-pass/send-resource.rs | 2 + src/test/run-pass/send_str_hashmap.rs | 2 + src/test/run-pass/send_str_treemap.rs | 2 + src/test/run-pass/signal-exit-status.rs | 3 + src/test/run-pass/simd-binop.rs | 1 + src/test/run-pass/simd-issue-10604.rs | 2 +- src/test/run-pass/slice.rs | 2 +- src/test/run-pass/smallest-hello-world.rs | 2 +- src/test/run-pass/spawn-fn.rs | 2 + src/test/run-pass/stat.rs | 2 + src/test/run-pass/static-mut-foreign.rs | 2 + .../run-pass/std-sync-right-kind-impls.rs | 2 + src/test/run-pass/supported-cast.rs | 2 + .../run-pass/syntax-extension-source-utils.rs | 8 +- src/test/run-pass/syntax-trait-polarity.rs | 2 +- src/test/run-pass/task-comm-0.rs | 2 + src/test/run-pass/task-comm-1.rs | 2 + src/test/run-pass/task-comm-10.rs | 2 + src/test/run-pass/task-comm-11.rs | 2 + src/test/run-pass/task-comm-12.rs | 2 + src/test/run-pass/task-comm-13.rs | 2 + src/test/run-pass/task-comm-14.rs | 2 + src/test/run-pass/task-comm-15.rs | 2 + src/test/run-pass/task-comm-17.rs | 2 + src/test/run-pass/task-comm-3.rs | 2 + src/test/run-pass/task-comm-7.rs | 1 + src/test/run-pass/task-comm-9.rs | 2 + src/test/run-pass/task-life-0.rs | 2 + src/test/run-pass/task-spawn-move-and-copy.rs | 2 +- src/test/run-pass/task-stderr.rs | 2 +- src/test/run-pass/tcp-accept-stress.rs | 2 + src/test/run-pass/tcp-connect-timeouts.rs | 1 + src/test/run-pass/tempfile.rs | 2 + ...e-verification-for-explicit-return-type.rs | 2 + src/test/run-pass/threads.rs | 2 + src/test/run-pass/trait-bounds-basic.rs | 1 + src/test/run-pass/trait-bounds-in-arc.rs | 2 +- .../trait-bounds-on-structs-and-enums.rs | 2 + src/test/run-pass/trait-bounds-recursion.rs | 2 + src/test/run-pass/trait-coercion.rs | 3 +- src/test/run-pass/trait-inheritance-num.rs | 2 + src/test/run-pass/trait-inheritance-num0.rs | 2 + src/test/run-pass/trait-inheritance-num1.rs | 2 + src/test/run-pass/trait-inheritance-num2.rs | 2 + src/test/run-pass/trait-inheritance-num3.rs | 2 + src/test/run-pass/trait-inheritance-num5.rs | 2 + .../run-pass/trait-inheritance-static2.rs | 2 + src/test/run-pass/tydesc-name.rs | 1 + src/test/run-pass/type-id-higher-rank.rs | 2 +- src/test/run-pass/typeid-intrinsic.rs | 2 + src/test/run-pass/ufcs-polymorphic-paths.rs | 2 +- .../run-pass/unboxed-closures-extern-fn-hr.rs | 2 +- ...unboxed-closures-fn-as-fnmut-and-fnonce.rs | 3 +- .../unboxed-closures-fnmut-as-fnonce.rs | 3 +- ...nfer-argument-types-from-expected-bound.rs | 2 +- ...rgument-types-from-expected-object-type.rs | 2 +- ...-with-bound-regions-from-expected-bound.rs | 2 +- .../run-pass/unboxed-closures-manual-impl.rs | 2 +- .../unboxed-closures-monomorphization.rs | 2 +- src/test/run-pass/unboxed-closures-prelude.rs | 2 +- src/test/run-pass/unfold-cross-crate.rs | 2 + .../run-pass/unit-like-struct-drop-run.rs | 2 + src/test/run-pass/unsized3.rs | 2 +- src/test/run-pass/utf8_chars.rs | 2 + src/test/run-pass/variadic-ffi.rs | 2 + ...ariance-intersection-of-ref-and-opt-ref.rs | 1 + src/test/run-pass/variance-vec-covariant.rs | 1 + src/test/run-pass/vec-concat.rs | 2 + src/test/run-pass/vec-macro-no-std.rs | 2 +- src/test/run-pass/vector-sort-panic-safe.rs | 2 + .../run-pass/wait-forked-but-failed-child.rs | 2 + src/test/run-pass/while-let.rs | 2 + src/test/run-pass/while-prelude-drop.rs | 2 + 369 files changed, 702 insertions(+), 253 deletions(-) diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 01c4e99b77c70..1aa5564d0a15f 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -20,6 +20,7 @@ #![feature(std_misc)] #![feature(test)] #![feature(path_ext)] +#![feature(str_char)] #![deny(warnings)] diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index c4a0149676333..cf9f6a39a5513 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -36,7 +36,7 @@ #![feature(unsafe_no_drop_flag)] #![feature(step_by)] #![feature(str_char)] -#![cfg_attr(test, feature(rand, rustc_private, test))] +#![cfg_attr(test, feature(rand, rustc_private, test, hash, collections))] #![cfg_attr(test, allow(deprecated))] // rand #![feature(no_std)] diff --git a/src/libcollectionstest/lib.rs b/src/libcollectionstest/lib.rs index 7f029340d2594..365ef637a4c40 100644 --- a/src/libcollectionstest/lib.rs +++ b/src/libcollectionstest/lib.rs @@ -20,6 +20,7 @@ #![feature(unboxed_closures)] #![feature(unicode)] #![feature(unsafe_destructor)] +#![cfg_attr(test, feature(str_char))] #[macro_use] extern crate log; diff --git a/src/libcoretest/lib.rs b/src/libcoretest/lib.rs index 536bce0d05f0b..33f9b63bc4907 100644 --- a/src/libcoretest/lib.rs +++ b/src/libcoretest/lib.rs @@ -24,6 +24,8 @@ #![feature(io)] #![feature(collections)] #![feature(debug_builders)] +#![feature(unique)] +#![feature(step_by)] #![allow(deprecated)] // rand extern crate core; diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs index 695c71c73eded..63d1fe968fe1b 100644 --- a/src/libflate/lib.rs +++ b/src/libflate/lib.rs @@ -28,6 +28,7 @@ #![feature(libc)] #![feature(staged_api)] #![feature(unique)] +#![cfg_attr(test, feature(rustc_private, rand, collections))] #[cfg(test)] #[macro_use] extern crate log; diff --git a/src/librand/lib.rs b/src/librand/lib.rs index 5e52a176c9e16..8de773e9fec04 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -34,7 +34,7 @@ #![deprecated(reason = "use the crates.io `rand` library instead", since = "1.0.0-alpha")] -#![cfg_attr(test, feature(test, rand))] +#![cfg_attr(test, feature(test, rand, rustc_private))] #![allow(deprecated)] diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index 9aa6395b7b278..9688447dc046a 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -212,7 +212,7 @@ impl LintStore { fn maybe_stage_features(&mut self, sess: &Session) { let lvl = match sess.opts.unstable_features { UnstableFeatures::Default => return, - UnstableFeatures::Disallow => Warn, + UnstableFeatures::Disallow => Forbid, UnstableFeatures::Cheat => Allow }; match self.by_name.get("unstable_features") { diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs index 01766b0de085f..96657b1d261b3 100644 --- a/src/librustc/middle/stability.rs +++ b/src/librustc/middle/stability.rs @@ -26,7 +26,7 @@ use syntax::ast::{Item, Generics, StructField}; use syntax::ast_util::is_local; use syntax::attr::{Stability, AttrMetaMethods}; use syntax::visit::{FnKind, Visitor}; -use syntax::feature_gate::emit_feature_warn; +use syntax::feature_gate::emit_feature_err; use util::nodemap::{NodeMap, DefIdMap, FnvHashSet, FnvHashMap}; use util::ppaux::Repr; @@ -237,7 +237,7 @@ impl<'a, 'tcx> Checker<'a, 'tcx> { None => format!("use of unstable library feature '{}'", &feature) }; - emit_feature_warn(&self.tcx.sess.parse_sess.span_diagnostic, + emit_feature_err(&self.tcx.sess.parse_sess.span_diagnostic, &feature, span, &msg); } } diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index 99d24a6013078..acc17edaf2c9d 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -49,6 +49,7 @@ #![feature(std_misc)] #![feature(path_relative_from)] #![feature(step_by)] +#![cfg_attr(test, feature(test, rand))] extern crate syntax; extern crate serialize; diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs index 2992ddbc4f453..054bfec7a2063 100644 --- a/src/librustc_bitflags/lib.rs +++ b/src/librustc_bitflags/lib.rs @@ -18,6 +18,7 @@ #![feature(no_std)] #![no_std] #![unstable(feature = "rustc_private")] +#![cfg_attr(test, feature(hash))] //! A typesafe bitmask flag generator. diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index 90cb88046e53d..ee257dd0ac991 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -37,7 +37,7 @@ Core encoding and decoding interfaces. #![feature(std_misc)] #![feature(unicode)] #![feature(str_char)] -#![cfg_attr(test, feature(test))] +#![cfg_attr(test, feature(test, old_io))] // test harness access #[cfg(test)] extern crate test; diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b055796ba547f..1aa2189d315d2 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -128,7 +128,7 @@ #![feature(unique)] #![feature(allow_internal_unstable)] #![feature(str_char)] -#![cfg_attr(test, feature(test, rustc_private))] +#![cfg_attr(test, feature(test, rustc_private, std_misc))] // Don't link to std. We are std. #![feature(no_std)] diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 51decbab8587d..34f1b68fa9b31 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -45,6 +45,7 @@ #![feature(libc)] #![feature(set_stdio)] #![feature(os)] +#![cfg_attr(test, feature(old_io))] extern crate getopts; extern crate serialize; diff --git a/src/libunicode/char.rs b/src/libunicode/char.rs index 5e1070c6dc503..e0f013cbc8051 100644 --- a/src/libunicode/char.rs +++ b/src/libunicode/char.rs @@ -653,6 +653,7 @@ impl char { /// In both of these examples, 'ß' takes two bytes to encode. /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 2]; /// /// let result = 'ß'.encode_utf8(&mut b); @@ -663,6 +664,7 @@ impl char { /// A buffer that's too small: /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 1]; /// /// let result = 'ß'.encode_utf8(&mut b); @@ -685,6 +687,7 @@ impl char { /// In both of these examples, 'ß' takes one `u16` to encode. /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 1]; /// /// let result = 'ß'.encode_utf16(&mut b); @@ -695,6 +698,7 @@ impl char { /// A buffer that's too small: /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 0]; /// /// let result = 'ß'.encode_utf8(&mut b); diff --git a/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs b/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs index 12ab62267a363..197fb9a6d018c 100644 --- a/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs +++ b/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs @@ -9,6 +9,7 @@ // except according to those terms. #![crate_name="anonexternmod"] +#![feature(libc)] extern crate libc; diff --git a/src/test/auxiliary/check_static_recursion_foreign_helper.rs b/src/test/auxiliary/check_static_recursion_foreign_helper.rs index b5c2a4f135fe2..c0d81cd8e1bad 100644 --- a/src/test/auxiliary/check_static_recursion_foreign_helper.rs +++ b/src/test/auxiliary/check_static_recursion_foreign_helper.rs @@ -10,6 +10,8 @@ // Helper definition for test/run-pass/check-static-recursion-foreign.rs. +#![feature(libc)] + #[crate_id = "check_static_recursion_foreign_helper"] #[crate_type = "lib"] diff --git a/src/test/auxiliary/extern-crosscrate-source.rs b/src/test/auxiliary/extern-crosscrate-source.rs index 0e3b531e4581c..fc2e328f68657 100644 --- a/src/test/auxiliary/extern-crosscrate-source.rs +++ b/src/test/auxiliary/extern-crosscrate-source.rs @@ -10,6 +10,7 @@ #![crate_name="externcallback"] #![crate_type = "lib"] +#![feature(libc)] extern crate libc; diff --git a/src/test/auxiliary/foreign_lib.rs b/src/test/auxiliary/foreign_lib.rs index a5d672e3c0cf9..92239ce55981c 100644 --- a/src/test/auxiliary/foreign_lib.rs +++ b/src/test/auxiliary/foreign_lib.rs @@ -9,6 +9,7 @@ // except according to those terms. #![crate_name="foreign_lib"] +#![feature(libc)] pub mod rustrt { extern crate libc; diff --git a/src/test/auxiliary/issue-3012-1.rs b/src/test/auxiliary/issue-3012-1.rs index 25eb67e042300..b6199f59ebe06 100644 --- a/src/test/auxiliary/issue-3012-1.rs +++ b/src/test/auxiliary/issue-3012-1.rs @@ -10,6 +10,7 @@ #![crate_name="socketlib"] #![crate_type = "lib"] +#![feature(libc)] pub mod socket { extern crate libc; diff --git a/src/test/auxiliary/issue13507.rs b/src/test/auxiliary/issue13507.rs index f24721adb5d96..4a8839abc7cb2 100644 --- a/src/test/auxiliary/issue13507.rs +++ b/src/test/auxiliary/issue13507.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + pub mod testtypes { use std::any::TypeId; diff --git a/src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs b/src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs index f5a9063e1def5..58dee1216ee60 100644 --- a/src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs +++ b/src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs @@ -11,7 +11,7 @@ // ignore-stage1 // force-host -#![feature(plugin_registrar, quote)] +#![feature(plugin_registrar, quote, rustc_private)] #![crate_type = "dylib"] extern crate syntax; diff --git a/src/test/auxiliary/issue_3907.rs b/src/test/auxiliary/issue_3907.rs index c118f7e4854fa..3d5e52d709df3 100644 --- a/src/test/auxiliary/issue_3907.rs +++ b/src/test/auxiliary/issue_3907.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::marker::MarkerTrait; pub trait Foo : MarkerTrait { diff --git a/src/test/auxiliary/issue_5844_aux.rs b/src/test/auxiliary/issue_5844_aux.rs index e12af579c571d..5c878b1e667d9 100644 --- a/src/test/auxiliary/issue_5844_aux.rs +++ b/src/test/auxiliary/issue_5844_aux.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; extern "C" { diff --git a/src/test/auxiliary/linkage-visibility.rs b/src/test/auxiliary/linkage-visibility.rs index 03fe2fd94dd52..fd3e9b9ac9dce 100644 --- a/src/test/auxiliary/linkage-visibility.rs +++ b/src/test/auxiliary/linkage-visibility.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc, old_path)] + use std::dynamic_lib::DynamicLibrary; #[no_mangle] diff --git a/src/test/auxiliary/lint_for_crate.rs b/src/test/auxiliary/lint_for_crate.rs index 1be37ce1780b3..3b45b0ae70106 100644 --- a/src/test/auxiliary/lint_for_crate.rs +++ b/src/test/auxiliary/lint_for_crate.rs @@ -10,7 +10,7 @@ // force-host -#![feature(plugin_registrar)] +#![feature(plugin_registrar, rustc_private)] #![feature(box_syntax)] extern crate syntax; diff --git a/src/test/auxiliary/lint_group_plugin_test.rs b/src/test/auxiliary/lint_group_plugin_test.rs index e9d98889ff854..ca5a7b75e06cf 100644 --- a/src/test/auxiliary/lint_group_plugin_test.rs +++ b/src/test/auxiliary/lint_group_plugin_test.rs @@ -11,7 +11,7 @@ // force-host #![feature(plugin_registrar)] -#![feature(box_syntax)] +#![feature(box_syntax, rustc_private)] extern crate syntax; diff --git a/src/test/auxiliary/lint_plugin_test.rs b/src/test/auxiliary/lint_plugin_test.rs index ffb234f70c8e7..20799ce5b467f 100644 --- a/src/test/auxiliary/lint_plugin_test.rs +++ b/src/test/auxiliary/lint_plugin_test.rs @@ -11,7 +11,7 @@ // force-host #![feature(plugin_registrar)] -#![feature(box_syntax)] +#![feature(box_syntax, rustc_private)] extern crate syntax; diff --git a/src/test/auxiliary/logging_right_crate.rs b/src/test/auxiliary/logging_right_crate.rs index bf4ab975cedd8..974db7c924638 100644 --- a/src/test/auxiliary/logging_right_crate.rs +++ b/src/test/auxiliary/logging_right_crate.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rustc_private)] + #[macro_use] extern crate log; pub fn foo() { diff --git a/src/test/auxiliary/macro_crate_MacroRulesTT.rs b/src/test/auxiliary/macro_crate_MacroRulesTT.rs index d50c27a4e75bb..03cd70d949428 100644 --- a/src/test/auxiliary/macro_crate_MacroRulesTT.rs +++ b/src/test/auxiliary/macro_crate_MacroRulesTT.rs @@ -10,7 +10,7 @@ // force-host -#![feature(plugin_registrar)] +#![feature(plugin_registrar, rustc_private)] extern crate syntax; extern crate rustc; diff --git a/src/test/auxiliary/macro_crate_test.rs b/src/test/auxiliary/macro_crate_test.rs index 36a34bc6c8b41..5b7e52e9164e9 100644 --- a/src/test/auxiliary/macro_crate_test.rs +++ b/src/test/auxiliary/macro_crate_test.rs @@ -11,7 +11,7 @@ // force-host #![feature(plugin_registrar, quote)] -#![feature(box_syntax)] +#![feature(box_syntax, rustc_private)] extern crate syntax; extern crate rustc; diff --git a/src/test/auxiliary/plugin_args.rs b/src/test/auxiliary/plugin_args.rs index 30b18a3618ffa..5a615502a95e3 100644 --- a/src/test/auxiliary/plugin_args.rs +++ b/src/test/auxiliary/plugin_args.rs @@ -11,7 +11,7 @@ // force-host #![feature(plugin_registrar)] -#![feature(box_syntax)] +#![feature(box_syntax, rustc_private)] extern crate syntax; extern crate rustc; diff --git a/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs b/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs index 420151c471ea6..6f5f50475483d 100644 --- a/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs +++ b/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs @@ -11,7 +11,7 @@ // force-host #![feature(plugin_registrar)] -#![feature(box_syntax)] +#![feature(box_syntax, rustc_private)] extern crate rustc; diff --git a/src/test/auxiliary/plugin_with_plugin_lib.rs b/src/test/auxiliary/plugin_with_plugin_lib.rs index cfc8c015324d9..75f404c96cd0e 100644 --- a/src/test/auxiliary/plugin_with_plugin_lib.rs +++ b/src/test/auxiliary/plugin_with_plugin_lib.rs @@ -10,7 +10,7 @@ // force-host -#![feature(plugin_registrar)] +#![feature(plugin_registrar, rustc_private)] #![deny(plugin_as_library)] // should have no effect in a plugin crate extern crate macro_crate_test; diff --git a/src/test/auxiliary/private_trait_xc.rs b/src/test/auxiliary/private_trait_xc.rs index 42691579491bb..dc08033602c99 100644 --- a/src/test/auxiliary/private_trait_xc.rs +++ b/src/test/auxiliary/private_trait_xc.rs @@ -8,4 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + trait Foo : ::std::marker::MarkerTrait {} diff --git a/src/test/auxiliary/procedural_mbe_matching.rs b/src/test/auxiliary/procedural_mbe_matching.rs index d9a2b06e0393f..1adc794551ece 100644 --- a/src/test/auxiliary/procedural_mbe_matching.rs +++ b/src/test/auxiliary/procedural_mbe_matching.rs @@ -11,7 +11,7 @@ // force-host #![crate_type="dylib"] -#![feature(plugin_registrar, quote)] +#![feature(plugin_registrar, quote, rustc_private)] extern crate syntax; extern crate rustc; diff --git a/src/test/auxiliary/rlib_crate_test.rs b/src/test/auxiliary/rlib_crate_test.rs index be03a36393e24..86ce3df9ba6ef 100644 --- a/src/test/auxiliary/rlib_crate_test.rs +++ b/src/test/auxiliary/rlib_crate_test.rs @@ -11,7 +11,7 @@ // no-prefer-dynamic #![crate_type = "rlib"] -#![feature(plugin_registrar)] +#![feature(plugin_registrar, rustc_private)] extern crate rustc; diff --git a/src/test/auxiliary/roman_numerals.rs b/src/test/auxiliary/roman_numerals.rs index 0ea7c0005707d..a105cb7ae6cfb 100644 --- a/src/test/auxiliary/roman_numerals.rs +++ b/src/test/auxiliary/roman_numerals.rs @@ -11,7 +11,7 @@ // force-host #![crate_type="dylib"] -#![feature(plugin_registrar)] +#![feature(plugin_registrar, rustc_private)] extern crate syntax; extern crate rustc; diff --git a/src/test/auxiliary/svh-a-base.rs b/src/test/auxiliary/svh-a-base.rs index 04f1062c16f02..6d4ea499b2bde 100644 --- a/src/test/auxiliary/svh-a-base.rs +++ b/src/test/auxiliary/svh-a-base.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-change-lit.rs b/src/test/auxiliary/svh-a-change-lit.rs index fabd2289e9a44..61e4aaf32586e 100644 --- a/src/test/auxiliary/svh-a-change-lit.rs +++ b/src/test/auxiliary/svh-a-change-lit.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-change-significant-cfg.rs b/src/test/auxiliary/svh-a-change-significant-cfg.rs index 3fdb861bd40c1..cfdb0902b5d36 100644 --- a/src/test/auxiliary/svh-a-change-significant-cfg.rs +++ b/src/test/auxiliary/svh-a-change-significant-cfg.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-change-trait-bound.rs b/src/test/auxiliary/svh-a-change-trait-bound.rs index 3116d24673d48..e79738c041035 100644 --- a/src/test/auxiliary/svh-a-change-trait-bound.rs +++ b/src/test/auxiliary/svh-a-change-trait-bound.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-change-type-arg.rs b/src/test/auxiliary/svh-a-change-type-arg.rs index b49a1533628f6..b22d553c02b5a 100644 --- a/src/test/auxiliary/svh-a-change-type-arg.rs +++ b/src/test/auxiliary/svh-a-change-type-arg.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-change-type-ret.rs b/src/test/auxiliary/svh-a-change-type-ret.rs index 6562a93135f39..78dbdc28b9f31 100644 --- a/src/test/auxiliary/svh-a-change-type-ret.rs +++ b/src/test/auxiliary/svh-a-change-type-ret.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-change-type-static.rs b/src/test/auxiliary/svh-a-change-type-static.rs index c7b392c6ee82b..3059282703974 100644 --- a/src/test/auxiliary/svh-a-change-type-static.rs +++ b/src/test/auxiliary/svh-a-change-type-static.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-comment.rs b/src/test/auxiliary/svh-a-comment.rs index 450f61020260d..4c457b099a4b1 100644 --- a/src/test/auxiliary/svh-a-comment.rs +++ b/src/test/auxiliary/svh-a-comment.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-doc.rs b/src/test/auxiliary/svh-a-doc.rs index c000737c854c6..cab25ac9e4f4f 100644 --- a/src/test/auxiliary/svh-a-doc.rs +++ b/src/test/auxiliary/svh-a-doc.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-macro.rs b/src/test/auxiliary/svh-a-macro.rs index 1e12659dc4b92..01926dc8abc43 100644 --- a/src/test/auxiliary/svh-a-macro.rs +++ b/src/test/auxiliary/svh-a-macro.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-no-change.rs b/src/test/auxiliary/svh-a-no-change.rs index 04f1062c16f02..6d4ea499b2bde 100644 --- a/src/test/auxiliary/svh-a-no-change.rs +++ b/src/test/auxiliary/svh-a-no-change.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-redundant-cfg.rs b/src/test/auxiliary/svh-a-redundant-cfg.rs index 1e82b74f1ef2e..f3a31df94b3e4 100644 --- a/src/test/auxiliary/svh-a-redundant-cfg.rs +++ b/src/test/auxiliary/svh-a-redundant-cfg.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/svh-a-whitespace.rs b/src/test/auxiliary/svh-a-whitespace.rs index 3c3dac9cdab96..bec6b207c071e 100644 --- a/src/test/auxiliary/svh-a-whitespace.rs +++ b/src/test/auxiliary/svh-a-whitespace.rs @@ -14,6 +14,7 @@ //! (#14132). #![crate_name = "a"] +#![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs b/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs index 07f3b863af8a1..54da1a1e451c8 100644 --- a/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs +++ b/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs @@ -11,7 +11,7 @@ // force-host #![crate_type = "dylib"] -#![feature(plugin_registrar, quote)] +#![feature(plugin_registrar, quote, rustc_private)] extern crate "syntax_extension_with_dll_deps_1" as other; extern crate syntax; diff --git a/src/test/auxiliary/trait_impl_conflict.rs b/src/test/auxiliary/trait_impl_conflict.rs index 0982efbdbf47e..4a4de2455e36e 100644 --- a/src/test/auxiliary/trait_impl_conflict.rs +++ b/src/test/auxiliary/trait_impl_conflict.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + pub trait Foo : ::std::marker::MarkerTrait { } diff --git a/src/test/auxiliary/typeck-default-trait-impl-cross-crate-coherence-lib.rs b/src/test/auxiliary/typeck-default-trait-impl-cross-crate-coherence-lib.rs index 506e7a00c75bc..5a7a3e7bcc694 100644 --- a/src/test/auxiliary/typeck-default-trait-impl-cross-crate-coherence-lib.rs +++ b/src/test/auxiliary/typeck-default-trait-impl-cross-crate-coherence-lib.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(optin_builtin_traits)] +#![feature(optin_builtin_traits, core)] #![crate_type = "rlib"] use std::marker::MarkerTrait; diff --git a/src/test/auxiliary/typeid-intrinsic.rs b/src/test/auxiliary/typeid-intrinsic.rs index 82f613ee117ca..82d07a9df4e12 100644 --- a/src/test/auxiliary/typeid-intrinsic.rs +++ b/src/test/auxiliary/typeid-intrinsic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::any::TypeId; pub struct A; diff --git a/src/test/auxiliary/typeid-intrinsic2.rs b/src/test/auxiliary/typeid-intrinsic2.rs index 82f613ee117ca..82d07a9df4e12 100644 --- a/src/test/auxiliary/typeid-intrinsic2.rs +++ b/src/test/auxiliary/typeid-intrinsic2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::any::TypeId; pub struct A; diff --git a/src/test/auxiliary/weak-lang-items.rs b/src/test/auxiliary/weak-lang-items.rs index 85f49b4bb7fad..ceffae79677f4 100644 --- a/src/test/auxiliary/weak-lang-items.rs +++ b/src/test/auxiliary/weak-lang-items.rs @@ -13,7 +13,7 @@ // This aux-file will require the eh_personality function to be codegen'd, but // it hasn't been defined just yet. Make sure we don't explode. -#![feature(no_std)] +#![feature(no_std, core)] #![no_std] #![crate_type = "rlib"] diff --git a/src/test/bench/core-map.rs b/src/test/bench/core-map.rs index 4909d84a34f12..0cff90d61ed99 100644 --- a/src/test/bench/core-map.rs +++ b/src/test/bench/core-map.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, std_misc, rand)] use std::collections::{BTreeMap, HashMap, HashSet}; use std::env; diff --git a/src/test/bench/core-set.rs b/src/test/bench/core-set.rs index 994c9605fc375..aeedaa288fef8 100644 --- a/src/test/bench/core-set.rs +++ b/src/test/bench/core-set.rs @@ -10,7 +10,7 @@ // ignore-pretty very bad with line comments -#![feature(unboxed_closures)] +#![feature(unboxed_closures, rand, std_misc, collections)] extern crate collections; extern crate rand; diff --git a/src/test/bench/core-std.rs b/src/test/bench/core-std.rs index c2ea097ed751f..0344d6a46eeb5 100644 --- a/src/test/bench/core-std.rs +++ b/src/test/bench/core-std.rs @@ -11,7 +11,7 @@ // ignore-lexer-test FIXME #15679 // Microbenchmarks for various functions in std and extra -#![feature(unboxed_closures)] +#![feature(unboxed_closures, rand, old_io, old_path, std_misc, collections)] use std::old_io::*; use std::old_path::{Path, GenericPath}; diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs index b8d8f0cc9e6a9..fb95f92da7709 100644 --- a/src/test/bench/msgsend-pipes-shared.rs +++ b/src/test/bench/msgsend-pipes-shared.rs @@ -18,6 +18,8 @@ // different scalability characteristics compared to the select // version. +#![feature(std_misc)] + use std::sync::mpsc::{channel, Sender, Receiver}; use std::env; use std::thread; diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs index 3642eb82fdb05..6d702242d765f 100644 --- a/src/test/bench/msgsend-pipes.rs +++ b/src/test/bench/msgsend-pipes.rs @@ -14,6 +14,8 @@ // // I *think* it's the same, more or less. +#![feature(std_misc)] + use std::sync::mpsc::{channel, Sender, Receiver}; use std::env; use std::thread; diff --git a/src/test/bench/msgsend-ring-mutex-arcs.rs b/src/test/bench/msgsend-ring-mutex-arcs.rs index a980b7ed9e75d..6fb2c954e0205 100644 --- a/src/test/bench/msgsend-ring-mutex-arcs.rs +++ b/src/test/bench/msgsend-ring-mutex-arcs.rs @@ -18,6 +18,8 @@ // no-pretty-expanded FIXME #15189 // ignore-lexer-test FIXME #15679 +#![feature(std_misc)] + use std::env; use std::sync::{Arc, Future, Mutex, Condvar}; use std::time::Duration; diff --git a/src/test/bench/noise.rs b/src/test/bench/noise.rs index de88c7733b379..6cd758361870e 100644 --- a/src/test/bench/noise.rs +++ b/src/test/bench/noise.rs @@ -12,6 +12,8 @@ // See https://github.com/nsf/pnoise for timings and alternative implementations. // ignore-lexer-test FIXME #15679 +#![feature(rand, core)] + use std::f32::consts::PI; use std::num::Float; use std::rand::{Rng, StdRng}; diff --git a/src/test/bench/shootout-binarytrees.rs b/src/test/bench/shootout-binarytrees.rs index 38fc53ccd366a..64c3872213780 100644 --- a/src/test/bench/shootout-binarytrees.rs +++ b/src/test/bench/shootout-binarytrees.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(rustc_private, core)] + extern crate arena; use std::iter::range_step; diff --git a/src/test/bench/shootout-fannkuch-redux.rs b/src/test/bench/shootout-fannkuch-redux.rs index 3688c224a7df4..e23862f4286aa 100644 --- a/src/test/bench/shootout-fannkuch-redux.rs +++ b/src/test/bench/shootout-fannkuch-redux.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(core)] + use std::{cmp, iter, mem}; use std::thread; diff --git a/src/test/bench/shootout-fasta-redux.rs b/src/test/bench/shootout-fasta-redux.rs index 289f05a299b99..709b23ef9dd03 100644 --- a/src/test/bench/shootout-fasta-redux.rs +++ b/src/test/bench/shootout-fasta-redux.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(core, old_io, io, core)] + use std::cmp::min; use std::old_io::*; use std::iter::repeat; diff --git a/src/test/bench/shootout-fasta.rs b/src/test/bench/shootout-fasta.rs index df839fc27eec8..78d31faeb5169 100644 --- a/src/test/bench/shootout-fasta.rs +++ b/src/test/bench/shootout-fasta.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(old_io, old_path, io, core)] + use std::cmp::min; use std::old_io::*; use std::old_io; diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 88c9f43f6ec7c..ebdc60cdd2b0f 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -13,7 +13,7 @@ // multi tasking k-nucleotide -#![feature(box_syntax)] +#![feature(box_syntax, std_misc, old_io, collections, os)] use std::ascii::{AsciiExt, OwnedAsciiExt}; use std::cmp::Ordering::{self, Less, Greater, Equal}; diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs index 9e5885041b66b..ba4f2c9b1c563 100644 --- a/src/test/bench/shootout-k-nucleotide.rs +++ b/src/test/bench/shootout-k-nucleotide.rs @@ -40,7 +40,7 @@ // ignore-android see #10393 #13206 -#![feature(box_syntax)] +#![feature(box_syntax, std_misc, collections)] use std::ascii::OwnedAsciiExt; use std::env; diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs index 128c92921fa86..d248293103bde 100644 --- a/src/test/bench/shootout-mandelbrot.rs +++ b/src/test/bench/shootout-mandelbrot.rs @@ -38,7 +38,7 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. -#![feature(simd)] +#![feature(simd, old_io, core, io)] // ignore-pretty very bad with line comments diff --git a/src/test/bench/shootout-meteor.rs b/src/test/bench/shootout-meteor.rs index 79a5245a40849..150522fd02d4c 100644 --- a/src/test/bench/shootout-meteor.rs +++ b/src/test/bench/shootout-meteor.rs @@ -40,6 +40,8 @@ // no-pretty-expanded FIXME #15189 +#![feature(core)] + use std::iter::repeat; use std::sync::Arc; use std::sync::mpsc::channel; diff --git a/src/test/bench/shootout-nbody.rs b/src/test/bench/shootout-nbody.rs index 534dfe9548c2f..3748b65dacbb8 100644 --- a/src/test/bench/shootout-nbody.rs +++ b/src/test/bench/shootout-nbody.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(core)] + use std::num::Float; const PI: f64 = 3.141592653589793; diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs index a542c81f2394e..4d9bc951fa306 100644 --- a/src/test/bench/shootout-pfib.rs +++ b/src/test/bench/shootout-pfib.rs @@ -18,6 +18,8 @@ */ +#![feature(std_misc, rustc_private)] + extern crate getopts; use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/bench/shootout-reverse-complement.rs b/src/test/bench/shootout-reverse-complement.rs index 93aa5f2571bfb..875ec670d42b1 100644 --- a/src/test/bench/shootout-reverse-complement.rs +++ b/src/test/bench/shootout-reverse-complement.rs @@ -40,7 +40,7 @@ // ignore-android see #10393 #13206 -#![feature(unboxed_closures)] +#![feature(unboxed_closures, libc, old_io, collections, io, core)] extern crate libc; diff --git a/src/test/bench/shootout-spectralnorm.rs b/src/test/bench/shootout-spectralnorm.rs index f7514a3e8848d..3889b404d8557 100644 --- a/src/test/bench/shootout-spectralnorm.rs +++ b/src/test/bench/shootout-spectralnorm.rs @@ -41,7 +41,7 @@ // no-pretty-expanded FIXME #15189 #![allow(non_snake_case)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core, os)] use std::iter::{repeat, AdditiveIterator}; use std::thread; diff --git a/src/test/bench/std-smallintmap.rs b/src/test/bench/std-smallintmap.rs index a54a869412e35..dd56b18c144f2 100644 --- a/src/test/bench/std-smallintmap.rs +++ b/src/test/bench/std-smallintmap.rs @@ -10,6 +10,8 @@ // Microbenchmark for the smallintmap library +#![feature(collections, std_misc)] + use std::collections::VecMap; use std::env; use std::time::Duration; diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index 9a82614510eb2..3913de3a3f99f 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -10,7 +10,7 @@ // ignore-pretty very bad with line comments -#![feature(box_syntax)] +#![feature(box_syntax, core)] #![allow(non_snake_case)] use std::io::prelude::*; diff --git a/src/test/bench/task-perf-alloc-unwind.rs b/src/test/bench/task-perf-alloc-unwind.rs index 896b0ee57a04c..d8f4603ab1af9 100644 --- a/src/test/bench/task-perf-alloc-unwind.rs +++ b/src/test/bench/task-perf-alloc-unwind.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor, box_syntax)] +#![feature(unsafe_destructor, box_syntax, std_misc, collections)] use std::env; use std::thread; diff --git a/src/test/compile-fail/internal-unstable-noallow.rs b/src/test/compile-fail/internal-unstable-noallow.rs index 4e296198be8e4..2b48d47e94091 100644 --- a/src/test/compile-fail/internal-unstable-noallow.rs +++ b/src/test/compile-fail/internal-unstable-noallow.rs @@ -16,13 +16,10 @@ // aux-build:internal_unstable.rs // error-pattern:use of unstable library feature 'function' // error-pattern:use of unstable library feature 'struct_field' -// error-pattern:compilation successful -#![feature(rustc_attrs)] #[macro_use] extern crate internal_unstable; -#[rustc_error] fn main() { call_unstable_noallow!(); diff --git a/src/test/compile-fail/internal-unstable-thread-local.rs b/src/test/compile-fail/internal-unstable-thread-local.rs index ff1584975462f..74526fb3d8314 100644 --- a/src/test/compile-fail/internal-unstable-thread-local.rs +++ b/src/test/compile-fail/internal-unstable-thread-local.rs @@ -10,14 +10,12 @@ // aux-build:internal_unstable.rs -#![feature(rustc_attrs)] #![allow(dead_code)] extern crate internal_unstable; thread_local!(static FOO: () = ()); -thread_local!(static BAR: () = internal_unstable::unstable()); //~ WARN use of unstable +thread_local!(static BAR: () = internal_unstable::unstable()); //~ ERROR use of unstable -#[rustc_error] -fn main() {} //~ ERROR +fn main() {} diff --git a/src/test/compile-fail/internal-unstable.rs b/src/test/compile-fail/internal-unstable.rs index 8674e8ab5b2cd..accc898b8a808 100755 --- a/src/test/compile-fail/internal-unstable.rs +++ b/src/test/compile-fail/internal-unstable.rs @@ -10,7 +10,7 @@ // aux-build:internal_unstable.rs -#![feature(rustc_attrs, allow_internal_unstable)] +#![feature(allow_internal_unstable)] #[macro_use] extern crate internal_unstable; @@ -19,7 +19,7 @@ macro_rules! foo { ($e: expr, $f: expr) => {{ $e; $f; - internal_unstable::unstable(); //~ WARN use of unstable + internal_unstable::unstable(); //~ ERROR use of unstable }} } @@ -32,20 +32,19 @@ macro_rules! bar { }} } -#[rustc_error] -fn main() { //~ ERROR +fn main() { // ok, the instability is contained. call_unstable_allow!(); construct_unstable_allow!(0); // bad. - pass_through_allow!(internal_unstable::unstable()); //~ WARN use of unstable + pass_through_allow!(internal_unstable::unstable()); //~ ERROR use of unstable - pass_through_noallow!(internal_unstable::unstable()); //~ WARN use of unstable + pass_through_noallow!(internal_unstable::unstable()); //~ ERROR use of unstable - println!("{:?}", internal_unstable::unstable()); //~ WARN use of unstable + println!("{:?}", internal_unstable::unstable()); //~ ERROR use of unstable - bar!(internal_unstable::unstable()); //~ WARN use of unstable + bar!(internal_unstable::unstable()); //~ ERROR use of unstable } diff --git a/src/test/compile-fail/lint-output-format.rs b/src/test/compile-fail/lint-output-format.rs index ec4e3c774dbf0..d95ed7f10bd17 100644 --- a/src/test/compile-fail/lint-output-format.rs +++ b/src/test/compile-fail/lint-output-format.rs @@ -13,10 +13,10 @@ #![feature(foo)] //~ ERROR unused or unknown feature -extern crate lint_output_format; //~ WARNING: use of unstable library feature +extern crate lint_output_format; //~ ERROR use of unstable library feature use lint_output_format::{foo, bar}; fn main() { let _x = foo(); //~ WARNING #[warn(deprecated)] on by default - let _y = bar(); //~ WARNING: use of unstable library feature + let _y = bar(); //~ ERROR use of unstable library feature } diff --git a/src/test/compile-fail/lint-stability-fields.rs b/src/test/compile-fail/lint-stability-fields.rs index c43ff19892503..716d7674b2ddb 100644 --- a/src/test/compile-fail/lint-stability-fields.rs +++ b/src/test/compile-fail/lint-stability-fields.rs @@ -22,24 +22,24 @@ mod cross_crate { pub fn foo() { let x = Stable { inherit: 1, - override1: 2, //~ WARN use of unstable + override1: 2, //~ ERROR use of unstable override2: 3, //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable }; let _ = x.inherit; - let _ = x.override1; //~ WARN use of unstable + let _ = x.override1; //~ ERROR use of unstable let _ = x.override2; //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable let Stable { inherit: _, - override1: _, //~ WARN use of unstable + override1: _, //~ ERROR use of unstable override2: _ //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable } = x; // all fine let Stable { .. } = x; @@ -47,122 +47,122 @@ mod cross_crate { let x = Stable2(1, 2, 3); let _ = x.0; - let _ = x.1; //~ WARN use of unstable + let _ = x.1; //~ ERROR use of unstable let _ = x.2; //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable let Stable2(_, - _, //~ WARN use of unstable + _, //~ ERROR use of unstable _) //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable = x; // all fine let Stable2(..) = x; - let x = Unstable { //~ WARN use of unstable - inherit: 1, //~ WARN use of unstable + let x = Unstable { //~ ERROR use of unstable + inherit: 1, //~ ERROR use of unstable override1: 2, override2: 3, //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable }; - let _ = x.inherit; //~ WARN use of unstable + let _ = x.inherit; //~ ERROR use of unstable let _ = x.override1; let _ = x.override2; //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable - let Unstable { //~ WARN use of unstable - inherit: _, //~ WARN use of unstable + let Unstable { //~ ERROR use of unstable + inherit: _, //~ ERROR use of unstable override1: _, override2: _ //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable } = x; - let Unstable //~ WARN use of unstable + let Unstable //~ ERROR use of unstable // the patterns are all fine: { .. } = x; - let x = Unstable2(1, 2, 3); //~ WARN use of unstable + let x = Unstable2(1, 2, 3); //~ ERROR use of unstable - let _ = x.0; //~ WARN use of unstable + let _ = x.0; //~ ERROR use of unstable let _ = x.1; let _ = x.2; //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable - let Unstable2 //~ WARN use of unstable - (_, //~ WARN use of unstable + let Unstable2 //~ ERROR use of unstable + (_, //~ ERROR use of unstable _, _) //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable = x; - let Unstable2 //~ WARN use of unstable + let Unstable2 //~ ERROR use of unstable // the patterns are all fine: (..) = x; let x = Deprecated { //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable inherit: 1, //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable override1: 2, - override2: 3, //~ WARN use of unstable + override2: 3, //~ ERROR use of unstable }; let _ = x.inherit; //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable let _ = x.override1; - let _ = x.override2; //~ WARN use of unstable + let _ = x.override2; //~ ERROR use of unstable let Deprecated { //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable inherit: _, //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable override1: _, - override2: _ //~ WARN use of unstable + override2: _ //~ ERROR use of unstable } = x; let Deprecated //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable // the patterns are all fine: { .. } = x; let x = Deprecated2(1, 2, 3); //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable let _ = x.0; //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable let _ = x.1; - let _ = x.2; //~ WARN use of unstable + let _ = x.2; //~ ERROR use of unstable let Deprecated2 //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable (_, //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable _, - _) //~ WARN use of unstable + _) //~ ERROR use of unstable = x; let Deprecated2 //~^ ERROR use of deprecated item - //~^^ WARN use of unstable + //~^^ ERROR use of unstable // the patterns are all fine: (..) = x; } diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs index 12548c4539618..391b49e10686e 100644 --- a/src/test/compile-fail/lint-stability.rs +++ b/src/test/compile-fail/lint-stability.rs @@ -24,7 +24,7 @@ extern crate lint_stability; mod cross_crate { extern crate stability_cfg1; - extern crate stability_cfg2; //~ WARNING: use of unstable library feature + extern crate stability_cfg2; //~ ERROR use of unstable library feature use lint_stability::*; @@ -51,64 +51,64 @@ mod cross_crate { ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text deprecated_unstable(); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature foo.method_deprecated_unstable(); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature Foo::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::method_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature deprecated_unstable_text(); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature foo.method_deprecated_unstable_text(); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature Foo::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::method_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature - unstable(); //~ WARNING use of unstable library feature - foo.method_unstable(); //~ WARNING use of unstable library feature - Foo::method_unstable(&foo); //~ WARNING use of unstable library feature - ::method_unstable(&foo); //~ WARNING use of unstable library feature - foo.trait_unstable(); //~ WARNING use of unstable library feature - Trait::trait_unstable(&foo); //~ WARNING use of unstable library feature - ::trait_unstable(&foo); //~ WARNING use of unstable library feature - ::trait_unstable(&foo); //~ WARNING use of unstable library feature + unstable(); //~ ERROR use of unstable library feature + foo.method_unstable(); //~ ERROR use of unstable library feature + Foo::method_unstable(&foo); //~ ERROR use of unstable library feature + ::method_unstable(&foo); //~ ERROR use of unstable library feature + foo.trait_unstable(); //~ ERROR use of unstable library feature + Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature + ::trait_unstable(&foo); //~ ERROR use of unstable library feature + ::trait_unstable(&foo); //~ ERROR use of unstable library feature unstable_text(); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text foo.method_unstable_text(); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text Foo::method_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text ::method_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text foo.trait_unstable_text(); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text Trait::trait_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text ::trait_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text ::trait_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text stable(); foo.method_stable(); @@ -130,26 +130,26 @@ mod cross_crate { let _ = DeprecatedStruct { i: 0 }; //~ ERROR use of deprecated item let _ = DeprecatedUnstableStruct { i: 0 }; //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature - let _ = UnstableStruct { i: 0 }; //~ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature + let _ = UnstableStruct { i: 0 }; //~ ERROR use of unstable library feature let _ = StableStruct { i: 0 }; let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item let _ = DeprecatedUnstableUnitStruct; //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature - let _ = UnstableUnitStruct; //~ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature + let _ = UnstableUnitStruct; //~ ERROR use of unstable library feature let _ = StableUnitStruct; let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item let _ = Enum::DeprecatedUnstableVariant; //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature - let _ = Enum::UnstableVariant; //~ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature + let _ = Enum::UnstableVariant; //~ ERROR use of unstable library feature let _ = Enum::StableVariant; let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item let _ = DeprecatedUnstableTupleStruct (1); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature - let _ = UnstableTupleStruct (1); //~ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature + let _ = UnstableTupleStruct (1); //~ ERROR use of unstable library feature let _ = StableTupleStruct (1); // At the moment, the lint checker only checks stability in @@ -159,7 +159,7 @@ mod cross_crate { // on macros themselves are not yet linted. macro_test_arg!(deprecated_text()); //~ ERROR use of deprecated item: text macro_test_arg!(deprecated_unstable_text()); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature macro_test_arg!(macro_test_arg!(deprecated_text())); //~ ERROR use of deprecated item: text } @@ -173,33 +173,33 @@ mod cross_crate { ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item: text foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature Trait::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable(&foo); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature Trait::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature ::trait_deprecated_unstable_text(&foo); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature - foo.trait_unstable(); //~ WARNING use of unstable library feature - Trait::trait_unstable(&foo); //~ WARNING use of unstable library feature - ::trait_unstable(&foo); //~ WARNING use of unstable library feature - ::trait_unstable(&foo); //~ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature + foo.trait_unstable(); //~ ERROR use of unstable library feature + Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature + ::trait_unstable(&foo); //~ ERROR use of unstable library feature + ::trait_unstable(&foo); //~ ERROR use of unstable library feature foo.trait_unstable_text(); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text Trait::trait_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text ::trait_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text ::trait_unstable_text(&foo); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text foo.trait_stable(); Trait::trait_stable(&foo); ::trait_stable(&foo); @@ -210,46 +210,46 @@ mod cross_crate { foo.trait_deprecated(); //~ ERROR use of deprecated item foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text foo.trait_deprecated_unstable(); //~ ERROR use of deprecated item - //~^ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature foo.trait_deprecated_unstable_text(); //~ ERROR use of deprecated item: text - //~^ WARNING use of unstable library feature - foo.trait_unstable(); //~ WARNING use of unstable library feature + //~^ ERROR use of unstable library feature + foo.trait_unstable(); //~ ERROR use of unstable library feature foo.trait_unstable_text(); - //~^ WARNING use of unstable library feature 'test_feature': text + //~^ ERROR use of unstable library feature 'test_feature': text foo.trait_stable(); } struct S; - impl UnstableTrait for S { } //~ WARNING use of unstable library feature + impl UnstableTrait for S { } //~ ERROR use of unstable library feature - trait LocalTrait : UnstableTrait { } //~ WARNING use of unstable library feature + trait LocalTrait : UnstableTrait { } //~ ERROR use of unstable library feature impl Trait for S { fn trait_stable(&self) {} - fn trait_unstable(&self) {} //~ WARNING use of unstable library feature + fn trait_unstable(&self) {} //~ ERROR use of unstable library feature } } mod inheritance { - extern crate inherited_stability; //~ WARNING: use of unstable library feature - use self::inherited_stability::*; //~ WARNING: use of unstable library feature + extern crate inherited_stability; //~ ERROR use of unstable library feature + use self::inherited_stability::*; //~ ERROR use of unstable library feature fn test_inheritance() { - unstable(); //~ WARNING use of unstable library feature + unstable(); //~ ERROR use of unstable library feature stable(); - stable_mod::unstable(); //~ WARNING use of unstable library feature + stable_mod::unstable(); //~ ERROR use of unstable library feature stable_mod::stable(); unstable_mod::deprecated(); //~ ERROR use of deprecated item - unstable_mod::unstable(); //~ WARNING use of unstable library feature + unstable_mod::unstable(); //~ ERROR use of unstable library feature - let _ = Unstable::UnstableVariant; //~ WARNING use of unstable library feature + let _ = Unstable::UnstableVariant; //~ ERROR use of unstable library feature let _ = Unstable::StableVariant; let x: usize = 0; - x.unstable(); //~ WARNING use of unstable library feature + x.unstable(); //~ ERROR use of unstable library feature x.stable(); } } diff --git a/src/test/debuginfo/constant-debug-locs.rs b/src/test/debuginfo/constant-debug-locs.rs index 24332e3177508..f150e84b9fdfe 100644 --- a/src/test/debuginfo/constant-debug-locs.rs +++ b/src/test/debuginfo/constant-debug-locs.rs @@ -16,6 +16,7 @@ #![allow(unused_variables)] #![allow(dead_code)] #![omit_gdb_pretty_printer_section] +#![feature(std_misc, core)] // This test makes sure that the compiler doesn't crash when trying to assign // debug locations to const-expressions. diff --git a/src/test/debuginfo/function-arg-initialization.rs b/src/test/debuginfo/function-arg-initialization.rs index 7cefb6044f64f..c161600f2c3c9 100644 --- a/src/test/debuginfo/function-arg-initialization.rs +++ b/src/test/debuginfo/function-arg-initialization.rs @@ -17,6 +17,8 @@ // compile-flags:-g +#![feature(old_io)] + // === GDB TESTS =================================================================================== // gdb-command:run diff --git a/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs b/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs index 8d456f334323c..99e31ab230214 100644 --- a/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs +++ b/src/test/debuginfo/function-prologue-stepping-no-stack-check.rs @@ -20,6 +20,8 @@ // compile-flags:-g +#![feature(old_io)] + // === GDB TESTS =================================================================================== // gdb-command:rbreak immediate_args diff --git a/src/test/debuginfo/issue13213.rs b/src/test/debuginfo/issue13213.rs index a079ddbd0f507..38b149ef243e9 100644 --- a/src/test/debuginfo/issue13213.rs +++ b/src/test/debuginfo/issue13213.rs @@ -11,6 +11,9 @@ // min-lldb-version: 310 // aux-build:issue13213aux.rs + +#![feature(old_io)] + extern crate issue13213aux; // compile-flags:-g diff --git a/src/test/debuginfo/simd.rs b/src/test/debuginfo/simd.rs index 12c7b146342ff..16ae83ee8dc2b 100644 --- a/src/test/debuginfo/simd.rs +++ b/src/test/debuginfo/simd.rs @@ -42,6 +42,7 @@ #![allow(unused_variables)] #![omit_gdb_pretty_printer_section] +#![feature(core)] use std::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2}; diff --git a/src/test/run-fail/extern-panic.rs b/src/test/run-fail/extern-panic.rs index 127700e963abd..bddab59e3e4c5 100644 --- a/src/test/run-fail/extern-panic.rs +++ b/src/test/run-fail/extern-panic.rs @@ -12,6 +12,7 @@ // error-pattern:explicit failure // Testing that runtime failure doesn't cause callbacks to abort abnormally. // Instead the failure will be delivered after the callbacks return. +#![feature(std_misc, libc)] extern crate libc; use std::task; diff --git a/src/test/run-fail/rt-set-exit-status-panic.rs b/src/test/run-fail/rt-set-exit-status-panic.rs index fd7c3f8cc0e4b..0e72ab22dc8f9 100644 --- a/src/test/run-fail/rt-set-exit-status-panic.rs +++ b/src/test/run-fail/rt-set-exit-status-panic.rs @@ -10,6 +10,8 @@ // error-pattern:whatever +#![feature(os, rustc_private)] + #[macro_use] extern crate log; use std::os; diff --git a/src/test/run-fail/rt-set-exit-status-panic2.rs b/src/test/run-fail/rt-set-exit-status-panic2.rs index fb1e03c234d76..2498b7c2be4e7 100644 --- a/src/test/run-fail/rt-set-exit-status-panic2.rs +++ b/src/test/run-fail/rt-set-exit-status-panic2.rs @@ -10,6 +10,8 @@ // error-pattern:whatever +#![feature(os, rustc_private)] + #[macro_use] extern crate log; use std::os; use std::thread; diff --git a/src/test/run-fail/rt-set-exit-status.rs b/src/test/run-fail/rt-set-exit-status.rs index 39ece8a464a6f..9425a1b1902b5 100644 --- a/src/test/run-fail/rt-set-exit-status.rs +++ b/src/test/run-fail/rt-set-exit-status.rs @@ -10,6 +10,8 @@ // error-pattern:whatever +#![feature(rustc_private, os)] + #[macro_use] extern crate log; use std::os; diff --git a/src/test/run-make/allow-warnings-cmdline-stability/foo.rs b/src/test/run-make/allow-warnings-cmdline-stability/foo.rs index fb23a214016a7..a36cc474c2bf0 100644 --- a/src/test/run-make/allow-warnings-cmdline-stability/foo.rs +++ b/src/test/run-make/allow-warnings-cmdline-stability/foo.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(test_feature)] + extern crate bar; pub fn main() { bar::baz() } diff --git a/src/test/run-make/cannot-read-embedded-idents/create_and_compile.rs b/src/test/run-make/cannot-read-embedded-idents/create_and_compile.rs index fd69d2786b8d0..02af5244b8aab 100644 --- a/src/test/run-make/cannot-read-embedded-idents/create_and_compile.rs +++ b/src/test/run-make/cannot-read-embedded-idents/create_and_compile.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io, old_path)] + use std::env; use std::fs::File; use std::process::Command; diff --git a/src/test/run-make/extern-fn-reachable/main.rs b/src/test/run-make/extern-fn-reachable/main.rs index 86eed9dbe0a92..2e1fad5a044f6 100644 --- a/src/test/run-make/extern-fn-reachable/main.rs +++ b/src/test/run-make/extern-fn-reachable/main.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc, old_path, os)] + use std::dynamic_lib::DynamicLibrary; use std::os; use std::old_path::Path; diff --git a/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs b/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs index 835e068c15cfd..aec76fdf1b2c0 100644 --- a/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs +++ b/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(asm)] +#![feature(asm, core)] #![crate_type="lib"] use std::intrinsics; diff --git a/src/test/run-make/issue-19371/foo.rs b/src/test/run-make/issue-19371/foo.rs index 1ed816ed7290a..b089b9269a264 100644 --- a/src/test/run-make/issue-19371/foo.rs +++ b/src/test/run-make/issue-19371/foo.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rustc_private, path)] + extern crate rustc; extern crate rustc_driver; extern crate rustc_lint; diff --git a/src/test/run-make/link-path-order/main.rs b/src/test/run-make/link-path-order/main.rs index cd286af602a70..b1576ccd48e9f 100644 --- a/src/test/run-make/link-path-order/main.rs +++ b/src/test/run-make/link-path-order/main.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc, os)] + extern crate libc; #[link(name="foo")] diff --git a/src/test/run-make/lto-syntax-extension/main.rs b/src/test/run-make/lto-syntax-extension/main.rs index a38b2cfb96287..c9395f557fd4f 100644 --- a/src/test/run-make/lto-syntax-extension/main.rs +++ b/src/test/run-make/lto-syntax-extension/main.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rustc_private)] + extern crate lib; #[macro_use] extern crate log; diff --git a/src/test/run-make/no-duplicate-libs/bar.rs b/src/test/run-make/no-duplicate-libs/bar.rs index 0bec6148189a9..29f52f97a8887 100644 --- a/src/test/run-make/no-duplicate-libs/bar.rs +++ b/src/test/run-make/no-duplicate-libs/bar.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(lang_items, no_std)] +#![feature(lang_items, no_std, libc)] #![no_std] #![crate_type = "dylib"] diff --git a/src/test/run-make/no-duplicate-libs/foo.rs b/src/test/run-make/no-duplicate-libs/foo.rs index 9e8afdc5696ed..ae424c6569dbe 100644 --- a/src/test/run-make/no-duplicate-libs/foo.rs +++ b/src/test/run-make/no-duplicate-libs/foo.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(lang_items, no_std)] +#![feature(lang_items, no_std, libc)] #![no_std] #![crate_type = "dylib"] diff --git a/src/test/run-make/rustdoc-default-impl/foo.rs b/src/test/run-make/rustdoc-default-impl/foo.rs index 08f3bd10e74a7..c2531bf458628 100644 --- a/src/test/run-make/rustdoc-default-impl/foo.rs +++ b/src/test/run-make/rustdoc-default-impl/foo.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + pub mod bar { use std::marker; diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs index 2e2b8d2578eaf..74251c3c63e91 100644 --- a/src/test/run-make/save-analysis/foo.rs +++ b/src/test/run-make/save-analysis/foo.rs @@ -10,7 +10,7 @@ #![ crate_name = "test" ] #![allow(unstable)] -#![feature(box_syntax)] +#![feature(box_syntax, old_io, rustc_private, core)] extern crate graphviz; // A simple rust project diff --git a/src/test/run-make/unicode-input/multiple_files.rs b/src/test/run-make/unicode-input/multiple_files.rs index 1826e035e2458..aa2ce78577121 100644 --- a/src/test/run-make/unicode-input/multiple_files.rs +++ b/src/test/run-make/unicode-input/multiple_files.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rand)] + use std::fs::File; use std::io::prelude::*; use std::path::Path; diff --git a/src/test/run-make/unicode-input/span_length.rs b/src/test/run-make/unicode-input/span_length.rs index 9ed20ccaea5c9..ebf3226334cc6 100644 --- a/src/test/run-make/unicode-input/span_length.rs +++ b/src/test/run-make/unicode-input/span_length.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rand, core)] + use std::fs::File; use std::io::prelude::*; use std::iter::repeat; diff --git a/src/test/run-make/volatile-intrinsics/main.rs b/src/test/run-make/volatile-intrinsics/main.rs index 6dffb53e4a319..bdd557b6cc27b 100644 --- a/src/test/run-make/volatile-intrinsics/main.rs +++ b/src/test/run-make/volatile-intrinsics/main.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::intrinsics::{volatile_load, volatile_store}; pub fn main() { diff --git a/src/test/run-pass-fulldeps/compiler-calls.rs b/src/test/run-pass-fulldeps/compiler-calls.rs index 8492424a1457a..7a3c32a45f912 100644 --- a/src/test/run-pass-fulldeps/compiler-calls.rs +++ b/src/test/run-pass-fulldeps/compiler-calls.rs @@ -12,7 +12,7 @@ // ignore-android -#![feature(rustc_private)] +#![feature(rustc_private, path)] #![feature(core)] extern crate getopts; diff --git a/src/test/run-pass-fulldeps/issue-16992.rs b/src/test/run-pass-fulldeps/issue-16992.rs index 9e3ad8ee283e8..40947b2e25652 100644 --- a/src/test/run-pass-fulldeps/issue-16992.rs +++ b/src/test/run-pass-fulldeps/issue-16992.rs @@ -11,7 +11,7 @@ // ignore-pretty // ignore-android -#![feature(quote)] +#![feature(quote, rustc_private)] extern crate syntax; diff --git a/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs index aeb6a89a98ea6..d4dc5627044db 100644 --- a/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs +++ b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs @@ -11,7 +11,7 @@ // ignore-android // ignore-pretty: does not work well with `--test` -#![feature(quote)] +#![feature(quote, rustc_private)] extern crate syntax; diff --git a/src/test/run-pass-fulldeps/quote-tokens.rs b/src/test/run-pass-fulldeps/quote-tokens.rs index 020f5f562d2c3..0e2e1f2dd86d6 100644 --- a/src/test/run-pass-fulldeps/quote-tokens.rs +++ b/src/test/run-pass-fulldeps/quote-tokens.rs @@ -11,7 +11,7 @@ // ignore-android // ignore-pretty: does not work well with `--test` -#![feature(quote)] +#![feature(quote, rustc_private)] extern crate syntax; diff --git a/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs b/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs index 848ea738ed7d5..928368fabdf36 100644 --- a/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs +++ b/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs @@ -11,7 +11,7 @@ // ignore-android // ignore-pretty: does not work well with `--test` -#![feature(quote)] +#![feature(quote, rustc_private)] #![deny(unused_variable)] extern crate syntax; diff --git a/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs b/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs index b7570eb092612..23096828c4b95 100644 --- a/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs +++ b/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs @@ -12,7 +12,7 @@ // aux-build:syntax_extension_with_dll_deps_2.rs // ignore-stage1 -#![feature(plugin)] +#![feature(plugin, rustc_private)] #![plugin(syntax_extension_with_dll_deps_2)] fn main() { diff --git a/src/test/run-pass-valgrind/cleanup-stdin.rs b/src/test/run-pass-valgrind/cleanup-stdin.rs index 127be1f90d5ff..301c4b917816a 100644 --- a/src/test/run-pass-valgrind/cleanup-stdin.rs +++ b/src/test/run-pass-valgrind/cleanup-stdin.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io, io)] + fn main() { let _ = std::old_io::stdin(); let _ = std::io::stdin(); diff --git a/src/test/run-pass/anon-extern-mod.rs b/src/test/run-pass/anon-extern-mod.rs index 78e1cdabb4748..cbef2850adda8 100644 --- a/src/test/run-pass/anon-extern-mod.rs +++ b/src/test/run-pass/anon-extern-mod.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; #[link(name = "rust_test_helpers")] diff --git a/src/test/run-pass/associated-types-basic.rs b/src/test/run-pass/associated-types-basic.rs index f5521f7da853b..a5be906b159a5 100644 --- a/src/test/run-pass/associated-types-basic.rs +++ b/src/test/run-pass/associated-types-basic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::marker::MarkerTrait; trait Foo : MarkerTrait { diff --git a/src/test/run-pass/associated-types-issue-20371.rs b/src/test/run-pass/associated-types-issue-20371.rs index 40ef7f3531cb5..e1da26b5e2942 100644 --- a/src/test/run-pass/associated-types-issue-20371.rs +++ b/src/test/run-pass/associated-types-issue-20371.rs @@ -11,6 +11,8 @@ // Test that we are able to have an impl that defines an associated type // before the actual trait. +#![feature(core)] + use std::marker::MarkerTrait; impl X for f64 { type Y = int; } diff --git a/src/test/run-pass/associated-types-nested-projections.rs b/src/test/run-pass/associated-types-nested-projections.rs index 2ee8ef0d3ddac..2f36014f7655b 100644 --- a/src/test/run-pass/associated-types-nested-projections.rs +++ b/src/test/run-pass/associated-types-nested-projections.rs @@ -10,6 +10,8 @@ // Test that we can resolve nested projection types. Issue #20666. +#![feature(core)] + use std::marker::MarkerTrait; use std::slice; diff --git a/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs b/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs index de96af83f5917..236601b9c1692 100644 --- a/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs +++ b/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs @@ -11,6 +11,7 @@ // Test that we normalize associated types that appear in a bound that // contains a binding. Issue #21664. +#![feature(core)] #![allow(dead_code)] use std::marker::MarkerTrait; diff --git a/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs b/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs index 2243e00ffa160..7fa2030cfe190 100644 --- a/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs +++ b/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs @@ -12,6 +12,8 @@ // `Item` originates in a where-clause, not the declaration of // `T`. Issue #20300. +#![feature(core)] + use std::marker::{MarkerTrait, PhantomData}; use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT}; use std::sync::atomic::Ordering::SeqCst; diff --git a/src/test/run-pass/attr-before-view-item.rs b/src/test/run-pass/attr-before-view-item.rs index 951a716879fce..f472a672be2bf 100644 --- a/src/test/run-pass/attr-before-view-item.rs +++ b/src/test/run-pass/attr-before-view-item.rs @@ -10,7 +10,7 @@ // error-pattern:expected item -#![feature(custom_attribute)] +#![feature(custom_attribute, test)] #[foo = "bar"] extern crate test; diff --git a/src/test/run-pass/attr-before-view-item2.rs b/src/test/run-pass/attr-before-view-item2.rs index ad8ce608bd05d..5d91d0a41cfa0 100644 --- a/src/test/run-pass/attr-before-view-item2.rs +++ b/src/test/run-pass/attr-before-view-item2.rs @@ -10,7 +10,7 @@ // error-pattern:expected item -#![feature(custom_attribute)] +#![feature(custom_attribute, test)] mod m { #[foo = "bar"] diff --git a/src/test/run-pass/backtrace.rs b/src/test/run-pass/backtrace.rs index 879b3e920ab96..226a7c12df9ab 100644 --- a/src/test/run-pass/backtrace.rs +++ b/src/test/run-pass/backtrace.rs @@ -12,7 +12,7 @@ // ignore-windows FIXME #13259 #![feature(unboxed_closures)] -#![feature(unsafe_destructor)] +#![feature(unsafe_destructor, old_io, collections)] use std::env; use std::old_io::process::Command; diff --git a/src/test/run-pass/bitv-perf-test.rs b/src/test/run-pass/bitv-perf-test.rs index e6982949501c2..6c88f350172a3 100644 --- a/src/test/run-pass/bitv-perf-test.rs +++ b/src/test/run-pass/bitv-perf-test.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, collections)] extern crate collections; use std::collections::BitVec; diff --git a/src/test/run-pass/c-stack-as-value.rs b/src/test/run-pass/c-stack-as-value.rs index 6a1dde24d6850..b81764e1de555 100644 --- a/src/test/run-pass/c-stack-as-value.rs +++ b/src/test/run-pass/c-stack-as-value.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + mod rustrt { extern crate libc; diff --git a/src/test/run-pass/c-stack-returning-int64.rs b/src/test/run-pass/c-stack-returning-int64.rs index 1de7520d2b1d0..eceaa54b740a3 100644 --- a/src/test/run-pass/c-stack-returning-int64.rs +++ b/src/test/run-pass/c-stack-returning-int64.rs @@ -9,6 +9,8 @@ // except according to those terms. +#![feature(libc, std_misc)] + extern crate libc; use std::ffi::CString; diff --git a/src/test/run-pass/capturing-logging.rs b/src/test/run-pass/capturing-logging.rs index be5bb628b7294..2a5ccb88aff5f 100644 --- a/src/test/run-pass/capturing-logging.rs +++ b/src/test/run-pass/capturing-logging.rs @@ -11,7 +11,7 @@ // exec-env:RUST_LOG=info #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, old_io, rustc_private, std_misc)] #[macro_use] extern crate log; diff --git a/src/test/run-pass/check-static-recursion-foreign.rs b/src/test/run-pass/check-static-recursion-foreign.rs index 4e05c263a48ba..ebaa1b5595974 100644 --- a/src/test/run-pass/check-static-recursion-foreign.rs +++ b/src/test/run-pass/check-static-recursion-foreign.rs @@ -12,7 +12,7 @@ // aux-build:check_static_recursion_foreign_helper.rs -#![feature(custom_attribute)] +#![feature(custom_attribute, libc)] extern crate check_static_recursion_foreign_helper; extern crate libc; diff --git a/src/test/run-pass/child-outlives-parent.rs b/src/test/run-pass/child-outlives-parent.rs index 39af96a58e6e3..7a8b4770f9563 100644 --- a/src/test/run-pass/child-outlives-parent.rs +++ b/src/test/run-pass/child-outlives-parent.rs @@ -10,6 +10,8 @@ // Reported as issue #126, child leaks the string. +#![feature(std_misc)] + use std::thread::Thread; fn child2(_s: String) { } diff --git a/src/test/run-pass/cleanup-arm-conditional.rs b/src/test/run-pass/cleanup-arm-conditional.rs index cb152f1c64e94..66204ec94941d 100644 --- a/src/test/run-pass/cleanup-arm-conditional.rs +++ b/src/test/run-pass/cleanup-arm-conditional.rs @@ -22,7 +22,7 @@ // arm is confined to the match arm itself. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, os)] use std::os; diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs index 5cc567cb14c6e..2c65dc7e2aca2 100644 --- a/src/test/run-pass/clone-with-exterior.rs +++ b/src/test/run-pass/clone-with-exterior.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, std_misc)] use std::thread::Thread; diff --git a/src/test/run-pass/closure-reform.rs b/src/test/run-pass/closure-reform.rs index af64553b91387..fefab45714f77 100644 --- a/src/test/run-pass/closure-reform.rs +++ b/src/test/run-pass/closure-reform.rs @@ -11,7 +11,7 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -#![feature(unboxed_closures)] +#![feature(unboxed_closures, old_io)] use std::mem; use std::old_io::stdio::println; diff --git a/src/test/run-pass/comm.rs b/src/test/run-pass/comm.rs index 16a21adc3fcf9..cf318c50cff6a 100644 --- a/src/test/run-pass/comm.rs +++ b/src/test/run-pass/comm.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/conditional-debug-macro-off.rs b/src/test/run-pass/conditional-debug-macro-off.rs index 90142350772b8..1d1475d60d964 100644 --- a/src/test/run-pass/conditional-debug-macro-off.rs +++ b/src/test/run-pass/conditional-debug-macro-off.rs @@ -11,6 +11,8 @@ // compile-flags: -C debug-assertions=no // exec-env:RUST_LOG=conditional-debug-macro-off=4 +#![feature(rustc_private)] + #[macro_use] extern crate log; diff --git a/src/test/run-pass/const-cast.rs b/src/test/run-pass/const-cast.rs index b7e9c0338dd63..1da88a6b2c460 100644 --- a/src/test/run-pass/const-cast.rs +++ b/src/test/run-pass/const-cast.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; struct TestStruct { diff --git a/src/test/run-pass/core-run-destroy.rs b/src/test/run-pass/core-run-destroy.rs index 88d5b74708e62..a4413fa85d241 100644 --- a/src/test/run-pass/core-run-destroy.rs +++ b/src/test/run-pass/core-run-destroy.rs @@ -16,6 +16,7 @@ // instead of in std. #![reexport_test_harness_main = "test_main"] +#![feature(old_io, libc, std_misc)] extern crate libc; diff --git a/src/test/run-pass/derive-no-std.rs b/src/test/run-pass/derive-no-std.rs index d3034c2d48529..4f48549d499b2 100644 --- a/src/test/run-pass/derive-no-std.rs +++ b/src/test/run-pass/derive-no-std.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(no_std)] +#![feature(no_std, core, rand, collections, rustc_private)] #![no_std] extern crate core; diff --git a/src/test/run-pass/deriving-encodable-decodable-box.rs b/src/test/run-pass/deriving-encodable-decodable-box.rs index 454156b4c9e3f..aa03e23b95ff8 100644 --- a/src/test/run-pass/deriving-encodable-decodable-box.rs +++ b/src/test/run-pass/deriving-encodable-decodable-box.rs @@ -10,7 +10,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#![feature(old_orphan_check)] +#![feature(old_orphan_check, rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs b/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs index 7d581927c30b4..d4463207aa26a 100644 --- a/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs +++ b/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs @@ -11,7 +11,7 @@ // This briefly tests the capability of `Cell` and `RefCell` to implement the // `Encodable` and `Decodable` traits via `#[derive(Encodable, Decodable)]` -#![feature(old_orphan_check)] +#![feature(old_orphan_check, rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/deriving-global.rs b/src/test/run-pass/deriving-global.rs index 6777cbdab9604..842de6e498421 100644 --- a/src/test/run-pass/deriving-global.rs +++ b/src/test/run-pass/deriving-global.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(old_orphan_check)] +#![feature(old_orphan_check, rand, rustc_private)] extern crate serialize; extern crate rand; diff --git a/src/test/run-pass/deriving-hash.rs b/src/test/run-pass/deriving-hash.rs index 5fe7c8bb94b4f..03361fbfd9553 100644 --- a/src/test/run-pass/deriving-hash.rs +++ b/src/test/run-pass/deriving-hash.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(hash)] + use std::hash::{Hash, SipHasher}; #[derive(Hash)] diff --git a/src/test/run-pass/deriving-primitive.rs b/src/test/run-pass/deriving-primitive.rs index 6b365c348f782..4399d741cad1e 100644 --- a/src/test/run-pass/deriving-primitive.rs +++ b/src/test/run-pass/deriving-primitive.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::num::FromPrimitive; use std::isize; diff --git a/src/test/run-pass/deriving-rand.rs b/src/test/run-pass/deriving-rand.rs index d6e5fedf1824a..71cae400602d2 100644 --- a/src/test/run-pass/deriving-rand.rs +++ b/src/test/run-pass/deriving-rand.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rand)] + use std::rand; #[derive(Rand)] diff --git a/src/test/run-pass/drop-with-type-ascription-1.rs b/src/test/run-pass/drop-with-type-ascription-1.rs index 4f1fc91a53cea..645548761e4a1 100644 --- a/src/test/run-pass/drop-with-type-ascription-1.rs +++ b/src/test/run-pass/drop-with-type-ascription-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(str_words)] + fn main() { let foo = "hello".to_string(); let foo: Vec<&str> = foo.words().collect(); diff --git a/src/test/run-pass/drop-with-type-ascription-2.rs b/src/test/run-pass/drop-with-type-ascription-2.rs index ec8de2a709e66..c2edfc261050e 100644 --- a/src/test/run-pass/drop-with-type-ascription-2.rs +++ b/src/test/run-pass/drop-with-type-ascription-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + fn main() { let args = vec!("foobie", "asdf::asdf"); let arr: Vec<&str> = args[1].split_str("::").collect(); diff --git a/src/test/run-pass/dropck_tarena_sound_drop.rs b/src/test/run-pass/dropck_tarena_sound_drop.rs index ad71f725864f9..17aa1f04e5f49 100644 --- a/src/test/run-pass/dropck_tarena_sound_drop.rs +++ b/src/test/run-pass/dropck_tarena_sound_drop.rs @@ -17,7 +17,7 @@ // is force-fed a lifetime equal to that of the borrowed arena. #![allow(unstable)] -#![feature(unsafe_destructor)] +#![feature(unsafe_destructor, rustc_private)] extern crate arena; diff --git a/src/test/run-pass/dst-index.rs b/src/test/run-pass/dst-index.rs index 0c7ecfcefff34..64083a063b2a6 100644 --- a/src/test/run-pass/dst-index.rs +++ b/src/test/run-pass/dst-index.rs @@ -11,6 +11,8 @@ // Test that overloaded index expressions with DST result types // work and don't ICE. +#![feature(core)] + use std::ops::Index; use std::fmt::Debug; diff --git a/src/test/run-pass/enum-null-pointer-opt.rs b/src/test/run-pass/enum-null-pointer-opt.rs index 023376ce4736e..635c34ef85a92 100644 --- a/src/test/run-pass/enum-null-pointer-opt.rs +++ b/src/test/run-pass/enum-null-pointer-opt.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] extern crate core; diff --git a/src/test/run-pass/env-home-dir.rs b/src/test/run-pass/env-home-dir.rs index 5d68a25a14ada..c41486f660cf6 100644 --- a/src/test/run-pass/env-home-dir.rs +++ b/src/test/run-pass/env-home-dir.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(path)] + use std::env::*; use std::path::PathBuf; diff --git a/src/test/run-pass/exponential-notation.rs b/src/test/run-pass/exponential-notation.rs index bfe22712de8c3..3f451ee8d5159 100644 --- a/src/test/run-pass/exponential-notation.rs +++ b/src/test/run-pass/exponential-notation.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::num::strconv::ExponentFormat::{ExpBin, ExpDec}; use std::num::strconv::SignificantDigits::DigMax; use std::num::strconv::SignFormat::{SignAll, SignNeg}; diff --git a/src/test/run-pass/extern-call-deep.rs b/src/test/run-pass/extern-call-deep.rs index 93a5752d004aa..2138b12fb12ab 100644 --- a/src/test/run-pass/extern-call-deep.rs +++ b/src/test/run-pass/extern-call-deep.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; mod rustrt { diff --git a/src/test/run-pass/extern-call-deep2.rs b/src/test/run-pass/extern-call-deep2.rs index 3c4c1da52ea95..7bbed563a99fe 100644 --- a/src/test/run-pass/extern-call-deep2.rs +++ b/src/test/run-pass/extern-call-deep2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc, libc)] + extern crate libc; use std::thread::Thread; diff --git a/src/test/run-pass/extern-call-indirect.rs b/src/test/run-pass/extern-call-indirect.rs index 52697d96b32d9..4f1abbeb5c7ed 100644 --- a/src/test/run-pass/extern-call-indirect.rs +++ b/src/test/run-pass/extern-call-indirect.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; mod rustrt { diff --git a/src/test/run-pass/extern-call-scrub.rs b/src/test/run-pass/extern-call-scrub.rs index 0dca7514dc5cf..069ecd92a56d0 100644 --- a/src/test/run-pass/extern-call-scrub.rs +++ b/src/test/run-pass/extern-call-scrub.rs @@ -12,6 +12,8 @@ // make sure the stack pointers are maintained properly in both // directions +#![feature(libc, std_misc)] + extern crate libc; use std::thread::Thread; diff --git a/src/test/run-pass/extern-crosscrate.rs b/src/test/run-pass/extern-crosscrate.rs index 18e20332adc91..7157d0658be34 100644 --- a/src/test/run-pass/extern-crosscrate.rs +++ b/src/test/run-pass/extern-crosscrate.rs @@ -10,6 +10,8 @@ //aux-build:extern-crosscrate-source.rs +#![feature(libc)] + extern crate externcallback; extern crate libc; diff --git a/src/test/run-pass/extern-methods.rs b/src/test/run-pass/extern-methods.rs index 8fe69e4002494..aab409e77cf47 100644 --- a/src/test/run-pass/extern-methods.rs +++ b/src/test/run-pass/extern-methods.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::marker::MarkerTrait; trait A : MarkerTrait { diff --git a/src/test/run-pass/extern-mod-syntax.rs b/src/test/run-pass/extern-mod-syntax.rs index 4d4f5036fc1b8..37404ee7e696c 100644 --- a/src/test/run-pass/extern-mod-syntax.rs +++ b/src/test/run-pass/extern-mod-syntax.rs @@ -9,6 +9,7 @@ // except according to those terms. #![allow(unused_imports)] +#![feature(rustc_private)] extern crate serialize; use serialize::json::Object; diff --git a/src/test/run-pass/float-nan.rs b/src/test/run-pass/float-nan.rs index 4d9f7d507f0a5..b52f025fcbb51 100644 --- a/src/test/run-pass/float-nan.rs +++ b/src/test/run-pass/float-nan.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::num::Float; pub fn main() { diff --git a/src/test/run-pass/for-loop-no-std.rs b/src/test/run-pass/for-loop-no-std.rs index 30c2aec33ad1b..31ed49197781c 100644 --- a/src/test/run-pass/for-loop-no-std.rs +++ b/src/test/run-pass/for-loop-no-std.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(lang_items, start, no_std)] +#![feature(lang_items, start, no_std, core, collections)] #![no_std] extern crate "std" as other; diff --git a/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs b/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs index a4988bf016cf2..1a60f22d1450a 100644 --- a/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs +++ b/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/foreach-external-iterators-hashmap.rs b/src/test/run-pass/foreach-external-iterators-hashmap.rs index ed4328d94fe34..79d2d4000805c 100644 --- a/src/test/run-pass/foreach-external-iterators-hashmap.rs +++ b/src/test/run-pass/foreach-external-iterators-hashmap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/foreign-call-no-runtime.rs b/src/test/run-pass/foreign-call-no-runtime.rs index 9e05f38af7a48..3c5abba902dc1 100644 --- a/src/test/run-pass/foreign-call-no-runtime.rs +++ b/src/test/run-pass/foreign-call-no-runtime.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-aarch64 +#![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/foreign-dupe.rs b/src/test/run-pass/foreign-dupe.rs index 39c7d6dda0d0a..fe42b2a0558a1 100644 --- a/src/test/run-pass/foreign-dupe.rs +++ b/src/test/run-pass/foreign-dupe.rs @@ -10,6 +10,8 @@ // calling pin_task and that's having weird side-effects. +#![feature(libc)] + mod rustrt1 { extern crate libc; diff --git a/src/test/run-pass/foreign-fn-linkname.rs b/src/test/run-pass/foreign-fn-linkname.rs index 172ece0c4bfd9..a274a1914498f 100644 --- a/src/test/run-pass/foreign-fn-linkname.rs +++ b/src/test/run-pass/foreign-fn-linkname.rs @@ -9,6 +9,8 @@ // except according to those terms. +#![feature(std_misc, libc)] + extern crate libc; use std::ffi::CString; diff --git a/src/test/run-pass/foreign-mod-unused-const.rs b/src/test/run-pass/foreign-mod-unused-const.rs index 03023f032335f..abf9f504b7d82 100644 --- a/src/test/run-pass/foreign-mod-unused-const.rs +++ b/src/test/run-pass/foreign-mod-unused-const.rs @@ -9,6 +9,8 @@ // except according to those terms. +#![feature(libc)] + extern crate libc; mod foo { diff --git a/src/test/run-pass/foreign-no-abi.rs b/src/test/run-pass/foreign-no-abi.rs index 2af02feb21d77..9305945b918b8 100644 --- a/src/test/run-pass/foreign-no-abi.rs +++ b/src/test/run-pass/foreign-no-abi.rs @@ -10,6 +10,8 @@ // ABI is cdecl by default +#![feature(libc)] + mod rustrt { extern crate libc; diff --git a/src/test/run-pass/foreign2.rs b/src/test/run-pass/foreign2.rs index 5ebc4effb3718..749a5875b7562 100644 --- a/src/test/run-pass/foreign2.rs +++ b/src/test/run-pass/foreign2.rs @@ -9,6 +9,8 @@ // except according to those terms. +#![feature(libc)] + extern crate libc; mod bar { diff --git a/src/test/run-pass/format-no-std.rs b/src/test/run-pass/format-no-std.rs index a15a176c2238d..4df6ed843affa 100644 --- a/src/test/run-pass/format-no-std.rs +++ b/src/test/run-pass/format-no-std.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(lang_items, start, no_std)] +#![feature(lang_items, start, no_std, core, collections)] #![no_std] extern crate "std" as other; diff --git a/src/test/run-pass/fsu-moves-and-copies.rs b/src/test/run-pass/fsu-moves-and-copies.rs index 0f8d7c24360fb..cdf147aae1093 100644 --- a/src/test/run-pass/fsu-moves-and-copies.rs +++ b/src/test/run-pass/fsu-moves-and-copies.rs @@ -12,7 +12,7 @@ // correctly and moves rather than copy when appropriate. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, core)] use std::marker::NoCopy as NP; diff --git a/src/test/run-pass/generic-extern-mangle.rs b/src/test/run-pass/generic-extern-mangle.rs index 062ee507864bb..db5175f19cb4b 100644 --- a/src/test/run-pass/generic-extern-mangle.rs +++ b/src/test/run-pass/generic-extern-mangle.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::num::Int; extern "C" fn foo(a: T, b: T) -> T { a.wrapping_add(b) } diff --git a/src/test/run-pass/getopts_ref.rs b/src/test/run-pass/getopts_ref.rs index 3c89900fe493b..1ccd8a0640efe 100644 --- a/src/test/run-pass/getopts_ref.rs +++ b/src/test/run-pass/getopts_ref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rustc_private)] + extern crate getopts; use getopts::{optopt, getopts}; diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index 81c4054d00910..93ff182073411 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, std_misc)] /** A somewhat reduced test case to expose some Valgrind issues. diff --git a/src/test/run-pass/init-large-type.rs b/src/test/run-pass/init-large-type.rs index 8ee6054f8ba56..76927858ea11a 100644 --- a/src/test/run-pass/init-large-type.rs +++ b/src/test/run-pass/init-large-type.rs @@ -12,7 +12,7 @@ // Doing it incorrectly causes massive slowdown in LLVM during // optimisation. -#![feature(intrinsics)] +#![feature(intrinsics, std_misc)] use std::thread::Thread; diff --git a/src/test/run-pass/into-iterator-type-inference-shift.rs b/src/test/run-pass/into-iterator-type-inference-shift.rs index 01e305581f14e..a9aa5955d3d12 100644 --- a/src/test/run-pass/into-iterator-type-inference-shift.rs +++ b/src/test/run-pass/into-iterator-type-inference-shift.rs @@ -13,6 +13,8 @@ // propagation yet, and so we just saw a type variable, yielding an // error. +#![feature(core)] + use std::u8; trait IntoIterator { diff --git a/src/test/run-pass/intrinsic-assume.rs b/src/test/run-pass/intrinsic-assume.rs index 837c2d21513de..638b2e434a5ff 100644 --- a/src/test/run-pass/intrinsic-assume.rs +++ b/src/test/run-pass/intrinsic-assume.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::intrinsics::assume; unsafe fn f(x: i32) -> i32 { diff --git a/src/test/run-pass/intrinsic-unreachable.rs b/src/test/run-pass/intrinsic-unreachable.rs index 5e8b758cdf68f..ea9648a3e699a 100644 --- a/src/test/run-pass/intrinsic-unreachable.rs +++ b/src/test/run-pass/intrinsic-unreachable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::intrinsics; // See also src/test/run-make/intrinsic-unreachable. diff --git a/src/test/run-pass/intrinsics-math.rs b/src/test/run-pass/intrinsics-math.rs index 028b2bfb0ecdb..4ca6b0258032d 100644 --- a/src/test/run-pass/intrinsics-math.rs +++ b/src/test/run-pass/intrinsics-math.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(intrinsics)] +#![feature(intrinsics, core)] macro_rules! assert_approx_eq { ($a:expr, $b:expr) => ({ diff --git a/src/test/run-pass/issue-10626.rs b/src/test/run-pass/issue-10626.rs index 29e4801d0a9aa..2c0811b69e020 100644 --- a/src/test/run-pass/issue-10626.rs +++ b/src/test/run-pass/issue-10626.rs @@ -12,6 +12,8 @@ // Make sure that if a process doesn't have its stdio/stderr descriptors set up // that we don't die in a large ball of fire +#![feature(old_io)] + use std::env; use std::old_io::process; diff --git a/src/test/run-pass/issue-11709.rs b/src/test/run-pass/issue-11709.rs index 4a07b5fc432c2..da3efb4fea8ca 100644 --- a/src/test/run-pass/issue-11709.rs +++ b/src/test/run-pass/issue-11709.rs @@ -15,6 +15,8 @@ // when this bug was opened. The cases where the compiler // panics before the fix have a comment. +#![feature(std_misc)] + use std::thunk::Thunk; struct S {x:()} diff --git a/src/test/run-pass/issue-11736.rs b/src/test/run-pass/issue-11736.rs index c6e0a5be76333..87d5bf8ed0a32 100644 --- a/src/test/run-pass/issue-11736.rs +++ b/src/test/run-pass/issue-11736.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use std::collections::BitVec; diff --git a/src/test/run-pass/issue-11881.rs b/src/test/run-pass/issue-11881.rs index bc907787c7cc0..15c652591077e 100644 --- a/src/test/run-pass/issue-11881.rs +++ b/src/test/run-pass/issue-11881.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(old_orphan_check)] +#![feature(old_orphan_check, rustc_private, old_io)] extern crate rbml; extern crate serialize; diff --git a/src/test/run-pass/issue-11958.rs b/src/test/run-pass/issue-11958.rs index bb34dae77b344..f3c6da7cfe430 100644 --- a/src/test/run-pass/issue-11958.rs +++ b/src/test/run-pass/issue-11958.rs @@ -9,6 +9,7 @@ // except according to those terms. #![forbid(warnings)] +#![feature(std_misc)] // Pretty printing tests complain about `use std::predule::*` #![allow(unused_imports)] diff --git a/src/test/run-pass/issue-1251.rs b/src/test/run-pass/issue-1251.rs index debb7df112597..d5f8200007f7a 100644 --- a/src/test/run-pass/issue-1251.rs +++ b/src/test/run-pass/issue-1251.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + #![crate_id="rust_get_test_int"] mod rustrt { diff --git a/src/test/run-pass/issue-12684.rs b/src/test/run-pass/issue-12684.rs index e66b5d21e17fa..51268969d4221 100644 --- a/src/test/run-pass/issue-12684.rs +++ b/src/test/run-pass/issue-12684.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io, std_misc)] + use std::time::Duration; use std::thread; diff --git a/src/test/run-pass/issue-12699.rs b/src/test/run-pass/issue-12699.rs index b55d64777537e..4ff17f297d7e6 100644 --- a/src/test/run-pass/issue-12699.rs +++ b/src/test/run-pass/issue-12699.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io, std_misc)] + use std::old_io::timer; use std::time::Duration; diff --git a/src/test/run-pass/issue-12860.rs b/src/test/run-pass/issue-12860.rs index a05cc9c0f74c2..7f26d4d371334 100644 --- a/src/test/run-pass/issue-12860.rs +++ b/src/test/run-pass/issue-12860.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/issue-13105.rs b/src/test/run-pass/issue-13105.rs index 64807dc44e061..3886971a4696e 100644 --- a/src/test/run-pass/issue-13105.rs +++ b/src/test/run-pass/issue-13105.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::marker::MarkerTrait; trait Foo : MarkerTrait { diff --git a/src/test/run-pass/issue-13259-windows-tcb-trash.rs b/src/test/run-pass/issue-13259-windows-tcb-trash.rs index 329ab7c921dda..5c5282da06b8b 100644 --- a/src/test/run-pass/issue-13259-windows-tcb-trash.rs +++ b/src/test/run-pass/issue-13259-windows-tcb-trash.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; #[cfg(windows)] diff --git a/src/test/run-pass/issue-13304.rs b/src/test/run-pass/issue-13304.rs index bd2ddc6b9b214..876b329998e08 100644 --- a/src/test/run-pass/issue-13304.rs +++ b/src/test/run-pass/issue-13304.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-aarch64 +#![feature(io, process_capture)] use std::env; use std::io::prelude::*; diff --git a/src/test/run-pass/issue-13352.rs b/src/test/run-pass/issue-13352.rs index a834371203480..aed0022d9fa44 100644 --- a/src/test/run-pass/issue-13352.rs +++ b/src/test/run-pass/issue-13352.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc, libc)] + extern crate libc; use std::thunk::Thunk; diff --git a/src/test/run-pass/issue-13494.rs b/src/test/run-pass/issue-13494.rs index 95562d75c3ea4..7692a31315be9 100644 --- a/src/test/run-pass/issue-13494.rs +++ b/src/test/run-pass/issue-13494.rs @@ -11,6 +11,8 @@ // This test may not always fail, but it can be flaky if the race it used to // expose is still present. +#![feature(std_misc)] + use std::sync::mpsc::{channel, Sender, Receiver}; use std::thread::Thread; diff --git a/src/test/run-pass/issue-13507-2.rs b/src/test/run-pass/issue-13507-2.rs index 1c0283070a249..61ef98357524f 100644 --- a/src/test/run-pass/issue-13507-2.rs +++ b/src/test/run-pass/issue-13507-2.rs @@ -9,6 +9,9 @@ // except according to those terms. // aux-build:issue13507.rs + +#![feature(core)] + extern crate issue13507; use issue13507::testtypes; diff --git a/src/test/run-pass/issue-13655.rs b/src/test/run-pass/issue-13655.rs index 81a8b29461c78..cd5da3844e10f 100644 --- a/src/test/run-pass/issue-13655.rs +++ b/src/test/run-pass/issue-13655.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::ops::Fn; struct Foo(T); diff --git a/src/test/run-pass/issue-13763.rs b/src/test/run-pass/issue-13763.rs index 81b6892b0f97a..3f4ade08d9280 100644 --- a/src/test/run-pass/issue-13763.rs +++ b/src/test/run-pass/issue-13763.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::u8; const NUM: uint = u8::BITS as uint; diff --git a/src/test/run-pass/issue-14021.rs b/src/test/run-pass/issue-14021.rs index e850ecbba6e56..e773f03f21217 100644 --- a/src/test/run-pass/issue-14021.rs +++ b/src/test/run-pass/issue-14021.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(old_orphan_check)] +#![feature(old_orphan_check, rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/issue-14456.rs b/src/test/run-pass/issue-14456.rs index 7e4c464d9aaba..ba769c2594a85 100644 --- a/src/test/run-pass/issue-14456.rs +++ b/src/test/run-pass/issue-14456.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(io, process_capture)] + use std::env; use std::io::prelude::*; use std::io; diff --git a/src/test/run-pass/issue-14901.rs b/src/test/run-pass/issue-14901.rs index abb15dae00df6..f8dd0cf1a8228 100644 --- a/src/test/run-pass/issue-14901.rs +++ b/src/test/run-pass/issue-14901.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io)] + use std::old_io::Reader; enum Wrapper<'a> { diff --git a/src/test/run-pass/issue-14940.rs b/src/test/run-pass/issue-14940.rs index 098fa54207f39..fa4d10df7ea92 100644 --- a/src/test/run-pass/issue-14940.rs +++ b/src/test/run-pass/issue-14940.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io, io)] + use std::env; use std::process::Command; use std::io::{self, Write}; diff --git a/src/test/run-pass/issue-14958.rs b/src/test/run-pass/issue-14958.rs index 6335f79be6c7a..911d850b289af 100644 --- a/src/test/run-pass/issue-14958.rs +++ b/src/test/run-pass/issue-14958.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] trait Foo { fn dummy(&self) { }} diff --git a/src/test/run-pass/issue-14959.rs b/src/test/run-pass/issue-14959.rs index 53d0f7dae0577..6fd22f2efb704 100644 --- a/src/test/run-pass/issue-14959.rs +++ b/src/test/run-pass/issue-14959.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::ops::Fn; diff --git a/src/test/run-pass/issue-15673.rs b/src/test/run-pass/issue-15673.rs index 227d8f7b8c82a..020513121e6de 100644 --- a/src/test/run-pass/issue-15673.rs +++ b/src/test/run-pass/issue-15673.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::iter::AdditiveIterator; fn main() { let x: [u64; 3] = [1, 2, 3]; diff --git a/src/test/run-pass/issue-15734.rs b/src/test/run-pass/issue-15734.rs index 18e4190ee459f..99c8d746b94f1 100644 --- a/src/test/run-pass/issue-15734.rs +++ b/src/test/run-pass/issue-15734.rs @@ -11,7 +11,7 @@ // If `Index` used an associated type for its output, this test would // work more smoothly. -#![feature(old_orphan_check)] +#![feature(old_orphan_check, core)] use std::ops::Index; diff --git a/src/test/run-pass/issue-15924.rs b/src/test/run-pass/issue-15924.rs index 88b250af1c096..d8ddec286e92a 100644 --- a/src/test/run-pass/issue-15924.rs +++ b/src/test/run-pass/issue-15924.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] +#![feature(unsafe_destructor, rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/issue-16530.rs b/src/test/run-pass/issue-16530.rs index 7e3b796235d26..b34c760192d13 100644 --- a/src/test/run-pass/issue-16530.rs +++ b/src/test/run-pass/issue-16530.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(hash)] + use std::hash::{SipHasher, hash}; #[derive(Hash)] diff --git a/src/test/run-pass/issue-16739.rs b/src/test/run-pass/issue-16739.rs index 389baecafd144..16c1b14fd8775 100644 --- a/src/test/run-pass/issue-16739.rs +++ b/src/test/run-pass/issue-16739.rs @@ -10,7 +10,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] // Test that unboxing shim for calling rust-call ABI methods through a // trait box works and does not cause an ICE. diff --git a/src/test/run-pass/issue-1696.rs b/src/test/run-pass/issue-1696.rs index 40e112d6fbf76..4c6c200c7164e 100644 --- a/src/test/run-pass/issue-1696.rs +++ b/src/test/run-pass/issue-1696.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/issue-17322.rs b/src/test/run-pass/issue-17322.rs index d4c32f42188bb..410d6795c2126 100644 --- a/src/test/run-pass/issue-17322.rs +++ b/src/test/run-pass/issue-17322.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, io)] use std::io::{self, Write}; diff --git a/src/test/run-pass/issue-17351.rs b/src/test/run-pass/issue-17351.rs index 0966d4ea45eec..945e1f220c5f7 100644 --- a/src/test/run-pass/issue-17351.rs +++ b/src/test/run-pass/issue-17351.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + fn main() { let _: &Str = &"x"; } diff --git a/src/test/run-pass/issue-17718-static-unsafe-interior.rs b/src/test/run-pass/issue-17718-static-unsafe-interior.rs index cdd03244df145..388408cbd4da1 100644 --- a/src/test/run-pass/issue-17718-static-unsafe-interior.rs +++ b/src/test/run-pass/issue-17718-static-unsafe-interior.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::marker; use std::cell::UnsafeCell; diff --git a/src/test/run-pass/issue-17718.rs b/src/test/run-pass/issue-17718.rs index e4782e2892874..8eee4c9f216b9 100644 --- a/src/test/run-pass/issue-17718.rs +++ b/src/test/run-pass/issue-17718.rs @@ -10,6 +10,8 @@ // aux-build:issue-17718.rs +#![feature(core)] + extern crate "issue-17718" as other; use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; diff --git a/src/test/run-pass/issue-17897.rs b/src/test/run-pass/issue-17897.rs index 3774aaa190333..adc33e3eed022 100644 --- a/src/test/run-pass/issue-17897.rs +++ b/src/test/run-pass/issue-17897.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, std_misc)] use std::thunk::Thunk; diff --git a/src/test/run-pass/issue-18188.rs b/src/test/run-pass/issue-18188.rs index a4b09eb08e0f6..270537591b75b 100644 --- a/src/test/run-pass/issue-18188.rs +++ b/src/test/run-pass/issue-18188.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, std_misc)] use std::thunk::Thunk; diff --git a/src/test/run-pass/issue-18619.rs b/src/test/run-pass/issue-18619.rs index 6b6296b0bd929..6caa96530f64b 100644 --- a/src/test/run-pass/issue-18619.rs +++ b/src/test/run-pass/issue-18619.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io)] + use std::old_io::FileType; pub fn main() { diff --git a/src/test/run-pass/issue-18661.rs b/src/test/run-pass/issue-18661.rs index bb2907241c2c6..bdc16533ea62c 100644 --- a/src/test/run-pass/issue-18661.rs +++ b/src/test/run-pass/issue-18661.rs @@ -11,7 +11,7 @@ // Test that param substitutions from the correct environment are // used when translating unboxed closure calls. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] pub fn inside(c: F) { c.call(()); diff --git a/src/test/run-pass/issue-19098.rs b/src/test/run-pass/issue-19098.rs index ef95b4d4f00c5..05f3373dbd4d8 100644 --- a/src/test/run-pass/issue-19098.rs +++ b/src/test/run-pass/issue-19098.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] pub trait Handler { fn handle(&self, &mut String); diff --git a/src/test/run-pass/issue-19811-escape-unicode.rs b/src/test/run-pass/issue-19811-escape-unicode.rs index 23400859e54f1..9317f5ea6b132 100644 --- a/src/test/run-pass/issue-19811-escape-unicode.rs +++ b/src/test/run-pass/issue-19811-escape-unicode.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + fn main() { let mut escaped = String::from_str(""); for c in '\u{10401}'.escape_unicode() { diff --git a/src/test/run-pass/issue-20091.rs b/src/test/run-pass/issue-20091.rs index fe9ae022d88b4..1fe443484665b 100644 --- a/src/test/run-pass/issue-20091.rs +++ b/src/test/run-pass/issue-20091.rs @@ -9,6 +9,7 @@ // except according to those terms. // ignore-aarch64 +#![feature(std_misc, os)] #[cfg(unix)] fn main() { diff --git a/src/test/run-pass/issue-20454.rs b/src/test/run-pass/issue-20454.rs index fbc4cca800875..0e3d4e0e40d67 100644 --- a/src/test/run-pass/issue-20454.rs +++ b/src/test/run-pass/issue-20454.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread; fn main() { diff --git a/src/test/run-pass/issue-20644.rs b/src/test/run-pass/issue-20644.rs index 83b91c93a865f..476267d9329cb 100644 --- a/src/test/run-pass/issue-20644.rs +++ b/src/test/run-pass/issue-20644.rs @@ -11,6 +11,8 @@ // A reduced version of the rustbook ice. The problem this encountered // had to do with trans ignoring binders. +#![feature(os)] + use std::iter; use std::os; use std::fs::File; diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs index c5badb614948f..2600c5f0afd3d 100644 --- a/src/test/run-pass/issue-20797.rs +++ b/src/test/run-pass/issue-20797.rs @@ -10,6 +10,8 @@ // Regression test for #20797. +#![feature(old_io, old_path)] + use std::default::Default; use std::io; use std::fs; diff --git a/src/test/run-pass/issue-21058.rs b/src/test/run-pass/issue-21058.rs index e53fe3c44a28e..3da650469e886 100644 --- a/src/test/run-pass/issue-21058.rs +++ b/src/test/run-pass/issue-21058.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] struct NT(str); struct DST { a: u32, b: str } diff --git a/src/test/run-pass/issue-2190-1.rs b/src/test/run-pass/issue-2190-1.rs index 3025741694f43..00f501d85a578 100644 --- a/src/test/run-pass/issue-2190-1.rs +++ b/src/test/run-pass/issue-2190-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Builder; use std::thunk::Thunk; diff --git a/src/test/run-pass/issue-2214.rs b/src/test/run-pass/issue-2214.rs index 1dcbfd92fa05a..202ea05b7f8b3 100644 --- a/src/test/run-pass/issue-2214.rs +++ b/src/test/run-pass/issue-2214.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; use std::mem; diff --git a/src/test/run-pass/issue-22577.rs b/src/test/run-pass/issue-22577.rs index f668cae66c603..f0b0b18e6bb5c 100644 --- a/src/test/run-pass/issue-22577.rs +++ b/src/test/run-pass/issue-22577.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(fs, net, fs_walk)] + use std::{fs, net}; fn assert_both() {} diff --git a/src/test/run-pass/issue-2383.rs b/src/test/run-pass/issue-2383.rs index 9599a90895079..f017193bc762b 100644 --- a/src/test/run-pass/issue-2383.rs +++ b/src/test/run-pass/issue-2383.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use std::collections::VecDeque; diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 3a1178c2824cb..8d0e06549335c 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -10,7 +10,7 @@ // // ignore-lexer-test FIXME #15883 -#![feature(unsafe_destructor)] +#![feature(unsafe_destructor, std_misc)] pub type Task = int; diff --git a/src/test/run-pass/issue-2804-2.rs b/src/test/run-pass/issue-2804-2.rs index 4f89d28332a23..c49dda9f1e5af 100644 --- a/src/test/run-pass/issue-2804-2.rs +++ b/src/test/run-pass/issue-2804-2.rs @@ -11,6 +11,8 @@ // Minimized version of issue-2804.rs. Both check that callee IDs don't // clobber the previous node ID in a macro expr +#![feature(collections)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/issue-2804.rs b/src/test/run-pass/issue-2804.rs index b9b5aec62fcda..4fa491ab44606 100644 --- a/src/test/run-pass/issue-2804.rs +++ b/src/test/run-pass/issue-2804.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] +#![feature(rustc_private)] + extern crate collections; extern crate serialize; diff --git a/src/test/run-pass/issue-2904.rs b/src/test/run-pass/issue-2904.rs index 3f954c3c9180d..b05baa24b7aa1 100644 --- a/src/test/run-pass/issue-2904.rs +++ b/src/test/run-pass/issue-2904.rs @@ -9,7 +9,9 @@ // except according to those terms. -/// Map representation +// Map representation + +#![feature(old_io)] use std::old_io; use std::fmt; diff --git a/src/test/run-pass/issue-3012-2.rs b/src/test/run-pass/issue-3012-2.rs index 6f107a37e9b25..a679ff5f718b2 100644 --- a/src/test/run-pass/issue-3012-2.rs +++ b/src/test/run-pass/issue-3012-2.rs @@ -11,7 +11,7 @@ // aux-build:issue-3012-1.rs #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, libc)] extern crate socketlib; extern crate libc; diff --git a/src/test/run-pass/issue-3026.rs b/src/test/run-pass/issue-3026.rs index 8da1549684471..1ce6d6d38d8ff 100644 --- a/src/test/run-pass/issue-3026.rs +++ b/src/test/run-pass/issue-3026.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, collections)] extern crate collections; diff --git a/src/test/run-pass/issue-3424.rs b/src/test/run-pass/issue-3424.rs index e039be058defe..ecce97a301345 100644 --- a/src/test/run-pass/issue-3424.rs +++ b/src/test/run-pass/issue-3424.rs @@ -11,7 +11,7 @@ // rustc --test ignores2.rs && ./ignores2 #![allow(unknown_features)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, old_path, std_misc)] use std::old_path::{Path}; use std::old_path; diff --git a/src/test/run-pass/issue-3559.rs b/src/test/run-pass/issue-3559.rs index 3f1a1c75d8a78..c2ea24ac6ba99 100644 --- a/src/test/run-pass/issue-3559.rs +++ b/src/test/run-pass/issue-3559.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/issue-3563-3.rs b/src/test/run-pass/issue-3563-3.rs index be4d475229591..5dfe02cc9ec4b 100644 --- a/src/test/run-pass/issue-3563-3.rs +++ b/src/test/run-pass/issue-3563-3.rs @@ -22,6 +22,8 @@ // that are already linked in. Using WriterUtil allows us to use the write_line // method. +#![feature(core)] + use std::fmt; use std::iter::repeat; use std::slice; diff --git a/src/test/run-pass/issue-3609.rs b/src/test/run-pass/issue-3609.rs index b51edcf8bec4d..2bd56e8168787 100644 --- a/src/test/run-pass/issue-3609.rs +++ b/src/test/run-pass/issue-3609.rs @@ -9,6 +9,7 @@ // except according to those terms. #![allow(unknown_features)] +#![feature(std_misc)] use std::thread::Thread; use std::sync::mpsc::Sender; diff --git a/src/test/run-pass/issue-3656.rs b/src/test/run-pass/issue-3656.rs index 8a39676ca17ac..5be64522477b3 100644 --- a/src/test/run-pass/issue-3656.rs +++ b/src/test/run-pass/issue-3656.rs @@ -12,6 +12,8 @@ // Incorrect struct size computation in the FFI, because of not taking // the alignment of elements into account. +#![feature(libc)] + extern crate libc; use libc::{c_uint, uint32_t, c_void}; diff --git a/src/test/run-pass/issue-3753.rs b/src/test/run-pass/issue-3753.rs index 58d7aa276f15a..bbfeb94cd9de1 100644 --- a/src/test/run-pass/issue-3753.rs +++ b/src/test/run-pass/issue-3753.rs @@ -12,6 +12,8 @@ // Issue Name: pub method preceded by attribute can't be parsed // Abstract: Visibility parsing failed when compiler parsing +#![feature(core)] + use std::f64; #[derive(Copy)] diff --git a/src/test/run-pass/issue-4016.rs b/src/test/run-pass/issue-4016.rs index 220332f63548a..a761345e1d989 100644 --- a/src/test/run-pass/issue-4016.rs +++ b/src/test/run-pass/issue-4016.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/issue-4036.rs b/src/test/run-pass/issue-4036.rs index 48e32922ce708..865f729a4d353 100644 --- a/src/test/run-pass/issue-4036.rs +++ b/src/test/run-pass/issue-4036.rs @@ -12,6 +12,8 @@ // Issue #4036: Test for an issue that arose around fixing up type inference // byproducts in vtable records. +#![feature(rustc_private)] + extern crate serialize; use serialize::{json, Decodable}; diff --git a/src/test/run-pass/issue-4333.rs b/src/test/run-pass/issue-4333.rs index 074bbf270fd7e..f92bed87ba669 100644 --- a/src/test/run-pass/issue-4333.rs +++ b/src/test/run-pass/issue-4333.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(io)] + use std::io; pub fn main() { diff --git a/src/test/run-pass/issue-4446.rs b/src/test/run-pass/issue-4446.rs index b40a726a2c397..8dd385b59c964 100644 --- a/src/test/run-pass/issue-4446.rs +++ b/src/test/run-pass/issue-4446.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io)] + use std::old_io::println; use std::sync::mpsc::channel; use std::thread; diff --git a/src/test/run-pass/issue-4735.rs b/src/test/run-pass/issue-4735.rs index 196e9748b1073..568b8bc89a037 100644 --- a/src/test/run-pass/issue-4735.rs +++ b/src/test/run-pass/issue-4735.rs @@ -10,7 +10,7 @@ #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, libc)] extern crate libc; diff --git a/src/test/run-pass/issue-5791.rs b/src/test/run-pass/issue-5791.rs index 468f420624a5f..c6017d7d6508f 100644 --- a/src/test/run-pass/issue-5791.rs +++ b/src/test/run-pass/issue-5791.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; extern { diff --git a/src/test/run-pass/issue-5988.rs b/src/test/run-pass/issue-5988.rs index 1ad48d326eaca..dae4bc35c2747 100644 --- a/src/test/run-pass/issue-5988.rs +++ b/src/test/run-pass/issue-5988.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io)] + use std::old_io; trait B { fn f(&self); diff --git a/src/test/run-pass/issue-6128.rs b/src/test/run-pass/issue-6128.rs index 1746a6281dc26..e1e71be72eb0f 100644 --- a/src/test/run-pass/issue-6128.rs +++ b/src/test/run-pass/issue-6128.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, collections)] extern crate collections; diff --git a/src/test/run-pass/issue-6898.rs b/src/test/run-pass/issue-6898.rs index 9e6293216bc11..f40c37b77a32f 100644 --- a/src/test/run-pass/issue-6898.rs +++ b/src/test/run-pass/issue-6898.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::intrinsics; /// Returns the size of a type diff --git a/src/test/run-pass/issue-7660.rs b/src/test/run-pass/issue-7660.rs index 9e36b1f5082d0..27c5796ece904 100644 --- a/src/test/run-pass/issue-7660.rs +++ b/src/test/run-pass/issue-7660.rs @@ -11,6 +11,8 @@ // Regression test for issue 7660 // rvalue lifetime too short when equivalent `match` works +#![feature(collections)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/issue-8398.rs b/src/test/run-pass/issue-8398.rs index f8065d0bcd363..80863c3d6f641 100644 --- a/src/test/run-pass/issue-8398.rs +++ b/src/test/run-pass/issue-8398.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io, io)] + use std::old_io; fn foo(a: &mut old_io::Writer) { diff --git a/src/test/run-pass/issue-8460.rs b/src/test/run-pass/issue-8460.rs index 00339a4e84b2b..929adbdab491c 100644 --- a/src/test/run-pass/issue-8460.rs +++ b/src/test/run-pass/issue-8460.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::num::Int; use std::thread; diff --git a/src/test/run-pass/issue-8827.rs b/src/test/run-pass/issue-8827.rs index d7a8674954696..b2aa93d280c92 100644 --- a/src/test/run-pass/issue-8827.rs +++ b/src/test/run-pass/issue-8827.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; use std::sync::mpsc::{channel, Receiver}; diff --git a/src/test/run-pass/issue-9396.rs b/src/test/run-pass/issue-9396.rs index a98d1aba04dfd..98fc79882c09d 100644 --- a/src/test/run-pass/issue-9396.rs +++ b/src/test/run-pass/issue-9396.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io, std_misc)] + use std::sync::mpsc::{TryRecvError, channel}; use std::old_io::timer::Timer; use std::thread::Thread; diff --git a/src/test/run-pass/issue22346.rs b/src/test/run-pass/issue22346.rs index d30a0be5feeb5..1c58765ef650e 100644 --- a/src/test/run-pass/issue22346.rs +++ b/src/test/run-pass/issue22346.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + // This used to cause an ICE because the retslot for the "return" had the wrong type fn testcase<'a>() -> Box + 'a> { return Box::new((0..3).map(|i| { return i; })); diff --git a/src/test/run-pass/istr.rs b/src/test/run-pass/istr.rs index 15195482ed693..0013cb292e1c7 100644 --- a/src/test/run-pass/istr.rs +++ b/src/test/run-pass/istr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + use std::string::String; fn test_stack_assign() { diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index 6036af5c6275f..a262d0323c5de 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -12,7 +12,7 @@ // for completeness since .rs files linked from .rc files support this // notation to specify their module's attributes -#![feature(custom_attribute)] +#![feature(custom_attribute, libc)] #![allow(unused_attribute)] #![attr1 = "val"] #![attr2 = "val"] diff --git a/src/test/run-pass/ivec-tag.rs b/src/test/run-pass/ivec-tag.rs index 121338823d291..f2895d7d7d1de 100644 --- a/src/test/run-pass/ivec-tag.rs +++ b/src/test/run-pass/ivec-tag.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/kindck-implicit-close-over-mut-var.rs b/src/test/run-pass/kindck-implicit-close-over-mut-var.rs index 9d6ca1e9cfb10..ca405f54415c9 100644 --- a/src/test/run-pass/kindck-implicit-close-over-mut-var.rs +++ b/src/test/run-pass/kindck-implicit-close-over-mut-var.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; fn user(_i: int) {} diff --git a/src/test/run-pass/last-use-in-cap-clause.rs b/src/test/run-pass/last-use-in-cap-clause.rs index 45964efad97c8..1dddec32e38b7 100644 --- a/src/test/run-pass/last-use-in-cap-clause.rs +++ b/src/test/run-pass/last-use-in-cap-clause.rs @@ -12,7 +12,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] struct A { a: Box } diff --git a/src/test/run-pass/linkage-visibility.rs b/src/test/run-pass/linkage-visibility.rs index 80a859c03bc3d..3c238d3fe78c6 100644 --- a/src/test/run-pass/linkage-visibility.rs +++ b/src/test/run-pass/linkage-visibility.rs @@ -12,6 +12,8 @@ // ignore-android: FIXME(#10379) // ignore-windows: std::dynamic_lib does not work on Windows well +#![feature(std_misc, old_path)] + extern crate "linkage-visibility" as foo; pub fn main() { diff --git a/src/test/run-pass/logging-enabled-debug.rs b/src/test/run-pass/logging-enabled-debug.rs index dfc9272827066..d3b6c38da888a 100644 --- a/src/test/run-pass/logging-enabled-debug.rs +++ b/src/test/run-pass/logging-enabled-debug.rs @@ -11,6 +11,8 @@ // compile-flags:-C debug-assertions=no // exec-env:RUST_LOG=logging-enabled-debug=debug +#![feature(rustc_private)] + #[macro_use] extern crate log; diff --git a/src/test/run-pass/logging-enabled.rs b/src/test/run-pass/logging-enabled.rs index 372cdc401b549..1dd9f72ab803b 100644 --- a/src/test/run-pass/logging-enabled.rs +++ b/src/test/run-pass/logging-enabled.rs @@ -10,6 +10,8 @@ // exec-env:RUST_LOG=logging-enabled=info +#![feature(rustc_private)] + #[macro_use] extern crate log; diff --git a/src/test/run-pass/logging-separate-lines.rs b/src/test/run-pass/logging-separate-lines.rs index 82a155b117301..b27080b65b781 100644 --- a/src/test/run-pass/logging-separate-lines.rs +++ b/src/test/run-pass/logging-separate-lines.rs @@ -12,6 +12,8 @@ // exec-env:RUST_LOG=debug // compile-flags:-C debug-assertions=y +#![feature(old_io, rustc_private)] + #[macro_use] extern crate log; diff --git a/src/test/run-pass/macro-with-braces-in-expr-position.rs b/src/test/run-pass/macro-with-braces-in-expr-position.rs index cb52ba74bbd68..80a3b8c9eddee 100644 --- a/src/test/run-pass/macro-with-braces-in-expr-position.rs +++ b/src/test/run-pass/macro-with-braces-in-expr-position.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; macro_rules! expr { ($e: expr) => { $e } } diff --git a/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs b/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs index f1d41a0f42216..826561bfddd11 100644 --- a/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs +++ b/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs @@ -12,6 +12,8 @@ // type is `&mut [u8]`, passes in a pointer to the lvalue and not a // temporary. Issue #19147. +#![feature(core, old_io)] + use std::mem; use std::slice; use std::old_io::IoResult; diff --git a/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs b/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs index fbecb6851b687..d595092119059 100644 --- a/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs +++ b/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs @@ -11,6 +11,8 @@ // Test that we select between traits A and B. To do that, we must // consider the `Sized` bound. +#![feature(core)] + trait A { fn foo(self); } diff --git a/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs b/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs index 1164ef1a3c98e..11f53f0a9806d 100644 --- a/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs +++ b/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::marker::MarkerTrait; trait Serializer : MarkerTrait { diff --git a/src/test/run-pass/moves-based-on-type-capture-clause.rs b/src/test/run-pass/moves-based-on-type-capture-clause.rs index 3596fa1a0063f..f0eba366e7117 100644 --- a/src/test/run-pass/moves-based-on-type-capture-clause.rs +++ b/src/test/run-pass/moves-based-on-type-capture-clause.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; pub fn main() { diff --git a/src/test/run-pass/new-box-syntax.rs b/src/test/run-pass/new-box-syntax.rs index 3d4847a119a55..1595b677c8d43 100644 --- a/src/test/run-pass/new-box-syntax.rs +++ b/src/test/run-pass/new-box-syntax.rs @@ -12,7 +12,7 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, alloc)] // Tests that the new `box` syntax works with unique pointers. diff --git a/src/test/run-pass/new-unicode-escapes.rs b/src/test/run-pass/new-unicode-escapes.rs index 7430f730f3b17..9e4654a13f03b 100644 --- a/src/test/run-pass/new-unicode-escapes.rs +++ b/src/test/run-pass/new-unicode-escapes.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + pub fn main() { let s = "\u{2603}"; assert_eq!(s, "☃"); diff --git a/src/test/run-pass/newtype-struct-with-dtor.rs b/src/test/run-pass/newtype-struct-with-dtor.rs index 15c4e8b045339..916ec01257f16 100644 --- a/src/test/run-pass/newtype-struct-with-dtor.rs +++ b/src/test/run-pass/newtype-struct-with-dtor.rs @@ -9,6 +9,8 @@ // except according to those terms. +#![feature(libc)] + extern crate libc; use libc::c_int; diff --git a/src/test/run-pass/numeric-method-autoexport.rs b/src/test/run-pass/numeric-method-autoexport.rs index eccc2a41a8d2d..3e3391b034210 100644 --- a/src/test/run-pass/numeric-method-autoexport.rs +++ b/src/test/run-pass/numeric-method-autoexport.rs @@ -15,6 +15,8 @@ // necessary. Testing the methods of the impls is done within the source // file for each numeric type. +#![feature(core)] + use std::ops::Add; use std::num::ToPrimitive; diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs index 3ddc666cd384c..e8b0db44161b3 100644 --- a/src/test/run-pass/operator-overloading.rs +++ b/src/test/run-pass/operator-overloading.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::cmp; use std::ops; diff --git a/src/test/run-pass/option-ext.rs b/src/test/run-pass/option-ext.rs index 7a816f9133501..8f5a5e8ece75d 100644 --- a/src/test/run-pass/option-ext.rs +++ b/src/test/run-pass/option-ext.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + pub fn main() { let thing = "{{ f }}"; let f = thing.find_str("{{"); diff --git a/src/test/run-pass/osx-frameworks.rs b/src/test/run-pass/osx-frameworks.rs index aa4e91320f755..9ac67b4c7838d 100644 --- a/src/test/run-pass/osx-frameworks.rs +++ b/src/test/run-pass/osx-frameworks.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; #[cfg(target_os = "macos")] diff --git a/src/test/run-pass/out-of-stack-new-thread-no-split.rs b/src/test/run-pass/out-of-stack-new-thread-no-split.rs index 41bf7fe2dfa63..3c322f72b75b6 100644 --- a/src/test/run-pass/out-of-stack-new-thread-no-split.rs +++ b/src/test/run-pass/out-of-stack-new-thread-no-split.rs @@ -14,7 +14,7 @@ //ignore-dragonfly //ignore-bitrig -#![feature(asm)] +#![feature(asm, old_io, std_misc)] use std::old_io::process::Command; use std::env; diff --git a/src/test/run-pass/out-of-stack.rs b/src/test/run-pass/out-of-stack.rs index cc5eb69bb87e3..47f83eab4c1f4 100644 --- a/src/test/run-pass/out-of-stack.rs +++ b/src/test/run-pass/out-of-stack.rs @@ -10,7 +10,7 @@ // ignore-android: FIXME (#20004) -#![feature(asm)] +#![feature(asm, old_io)] use std::old_io::process::Command; use std::env; diff --git a/src/test/run-pass/overloaded-autoderef.rs b/src/test/run-pass/overloaded-autoderef.rs index 6436165968d67..7b956dc772f54 100644 --- a/src/test/run-pass/overloaded-autoderef.rs +++ b/src/test/run-pass/overloaded-autoderef.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, collections, core)] use std::cell::RefCell; use std::rc::Rc; diff --git a/src/test/run-pass/overloaded-calls-param-vtables.rs b/src/test/run-pass/overloaded-calls-param-vtables.rs index 0ac9c97532bff..029a8eaad24bc 100644 --- a/src/test/run-pass/overloaded-calls-param-vtables.rs +++ b/src/test/run-pass/overloaded-calls-param-vtables.rs @@ -10,7 +10,7 @@ // Tests that nested vtables work with overloaded calls. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::marker::PhantomData; use std::ops::Fn; diff --git a/src/test/run-pass/overloaded-calls-simple.rs b/src/test/run-pass/overloaded-calls-simple.rs index d18a91c545280..fc6540b6e3ef4 100644 --- a/src/test/run-pass/overloaded-calls-simple.rs +++ b/src/test/run-pass/overloaded-calls-simple.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(lang_items, unboxed_closures)] +#![feature(lang_items, unboxed_closures, core)] use std::ops::{Fn, FnMut, FnOnce}; diff --git a/src/test/run-pass/overloaded-calls-zero-args.rs b/src/test/run-pass/overloaded-calls-zero-args.rs index 78e84b9d55bca..e75f217a2c606 100644 --- a/src/test/run-pass/overloaded-calls-zero-args.rs +++ b/src/test/run-pass/overloaded-calls-zero-args.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::ops::{FnMut}; diff --git a/src/test/run-pass/overloaded-deref.rs b/src/test/run-pass/overloaded-deref.rs index bb1694be5e29b..20e55de2f058a 100644 --- a/src/test/run-pass/overloaded-deref.rs +++ b/src/test/run-pass/overloaded-deref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + use std::cell::RefCell; use std::rc::Rc; use std::string::String; diff --git a/src/test/run-pass/overloaded-index-assoc-list.rs b/src/test/run-pass/overloaded-index-assoc-list.rs index 0064748e88369..7b059cb6a3327 100644 --- a/src/test/run-pass/overloaded-index-assoc-list.rs +++ b/src/test/run-pass/overloaded-index-assoc-list.rs @@ -11,6 +11,8 @@ // Test overloading of the `[]` operator. In particular test that it // takes its argument *by reference*. +#![feature(core)] + use std::ops::Index; struct AssociationList { diff --git a/src/test/run-pass/overloaded-index-autoderef.rs b/src/test/run-pass/overloaded-index-autoderef.rs index 8f655f0517ddf..214817b0a15b5 100644 --- a/src/test/run-pass/overloaded-index-autoderef.rs +++ b/src/test/run-pass/overloaded-index-autoderef.rs @@ -11,7 +11,7 @@ // Test overloaded indexing combined with autoderef. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, core)] use std::ops::{Index, IndexMut}; diff --git a/src/test/run-pass/overloaded-index-in-field.rs b/src/test/run-pass/overloaded-index-in-field.rs index 487fb93c9fee8..66f8c5c4238fa 100644 --- a/src/test/run-pass/overloaded-index-in-field.rs +++ b/src/test/run-pass/overloaded-index-in-field.rs @@ -11,6 +11,8 @@ // Test using overloaded indexing when the "map" is stored in a // field. This caused problems at some point. +#![feature(core)] + use std::ops::Index; struct Foo { diff --git a/src/test/run-pass/overloaded-index.rs b/src/test/run-pass/overloaded-index.rs index 10ca3804eaedb..413cef86c5df8 100644 --- a/src/test/run-pass/overloaded-index.rs +++ b/src/test/run-pass/overloaded-index.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::ops::{Index, IndexMut}; struct Foo { diff --git a/src/test/run-pass/placement-new-arena.rs b/src/test/run-pass/placement-new-arena.rs index c4cf8357baa61..7ac624e6814db 100644 --- a/src/test/run-pass/placement-new-arena.rs +++ b/src/test/run-pass/placement-new-arena.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rustc_private)] + extern crate arena; use arena::Arena; diff --git a/src/test/run-pass/process-remove-from-env.rs b/src/test/run-pass/process-remove-from-env.rs index 9eb7d624c9921..68597fe48e552 100644 --- a/src/test/run-pass/process-remove-from-env.rs +++ b/src/test/run-pass/process-remove-from-env.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io)] + use std::old_io::Command; use std::env; diff --git a/src/test/run-pass/process-spawn-with-unicode-params.rs b/src/test/run-pass/process-spawn-with-unicode-params.rs index 72998133af19d..32448d100fb9b 100644 --- a/src/test/run-pass/process-spawn-with-unicode-params.rs +++ b/src/test/run-pass/process-spawn-with-unicode-params.rs @@ -17,6 +17,7 @@ // intact. // ignore-aarch64 +#![feature(path, fs, os, io, old_path)] use std::io::prelude::*; use std::io; diff --git a/src/test/run-pass/realloc-16687.rs b/src/test/run-pass/realloc-16687.rs index e8bcff38131a6..0b714578c66bf 100644 --- a/src/test/run-pass/realloc-16687.rs +++ b/src/test/run-pass/realloc-16687.rs @@ -13,6 +13,8 @@ // Ideally this would be revised to use no_std, but for now it serves // well enough to reproduce (and illustrate) the bug from #16687. +#![feature(alloc)] + extern crate alloc; use alloc::heap; diff --git a/src/test/run-pass/regions-copy-closure.rs b/src/test/run-pass/regions-copy-closure.rs index b39343b1f5743..ac7c76ac544db 100644 --- a/src/test/run-pass/regions-copy-closure.rs +++ b/src/test/run-pass/regions-copy-closure.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] struct closure_box<'a> { cl: Box, diff --git a/src/test/run-pass/regions-mock-tcx.rs b/src/test/run-pass/regions-mock-tcx.rs index bf789d5364500..f2e0837c6ea0e 100644 --- a/src/test/run-pass/regions-mock-tcx.rs +++ b/src/test/run-pass/regions-mock-tcx.rs @@ -15,6 +15,8 @@ // - Multiple lifetime parameters // - Arenas +#![feature(rustc_private, libc, collections)] + extern crate arena; extern crate collections; extern crate libc; diff --git a/src/test/run-pass/regions-mock-trans.rs b/src/test/run-pass/regions-mock-trans.rs index e6b997f758814..b2584e2472bf5 100644 --- a/src/test/run-pass/regions-mock-trans.rs +++ b/src/test/run-pass/regions-mock-trans.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; use std::mem; diff --git a/src/test/run-pass/regions-static-closure.rs b/src/test/run-pass/regions-static-closure.rs index 1bcde77261b93..ae39c26680894 100644 --- a/src/test/run-pass/regions-static-closure.rs +++ b/src/test/run-pass/regions-static-closure.rs @@ -10,7 +10,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] struct closure_box<'a> { cl: Box, diff --git a/src/test/run-pass/rename-directory.rs b/src/test/run-pass/rename-directory.rs index 656fe89896932..33a53e444255e 100644 --- a/src/test/run-pass/rename-directory.rs +++ b/src/test/run-pass/rename-directory.rs @@ -11,6 +11,8 @@ // This test can't be a unit test in std, // because it needs TempDir, which is in extra +#![feature(tempdir, path_ext)] + use std::ffi::CString; use std::fs::{self, TempDir, File, PathExt}; diff --git a/src/test/run-pass/running-with-no-runtime.rs b/src/test/run-pass/running-with-no-runtime.rs index abb16c39d1136..75f66d5bf2677 100644 --- a/src/test/run-pass/running-with-no-runtime.rs +++ b/src/test/run-pass/running-with-no-runtime.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(start)] +#![feature(start, os, std_misc, old_io)] use std::ffi; use std::old_io::process::{Command, ProcessOutput}; diff --git a/src/test/run-pass/rust-log-filter.rs b/src/test/run-pass/rust-log-filter.rs index 5d6657c7e12e6..44d8db075e8a7 100644 --- a/src/test/run-pass/rust-log-filter.rs +++ b/src/test/run-pass/rust-log-filter.rs @@ -11,7 +11,7 @@ // exec-env:RUST_LOG=rust-log-filter/foo #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, std_misc, rustc_private)] #[macro_use] extern crate log; diff --git a/src/test/run-pass/segfault-no-out-of-stack.rs b/src/test/run-pass/segfault-no-out-of-stack.rs index 492736c2252a0..d2842a9948548 100644 --- a/src/test/run-pass/segfault-no-out-of-stack.rs +++ b/src/test/run-pass/segfault-no-out-of-stack.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(old_io)] + use std::old_io::process::Command; use std::env; diff --git a/src/test/run-pass/send-resource.rs b/src/test/run-pass/send-resource.rs index a920d76e7ca1b..a1e28b2b261f1 100644 --- a/src/test/run-pass/send-resource.rs +++ b/src/test/run-pass/send-resource.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; use std::sync::mpsc::channel; diff --git a/src/test/run-pass/send_str_hashmap.rs b/src/test/run-pass/send_str_hashmap.rs index 33e4fa85bcb81..54214feee05d1 100644 --- a/src/test/run-pass/send_str_hashmap.rs +++ b/src/test/run-pass/send_str_hashmap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/send_str_treemap.rs b/src/test/run-pass/send_str_treemap.rs index 3390369242d13..9741d468bd264 100644 --- a/src/test/run-pass/send_str_treemap.rs +++ b/src/test/run-pass/send_str_treemap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + extern crate collections; use self::collections::BTreeMap; diff --git a/src/test/run-pass/signal-exit-status.rs b/src/test/run-pass/signal-exit-status.rs index 776d897938dd3..90bb36f25f75e 100644 --- a/src/test/run-pass/signal-exit-status.rs +++ b/src/test/run-pass/signal-exit-status.rs @@ -10,6 +10,9 @@ // ignore-windows +#![feature(old_io)] +#![feature(os)] + use std::env; use std::old_io::process::{Command, ExitSignal, ExitStatus}; diff --git a/src/test/run-pass/simd-binop.rs b/src/test/run-pass/simd-binop.rs index 779e507f43dfd..45a91abe56c45 100644 --- a/src/test/run-pass/simd-binop.rs +++ b/src/test/run-pass/simd-binop.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] use std::simd::{i32x4, f32x4, u32x4}; diff --git a/src/test/run-pass/simd-issue-10604.rs b/src/test/run-pass/simd-issue-10604.rs index 7f1be4b7d7060..bd3f8f35352f2 100644 --- a/src/test/run-pass/simd-issue-10604.rs +++ b/src/test/run-pass/simd-issue-10604.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - +#![feature(core)] #![feature(simd)] pub fn main() { diff --git a/src/test/run-pass/slice.rs b/src/test/run-pass/slice.rs index 30b53dbb0ad5b..aaa4cb27f8d19 100644 --- a/src/test/run-pass/slice.rs +++ b/src/test/run-pass/slice.rs @@ -10,7 +10,7 @@ // Test slicing sugar. -#![feature(associated_types)] +#![feature(core)] extern crate core; use core::ops::{Index, IndexMut, Range, RangeTo, RangeFrom, RangeFull}; diff --git a/src/test/run-pass/smallest-hello-world.rs b/src/test/run-pass/smallest-hello-world.rs index 61b2fc8b50f5b..c7db8068785fe 100644 --- a/src/test/run-pass/smallest-hello-world.rs +++ b/src/test/run-pass/smallest-hello-world.rs @@ -10,7 +10,7 @@ // Smallest "hello world" with a libc runtime -#![feature(intrinsics, lang_items, start, no_std)] +#![feature(intrinsics, lang_items, start, no_std, libc)] #![no_std] extern crate libc; diff --git a/src/test/run-pass/spawn-fn.rs b/src/test/run-pass/spawn-fn.rs index c8fe400c4c3c6..4f8ba7f655ee6 100644 --- a/src/test/run-pass/spawn-fn.rs +++ b/src/test/run-pass/spawn-fn.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; fn x(s: String, n: int) { diff --git a/src/test/run-pass/stat.rs b/src/test/run-pass/stat.rs index 1ccc189dc8180..159081a0e9778 100644 --- a/src/test/run-pass/stat.rs +++ b/src/test/run-pass/stat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(tempdir, path_ext)] + use std::fs::{File, TempDir}; use std::io::prelude::*; diff --git a/src/test/run-pass/static-mut-foreign.rs b/src/test/run-pass/static-mut-foreign.rs index e5d4591361a63..6d191ba1c5861 100644 --- a/src/test/run-pass/static-mut-foreign.rs +++ b/src/test/run-pass/static-mut-foreign.rs @@ -12,6 +12,8 @@ // statics cannot. This ensures that there's some form of error if this is // attempted. +#![feature(libc)] + extern crate libc; #[link(name = "rust_test_helpers")] diff --git a/src/test/run-pass/std-sync-right-kind-impls.rs b/src/test/run-pass/std-sync-right-kind-impls.rs index d2d72ed16618d..46b70f91e71e7 100644 --- a/src/test/run-pass/std-sync-right-kind-impls.rs +++ b/src/test/run-pass/std-sync-right-kind-impls.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc, alloc)] + use std::sync; fn assert_both() {} diff --git a/src/test/run-pass/supported-cast.rs b/src/test/run-pass/supported-cast.rs index 3fffef060a1b4..7f705146aaa12 100644 --- a/src/test/run-pass/supported-cast.rs +++ b/src/test/run-pass/supported-cast.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc)] + extern crate libc; pub fn main() { diff --git a/src/test/run-pass/syntax-extension-source-utils.rs b/src/test/run-pass/syntax-extension-source-utils.rs index 684ca7fa2b62d..b3f503aad3444 100644 --- a/src/test/run-pass/syntax-extension-source-utils.rs +++ b/src/test/run-pass/syntax-extension-source-utils.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + // This test is brittle! // ignore-pretty - the pretty tests lose path information, breaking include! @@ -22,9 +24,9 @@ pub mod m1 { macro_rules! indirect_line { () => ( line!() ) } pub fn main() { - assert_eq!(line!(), 25); + assert_eq!(line!(), 27); assert!((column!() == 4)); - assert_eq!(indirect_line!(), 27); + assert_eq!(indirect_line!(), 29); assert!((file!().ends_with("syntax-extension-source-utils.rs"))); assert_eq!(stringify!((2*3) + 5).to_string(), "( 2 * 3 ) + 5".to_string()); assert!(include!("syntax-extension-source-utils-files/includeme.\ @@ -42,7 +44,7 @@ pub fn main() { // The Windows tests are wrapped in an extra module for some reason assert!((m1::m2::where_am_i().ends_with("m1::m2"))); - assert!(match (45, "( 2 * 3 ) + 5") { + assert!(match (47, "( 2 * 3 ) + 5") { (line!(), stringify!((2*3) + 5)) => true, _ => false }) diff --git a/src/test/run-pass/syntax-trait-polarity.rs b/src/test/run-pass/syntax-trait-polarity.rs index 340ad2a531a73..544234046eb07 100644 --- a/src/test/run-pass/syntax-trait-polarity.rs +++ b/src/test/run-pass/syntax-trait-polarity.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(optin_builtin_traits)] +#![feature(optin_builtin_traits, core)] use std::marker::{MarkerTrait, Send}; diff --git a/src/test/run-pass/task-comm-0.rs b/src/test/run-pass/task-comm-0.rs index 78826666f53ff..a24d61c8ceaf9 100644 --- a/src/test/run-pass/task-comm-0.rs +++ b/src/test/run-pass/task-comm-0.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/task-comm-1.rs b/src/test/run-pass/task-comm-1.rs index 180f6e09ba99b..e882d8506fc65 100644 --- a/src/test/run-pass/task-comm-1.rs +++ b/src/test/run-pass/task-comm-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; pub fn main() { test00(); } diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs index 60af3afec2b3d..99eebdb601a29 100644 --- a/src/test/run-pass/task-comm-10.rs +++ b/src/test/run-pass/task-comm-10.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs index 1740c49c7720b..c33872e30c41c 100644 --- a/src/test/run-pass/task-comm-11.rs +++ b/src/test/run-pass/task-comm-11.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::sync::mpsc::{channel, Sender}; use std::thread::Thread; diff --git a/src/test/run-pass/task-comm-12.rs b/src/test/run-pass/task-comm-12.rs index 08dce2a76489b..ff6d959327d03 100644 --- a/src/test/run-pass/task-comm-12.rs +++ b/src/test/run-pass/task-comm-12.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; pub fn main() { test00(); } diff --git a/src/test/run-pass/task-comm-13.rs b/src/test/run-pass/task-comm-13.rs index 429c6ce9fb371..1f7da10252bd5 100644 --- a/src/test/run-pass/task-comm-13.rs +++ b/src/test/run-pass/task-comm-13.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::sync::mpsc::{channel, Sender}; use std::thread::Thread; diff --git a/src/test/run-pass/task-comm-14.rs b/src/test/run-pass/task-comm-14.rs index 0735e3996eec1..785df73317aa1 100644 --- a/src/test/run-pass/task-comm-14.rs +++ b/src/test/run-pass/task-comm-14.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::sync::mpsc::{channel, Sender}; use std::thread::Thread; diff --git a/src/test/run-pass/task-comm-15.rs b/src/test/run-pass/task-comm-15.rs index 28eea784f361c..e9ae3d2a25ad4 100644 --- a/src/test/run-pass/task-comm-15.rs +++ b/src/test/run-pass/task-comm-15.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::sync::mpsc::{channel, Sender}; use std::thread::Thread; diff --git a/src/test/run-pass/task-comm-17.rs b/src/test/run-pass/task-comm-17.rs index 9db5465f7e96e..f5ca52ba4b6b6 100644 --- a/src/test/run-pass/task-comm-17.rs +++ b/src/test/run-pass/task-comm-17.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + // Issue #922 // This test is specifically about spawning temporary closures. diff --git a/src/test/run-pass/task-comm-3.rs b/src/test/run-pass/task-comm-3.rs index 902829468381d..bb0749eb8c005 100644 --- a/src/test/run-pass/task-comm-3.rs +++ b/src/test/run-pass/task-comm-3.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + // no-pretty-expanded FIXME #15189 use std::thread::Thread; diff --git a/src/test/run-pass/task-comm-7.rs b/src/test/run-pass/task-comm-7.rs index 6f3b47b8bfa7a..263ad0e4c0210 100644 --- a/src/test/run-pass/task-comm-7.rs +++ b/src/test/run-pass/task-comm-7.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] #![allow(dead_assignment)] use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/task-comm-9.rs b/src/test/run-pass/task-comm-9.rs index 6d8de4a6a53d6..81d9148955a64 100644 --- a/src/test/run-pass/task-comm-9.rs +++ b/src/test/run-pass/task-comm-9.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/task-life-0.rs b/src/test/run-pass/task-life-0.rs index 3f229926480a9..462b38f6598ff 100644 --- a/src/test/run-pass/task-life-0.rs +++ b/src/test/run-pass/task-life-0.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; pub fn main() { diff --git a/src/test/run-pass/task-spawn-move-and-copy.rs b/src/test/run-pass/task-spawn-move-and-copy.rs index 46f9e991347e4..eb6bec9a092a6 100644 --- a/src/test/run-pass/task-spawn-move-and-copy.rs +++ b/src/test/run-pass/task-spawn-move-and-copy.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, std_misc)] use std::thread::Thread; use std::sync::mpsc::channel; diff --git a/src/test/run-pass/task-stderr.rs b/src/test/run-pass/task-stderr.rs index 3131cda1dbc3a..824d240568f19 100644 --- a/src/test/run-pass/task-stderr.rs +++ b/src/test/run-pass/task-stderr.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, old_io, std_misc, io, set_panic, set_stdio)] use std::io::prelude::*; use std::io; diff --git a/src/test/run-pass/tcp-accept-stress.rs b/src/test/run-pass/tcp-accept-stress.rs index b87718ba4680c..5633ef2ecfc9b 100644 --- a/src/test/run-pass/tcp-accept-stress.rs +++ b/src/test/run-pass/tcp-accept-stress.rs @@ -13,6 +13,8 @@ // quite quickly and it takes a few seconds for the sockets to get // recycled. +#![feature(old_io, io, std_misc)] + use std::old_io::{TcpListener, Listener, Acceptor, EndOfFile, TcpStream}; use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/src/test/run-pass/tcp-connect-timeouts.rs b/src/test/run-pass/tcp-connect-timeouts.rs index 5462a996f73d9..a9a16cd72dff7 100644 --- a/src/test/run-pass/tcp-connect-timeouts.rs +++ b/src/test/run-pass/tcp-connect-timeouts.rs @@ -19,6 +19,7 @@ #![reexport_test_harness_main = "test_main"] #![allow(unused_imports)] +#![feature(old_io, std_misc, io)] use std::old_io::*; use std::old_io::test::*; diff --git a/src/test/run-pass/tempfile.rs b/src/test/run-pass/tempfile.rs index bc655837babb9..74290518364d0 100644 --- a/src/test/run-pass/tempfile.rs +++ b/src/test/run-pass/tempfile.rs @@ -18,6 +18,8 @@ // they're in a different location than before. Hence, these tests are all run // serially here. +#![feature(old_io, old_path, os, old_fs)] + use std::old_path::{Path, GenericPath}; use std::old_io::fs::PathExtensions; use std::old_io::{fs, TempDir}; diff --git a/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs b/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs index df3c9a0f119ec..d58b5d3a00fec 100644 --- a/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs +++ b/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(test)] + // compile-flags: --test // no-pretty-expanded extern crate test; diff --git a/src/test/run-pass/threads.rs b/src/test/run-pass/threads.rs index abc2938df00bb..436fb1fe9b5d2 100644 --- a/src/test/run-pass/threads.rs +++ b/src/test/run-pass/threads.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(std_misc)] + use std::thread::Thread; pub fn main() { diff --git a/src/test/run-pass/trait-bounds-basic.rs b/src/test/run-pass/trait-bounds-basic.rs index ed25bf8b02e88..cc2347fb5f30d 100644 --- a/src/test/run-pass/trait-bounds-basic.rs +++ b/src/test/run-pass/trait-bounds-basic.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] trait Foo : ::std::marker::MarkerTrait { } diff --git a/src/test/run-pass/trait-bounds-in-arc.rs b/src/test/run-pass/trait-bounds-in-arc.rs index cf23785b84448..d278297646380 100644 --- a/src/test/run-pass/trait-bounds-in-arc.rs +++ b/src/test/run-pass/trait-bounds-in-arc.rs @@ -14,7 +14,7 @@ // ignore-pretty #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, std_misc)] #![feature(unboxed_closures)] use std::sync::Arc; diff --git a/src/test/run-pass/trait-bounds-on-structs-and-enums.rs b/src/test/run-pass/trait-bounds-on-structs-and-enums.rs index 976120908b27a..6d080adbe63a5 100644 --- a/src/test/run-pass/trait-bounds-on-structs-and-enums.rs +++ b/src/test/run-pass/trait-bounds-on-structs-and-enums.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + trait U : ::std::marker::MarkerTrait {} trait T { fn get(self) -> X; } diff --git a/src/test/run-pass/trait-bounds-recursion.rs b/src/test/run-pass/trait-bounds-recursion.rs index 7135dad7d190c..d10e098f9d6fa 100644 --- a/src/test/run-pass/trait-bounds-recursion.rs +++ b/src/test/run-pass/trait-bounds-recursion.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + trait I { fn i(&self) -> Self; } trait A : ::std::marker::MarkerTrait { diff --git a/src/test/run-pass/trait-coercion.rs b/src/test/run-pass/trait-coercion.rs index d1af6b746ac42..6f2fc8ba79aea 100644 --- a/src/test/run-pass/trait-coercion.rs +++ b/src/test/run-pass/trait-coercion.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(box_syntax)] +#![allow(unknown_features)] +#![feature(box_syntax, old_io, io)] use std::io::{self, Write}; diff --git a/src/test/run-pass/trait-inheritance-num.rs b/src/test/run-pass/trait-inheritance-num.rs index 5fb28eb9d8dd2..251223e30fbb1 100644 --- a/src/test/run-pass/trait-inheritance-num.rs +++ b/src/test/run-pass/trait-inheritance-num.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::cmp::{PartialEq, PartialOrd}; use std::num::NumCast; diff --git a/src/test/run-pass/trait-inheritance-num0.rs b/src/test/run-pass/trait-inheritance-num0.rs index 183d6659062fe..8de226b73453d 100644 --- a/src/test/run-pass/trait-inheritance-num0.rs +++ b/src/test/run-pass/trait-inheritance-num0.rs @@ -10,6 +10,8 @@ // Extending Num and using inherited static methods +#![feature(core)] + use std::cmp::PartialOrd; use std::num::NumCast; diff --git a/src/test/run-pass/trait-inheritance-num1.rs b/src/test/run-pass/trait-inheritance-num1.rs index 15fb5df46264a..33b31a98599a3 100644 --- a/src/test/run-pass/trait-inheritance-num1.rs +++ b/src/test/run-pass/trait-inheritance-num1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::cmp::PartialOrd; use std::num::NumCast; diff --git a/src/test/run-pass/trait-inheritance-num2.rs b/src/test/run-pass/trait-inheritance-num2.rs index 1fb28c50652b4..df751a6d00461 100644 --- a/src/test/run-pass/trait-inheritance-num2.rs +++ b/src/test/run-pass/trait-inheritance-num2.rs @@ -10,6 +10,8 @@ // A more complex example of numeric extensions +#![feature(core)] + use std::cmp::{PartialEq, PartialOrd}; use std::num::NumCast; diff --git a/src/test/run-pass/trait-inheritance-num3.rs b/src/test/run-pass/trait-inheritance-num3.rs index 09015d983ea7c..b5cf25bc5a8f4 100644 --- a/src/test/run-pass/trait-inheritance-num3.rs +++ b/src/test/run-pass/trait-inheritance-num3.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::cmp::{PartialEq, PartialOrd}; use std::num::NumCast; diff --git a/src/test/run-pass/trait-inheritance-num5.rs b/src/test/run-pass/trait-inheritance-num5.rs index a21026839a7c1..acd60cea61f88 100644 --- a/src/test/run-pass/trait-inheritance-num5.rs +++ b/src/test/run-pass/trait-inheritance-num5.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + use std::cmp::PartialEq; use std::num::NumCast; diff --git a/src/test/run-pass/trait-inheritance-static2.rs b/src/test/run-pass/trait-inheritance-static2.rs index 8f3b325a513fe..caedaf35737e3 100644 --- a/src/test/run-pass/trait-inheritance-static2.rs +++ b/src/test/run-pass/trait-inheritance-static2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] + pub trait MyEq : ::std::marker::MarkerTrait { } pub trait MyNum : ::std::marker::MarkerTrait { diff --git a/src/test/run-pass/tydesc-name.rs b/src/test/run-pass/tydesc-name.rs index 2e7717fcfe154..2e8adfe508bb3 100644 --- a/src/test/run-pass/tydesc-name.rs +++ b/src/test/run-pass/tydesc-name.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(core)] use std::intrinsics::type_name; diff --git a/src/test/run-pass/type-id-higher-rank.rs b/src/test/run-pass/type-id-higher-rank.rs index d33ebeadba86e..e4d7d29205669 100644 --- a/src/test/run-pass/type-id-higher-rank.rs +++ b/src/test/run-pass/type-id-higher-rank.rs @@ -11,7 +11,7 @@ // Test that type IDs correctly account for higher-rank lifetimes // Also acts as a regression test for an ICE (issue #19791) -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::any::TypeId; diff --git a/src/test/run-pass/typeid-intrinsic.rs b/src/test/run-pass/typeid-intrinsic.rs index a251fcc732720..fd42521410010 100644 --- a/src/test/run-pass/typeid-intrinsic.rs +++ b/src/test/run-pass/typeid-intrinsic.rs @@ -11,6 +11,8 @@ // aux-build:typeid-intrinsic.rs // aux-build:typeid-intrinsic2.rs +#![feature(hash, core)] + extern crate "typeid-intrinsic" as other1; extern crate "typeid-intrinsic2" as other2; diff --git a/src/test/run-pass/ufcs-polymorphic-paths.rs b/src/test/run-pass/ufcs-polymorphic-paths.rs index 29b1c8f81d3c6..1197e7c1414eb 100644 --- a/src/test/run-pass/ufcs-polymorphic-paths.rs +++ b/src/test/run-pass/ufcs-polymorphic-paths.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(macro_rules)] +#![feature(collections, rand)] use std::borrow::{Cow, IntoCow}; use std::collections::BitVec; diff --git a/src/test/run-pass/unboxed-closures-extern-fn-hr.rs b/src/test/run-pass/unboxed-closures-extern-fn-hr.rs index 6a071f6a4c51f..774aed71ec8ca 100644 --- a/src/test/run-pass/unboxed-closures-extern-fn-hr.rs +++ b/src/test/run-pass/unboxed-closures-extern-fn-hr.rs @@ -10,7 +10,7 @@ // Checks that higher-ranked extern fn pointers implement the full range of Fn traits. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::ops::{Fn,FnMut,FnOnce}; diff --git a/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs b/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs index 0aab5be2877e1..9f211e6d60071 100644 --- a/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs +++ b/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs @@ -11,8 +11,7 @@ // Checks that the Fn trait hierarchy rules permit // any Fn trait to be used where Fn is implemented. -#![feature(unboxed_closures)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::ops::{Fn,FnMut,FnOnce}; diff --git a/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs b/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs index a8bb091893271..33b1a2d5470be 100644 --- a/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs +++ b/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs @@ -11,8 +11,7 @@ // Checks that the Fn trait hierarchy rules permit // FnMut or FnOnce to be used where FnMut is implemented. -#![feature(unboxed_closures)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::ops::{FnMut,FnOnce}; diff --git a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs index 56de15961101f..2b5b5f7f7076d 100644 --- a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs +++ b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs @@ -11,7 +11,7 @@ // Test that we are able to infer that the type of `x` is `int` based // on the expected type from the object. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::num::ToPrimitive; diff --git a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs index c74ed665e7a07..85b17d4b4d87e 100644 --- a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs +++ b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs @@ -11,7 +11,7 @@ // Test that we are able to infer that the type of `x` is `int` based // on the expected type from the object. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::num::ToPrimitive; diff --git a/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs b/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs index a61dd095a0d4d..f962a435020c0 100644 --- a/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs +++ b/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs @@ -11,7 +11,7 @@ // Test that we are able to infer that the type of `x` is `int` based // on the expected type from the object. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::num::ToPrimitive; diff --git a/src/test/run-pass/unboxed-closures-manual-impl.rs b/src/test/run-pass/unboxed-closures-manual-impl.rs index f1b79a1829eab..f2c278c298853 100644 --- a/src/test/run-pass/unboxed-closures-manual-impl.rs +++ b/src/test/run-pass/unboxed-closures-manual-impl.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-monomorphization.rs b/src/test/run-pass/unboxed-closures-monomorphization.rs index 056ae63b68488..e221811948c3b 100644 --- a/src/test/run-pass/unboxed-closures-monomorphization.rs +++ b/src/test/run-pass/unboxed-closures-monomorphization.rs @@ -13,7 +13,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] fn main(){ fn bar<'a, T:Clone+'a> (t: T) -> BoxT + 'a> { diff --git a/src/test/run-pass/unboxed-closures-prelude.rs b/src/test/run-pass/unboxed-closures-prelude.rs index 4ed3fa5ca2dac..61070abdcbe5b 100644 --- a/src/test/run-pass/unboxed-closures-prelude.rs +++ b/src/test/run-pass/unboxed-closures-prelude.rs @@ -12,7 +12,7 @@ #![allow(unknown_features)] #![feature(box_syntax)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, core)] fn main() { // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. diff --git a/src/test/run-pass/unfold-cross-crate.rs b/src/test/run-pass/unfold-cross-crate.rs index 2af38047264fc..4ad3f0e591b88 100644 --- a/src/test/run-pass/unfold-cross-crate.rs +++ b/src/test/run-pass/unfold-cross-crate.rs @@ -10,6 +10,8 @@ // no-pretty-expanded FIXME #15189 +#![feature(core)] + use std::iter::Unfold; // Unfold had a bug with 'a that mean it didn't work diff --git a/src/test/run-pass/unit-like-struct-drop-run.rs b/src/test/run-pass/unit-like-struct-drop-run.rs index 66cc8d658c0a6..b035cb89c3649 100644 --- a/src/test/run-pass/unit-like-struct-drop-run.rs +++ b/src/test/run-pass/unit-like-struct-drop-run.rs @@ -10,6 +10,8 @@ // Make sure the destructor is run for unit-like structs. +#![feature(alloc)] + use std::boxed::BoxAny; use std::thread; diff --git a/src/test/run-pass/unsized3.rs b/src/test/run-pass/unsized3.rs index f9185cd2642ee..de5e356f8cd5b 100644 --- a/src/test/run-pass/unsized3.rs +++ b/src/test/run-pass/unsized3.rs @@ -11,7 +11,7 @@ // Test structs with always-unsized fields. #![allow(unknown_features)] -#![feature(box_syntax)] +#![feature(box_syntax, core)] use std::mem; use std::raw; diff --git a/src/test/run-pass/utf8_chars.rs b/src/test/run-pass/utf8_chars.rs index c54b3b69c6880..45a3f2327aaa6 100644 --- a/src/test/run-pass/utf8_chars.rs +++ b/src/test/run-pass/utf8_chars.rs @@ -10,6 +10,8 @@ // // ignore-lexer-test FIXME #15679 +#![feature(collections, core, str_char)] + use std::str; pub fn main() { diff --git a/src/test/run-pass/variadic-ffi.rs b/src/test/run-pass/variadic-ffi.rs index 60d617822cd7f..badd8b898775a 100644 --- a/src/test/run-pass/variadic-ffi.rs +++ b/src/test/run-pass/variadic-ffi.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc, std_misc)] + extern crate libc; use std::ffi::{self, CString}; diff --git a/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs b/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs index 948d68e0ccd7d..fe1deba7b0d01 100644 --- a/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs +++ b/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs @@ -14,6 +14,7 @@ // common intersection. #![allow(dead_code)] +#![feature(core)] struct List<'l> { field1: &'l i32, diff --git a/src/test/run-pass/variance-vec-covariant.rs b/src/test/run-pass/variance-vec-covariant.rs index caec6df5a4d81..9e98ca0be3b14 100644 --- a/src/test/run-pass/variance-vec-covariant.rs +++ b/src/test/run-pass/variance-vec-covariant.rs @@ -11,6 +11,7 @@ // Test that vec is now covariant in its argument type. #![allow(dead_code)] +#![feature(core)] fn foo<'a,'b>(v1: Vec<&'a i32>, v2: Vec<&'b i32>) -> i32 { bar(v1, v2).cloned().unwrap_or(0) // only type checks if we can intersect 'a and 'b diff --git a/src/test/run-pass/vec-concat.rs b/src/test/run-pass/vec-concat.rs index 64c4c17386b32..870d48213c74c 100644 --- a/src/test/run-pass/vec-concat.rs +++ b/src/test/run-pass/vec-concat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + use std::vec; pub fn main() { diff --git a/src/test/run-pass/vec-macro-no-std.rs b/src/test/run-pass/vec-macro-no-std.rs index 47b87fce2abaf..a0e789674d239 100644 --- a/src/test/run-pass/vec-macro-no-std.rs +++ b/src/test/run-pass/vec-macro-no-std.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(lang_items, start, no_std)] +#![feature(lang_items, start, no_std, core, libc, collections)] #![no_std] extern crate "std" as other; diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass/vector-sort-panic-safe.rs index a6f4b8299cb68..c029aa234488f 100644 --- a/src/test/run-pass/vector-sort-panic-safe.rs +++ b/src/test/run-pass/vector-sort-panic-safe.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(rand, core)] + use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; use std::rand::{thread_rng, Rng, Rand}; use std::thread; diff --git a/src/test/run-pass/wait-forked-but-failed-child.rs b/src/test/run-pass/wait-forked-but-failed-child.rs index dcbecb859e537..5637263e93592 100644 --- a/src/test/run-pass/wait-forked-but-failed-child.rs +++ b/src/test/run-pass/wait-forked-but-failed-child.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(libc, old_io)] + extern crate libc; use std::old_io::process::Command; diff --git a/src/test/run-pass/while-let.rs b/src/test/run-pass/while-let.rs index 1780445fb3b2d..e2352002c033b 100644 --- a/src/test/run-pass/while-let.rs +++ b/src/test/run-pass/while-let.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + use std::collections::BinaryHeap; fn make_pq() -> BinaryHeap { diff --git a/src/test/run-pass/while-prelude-drop.rs b/src/test/run-pass/while-prelude-drop.rs index bfabcb4d87b56..84808fff0fa72 100644 --- a/src/test/run-pass/while-prelude-drop.rs +++ b/src/test/run-pass/while-prelude-drop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(collections)] + use std::string::String; #[derive(PartialEq)] From e9019101a82dd7f61dcdcd52bcc0123d5ed25d22 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 13 Mar 2015 15:28:35 -0700 Subject: [PATCH 57/69] Add #![feature] attributes to doctests --- src/doc/reference.md | 6 ++-- src/doc/trpl/concurrency.md | 5 +++ src/doc/trpl/ffi.md | 8 +++++ src/doc/trpl/iterators.md | 2 ++ src/doc/trpl/method-syntax.md | 3 ++ src/doc/trpl/more-strings.md | 1 + src/doc/trpl/standard-input.md | 4 ++- src/doc/trpl/testing.md | 2 ++ src/doc/trpl/traits.md | 6 ++++ src/doc/trpl/unsafe.md | 5 +++ src/liballoc/arc.rs | 8 +++++ src/liballoc/boxed.rs | 3 ++ src/liballoc/lib.rs | 1 + src/liballoc/rc.rs | 12 +++++++ src/libcollections/binary_heap.rs | 8 +++++ src/libcollections/bit.rs | 45 ++++++++++++++++++++++++ src/libcollections/btree/map.rs | 5 +++ src/libcollections/btree/set.rs | 11 ++++++ src/libcollections/fmt.rs | 3 ++ src/libcollections/lib.rs | 1 + src/libcollections/linked_list.rs | 7 ++++ src/libcollections/slice.rs | 9 +++++ src/libcollections/str.rs | 15 ++++++++ src/libcollections/string.rs | 12 +++++++ src/libcollections/vec.rs | 11 ++++++ src/libcollections/vec_deque.rs | 15 ++++++++ src/libcollections/vec_map.rs | 21 +++++++++++ src/libcore/cell.rs | 1 + src/libcore/cmp.rs | 7 +++- src/libcore/error.rs | 1 + src/libcore/finally.rs | 2 ++ src/libcore/fmt/mod.rs | 4 +++ src/libcore/fmt/num.rs | 1 + src/libcore/hash/mod.rs | 2 ++ src/libcore/intrinsics.rs | 2 ++ src/libcore/iter.rs | 22 ++++++++++-- src/libcore/lib.rs | 1 + src/libcore/macros.rs | 1 + src/libcore/marker.rs | 1 + src/libcore/num/f32.rs | 3 +- src/libcore/num/f64.rs | 3 +- src/libcore/num/mod.rs | 22 ++++++++++++ src/libcore/option.rs | 4 +++ src/libcore/ptr.rs | 2 ++ src/libcore/raw.rs | 2 ++ src/libcore/result.rs | 9 +++++ src/libcore/simd.rs | 2 +- src/libcore/slice.rs | 1 + src/libgraphviz/lib.rs | 3 ++ src/liblibc/lib.rs | 2 +- src/librand/distributions/exponential.rs | 1 + src/librand/distributions/gamma.rs | 4 +++ src/librand/distributions/mod.rs | 1 + src/librand/distributions/normal.rs | 2 ++ src/librand/distributions/range.rs | 1 + src/librand/lib.rs | 12 +++++++ src/librand/reseeding.rs | 1 + src/librustc_bitflags/lib.rs | 2 ++ src/librustdoc/test.rs | 2 +- src/libserialize/hex.rs | 2 ++ src/libstd/collections/hash/map.rs | 3 ++ src/libstd/collections/hash/set.rs | 10 ++++++ src/libstd/collections/mod.rs | 2 ++ src/libstd/ffi/c_str.rs | 6 ++++ src/libstd/fs/mod.rs | 2 ++ src/libstd/lib.rs | 1 + src/libstd/macros.rs | 1 + src/libstd/net/addr.rs | 1 + src/libstd/net/mod.rs | 1 + src/libstd/net/tcp.rs | 2 ++ src/libstd/net/udp.rs | 1 + src/libstd/num/f32.rs | 43 ++++++++++++++++++++++ src/libstd/num/f64.rs | 41 +++++++++++++++++++++ src/libstd/num/mod.rs | 41 +++++++++++++++++++++ src/libstd/old_io/buffered.rs | 3 ++ src/libstd/old_io/comm_adapters.rs | 2 ++ src/libstd/old_io/fs.rs | 12 +++++++ src/libstd/old_io/mem.rs | 4 +++ src/libstd/old_io/mod.rs | 14 ++++++++ src/libstd/old_io/net/ip.rs | 1 + src/libstd/old_io/net/pipe.rs | 2 ++ src/libstd/old_io/net/tcp.rs | 5 +++ src/libstd/old_io/net/udp.rs | 1 + src/libstd/old_io/pipe.rs | 1 + src/libstd/old_io/process.rs | 5 +++ src/libstd/old_io/stdio.rs | 2 ++ src/libstd/old_io/tempfile.rs | 1 + src/libstd/old_io/timer.rs | 6 ++++ src/libstd/old_path/mod.rs | 32 +++++++++++++++++ src/libstd/old_path/windows.rs | 2 ++ src/libstd/os.rs | 13 +++++++ src/libstd/rand/mod.rs | 7 ++++ src/libstd/rand/reader.rs | 1 + src/libstd/sync/condvar.rs | 1 + src/libstd/sync/future.rs | 1 + src/libstd/sync/mpsc/mod.rs | 2 ++ src/libstd/sync/mpsc/select.rs | 2 ++ src/libstd/sync/mutex.rs | 2 ++ src/libstd/sync/rwlock.rs | 1 + src/libstd/sync/semaphore.rs | 1 + src/libstd/sync/task_pool.rs | 1 + src/libstd/thread_local/scoped.rs | 3 ++ src/libterm/lib.rs | 1 + src/libunicode/char.rs | 4 +++ src/libunicode/lib.rs | 1 + src/libunicode/u_str.rs | 25 +++++++------ src/test/pretty/default-trait-impl.rs | 2 +- 107 files changed, 649 insertions(+), 22 deletions(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index 415ec4e4fbf0a..07df3bdad3490 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -816,8 +816,7 @@ may optionally begin with any number of `attributes` that apply to the containing module. Attributes on the anonymous crate module define important metadata that influences the behavior of the compiler. -```{.rust} -# #![allow(unused_attribute)] +```no_run // Crate name #![crate_name = "projx"] @@ -1020,6 +1019,7 @@ Use declarations support a number of convenient shortcuts: An example of `use` declarations: ``` +# #![feature(core)] use std::iter::range_step; use std::option::Option::{Some, None}; use std::collections::hash_map::{self, HashMap}; @@ -1080,6 +1080,7 @@ declarations. An example of what will and will not work for `use` items: ``` +# #![feature(core)] # #![allow(unused_imports)] use foo::core::iter; // good: foo is at the root of the crate use foo::baz::foobaz; // good: foo is at the root of the crate @@ -1781,6 +1782,7 @@ functions, with the exception that they may not have a body and are instead terminated by a semicolon. ``` +# #![feature(libc)] extern crate libc; use libc::{c_char, FILE}; diff --git a/src/doc/trpl/concurrency.md b/src/doc/trpl/concurrency.md index 4a16db63950dd..9c86d2d3b84a0 100644 --- a/src/doc/trpl/concurrency.md +++ b/src/doc/trpl/concurrency.md @@ -88,6 +88,7 @@ When `guard` goes out of scope, it will block execution until the thread is finished. If we didn't want this behaviour, we could use `thread::spawn()`: ``` +# #![feature(old_io, std_misc)] use std::thread; use std::old_io::timer; use std::time::Duration; @@ -146,6 +147,7 @@ As an example, here is a Rust program that would have a data race in many languages. It will not compile: ```ignore +# #![feature(old_io, std_misc)] use std::thread; use std::old_io::timer; use std::time::Duration; @@ -185,6 +187,7 @@ only one person at a time can mutate what's inside. For that, we can use the but for a different reason: ```ignore +# #![feature(old_io, std_misc)] use std::thread; use std::old_io::timer; use std::time::Duration; @@ -229,6 +232,7 @@ guard across thread boundaries, which gives us our error. We can use `Arc` to fix this. Here's the working version: ``` +# #![feature(old_io, std_misc)] use std::sync::{Arc, Mutex}; use std::thread; use std::old_io::timer; @@ -254,6 +258,7 @@ handle is then moved into the new thread. Let's examine the body of the thread more closely: ``` +# #![feature(old_io, std_misc)] # use std::sync::{Arc, Mutex}; # use std::thread; # use std::old_io::timer; diff --git a/src/doc/trpl/ffi.md b/src/doc/trpl/ffi.md index 018f35337f3c0..695279e2d5bb6 100644 --- a/src/doc/trpl/ffi.md +++ b/src/doc/trpl/ffi.md @@ -12,6 +12,7 @@ The following is a minimal example of calling a foreign function which will compile if snappy is installed: ```no_run +# #![feature(libc)] extern crate libc; use libc::size_t; @@ -45,6 +46,7 @@ keeping the binding correct at runtime. The `extern` block can be extended to cover the entire snappy API: ```no_run +# #![feature(libc)] extern crate libc; use libc::{c_int, size_t}; @@ -80,6 +82,7 @@ length is number of elements currently contained, and the capacity is the total the allocated memory. The length is less than or equal to the capacity. ``` +# #![feature(libc)] # extern crate libc; # use libc::{c_int, size_t}; # unsafe fn snappy_validate_compressed_buffer(_: *const u8, _: size_t) -> c_int { 0 } @@ -104,6 +107,7 @@ required capacity to hold the compressed output. The vector can then be passed t the true length after compression for setting the length. ``` +# #![feature(libc)] # extern crate libc; # use libc::{size_t, c_int}; # unsafe fn snappy_compress(a: *const u8, b: size_t, c: *mut u8, @@ -130,6 +134,7 @@ Decompression is similar, because snappy stores the uncompressed size as part of format and `snappy_uncompressed_length` will retrieve the exact buffer size required. ``` +# #![feature(libc)] # extern crate libc; # use libc::{size_t, c_int}; # unsafe fn snappy_uncompress(compressed: *const u8, @@ -408,6 +413,7 @@ global state. In order to access these variables, you declare them in `extern` blocks with the `static` keyword: ```no_run +# #![feature(libc)] extern crate libc; #[link(name = "readline")] @@ -426,6 +432,7 @@ interface. To do this, statics can be declared with `mut` so we can mutate them. ```no_run +# #![feature(libc)] extern crate libc; use std::ffi::CString; @@ -458,6 +465,7 @@ calling foreign functions. Some foreign functions, most notably the Windows API, conventions. Rust provides a way to tell the compiler which convention to use: ``` +# #![feature(libc)] extern crate libc; #[cfg(all(target_os = "win32", target_arch = "x86"))] diff --git a/src/doc/trpl/iterators.md b/src/doc/trpl/iterators.md index 33dc1ba07ca86..8d7b1c3bd8393 100644 --- a/src/doc/trpl/iterators.md +++ b/src/doc/trpl/iterators.md @@ -246,6 +246,7 @@ These two basic iterators should serve you well. There are some more advanced iterators, including ones that are infinite. Like `count`: ```rust +# #![feature(core)] std::iter::count(1, 5); ``` @@ -294,6 +295,7 @@ has no side effect on the original iterator. Let's try it out with our infinite iterator from before, `count()`: ```rust +# #![feature(core)] for i in std::iter::count(1, 5).take(5) { println!("{}", i); } diff --git a/src/doc/trpl/method-syntax.md b/src/doc/trpl/method-syntax.md index 0ca42c3b12db2..8cb16f7ab3340 100644 --- a/src/doc/trpl/method-syntax.md +++ b/src/doc/trpl/method-syntax.md @@ -23,6 +23,7 @@ the ability to use this *method call syntax* via the `impl` keyword. Here's how it works: ```{rust} +# #![feature(core)] struct Circle { x: f64, y: f64, @@ -87,6 +88,7 @@ original example, `foo.bar().baz()`? This is called 'method chaining', and we can do it by returning `self`. ``` +# #![feature(core)] struct Circle { x: f64, y: f64, @@ -164,6 +166,7 @@ have method overloading, named arguments, or variable arguments. We employ the builder pattern instead. It looks like this: ``` +# #![feature(core)] struct Circle { x: f64, y: f64, diff --git a/src/doc/trpl/more-strings.md b/src/doc/trpl/more-strings.md index 6567cd448f998..4b2281badd7ae 100644 --- a/src/doc/trpl/more-strings.md +++ b/src/doc/trpl/more-strings.md @@ -148,6 +148,7 @@ Rust provides iterators for each of these situations: Usually, the `graphemes()` method on `&str` is what you want: ``` +# #![feature(unicode)] let s = "u͔n͈̰̎i̙̮͚̦c͚̉o̼̩̰͗d͔̆̓ͥé"; for l in s.graphemes(true) { diff --git a/src/doc/trpl/standard-input.md b/src/doc/trpl/standard-input.md index 794b1df7563de..0ef286ac06914 100644 --- a/src/doc/trpl/standard-input.md +++ b/src/doc/trpl/standard-input.md @@ -5,7 +5,7 @@ we haven't seen before. Here's a simple program that reads some input, and then prints it back out: ```{rust,ignore} -fn main() { +corefn main() { println!("Type something!"); let input = std::old_io::stdin().read_line().ok().expect("Failed to read line"); @@ -28,6 +28,7 @@ Since writing the fully qualified name all the time is annoying, we can use the `use` statement to import it in: ```{rust} +# #![feature(old_io)] use std::old_io::stdin; stdin(); @@ -37,6 +38,7 @@ However, it's considered better practice to not import individual functions, but to import the module, and only use one level of qualification: ```{rust} +# #![feature(old_io)] use std::old_io; old_io::stdin(); diff --git a/src/doc/trpl/testing.md b/src/doc/trpl/testing.md index 72e9ec9f7509a..8fb08e1c6cfde 100644 --- a/src/doc/trpl/testing.md +++ b/src/doc/trpl/testing.md @@ -546,6 +546,8 @@ is an opaque "black box" to the optimizer and so forces it to consider any argument as used. ```rust +# #![feature(test)] + extern crate test; # fn main() { diff --git a/src/doc/trpl/traits.md b/src/doc/trpl/traits.md index 676f1cc425ad4..fe26fc5e1eb20 100644 --- a/src/doc/trpl/traits.md +++ b/src/doc/trpl/traits.md @@ -4,6 +4,7 @@ Do you remember the `impl` keyword, used to call a function with method syntax? ```{rust} +# #![feature(core)] struct Circle { x: f64, y: f64, @@ -21,6 +22,7 @@ Traits are similar, except that we define a trait with just the method signature, then implement the trait for that struct. Like this: ```{rust} +# #![feature(core)] struct Circle { x: f64, y: f64, @@ -84,6 +86,7 @@ which implements `HasArea` will have an `.area()` method. Here's an extended example of how this works: ```{rust} +# #![feature(core)] trait HasArea { fn area(&self) -> f64; } @@ -225,6 +228,7 @@ If we add a `use` line right above `main` and make the right things public, everything is fine: ```{rust} +# #![feature(core)] use shapes::HasArea; mod shapes { @@ -408,6 +412,7 @@ but instead, we found a floating-point variable. We need a different bound. `Flo to the rescue: ``` +# #![feature(std_misc)] use std::num::Float; fn inverse(x: T) -> Result { @@ -423,6 +428,7 @@ from the `Float` trait. Both `f32` and `f64` implement `Float`, so our function works just fine: ``` +# #![feature(std_misc)] # use std::num::Float; # fn inverse(x: T) -> Result { # if x == Float::zero() { return Err("x cannot be zero!".to_string()) } diff --git a/src/doc/trpl/unsafe.md b/src/doc/trpl/unsafe.md index 11f0b8e1ddbf9..2116976d55a4d 100644 --- a/src/doc/trpl/unsafe.md +++ b/src/doc/trpl/unsafe.md @@ -187,6 +187,7 @@ As an example, we give a reimplementation of owned boxes by wrapping reimplementation is as safe as the `Box` type. ``` +# #![feature(libc)] #![feature(unsafe_destructor)] extern crate libc; @@ -443,6 +444,7 @@ The function marked `#[start]` is passed the command line parameters in the same format as C: ``` +# #![feature(libc)] #![feature(lang_items, start, no_std)] #![no_std] @@ -470,6 +472,7 @@ correct ABI and the correct name, which requires overriding the compiler's name mangling too: ```ignore +# #![feature(libc)] #![feature(no_std)] #![no_std] #![no_main] @@ -526,6 +529,7 @@ As an example, here is a program that will calculate the dot product of two vectors provided from C, using idiomatic Rust practices. ``` +# #![feature(libc, core)] #![feature(lang_items, start, no_std)] #![no_std] @@ -650,6 +654,7 @@ and one for deallocation. A freestanding program that uses the `Box` sugar for dynamic allocations via `malloc` and `free`: ``` +# #![feature(libc)] #![feature(lang_items, box_syntax, start, no_std)] #![no_std] diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 8528be2860cca..97d3f78f67cbc 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -95,6 +95,7 @@ use heap::deallocate; /// task. /// /// ``` +/// # #![feature(alloc, core)] /// use std::sync::Arc; /// use std::thread; /// @@ -185,6 +186,7 @@ impl Arc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::sync::Arc; /// /// let five = Arc::new(5); @@ -246,6 +248,7 @@ impl Clone for Arc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::sync::Arc; /// /// let five = Arc::new(5); @@ -289,6 +292,7 @@ impl Arc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::sync::Arc; /// /// let mut five = Arc::new(5); @@ -324,6 +328,7 @@ impl Drop for Arc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::sync::Arc; /// /// { @@ -387,6 +392,7 @@ impl Weak { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::sync::Arc; /// /// let five = Arc::new(5); @@ -424,6 +430,7 @@ impl Clone for Weak { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::sync::Arc; /// /// let weak_five = Arc::new(5).downgrade(); @@ -448,6 +455,7 @@ impl Drop for Weak { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::sync::Arc; /// /// { diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 6bdfe2b155167..8b18fbf554a4c 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -65,6 +65,7 @@ use core::raw::TraitObject; /// The following two examples are equivalent: /// /// ``` +/// # #![feature(alloc)] /// #![feature(box_syntax)] /// use std::boxed::HEAP; /// @@ -135,6 +136,7 @@ impl Box { /// /// # Examples /// ``` +/// # #![feature(alloc)] /// use std::boxed; /// /// let seventeen = Box::new(17u32); @@ -178,6 +180,7 @@ impl Clone for Box { /// # Examples /// /// ``` + /// # #![feature(alloc, core)] /// let x = Box::new(5); /// let mut y = Box::new(10); /// diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 34c0686fe37ae..541de2d37fbe0 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -66,6 +66,7 @@ #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] +#![doc(test(no_crate_inject))] #![feature(no_std)] #![no_std] diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 855235e89c880..e4b09bba52989 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -32,6 +32,7 @@ //! and have the `Owner` remain allocated as long as any `Gadget` points at it. //! //! ```rust +//! # #![feature(alloc, collections)] //! use std::rc::Rc; //! //! struct Owner { @@ -88,6 +89,7 @@ //! Read the `Cell` documentation for more details on interior mutability. //! //! ```rust +//! # #![feature(alloc)] //! use std::rc::Rc; //! use std::rc::Weak; //! use std::cell::RefCell; @@ -218,6 +220,7 @@ impl Rc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::rc::Rc; /// /// let five = Rc::new(5); @@ -247,6 +250,7 @@ pub fn strong_count(this: &Rc) -> usize { this.strong() } /// # Examples /// /// ``` +/// # #![feature(alloc)] /// use std::rc; /// use std::rc::Rc; /// @@ -267,6 +271,7 @@ pub fn is_unique(rc: &Rc) -> bool { /// # Examples /// /// ``` +/// # #![feature(alloc)] /// use std::rc::{self, Rc}; /// /// let x = Rc::new(3); @@ -301,6 +306,7 @@ pub fn try_unwrap(rc: Rc) -> Result> { /// # Examples /// /// ``` +/// # #![feature(alloc)] /// use std::rc::{self, Rc}; /// /// let mut x = Rc::new(3); @@ -330,6 +336,7 @@ impl Rc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::rc::Rc; /// /// let mut five = Rc::new(5); @@ -372,6 +379,7 @@ impl Drop for Rc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::rc::Rc; /// /// { @@ -420,6 +428,7 @@ impl Clone for Rc { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::rc::Rc; /// /// let five = Rc::new(5); @@ -648,6 +657,7 @@ impl Weak { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::rc::Rc; /// /// let five = Rc::new(5); @@ -676,6 +686,7 @@ impl Drop for Weak { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::rc::Rc; /// /// { @@ -721,6 +732,7 @@ impl Clone for Weak { /// # Examples /// /// ``` + /// # #![feature(alloc)] /// use std::rc::Rc; /// /// let weak_five = Rc::new(5).downgrade(); diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index 11c8656c994b2..6edee82dc30af 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -216,6 +216,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![9, 1, 2, 7, 3, 2]); /// ``` @@ -235,6 +236,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]); /// @@ -255,6 +257,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]); /// @@ -360,6 +363,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::from_vec(vec![1, 3]); /// @@ -405,6 +409,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::new(); /// heap.push(1); @@ -436,6 +441,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::new(); /// @@ -461,6 +467,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4, 5, 6, 7]); /// let vec = heap.into_vec(); @@ -478,6 +485,7 @@ impl BinaryHeap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BinaryHeap; /// /// let mut heap = BinaryHeap::from_vec(vec![1, 2, 4, 5, 7]); diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index 90fbe04d3482f..d83ff92bf3d7e 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -38,6 +38,7 @@ //! [sieve]: http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes //! //! ``` +//! # #![feature(collections, core)] //! use std::collections::{BitSet, BitVec}; //! use std::num::Float; //! use std::iter; @@ -134,6 +135,7 @@ static FALSE: bool = false; /// # Examples /// /// ``` +/// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(10, false); @@ -250,6 +252,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// let mut bv = BitVec::new(); /// ``` @@ -264,6 +267,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(10, false); @@ -304,6 +308,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let bv = BitVec::from_bytes(&[0b10100000, 0b00010010]); @@ -346,6 +351,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let bv = BitVec::from_fn(5, |i| { i % 2 == 0 }); @@ -364,6 +370,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let bv = BitVec::from_bytes(&[0b01100000]); @@ -396,6 +403,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(5, false); @@ -420,6 +428,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let before = 0b01100000; @@ -440,6 +449,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let before = 0b01100000; @@ -468,6 +478,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let a = 0b01100100; @@ -498,6 +509,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let a = 0b01100100; @@ -528,6 +540,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let a = 0b01100100; @@ -557,6 +570,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(5, true); @@ -581,6 +595,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let bv = BitVec::from_bytes(&[0b01110100, 0b10010010]); @@ -597,6 +612,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(10, false); @@ -614,6 +630,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(10, false); @@ -635,6 +652,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(3, true); @@ -682,6 +700,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let bv = BitVec::from_bytes(&[0b10100000]); @@ -702,6 +721,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_bytes(&[0b01001011]); @@ -728,6 +748,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(3, false); @@ -758,6 +779,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_elem(3, false); @@ -780,6 +802,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::new(); @@ -801,6 +824,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_bytes(&[0b01001011]); @@ -851,6 +875,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::from_bytes(&[0b01001001]); @@ -881,6 +906,7 @@ impl BitVec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitVec; /// /// let mut bv = BitVec::new(); @@ -1091,6 +1117,7 @@ impl<'a> IntoIterator for &'a BitVec { /// # Examples /// /// ``` +/// # #![feature(collections)] /// use std::collections::{BitSet, BitVec}; /// /// // It's a regular set @@ -1187,6 +1214,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::new(); @@ -1203,6 +1231,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::with_capacity(100); @@ -1220,6 +1249,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitVec, BitSet}; /// /// let bv = BitVec::from_bytes(&[0b01100000]); @@ -1249,6 +1279,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::with_capacity(100); @@ -1270,6 +1301,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::new(); @@ -1296,6 +1328,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::new(); @@ -1316,6 +1349,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::new(); @@ -1336,6 +1370,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::new(); @@ -1382,6 +1417,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BitSet; /// /// let mut s = BitSet::new(); @@ -1414,6 +1450,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitVec, BitSet}; /// /// let s = BitSet::from_bit_vec(BitVec::from_bytes(&[0b01001010])); @@ -1435,6 +1472,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitVec, BitSet}; /// /// let a = BitSet::from_bit_vec(BitVec::from_bytes(&[0b01101000])); @@ -1465,6 +1503,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitVec, BitSet}; /// /// let a = BitSet::from_bit_vec(BitVec::from_bytes(&[0b01101000])); @@ -1495,6 +1534,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitSet, BitVec}; /// /// let a = BitSet::from_bit_vec(BitVec::from_bytes(&[0b01101000])); @@ -1533,6 +1573,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitSet, BitVec}; /// /// let a = BitSet::from_bit_vec(BitVec::from_bytes(&[0b01101000])); @@ -1562,6 +1603,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitSet, BitVec}; /// /// let a = 0b01101000; @@ -1585,6 +1627,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitSet, BitVec}; /// /// let a = 0b01101000; @@ -1609,6 +1652,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitSet, BitVec}; /// /// let a = 0b01101000; @@ -1641,6 +1685,7 @@ impl BitSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::{BitSet, BitVec}; /// /// let a = 0b01101000; diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index a9e1ce8d7ce50..e69ca8c9a0940 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -1269,6 +1269,7 @@ impl BTreeMap { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeMap; /// /// let mut a = BTreeMap::new(); @@ -1291,6 +1292,7 @@ impl BTreeMap { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeMap; /// /// let mut a = BTreeMap::new(); @@ -1478,6 +1480,7 @@ impl BTreeMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BTreeMap; /// use std::collections::Bound::{Included, Unbounded}; /// @@ -1504,6 +1507,7 @@ impl BTreeMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BTreeMap; /// use std::collections::Bound::{Included, Excluded}; /// @@ -1529,6 +1533,7 @@ impl BTreeMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BTreeMap; /// use std::collections::btree_map::Entry; /// diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index 5616d36ce0ba9..bce0450852f11 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -116,6 +116,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let set: BTreeSet = [1, 2, 3, 4].iter().cloned().collect(); @@ -137,6 +138,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let set: BTreeSet = [1, 2, 3, 4].iter().cloned().collect(); @@ -162,6 +164,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::BTreeSet; /// use std::collections::Bound::{Included, Unbounded}; /// @@ -190,6 +193,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let mut a = BTreeSet::new(); @@ -213,6 +217,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let mut a = BTreeSet::new(); @@ -237,6 +242,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let mut a = BTreeSet::new(); @@ -261,6 +267,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let mut a = BTreeSet::new(); @@ -333,6 +340,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let set: BTreeSet<_> = [1, 2, 3].iter().cloned().collect(); @@ -350,6 +358,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let a: BTreeSet<_> = [1, 2, 3].iter().cloned().collect(); @@ -371,6 +380,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let sup: BTreeSet<_> = [1, 2, 3].iter().cloned().collect(); @@ -413,6 +423,7 @@ impl BTreeSet { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::BTreeSet; /// /// let sub: BTreeSet<_> = [1, 2].iter().cloned().collect(); diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index 3af7485b237ef..b106f4adbc708 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -174,6 +174,7 @@ //! like: //! //! ``` +//! # #![feature(core, std_misc)] //! use std::fmt; //! use std::f64; //! use std::num::Float; @@ -261,6 +262,7 @@ //! Example usage is: //! //! ``` +//! # #![feature(old_io)] //! # #![allow(unused_must_use)] //! use std::io::Write; //! let mut w = Vec::new(); @@ -288,6 +290,7 @@ //! off, some example usage is: //! //! ``` +//! # #![feature(old_io)] //! use std::fmt; //! use std::io::{self, Write}; //! diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index cf9f6a39a5513..fa8413ff1702c 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -22,6 +22,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", html_playground_url = "http://play.rust-lang.org/")] +#![doc(test(no_crate_inject))] #![feature(alloc)] #![feature(box_syntax)] diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs index 9e0a6d0438100..ae00c820a1d48 100644 --- a/src/libcollections/linked_list.rs +++ b/src/libcollections/linked_list.rs @@ -235,6 +235,7 @@ impl LinkedList { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::LinkedList; /// /// let mut a = LinkedList::new(); @@ -483,6 +484,7 @@ impl LinkedList { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::LinkedList; /// /// let mut dl = LinkedList::new(); @@ -530,6 +532,7 @@ impl LinkedList { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::LinkedList; /// /// let mut d = LinkedList::new(); @@ -548,6 +551,7 @@ impl LinkedList { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::LinkedList; /// /// let mut d = LinkedList::new(); @@ -573,6 +577,7 @@ impl LinkedList { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::LinkedList; /// /// let mut d = LinkedList::new(); @@ -765,6 +770,7 @@ impl<'a, A> IterMut<'a, A> { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::LinkedList; /// /// let mut list: LinkedList<_> = vec![1, 3, 4].into_iter().collect(); @@ -792,6 +798,7 @@ impl<'a, A> IterMut<'a, A> { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::LinkedList; /// /// let mut list: LinkedList<_> = vec![1, 2, 3].into_iter().collect(); diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 45864153dd799..9b9417d2be782 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -14,6 +14,7 @@ //! Slices are a view into a block of memory represented as a pointer and a length. //! //! ```rust +//! # #![feature(core)] //! // slicing a Vec //! let vec = vec!(1, 2, 3); //! let int_slice = vec.as_slice(); @@ -270,6 +271,7 @@ impl [T] { /// # Examples /// /// ```rust + /// # #![feature(collections)] /// let mut a = [1, 2, 3, 4, 5]; /// let b = vec![6, 7, 8]; /// let num_moved = a.move_from(b, 0, 3); @@ -560,6 +562,7 @@ impl [T] { /// found; the fourth could match any position in `[1,4]`. /// /// ```rust + /// # #![feature(core)] /// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]; /// let s = s.as_slice(); /// @@ -842,6 +845,7 @@ impl [T] { /// # Examples /// /// ```rust + /// # #![feature(collections)] /// let v = [1, 2, 3]; /// let mut perms = v.permutations(); /// @@ -853,6 +857,7 @@ impl [T] { /// Iterating through permutations one by one. /// /// ```rust + /// # #![feature(collections)] /// let v = [1, 2, 3]; /// let mut perms = v.permutations(); /// @@ -874,6 +879,7 @@ impl [T] { /// # Example /// /// ```rust + /// # #![feature(collections)] /// let mut dst = [0, 0, 0]; /// let src = [1, 2]; /// @@ -921,6 +927,7 @@ impl [T] { /// found; the fourth could match any position in `[1,4]`. /// /// ```rust + /// # #![feature(core)] /// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]; /// let s = s.as_slice(); /// @@ -950,6 +957,7 @@ impl [T] { /// # Example /// /// ```rust + /// # #![feature(collections)] /// let v: &mut [_] = &mut [0, 1, 2]; /// v.next_permutation(); /// let b: &mut [_] = &mut [0, 2, 1]; @@ -972,6 +980,7 @@ impl [T] { /// # Example /// /// ```rust + /// # #![feature(collections)] /// let v: &mut [_] = &mut [1, 0, 2]; /// v.prev_permutation(); /// let b: &mut [_] = &mut [0, 2, 1]; diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 3a289e4ef3738..494dd009ea9ed 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -548,6 +548,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(collections)] /// assert!("hello".contains_char('e')); /// /// assert!(!"hello".contains_char('z')); @@ -739,6 +740,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let v: Vec<(usize, usize)> = "abcXXXabcYYYabc".match_indices("abc").collect(); /// assert_eq!(v, [(0,3), (6,9), (12,15)]); /// @@ -761,6 +763,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let v: Vec<&str> = "abcXXXabcYYYabc".split_str("abc").collect(); /// assert_eq!(v, ["", "XXX", "YYY", ""]); /// @@ -869,6 +872,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let s = "Löwe 老虎 Léopard"; /// /// assert_eq!(s.slice_chars(0, 4), "Löwe"); @@ -1019,6 +1023,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(str_char)] /// let s = "Löwe 老虎 Léopard"; /// assert!(s.is_char_boundary(0)); /// // start of `老` @@ -1055,6 +1060,7 @@ impl str { /// done by `.chars()` or `.char_indices()`. /// /// ``` + /// # #![feature(str_char, core)] /// use std::str::CharRange; /// /// let s = "中华Việt Nam"; @@ -1105,6 +1111,7 @@ impl str { /// done by `.chars().rev()` or `.char_indices()`. /// /// ``` + /// # #![feature(str_char, core)] /// use std::str::CharRange; /// /// let s = "中华Việt Nam"; @@ -1148,6 +1155,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(str_char)] /// let s = "abπc"; /// assert_eq!(s.char_at(1), 'b'); /// assert_eq!(s.char_at(2), 'π'); @@ -1172,6 +1180,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(str_char)] /// let s = "abπc"; /// assert_eq!(s.char_at_reverse(1), 'a'); /// assert_eq!(s.char_at_reverse(2), 'b'); @@ -1286,6 +1295,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let s = "Löwe 老虎 Léopard"; /// /// assert_eq!(s.find_str("老虎 L"), Some(6)); @@ -1307,6 +1317,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(str_char)] /// let s = "Löwe 老虎 Léopard"; /// let (c, s1) = s.slice_shift_char().unwrap(); /// @@ -1335,6 +1346,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let string = "a\nb\nc"; /// let lines: Vec<&str> = string.lines().collect(); /// @@ -1434,6 +1446,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(unicode, core)] /// let gr1 = "a\u{310}e\u{301}o\u{308}\u{332}".graphemes(true).collect::>(); /// let b: &[_] = &["a\u{310}", "e\u{301}", "o\u{308}\u{332}"]; /// @@ -1456,6 +1469,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(unicode, core)] /// let gr_inds = "a̐éö̲\r\n".grapheme_indices(true).collect::>(); /// let b: &[_] = &[(0, "a̐"), (3, "é"), (6, "ö̲"), (11, "\r\n")]; /// @@ -1475,6 +1489,7 @@ impl str { /// # Examples /// /// ``` + /// # #![feature(str_words)] /// let some_words = " Mary had\ta little \n\t lamb"; /// let v: Vec<&str> = some_words.words().collect(); /// diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index cd6f27bf65f6e..abc67aa61366d 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -90,6 +90,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections, core)] /// let s = String::from_str("hello"); /// assert_eq!(s.as_slice(), "hello"); /// ``` @@ -122,6 +123,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::str::Utf8Error; /// /// let hello_vec = vec![104, 101, 108, 108, 111]; @@ -350,6 +352,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let s = String::from_str("hello"); /// let bytes = s.into_bytes(); /// assert_eq!(bytes, [104, 101, 108, 108, 111]); @@ -365,6 +368,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut s = String::from_str("foo"); /// s.push_str("bar"); /// assert_eq!(s, "foobar"); @@ -441,6 +445,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut s = String::from_str("foo"); /// s.reserve(100); /// assert!(s.capacity() >= 100); @@ -458,6 +463,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut s = String::from_str("abc"); /// s.push('1'); /// s.push('2'); @@ -493,6 +499,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let s = String::from_str("hello"); /// let b: &[_] = &[104, 101, 108, 108, 111]; /// assert_eq!(s.as_bytes(), b); @@ -513,6 +520,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut s = String::from_str("hello"); /// s.truncate(2); /// assert_eq!(s, "he"); @@ -530,6 +538,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut s = String::from_str("foo"); /// assert_eq!(s.pop(), Some('o')); /// assert_eq!(s.pop(), Some('o')); @@ -567,6 +576,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut s = String::from_str("foo"); /// assert_eq!(s.remove(0), 'f'); /// assert_eq!(s.remove(1), 'o'); @@ -629,6 +639,7 @@ impl String { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut s = String::from_str("hello"); /// unsafe { /// let vec = s.as_mut_vec(); @@ -930,6 +941,7 @@ impl<'a> Deref for DerefString<'a> { /// # Examples /// /// ``` +/// # #![feature(collections)] /// use std::string::as_string; /// /// fn string_consumer(s: String) { diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index b0e8dc7d0b622..473442e531b5d 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -73,6 +73,7 @@ use borrow::{Cow, IntoCow}; /// # Examples /// /// ``` +/// # #![feature(collections)] /// let mut vec = Vec::new(); /// vec.push(1); /// vec.push(2); @@ -345,6 +346,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut vec = Vec::with_capacity(10); /// vec.push_all(&[1, 2, 3]); /// assert_eq!(vec.capacity(), 10); @@ -400,6 +402,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut vec = vec![1, 2, 3, 4]; /// vec.truncate(2); /// assert_eq!(vec, [1, 2]); @@ -565,6 +568,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut v = vec![1, 2, 3]; /// assert_eq!(v.remove(1), 2); /// assert_eq!(v, [1, 3]); @@ -696,6 +700,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut vec = vec![1, 2, 3]; /// let mut vec2 = vec![4, 5, 6]; /// vec.append(&mut vec2); @@ -732,6 +737,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut v = vec!["a".to_string(), "b".to_string()]; /// for s in v.drain() { /// // s has type String, not &String @@ -813,6 +819,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections, core)] /// let v = vec![0, 1, 2]; /// let w = v.map_in_place(|i| i + 3); /// assert_eq!(w.as_slice(), [3, 4, 5].as_slice()); @@ -1015,6 +1022,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut vec = vec![1,2,3]; /// let vec2 = vec.split_off(1); /// assert_eq!(vec, [1]); @@ -1053,6 +1061,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut vec = vec!["hello"]; /// vec.resize(3, "world"); /// assert_eq!(vec, ["hello", "world", "world"]); @@ -1081,6 +1090,7 @@ impl Vec { /// # Examples /// /// ``` + /// # #![feature(collections)] /// let mut vec = vec![1]; /// vec.push_all(&[2, 3, 4]); /// assert_eq!(vec, [1, 2, 3, 4]); @@ -1554,6 +1564,7 @@ impl AsSlice for Vec { /// # Examples /// /// ``` + /// # #![feature(core)] /// fn foo(slice: &[i32]) {} /// /// let vec = vec![1, 2]; diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 56ca74dab1f0f..d25706400386e 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -257,6 +257,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); @@ -284,6 +285,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let buf: VecDeque = VecDeque::with_capacity(10); @@ -307,6 +309,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf: VecDeque = vec![1].into_iter().collect(); @@ -328,6 +331,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf: VecDeque = vec![1].into_iter().collect(); @@ -403,6 +407,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::with_capacity(15); @@ -489,6 +494,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); @@ -512,6 +518,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); @@ -535,6 +542,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); @@ -644,6 +652,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut v = VecDeque::new(); @@ -882,6 +891,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); @@ -915,6 +925,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); @@ -948,6 +959,7 @@ impl VecDeque { /// /// # Examples /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); @@ -1321,6 +1333,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf: VecDeque<_> = vec![1,2,3].into_iter().collect(); @@ -1383,6 +1396,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf: VecDeque<_> = vec![1, 2, 3].into_iter().collect(); @@ -1407,6 +1421,7 @@ impl VecDeque { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecDeque; /// /// let mut buf = VecDeque::new(); diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index 6e67d8763273d..84fb06809b95d 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -34,6 +34,7 @@ use vec::Vec; /// # Examples /// /// ``` +/// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut months = VecMap::new(); @@ -132,6 +133,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// let mut map: VecMap<&str> = VecMap::new(); /// ``` @@ -144,6 +146,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// let mut map: VecMap<&str> = VecMap::with_capacity(10); /// ``` @@ -158,6 +161,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// let map: VecMap = VecMap::with_capacity(10); /// assert!(map.capacity() >= 10); @@ -177,6 +181,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// let mut map: VecMap<&str> = VecMap::new(); /// map.reserve_len(10); @@ -201,6 +206,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// let mut map: VecMap<&str> = VecMap::new(); /// map.reserve_len_exact(10); @@ -240,6 +246,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -268,6 +275,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -299,6 +307,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -325,6 +334,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut a = VecMap::new(); @@ -360,6 +370,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut a = VecMap::new(); @@ -416,6 +427,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -443,6 +455,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut a = VecMap::new(); @@ -460,6 +473,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut a = VecMap::new(); @@ -477,6 +491,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut a = VecMap::new(); @@ -492,6 +507,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -516,6 +532,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -534,6 +551,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -562,6 +580,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -587,6 +606,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// /// let mut map = VecMap::new(); @@ -608,6 +628,7 @@ impl VecMap { /// # Examples /// /// ``` + /// # #![feature(collections)] /// use std::collections::VecMap; /// use std::collections::vec_map::Entry; /// diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index e3a7f23851cde..a9c5de23d948b 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -220,6 +220,7 @@ impl Cell { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::cell::Cell; /// /// let c = Cell::new(5); diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index b37bad5f7546c..9ab8ab8672dfa 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -19,7 +19,8 @@ //! could do the following: //! //! ``` -//! use core::num::SignedInt; +//! # #![feature(core)] +//! use std::num::SignedInt; //! //! struct FuzzyNum { //! num: i32, @@ -398,6 +399,7 @@ pub fn max(v1: T, v2: T) -> T { /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::cmp; /// /// assert_eq!(Some(1), cmp::partial_min(1, 2)); @@ -407,6 +409,7 @@ pub fn max(v1: T, v2: T) -> T { /// When comparison is impossible: /// /// ``` +/// # #![feature(core)] /// use std::cmp; /// /// let result = cmp::partial_min(std::f64::NAN, 1.0); @@ -429,6 +432,7 @@ pub fn partial_min(v1: T, v2: T) -> Option { /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::cmp; /// /// assert_eq!(Some(2), cmp::partial_max(1, 2)); @@ -438,6 +442,7 @@ pub fn partial_min(v1: T, v2: T) -> Option { /// When comparison is impossible: /// /// ``` +/// # #![feature(core)] /// use std::cmp; /// /// let result = cmp::partial_max(std::f64::NAN, 1.0); diff --git a/src/libcore/error.rs b/src/libcore/error.rs index 161f6c7892163..8baf9744bbc48 100644 --- a/src/libcore/error.rs +++ b/src/libcore/error.rs @@ -48,6 +48,7 @@ //! For example, //! //! ``` +//! # #![feature(os, old_io, old_path)] //! use std::error::FromError; //! use std::old_io::{File, IoError}; //! use std::os::{MemoryMap, MapError}; diff --git a/src/libcore/finally.rs b/src/libcore/finally.rs index 19cd34cdb0933..93a7d2bb17b92 100644 --- a/src/libcore/finally.rs +++ b/src/libcore/finally.rs @@ -19,6 +19,7 @@ //! # Examples //! //! ``` +//! # #![feature(core)] //! # #![feature(unboxed_closures)] //! //! use std::finally::Finally; @@ -70,6 +71,7 @@ impl Finally for F where F: FnMut() -> T { /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::finally::try_finally; /// /// struct State<'a> { buffer: &'a mut [u8], len: usize } diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 741cf7b47fa1e..cf427c16588d9 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -624,6 +624,7 @@ impl<'a> Formatter<'a> { /// # Examples /// /// ```rust + /// # #![feature(debug_builders, core)] /// use std::fmt; /// /// struct Foo { @@ -655,6 +656,7 @@ impl<'a> Formatter<'a> { /// # Examples /// /// ```rust + /// # #![feature(debug_builders, core)] /// use std::fmt; /// /// struct Foo(i32, String); @@ -683,6 +685,7 @@ impl<'a> Formatter<'a> { /// # Examples /// /// ```rust + /// # #![feature(debug_builders, core)] /// use std::fmt; /// /// struct Foo(Vec); @@ -712,6 +715,7 @@ impl<'a> Formatter<'a> { /// # Examples /// /// ```rust + /// # #![feature(debug_builders, core)] /// use std::fmt; /// /// struct Foo(Vec<(String, i32)>); diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs index fe22ee60da688..49da99b97cb20 100644 --- a/src/libcore/fmt/num.rs +++ b/src/libcore/fmt/num.rs @@ -146,6 +146,7 @@ pub struct RadixFmt(T, R); /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::fmt::radix; /// assert_eq!(format!("{}", radix(55, 36)), "1j".to_string()); /// ``` diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index fdc0020dfcd61..3c5810fdf804d 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -16,6 +16,7 @@ //! # Examples //! //! ```rust +//! # #![feature(hash)] //! use std::hash::{hash, Hash, SipHasher}; //! //! #[derive(Hash)] @@ -35,6 +36,7 @@ //! the trait `Hash`: //! //! ```rust +//! # #![feature(hash)] //! use std::hash::{hash, Hash, Hasher, SipHasher}; //! //! struct Person { diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 1462d07652d08..9873ba476acf0 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -262,6 +262,7 @@ extern "rust-intrinsic" { /// A safe swap function: /// /// ``` + /// # #![feature(core)] /// use std::mem; /// use std::ptr; /// @@ -301,6 +302,7 @@ extern "rust-intrinsic" { /// Efficiently create a Rust vector from an unsafe buffer: /// /// ``` + /// # #![feature(core)] /// use std::ptr; /// /// unsafe fn from_buf_raw(ptr: *const T, elts: uint) -> Vec { diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 4f8b1c21ab2e5..5f5b8ef73ef54 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -334,6 +334,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let xs = [100, 200, 300]; /// let mut it = xs.iter().cloned().peekable(); /// assert_eq!(*it.peek().unwrap(), 100); @@ -465,6 +466,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let xs = [2, 3]; /// let ys = [0, 1, 0, 1, 2]; /// let it = xs.iter().flat_map(|&x| std::iter::count(0, 1).take(x)); @@ -521,6 +523,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::iter::AdditiveIterator; /// /// let a = [1, 4, 2, 3, 8, 9, 6]; @@ -563,6 +566,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let a = [1, 2, 3, 4, 5]; /// let b: Vec<_> = a.iter().cloned().collect(); /// assert_eq!(a, b); @@ -579,6 +583,7 @@ pub trait IteratorExt: Iterator + Sized { /// do not. /// /// ``` + /// # #![feature(core)] /// let vec = vec![1, 2, 3, 4]; /// let (even, odd): (Vec<_>, Vec<_>) = vec.into_iter().partition(|&n| n % 2 == 0); /// assert_eq!(even, [2, 4]); @@ -648,6 +653,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let a = [1, 2, 3, 4, 5]; /// let mut it = a.iter(); /// assert!(it.any(|x| *x == 3)); @@ -668,6 +674,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let a = [1, 2, 3, 4, 5]; /// let mut it = a.iter(); /// assert_eq!(it.find(|&x| *x == 3).unwrap(), &3); @@ -690,6 +697,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let a = [1, 2, 3, 4, 5]; /// let mut it = a.iter(); /// assert_eq!(it.position(|x| *x == 3).unwrap(), 2); @@ -718,6 +726,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let a = [1, 2, 2, 4, 5]; /// let mut it = a.iter(); /// assert_eq!(it.rposition(|x| *x == 2).unwrap(), 2); @@ -795,6 +804,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::iter::MinMaxResult::{NoElements, OneElement, MinMax}; /// /// let a: [i32; 0] = []; @@ -860,7 +870,8 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` - /// use core::num::SignedInt; + /// # #![feature(core)] + /// use std::num::SignedInt; /// /// let a = [-3, 0, 1, 5, -10]; /// assert_eq!(*a.iter().max_by(|x| x.abs()).unwrap(), -10); @@ -890,7 +901,8 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` - /// use core::num::SignedInt; + /// # #![feature(core)] + /// use std::num::SignedInt; /// /// let a = [-3, 0, 1, 5, -10]; /// assert_eq!(*a.iter().min_by(|x| x.abs()).unwrap(), 0); @@ -940,6 +952,7 @@ pub trait IteratorExt: Iterator + Sized { /// # Examples /// /// ``` + /// # #![feature(core)] /// let a = [(1, 2), (3, 4)]; /// let (left, right): (Vec<_>, Vec<_>) = a.iter().cloned().unzip(); /// assert_eq!([1, 3], left); @@ -1146,6 +1159,7 @@ pub trait AdditiveIterator { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::iter::AdditiveIterator; /// /// let a = [1, 2, 3, 4, 5]; @@ -1188,6 +1202,7 @@ pub trait MultiplicativeIterator { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::iter::{count, MultiplicativeIterator}; /// /// fn factorial(n: usize) -> usize { @@ -1248,6 +1263,7 @@ impl MinMaxResult { /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::iter::MinMaxResult::{self, NoElements, OneElement, MinMax}; /// /// let r: MinMaxResult = NoElements; @@ -2292,6 +2308,7 @@ impl RandomAccessIterator for Inspect /// An iterator that yields sequential Fibonacci numbers, and stops on overflow. /// /// ``` +/// # #![feature(core)] /// use std::iter::Unfold; /// use std::num::Int; // For `.checked_add()` /// @@ -2693,6 +2710,7 @@ pub struct RangeStepInclusive { /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::iter::range_step_inclusive; /// /// for i in range_step_inclusive(0, 10, 2) { diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 29cc11d5a60a1..6e82f0f854c67 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -56,6 +56,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", html_playground_url = "http://play.rust-lang.org/")] +#![doc(test(no_crate_inject))] #![feature(no_std)] #![no_std] diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index c647b037944ae..40e32f4171a2d 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -231,6 +231,7 @@ macro_rules! writeln { /// Iterators: /// /// ``` +/// # #![feature(core)] /// fn divide_by_three(x: u32) -> u32 { // one of the poorest implementations of x/3 /// for i in std::iter::count(0, 1) { /// if 3*i < i { panic!("u32 overflow"); } diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 1b866501b8ea1..ae6bcc79539e1 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -319,6 +319,7 @@ impl MarkerTrait for T { } /// `MarkerTrait`: /// /// ``` +/// # #![feature(core)] /// use std::marker::MarkerTrait; /// trait Even : MarkerTrait { } /// ``` diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index ae1b5f65eeb52..d211b0f9928cd 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -282,7 +282,8 @@ impl Float for f32 { /// The fractional part of the number, satisfying: /// /// ``` - /// use core::num::Float; + /// # #![feature(core)] + /// use std::num::Float; /// /// let x = 1.65f32; /// assert!(x == x.trunc() + x.fract()) diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 4a73c1e8fcf45..1421fdd72f233 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -289,7 +289,8 @@ impl Float for f64 { /// The fractional part of the number, satisfying: /// /// ``` - /// use core::num::Float; + /// # #![feature(core)] + /// use std::num::Float; /// /// let x = 1.65f64; /// assert!(x == x.trunc() + x.fract()) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 17ef0ecb1c0da..9ca7b48fbe5ef 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -85,6 +85,7 @@ pub trait Int /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -100,6 +101,7 @@ pub trait Int /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -119,6 +121,7 @@ pub trait Int /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -135,6 +138,7 @@ pub trait Int /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -151,6 +155,7 @@ pub trait Int /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -168,6 +173,7 @@ pub trait Int /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -392,6 +398,7 @@ pub trait Int /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::num::Int; /// /// assert_eq!(2.pow(4), 16); @@ -787,6 +794,7 @@ macro_rules! int_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -803,6 +811,7 @@ macro_rules! int_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -822,6 +831,7 @@ macro_rules! int_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -841,6 +851,7 @@ macro_rules! int_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -860,6 +871,7 @@ macro_rules! int_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -881,6 +893,7 @@ macro_rules! int_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -1112,6 +1125,7 @@ macro_rules! int_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// assert_eq!(2.pow(4), 16); @@ -1277,6 +1291,7 @@ macro_rules! uint_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -1295,6 +1310,7 @@ macro_rules! uint_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -1314,6 +1330,7 @@ macro_rules! uint_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -1333,6 +1350,7 @@ macro_rules! uint_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -1352,6 +1370,7 @@ macro_rules! uint_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -1375,6 +1394,7 @@ macro_rules! uint_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -1606,6 +1626,7 @@ macro_rules! uint_impl { /// # Examples /// /// ```rust + /// # #![feature(core)] /// use std::num::Int; /// /// assert_eq!(2.pow(4), 16); @@ -2266,6 +2287,7 @@ impl_from_primitive! { f64, to_f64 } /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::num; /// /// let twenty: f32 = num::cast(0x14).unwrap(); diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 455c68d4319d6..ecb060397ab22 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -275,6 +275,7 @@ impl Option { /// # Examples /// /// ``` + /// # #![feature(core)] /// let mut x = Some("Diamonds"); /// { /// let v = x.as_mut_slice(); @@ -470,6 +471,7 @@ impl Option { /// # Examples /// /// ``` + /// # #![feature(core)] /// let x = Some("foo"); /// assert_eq!(x.ok_or(0), Ok("foo")); /// @@ -491,6 +493,7 @@ impl Option { /// # Examples /// /// ``` + /// # #![feature(core)] /// let x = Some("foo"); /// assert_eq!(x.ok_or_else(|| 0), Ok("foo")); /// @@ -532,6 +535,7 @@ impl Option { /// # Examples /// /// ``` + /// # #![feature(core)] /// let mut x = Some(4); /// match x.iter_mut().next() { /// Some(&mut ref mut v) => *v = 42, diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 1cbea057e8842..c05dffb369682 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -52,6 +52,7 @@ //! the raw pointer. It doesn't destroy `T` or deallocate any memory. //! //! ``` +//! # #![feature(alloc)] //! use std::boxed; //! //! unsafe { @@ -70,6 +71,7 @@ //! ## 3. Get it from C. //! //! ``` +//! # #![feature(libc)] //! extern crate libc; //! //! use std::mem; diff --git a/src/libcore/raw.rs b/src/libcore/raw.rs index 35dfc76268727..8502a9c53c4a8 100644 --- a/src/libcore/raw.rs +++ b/src/libcore/raw.rs @@ -48,6 +48,7 @@ use mem; /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::raw::{self, Repr}; /// /// let slice: &[u16] = &[1, 2, 3, 4]; @@ -106,6 +107,7 @@ pub struct Closure { /// # Examples /// /// ``` +/// # #![feature(core)] /// use std::mem; /// use std::raw; /// diff --git a/src/libcore/result.rs b/src/libcore/result.rs index bc8d53e2a5765..a994590a395df 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -95,6 +95,7 @@ //! by the [`Writer`](../io/trait.Writer.html) trait: //! //! ``` +//! # #![feature(old_io)] //! use std::old_io::IoError; //! //! trait Writer { @@ -110,6 +111,7 @@ //! something like this: //! //! ```{.ignore} +//! # #![feature(old_io)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -129,6 +131,7 @@ //! a marginally useful message indicating why: //! //! ```{.no_run} +//! # #![feature(old_io, old_path)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -140,6 +143,7 @@ //! You might also simply assert success: //! //! ```{.no_run} +//! # #![feature(old_io, old_path)] //! # use std::old_io::*; //! # use std::old_path::Path; //! @@ -151,6 +155,7 @@ //! Or propagate the error up the call stack with `try!`: //! //! ``` +//! # #![feature(old_io, old_path)] //! # use std::old_io::*; //! # use std::old_path::Path; //! fn write_message() -> Result<(), IoError> { @@ -171,6 +176,7 @@ //! It replaces this: //! //! ``` +//! # #![feature(old_io, old_path)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -196,6 +202,7 @@ //! With this: //! //! ``` +//! # #![feature(old_io, old_path)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -411,6 +418,7 @@ impl Result { /// Convert from `Result` to `&mut [T]` (without copying) /// /// ``` + /// # #![feature(core)] /// let mut x: Result<&str, u32> = Ok("Gold"); /// { /// let v = x.as_mut_slice(); @@ -452,6 +460,7 @@ impl Result { /// ignoring I/O and parse errors: /// /// ``` + /// # #![feature(old_io)] /// use std::old_io::*; /// /// let mut buffer: &[u8] = b"1\n2\n3\n4\n"; diff --git a/src/libcore/simd.rs b/src/libcore/simd.rs index 0058971faf079..21cff3021abea 100644 --- a/src/libcore/simd.rs +++ b/src/libcore/simd.rs @@ -19,7 +19,7 @@ //! provided beyond this module. //! //! ```rust -//! +//! # #![feature(core)] //! fn main() { //! use std::simd::f32x4; //! let a = f32x4(40.0, 41.0, 42.0, 43.0); diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 907b2eba80c5b..b8e6a05f3da0d 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -1491,6 +1491,7 @@ pub unsafe fn from_raw_parts_mut<'a, T>(p: *mut T, len: usize) -> &'a mut [T] { /// # Examples /// /// ``` +/// #![feature(core)] /// use std::slice; /// /// // manifest a slice out of thin air! diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 0e0804593443d..a5017c67ee4d6 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -47,6 +47,7 @@ //! which is cyclic. //! //! ```rust +//! # #![feature(rustc_private, core)] //! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; @@ -148,6 +149,7 @@ //! entity `&sube`). //! //! ```rust +//! # #![feature(rustc_private, core)] //! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; @@ -205,6 +207,7 @@ //! Hasse-diagram for the subsets of the set `{x, y}`. //! //! ```rust +//! # #![feature(rustc_private, core)] //! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 893781e622090..41c782a2a464a 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -5031,7 +5031,7 @@ pub mod funcs { /// /// # Examples /// - /// ```no_run + /// ```no_run,ignore /// extern crate libc; /// /// fn main() { diff --git a/src/librand/distributions/exponential.rs b/src/librand/distributions/exponential.rs index 3180f03cfd3c2..0c5f5cb0d444e 100644 --- a/src/librand/distributions/exponential.rs +++ b/src/librand/distributions/exponential.rs @@ -60,6 +60,7 @@ impl Rand for Exp1 { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{Exp, IndependentSample}; /// diff --git a/src/librand/distributions/gamma.rs b/src/librand/distributions/gamma.rs index 8eaac203fb4ad..d04e83e84f728 100644 --- a/src/librand/distributions/gamma.rs +++ b/src/librand/distributions/gamma.rs @@ -40,6 +40,7 @@ use super::{IndependentSample, Sample, Exp}; /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{IndependentSample, Gamma}; /// @@ -187,6 +188,7 @@ impl IndependentSample for GammaLargeShape { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{ChiSquared, IndependentSample}; /// @@ -244,6 +246,7 @@ impl IndependentSample for ChiSquared { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{FisherF, IndependentSample}; /// @@ -288,6 +291,7 @@ impl IndependentSample for FisherF { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{StudentT, IndependentSample}; /// diff --git a/src/librand/distributions/mod.rs b/src/librand/distributions/mod.rs index a46709932e2de..5cafb8d2e5eae 100644 --- a/src/librand/distributions/mod.rs +++ b/src/librand/distributions/mod.rs @@ -94,6 +94,7 @@ pub struct Weighted { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{Weighted, WeightedChoice, IndependentSample}; /// diff --git a/src/librand/distributions/normal.rs b/src/librand/distributions/normal.rs index d07964624bf58..7cecc6ac611e2 100644 --- a/src/librand/distributions/normal.rs +++ b/src/librand/distributions/normal.rs @@ -76,6 +76,7 @@ impl Rand for StandardNormal { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{Normal, IndependentSample}; /// @@ -124,6 +125,7 @@ impl IndependentSample for Normal { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::distributions::{LogNormal, IndependentSample}; /// diff --git a/src/librand/distributions/range.rs b/src/librand/distributions/range.rs index 4086e149e7866..e6f27a28ffa7c 100644 --- a/src/librand/distributions/range.rs +++ b/src/librand/distributions/range.rs @@ -36,6 +36,7 @@ use distributions::{Sample, IndependentSample}; /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand::distributions::{IndependentSample, Range}; /// /// fn main() { diff --git a/src/librand/lib.rs b/src/librand/lib.rs index 8de773e9fec04..9f6399ff12dd6 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -149,6 +149,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand, core)] /// use std::rand::{thread_rng, Rng}; /// /// let mut v = [0; 13579]; @@ -184,6 +185,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{thread_rng, Rng}; /// /// let mut rng = thread_rng(); @@ -202,6 +204,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{thread_rng, Rng}; /// /// let mut rng = thread_rng(); @@ -229,6 +232,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{thread_rng, Rng}; /// /// let mut rng = thread_rng(); @@ -247,6 +251,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{thread_rng, Rng}; /// /// let mut rng = thread_rng(); @@ -261,6 +266,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{thread_rng, Rng}; /// /// let s: String = thread_rng().gen_ascii_chars().take(10).collect(); @@ -277,6 +283,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{thread_rng, Rng}; /// /// let choices = [1, 2, 4, 8, 16, 32]; @@ -297,6 +304,7 @@ pub trait Rng : Sized { /// # Examples /// /// ``` + /// # #![feature(rand, core)] /// use std::rand::{thread_rng, Rng}; /// /// let mut rng = thread_rng(); @@ -360,6 +368,7 @@ pub trait SeedableRng: Rng { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{Rng, SeedableRng, StdRng}; /// /// let seed: &[_] = &[1, 2, 3, 4]; @@ -375,6 +384,7 @@ pub trait SeedableRng: Rng { /// # Examples /// /// ``` + /// # #![feature(rand)] /// use std::rand::{Rng, SeedableRng, StdRng}; /// /// let seed: &[_] = &[1, 2, 3, 4]; @@ -480,6 +490,7 @@ impl Rand for XorShiftRng { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand::{random, Open01}; /// /// let Open01(val) = random::>(); @@ -497,6 +508,7 @@ pub struct Open01(pub F); /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand::{random, Closed01}; /// /// let Closed01(val) = random::>(); diff --git a/src/librand/reseeding.rs b/src/librand/reseeding.rs index 81e65da37fc5f..95dd986d2e3c7 100644 --- a/src/librand/reseeding.rs +++ b/src/librand/reseeding.rs @@ -103,6 +103,7 @@ impl, Rsdr: Reseeder + Default> /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand::{Rng, SeedableRng, StdRng}; /// use std::rand::reseeding::{Reseeder, ReseedingRng}; /// diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs index 054bfec7a2063..93a2a5d125778 100644 --- a/src/librustc_bitflags/lib.rs +++ b/src/librustc_bitflags/lib.rs @@ -33,6 +33,7 @@ /// # Examples /// /// ```{.rust} +/// # #![feature(rustc_private)] /// #[macro_use] extern crate rustc_bitflags; /// /// bitflags! { @@ -59,6 +60,7 @@ /// The generated `struct`s can also be extended with type and trait implementations: /// /// ```{.rust} +/// # #![feature(rustc_private)] /// #[macro_use] extern crate rustc_bitflags; /// /// use std::fmt; diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 1b596e65a784f..0f645d2b8eadb 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -268,7 +268,7 @@ pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, // Don't inject `extern crate std` because it's already injected by the // compiler. - if !s.contains("extern crate") && cratename != Some("std") && inject_crate { + if !s.contains("extern crate") && inject_crate { match cratename { Some(cratename) => { if s.contains(cratename) { diff --git a/src/libserialize/hex.rs b/src/libserialize/hex.rs index 1f8d45a007d2b..e42aa1835dc44 100644 --- a/src/libserialize/hex.rs +++ b/src/libserialize/hex.rs @@ -32,6 +32,7 @@ impl ToHex for [u8] { /// # Examples /// /// ``` + /// # #![feature(rustc_private)] /// extern crate serialize; /// use serialize::hex::ToHex; /// @@ -101,6 +102,7 @@ impl FromHex for str { /// This converts a string literal to hexadecimal and back. /// /// ``` + /// # #![feature(rustc_private)] /// extern crate serialize; /// use serialize::hex::{FromHex, ToHex}; /// diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 9139e182ce479..a632306454e56 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -538,6 +538,7 @@ impl HashMap /// # Examples /// /// ``` + /// # #![feature(std_misc)] /// use std::collections::HashMap; /// use std::collections::hash_map::RandomState; /// @@ -566,6 +567,7 @@ impl HashMap /// # Examples /// /// ``` + /// # #![feature(std_misc)] /// use std::collections::HashMap; /// use std::collections::hash_map::RandomState; /// @@ -981,6 +983,7 @@ impl HashMap /// # Examples /// /// ``` + /// # #![feature(std_misc)] /// use std::collections::HashMap; /// /// let mut a = HashMap::new(); diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index de3f080de8296..3bc511f8a2239 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -145,6 +145,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(std_misc)] /// use std::collections::HashSet; /// use std::collections::hash_map::RandomState; /// @@ -169,6 +170,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(std_misc)] /// use std::collections::HashSet; /// use std::collections::hash_map::RandomState; /// @@ -295,6 +297,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); @@ -325,6 +328,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); @@ -351,6 +355,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); @@ -376,6 +381,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); @@ -458,6 +464,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// /// let set: HashSet<_> = [1, 2, 3].iter().cloned().collect(); @@ -477,6 +484,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); @@ -498,6 +506,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// /// let sup: HashSet<_> = [1, 2, 3].iter().cloned().collect(); @@ -519,6 +528,7 @@ impl HashSet /// # Examples /// /// ``` + /// # #![feature(core)] /// use std::collections::HashSet; /// /// let sub: HashSet<_> = [1, 2].iter().cloned().collect(); diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs index caada8ae50f74..8d24f6b191659 100644 --- a/src/libstd/collections/mod.rs +++ b/src/libstd/collections/mod.rs @@ -300,6 +300,7 @@ //! #### Counting the number of times each character in a string occurs //! //! ``` +//! # #![feature(collections)] //! use std::collections::btree_map::{BTreeMap, Entry}; //! //! let mut count = BTreeMap::new(); @@ -327,6 +328,7 @@ //! #### Tracking the inebriation of customers at a bar //! //! ``` +//! # #![feature(collections)] //! use std::collections::btree_map::{BTreeMap, Entry}; //! //! // A client of the bar. They have an id and a blood alcohol level. diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index fc4f03ff3a54a..96088003b9987 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -44,6 +44,7 @@ use vec::Vec; /// # Examples /// /// ```no_run +/// # #![feature(libc)] /// # extern crate libc; /// # fn main() { /// use std::ffi::CString; @@ -82,6 +83,7 @@ pub struct CString { /// Inspecting a foreign C string /// /// ```no_run +/// # #![feature(libc)] /// extern crate libc; /// use std::ffi::CStr; /// @@ -98,6 +100,7 @@ pub struct CString { /// Passing a Rust-originating C string /// /// ```no_run +/// # #![feature(libc)] /// extern crate libc; /// use std::ffi::{CString, CStr}; /// @@ -144,6 +147,7 @@ impl CString { /// # Examples /// /// ```no_run + /// # #![feature(libc)] /// extern crate libc; /// use std::ffi::CString; /// @@ -179,6 +183,7 @@ impl CString { /// # Examples /// /// ```no_run + /// # #![feature(libc)] /// extern crate libc; /// use std::ffi::CString; /// @@ -329,6 +334,7 @@ impl CStr { /// # Examples /// /// ```no_run + /// # #![feature(libc)] /// # extern crate libc; /// # fn main() { /// use std::ffi::CStr; diff --git a/src/libstd/fs/mod.rs b/src/libstd/fs/mod.rs index 7df6d6887a258..ba98e1ddd5573 100644 --- a/src/libstd/fs/mod.rs +++ b/src/libstd/fs/mod.rs @@ -633,6 +633,7 @@ pub fn remove_dir_all(path: P) -> io::Result<()> { /// # Examples /// /// ``` +/// # #![feature(path_ext)] /// use std::io; /// use std::fs::{self, PathExt, DirEntry}; /// use std::path::Path; @@ -771,6 +772,7 @@ pub fn set_file_times(path: P, accessed: u64, /// # Examples /// /// ``` +/// # #![feature(fs)] /// # fn foo() -> std::io::Result<()> { /// use std::fs; /// diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 1aa2189d315d2..dc390b534b7d3 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -105,6 +105,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", html_playground_url = "http://play.rust-lang.org/")] +#![doc(test(no_crate_inject))] #![feature(alloc)] #![feature(box_syntax)] diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index f4a7e8b1b9824..061c00329d202 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -112,6 +112,7 @@ macro_rules! try { /// # Examples /// /// ``` +/// # #![feature(std_misc)] /// use std::thread; /// use std::sync::mpsc; /// diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index 872411170438c..e8187dc2c4027 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -263,6 +263,7 @@ impl hash::Hash for SocketAddrV6 { /// Some examples: /// /// ```no_run +/// # #![feature(net)] /// use std::net::{SocketAddrV4, TcpStream, UdpSocket, TcpListener, Ipv4Addr}; /// /// fn main() { diff --git a/src/libstd/net/mod.rs b/src/libstd/net/mod.rs index 543fdd16f41e3..48b3247f2127a 100644 --- a/src/libstd/net/mod.rs +++ b/src/libstd/net/mod.rs @@ -91,6 +91,7 @@ impl Iterator for LookupHost { /// # Examples /// /// ```no_run +/// # #![feature(net)] /// use std::net; /// /// # fn foo() -> std::io::Result<()> { diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index f263d7d72d35d..869faa795f9c3 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -27,6 +27,7 @@ use sys_common::AsInner; /// # Examples /// /// ```no_run +/// # #![feature(net)] /// use std::io::prelude::*; /// use std::net::TcpStream; /// @@ -46,6 +47,7 @@ pub struct TcpStream(net_imp::TcpStream); /// # Examples /// /// ```no_run +/// # #![feature(net)] /// use std::net::{TcpListener, TcpStream}; /// use std::thread; /// diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs index 1ace195752658..e593bbe8e489b 100644 --- a/src/libstd/net/udp.rs +++ b/src/libstd/net/udp.rs @@ -27,6 +27,7 @@ use sys_common::AsInner; /// # Examples /// /// ```no_run +/// # #![feature(net)] /// use std::net::UdpSocket; /// /// # fn foo() -> std::io::Result<()> { diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index b5513dfd0354d..a4f06f14d49df 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -365,6 +365,7 @@ impl f32 { /// Returns the `NaN` value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let nan: f32 = Float::nan(); @@ -379,6 +380,7 @@ impl f32 { /// Returns the infinite value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -396,6 +398,7 @@ impl f32 { /// Returns the negative infinite value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -413,6 +416,7 @@ impl f32 { /// Returns `0.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let inf: f32 = Float::infinity(); @@ -431,6 +435,7 @@ impl f32 { /// Returns `-0.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let inf: f32 = Float::infinity(); @@ -449,6 +454,7 @@ impl f32 { /// Returns `1.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let one: f32 = Float::one(); @@ -525,6 +531,7 @@ impl f32 { /// Returns the smallest finite value that this type can represent. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -548,6 +555,7 @@ impl f32 { /// Returns the largest finite value that this type can represent. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -563,6 +571,7 @@ impl f32 { /// Returns `true` if this value is `NaN` and false otherwise. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -580,6 +589,7 @@ impl f32 { /// false otherwise. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -601,6 +611,7 @@ impl f32 { /// Returns `true` if this number is neither infinite nor `NaN`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -623,6 +634,7 @@ impl f32 { /// [subnormal][subnormal], or `NaN`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -650,6 +662,7 @@ impl f32 { /// predicate instead. /// /// ``` + /// # #![feature(core)] /// use std::num::{Float, FpCategory}; /// use std::f32; /// @@ -668,6 +681,7 @@ impl f32 { /// The floating point encoding is documented in the [Reference][floating-point]. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let num = 2.0f32; @@ -770,6 +784,7 @@ impl f32 { /// number is `Float::nan()`. /// /// ``` + /// # #![feature(core, std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -795,6 +810,7 @@ impl f32 { /// - `Float::nan()` if the number is `Float::nan()` /// /// ``` + /// # #![feature(core, std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -856,6 +872,7 @@ impl f32 { /// a separate multiplication operation followed by an add. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let m = 10.0; @@ -875,6 +892,7 @@ impl f32 { /// Take the reciprocal (inverse) of a number, `1/x`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 2.0; @@ -922,6 +940,7 @@ impl f32 { /// Returns NaN if `self` is a negative number. /// /// ``` + /// # #![feature(core, std_misc)] /// use std::num::Float; /// /// let positive = 4.0; @@ -940,6 +959,7 @@ impl f32 { /// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let f = 4.0; @@ -1061,6 +1081,7 @@ impl f32 { /// Convert radians to degrees. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64::consts; /// @@ -1077,6 +1098,7 @@ impl f32 { /// Convert degrees to radians. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64::consts; /// @@ -1093,6 +1115,7 @@ impl f32 { /// Constructs a floating point number of `x*2^exp`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// // 3*2^2 - 12 == 0 @@ -1114,6 +1137,7 @@ impl f32 { /// * `0.5 <= abs(x) < 1.0` /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 4.0; @@ -1141,6 +1165,7 @@ impl f32 { /// `other`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 1.0f32; @@ -1194,6 +1219,7 @@ impl f32 { /// * Else: `self - other` /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 3.0; @@ -1214,6 +1240,7 @@ impl f32 { /// Take the cubic root of a number. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 8.0; @@ -1233,6 +1260,7 @@ impl f32 { /// legs of length `x` and `y`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 2.0; @@ -1253,6 +1281,7 @@ impl f32 { /// Computes the sine of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1271,6 +1300,7 @@ impl f32 { /// Computes the cosine of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1289,6 +1319,7 @@ impl f32 { /// Computes the tangent of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1308,6 +1339,7 @@ impl f32 { /// [-1, 1]. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1329,6 +1361,7 @@ impl f32 { /// [-1, 1]. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1372,6 +1405,7 @@ impl f32 { /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)` /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1401,6 +1435,7 @@ impl f32 { /// `(sin(x), cos(x))`. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1423,6 +1458,7 @@ impl f32 { /// number is close to zero. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 7.0; @@ -1442,6 +1478,7 @@ impl f32 { /// the operations were performed separately. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64; /// @@ -1461,6 +1498,7 @@ impl f32 { /// Hyperbolic sine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1483,6 +1521,7 @@ impl f32 { /// Hyperbolic cosine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1505,6 +1544,7 @@ impl f32 { /// Hyperbolic tangent function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1527,6 +1567,7 @@ impl f32 { /// Inverse hyperbolic sine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// /// let x = 1.0; @@ -1548,6 +1589,7 @@ impl f32 { /// Inverse hyperbolic cosine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// /// let x = 1.0; @@ -1569,6 +1611,7 @@ impl f32 { /// Inverse hyperbolic tangent function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 61bddc3d18f66..9306804d1f787 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -374,6 +374,7 @@ impl f64 { /// Returns the `NaN` value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let nan: f32 = Float::nan(); @@ -388,6 +389,7 @@ impl f64 { /// Returns the infinite value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -405,6 +407,7 @@ impl f64 { /// Returns the negative infinite value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -422,6 +425,7 @@ impl f64 { /// Returns `0.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let inf: f32 = Float::infinity(); @@ -440,6 +444,7 @@ impl f64 { /// Returns `-0.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let inf: f32 = Float::infinity(); @@ -458,6 +463,7 @@ impl f64 { /// Returns `1.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let one: f32 = Float::one(); @@ -534,6 +540,7 @@ impl f64 { /// Returns the smallest finite value that this type can represent. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -557,6 +564,7 @@ impl f64 { /// Returns the largest finite value that this type can represent. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -572,6 +580,7 @@ impl f64 { /// Returns `true` if this value is `NaN` and false otherwise. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -589,6 +598,7 @@ impl f64 { /// false otherwise. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -610,6 +620,7 @@ impl f64 { /// Returns `true` if this number is neither infinite nor `NaN`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -632,6 +643,7 @@ impl f64 { /// [subnormal][subnormal], or `NaN`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -659,6 +671,7 @@ impl f64 { /// predicate instead. /// /// ``` + /// # #![feature(core)] /// use std::num::{Float, FpCategory}; /// use std::f32; /// @@ -677,6 +690,7 @@ impl f64 { /// The floating point encoding is documented in the [Reference][floating-point]. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let num = 2.0f32; @@ -779,6 +793,7 @@ impl f64 { /// number is `Float::nan()`. /// /// ``` + /// # #![feature(core, std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -804,6 +819,7 @@ impl f64 { /// - `Float::nan()` if the number is `Float::nan()` /// /// ``` + /// # #![feature(core, std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -865,6 +881,7 @@ impl f64 { /// a separate multiplication operation followed by an add. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let m = 10.0; @@ -884,6 +901,7 @@ impl f64 { /// Take the reciprocal (inverse) of a number, `1/x`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 2.0; @@ -931,6 +949,7 @@ impl f64 { /// Returns NaN if `self` is a negative number. /// /// ``` + /// # #![feature(core, std_misc)] /// use std::num::Float; /// /// let positive = 4.0; @@ -948,6 +967,7 @@ impl f64 { /// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let f = 4.0; @@ -1069,6 +1089,7 @@ impl f64 { /// Convert radians to degrees. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64::consts; /// @@ -1085,6 +1106,7 @@ impl f64 { /// Convert degrees to radians. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64::consts; /// @@ -1101,6 +1123,7 @@ impl f64 { /// Constructs a floating point number of `x*2^exp`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// // 3*2^2 - 12 == 0 @@ -1122,6 +1145,7 @@ impl f64 { /// * `0.5 <= abs(x) < 1.0` /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 4.0; @@ -1149,6 +1173,7 @@ impl f64 { /// `other`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 1.0f32; @@ -1202,6 +1227,7 @@ impl f64 { /// * Else: `self - other` /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 3.0; @@ -1222,6 +1248,7 @@ impl f64 { /// Take the cubic root of a number. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 8.0; @@ -1241,6 +1268,7 @@ impl f64 { /// legs of length `x` and `y`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 2.0; @@ -1261,6 +1289,7 @@ impl f64 { /// Computes the sine of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1279,6 +1308,7 @@ impl f64 { /// Computes the cosine of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1297,6 +1327,7 @@ impl f64 { /// Computes the tangent of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1316,6 +1347,7 @@ impl f64 { /// [-1, 1]. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1337,6 +1369,7 @@ impl f64 { /// [-1, 1]. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1380,6 +1413,7 @@ impl f64 { /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)` /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1409,6 +1443,7 @@ impl f64 { /// `(sin(x), cos(x))`. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1431,6 +1466,7 @@ impl f64 { /// number is close to zero. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 7.0; @@ -1450,6 +1486,7 @@ impl f64 { /// the operations were performed separately. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64; /// @@ -1469,6 +1506,7 @@ impl f64 { /// Hyperbolic sine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1491,6 +1529,7 @@ impl f64 { /// Hyperbolic cosine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1513,6 +1552,7 @@ impl f64 { /// Hyperbolic tangent function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1577,6 +1617,7 @@ impl f64 { /// Inverse hyperbolic tangent function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index 562094a87f4e5..b9e9433e3ee5a 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -55,6 +55,7 @@ pub trait Float /// Returns the `NaN` value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let nan: f32 = Float::nan(); @@ -67,6 +68,7 @@ pub trait Float /// Returns the infinite value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -82,6 +84,7 @@ pub trait Float /// Returns the negative infinite value. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -97,6 +100,7 @@ pub trait Float /// Returns `0.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let inf: f32 = Float::infinity(); @@ -113,6 +117,7 @@ pub trait Float /// Returns `-0.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let inf: f32 = Float::infinity(); @@ -129,6 +134,7 @@ pub trait Float /// Returns `1.0`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let one: f32 = Float::one(); @@ -182,6 +188,7 @@ pub trait Float /// Returns the smallest finite value that this type can represent. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -199,6 +206,7 @@ pub trait Float /// Returns the largest finite value that this type can represent. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -211,6 +219,7 @@ pub trait Float /// Returns `true` if this value is `NaN` and false otherwise. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -226,6 +235,7 @@ pub trait Float /// false otherwise. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -245,6 +255,7 @@ pub trait Float /// Returns `true` if this number is neither infinite nor `NaN`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -265,6 +276,7 @@ pub trait Float /// [subnormal][subnormal], or `NaN`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f32; /// @@ -291,6 +303,7 @@ pub trait Float /// predicate instead. /// /// ``` + /// # #![feature(core)] /// use std::num::{Float, FpCategory}; /// use std::f32; /// @@ -308,6 +321,7 @@ pub trait Float /// The floating point encoding is documented in the [Reference][floating-point]. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let num = 2.0f32; @@ -399,6 +413,7 @@ pub trait Float /// number is `Float::nan()`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -422,6 +437,7 @@ pub trait Float /// - `Float::nan()` if the number is `Float::nan()` /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// use std::f64; /// @@ -478,6 +494,7 @@ pub trait Float /// a separate multiplication operation followed by an add. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let m = 10.0; @@ -495,6 +512,7 @@ pub trait Float /// Take the reciprocal (inverse) of a number, `1/x`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 2.0; @@ -537,6 +555,7 @@ pub trait Float /// Returns NaN if `self` is a negative number. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let positive = 4.0; @@ -553,6 +572,7 @@ pub trait Float /// Take the reciprocal (inverse) square root of a number, `1/sqrt(x)`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let f = 4.0; @@ -662,6 +682,7 @@ pub trait Float /// Convert radians to degrees. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64::consts; /// @@ -676,6 +697,7 @@ pub trait Float /// Convert degrees to radians. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64::consts; /// @@ -690,6 +712,7 @@ pub trait Float /// Constructs a floating point number of `x*2^exp`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// // 3*2^2 - 12 == 0 @@ -707,6 +730,7 @@ pub trait Float /// * `0.5 <= abs(x) < 1.0` /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 4.0; @@ -726,6 +750,7 @@ pub trait Float /// `other`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 1.0f32; @@ -769,6 +794,7 @@ pub trait Float /// * Else: `self - other` /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 3.0; @@ -785,6 +811,7 @@ pub trait Float /// Take the cubic root of a number. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 8.0; @@ -800,6 +827,7 @@ pub trait Float /// legs of length `x` and `y`. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 2.0; @@ -817,6 +845,7 @@ pub trait Float /// Computes the sine of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -831,6 +860,7 @@ pub trait Float /// Computes the cosine of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -845,6 +875,7 @@ pub trait Float /// Computes the tangent of a number (in radians). /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -860,6 +891,7 @@ pub trait Float /// [-1, 1]. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -877,6 +909,7 @@ pub trait Float /// [-1, 1]. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -912,6 +945,7 @@ pub trait Float /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)` /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -937,6 +971,7 @@ pub trait Float /// `(sin(x), cos(x))`. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -956,6 +991,7 @@ pub trait Float /// number is close to zero. /// /// ``` + /// # #![feature(std_misc)] /// use std::num::Float; /// /// let x = 7.0; @@ -971,6 +1007,7 @@ pub trait Float /// the operations were performed separately. /// /// ``` + /// # #![feature(std_misc, core)] /// use std::num::Float; /// use std::f64; /// @@ -987,6 +1024,7 @@ pub trait Float /// Hyperbolic sine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1005,6 +1043,7 @@ pub trait Float /// Hyperbolic cosine function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1023,6 +1062,7 @@ pub trait Float /// Hyperbolic tangent function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// @@ -1069,6 +1109,7 @@ pub trait Float /// Inverse hyperbolic tangent function. /// /// ``` + /// # #![feature(core)] /// use std::num::Float; /// use std::f64; /// diff --git a/src/libstd/old_io/buffered.rs b/src/libstd/old_io/buffered.rs index 3e5f732e34545..cb67d709a143a 100644 --- a/src/libstd/old_io/buffered.rs +++ b/src/libstd/old_io/buffered.rs @@ -33,6 +33,7 @@ use vec::Vec; /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// use std::old_io::*; /// use std::old_path::Path; /// @@ -137,6 +138,7 @@ impl Reader for BufferedReader { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// use std::old_io::*; /// use std::old_path::Path; /// @@ -324,6 +326,7 @@ impl Reader for InternalBufferedWriter { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// use std::old_path::Path; diff --git a/src/libstd/old_io/comm_adapters.rs b/src/libstd/old_io/comm_adapters.rs index 7e62a21f105cd..cd8252540dacc 100644 --- a/src/libstd/old_io/comm_adapters.rs +++ b/src/libstd/old_io/comm_adapters.rs @@ -23,6 +23,7 @@ use vec::Vec; /// # Examples /// /// ``` +/// # #![feature(old_io)] /// use std::sync::mpsc::channel; /// use std::old_io::*; /// @@ -114,6 +115,7 @@ impl Reader for ChanReader { /// # Examples /// /// ``` +/// # #![feature(old_io, io)] /// # #![allow(unused_must_use)] /// use std::sync::mpsc::channel; /// use std::old_io::*; diff --git a/src/libstd/old_io/fs.rs b/src/libstd/old_io/fs.rs index 87e5b91fc2820..40a7cce81dd01 100644 --- a/src/libstd/old_io/fs.rs +++ b/src/libstd/old_io/fs.rs @@ -30,6 +30,7 @@ //! # Examples //! //! ```rust +//! # #![feature(old_io, io, old_path)] //! # #![allow(unused_must_use)] //! use std::old_io::fs::PathExtensions; //! use std::old_io::*; @@ -105,6 +106,7 @@ impl File { /// # Examples /// /// ```rust,should_fail + /// # #![feature(old_io, old_path)] /// use std::old_io::*; /// use std::old_path::Path; /// @@ -177,6 +179,7 @@ impl File { /// # Examples /// /// ``` + /// # #![feature(old_io, old_path)] /// use std::old_io::*; /// use std::old_path::Path; /// @@ -197,6 +200,7 @@ impl File { /// # Examples /// /// ``` + /// # #![feature(old_io, old_path, io)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// use std::old_path::Path; @@ -289,6 +293,7 @@ impl File { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// use std::old_path::Path; @@ -321,6 +326,7 @@ pub fn unlink(path: &Path) -> IoResult<()> { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// use std::old_io::*; /// use std::old_path::Path; /// @@ -364,6 +370,7 @@ pub fn lstat(path: &Path) -> IoResult { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// use std::old_path::Path; @@ -393,6 +400,7 @@ pub fn rename(from: &Path, to: &Path) -> IoResult<()> { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// use std::old_path::Path; @@ -444,6 +452,7 @@ pub fn copy(from: &Path, to: &Path) -> IoResult<()> { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// # #![allow(unused_must_use)] /// use std::old_io; /// use std::old_io::*; @@ -516,6 +525,7 @@ pub fn readlink(path: &Path) -> IoResult { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path, old_fs)] /// # #![allow(unused_must_use)] /// use std::old_io; /// use std::old_io::*; @@ -541,6 +551,7 @@ pub fn mkdir(path: &Path, mode: FilePermission) -> IoResult<()> { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// use std::old_path::Path; @@ -566,6 +577,7 @@ pub fn rmdir(path: &Path) -> IoResult<()> { /// # Examples /// /// ``` +/// # #![feature(old_io, old_path)] /// use std::old_io::fs::PathExtensions; /// use std::old_io; /// use std::old_io::*; diff --git a/src/libstd/old_io/mem.rs b/src/libstd/old_io/mem.rs index 1acc6abc8506f..d877a60b079d7 100644 --- a/src/libstd/old_io/mem.rs +++ b/src/libstd/old_io/mem.rs @@ -54,6 +54,7 @@ impl Writer for Vec { /// # Examples /// /// ``` +/// # #![feature(old_io, io)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// @@ -114,6 +115,7 @@ impl Writer for MemWriter { /// # Examples /// /// ``` +/// # #![feature(old_io)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// @@ -244,6 +246,7 @@ impl<'a> Buffer for &'a [u8] { /// # Examples /// /// ``` +/// # #![feature(old_io, io)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// @@ -316,6 +319,7 @@ impl<'a> Seek for BufWriter<'a> { /// # Examples /// /// ``` +/// # #![feature(old_io)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// diff --git a/src/libstd/old_io/mod.rs b/src/libstd/old_io/mod.rs index 6dfb54fd66cc4..ac908c529dca6 100644 --- a/src/libstd/old_io/mod.rs +++ b/src/libstd/old_io/mod.rs @@ -48,6 +48,7 @@ //! * Read lines from stdin //! //! ```rust +//! # #![feature(old_io, old_path)] //! use std::old_io as io; //! use std::old_io::*; //! @@ -60,6 +61,7 @@ //! * Read a complete file //! //! ```rust +//! # #![feature(old_io, old_path)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -69,6 +71,7 @@ //! * Write a line to a file //! //! ```rust +//! # #![feature(old_io, old_path)] //! # #![allow(unused_must_use)] //! use std::old_io::*; //! use std::old_path::Path; @@ -82,6 +85,7 @@ //! * Iterate over the lines of a file //! //! ```rust,no_run +//! # #![feature(old_io, old_path)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -95,6 +99,7 @@ //! * Pull the lines of a file into a vector of strings //! //! ```rust,no_run +//! # #![feature(old_io, old_path)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -106,6 +111,7 @@ //! * Make a simple TCP client connection and request //! //! ```rust +//! # #![feature(old_io)] //! # #![allow(unused_must_use)] //! use std::old_io::*; //! @@ -122,6 +128,7 @@ //! * Make a simple TCP server //! //! ```rust +//! # #![feature(old_io)] //! # fn main() { } //! # fn foo() { //! # #![allow(dead_code)] @@ -186,6 +193,7 @@ //! If you wanted to handle the error though you might write: //! //! ```rust +//! # #![feature(old_io, old_path)] //! # #![allow(unused_must_use)] //! use std::old_io::*; //! use std::old_path::Path; @@ -221,6 +229,7 @@ //! If you wanted to read several `u32`s from a file and return their product: //! //! ```rust +//! # #![feature(old_io, old_path)] //! use std::old_io::*; //! use std::old_path::Path; //! @@ -948,6 +957,7 @@ unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec, start: uint, end: uint) - /// # Examples /// /// ``` +/// # #![feature(old_io)] /// use std::old_io as io; /// use std::old_io::*; /// use std::old_io::util::LimitReader; @@ -1282,6 +1292,7 @@ impl<'a> Writer for &'a mut (Writer+'a) { /// # Examples /// /// ``` +/// # #![feature(old_io)] /// use std::old_io::util::TeeReader; /// use std::old_io::*; /// @@ -1407,6 +1418,7 @@ pub trait Buffer: Reader { /// # Examples /// /// ``` + /// # #![feature(old_io)] /// use std::old_io::*; /// /// let mut reader = BufReader::new(b"hello\nworld"); @@ -1631,6 +1643,7 @@ impl<'a, T, A: ?Sized + Acceptor> Iterator for IncomingConnections<'a, A> { /// # Examples /// /// ``` +/// # #![feature(old_io)] /// use std::old_io as io; /// /// let eof = io::standard_error(io::EndOfFile); @@ -1719,6 +1732,7 @@ pub enum FileType { /// # Examples /// /// ```no_run +/// # #![feature(old_io, old_path)] /// /// use std::old_io::fs::PathExtensions; /// use std::old_path::Path; diff --git a/src/libstd/old_io/net/ip.rs b/src/libstd/old_io/net/ip.rs index 077a507257052..f7953ac51b8e6 100644 --- a/src/libstd/old_io/net/ip.rs +++ b/src/libstd/old_io/net/ip.rs @@ -414,6 +414,7 @@ pub struct ParseError; /// Some examples: /// /// ```rust,no_run +/// # #![feature(old_io, core)] /// # #![allow(unused_must_use)] /// /// use std::old_io::{TcpStream, TcpListener}; diff --git a/src/libstd/old_io/net/pipe.rs b/src/libstd/old_io/net/pipe.rs index 77efedbc327d4..f9e5ae71e12e5 100644 --- a/src/libstd/old_io/net/pipe.rs +++ b/src/libstd/old_io/net/pipe.rs @@ -54,6 +54,7 @@ impl UnixStream { /// # Examples /// /// ``` + /// # #![feature(old_io, old_path, io)] /// # #![allow(unused_must_use)] /// use std::old_io::net::pipe::UnixStream; /// use std::old_io::*; @@ -181,6 +182,7 @@ impl UnixListener { /// # Examples /// /// ``` + /// # #![feature(old_io, io, old_path)] /// # fn foo() { /// use std::old_io::net::pipe::UnixListener; /// use std::old_io::*; diff --git a/src/libstd/old_io/net/tcp.rs b/src/libstd/old_io/net/tcp.rs index dbf3c4a4b1ecb..75f786f0bb1e4 100644 --- a/src/libstd/old_io/net/tcp.rs +++ b/src/libstd/old_io/net/tcp.rs @@ -41,6 +41,7 @@ use sys_common; /// # Examples /// /// ```no_run +/// # #![feature(old_io, io)] /// use std::old_io::*; /// /// { @@ -133,6 +134,7 @@ impl TcpStream { /// # Examples /// /// ```no_run + /// # #![feature(old_io, std_misc)] /// # #![allow(unused_must_use)] /// use std::old_io::*; /// use std::time::Duration; @@ -278,6 +280,7 @@ impl sys_common::AsInner for TcpStream { /// # Examples /// /// ``` +/// # #![feature(old_io)] /// # fn foo() { /// use std::old_io::*; /// use std::thread; @@ -374,6 +377,7 @@ impl TcpAcceptor { /// # Examples /// /// ```no_run + /// # #![feature(old_io, io)] /// use std::old_io::*; /// /// let mut a = TcpListener::bind("127.0.0.1:8482").listen().unwrap(); @@ -417,6 +421,7 @@ impl TcpAcceptor { /// # Examples /// /// ``` + /// # #![feature(old_io, io)] /// use std::old_io::*; /// use std::thread; /// diff --git a/src/libstd/old_io/net/udp.rs b/src/libstd/old_io/net/udp.rs index 97ef3da2f369a..3aa811974b3aa 100644 --- a/src/libstd/old_io/net/udp.rs +++ b/src/libstd/old_io/net/udp.rs @@ -31,6 +31,7 @@ use sys_common; /// # Examples /// /// ```rust,no_run +/// # #![feature(old_io)] /// # #![allow(unused_must_use)] /// /// use std::old_io::net::udp::UdpSocket; diff --git a/src/libstd/old_io/pipe.rs b/src/libstd/old_io/pipe.rs index b2b28453c8905..0b555e2f0ff7e 100644 --- a/src/libstd/old_io/pipe.rs +++ b/src/libstd/old_io/pipe.rs @@ -46,6 +46,7 @@ impl PipeStream { /// # Examples /// /// ```{rust,no_run} + /// # #![feature(old_io, libc, io)] /// # #![allow(unused_must_use)] /// extern crate libc; /// diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs index 54fd20f45e298..d7ede451fb8b7 100644 --- a/src/libstd/old_io/process.rs +++ b/src/libstd/old_io/process.rs @@ -61,6 +61,7 @@ use thread; /// # Examples /// /// ```should_fail +/// # #![feature(old_io)] /// use std::old_io::*; /// /// let mut child = match Command::new("/bin/cat").arg("file.txt").spawn() { @@ -164,6 +165,7 @@ pub type EnvMap = HashMap; /// to be changed (for example, by adding arguments) prior to spawning: /// /// ``` +/// # #![feature(old_io)] /// use std::old_io::*; /// /// let mut process = match Command::new("sh").arg("-c").arg("echo hello").spawn() { @@ -365,6 +367,7 @@ impl Command { /// # Examples /// /// ``` + /// # #![feature(old_io, core)] /// use std::old_io::Command; /// /// let output = match Command::new("cat").arg("foot.txt").output() { @@ -386,6 +389,7 @@ impl Command { /// # Examples /// /// ``` + /// # #![feature(old_io)] /// use std::old_io::Command; /// /// let status = match Command::new("ls").status() { @@ -660,6 +664,7 @@ impl Process { /// # Examples /// /// ```no_run + /// # #![feature(old_io, io)] /// use std::old_io::{Command, IoResult}; /// use std::old_io::process::ProcessExit; /// diff --git a/src/libstd/old_io/stdio.rs b/src/libstd/old_io/stdio.rs index a1c8630e0ec31..ef811f832b394 100644 --- a/src/libstd/old_io/stdio.rs +++ b/src/libstd/old_io/stdio.rs @@ -18,6 +18,7 @@ //! # Examples //! //! ```rust +//! # #![feature(old_io)] //! # #![allow(unused_must_use)] //! use std::old_io; //! use std::old_io::*; @@ -140,6 +141,7 @@ impl StdinReader { /// # Examples /// /// ``` + /// # #![feature(old_io)] /// use std::old_io; /// use std::old_io::*; /// diff --git a/src/libstd/old_io/tempfile.rs b/src/libstd/old_io/tempfile.rs index 90b3d1004c0b3..c0f6ddaaef7cc 100644 --- a/src/libstd/old_io/tempfile.rs +++ b/src/libstd/old_io/tempfile.rs @@ -29,6 +29,7 @@ use string::String; /// # Examples /// /// ```no_run +/// # #![feature(old_io, old_path)] /// use std::old_io::*; /// use std::old_path::{Path, GenericPath}; /// diff --git a/src/libstd/old_io/timer.rs b/src/libstd/old_io/timer.rs index 65c62a9933522..f8cba04444331 100644 --- a/src/libstd/old_io/timer.rs +++ b/src/libstd/old_io/timer.rs @@ -31,6 +31,7 @@ use sys::timer::Timer as TimerImp; /// # Examples /// /// ``` +/// # #![feature(old_io, std_misc)] /// # fn foo() { /// use std::old_io::Timer; /// use std::time::Duration; @@ -54,6 +55,7 @@ use sys::timer::Timer as TimerImp; /// the `old_io::timer` module. /// /// ``` +/// # #![feature(old_io, std_misc)] /// # fn foo() { /// use std::old_io::timer; /// use std::time::Duration; @@ -116,6 +118,7 @@ impl Timer { /// # Examples /// /// ``` + /// # #![feature(old_io, std_misc)] /// use std::old_io::Timer; /// use std::time::Duration; /// @@ -129,6 +132,7 @@ impl Timer { /// ``` /// /// ``` + /// # #![feature(old_io, std_misc)] /// use std::old_io::Timer; /// use std::time::Duration; /// @@ -168,6 +172,7 @@ impl Timer { /// # Examples /// /// ``` + /// # #![feature(old_io, std_misc)] /// use std::old_io::Timer; /// use std::time::Duration; /// @@ -187,6 +192,7 @@ impl Timer { /// ``` /// /// ``` + /// # #![feature(old_io, std_misc)] /// use std::old_io::Timer; /// use std::time::Duration; /// diff --git a/src/libstd/old_path/mod.rs b/src/libstd/old_path/mod.rs index 909fa4062b604..50bda04b5d074 100644 --- a/src/libstd/old_path/mod.rs +++ b/src/libstd/old_path/mod.rs @@ -49,6 +49,7 @@ //! ## Examples //! //! ```rust +//! # #![feature(old_path, old_io)] //! use std::old_io::fs::PathExtensions; //! use std::old_path::{Path, GenericPath}; //! @@ -143,6 +144,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -168,6 +170,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -191,6 +194,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -209,6 +213,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -224,6 +229,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -240,6 +246,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -259,6 +266,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -277,6 +285,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -293,6 +302,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -313,6 +323,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -329,6 +340,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -349,6 +361,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -377,6 +390,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -398,6 +412,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -426,6 +441,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -445,6 +461,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -472,6 +489,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -523,6 +541,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -549,6 +568,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -574,6 +594,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -594,6 +615,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -610,6 +632,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -635,6 +658,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -665,6 +689,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -683,6 +708,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -709,6 +735,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -732,6 +759,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -750,6 +778,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -769,6 +798,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -789,6 +819,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} @@ -806,6 +837,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// # foo(); /// # #[cfg(windows)] fn foo() {} diff --git a/src/libstd/old_path/windows.rs b/src/libstd/old_path/windows.rs index cea2c238ecec2..4f367e3052673 100644 --- a/src/libstd/old_path/windows.rs +++ b/src/libstd/old_path/windows.rs @@ -605,6 +605,7 @@ impl Path { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// println!("{}", Path::new(r"C:\some\path").display()); /// ``` @@ -620,6 +621,7 @@ impl Path { /// # Examples /// /// ``` + /// # #![feature(old_path)] /// use std::old_path::{Path, GenericPath}; /// let path = Path::new_opt(r"C:\some\path"); /// diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 3870b8614ffdf..6296cd9554cce 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -125,6 +125,7 @@ pub const TMPBUF_SZ : uint = 1000; /// # Examples /// /// ``` +/// # #![feature(os, old_path)] /// use std::os; /// use std::old_path::{Path, GenericPath}; /// @@ -146,6 +147,7 @@ pub fn getcwd() -> IoResult { /// # Examples /// /// ``` +/// # #![feature(os)] /// use std::os; /// /// // We will iterate through the references to the element returned by os::env(); @@ -182,6 +184,7 @@ pub fn env_as_bytes() -> Vec<(Vec, Vec)> { /// # Examples /// /// ``` +/// # #![feature(os)] /// use std::os; /// /// let key = "HOME"; @@ -224,6 +227,7 @@ fn byteify(s: OsString) -> Vec { /// # Examples /// /// ``` +/// # #![feature(os)] /// use std::os; /// /// let key = "KEY"; @@ -265,6 +269,7 @@ pub fn unsetenv(n: &str) { /// # Examples /// /// ``` +/// # #![feature(old_path, os)] /// use std::os; /// use std::old_path::{Path, GenericPath}; /// @@ -298,6 +303,7 @@ pub fn split_paths(unparsed: T) -> Vec { /// # Examples /// /// ``` +/// # #![feature(os, old_path, core)] /// use std::os; /// use std::old_path::Path; /// @@ -359,6 +365,7 @@ pub fn dll_filename(base: &str) -> String { /// # Examples /// /// ``` +/// # #![feature(os, old_path)] /// use std::os; /// use std::old_path::{Path, GenericPath}; /// @@ -380,6 +387,7 @@ pub fn self_exe_name() -> Option { /// # Examples /// /// ``` +/// # #![feature(os, old_path)] /// use std::os; /// use std::old_path::{Path, GenericPath}; /// @@ -410,6 +418,7 @@ pub fn self_exe_path() -> Option { /// # Examples /// /// ``` +/// # #![feature(os, old_path)] /// use std::os; /// use std::old_path::{Path, GenericPath}; /// @@ -501,6 +510,7 @@ pub fn tmpdir() -> Path { /// # Examples /// /// ``` +/// # #![feature(os, old_path)] /// use std::os; /// use std::old_path::{Path, GenericPath}; /// @@ -533,6 +543,7 @@ pub fn make_absolute(p: &Path) -> IoResult { /// # Examples /// /// ``` +/// # #![feature(os, old_path)] /// use std::os; /// use std::old_path::{Path, GenericPath}; /// @@ -555,6 +566,7 @@ pub fn errno() -> i32 { /// # Examples /// /// ``` +/// # #![feature(os)] /// use std::os; /// /// // Same as println!("{}", last_os_error()); @@ -751,6 +763,7 @@ extern "system" { /// # Examples /// /// ``` +/// # #![feature(os)] /// use std::os; /// /// // Prints each argument on a separate line diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs index 69053252ed1de..656ca980624dc 100644 --- a/src/libstd/rand/mod.rs +++ b/src/libstd/rand/mod.rs @@ -58,6 +58,7 @@ //! # Examples //! //! ```rust +//! # #![feature(rand)] //! use std::rand; //! use std::rand::Rng; //! @@ -68,6 +69,7 @@ //! ``` //! //! ```rust +//! # #![feature(rand)] //! use std::rand; //! //! let tuple = rand::random::<(f64, char)>(); @@ -92,6 +94,7 @@ //! multiply this fraction by 4. //! //! ``` +//! # #![feature(rand)] //! use std::rand; //! use std::rand::distributions::{IndependentSample, Range}; //! @@ -134,6 +137,7 @@ //! [Monty Hall Problem]: http://en.wikipedia.org/wiki/Monty_Hall_problem //! //! ``` +//! # #![feature(rand)] //! use std::rand; //! use std::rand::Rng; //! use std::rand::distributions::{IndependentSample, Range}; @@ -384,6 +388,7 @@ impl Rng for ThreadRng { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// /// let x: u8 = rand::random(); @@ -400,6 +405,7 @@ impl Rng for ThreadRng { /// Caching the thread local random number generator: /// /// ``` +/// # #![feature(rand)] /// use std::rand; /// use std::rand::Rng; /// @@ -427,6 +433,7 @@ pub fn random() -> T { /// # Examples /// /// ``` +/// # #![feature(rand)] /// use std::rand::{thread_rng, sample}; /// /// let mut rng = thread_rng(); diff --git a/src/libstd/rand/reader.rs b/src/libstd/rand/reader.rs index 5231b122b9e53..d3a8fa864fce3 100644 --- a/src/libstd/rand/reader.rs +++ b/src/libstd/rand/reader.rs @@ -24,6 +24,7 @@ use result::Result::{Ok, Err}; /// # Examples /// /// ``` +/// # #![feature(rand, old_io)] /// use std::rand::{reader, Rng}; /// use std::old_io::MemReader; /// diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index 4430cc3b0af82..69c5267ab69fc 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -69,6 +69,7 @@ pub struct Condvar { inner: Box } /// # Examples /// /// ``` +/// # #![feature(std_misc)] /// use std::sync::{StaticCondvar, CONDVAR_INIT}; /// /// static CVAR: StaticCondvar = CONDVAR_INIT; diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs index ee9bcd3dd89bf..3c7fecb75153a 100644 --- a/src/libstd/sync/future.rs +++ b/src/libstd/sync/future.rs @@ -14,6 +14,7 @@ //! # Examples //! //! ``` +//! # #![feature(std_misc)] //! use std::sync::Future; //! //! // a fake, for now diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 123dad978f55a..cb8acf14e1386 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -119,6 +119,7 @@ //! after 10 seconds no matter what: //! //! ```no_run +//! # #![feature(std_misc, old_io)] //! use std::sync::mpsc::channel; //! use std::old_io::timer::Timer; //! use std::time::Duration; @@ -143,6 +144,7 @@ //! has been inactive for 5 seconds: //! //! ```no_run +//! # #![feature(std_misc, old_io)] //! use std::sync::mpsc::channel; //! use std::old_io::timer::Timer; //! use std::time::Duration; diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs index b5739c36aa912..0f936641cdc75 100644 --- a/src/libstd/sync/mpsc/select.rs +++ b/src/libstd/sync/mpsc/select.rs @@ -27,6 +27,7 @@ //! # Examples //! //! ```rust +//! # #![feature(std_misc)] //! use std::sync::mpsc::channel; //! //! let (tx1, rx1) = channel(); @@ -119,6 +120,7 @@ impl Select { /// # Examples /// /// ``` + /// # #![feature(std_misc)] /// use std::sync::mpsc::Select; /// /// let select = Select::new(); diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 130fd1d7dc83b..2bf75cf1d3764 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -85,6 +85,7 @@ use fmt; /// To recover from a poisoned mutex: /// /// ``` +/// # #![feature(std_misc)] /// use std::sync::{Arc, Mutex}; /// use std::thread; /// @@ -136,6 +137,7 @@ unsafe impl Sync for Mutex { } /// # Examples /// /// ``` +/// # #![feature(std_misc)] /// use std::sync::{StaticMutex, MUTEX_INIT}; /// /// static LOCK: StaticMutex = MUTEX_INIT; diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 368e88e4e8b41..6e94db6d7530c 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -77,6 +77,7 @@ unsafe impl Sync for RwLock {} /// # Examples /// /// ``` +/// # #![feature(std_misc)] /// use std::sync::{StaticRwLock, RW_LOCK_INIT}; /// /// static LOCK: StaticRwLock = RW_LOCK_INIT; diff --git a/src/libstd/sync/semaphore.rs b/src/libstd/sync/semaphore.rs index 2f9873950b62e..059cce572459e 100644 --- a/src/libstd/sync/semaphore.rs +++ b/src/libstd/sync/semaphore.rs @@ -25,6 +25,7 @@ use sync::{Mutex, Condvar}; /// # Examples /// /// ``` +/// # #![feature(std_misc)] /// use std::sync::Semaphore; /// /// // Create a semaphore that represents 5 resources diff --git a/src/libstd/sync/task_pool.rs b/src/libstd/sync/task_pool.rs index 8a1946b86ab4a..51cf70e615bcc 100644 --- a/src/libstd/sync/task_pool.rs +++ b/src/libstd/sync/task_pool.rs @@ -61,6 +61,7 @@ impl<'a> Drop for Sentinel<'a> { /// # Examples /// /// ``` +/// # #![feature(std_misc, core)] /// use std::sync::TaskPool; /// use std::iter::AdditiveIterator; /// use std::sync::mpsc::channel; diff --git a/src/libstd/thread_local/scoped.rs b/src/libstd/thread_local/scoped.rs index 86e6c059a70db..34b581f7fdaa7 100644 --- a/src/libstd/thread_local/scoped.rs +++ b/src/libstd/thread_local/scoped.rs @@ -24,6 +24,7 @@ //! # Examples //! //! ``` +//! # #![feature(std_misc)] //! scoped_thread_local!(static FOO: u32); //! //! // Initially each scoped slot is empty. @@ -142,6 +143,7 @@ impl Key { /// # Examples /// /// ``` + /// # #![feature(std_misc)] /// scoped_thread_local!(static FOO: u32); /// /// FOO.set(&100, || { @@ -194,6 +196,7 @@ impl Key { /// # Examples /// /// ```no_run + /// # #![feature(std_misc)] /// scoped_thread_local!(static FOO: u32); /// /// FOO.with(|slot| { diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index f517dca53cdd2..990ce769d9b0e 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -19,6 +19,7 @@ //! # Examples //! //! ```no_run +//! # #![feature(rustc_private)] //! extern crate term; //! //! use std::io::prelude::*; diff --git a/src/libunicode/char.rs b/src/libunicode/char.rs index e0f013cbc8051..db5a25b9bedca 100644 --- a/src/libunicode/char.rs +++ b/src/libunicode/char.rs @@ -209,6 +209,7 @@ pub trait CharExt { /// In both of these examples, 'ß' takes two bytes to encode. /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 2]; /// /// let result = 'ß'.encode_utf8(&mut b); @@ -219,6 +220,7 @@ pub trait CharExt { /// A buffer that's too small: /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 1]; /// /// let result = 'ß'.encode_utf8(&mut b); @@ -241,6 +243,7 @@ pub trait CharExt { /// In both of these examples, 'ß' takes one `u16` to encode. /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 1]; /// /// let result = 'ß'.encode_utf16(&mut b); @@ -251,6 +254,7 @@ pub trait CharExt { /// A buffer that's too small: /// /// ``` + /// # #![feature(unicode)] /// let mut b = [0; 0]; /// /// let result = 'ß'.encode_utf8(&mut b); diff --git a/src/libunicode/lib.rs b/src/libunicode/lib.rs index a09c0cb3bd630..6879fa7b3ba68 100644 --- a/src/libunicode/lib.rs +++ b/src/libunicode/lib.rs @@ -35,6 +35,7 @@ #![feature(no_std)] #![no_std] #![feature(core)] +#![doc(test(no_crate_inject))] extern crate core; diff --git a/src/libunicode/u_str.rs b/src/libunicode/u_str.rs index 485065685f1df..de3a593143e79 100644 --- a/src/libunicode/u_str.rs +++ b/src/libunicode/u_str.rs @@ -481,19 +481,24 @@ impl<'a> Iterator for Utf16Items<'a> { /// # Examples /// /// ``` +/// # #![feature(unicode)] +/// extern crate unicode; +/// /// use unicode::str::Utf16Item::{ScalarValue, LoneSurrogate}; /// -/// // 𝄞music -/// let v = [0xD834, 0xDD1E, 0x006d, 0x0075, -/// 0x0073, 0xDD1E, 0x0069, 0x0063, -/// 0xD834]; +/// fn main() { +/// // 𝄞music +/// let v = [0xD834, 0xDD1E, 0x006d, 0x0075, +/// 0x0073, 0xDD1E, 0x0069, 0x0063, +/// 0xD834]; /// -/// assert_eq!(unicode::str::utf16_items(&v).collect::>(), -/// vec![ScalarValue('𝄞'), -/// ScalarValue('m'), ScalarValue('u'), ScalarValue('s'), -/// LoneSurrogate(0xDD1E), -/// ScalarValue('i'), ScalarValue('c'), -/// LoneSurrogate(0xD834)]); +/// assert_eq!(unicode::str::utf16_items(&v).collect::>(), +/// vec![ScalarValue('𝄞'), +/// ScalarValue('m'), ScalarValue('u'), ScalarValue('s'), +/// LoneSurrogate(0xDD1E), +/// ScalarValue('i'), ScalarValue('c'), +/// LoneSurrogate(0xD834)]); +/// } /// ``` pub fn utf16_items<'a>(v: &'a [u16]) -> Utf16Items<'a> { Utf16Items { iter : v.iter() } diff --git a/src/test/pretty/default-trait-impl.rs b/src/test/pretty/default-trait-impl.rs index d148bb15e99bc..509bee9def273 100644 --- a/src/test/pretty/default-trait-impl.rs +++ b/src/test/pretty/default-trait-impl.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(optin_builtin_traits)] +#![feature(optin_builtin_traits, core)] // pp-exact From 8c93a79e387f5197e8b8fe73b3d87d2b101b7c4a Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 22 Mar 2015 13:13:15 -0700 Subject: [PATCH 58/69] rustdoc: Replace no-pretty-expanded with pretty-expanded Now that features must be declared expanded source often does not compile. This adds 'pretty-expanded' to a bunch of test cases that still work. --- src/compiletest/header.rs | 19 ++++++++++--------- src/compiletest/runtest.rs | 2 +- src/test/run-pass/alias-uninit-value.rs | 2 ++ .../run-pass/alloca-from-derived-tydesc.rs | 2 ++ .../run-pass/anon-extern-mod-cross-crate-2.rs | 2 ++ src/test/run-pass/anon-extern-mod.rs | 2 ++ src/test/run-pass/argument-passing.rs | 2 ++ src/test/run-pass/arith-2.rs | 2 ++ src/test/run-pass/arith-unsigned.rs | 2 ++ src/test/run-pass/artificial-block.rs | 2 ++ src/test/run-pass/as-precedence.rs | 2 ++ src/test/run-pass/asm-concat-src.rs | 2 ++ src/test/run-pass/asm-in-out-operand.rs | 2 ++ src/test/run-pass/asm-out-assign.rs | 2 ++ src/test/run-pass/assign-assign.rs | 2 ++ src/test/run-pass/assignability-trait.rs | 2 ++ src/test/run-pass/associated-types-basic.rs | 2 ++ .../associated-types-binding-in-trait.rs | 2 ++ ...ssociated-types-binding-in-where-clause.rs | 2 ++ src/test/run-pass/associated-types-bound.rs | 2 ++ .../associated-types-conditional-dispatch.rs | 2 ++ .../associated-types-constant-type.rs | 2 ++ ...ciated-types-doubleendediterator-object.rs | 2 ++ ...ted-types-duplicate-binding-in-env-hrtb.rs | 2 ++ ...sociated-types-duplicate-binding-in-env.rs | 2 ++ .../associated-types-enum-field-named.rs | 2 ++ .../associated-types-enum-field-numbered.rs | 2 ++ src/test/run-pass/associated-types-eq-obj.rs | 2 ++ .../associated-types-in-default-method.rs | 2 ++ src/test/run-pass/associated-types-in-fn.rs | 2 ++ .../associated-types-in-impl-generics.rs | 2 ++ .../associated-types-in-inherent-method.rs | 2 ++ .../run-pass/associated-types-issue-20220.rs | 2 ++ .../run-pass/associated-types-issue-20371.rs | 2 ++ .../run-pass/associated-types-issue-21212.rs | 2 ++ .../associated-types-iterator-binding.rs | 2 ++ .../associated-types-nested-projections.rs | 2 ++ ...iated-types-normalize-in-bounds-binding.rs | 2 ++ ...sociated-types-normalize-in-bounds-ufcs.rs | 2 ++ .../associated-types-normalize-in-bounds.rs | 2 ++ ...ociated-types-normalize-unifield-struct.rs | 2 ++ ...om-type-param-via-bound-in-where-clause.rs | 2 ++ ...ypes-projection-from-known-type-in-impl.rs | 2 ++ ...ociated-types-projection-in-object-type.rs | 2 ++ ...sociated-types-projection-in-supertrait.rs | 2 ++ ...ciated-types-projection-in-where-clause.rs | 2 ++ ...ed-path-with-trait-with-type-parameters.rs | 2 ++ .../associated-types-ref-from-struct.rs | 2 ++ .../associated-types-ref-in-struct-literal.rs | 2 ++ ...ciated-types-region-erasure-issue-20582.rs | 2 ++ .../associated-types-resolve-lifetime.rs | 2 ++ src/test/run-pass/associated-types-return.rs | 2 ++ src/test/run-pass/associated-types-simple.rs | 2 ++ src/test/run-pass/associated-types-stream.rs | 2 ++ .../associated-types-struct-field-named.rs | 2 ++ .../associated-types-struct-field-numbered.rs | 2 ++ .../run-pass/associated-types-sugar-path.rs | 2 ++ .../astconv-cycle-between-trait-and-type.rs | 2 ++ src/test/run-pass/attr-before-view-item.rs | 2 ++ src/test/run-pass/attr-before-view-item2.rs | 2 ++ src/test/run-pass/attr-main-2.rs | 2 ++ src/test/run-pass/attr-main.rs | 2 ++ src/test/run-pass/attr-mix-new.rs | 2 ++ src/test/run-pass/attr-no-drop-flag-size.rs | 2 ++ src/test/run-pass/attr-start.rs | 2 ++ src/test/run-pass/attr.rs | 2 ++ src/test/run-pass/auto-loop.rs | 2 ++ src/test/run-pass/auto-ref-sliceable.rs | 2 ++ src/test/run-pass/autobind.rs | 2 ++ .../autoderef-and-borrow-method-receiver.rs | 2 ++ .../run-pass/autoderef-method-on-trait.rs | 2 ++ .../run-pass/autoderef-method-priority.rs | 2 ++ .../autoderef-method-twice-but-not-thrice.rs | 2 ++ src/test/run-pass/autoderef-method-twice.rs | 2 ++ src/test/run-pass/autoderef-method.rs | 2 ++ .../autoref-intermediate-types-issue-3585.rs | 2 ++ src/test/run-pass/big-literals.rs | 2 ++ .../run-pass/binary-minus-without-space.rs | 2 ++ src/test/run-pass/bind-by-move.rs | 2 ++ .../bind-field-short-with-modifiers.rs | 2 ++ src/test/run-pass/bitv-perf-test.rs | 2 ++ .../blind-item-mixed-crate-use-item.rs | 2 ++ .../run-pass/blind-item-mixed-use-item.rs | 2 ++ src/test/run-pass/block-arg-call-as.rs | 2 ++ src/test/run-pass/block-expr-precedence.rs | 2 ++ src/test/run-pass/block-fn-coerce.rs | 2 ++ src/test/run-pass/bool-not.rs | 2 ++ src/test/run-pass/bool.rs | 2 ++ .../run-pass/borrow-by-val-method-receiver.rs | 2 ++ src/test/run-pass/borrow-tuple-fields.rs | 2 ++ .../run-pass/borrowck-assign-to-subfield.rs | 2 ++ src/test/run-pass/borrowck-binding-mutbl.rs | 2 ++ .../borrowck-borrow-from-expr-block.rs | 2 ++ .../borrowck-borrow-of-mut-base-ptr-safe.rs | 2 ++ .../run-pass/borrowck-closures-two-imm.rs | 2 ++ .../run-pass/borrowck-field-sensitivity.rs | 2 ++ .../run-pass/borrowck-fixed-length-vecs.rs | 2 ++ .../run-pass/borrowck-freeze-frozen-mut.rs | 2 ++ src/test/run-pass/borrowck-lend-args.rs | 2 ++ .../borrowck-macro-interaction-issue-6304.rs | 2 ++ .../run-pass/borrowck-move-by-capture-ok.rs | 2 ++ .../run-pass/borrowck-mut-vec-as-imm-slice.rs | 2 ++ .../borrowck-pat-reassign-no-binding.rs | 2 ++ src/test/run-pass/borrowck-rvalues-mutable.rs | 2 ++ .../borrowck-scope-of-deref-issue-4666.rs | 2 ++ .../run-pass/borrowck-static-item-in-fn.rs | 2 ++ src/test/run-pass/borrowck-trait-lifetime.rs | 2 ++ src/test/run-pass/borrowck-uniq-via-ref.rs | 2 ++ src/test/run-pass/borrowck-univariant-enum.rs | 2 ++ src/test/run-pass/borrowck-use-mut-borrow.rs | 2 ++ src/test/run-pass/borrowed-ptr-pattern-2.rs | 2 ++ src/test/run-pass/borrowed-ptr-pattern-3.rs | 2 ++ .../borrowed-ptr-pattern-infallible.rs | 2 ++ .../run-pass/borrowed-ptr-pattern-option.rs | 2 ++ src/test/run-pass/borrowed-ptr-pattern.rs | 2 ++ src/test/run-pass/box-new.rs | 2 ++ src/test/run-pass/break-value.rs | 2 ++ src/test/run-pass/break.rs | 2 ++ src/test/run-pass/bug-7183-generics.rs | 2 ++ src/test/run-pass/bug-7295.rs | 2 ++ ...ltin-superkinds-capabilities-transitive.rs | 2 ++ .../builtin-superkinds-capabilities-xc.rs | 2 ++ .../builtin-superkinds-capabilities.rs | 2 ++ .../builtin-superkinds-in-metadata.rs | 2 ++ .../builtin-superkinds-phantom-typaram.rs | 2 ++ .../run-pass/builtin-superkinds-self-type.rs | 2 ++ .../run-pass/builtin-superkinds-simple.rs | 2 ++ .../run-pass/builtin-superkinds-typaram.rs | 2 ++ .../run-pass/by-value-self-in-mut-slot.rs | 2 ++ src/test/run-pass/c-stack-as-value.rs | 2 ++ src/test/run-pass/c-stack-returning-int64.rs | 2 ++ .../call-closure-from-overloaded-op.rs | 2 ++ src/test/run-pass/can-copy-pod.rs | 2 ++ .../cancel-clean-via-immediate-rvalue-ref.rs | 2 ++ .../capture-clauses-boxed-closures.rs | 2 ++ .../capture-clauses-unboxed-closures.rs | 2 ++ src/test/run-pass/capturing-logging.rs | 2 ++ src/test/run-pass/cast-in-array-size.rs | 2 ++ src/test/run-pass/cast.rs | 2 ++ src/test/run-pass/cci_capture_clause.rs | 2 ++ src/test/run-pass/cci_nested_exe.rs | 2 ++ src/test/run-pass/cell-does-not-clone.rs | 2 ++ src/test/run-pass/cfg-attr-cfg.rs | 2 ++ src/test/run-pass/cfg-attr-crate.rs | 2 ++ src/test/run-pass/cfg-family.rs | 2 ++ src/test/run-pass/cfg-macros-foo.rs | 2 ++ src/test/run-pass/cfg-macros-notfoo.rs | 2 ++ src/test/run-pass/cfg-match-arm.rs | 2 ++ src/test/run-pass/cfg-target-family.rs | 2 ++ src/test/run-pass/cfg_inner_static.rs | 2 ++ src/test/run-pass/cfgs-on-items.rs | 2 ++ src/test/run-pass/char.rs | 2 ++ src/test/run-pass/check-static-mut-slices.rs | 2 ++ .../check-static-recursion-foreign.rs | 2 ++ src/test/run-pass/check-static-slice.rs | 2 ++ src/test/run-pass/child-outlives-parent.rs | 2 ++ src/test/run-pass/class-dtor.rs | 2 ++ src/test/run-pass/class-exports.rs | 2 ++ src/test/run-pass/class-method-cross-crate.rs | 2 ++ .../run-pass/class-methods-cross-crate.rs | 2 ++ src/test/run-pass/class-methods.rs | 2 ++ .../class-poly-methods-cross-crate.rs | 2 ++ src/test/run-pass/class-poly-methods.rs | 2 ++ src/test/run-pass/class-str-field.rs | 2 ++ src/test/run-pass/class-typarams.rs | 2 ++ src/test/run-pass/classes-cross-crate.rs | 2 ++ src/test/run-pass/classes-self-referential.rs | 2 ++ .../run-pass/classes-simple-cross-crate.rs | 2 ++ src/test/run-pass/classes-simple-method.rs | 2 ++ src/test/run-pass/classes-simple.rs | 2 ++ src/test/run-pass/cleanup-arm-conditional.rs | 2 ++ .../cleanup-rvalue-during-if-and-while.rs | 2 ++ ...nup-rvalue-temp-during-incomplete-alloc.rs | 2 ++ src/test/run-pass/cleanup-shortcircuit.rs | 2 ++ src/test/run-pass/clone-with-exterior.rs | 2 ++ .../closure-bounds-can-capture-chan.rs | 2 ++ src/test/run-pass/closure-inference.rs | 2 ++ src/test/run-pass/closure-inference2.rs | 2 ++ src/test/run-pass/cmp-default.rs | 2 ++ src/test/run-pass/coerce-expect-unsized.rs | 2 ++ src/test/run-pass/coerce-match-calls.rs | 2 ++ src/test/run-pass/coerce-match.rs | 2 ++ .../run-pass/coerce-overloaded-autoderef.rs | 2 ++ .../run-pass/coerce-reborrow-imm-ptr-arg.rs | 2 ++ .../run-pass/coerce-reborrow-imm-ptr-rcvr.rs | 2 ++ .../run-pass/coerce-reborrow-imm-vec-arg.rs | 2 ++ .../run-pass/coerce-reborrow-imm-vec-rcvr.rs | 2 ++ .../run-pass/coerce-reborrow-mut-ptr-arg.rs | 2 ++ .../run-pass/coerce-reborrow-mut-ptr-rcvr.rs | 2 ++ .../run-pass/coerce-reborrow-mut-vec-arg.rs | 2 ++ .../run-pass/coerce-reborrow-mut-vec-rcvr.rs | 2 ++ src/test/run-pass/coerce-unify-return.rs | 2 ++ src/test/run-pass/coherence-bigint-int.rs | 2 ++ src/test/run-pass/coherence-bigint-vecint.rs | 2 ++ src/test/run-pass/coherence-blanket.rs | 2 ++ .../coherence-covered-type-parameter.rs | 2 ++ src/test/run-pass/coherence-cow-1.rs | 2 ++ src/test/run-pass/coherence-cow-2.rs | 2 ++ src/test/run-pass/coherence-impl-in-fn.rs | 2 ++ .../coherence-iterator-vec-any-elem.rs | 2 ++ src/test/run-pass/coherence-iterator-vec.rs | 2 ++ src/test/run-pass/coherence-local-1.rs | 2 ++ src/test/run-pass/coherence-local-2.rs | 2 ++ .../run-pass/coherence-multidispatch-tuple.rs | 2 ++ .../run-pass/coherence-negative-impls-safe.rs | 2 ++ src/test/run-pass/colorful-write-macros.rs | 2 -- src/test/run-pass/compare-generic-enums.rs | 2 ++ src/test/run-pass/concat.rs | 2 ++ src/test/run-pass/conditional-compile-arch.rs | 2 ++ src/test/run-pass/conditional-compile.rs | 2 ++ .../run-pass/conditional-debug-macro-off.rs | 2 ++ src/test/run-pass/const-autoderef.rs | 2 ++ src/test/run-pass/const-big-enum.rs | 2 ++ src/test/run-pass/const-binops.rs | 2 ++ .../run-pass/const-block-cross-crate-fn.rs | 2 ++ .../const-block-item-macro-codegen.rs | 2 ++ src/test/run-pass/const-block-item.rs | 2 ++ src/test/run-pass/const-block.rs | 2 ++ src/test/run-pass/const-bound.rs | 2 ++ src/test/run-pass/const-cast-ptr-int.rs | 2 ++ src/test/run-pass/const-cast.rs | 2 ++ src/test/run-pass/const-const.rs | 2 ++ src/test/run-pass/const-contents.rs | 2 ++ src/test/run-pass/const-cross-crate-const.rs | 2 ++ src/test/run-pass/const-cross-crate-extern.rs | 2 ++ src/test/run-pass/const-deref.rs | 2 ++ src/test/run-pass/const-enum-byref-self.rs | 2 ++ src/test/run-pass/const-enum-byref.rs | 2 ++ src/test/run-pass/const-enum-cast.rs | 2 ++ src/test/run-pass/const-enum-ptr.rs | 2 ++ src/test/run-pass/const-enum-struct.rs | 2 ++ src/test/run-pass/const-enum-struct2.rs | 2 ++ src/test/run-pass/const-enum-structlike.rs | 2 ++ src/test/run-pass/const-enum-tuple.rs | 2 ++ src/test/run-pass/const-enum-tuple2.rs | 2 ++ src/test/run-pass/const-enum-tuplestruct.rs | 2 ++ src/test/run-pass/const-enum-tuplestruct2.rs | 2 ++ src/test/run-pass/const-enum-vec-index.rs | 2 ++ src/test/run-pass/const-enum-vec-ptr.rs | 2 ++ src/test/run-pass/const-enum-vector.rs | 2 ++ .../const-expr-in-fixed-length-vec.rs | 2 ++ src/test/run-pass/const-expr-in-vec-repeat.rs | 2 ++ src/test/run-pass/const-extern-function.rs | 2 ++ src/test/run-pass/const-fn-val.rs | 2 ++ src/test/run-pass/const-negative.rs | 2 ++ src/test/run-pass/const-nullary-enum.rs | 2 ++ .../run-pass/const-nullary-univariant-enum.rs | 2 ++ .../run-pass/const-region-ptrs-noncopy.rs | 2 ++ src/test/run-pass/const-str-ptr.rs | 2 ++ src/test/run-pass/const-struct-offsets.rs | 2 ++ src/test/run-pass/const-tuple-struct.rs | 2 ++ src/test/run-pass/const-unit-struct.rs | 2 ++ src/test/run-pass/const-vec-of-fns.rs | 2 ++ src/test/run-pass/const-vec-syntax.rs | 2 ++ src/test/run-pass/consts-in-patterns.rs | 2 ++ src/test/run-pass/copy-out-of-array-1.rs | 2 ++ src/test/run-pass/crate-leading-sep.rs | 2 ++ .../crate-method-reexport-grrrrrrr.rs | 2 ++ src/test/run-pass/crate-name-attr-used.rs | 2 ++ src/test/run-pass/cross-crate-const-pat.rs | 2 ++ .../cross-crate-newtype-struct-pat.rs | 2 ++ src/test/run-pass/cycle-generic-bound.rs | 2 ++ src/test/run-pass/cycle-trait-type-trait.rs | 2 ++ .../run-pass/dead-code-leading-underscore.rs | 2 ++ src/test/run-pass/deep.rs | 2 ++ src/test/run-pass/default-method-parsing.rs | 2 ++ .../run-pass/deprecated-no-split-stack.rs | 2 ++ src/test/run-pass/deref-mut-on-ref.rs | 2 ++ src/test/run-pass/deref-on-ref.rs | 2 ++ src/test/run-pass/deref-rc.rs | 2 ++ src/test/run-pass/deref.rs | 2 ++ src/test/run-pass/deriving-bounds.rs | 2 ++ src/test/run-pass/deriving-clone-enum.rs | 2 ++ .../run-pass/deriving-clone-generic-enum.rs | 2 ++ .../run-pass/deriving-clone-generic-struct.rs | 2 ++ .../deriving-clone-generic-tuple-struct.rs | 2 ++ src/test/run-pass/deriving-clone-struct.rs | 2 ++ .../run-pass/deriving-clone-tuple-struct.rs | 2 ++ .../run-pass/deriving-cmp-generic-enum.rs | 2 ++ .../deriving-cmp-generic-struct-enum.rs | 2 ++ .../run-pass/deriving-cmp-generic-struct.rs | 2 ++ .../deriving-cmp-generic-tuple-struct.rs | 2 ++ .../run-pass/deriving-cmp-shortcircuit.rs | 2 ++ src/test/run-pass/deriving-default-box.rs | 2 ++ .../deriving-encodable-decodable-box.rs | 2 ++ ...riving-encodable-decodable-cell-refcell.rs | 2 ++ .../run-pass/deriving-enum-single-variant.rs | 2 ++ src/test/run-pass/deriving-hash.rs | 2 ++ src/test/run-pass/deriving-in-macro.rs | 2 ++ src/test/run-pass/deriving-meta-multiple.rs | 2 ++ src/test/run-pass/deriving-meta.rs | 2 ++ src/test/run-pass/deriving-rand.rs | 2 ++ .../deriving-via-extension-hash-enum.rs | 2 ++ .../deriving-via-extension-hash-struct.rs | 2 ++ src/test/run-pass/destructure-array-1.rs | 2 ++ src/test/run-pass/die-macro.rs | 2 ++ src/test/run-pass/div-mod.rs | 2 ++ src/test/run-pass/double-ref.rs | 2 ++ src/test/run-pass/drop-on-empty-block-exit.rs | 2 ++ src/test/run-pass/drop-on-ret.rs | 2 ++ src/test/run-pass/drop-struct-as-object.rs | 2 ++ src/test/run-pass/drop-uninhabited-enum.rs | 2 ++ .../run-pass/drop-with-type-ascription-1.rs | 2 ++ .../run-pass/drop-with-type-ascription-2.rs | 2 ++ src/test/run-pass/dropck_tarena_sound_drop.rs | 2 ++ src/test/run-pass/dst-coercions.rs | 2 ++ src/test/run-pass/dst-deref-mut.rs | 2 ++ src/test/run-pass/dst-deref.rs | 2 ++ src/test/run-pass/dst-index.rs | 2 ++ src/test/run-pass/dst-raw.rs | 2 ++ src/test/run-pass/dst-struct-sole.rs | 2 ++ src/test/run-pass/dst-struct.rs | 2 ++ src/test/run-pass/dst-trait.rs | 2 ++ src/test/run-pass/dupe-first-attr.rc | 2 ++ src/test/run-pass/duplicated-external-mods.rs | 2 ++ src/test/run-pass/early-ret-binop-add.rs | 2 ++ src/test/run-pass/early-vtbl-resolution.rs | 2 ++ src/test/run-pass/else-if.rs | 2 ++ .../run-pass/empty-allocation-non-null.rs | 2 ++ .../empty-allocation-rvalue-non-null.rs | 2 ++ src/test/run-pass/empty-mutable-vec.rs | 2 ++ src/test/run-pass/enum-alignment.rs | 2 ++ src/test/run-pass/enum-clike-ffi-as-int.rs | 2 ++ src/test/run-pass/enum-discr.rs | 2 ++ src/test/run-pass/enum-discrim-autosizing.rs | 2 ++ .../run-pass/enum-discrim-manual-sizing.rs | 2 ++ .../run-pass/enum-discrim-range-overflow.rs | 2 ++ src/test/run-pass/enum-disr-val-pretty.rs | 2 ++ src/test/run-pass/enum-export-inheritance.rs | 2 ++ src/test/run-pass/enum-null-pointer-opt.rs | 2 ++ .../enum-nullable-const-null-with-fields.rs | 2 ++ .../enum-nullable-simplifycfg-misopt.rs | 2 ++ src/test/run-pass/enum-variants.rs | 2 ++ src/test/run-pass/enum-vec-initializer.rs | 2 ++ src/test/run-pass/env-home-dir.rs | 2 ++ src/test/run-pass/env-vars.rs | 2 ++ src/test/run-pass/eq-multidispatch.rs | 2 ++ src/test/run-pass/estr-uniq.rs | 2 ++ src/test/run-pass/exec-env.rs | 2 ++ src/test/run-pass/explicit-i-suffix.rs | 2 ++ src/test/run-pass/explicit-self-closures.rs | 2 ++ src/test/run-pass/explicit-self-generic.rs | 2 ++ .../run-pass/explicit-self-objects-uniq.rs | 2 ++ src/test/run-pass/explicit-self.rs | 2 ++ src/test/run-pass/explicit_self_xcrate_exe.rs | 2 ++ src/test/run-pass/exponential-notation.rs | 2 ++ src/test/run-pass/export-abstract-tag.rs | 2 ++ .../run-pass/export-glob-imports-target.rs | 2 ++ src/test/run-pass/export-multi.rs | 2 ++ src/test/run-pass/export-tag-variant.rs | 2 ++ src/test/run-pass/expr-block-fn.rs | 2 ++ .../run-pass/expr-block-generic-unique2.rs | 2 ++ src/test/run-pass/expr-block-generic.rs | 2 ++ src/test/run-pass/expr-block-slot.rs | 2 ++ src/test/run-pass/expr-block-unique.rs | 2 ++ src/test/run-pass/expr-block.rs | 2 ++ src/test/run-pass/expr-copy.rs | 2 ++ src/test/run-pass/expr-empty-ret.rs | 2 ++ src/test/run-pass/expr-fn.rs | 2 ++ src/test/run-pass/expr-if-generic.rs | 2 ++ src/test/run-pass/expr-if-panic-all.rs | 2 ++ src/test/run-pass/expr-if-panic.rs | 2 ++ src/test/run-pass/expr-if-unique.rs | 2 ++ src/test/run-pass/expr-if.rs | 2 ++ .../run-pass/expr-match-generic-unique1.rs | 2 ++ .../run-pass/expr-match-generic-unique2.rs | 2 ++ src/test/run-pass/expr-match-generic.rs | 2 ++ src/test/run-pass/expr-match-panic-all.rs | 2 ++ src/test/run-pass/expr-match-panic.rs | 2 ++ src/test/run-pass/expr-match-unique.rs | 2 ++ src/test/run-pass/expr-match.rs | 2 ++ src/test/run-pass/expr-scope.rs | 2 ++ src/test/run-pass/ext-expand-inner-exprs.rs | 2 ++ src/test/run-pass/exterior.rs | 2 ++ src/test/run-pass/extern-1.rs | 2 ++ src/test/run-pass/extern-call-direct.rs | 2 ++ .../extern-calling-convention-test.rs | 2 ++ .../extern-compare-with-return-type.rs | 2 ++ src/test/run-pass/extern-foreign-crate.rs | 2 ++ src/test/run-pass/extern-methods.rs | 2 ++ src/test/run-pass/extern-mod-abi.rs | 2 ++ src/test/run-pass/extern-mod-ordering-exe.rs | 2 ++ src/test/run-pass/extern-pass-char.rs | 2 ++ src/test/run-pass/extern-pass-double.rs | 2 ++ src/test/run-pass/extern-pass-empty.rs | 2 ++ src/test/run-pass/extern-pass-u32.rs | 2 ++ src/test/run-pass/extern-pass-u64.rs | 2 ++ src/test/run-pass/extern-pub.rs | 2 ++ src/test/run-pass/extern-return-TwoU16s.rs | 2 ++ src/test/run-pass/extern-return-TwoU32s.rs | 2 ++ src/test/run-pass/extern-return-TwoU64s.rs | 2 ++ src/test/run-pass/extern-return-TwoU8s.rs | 2 ++ src/test/run-pass/extern-rust.rs | 2 ++ src/test/run-pass/extern-take-value.rs | 2 ++ .../run-pass/extoption_env-not-defined.rs | 2 ++ src/test/run-pass/field-destruction-order.rs | 2 ++ src/test/run-pass/filter-block-view-items.rs | 2 ++ src/test/run-pass/fixed_length_copy.rs | 2 ++ src/test/run-pass/fixup-deref-mut.rs | 2 ++ src/test/run-pass/float-nan.rs | 2 ++ src/test/run-pass/float2.rs | 2 ++ src/test/run-pass/floatlits.rs | 2 ++ src/test/run-pass/fn-abi.rs | 2 ++ src/test/run-pass/fn-bare-assign.rs | 2 ++ src/test/run-pass/fn-bare-coerce-to-block.rs | 2 ++ src/test/run-pass/fn-bare-size.rs | 2 ++ src/test/run-pass/fn-bare-spawn.rs | 2 ++ src/test/run-pass/fn-coerce-field.rs | 2 ++ src/test/run-pass/fn-item-type-cast.rs | 2 ++ src/test/run-pass/fn-item-type-coerce.rs | 2 ++ src/test/run-pass/fn-lval.rs | 2 ++ src/test/run-pass/fn-pattern-expected-type.rs | 2 ++ src/test/run-pass/fn-type-infer.rs | 2 ++ src/test/run-pass/for-destruct.rs | 2 ++ src/test/run-pass/for-loop-goofiness.rs | 2 ++ src/test/run-pass/for-loop-into-iterator.rs | 2 ++ src/test/run-pass/for-loop-no-std.rs | 2 ++ src/test/run-pass/for-loop-panic.rs | 2 ++ .../foreach-external-iterators-break.rs | 2 ++ ...xternal-iterators-hashmap-break-restart.rs | 2 ++ .../foreach-external-iterators-hashmap.rs | 2 ++ .../foreach-external-iterators-loop.rs | 2 ++ .../foreach-external-iterators-nested.rs | 2 ++ .../run-pass/foreach-external-iterators.rs | 2 ++ src/test/run-pass/foreach-nested.rs | 2 ++ src/test/run-pass/foreign-dupe.rs | 2 ++ src/test/run-pass/foreign-fn-linkname.rs | 2 ++ src/test/run-pass/foreign-fn-with-byval.rs | 2 ++ src/test/run-pass/foreign-mod-unused-const.rs | 2 ++ src/test/run-pass/foreign-no-abi.rs | 2 ++ src/test/run-pass/foreign-struct.rs | 2 ++ src/test/run-pass/foreign2.rs | 2 ++ src/test/run-pass/format-nan.rs | 2 ++ src/test/run-pass/format-no-std.rs | 2 ++ src/test/run-pass/format-ref-cell.rs | 2 ++ src/test/run-pass/fsu-moves-and-copies.rs | 2 ++ src/test/run-pass/fun-call-variants.rs | 2 ++ src/test/run-pass/fun-indirect-call.rs | 2 ++ .../run-pass/func-arg-incomplete-pattern.rs | 2 ++ src/test/run-pass/func-arg-ref-pattern.rs | 2 ++ src/test/run-pass/func-arg-wild-pattern.rs | 2 ++ ...generic-default-type-params-cross-crate.rs | 2 ++ src/test/run-pass/generic-exterior-unique.rs | 2 ++ src/test/run-pass/generic-extern-mangle.rs | 2 ++ src/test/run-pass/generic-fn-infer.rs | 2 ++ src/test/run-pass/generic-fn-twice.rs | 2 ++ src/test/run-pass/generic-ivec-leak.rs | 2 ++ src/test/run-pass/generic-newtype-struct.rs | 2 ++ src/test/run-pass/generic-object.rs | 2 ++ src/test/run-pass/generic-static-methods.rs | 2 ++ src/test/run-pass/generic-tag-corruption.rs | 2 ++ src/test/run-pass/generic-tag-local.rs | 2 ++ src/test/run-pass/generic-tag.rs | 2 ++ src/test/run-pass/generic-type-synonym.rs | 2 ++ src/test/run-pass/generic-type.rs | 2 ++ src/test/run-pass/generic-unique.rs | 2 ++ src/test/run-pass/getopts_ref.rs | 2 ++ src/test/run-pass/global-scope.rs | 2 ++ src/test/run-pass/guards-not-exhaustive.rs | 2 ++ src/test/run-pass/guards.rs | 2 ++ .../hrtb-binder-levels-in-object-types.rs | 2 ++ .../hrtb-debruijn-object-types-in-closures.rs | 2 ++ .../run-pass/hrtb-fn-like-trait-object.rs | 2 ++ src/test/run-pass/hrtb-fn-like-trait.rs | 2 ++ src/test/run-pass/hrtb-opt-in-copy.rs | 2 ++ src/test/run-pass/hrtb-parse.rs | 2 ++ .../hrtb-precedence-of-plus-where-clause.rs | 2 ++ src/test/run-pass/hrtb-precedence-of-plus.rs | 2 ++ src/test/run-pass/hrtb-resolve-lifetime.rs | 2 ++ .../hrtb-trait-object-paren-notation.rs | 2 ++ .../hrtb-trait-object-passed-to-closure.rs | 2 ++ src/test/run-pass/huge-largest-array.rs | 2 ++ src/test/run-pass/hygiene-dodging-1.rs | 2 ++ src/test/run-pass/hygienic-labels.rs | 2 ++ src/test/run-pass/i32-sub.rs | 2 ++ src/test/run-pass/i8-incr.rs | 2 ++ src/test/run-pass/if-let.rs | 2 ++ src/test/run-pass/if-ret.rs | 2 ++ src/test/run-pass/ignore-all-the-things.rs | 2 ++ src/test/run-pass/impl-implicit-trait.rs | 2 ++ .../run-pass/impl-inherent-non-conflict.rs | 2 ++ .../impl-inherent-prefer-over-trait.rs | 2 ++ .../run-pass/impl-not-adjacent-to-type.rs | 2 ++ src/test/run-pass/impl-privacy-xc-1.rs | 2 ++ .../import-crate-with-invalid-spans.rs | 2 ++ src/test/run-pass/import-from.rs | 2 ++ src/test/run-pass/import-glob-crate.rs | 2 ++ src/test/run-pass/import-in-block.rs | 2 ++ src/test/run-pass/import-trailing-comma.rs | 2 ++ .../inconsistent-lifetime-mismatch.rs | 2 ++ .../infer-container-across-object-cast.rs | 2 ++ src/test/run-pass/infer-fn-tail-expr.rs | 2 ++ .../inferred-suffix-in-pattern-range.rs | 2 ++ .../run-pass/inherent-trait-method-order.rs | 2 ++ src/test/run-pass/init-large-type.rs | 2 ++ src/test/run-pass/init-res-into-things.rs | 2 ++ src/test/run-pass/inner-attrs-on-impl.rs | 2 ++ src/test/run-pass/inner-static.rs | 2 ++ src/test/run-pass/instantiable.rs | 2 ++ src/test/run-pass/int.rs | 2 ++ src/test/run-pass/integer-literal-radix.rs | 2 ++ .../integer-literal-suffix-inference-2.rs | 2 ++ .../integer-literal-suffix-inference.rs | 2 ++ .../into-iterator-type-inference-shift.rs | 2 ++ src/test/run-pass/intrinsic-alignment.rs | 2 ++ src/test/run-pass/intrinsic-assume.rs | 2 ++ src/test/run-pass/intrinsic-atomics-cc.rs | 2 ++ src/test/run-pass/intrinsic-atomics.rs | 2 ++ src/test/run-pass/intrinsic-move-val.rs | 2 ++ src/test/run-pass/intrinsic-return-address.rs | 2 ++ src/test/run-pass/intrinsic-uninit.rs | 2 ++ src/test/run-pass/intrinsic-unreachable.rs | 2 ++ src/test/run-pass/intrinsics-integer.rs | 2 ++ src/test/run-pass/intrinsics-math.rs | 2 ++ src/test/run-pass/invoke-external-foreign.rs | 2 ++ src/test/run-pass/irrefutable-unit.rs | 2 ++ src/test/run-pass/issue-10025.rs | 2 ++ src/test/run-pass/issue-10028.rs | 2 ++ src/test/run-pass/issue-10031.rs | 2 ++ src/test/run-pass/issue-10228.rs | 2 ++ src/test/run-pass/issue-10392.rs | 2 ++ src/test/run-pass/issue-10456.rs | 2 ++ src/test/run-pass/issue-10638.rs | 2 ++ src/test/run-pass/issue-10682.rs | 2 ++ src/test/run-pass/issue-10683.rs | 2 ++ src/test/run-pass/issue-10714.rs | 2 ++ src/test/run-pass/issue-10718.rs | 2 ++ src/test/run-pass/issue-10734.rs | 2 ++ src/test/run-pass/issue-10763.rs | 2 ++ src/test/run-pass/issue-10764.rs | 2 ++ src/test/run-pass/issue-10767.rs | 2 ++ src/test/run-pass/issue-10802.rs | 2 ++ src/test/run-pass/issue-10806.rs | 2 ++ src/test/run-pass/issue-10853.rs | 2 ++ src/test/run-pass/issue-10902.rs | 2 ++ src/test/run-pass/issue-11085.rs | 2 ++ src/test/run-pass/issue-1112.rs | 2 ++ src/test/run-pass/issue-11205.rs | 2 ++ src/test/run-pass/issue-11224.rs | 2 ++ src/test/run-pass/issue-11225-1.rs | 2 ++ src/test/run-pass/issue-11225-2.rs | 2 ++ src/test/run-pass/issue-11384.rs | 2 ++ src/test/run-pass/issue-11529.rs | 2 ++ src/test/run-pass/issue-11552.rs | 2 ++ src/test/run-pass/issue-11577.rs | 2 ++ src/test/run-pass/issue-11612.rs | 2 ++ src/test/run-pass/issue-11677.rs | 2 ++ src/test/run-pass/issue-11736.rs | 2 ++ src/test/run-pass/issue-11820.rs | 2 ++ src/test/run-pass/issue-11869.rs | 2 ++ src/test/run-pass/issue-11881.rs | 2 ++ src/test/run-pass/issue-11940.rs | 2 ++ src/test/run-pass/issue-11958.rs | 2 ++ src/test/run-pass/issue-12133-1.rs | 2 ++ src/test/run-pass/issue-12133-2.rs | 2 ++ src/test/run-pass/issue-12133-3.rs | 2 ++ src/test/run-pass/issue-12285.rs | 2 ++ src/test/run-pass/issue-1251.rs | 2 ++ src/test/run-pass/issue-1257.rs | 2 ++ src/test/run-pass/issue-12612.rs | 2 ++ src/test/run-pass/issue-12660.rs | 2 ++ src/test/run-pass/issue-12677.rs | 2 ++ src/test/run-pass/issue-12684.rs | 2 ++ src/test/run-pass/issue-12699.rs | 2 ++ src/test/run-pass/issue-12729.rs | 2 ++ src/test/run-pass/issue-12860.rs | 2 ++ src/test/run-pass/issue-12909.rs | 2 ++ src/test/run-pass/issue-13105.rs | 2 ++ src/test/run-pass/issue-13167.rs | 2 ++ src/test/run-pass/issue-13204.rs | 2 ++ src/test/run-pass/issue-13214.rs | 2 ++ .../run-pass/issue-13259-windows-tcb-trash.rs | 2 ++ src/test/run-pass/issue-13264.rs | 2 ++ src/test/run-pass/issue-13323.rs | 2 ++ src/test/run-pass/issue-13352.rs | 2 ++ src/test/run-pass/issue-13405.rs | 2 ++ src/test/run-pass/issue-13494.rs | 2 ++ src/test/run-pass/issue-13507-2.rs | 2 ++ src/test/run-pass/issue-13620.rs | 2 ++ src/test/run-pass/issue-13665.rs | 2 ++ src/test/run-pass/issue-13703.rs | 2 ++ src/test/run-pass/issue-13763.rs | 2 ++ src/test/run-pass/issue-13775.rs | 2 ++ src/test/run-pass/issue-13808.rs | 2 ++ src/test/run-pass/issue-13837.rs | 2 ++ src/test/run-pass/issue-13867.rs | 2 ++ src/test/run-pass/issue-13872.rs | 2 ++ src/test/run-pass/issue-14082.rs | 2 ++ src/test/run-pass/issue-14254.rs | 2 ++ src/test/run-pass/issue-14308.rs | 2 ++ src/test/run-pass/issue-14330.rs | 2 ++ src/test/run-pass/issue-14393.rs | 2 ++ src/test/run-pass/issue-14399.rs | 2 ++ src/test/run-pass/issue-14421.rs | 2 ++ src/test/run-pass/issue-14422.rs | 2 ++ src/test/run-pass/issue-14456.rs | 2 ++ src/test/run-pass/issue-1451.rs | 2 ++ src/test/run-pass/issue-14589.rs | 2 ++ src/test/run-pass/issue-1460.rs | 2 ++ src/test/run-pass/issue-14837.rs | 2 ++ src/test/run-pass/issue-14865.rs | 2 ++ src/test/run-pass/issue-14901.rs | 2 ++ src/test/run-pass/issue-14919.rs | 2 ++ src/test/run-pass/issue-14933.rs | 2 ++ src/test/run-pass/issue-14936.rs | 2 ++ src/test/run-pass/issue-14940.rs | 2 ++ src/test/run-pass/issue-14958.rs | 2 ++ src/test/run-pass/issue-14959.rs | 2 ++ src/test/run-pass/issue-15043.rs | 2 ++ src/test/run-pass/issue-15080.rs | 2 ++ src/test/run-pass/issue-15104.rs | 2 ++ src/test/run-pass/issue-15108.rs | 2 ++ src/test/run-pass/issue-15129.rs | 2 ++ src/test/run-pass/issue-15149.rs | 2 ++ src/test/run-pass/issue-15221.rs | 2 ++ src/test/run-pass/issue-15261.rs | 2 ++ src/test/run-pass/issue-15444.rs | 2 ++ src/test/run-pass/issue-15562.rs | 2 ++ src/test/run-pass/issue-15673.rs | 2 ++ src/test/run-pass/issue-15689-1.rs | 2 ++ src/test/run-pass/issue-15689-2.rs | 2 ++ src/test/run-pass/issue-15730.rs | 2 ++ src/test/run-pass/issue-15734.rs | 2 ++ src/test/run-pass/issue-15774.rs | 2 ++ src/test/run-pass/issue-15793.rs | 2 ++ src/test/run-pass/issue-15858.rs | 2 ++ .../issue-15881-model-lexer-dotdotdot.rs | 2 ++ src/test/run-pass/issue-15924.rs | 2 ++ src/test/run-pass/issue-16151.rs | 2 ++ src/test/run-pass/issue-16256.rs | 2 ++ src/test/run-pass/issue-16441.rs | 2 ++ src/test/run-pass/issue-16452.rs | 2 ++ src/test/run-pass/issue-16530.rs | 2 ++ src/test/run-pass/issue-16560.rs | 2 ++ src/test/run-pass/issue-16596.rs | 2 ++ src/test/run-pass/issue-1660.rs | 2 ++ src/test/run-pass/issue-16643.rs | 2 ++ src/test/run-pass/issue-16648.rs | 2 ++ src/test/run-pass/issue-16739.rs | 2 ++ src/test/run-pass/issue-16774.rs | 2 ++ src/test/run-pass/issue-16783.rs | 2 ++ src/test/run-pass/issue-16922.rs | 2 ++ src/test/run-pass/issue-1701.rs | 2 ++ src/test/run-pass/issue-17068.rs | 2 ++ src/test/run-pass/issue-17074.rs | 2 ++ src/test/run-pass/issue-17121.rs | 2 ++ src/test/run-pass/issue-17216.rs | 2 ++ src/test/run-pass/issue-17233.rs | 2 ++ src/test/run-pass/issue-17302.rs | 2 ++ src/test/run-pass/issue-17322.rs | 2 ++ src/test/run-pass/issue-17351.rs | 2 ++ src/test/run-pass/issue-17361.rs | 2 ++ src/test/run-pass/issue-17662.rs | 2 ++ src/test/run-pass/issue-17718-parse-const.rs | 2 ++ .../issue-17718-static-unsafe-interior.rs | 2 ++ src/test/run-pass/issue-17718.rs | 2 ++ src/test/run-pass/issue-17732.rs | 2 ++ src/test/run-pass/issue-17734.rs | 2 ++ src/test/run-pass/issue-17771.rs | 2 ++ src/test/run-pass/issue-17816.rs | 2 ++ src/test/run-pass/issue-17877.rs | 2 ++ src/test/run-pass/issue-17904.rs | 2 ++ src/test/run-pass/issue-18110.rs | 2 ++ src/test/run-pass/issue-18188.rs | 2 ++ src/test/run-pass/issue-1821.rs | 2 ++ src/test/run-pass/issue-18232.rs | 2 ++ src/test/run-pass/issue-18352.rs | 2 ++ src/test/run-pass/issue-18353.rs | 2 ++ src/test/run-pass/issue-18412.rs | 2 ++ src/test/run-pass/issue-18425.rs | 2 ++ src/test/run-pass/issue-18501.rs | 2 ++ src/test/run-pass/issue-18514.rs | 2 ++ src/test/run-pass/issue-18539.rs | 2 ++ src/test/run-pass/issue-18619.rs | 2 ++ src/test/run-pass/issue-18652.rs | 2 ++ src/test/run-pass/issue-1866.rs | 2 ++ src/test/run-pass/issue-18661.rs | 2 ++ src/test/run-pass/issue-18685.rs | 2 ++ src/test/run-pass/issue-18711.rs | 2 ++ src/test/run-pass/issue-18738.rs | 2 ++ src/test/run-pass/issue-18767.rs | 2 ++ src/test/run-pass/issue-18859.rs | 2 ++ src/test/run-pass/issue-18906.rs | 2 ++ src/test/run-pass/issue-19037.rs | 2 ++ src/test/run-pass/issue-19098.rs | 2 ++ src/test/run-pass/issue-19121.rs | 2 ++ src/test/run-pass/issue-19127.rs | 2 ++ src/test/run-pass/issue-19129-1.rs | 2 ++ src/test/run-pass/issue-19129-2.rs | 2 ++ src/test/run-pass/issue-19244.rs | 2 ++ src/test/run-pass/issue-19293.rs | 2 ++ src/test/run-pass/issue-19340-1.rs | 2 ++ src/test/run-pass/issue-19340-2.rs | 2 ++ src/test/run-pass/issue-19398.rs | 2 ++ src/test/run-pass/issue-19479.rs | 2 ++ src/test/run-pass/issue-19499.rs | 2 ++ src/test/run-pass/issue-19631.rs | 2 ++ src/test/run-pass/issue-19632.rs | 2 ++ src/test/run-pass/issue-1974.rs | 2 ++ .../run-pass/issue-19811-escape-unicode.rs | 2 ++ src/test/run-pass/issue-19850.rs | 2 ++ src/test/run-pass/issue-19982.rs | 2 ++ src/test/run-pass/issue-20009.rs | 2 ++ src/test/run-pass/issue-20313.rs | 2 ++ src/test/run-pass/issue-20343.rs | 2 ++ src/test/run-pass/issue-20389.rs | 2 ++ src/test/run-pass/issue-20396.rs | 2 ++ src/test/run-pass/issue-20414.rs | 2 ++ src/test/run-pass/issue-20575.rs | 2 ++ src/test/run-pass/issue-20644.rs | 2 ++ src/test/run-pass/issue-20676.rs | 2 ++ src/test/run-pass/issue-2074.rs | 2 ++ src/test/run-pass/issue-20763-1.rs | 2 ++ src/test/run-pass/issue-20763-2.rs | 2 ++ src/test/run-pass/issue-20797.rs | 2 ++ src/test/run-pass/issue-21033.rs | 2 ++ src/test/run-pass/issue-21058.rs | 2 ++ src/test/run-pass/issue-21245.rs | 2 ++ src/test/run-pass/issue-21296.rs | 2 ++ src/test/run-pass/issue-21306.rs | 2 ++ src/test/run-pass/issue-21350.rs | 2 ++ src/test/run-pass/issue-21361.rs | 2 ++ src/test/run-pass/issue-21363.rs | 2 ++ src/test/run-pass/issue-21384.rs | 2 ++ src/test/run-pass/issue-21402.rs | 2 ++ src/test/run-pass/issue-21475.rs | 2 ++ src/test/run-pass/issue-21520.rs | 2 ++ src/test/run-pass/issue-21634.rs | 2 ++ src/test/run-pass/issue-21655.rs | 2 ++ src/test/run-pass/issue-21721.rs | 2 ++ src/test/run-pass/issue-21726.rs | 2 ++ src/test/run-pass/issue-21891.rs | 2 ++ src/test/run-pass/issue-2190-1.rs | 2 ++ src/test/run-pass/issue-21909.rs | 2 ++ src/test/run-pass/issue-22036.rs | 2 ++ src/test/run-pass/issue-2214.rs | 2 ++ src/test/run-pass/issue-22356.rs | 2 ++ src/test/run-pass/issue-22426.rs | 2 ++ .../run-pass/issue-22536-copy-mustnt-zero.rs | 2 ++ src/test/run-pass/issue-22577.rs | 2 ++ src/test/run-pass/issue-22629.rs | 2 ++ src/test/run-pass/issue-22777.rs | 2 ++ src/test/run-pass/issue-22828.rs | 2 ++ src/test/run-pass/issue-2284.rs | 2 ++ src/test/run-pass/issue-2288.rs | 2 ++ src/test/run-pass/issue-2311-2.rs | 2 ++ src/test/run-pass/issue-2311.rs | 2 ++ src/test/run-pass/issue-2312.rs | 2 ++ src/test/run-pass/issue-2316-c.rs | 2 ++ src/test/run-pass/issue-23435.rs | 2 ++ src/test/run-pass/issue-2380-b.rs | 2 ++ src/test/run-pass/issue-2383.rs | 2 ++ src/test/run-pass/issue-2414-c.rs | 2 ++ src/test/run-pass/issue-2428.rs | 2 ++ src/test/run-pass/issue-2445-b.rs | 2 ++ src/test/run-pass/issue-2445.rs | 2 ++ src/test/run-pass/issue-2463.rs | 2 ++ src/test/run-pass/issue-2472.rs | 2 ++ src/test/run-pass/issue-2487-a.rs | 2 ++ src/test/run-pass/issue-2502.rs | 2 ++ src/test/run-pass/issue-2526-a.rs | 2 ++ src/test/run-pass/issue-2550.rs | 2 ++ src/test/run-pass/issue-2611-3.rs | 2 ++ src/test/run-pass/issue-2631-b.rs | 2 ++ src/test/run-pass/issue-2633-2.rs | 2 ++ src/test/run-pass/issue-2642.rs | 2 ++ src/test/run-pass/issue-2708.rs | 2 ++ src/test/run-pass/issue-2723-b.rs | 2 ++ src/test/run-pass/issue-2734.rs | 2 ++ src/test/run-pass/issue-2735-2.rs | 2 ++ src/test/run-pass/issue-2735-3.rs | 2 ++ src/test/run-pass/issue-2735.rs | 2 ++ src/test/run-pass/issue-2748-a.rs | 2 ++ src/test/run-pass/issue-2748-b.rs | 2 ++ src/test/run-pass/issue-2895.rs | 2 ++ src/test/run-pass/issue-2936.rs | 2 ++ src/test/run-pass/issue-3012-2.rs | 2 ++ src/test/run-pass/issue-3026.rs | 2 ++ src/test/run-pass/issue-3037.rs | 2 ++ src/test/run-pass/issue-3052.rs | 2 ++ src/test/run-pass/issue-3091.rs | 2 ++ src/test/run-pass/issue-3121.rs | 2 ++ src/test/run-pass/issue-3149.rs | 2 ++ src/test/run-pass/issue-3220.rs | 2 ++ src/test/run-pass/issue-3290.rs | 2 ++ src/test/run-pass/issue-333.rs | 2 ++ src/test/run-pass/issue-3429.rs | 2 ++ src/test/run-pass/issue-3500.rs | 2 ++ src/test/run-pass/issue-3563-2.rs | 2 ++ src/test/run-pass/issue-3574.rs | 2 ++ src/test/run-pass/issue-3656.rs | 2 ++ src/test/run-pass/issue-3874.rs | 2 ++ src/test/run-pass/issue-3878.rs | 2 ++ src/test/run-pass/issue-3888-2.rs | 2 ++ src/test/run-pass/issue-3895.rs | 2 ++ src/test/run-pass/issue-3935.rs | 2 ++ src/test/run-pass/issue-3979-2.rs | 2 ++ src/test/run-pass/issue-3979-generics.rs | 2 ++ src/test/run-pass/issue-3979-xcrate.rs | 2 ++ src/test/run-pass/issue-3979.rs | 2 ++ src/test/run-pass/issue-3991.rs | 2 ++ src/test/run-pass/issue-4016.rs | 2 ++ src/test/run-pass/issue-4036.rs | 2 ++ src/test/run-pass/issue-4107.rs | 2 ++ src/test/run-pass/issue-4208.rs | 2 ++ src/test/run-pass/issue-4228.rs | 2 ++ src/test/run-pass/issue-4333.rs | 2 ++ src/test/run-pass/issue-4387.rs | 2 ++ src/test/run-pass/issue-4446.rs | 2 ++ src/test/run-pass/issue-4448.rs | 2 ++ src/test/run-pass/issue-4464.rs | 2 ++ src/test/run-pass/issue-4542.rs | 2 ++ src/test/run-pass/issue-4545.rs | 2 ++ src/test/run-pass/issue-4734.rs | 2 ++ src/test/run-pass/issue-4735.rs | 2 ++ src/test/run-pass/issue-4759-1.rs | 2 ++ src/test/run-pass/issue-4759.rs | 2 ++ src/test/run-pass/issue-4830.rs | 2 ++ src/test/run-pass/issue-4875.rs | 2 ++ src/test/run-pass/issue-5192.rs | 2 ++ src/test/run-pass/issue-5239-2.rs | 2 ++ src/test/run-pass/issue-5243.rs | 2 ++ src/test/run-pass/issue-5315.rs | 2 ++ src/test/run-pass/issue-5353.rs | 2 ++ src/test/run-pass/issue-5518.rs | 2 ++ src/test/run-pass/issue-5521.rs | 2 ++ src/test/run-pass/issue-5530.rs | 2 ++ src/test/run-pass/issue-5550.rs | 2 ++ src/test/run-pass/issue-5554.rs | 2 ++ src/test/run-pass/issue-5572.rs | 2 ++ src/test/run-pass/issue-5718.rs | 2 ++ src/test/run-pass/issue-5741.rs | 2 ++ src/test/run-pass/issue-5754.rs | 2 ++ src/test/run-pass/issue-5791.rs | 2 ++ src/test/run-pass/issue-5884.rs | 2 ++ src/test/run-pass/issue-5900.rs | 2 ++ src/test/run-pass/issue-5917.rs | 2 ++ src/test/run-pass/issue-5950.rs | 2 ++ src/test/run-pass/issue-5988.rs | 2 ++ src/test/run-pass/issue-5997.rs | 2 ++ src/test/run-pass/issue-6117.rs | 2 ++ src/test/run-pass/issue-6128.rs | 2 ++ src/test/run-pass/issue-6130.rs | 2 ++ src/test/run-pass/issue-6153.rs | 2 ++ src/test/run-pass/issue-6157.rs | 2 ++ src/test/run-pass/issue-6318.rs | 2 ++ src/test/run-pass/issue-6334.rs | 2 ++ src/test/run-pass/issue-6341.rs | 2 ++ src/test/run-pass/issue-6449.rs | 2 ++ src/test/run-pass/issue-6470.rs | 2 ++ src/test/run-pass/issue-6557.rs | 2 ++ src/test/run-pass/issue-6892.rs | 2 ++ src/test/run-pass/issue-6898.rs | 2 ++ src/test/run-pass/issue-6919.rs | 2 ++ src/test/run-pass/issue-7178.rs | 2 ++ src/test/run-pass/issue-7222.rs | 2 ++ src/test/run-pass/issue-7268.rs | 2 ++ src/test/run-pass/issue-7344.rs | 2 ++ .../run-pass/issue-7519-match-unit-in-arg.rs | 2 ++ src/test/run-pass/issue-7575.rs | 2 ++ src/test/run-pass/issue-7607-2.rs | 2 ++ src/test/run-pass/issue-7660.rs | 2 ++ src/test/run-pass/issue-7663.rs | 2 ++ ...7673-cast-generically-implemented-trait.rs | 2 ++ src/test/run-pass/issue-7784.rs | 2 ++ src/test/run-pass/issue-7899.rs | 2 ++ src/test/run-pass/issue-8044.rs | 2 ++ ...fault-method-self-inherit-builtin-trait.rs | 2 ++ src/test/run-pass/issue-8248.rs | 2 ++ src/test/run-pass/issue-8249.rs | 2 ++ src/test/run-pass/issue-8259.rs | 2 ++ src/test/run-pass/issue-8351-1.rs | 2 ++ src/test/run-pass/issue-8351-2.rs | 2 ++ src/test/run-pass/issue-8391.rs | 2 ++ src/test/run-pass/issue-8398.rs | 2 ++ src/test/run-pass/issue-8401.rs | 2 ++ src/test/run-pass/issue-8460.rs | 2 ++ src/test/run-pass/issue-8498.rs | 2 ++ src/test/run-pass/issue-8506.rs | 2 ++ src/test/run-pass/issue-8578.rs | 2 ++ src/test/run-pass/issue-868.rs | 2 ++ src/test/run-pass/issue-8709.rs | 2 ++ src/test/run-pass/issue-8783.rs | 2 ++ src/test/run-pass/issue-8851.rs | 2 ++ src/test/run-pass/issue-8860.rs | 2 ++ src/test/run-pass/issue-8898.rs | 2 ++ src/test/run-pass/issue-9110.rs | 2 ++ src/test/run-pass/issue-9123.rs | 2 ++ src/test/run-pass/issue-9188.rs | 2 ++ src/test/run-pass/issue-9249.rs | 2 ++ src/test/run-pass/issue-9259.rs | 2 ++ src/test/run-pass/issue-9382.rs | 2 ++ .../issue-9394-inherited-trait-calls.rs | 2 ++ src/test/run-pass/issue-9396.rs | 2 ++ src/test/run-pass/issue-9719.rs | 2 ++ src/test/run-pass/issue-979.rs | 2 ++ src/test/run-pass/issue-9906.rs | 2 ++ src/test/run-pass/issue-9918.rs | 2 ++ src/test/run-pass/issue-9942.rs | 2 ++ src/test/run-pass/issue-9951.rs | 2 ++ src/test/run-pass/issue-9968.rs | 2 ++ src/test/run-pass/issue2170exe.rs | 2 ++ src/test/run-pass/issue22346.rs | 2 ++ src/test/run-pass/issue_3136_b.rs | 2 ++ src/test/run-pass/issue_9155.rs | 2 ++ src/test/run-pass/item-attributes.rs | 2 ++ src/test/run-pass/item-name-overload.rs | 2 ++ .../run-pass/iter-cloned-type-inference.rs | 2 ++ src/test/run-pass/ivec-pass-by-value.rs | 2 ++ src/test/run-pass/ivec-tag.rs | 2 ++ .../run-pass/keyword-changes-2012-07-31.rs | 2 ++ .../run-pass/kindck-owned-trait-contains-1.rs | 2 ++ src/test/run-pass/kinds-in-metadata.rs | 2 ++ src/test/run-pass/labeled-break.rs | 2 ++ src/test/run-pass/large-records.rs | 2 ++ src/test/run-pass/last-use-in-block.rs | 2 ++ src/test/run-pass/last-use-in-cap-clause.rs | 2 ++ src/test/run-pass/leak-unique-as-tydesc.rs | 2 ++ src/test/run-pass/let-destruct-ref.rs | 2 ++ src/test/run-pass/let-var-hygiene.rs | 2 ++ ...on-camel-case-with-trailing-underscores.rs | 2 ++ ...uppercase-statics-lowercase-mut-statics.rs | 2 ++ src/test/run-pass/list.rs | 2 ++ .../liveness-assign-imm-local-after-loop.rs | 2 ++ .../liveness-assign-imm-local-after-ret.rs | 2 ++ src/test/run-pass/liveness-move-in-loop.rs | 2 ++ ...log_syntax-trace_macros-macro-locations.rs | 2 ++ src/test/run-pass/logging-enabled-debug.rs | 2 ++ src/test/run-pass/logging-enabled.rs | 2 ++ src/test/run-pass/logging-right-crate.rs | 2 ++ .../run-pass/logging_before_rt_started.rs | 2 ++ src/test/run-pass/long-while.rs | 2 ++ src/test/run-pass/loop-break-cont-1.rs | 2 ++ src/test/run-pass/loop-diverges.rs | 2 ++ src/test/run-pass/loop-label-shadowing.rs | 2 ++ src/test/run-pass/loop-labeled-break-value.rs | 2 ++ .../loop-no-reinit-needed-post-bot.rs | 2 ++ src/test/run-pass/loop-scope.rs | 2 ++ src/test/run-pass/macro-block-nonterminal.rs | 2 ++ src/test/run-pass/macro-crate-def-only.rs | 2 ++ src/test/run-pass/macro-crate-use.rs | 2 ++ src/test/run-pass/macro-deep_expansion.rs | 2 ++ .../run-pass/macro-delimiter-significance.rs | 2 ++ src/test/run-pass/macro-interpolation.rs | 2 ++ ...vocation-in-count-expr-fixed-array-type.rs | 2 ++ src/test/run-pass/macro-method-issue-4621.rs | 2 ++ src/test/run-pass/macro-nt-list.rs | 2 ++ src/test/run-pass/macro-of-higher-order.rs | 2 ++ src/test/run-pass/macro-pat.rs | 2 ++ src/test/run-pass/macro-path.rs | 2 ++ src/test/run-pass/macro-with-attrs1.rs | 2 ++ src/test/run-pass/macro-with-attrs2.rs | 2 ++ src/test/run-pass/macro_with_super_2.rs | 2 ++ src/test/run-pass/match-arm-statics.rs | 2 ++ src/test/run-pass/match-borrowed_str.rs | 2 ++ src/test/run-pass/match-bot-2.rs | 2 ++ src/test/run-pass/match-enum-struct-0.rs | 2 ++ src/test/run-pass/match-enum-struct-1.rs | 2 ++ .../run-pass/match-implicit-copy-unique.rs | 2 ++ src/test/run-pass/match-in-macro.rs | 2 ++ src/test/run-pass/match-naked-record-expr.rs | 2 ++ src/test/run-pass/match-naked-record.rs | 2 ++ src/test/run-pass/match-path.rs | 2 ++ src/test/run-pass/match-pattern-bindings.rs | 2 ++ src/test/run-pass/match-pattern-simple.rs | 2 ++ src/test/run-pass/match-phi.rs | 2 ++ src/test/run-pass/match-pipe-binding.rs | 2 ++ src/test/run-pass/match-range-static.rs | 2 ++ .../match-ref-binding-in-guard-3256.rs | 2 ++ .../run-pass/match-ref-binding-mut-option.rs | 2 ++ src/test/run-pass/match-ref-binding-mut.rs | 2 ++ src/test/run-pass/match-ref-binding.rs | 2 ++ .../run-pass/match-static-const-rename.rs | 2 ++ src/test/run-pass/match-str.rs | 2 ++ src/test/run-pass/match-struct-0.rs | 2 ++ src/test/run-pass/match-tag.rs | 2 ++ .../match-value-binding-in-guard-3291.rs | 2 ++ src/test/run-pass/match-vec-alternatives.rs | 2 ++ src/test/run-pass/match-vec-rvalue.rs | 2 ++ src/test/run-pass/method-attributes.rs | 2 ++ .../method-early-bound-lifetimes-on-self.rs | 2 ++ ...thod-mut-self-modifies-mut-slice-lvalue.rs | 2 ++ .../method-normalize-bounds-issue-20604.rs | 2 ++ src/test/run-pass/method-projection.rs | 2 ++ .../run-pass/method-recursive-blanket-impl.rs | 2 ++ src/test/run-pass/method-self-arg-aux1.rs | 2 ++ src/test/run-pass/method-self-arg-aux2.rs | 2 ++ src/test/run-pass/method-self-arg-trait.rs | 2 ++ src/test/run-pass/method-self-arg.rs | 2 ++ .../method-two-trait-defer-resolution-1.rs | 2 ++ .../method-two-trait-defer-resolution-2.rs | 2 ++ ...o-traits-distinguished-via-where-clause.rs | 2 ++ src/test/run-pass/method-where-clause.rs | 2 ++ src/test/run-pass/mid-path-type-params.rs | 2 ++ src/test/run-pass/mod-inside-fn.rs | 2 ++ src/test/run-pass/mod-view-items.rs | 2 ++ .../module-qualified-struct-destructure.rs | 2 ++ src/test/run-pass/monad.rs | 2 ++ ...nomorphized-callees-with-ty-params-3314.rs | 2 ++ src/test/run-pass/move-1-unique.rs | 2 ++ src/test/run-pass/move-2-unique.rs | 2 ++ src/test/run-pass/move-2.rs | 2 ++ src/test/run-pass/move-3-unique.rs | 2 ++ src/test/run-pass/move-4-unique.rs | 2 ++ src/test/run-pass/move-4.rs | 2 ++ src/test/run-pass/move-arg-2-unique.rs | 2 ++ src/test/run-pass/move-arg-2.rs | 2 ++ src/test/run-pass/move-arg.rs | 2 ++ src/test/run-pass/move-guard-const.rs | 2 ++ src/test/run-pass/move-nullary-fn.rs | 2 ++ src/test/run-pass/move-out-of-field.rs | 2 ++ src/test/run-pass/move-scalar.rs | 2 ++ .../moves-based-on-type-cross-crate.rs | 2 ++ src/test/run-pass/multi-let.rs | 2 ++ src/test/run-pass/multidispatch1.rs | 2 ++ src/test/run-pass/multidispatch2.rs | 2 ++ src/test/run-pass/multiline-comment.rs | 2 ++ src/test/run-pass/multiple-trait-bounds.rs | 2 ++ src/test/run-pass/mut-function-arguments.rs | 2 ++ src/test/run-pass/mut-in-ident-patterns.rs | 2 ++ src/test/run-pass/mut-vstore-expr.rs | 2 ++ ...ility-inherits-through-fixed-length-vec.rs | 2 ++ src/test/run-pass/mutual-recursion-group.rs | 2 ++ .../namespaced-enum-emulate-flat-xc.rs | 2 ++ .../run-pass/namespaced-enum-emulate-flat.rs | 2 ++ .../namespaced-enum-glob-import-xcrate.rs | 2 ++ .../run-pass/namespaced-enum-glob-import.rs | 2 ++ src/test/run-pass/namespaced-enums-xcrate.rs | 2 ++ src/test/run-pass/namespaced-enums.rs | 2 ++ src/test/run-pass/negative.rs | 2 ++ src/test/run-pass/nested-block-comment.rs | 2 ++ src/test/run-pass/nested-class.rs | 2 ++ src/test/run-pass/nested-enum-same-names.rs | 2 ++ src/test/run-pass/nested-exhaustive-match.rs | 2 ++ .../nested-function-names-issue-8587.rs | 2 ++ src/test/run-pass/nested_item_main.rs | 2 ++ src/test/run-pass/new-box-syntax.rs | 2 ++ src/test/run-pass/new-unicode-escapes.rs | 2 ++ src/test/run-pass/new-unsafe-pointers.rs | 2 ++ src/test/run-pass/newlambdas-ret-infer.rs | 2 ++ src/test/run-pass/newlambdas-ret-infer2.rs | 2 ++ src/test/run-pass/newlambdas.rs | 2 ++ src/test/run-pass/newtype-polymorphic.rs | 2 ++ src/test/run-pass/newtype-struct-drop-run.rs | 2 ++ src/test/run-pass/newtype-struct-with-dtor.rs | 2 ++ src/test/run-pass/newtype-struct-xc-2.rs | 2 ++ src/test/run-pass/newtype-struct-xc.rs | 2 ++ src/test/run-pass/nil-decl-in-foreign.rs | 2 ++ src/test/run-pass/nil-pattern.rs | 2 ++ src/test/run-pass/no-landing-pads.rs | 2 ++ src/test/run-pass/non-built-in-quote.rs | 2 ++ src/test/run-pass/non-legacy-modes.rs | 2 ++ src/test/run-pass/nondrop-cycle.rs | 2 ++ src/test/run-pass/nul-characters.rs | 2 ++ .../run-pass/nullable-pointer-ffi-compat.rs | 2 ++ .../nullable-pointer-iotareduction.rs | 2 ++ src/test/run-pass/nullable-pointer-size.rs | 2 ++ src/test/run-pass/nullary-or-pattern.rs | 2 ++ .../run-pass/numeric-method-autoexport.rs | 2 ++ ...ject-lifetime-default-default-to-static.rs | 2 ++ ...object-lifetime-default-from-ref-struct.rs | 2 ++ .../object-lifetime-default-from-rptr-box.rs | 2 ++ .../object-lifetime-default-from-rptr-mut.rs | 2 ++ ...bject-lifetime-default-from-rptr-struct.rs | 2 ++ .../object-lifetime-default-from-rptr.rs | 2 ++ src/test/run-pass/object-method-numbering.rs | 2 ++ .../object-safety-sized-self-by-value-self.rs | 2 ++ ...object-safety-sized-self-generic-method.rs | 2 ++ .../object-safety-sized-self-return-Self.rs | 2 ++ .../objects-coerce-freeze-borrored.rs | 2 ++ ...owned-object-borrowed-method-headerless.rs | 2 ++ .../objects-owned-object-owned-method.rs | 2 ++ src/test/run-pass/once-move-out-on-heap.rs | 2 ++ src/test/run-pass/one-tuple.rs | 2 ++ src/test/run-pass/operator-associativity.rs | 2 ++ src/test/run-pass/option-unwrap.rs | 2 ++ src/test/run-pass/or-pattern.rs | 2 ++ src/test/run-pass/order-drop-with-match.rs | 2 ++ src/test/run-pass/osx-frameworks.rs | 2 ++ src/test/run-pass/out-pointer-aliasing.rs | 2 ++ src/test/run-pass/output-slot-variants.rs | 2 ++ .../run-pass/overloaded-autoderef-indexing.rs | 2 ++ .../run-pass/overloaded-autoderef-order.rs | 2 ++ .../run-pass/overloaded-autoderef-vtable.rs | 2 ++ .../run-pass/overloaded-autoderef-xcrate.rs | 2 ++ .../overloaded-calls-object-one-arg.rs | 2 ++ .../overloaded-calls-object-two-args.rs | 2 ++ .../overloaded-calls-object-zero-args.rs | 2 ++ .../overloaded-calls-param-vtables.rs | 2 ++ src/test/run-pass/overloaded-calls-simple.rs | 2 ++ .../run-pass/overloaded-calls-zero-args.rs | 2 ++ src/test/run-pass/overloaded-deref-count.rs | 2 ++ .../run-pass/overloaded-index-assoc-list.rs | 2 ++ .../run-pass/overloaded-index-autoderef.rs | 2 ++ .../run-pass/overloaded-index-in-field.rs | 2 ++ src/test/run-pass/overloaded-index.rs | 2 ++ src/test/run-pass/owned-implies-static.rs | 2 ++ .../run-pass/packed-struct-borrow-element.rs | 2 ++ .../run-pass/packed-struct-generic-layout.rs | 2 ++ .../run-pass/packed-struct-generic-size.rs | 2 ++ src/test/run-pass/packed-struct-layout.rs | 2 ++ src/test/run-pass/packed-struct-match.rs | 2 ++ src/test/run-pass/packed-struct-size-xc.rs | 2 ++ src/test/run-pass/packed-struct-size.rs | 2 ++ .../run-pass/packed-tuple-struct-layout.rs | 2 ++ src/test/run-pass/packed-tuple-struct-size.rs | 2 ++ .../run-pass/panic-in-dtor-drops-fields.rs | 2 ++ .../parameterized-trait-with-bounds.rs | 2 ++ src/test/run-pass/parse-assoc-type-lt.rs | 2 ++ .../run-pass/parse-complex-macro-invoc-op.rs | 2 ++ src/test/run-pass/path.rs | 2 ++ .../run-pass/pattern-bound-var-in-for-each.rs | 2 ++ src/test/run-pass/pred-not-bool.rs | 2 ++ src/test/run-pass/priv-impl-prim-ty.rs | 2 ++ src/test/run-pass/privacy-ns.rs | 2 ++ src/test/run-pass/privacy-reexport.rs | 2 ++ src/test/run-pass/privacy1.rs | 2 ++ src/test/run-pass/private-class-field.rs | 2 ++ src/test/run-pass/private-method.rs | 2 ++ src/test/run-pass/process-remove-from-env.rs | 2 ++ src/test/run-pass/ptr-coercion.rs | 2 ++ src/test/run-pass/pub-extern-privacy.rs | 2 ++ src/test/run-pass/pub-item-inside-macro.rs | 2 ++ src/test/run-pass/pub-method-inside-macro.rs | 2 ++ src/test/run-pass/pub-use-xcrate.rs | 2 ++ src/test/run-pass/pub_use_mods_xcrate_exe.rs | 2 ++ src/test/run-pass/pure-sum.rs | 2 ++ src/test/run-pass/range-type-infer.rs | 2 ++ src/test/run-pass/range.rs | 2 ++ src/test/run-pass/ranges-precedence.rs | 2 ++ src/test/run-pass/readalias.rs | 2 ++ src/test/run-pass/rec-extend.rs | 2 ++ src/test/run-pass/rec-tup.rs | 2 ++ src/test/run-pass/rec.rs | 2 ++ src/test/run-pass/record-pat.rs | 2 ++ .../run-pass/reexport-should-still-link.rs | 2 ++ src/test/run-pass/reexport-star.rs | 2 ++ .../reexported-static-methods-cross-crate.rs | 2 ++ .../regions-addr-of-interior-of-unique-box.rs | 2 ++ .../regions-assoc-type-region-bound.rs | 2 ++ .../regions-assoc-type-static-bound.rs | 2 ++ .../run-pass/regions-borrow-evec-fixed.rs | 2 ++ src/test/run-pass/regions-borrow-evec-uniq.rs | 2 ++ src/test/run-pass/regions-borrow-uniq.rs | 2 ++ src/test/run-pass/regions-bot.rs | 2 ++ ...-close-over-type-parameter-successfully.rs | 2 ++ src/test/run-pass/regions-copy-closure.rs | 2 ++ src/test/run-pass/regions-creating-enums2.rs | 2 ++ src/test/run-pass/regions-creating-enums5.rs | 2 ++ .../run-pass/regions-debruijn-of-object.rs | 2 ++ .../run-pass/regions-dependent-addr-of.rs | 2 ++ src/test/run-pass/regions-dependent-autofn.rs | 2 ++ .../run-pass/regions-dependent-autoslice.rs | 2 ++ .../run-pass/regions-dependent-let-ref.rs | 2 ++ ...egions-early-bound-lifetime-in-assoc-fn.rs | 2 ++ .../regions-early-bound-trait-param.rs | 2 ++ ...egions-early-bound-used-in-bound-method.rs | 2 ++ .../regions-early-bound-used-in-bound.rs | 2 ++ .../regions-early-bound-used-in-type-param.rs | 2 ++ .../run-pass/regions-escape-into-other-fn.rs | 2 ++ src/test/run-pass/regions-expl-self.rs | 2 ++ src/test/run-pass/regions-fn-subtyping-2.rs | 2 ++ src/test/run-pass/regions-fn-subtyping.rs | 2 ++ .../regions-infer-borrow-scope-addr-of.rs | 2 ++ .../regions-infer-borrow-scope-view.rs | 2 ++ ...gions-infer-borrow-scope-within-loop-ok.rs | 2 ++ .../run-pass/regions-infer-borrow-scope.rs | 2 ++ src/test/run-pass/regions-infer-call-2.rs | 2 ++ src/test/run-pass/regions-infer-call.rs | 2 ++ ...regions-infer-contravariance-due-to-ret.rs | 2 ++ .../regions-infer-reborrow-ref-mut-recurse.rs | 2 ++ ...regions-infer-region-in-fn-but-not-type.rs | 2 ++ .../regions-infer-static-from-proc.rs | 2 ++ src/test/run-pass/regions-issue-21422.rs | 2 ++ src/test/run-pass/regions-issue-22246.rs | 2 ++ .../regions-lifetime-nonfree-late-bound.rs | 2 ++ ...-lifetime-static-items-enclosing-scopes.rs | 2 ++ src/test/run-pass/regions-link-fn-args.rs | 2 ++ src/test/run-pass/regions-mock-trans.rs | 2 ++ .../regions-no-bound-in-argument-cleanup.rs | 2 ++ .../regions-no-variance-from-fn-generics.rs | 2 ++ src/test/run-pass/regions-nullary-variant.rs | 2 ++ src/test/run-pass/regions-params.rs | 2 ++ .../regions-reassign-let-bound-pointer.rs | 2 ++ .../regions-reassign-match-bound-pointer.rs | 2 ++ src/test/run-pass/regions-refcell.rs | 2 ++ ...ions-on-closures-to-inference-variables.rs | 2 ++ .../regions-return-interior-of-option.rs | 2 ++ .../run-pass/regions-scope-chain-example.rs | 2 ++ src/test/run-pass/regions-trait-object-1.rs | 2 ++ ...ariance-contravariant-use-contravariant.rs | 2 ++ ...egions-variance-covariant-use-covariant.rs | 2 ++ src/test/run-pass/rename-directory.rs | 2 ++ src/test/run-pass/repeat-expr-in-static.rs | 2 ++ src/test/run-pass/resolve-issue-2428.rs | 2 ++ src/test/run-pass/resource-in-struct.rs | 2 ++ src/test/run-pass/ret-none.rs | 2 ++ src/test/run-pass/return-from-closure.rs | 2 ++ src/test/run-pass/return-nil.rs | 2 ++ src/test/run-pass/rust-log-filter.rs | 2 ++ src/test/run-pass/segfault-no-out-of-stack.rs | 2 ++ src/test/run-pass/self-impl.rs | 2 ++ .../self-in-mut-slot-default-method.rs | 2 ++ .../self-in-mut-slot-immediate-value.rs | 2 ++ src/test/run-pass/self-re-assign.rs | 2 ++ src/test/run-pass/self-shadowing-import.rs | 2 ++ src/test/run-pass/self-type-param.rs | 2 ++ .../run-pass/send-is-not-static-par-for.rs | 2 ++ src/test/run-pass/send-resource.rs | 2 ++ src/test/run-pass/send-type-inference.rs | 2 ++ src/test/run-pass/send_str_hashmap.rs | 2 ++ src/test/run-pass/send_str_treemap.rs | 2 ++ src/test/run-pass/sendable-class.rs | 2 ++ src/test/run-pass/sendfn-is-a-block.rs | 2 ++ src/test/run-pass/sepcomp-cci.rs | 2 ++ src/test/run-pass/sepcomp-extern.rs | 2 ++ src/test/run-pass/sepcomp-fns-backwards.rs | 2 ++ src/test/run-pass/sepcomp-fns.rs | 2 ++ src/test/run-pass/sepcomp-lib.rs | 2 ++ src/test/run-pass/sepcomp-statics.rs | 2 ++ src/test/run-pass/sepcomp-unwind.rs | 2 ++ src/test/run-pass/seq-compare.rs | 2 ++ src/test/run-pass/shift-various-types.rs | 2 ++ src/test/run-pass/shift.rs | 2 ++ src/test/run-pass/signed-shift-const-eval.rs | 2 ++ .../run-pass/sigpipe-should-be-ignored.rs | 2 ++ src/test/run-pass/simd-binop.rs | 2 ++ src/test/run-pass/simd-generics.rs | 2 ++ src/test/run-pass/simd-issue-10604.rs | 2 ++ src/test/run-pass/simd-size-align.rs | 2 ++ src/test/run-pass/simd-type.rs | 2 ++ src/test/run-pass/simple-generic-match.rs | 2 ++ src/test/run-pass/simple-generic-tag.rs | 2 ++ .../run-pass/single-derive-attr-with-gate.rs | 2 ++ src/test/run-pass/sized-borrowed-pointer.rs | 2 ++ src/test/run-pass/sized-owned-pointer.rs | 2 ++ src/test/run-pass/slice-2.rs | 2 ++ src/test/run-pass/slice-panic-1.rs | 2 ++ src/test/run-pass/slice-panic-2.rs | 2 ++ src/test/run-pass/slice.rs | 2 ++ src/test/run-pass/small-enum-range-edge.rs | 2 ++ src/test/run-pass/smallest-hello-world.rs | 2 ++ .../snake-case-no-lowercase-equivalent.rs | 2 ++ src/test/run-pass/spawn-types.rs | 2 ++ src/test/run-pass/stable-addr-of.rs | 2 ++ src/test/run-pass/stat.rs | 2 ++ src/test/run-pass/static-assert.rs | 2 ++ src/test/run-pass/static-fn-inline-xc.rs | 2 ++ src/test/run-pass/static-fn-trait-xc.rs | 2 ++ .../run-pass/static-function-pointer-xc.rs | 2 ++ src/test/run-pass/static-function-pointer.rs | 2 ++ src/test/run-pass/static-impl.rs | 2 ++ ...tic-method-in-trait-with-tps-intracrate.rs | 2 ++ src/test/run-pass/static-method-xcrate.rs | 2 ++ src/test/run-pass/static-methods-in-traits.rs | 2 ++ .../run-pass/static-methods-in-traits2.rs | 2 ++ src/test/run-pass/static-mut-foreign.rs | 2 ++ src/test/run-pass/static-mut-xc.rs | 2 ++ .../run-pass/std-sync-right-kind-impls.rs | 2 ++ src/test/run-pass/str-multiline.rs | 2 ++ src/test/run-pass/string-escapes.rs | 2 ++ src/test/run-pass/struct-aliases-xcrate.rs | 2 ++ src/test/run-pass/struct-aliases.rs | 2 ++ .../struct-destructuring-cross-crate.rs | 2 ++ .../run-pass/struct-like-variant-construct.rs | 2 ++ .../run-pass/struct-like-variant-match.rs | 2 ++ src/test/run-pass/struct-new-as-field-name.rs | 2 ++ src/test/run-pass/struct-order-of-eval-1.rs | 2 ++ src/test/run-pass/struct-order-of-eval-2.rs | 2 ++ src/test/run-pass/struct-order-of-eval-3.rs | 2 ++ src/test/run-pass/struct-order-of-eval-4.rs | 2 ++ .../struct-variant-field-visibility.rs | 2 ++ src/test/run-pass/struct_variant_xc.rs | 2 ++ src/test/run-pass/struct_variant_xc_match.rs | 2 ++ src/test/run-pass/super.rs | 2 ++ .../run-pass/supertrait-default-generics.rs | 2 ++ src/test/run-pass/svh-add-comment.rs | 2 ++ src/test/run-pass/svh-add-doc.rs | 2 ++ src/test/run-pass/svh-add-macro.rs | 2 ++ src/test/run-pass/svh-add-nothing.rs | 2 ++ src/test/run-pass/svh-add-redundant-cfg.rs | 2 ++ src/test/run-pass/svh-add-whitespace.rs | 2 ++ src/test/run-pass/swap-1.rs | 2 ++ src/test/run-pass/swap-2.rs | 2 ++ src/test/run-pass/swap-overlapping.rs | 2 ++ .../sync-send-iterators-in-libcollections.rs | 2 ++ src/test/run-pass/syntax-extension-cfg.rs | 2 ++ src/test/run-pass/syntax-trait-polarity.rs | 2 ++ src/test/run-pass/tag-align-dyn-u64.rs | 2 ++ src/test/run-pass/tag-align-dyn-variants.rs | 2 ++ src/test/run-pass/tag-align-u64.rs | 2 ++ src/test/run-pass/tag-exports.rs | 2 ++ src/test/run-pass/tag-in-block.rs | 2 ++ .../tag-variant-disr-type-mismatch.rs | 2 ++ src/test/run-pass/tag-variant-disr-val.rs | 2 ++ src/test/run-pass/tag.rs | 2 ++ src/test/run-pass/tail-call-arg-leak.rs | 2 ++ src/test/run-pass/tail-direct.rs | 2 ++ src/test/run-pass/task-comm-11.rs | 2 ++ src/test/run-pass/task-comm-15.rs | 2 ++ src/test/run-pass/task-comm-17.rs | 2 ++ src/test/run-pass/task-comm-5.rs | 2 ++ src/test/run-pass/task-comm-6.rs | 2 ++ src/test/run-pass/task-comm-7.rs | 2 ++ src/test/run-pass/task-comm-chan-nil.rs | 2 ++ src/test/run-pass/task-life-0.rs | 2 ++ src/test/run-pass/task-spawn-move-and-copy.rs | 2 ++ src/test/run-pass/task-stderr.rs | 2 ++ src/test/run-pass/terminate-in-initializer.rs | 2 ++ src/test/run-pass/trailing-comma.rs | 2 ++ src/test/run-pass/trait-bounds-basic.rs | 2 ++ ...trait-bounds-impl-comparison-duplicates.rs | 2 ++ .../trait-bounds-on-structs-and-enums.rs | 2 ++ src/test/run-pass/trait-bounds-recursion.rs | 2 ++ src/test/run-pass/trait-bounds.rs | 2 ++ src/test/run-pass/trait-cache-issue-18209.rs | 2 ++ .../run-pass/trait-composition-trivial.rs | 2 ++ .../trait-default-method-bound-subst.rs | 2 ++ .../trait-default-method-bound-subst2.rs | 2 ++ .../trait-default-method-bound-subst3.rs | 2 ++ .../trait-default-method-bound-subst4.rs | 2 ++ .../run-pass/trait-default-method-bound.rs | 2 ++ .../run-pass/trait-default-method-xc-2.rs | 2 ++ src/test/run-pass/trait-default-method-xc.rs | 2 ++ ...se-ambiguity-where-clause-builtin-bound.rs | 2 ++ src/test/run-pass/trait-generic.rs | 2 ++ src/test/run-pass/trait-impl-2.rs | 2 ++ src/test/run-pass/trait-impl.rs | 2 ++ .../run-pass/trait-inheritance-auto-xc-2.rs | 2 ++ .../run-pass/trait-inheritance-auto-xc.rs | 2 ++ src/test/run-pass/trait-inheritance-auto.rs | 2 ++ .../trait-inheritance-call-bound-inherited.rs | 2 ++ ...trait-inheritance-call-bound-inherited2.rs | 2 ++ ...ritance-cast-without-call-to-supertrait.rs | 2 ++ src/test/run-pass/trait-inheritance-cast.rs | 2 ++ .../trait-inheritance-cross-trait-call-xc.rs | 2 ++ .../trait-inheritance-cross-trait-call.rs | 2 ++ .../run-pass/trait-inheritance-diamond.rs | 2 ++ .../trait-inheritance-multiple-inheritors.rs | 2 ++ .../trait-inheritance-multiple-params.rs | 2 ++ src/test/run-pass/trait-inheritance-num.rs | 2 ++ src/test/run-pass/trait-inheritance-num0.rs | 2 ++ src/test/run-pass/trait-inheritance-num1.rs | 2 ++ src/test/run-pass/trait-inheritance-num5.rs | 2 ++ .../trait-inheritance-overloading-xc-exe.rs | 2 ++ .../trait-inheritance-self-in-supertype.rs | 2 ++ src/test/run-pass/trait-inheritance-simple.rs | 2 ++ src/test/run-pass/trait-inheritance-static.rs | 2 ++ .../run-pass/trait-inheritance-static2.rs | 2 ++ src/test/run-pass/trait-inheritance-subst.rs | 2 ++ src/test/run-pass/trait-inheritance-subst2.rs | 2 ++ .../run-pass/trait-inheritance-visibility.rs | 2 ++ src/test/run-pass/trait-inheritance2.rs | 2 ++ src/test/run-pass/trait-object-generics.rs | 2 ++ .../trait-object-with-lifetime-bound.rs | 2 ++ src/test/run-pass/trait-safety-ok-cc.rs | 2 ++ src/test/run-pass/trait-safety-ok.rs | 2 ++ .../run-pass/trait-where-clause-vs-impl.rs | 2 ++ .../traits-assoc-type-in-supertrait.rs | 2 ++ .../run-pass/traits-conditional-dispatch.rs | 2 ++ .../run-pass/traits-conditional-model-fn.rs | 2 ++ .../run-pass/traits-default-method-macro.rs | 2 ++ .../run-pass/traits-default-method-mut.rs | 2 ++ src/test/run-pass/traits-issue-22019.rs | 2 ++ src/test/run-pass/traits-issue-22110.rs | 2 ++ src/test/run-pass/traits-issue-22655.rs | 2 ++ src/test/run-pass/traits-issue-23003.rs | 2 ++ ...aits-multidispatch-infer-convert-target.rs | 2 ++ .../run-pass/traits-repeated-supertrait.rs | 2 ++ src/test/run-pass/trans-tag-static-padding.rs | 2 ++ .../transmute-non-immediate-to-immediate.rs | 2 ++ src/test/run-pass/tup.rs | 2 ++ src/test/run-pass/tuple-index-fat-types.rs | 2 ++ src/test/run-pass/tuple-index.rs | 2 ++ src/test/run-pass/tuple-struct-trivial.rs | 2 ++ src/test/run-pass/tydesc-name.rs | 2 ++ src/test/run-pass/type-id-higher-rank.rs | 2 ++ src/test/run-pass/type-in-nested-module.rs | 2 ++ src/test/run-pass/type-namespace.rs | 2 ++ src/test/run-pass/type-param-constraints.rs | 2 ++ src/test/run-pass/type-param.rs | 2 ++ src/test/run-pass/type-params-in-for-each.rs | 2 ++ src/test/run-pass/type-ptr.rs | 2 ++ src/test/run-pass/type-sizes.rs | 2 ++ src/test/run-pass/type-use-i1-versus-i8.rs | 2 ++ .../typeck-macro-interaction-issue-8852.rs | 2 ++ .../run-pass/typeck_type_placeholder_1.rs | 2 ++ src/test/run-pass/typeid-intrinsic.rs | 2 ++ src/test/run-pass/typestate-cfg-nesting.rs | 2 ++ src/test/run-pass/typestate-multi-decl.rs | 2 ++ src/test/run-pass/u32-decr.rs | 2 ++ src/test/run-pass/u8-incr-decr.rs | 2 ++ src/test/run-pass/u8-incr.rs | 2 ++ src/test/run-pass/ufcs-polymorphic-paths.rs | 2 ++ src/test/run-pass/ufcs-trait-object.rs | 2 ++ src/test/run-pass/ufcs-type-params.rs | 2 ++ src/test/run-pass/uint.rs | 2 ++ .../run-pass/unboxed-closures-all-traits.rs | 2 ++ src/test/run-pass/unboxed-closures-by-ref.rs | 2 ++ .../unboxed-closures-call-fn-autoderef.rs | 2 ++ .../unboxed-closures-call-sugar-autoderef.rs | 2 ++ .../unboxed-closures-counter-not-moved.rs | 2 ++ .../run-pass/unboxed-closures-cross-crate.rs | 2 ++ .../unboxed-closures-direct-sugary-call.rs | 2 ++ src/test/run-pass/unboxed-closures-drop.rs | 2 ++ .../run-pass/unboxed-closures-extern-fn-hr.rs | 2 ++ .../run-pass/unboxed-closures-extern-fn.rs | 2 ++ ...unboxed-closures-fn-as-fnmut-and-fnonce.rs | 2 ++ .../unboxed-closures-fnmut-as-fnonce.rs | 2 ++ ...nfer-argument-types-from-expected-bound.rs | 2 ++ ...rgument-types-from-expected-object-type.rs | 2 ++ ...-with-bound-regions-from-expected-bound.rs | 2 ++ ...oxed-closures-infer-fnmut-calling-fnmut.rs | 2 ++ .../unboxed-closures-infer-fnmut-move.rs | 2 ++ .../run-pass/unboxed-closures-infer-fnmut.rs | 2 ++ .../unboxed-closures-infer-fnonce-move.rs | 2 ++ .../run-pass/unboxed-closures-infer-fnonce.rs | 2 ++ .../run-pass/unboxed-closures-infer-kind.rs | 2 ++ .../unboxed-closures-infer-recursive-fn.rs | 2 ++ .../run-pass/unboxed-closures-infer-upvar.rs | 2 ++ .../run-pass/unboxed-closures-manual-impl.rs | 2 ++ .../run-pass/unboxed-closures-move-mutable.rs | 2 ++ ...ures-move-some-upvars-in-by-ref-closure.rs | 2 ++ src/test/run-pass/unboxed-closures-prelude.rs | 2 ++ src/test/run-pass/unboxed-closures-simple.rs | 2 ++ .../unboxed-closures-single-word-env.rs | 2 ++ .../unboxed-closures-static-call-fn-once.rs | 2 ++ .../run-pass/unboxed-closures-sugar-object.rs | 2 ++ .../unboxed-closures-unique-type-id.rs | 2 ++ .../run-pass/unboxed-closures-zero-args.rs | 2 ++ src/test/run-pass/unfold-cross-crate.rs | 2 ++ src/test/run-pass/unify-return-ty.rs | 2 ++ src/test/run-pass/uninit-empty-types.rs | 2 ++ src/test/run-pass/uniq-self-in-mut-slot.rs | 2 ++ src/test/run-pass/unique-assign-copy.rs | 2 ++ src/test/run-pass/unique-assign-drop.rs | 2 ++ src/test/run-pass/unique-assign-generic.rs | 2 ++ src/test/run-pass/unique-assign.rs | 2 ++ src/test/run-pass/unique-autoderef-field.rs | 2 ++ src/test/run-pass/unique-autoderef-index.rs | 2 ++ src/test/run-pass/unique-cmp.rs | 2 ++ src/test/run-pass/unique-containing-tag.rs | 2 ++ src/test/run-pass/unique-create.rs | 2 ++ src/test/run-pass/unique-decl-init-copy.rs | 2 ++ src/test/run-pass/unique-decl-init.rs | 2 ++ src/test/run-pass/unique-decl-move.rs | 2 ++ src/test/run-pass/unique-decl.rs | 2 ++ src/test/run-pass/unique-deref.rs | 2 ++ src/test/run-pass/unique-destructure.rs | 2 ++ src/test/run-pass/unique-drop-complex.rs | 2 ++ src/test/run-pass/unique-fn-arg-move.rs | 2 ++ src/test/run-pass/unique-fn-arg-mut.rs | 2 ++ src/test/run-pass/unique-fn-arg.rs | 2 ++ src/test/run-pass/unique-fn-ret.rs | 2 ++ src/test/run-pass/unique-generic-assign.rs | 2 ++ src/test/run-pass/unique-in-vec-copy.rs | 2 ++ src/test/run-pass/unique-in-vec.rs | 2 ++ src/test/run-pass/unique-init.rs | 2 ++ src/test/run-pass/unique-kinds.rs | 2 ++ src/test/run-pass/unique-match-discrim.rs | 2 ++ src/test/run-pass/unique-move-drop.rs | 2 ++ src/test/run-pass/unique-move-temp.rs | 2 ++ src/test/run-pass/unique-move.rs | 2 ++ src/test/run-pass/unique-mutable.rs | 2 ++ src/test/run-pass/unique-object-move.rs | 2 ++ src/test/run-pass/unique-pat-2.rs | 2 ++ src/test/run-pass/unique-pat.rs | 2 ++ src/test/run-pass/unique-rec.rs | 2 ++ src/test/run-pass/unique-send-2.rs | 2 ++ src/test/run-pass/unique-send.rs | 2 ++ src/test/run-pass/unique-swap.rs | 2 ++ .../run-pass/unit-like-struct-drop-run.rs | 2 ++ src/test/run-pass/unit.rs | 2 ++ src/test/run-pass/unnamed_argument_mode.rs | 2 ++ src/test/run-pass/unreachable-code-1.rs | 2 ++ src/test/run-pass/unreachable-code.rs | 2 ++ src/test/run-pass/unsafe-coercion.rs | 2 ++ .../unsafe-fn-called-from-unsafe-blk.rs | 2 ++ .../unsafe-fn-called-from-unsafe-fn.rs | 2 ++ .../run-pass/unsafe-pointer-assignability.rs | 2 ++ src/test/run-pass/unsized.rs | 2 ++ src/test/run-pass/unsized2.rs | 2 ++ src/test/run-pass/unsized3.rs | 2 ++ src/test/run-pass/unused-move-capture.rs | 2 ++ src/test/run-pass/unused-move.rs | 2 ++ src/test/run-pass/unwind-unique.rs | 2 ++ src/test/run-pass/use-crate-name-alias.rs | 2 ++ src/test/run-pass/use-import-export.rs | 2 ++ src/test/run-pass/use-mod.rs | 2 ++ src/test/run-pass/use-trait-before-def.rs | 2 ++ src/test/run-pass/use.rs | 2 ++ src/test/run-pass/use_inline_dtor.rs | 2 ++ src/test/run-pass/variadic-ffi.rs | 2 ++ ...ariance-intersection-of-ref-and-opt-ref.rs | 2 ++ src/test/run-pass/variance-trait-matching.rs | 2 ++ src/test/run-pass/variance-vec-covariant.rs | 2 ++ src/test/run-pass/variant-attributes.rs | 2 ++ src/test/run-pass/variant-structs-trivial.rs | 2 ++ src/test/run-pass/vec-dst.rs | 2 ++ src/test/run-pass/vec-fixed-length.rs | 2 ++ src/test/run-pass/vec-growth.rs | 2 ++ src/test/run-pass/vec-macro-no-std.rs | 2 ++ src/test/run-pass/vec-macro-repeat.rs | 2 ++ src/test/run-pass/vec-macro-rvalue-scope.rs | 2 ++ src/test/run-pass/vec-macro-with-brackets.rs | 2 ++ .../run-pass/vec-macro-with-trailing-comma.rs | 2 ++ src/test/run-pass/vec-matching-autoslice.rs | 2 ++ src/test/run-pass/vec-matching-fixed.rs | 2 ++ src/test/run-pass/vec-matching-fold.rs | 2 ++ src/test/run-pass/vec-matching.rs | 2 ++ src/test/run-pass/vec-push.rs | 2 ++ src/test/run-pass/vec-repeat-with-cast.rs | 2 ++ src/test/run-pass/vec-slice-drop.rs | 2 ++ src/test/run-pass/vec-slice.rs | 2 ++ src/test/run-pass/vec-tail-matching.rs | 2 ++ src/test/run-pass/vec-to_str.rs | 2 ++ src/test/run-pass/vec.rs | 2 ++ src/test/run-pass/vector-no-ann-2.rs | 2 ++ src/test/run-pass/vector-sort-panic-safe.rs | 2 ++ .../visible-private-types-feature-gate.rs | 2 ++ .../run-pass/wait-forked-but-failed-child.rs | 2 ++ src/test/run-pass/warn-ctypes-inhibit.rs | 2 ++ src/test/run-pass/weak-lang-item.rs | 2 ++ .../wf-bound-region-in-object-type.rs | 2 ++ .../where-clause-bounds-inconsistency.rs | 2 ++ .../where-clause-early-bound-lifetimes.rs | 2 ++ .../where-clause-method-substituion.rs | 2 ++ .../run-pass/where-clause-region-outlives.rs | 2 ++ src/test/run-pass/where-clauses-lifetimes.rs | 2 ++ .../where-clauses-unboxed-closures.rs | 2 ++ src/test/run-pass/where-for-self.rs | 2 ++ src/test/run-pass/while-flow-graph.rs | 2 ++ src/test/run-pass/while-label.rs | 2 ++ src/test/run-pass/while-let.rs | 2 ++ src/test/run-pass/while-prelude-drop.rs | 2 ++ src/test/run-pass/writealias.rs | 2 ++ src/test/run-pass/x86stdcall.rs | 2 ++ src/test/run-pass/x86stdcall2.rs | 2 ++ .../run-pass/xcrate-address-insignificant.rs | 2 ++ src/test/run-pass/xcrate-static-addresses.rs | 2 ++ .../run-pass/xcrate-trait-lifetime-param.rs | 2 ++ src/test/run-pass/xcrate-unit-struct.rs | 2 ++ .../run-pass/zero-size-type-destructors.rs | 2 ++ .../run-pass/zero_sized_subslice_match.rs | 2 ++ 1544 files changed, 3093 insertions(+), 12 deletions(-) diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 29123173f5bae..7488b96834904 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -40,8 +40,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, + // Run --pretty expanded when running pretty printing tests + pub pretty_expanded: bool, // Which pretty mode are we testing with, default to 'normal' pub pretty_mode: String, // Only compare pretty output and don't try compiling @@ -62,7 +62,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; + let mut pretty_expanded = false; let mut pretty_mode = None; let mut pretty_compare_only = false; let mut forbid_output = Vec::new(); @@ -96,8 +96,8 @@ 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); + if !pretty_expanded { + pretty_expanded = parse_pretty_expanded(ln); } if pretty_mode.is_none() { @@ -152,7 +152,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, + pretty_expanded: pretty_expanded, pretty_mode: pretty_mode.unwrap_or("normal".to_string()), pretty_compare_only: pretty_compare_only, forbid_output: forbid_output, @@ -295,8 +295,8 @@ 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_pretty_expanded(line: &str) -> bool { + parse_name_directive(line, "pretty-expanded") } fn parse_pretty_mode(line: &str) -> Option { @@ -340,7 +340,8 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option { } fn parse_name_directive(line: &str, directive: &str) -> bool { - line.contains(directive) + // This 'no-' rule is a quick hack to allow pretty-expanded and no-pretty-expanded to coexist + line.contains(directive) && !line.contains(&("no-".to_string() + directive)) } pub fn parse_name_value_directive(line: &str, directive: &str) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index a754bd950f7f6..26bf95c0bf14b 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -245,7 +245,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) { if !proc_res.status.success() { fatal_proc_rec("pretty-printed source does not typecheck", &proc_res); } - if props.no_pretty_expanded { return } + if !props.pretty_expanded { return } // additionally, run `--pretty expanded` and try to build it. let proc_res = print_source(config, props, testfile, srcs[round].clone(), "expanded"); diff --git a/src/test/run-pass/alias-uninit-value.rs b/src/test/run-pass/alias-uninit-value.rs index 45dd213d71fef..f6ff0415259af 100644 --- a/src/test/run-pass/alias-uninit-value.rs +++ b/src/test/run-pass/alias-uninit-value.rs @@ -12,6 +12,8 @@ // Regression test for issue #374 +// pretty-expanded FIXME #23616 + enum sty { ty_nil, } struct RawT {struct_: sty, cname: Option, hash: uint} diff --git a/src/test/run-pass/alloca-from-derived-tydesc.rs b/src/test/run-pass/alloca-from-derived-tydesc.rs index c356d1d527e5e..cd649310ae784 100644 --- a/src/test/run-pass/alloca-from-derived-tydesc.rs +++ b/src/test/run-pass/alloca-from-derived-tydesc.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + enum option { some(T), none, } struct R {v: Vec> } diff --git a/src/test/run-pass/anon-extern-mod-cross-crate-2.rs b/src/test/run-pass/anon-extern-mod-cross-crate-2.rs index 0ef666031114e..b40774e2be82f 100644 --- a/src/test/run-pass/anon-extern-mod-cross-crate-2.rs +++ b/src/test/run-pass/anon-extern-mod-cross-crate-2.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:anon-extern-mod-cross-crate-1.rs +// pretty-expanded FIXME #23616 + extern crate anonexternmod; use anonexternmod::rust_get_test_int; diff --git a/src/test/run-pass/anon-extern-mod.rs b/src/test/run-pass/anon-extern-mod.rs index cbef2850adda8..e96b0cc1442c6 100644 --- a/src/test/run-pass/anon-extern-mod.rs +++ b/src/test/run-pass/anon-extern-mod.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/argument-passing.rs b/src/test/run-pass/argument-passing.rs index dfce311529028..2428d45256d51 100644 --- a/src/test/run-pass/argument-passing.rs +++ b/src/test/run-pass/argument-passing.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct X { x: int } diff --git a/src/test/run-pass/arith-2.rs b/src/test/run-pass/arith-2.rs index 70df6e46e59d7..08412d1296cfc 100644 --- a/src/test/run-pass/arith-2.rs +++ b/src/test/run-pass/arith-2.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let i32_c: int = 0x10101010; assert!(i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3) == diff --git a/src/test/run-pass/arith-unsigned.rs b/src/test/run-pass/arith-unsigned.rs index 43288d9044ec5..8a0fc8adc1895 100644 --- a/src/test/run-pass/arith-unsigned.rs +++ b/src/test/run-pass/arith-unsigned.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(type_limits)] // Unsigned integer operations diff --git a/src/test/run-pass/artificial-block.rs b/src/test/run-pass/artificial-block.rs index 7bc1354c3cefe..422816079d62c 100644 --- a/src/test/run-pass/artificial-block.rs +++ b/src/test/run-pass/artificial-block.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f() -> int { { return 3; } } pub fn main() { assert!((f() == 3)); } diff --git a/src/test/run-pass/as-precedence.rs b/src/test/run-pass/as-precedence.rs index de294f88a4c9b..ec89e2b3ee288 100644 --- a/src/test/run-pass/as-precedence.rs +++ b/src/test/run-pass/as-precedence.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { assert_eq!(3 as uint * 3, 9); assert_eq!(3 as (uint) * 3, 9); diff --git a/src/test/run-pass/asm-concat-src.rs b/src/test/run-pass/asm-concat-src.rs index 9df96b35ce1b4..716c3d47a0365 100644 --- a/src/test/run-pass/asm-concat-src.rs +++ b/src/test/run-pass/asm-concat-src.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(asm)] pub fn main() { diff --git a/src/test/run-pass/asm-in-out-operand.rs b/src/test/run-pass/asm-in-out-operand.rs index 3ac8e4d0ee9ca..6aeadbe203e18 100644 --- a/src/test/run-pass/asm-in-out-operand.rs +++ b/src/test/run-pass/asm-in-out-operand.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(asm)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] diff --git a/src/test/run-pass/asm-out-assign.rs b/src/test/run-pass/asm-out-assign.rs index 0f6fec133d1ce..7b1548a8d4f61 100644 --- a/src/test/run-pass/asm-out-assign.rs +++ b/src/test/run-pass/asm-out-assign.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(asm)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] diff --git a/src/test/run-pass/assign-assign.rs b/src/test/run-pass/assign-assign.rs index 0f5d27015fb74..5d93388f7f4fe 100644 --- a/src/test/run-pass/assign-assign.rs +++ b/src/test/run-pass/assign-assign.rs @@ -9,6 +9,8 @@ // except according to those terms. // Issue 483 - Assignment expressions result in nil +// pretty-expanded FIXME #23616 + fn test_assign() { let mut x: int; let y: () = x = 10; diff --git a/src/test/run-pass/assignability-trait.rs b/src/test/run-pass/assignability-trait.rs index 57c50511604ca..4b22f84f78d12 100644 --- a/src/test/run-pass/assignability-trait.rs +++ b/src/test/run-pass/assignability-trait.rs @@ -12,6 +12,8 @@ // making method calls, but only if there aren't any matches without // it. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] trait iterable { diff --git a/src/test/run-pass/associated-types-basic.rs b/src/test/run-pass/associated-types-basic.rs index a5be906b159a5..853b56ffb0c2e 100644 --- a/src/test/run-pass/associated-types-basic.rs +++ b/src/test/run-pass/associated-types-basic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/run-pass/associated-types-binding-in-trait.rs b/src/test/run-pass/associated-types-binding-in-trait.rs index b47b0109bdf39..39fc224148e8e 100644 --- a/src/test/run-pass/associated-types-binding-in-trait.rs +++ b/src/test/run-pass/associated-types-binding-in-trait.rs @@ -11,6 +11,8 @@ // Test a case where the associated type binding (to `bool`, in this // case) is derived from the trait definition. Issue #21636. +// pretty-expanded FIXME #23616 + use std::vec; pub trait BitIter { diff --git a/src/test/run-pass/associated-types-binding-in-where-clause.rs b/src/test/run-pass/associated-types-binding-in-where-clause.rs index c6c66f1c75c54..87eeb23b7a3f3 100644 --- a/src/test/run-pass/associated-types-binding-in-where-clause.rs +++ b/src/test/run-pass/associated-types-binding-in-where-clause.rs @@ -10,6 +10,8 @@ // Test equality constraints on associated types in a where clause. +// pretty-expanded FIXME #23616 + pub trait Foo { type A; fn boo(&self) -> ::A; diff --git a/src/test/run-pass/associated-types-bound.rs b/src/test/run-pass/associated-types-bound.rs index 9f97d69ce3f9b..2301821f66358 100644 --- a/src/test/run-pass/associated-types-bound.rs +++ b/src/test/run-pass/associated-types-bound.rs @@ -10,6 +10,8 @@ // Test equality constrai32s on associated types in a where clause. +// pretty-expanded FIXME #23616 + pub trait ToI32 { fn to_i32(&self) -> i32; } diff --git a/src/test/run-pass/associated-types-conditional-dispatch.rs b/src/test/run-pass/associated-types-conditional-dispatch.rs index aa65b0ed10baf..1a8da6755588b 100644 --- a/src/test/run-pass/associated-types-conditional-dispatch.rs +++ b/src/test/run-pass/associated-types-conditional-dispatch.rs @@ -14,6 +14,8 @@ // `Target=[A]`, then the impl marked with `(*)` is seen to conflict // with all the others. +// pretty-expanded FIXME #23616 + use std::marker::PhantomData; use std::ops::Deref; diff --git a/src/test/run-pass/associated-types-constant-type.rs b/src/test/run-pass/associated-types-constant-type.rs index 299225e3a47b9..b53e69e8d9d16 100644 --- a/src/test/run-pass/associated-types-constant-type.rs +++ b/src/test/run-pass/associated-types-constant-type.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait SignedUnsigned { type Opposite; fn convert(self) -> Self::Opposite; diff --git a/src/test/run-pass/associated-types-doubleendediterator-object.rs b/src/test/run-pass/associated-types-doubleendediterator-object.rs index 941e9a8453802..7354ae67addc4 100644 --- a/src/test/run-pass/associated-types-doubleendediterator-object.rs +++ b/src/test/run-pass/associated-types-doubleendediterator-object.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/associated-types-duplicate-binding-in-env-hrtb.rs b/src/test/run-pass/associated-types-duplicate-binding-in-env-hrtb.rs index 8b7ea61dc77e9..8ca3bc0254834 100644 --- a/src/test/run-pass/associated-types-duplicate-binding-in-env-hrtb.rs +++ b/src/test/run-pass/associated-types-duplicate-binding-in-env-hrtb.rs @@ -12,6 +12,8 @@ // (modulo bound lifetime names) appears in the environment // twice. Issue #21965. +// pretty-expanded FIXME #23616 + fn foo(t: T) -> i32 where T : for<'a> Fn(&'a u8) -> i32, T : for<'b> Fn(&'b u8) -> i32, diff --git a/src/test/run-pass/associated-types-duplicate-binding-in-env.rs b/src/test/run-pass/associated-types-duplicate-binding-in-env.rs index 62ac21879520b..5878f5dd51b2a 100644 --- a/src/test/run-pass/associated-types-duplicate-binding-in-env.rs +++ b/src/test/run-pass/associated-types-duplicate-binding-in-env.rs @@ -11,6 +11,8 @@ // Check that we do not report ambiguities when the same predicate // appears in the environment twice. Issue #21965. +// pretty-expanded FIXME #23616 + trait Foo { type B; diff --git a/src/test/run-pass/associated-types-enum-field-named.rs b/src/test/run-pass/associated-types-enum-field-named.rs index a499aa6733aae..8cf97fe62fea5 100644 --- a/src/test/run-pass/associated-types-enum-field-named.rs +++ b/src/test/run-pass/associated-types-enum-field-named.rs @@ -10,6 +10,8 @@ // Test associated types appearing in struct-like enum variants. +// pretty-expanded FIXME #23616 + use self::VarValue::*; pub trait UnifyKey { diff --git a/src/test/run-pass/associated-types-enum-field-numbered.rs b/src/test/run-pass/associated-types-enum-field-numbered.rs index e710c53327ec7..3c57da6b4a3eb 100644 --- a/src/test/run-pass/associated-types-enum-field-numbered.rs +++ b/src/test/run-pass/associated-types-enum-field-numbered.rs @@ -10,6 +10,8 @@ // Test associated types appearing in tuple-like enum variants. +// pretty-expanded FIXME #23616 + use self::VarValue::*; pub trait UnifyKey { diff --git a/src/test/run-pass/associated-types-eq-obj.rs b/src/test/run-pass/associated-types-eq-obj.rs index 901b3c0d96b01..feccd1d2dcec0 100644 --- a/src/test/run-pass/associated-types-eq-obj.rs +++ b/src/test/run-pass/associated-types-eq-obj.rs @@ -10,6 +10,8 @@ // Test equality constraints on associated types inside of an object type +// pretty-expanded FIXME #23616 + pub trait Foo { type A; fn boo(&self) -> ::A; diff --git a/src/test/run-pass/associated-types-in-default-method.rs b/src/test/run-pass/associated-types-in-default-method.rs index 0ae6103715472..5bf10ae132cc5 100644 --- a/src/test/run-pass/associated-types-in-default-method.rs +++ b/src/test/run-pass/associated-types-in-default-method.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Get { type Value; fn get(&self) -> &::Value; diff --git a/src/test/run-pass/associated-types-in-fn.rs b/src/test/run-pass/associated-types-in-fn.rs index 4104f520a0c5d..4d286a4f9a487 100644 --- a/src/test/run-pass/associated-types-in-fn.rs +++ b/src/test/run-pass/associated-types-in-fn.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Get { type Value; fn get(&self) -> &::Value; diff --git a/src/test/run-pass/associated-types-in-impl-generics.rs b/src/test/run-pass/associated-types-in-impl-generics.rs index 59f05e1184285..41c53a5ad6410 100644 --- a/src/test/run-pass/associated-types-in-impl-generics.rs +++ b/src/test/run-pass/associated-types-in-impl-generics.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Get { type Value; fn get(&self) -> &::Value; diff --git a/src/test/run-pass/associated-types-in-inherent-method.rs b/src/test/run-pass/associated-types-in-inherent-method.rs index 951497709fd69..7b8b041e7ef67 100644 --- a/src/test/run-pass/associated-types-in-inherent-method.rs +++ b/src/test/run-pass/associated-types-in-inherent-method.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Get { type Value; fn get(&self) -> &::Value; diff --git a/src/test/run-pass/associated-types-issue-20220.rs b/src/test/run-pass/associated-types-issue-20220.rs index a253fbde5633f..718ea542799bb 100644 --- a/src/test/run-pass/associated-types-issue-20220.rs +++ b/src/test/run-pass/associated-types-issue-20220.rs @@ -10,6 +10,8 @@ // Test references to `Self::Item` in the trait. Issue #20220. +// pretty-expanded FIXME #23616 + use std::vec; trait IntoIteratorX { diff --git a/src/test/run-pass/associated-types-issue-20371.rs b/src/test/run-pass/associated-types-issue-20371.rs index e1da26b5e2942..562deba4d9301 100644 --- a/src/test/run-pass/associated-types-issue-20371.rs +++ b/src/test/run-pass/associated-types-issue-20371.rs @@ -11,6 +11,8 @@ // Test that we are able to have an impl that defines an associated type // before the actual trait. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/run-pass/associated-types-issue-21212.rs b/src/test/run-pass/associated-types-issue-21212.rs index 3c91577362a7d..057677a008785 100644 --- a/src/test/run-pass/associated-types-issue-21212.rs +++ b/src/test/run-pass/associated-types-issue-21212.rs @@ -13,6 +13,8 @@ // where clauses in the environment which in turn required normalizing // `Self::Input`. +// pretty-expanded FIXME #23616 + pub trait Parser { type Input; diff --git a/src/test/run-pass/associated-types-iterator-binding.rs b/src/test/run-pass/associated-types-iterator-binding.rs index f8258466a7d43..56e39a4450221 100644 --- a/src/test/run-pass/associated-types-iterator-binding.rs +++ b/src/test/run-pass/associated-types-iterator-binding.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn pairwise_sub>(mut t: T) -> int { let mut result = 0; loop { diff --git a/src/test/run-pass/associated-types-nested-projections.rs b/src/test/run-pass/associated-types-nested-projections.rs index 2f36014f7655b..a26b428a4eacf 100644 --- a/src/test/run-pass/associated-types-nested-projections.rs +++ b/src/test/run-pass/associated-types-nested-projections.rs @@ -10,6 +10,8 @@ // Test that we can resolve nested projection types. Issue #20666. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs b/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs index 236601b9c1692..d95ad2e883471 100644 --- a/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs +++ b/src/test/run-pass/associated-types-normalize-in-bounds-binding.rs @@ -11,6 +11,8 @@ // Test that we normalize associated types that appear in a bound that // contains a binding. Issue #21664. +// pretty-expanded FIXME #23616 + #![feature(core)] #![allow(dead_code)] diff --git a/src/test/run-pass/associated-types-normalize-in-bounds-ufcs.rs b/src/test/run-pass/associated-types-normalize-in-bounds-ufcs.rs index 8617750ca538e..d8e4c5218d9cf 100644 --- a/src/test/run-pass/associated-types-normalize-in-bounds-ufcs.rs +++ b/src/test/run-pass/associated-types-normalize-in-bounds-ufcs.rs @@ -11,6 +11,8 @@ // Test that we normalize associated types that appear in bounds; if // we didn't, the call to `self.split2()` fails to type check. +// pretty-expanded FIXME #23616 + use std::marker::PhantomData; struct Splits<'a, T:'a, P>(PhantomData<(&'a T, P)>); diff --git a/src/test/run-pass/associated-types-normalize-in-bounds.rs b/src/test/run-pass/associated-types-normalize-in-bounds.rs index 94cfcb8365381..ff08e7b69bdd8 100644 --- a/src/test/run-pass/associated-types-normalize-in-bounds.rs +++ b/src/test/run-pass/associated-types-normalize-in-bounds.rs @@ -11,6 +11,8 @@ // Test that we normalize associated types that appear in bounds; if // we didn't, the call to `self.split2()` fails to type check. +// pretty-expanded FIXME #23616 + use std::marker::PhantomData; struct Splits<'a, T, P>(PhantomData<(&'a(),T,P)>); diff --git a/src/test/run-pass/associated-types-normalize-unifield-struct.rs b/src/test/run-pass/associated-types-normalize-unifield-struct.rs index 2288e19aae0bc..82adac8cf8614 100644 --- a/src/test/run-pass/associated-types-normalize-unifield-struct.rs +++ b/src/test/run-pass/associated-types-normalize-unifield-struct.rs @@ -12,6 +12,8 @@ // various special paths in the `type_is_immediate` function. +// pretty-expanded FIXME #23616 + pub trait OffsetState: Sized {} pub trait Offset { type State: OffsetState; diff --git a/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs b/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs index 7fa2030cfe190..151a9da948e83 100644 --- a/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs +++ b/src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs @@ -12,6 +12,8 @@ // `Item` originates in a where-clause, not the declaration of // `T`. Issue #20300. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker::{MarkerTrait, PhantomData}; diff --git a/src/test/run-pass/associated-types-projection-from-known-type-in-impl.rs b/src/test/run-pass/associated-types-projection-from-known-type-in-impl.rs index c65d2db9b0cf0..2518ccf1cb474 100644 --- a/src/test/run-pass/associated-types-projection-from-known-type-in-impl.rs +++ b/src/test/run-pass/associated-types-projection-from-known-type-in-impl.rs @@ -10,6 +10,8 @@ // Test where the impl self type uses a projection from a constant type. +// pretty-expanded FIXME #23616 + trait Int { type T; diff --git a/src/test/run-pass/associated-types-projection-in-object-type.rs b/src/test/run-pass/associated-types-projection-in-object-type.rs index a9c34a605ce16..3b146792fdade 100644 --- a/src/test/run-pass/associated-types-projection-in-object-type.rs +++ b/src/test/run-pass/associated-types-projection-in-object-type.rs @@ -13,6 +13,8 @@ // appear in associated type bindings in object types, which were not // being properly flagged. +// pretty-expanded FIXME #23616 + use std::ops::{Shl, Shr}; use std::cell::RefCell; diff --git a/src/test/run-pass/associated-types-projection-in-supertrait.rs b/src/test/run-pass/associated-types-projection-in-supertrait.rs index 4d2358fae27b1..dbc2164c93a69 100644 --- a/src/test/run-pass/associated-types-projection-in-supertrait.rs +++ b/src/test/run-pass/associated-types-projection-in-supertrait.rs @@ -11,6 +11,8 @@ // Test that we are handle to correctly handle a projection type // that appears in a supertrait bound. Issue #20559. +// pretty-expanded FIXME #23616 + trait A { type TA; diff --git a/src/test/run-pass/associated-types-projection-in-where-clause.rs b/src/test/run-pass/associated-types-projection-in-where-clause.rs index 3f3f4fbd1d628..80e3aa09e3e61 100644 --- a/src/test/run-pass/associated-types-projection-in-where-clause.rs +++ b/src/test/run-pass/associated-types-projection-in-where-clause.rs @@ -10,6 +10,8 @@ // Test a where clause that uses a non-normalized projection type. +// pretty-expanded FIXME #23616 + trait Int { type T; diff --git a/src/test/run-pass/associated-types-qualified-path-with-trait-with-type-parameters.rs b/src/test/run-pass/associated-types-qualified-path-with-trait-with-type-parameters.rs index abbde16faefca..a69de216ab997 100644 --- a/src/test/run-pass/associated-types-qualified-path-with-trait-with-type-parameters.rs +++ b/src/test/run-pass/associated-types-qualified-path-with-trait-with-type-parameters.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { type Bar; fn get_bar() -> >::Bar; diff --git a/src/test/run-pass/associated-types-ref-from-struct.rs b/src/test/run-pass/associated-types-ref-from-struct.rs index 3c7cc7c497534..ce09ec60bd6a5 100644 --- a/src/test/run-pass/associated-types-ref-from-struct.rs +++ b/src/test/run-pass/associated-types-ref-from-struct.rs @@ -10,6 +10,8 @@ // Test associated type references in structure fields. +// pretty-expanded FIXME #23616 + trait Test { type V; diff --git a/src/test/run-pass/associated-types-ref-in-struct-literal.rs b/src/test/run-pass/associated-types-ref-in-struct-literal.rs index 67fe11d8fedde..30b3871522cb2 100644 --- a/src/test/run-pass/associated-types-ref-in-struct-literal.rs +++ b/src/test/run-pass/associated-types-ref-in-struct-literal.rs @@ -10,6 +10,8 @@ // Test associated type references in a struct literal. Issue #20535. +// pretty-expanded FIXME #23616 + pub trait Foo { type Bar; diff --git a/src/test/run-pass/associated-types-region-erasure-issue-20582.rs b/src/test/run-pass/associated-types-region-erasure-issue-20582.rs index 03ab8f7e43136..16e49f146ab55 100644 --- a/src/test/run-pass/associated-types-region-erasure-issue-20582.rs +++ b/src/test/run-pass/associated-types-region-erasure-issue-20582.rs @@ -11,6 +11,8 @@ // Regression test for #20582. This test caused an ICE related to // inconsistent region erasure in trans. +// pretty-expanded FIXME #23616 + struct Foo<'a> { buf: &'a[u8] } diff --git a/src/test/run-pass/associated-types-resolve-lifetime.rs b/src/test/run-pass/associated-types-resolve-lifetime.rs index a4b0b1a6e03af..1ce4d6e341de2 100644 --- a/src/test/run-pass/associated-types-resolve-lifetime.rs +++ b/src/test/run-pass/associated-types-resolve-lifetime.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Get { fn get(&self) -> T; } diff --git a/src/test/run-pass/associated-types-return.rs b/src/test/run-pass/associated-types-return.rs index e7ab910bc9508..87043b833fd8f 100644 --- a/src/test/run-pass/associated-types-return.rs +++ b/src/test/run-pass/associated-types-return.rs @@ -10,6 +10,8 @@ // Test equality constraints on associated types in a where clause. +// pretty-expanded FIXME #23616 + pub trait Foo { type A; fn boo(&self) -> ::A; diff --git a/src/test/run-pass/associated-types-simple.rs b/src/test/run-pass/associated-types-simple.rs index 9e388dc3d347e..4c9deab451126 100644 --- a/src/test/run-pass/associated-types-simple.rs +++ b/src/test/run-pass/associated-types-simple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Get { type Value; fn get(&self) -> &::Value; diff --git a/src/test/run-pass/associated-types-stream.rs b/src/test/run-pass/associated-types-stream.rs index ef7fbe87b3047..a2b7cf2106eb7 100644 --- a/src/test/run-pass/associated-types-stream.rs +++ b/src/test/run-pass/associated-types-stream.rs @@ -11,6 +11,8 @@ // Test references to the trait `Stream` in the bounds for associated // types defined on `Stream`. Issue #20551. +// pretty-expanded FIXME #23616 + trait Stream { type Car; type Cdr: Stream; diff --git a/src/test/run-pass/associated-types-struct-field-named.rs b/src/test/run-pass/associated-types-struct-field-named.rs index a63274beb0ebb..d1872e4fb55f4 100644 --- a/src/test/run-pass/associated-types-struct-field-named.rs +++ b/src/test/run-pass/associated-types-struct-field-named.rs @@ -11,6 +11,8 @@ // Test that we correctly normalize the type of a struct field // which has an associated type. +// pretty-expanded FIXME #23616 + pub trait UnifyKey { type Value; diff --git a/src/test/run-pass/associated-types-struct-field-numbered.rs b/src/test/run-pass/associated-types-struct-field-numbered.rs index 3be2623185bcd..3d97c503dca5f 100644 --- a/src/test/run-pass/associated-types-struct-field-numbered.rs +++ b/src/test/run-pass/associated-types-struct-field-numbered.rs @@ -11,6 +11,8 @@ // Test that we correctly normalize the type of a struct field // which has an associated type. +// pretty-expanded FIXME #23616 + pub trait UnifyKey { type Value; diff --git a/src/test/run-pass/associated-types-sugar-path.rs b/src/test/run-pass/associated-types-sugar-path.rs index 7e7299961d8a8..f8eff2f22fe3c 100644 --- a/src/test/run-pass/associated-types-sugar-path.rs +++ b/src/test/run-pass/associated-types-sugar-path.rs @@ -10,6 +10,8 @@ // Test paths to associated types using the type-parameter-only sugar. +// pretty-expanded FIXME #23616 + pub trait Foo { type A; fn boo(&self) -> Self::A; diff --git a/src/test/run-pass/astconv-cycle-between-trait-and-type.rs b/src/test/run-pass/astconv-cycle-between-trait-and-type.rs index 0c6d91eda26af..ef2dc48fe1364 100644 --- a/src/test/run-pass/astconv-cycle-between-trait-and-type.rs +++ b/src/test/run-pass/astconv-cycle-between-trait-and-type.rs @@ -13,6 +13,8 @@ // carries a predicate that references the trait (`u32 : Trait1`, // substituted). +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Trait1 : Trait2> { diff --git a/src/test/run-pass/attr-before-view-item.rs b/src/test/run-pass/attr-before-view-item.rs index f472a672be2bf..cdd1b96de1e60 100644 --- a/src/test/run-pass/attr-before-view-item.rs +++ b/src/test/run-pass/attr-before-view-item.rs @@ -10,6 +10,8 @@ // error-pattern:expected item +// pretty-expanded FIXME #23616 + #![feature(custom_attribute, test)] #[foo = "bar"] diff --git a/src/test/run-pass/attr-before-view-item2.rs b/src/test/run-pass/attr-before-view-item2.rs index 5d91d0a41cfa0..cd02b5a9e7310 100644 --- a/src/test/run-pass/attr-before-view-item2.rs +++ b/src/test/run-pass/attr-before-view-item2.rs @@ -10,6 +10,8 @@ // error-pattern:expected item +// pretty-expanded FIXME #23616 + #![feature(custom_attribute, test)] mod m { diff --git a/src/test/run-pass/attr-main-2.rs b/src/test/run-pass/attr-main-2.rs index fd0ae0729af25..4680f47fad6ce 100644 --- a/src/test/run-pass/attr-main-2.rs +++ b/src/test/run-pass/attr-main-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(main)] pub fn main() { diff --git a/src/test/run-pass/attr-main.rs b/src/test/run-pass/attr-main.rs index 29b504bed535d..e8a12ee3ac791 100644 --- a/src/test/run-pass/attr-main.rs +++ b/src/test/run-pass/attr-main.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(main)] #[main] diff --git a/src/test/run-pass/attr-mix-new.rs b/src/test/run-pass/attr-mix-new.rs index 7980937ce2a15..bcfb4b330f5ed 100644 --- a/src/test/run-pass/attr-mix-new.rs +++ b/src/test/run-pass/attr-mix-new.rs @@ -7,6 +7,8 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_attribute)] #![feature(custom_attribute)] diff --git a/src/test/run-pass/attr-no-drop-flag-size.rs b/src/test/run-pass/attr-no-drop-flag-size.rs index bd799917842b1..f135762d28327 100644 --- a/src/test/run-pass/attr-no-drop-flag-size.rs +++ b/src/test/run-pass/attr-no-drop-flag-size.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] #![feature(unsafe_no_drop_flag)] diff --git a/src/test/run-pass/attr-start.rs b/src/test/run-pass/attr-start.rs index 2bf09404200a5..08dce42c05b3e 100644 --- a/src/test/run-pass/attr-start.rs +++ b/src/test/run-pass/attr-start.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(start)] #[start] diff --git a/src/test/run-pass/attr.rs b/src/test/run-pass/attr.rs index 129d69b6e67cc..57e1b38c9c166 100644 --- a/src/test/run-pass/attr.rs +++ b/src/test/run-pass/attr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(main)] #[main] diff --git a/src/test/run-pass/auto-loop.rs b/src/test/run-pass/auto-loop.rs index 2cc7451e13894..2e79183755a18 100644 --- a/src/test/run-pass/auto-loop.rs +++ b/src/test/run-pass/auto-loop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let mut sum = 0; let xs = vec!(1, 2, 3, 4, 5); diff --git a/src/test/run-pass/auto-ref-sliceable.rs b/src/test/run-pass/auto-ref-sliceable.rs index d2e9bc2efe727..6dab0e5197138 100644 --- a/src/test/run-pass/auto-ref-sliceable.rs +++ b/src/test/run-pass/auto-ref-sliceable.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait Pushable { fn push_val(&mut self, t: T); } diff --git a/src/test/run-pass/autobind.rs b/src/test/run-pass/autobind.rs index ed471ed0079e3..cf3b7d41b3a65 100644 --- a/src/test/run-pass/autobind.rs +++ b/src/test/run-pass/autobind.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(x: Vec) -> T { return x.into_iter().next().unwrap(); } fn g(act: F) -> int where F: FnOnce(Vec) -> int { return act(vec!(1, 2, 3)); } diff --git a/src/test/run-pass/autoderef-and-borrow-method-receiver.rs b/src/test/run-pass/autoderef-and-borrow-method-receiver.rs index fc643ec594089..6d7e150093e2c 100644 --- a/src/test/run-pass/autoderef-and-borrow-method-receiver.rs +++ b/src/test/run-pass/autoderef-and-borrow-method-receiver.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo { x: int, } diff --git a/src/test/run-pass/autoderef-method-on-trait.rs b/src/test/run-pass/autoderef-method-on-trait.rs index 6a90fa47e58ff..6a038927f4a48 100644 --- a/src/test/run-pass/autoderef-method-on-trait.rs +++ b/src/test/run-pass/autoderef-method-on-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/autoderef-method-priority.rs b/src/test/run-pass/autoderef-method-priority.rs index cadce45b18d02..bab0403e79dc1 100644 --- a/src/test/run-pass/autoderef-method-priority.rs +++ b/src/test/run-pass/autoderef-method-priority.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs b/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs index 746107803c90d..e9f70346089a5 100644 --- a/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs +++ b/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/autoderef-method-twice.rs b/src/test/run-pass/autoderef-method-twice.rs index 51b5c98816a2c..7558733adf1d2 100644 --- a/src/test/run-pass/autoderef-method-twice.rs +++ b/src/test/run-pass/autoderef-method-twice.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/autoderef-method.rs b/src/test/run-pass/autoderef-method.rs index 61e704276af31..1754a37076815 100644 --- a/src/test/run-pass/autoderef-method.rs +++ b/src/test/run-pass/autoderef-method.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/autoref-intermediate-types-issue-3585.rs b/src/test/run-pass/autoref-intermediate-types-issue-3585.rs index 86d6a91e75b76..37ba355956c30 100644 --- a/src/test/run-pass/autoref-intermediate-types-issue-3585.rs +++ b/src/test/run-pass/autoref-intermediate-types-issue-3585.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/big-literals.rs b/src/test/run-pass/big-literals.rs index 01ac2fc20bffe..09746380ebab0 100644 --- a/src/test/run-pass/big-literals.rs +++ b/src/test/run-pass/big-literals.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert_eq!(0xffffffff, (-1 as u32)); assert_eq!(4294967295, (-1 as u32)); diff --git a/src/test/run-pass/binary-minus-without-space.rs b/src/test/run-pass/binary-minus-without-space.rs index dc3b142f23376..1fe9dde844a4f 100644 --- a/src/test/run-pass/binary-minus-without-space.rs +++ b/src/test/run-pass/binary-minus-without-space.rs @@ -10,6 +10,8 @@ // Check that issue #954 stays fixed +// pretty-expanded FIXME #23616 + pub fn main() { match -1 { -1 => {}, _ => panic!("wat") } assert_eq!(1-1, 0); diff --git a/src/test/run-pass/bind-by-move.rs b/src/test/run-pass/bind-by-move.rs index a9fa8449d0f1a..5a6e801501fcf 100644 --- a/src/test/run-pass/bind-by-move.rs +++ b/src/test/run-pass/bind-by-move.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::Arc; fn dispose(_x: Arc) { } diff --git a/src/test/run-pass/bind-field-short-with-modifiers.rs b/src/test/run-pass/bind-field-short-with-modifiers.rs index 470577d729730..c7b770d0a2b63 100644 --- a/src/test/run-pass/bind-field-short-with-modifiers.rs +++ b/src/test/run-pass/bind-field-short-with-modifiers.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { struct Foo { x: int, y: int } let mut f = Foo { x: 10, y: 0 }; diff --git a/src/test/run-pass/bitv-perf-test.rs b/src/test/run-pass/bitv-perf-test.rs index 6c88f350172a3..c9a2e07dd8398 100644 --- a/src/test/run-pass/bitv-perf-test.rs +++ b/src/test/run-pass/bitv-perf-test.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, collections)] diff --git a/src/test/run-pass/blind-item-mixed-crate-use-item.rs b/src/test/run-pass/blind-item-mixed-crate-use-item.rs index 80c73e5e60b53..b1d6f96f0f6d4 100644 --- a/src/test/run-pass/blind-item-mixed-crate-use-item.rs +++ b/src/test/run-pass/blind-item-mixed-crate-use-item.rs @@ -11,6 +11,8 @@ // aux-build:blind-item-mixed-crate-use-item-foo.rs // aux-build:blind-item-mixed-crate-use-item-foo2.rs +// pretty-expanded FIXME #23616 + mod m { pub fn f(_: T, _: (), _: ()) { } pub fn g(_: T, _: (), _: ()) { } diff --git a/src/test/run-pass/blind-item-mixed-use-item.rs b/src/test/run-pass/blind-item-mixed-use-item.rs index a3dad01acf17b..6244ba6fccf0b 100644 --- a/src/test/run-pass/blind-item-mixed-use-item.rs +++ b/src/test/run-pass/blind-item-mixed-use-item.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod m { pub fn f(_: T, _: ()) { } pub fn g(_: T, _: ()) { } diff --git a/src/test/run-pass/block-arg-call-as.rs b/src/test/run-pass/block-arg-call-as.rs index 8be6d1bd35ae8..a745e52efeb17 100644 --- a/src/test/run-pass/block-arg-call-as.rs +++ b/src/test/run-pass/block-arg-call-as.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn asBlock(f: F) -> uint where F: FnOnce() -> uint { return f(); } diff --git a/src/test/run-pass/block-expr-precedence.rs b/src/test/run-pass/block-expr-precedence.rs index ace372dd2d3d9..01bd8ce10cd09 100644 --- a/src/test/run-pass/block-expr-precedence.rs +++ b/src/test/run-pass/block-expr-precedence.rs @@ -13,6 +13,8 @@ // no-reformat +// pretty-expanded FIXME #23616 + /* * * When you write a block-expression thing followed by diff --git a/src/test/run-pass/block-fn-coerce.rs b/src/test/run-pass/block-fn-coerce.rs index f3c874a5afcec..059f4e3749407 100644 --- a/src/test/run-pass/block-fn-coerce.rs +++ b/src/test/run-pass/block-fn-coerce.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn force(f: F) -> int where F: FnOnce() -> int { return f(); } pub fn main() { diff --git a/src/test/run-pass/bool-not.rs b/src/test/run-pass/bool-not.rs index e98087810b2a4..c46684af6efda 100644 --- a/src/test/run-pass/bool-not.rs +++ b/src/test/run-pass/bool-not.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { if !false { assert!((true)); } else { assert!((false)); } if !true { assert!((false)); } else { assert!((true)); } diff --git a/src/test/run-pass/bool.rs b/src/test/run-pass/bool.rs index edf6b397ff8c8..a2b19d32054a5 100644 --- a/src/test/run-pass/bool.rs +++ b/src/test/run-pass/bool.rs @@ -10,6 +10,8 @@ // Basic boolean tests +// pretty-expanded FIXME #23616 + use std::cmp::Ordering::{Equal, Greater, Less}; use std::ops::{BitAnd, BitOr, BitXor}; diff --git a/src/test/run-pass/borrow-by-val-method-receiver.rs b/src/test/run-pass/borrow-by-val-method-receiver.rs index 4cc39b4b5d79a..bcaf94953d612 100644 --- a/src/test/run-pass/borrow-by-val-method-receiver.rs +++ b/src/test/run-pass/borrow-by-val-method-receiver.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn foo(self); } diff --git a/src/test/run-pass/borrow-tuple-fields.rs b/src/test/run-pass/borrow-tuple-fields.rs index 2e5688d8b7497..381afd94e3b64 100644 --- a/src/test/run-pass/borrow-tuple-fields.rs +++ b/src/test/run-pass/borrow-tuple-fields.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo(int, int); fn main() { diff --git a/src/test/run-pass/borrowck-assign-to-subfield.rs b/src/test/run-pass/borrowck-assign-to-subfield.rs index 10b5825cdd624..f30a50e37d81d 100644 --- a/src/test/run-pass/borrowck-assign-to-subfield.rs +++ b/src/test/run-pass/borrowck-assign-to-subfield.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { struct A { a: int, diff --git a/src/test/run-pass/borrowck-binding-mutbl.rs b/src/test/run-pass/borrowck-binding-mutbl.rs index 34ad2b2def03f..a0ad3cc6ca1af 100644 --- a/src/test/run-pass/borrowck-binding-mutbl.rs +++ b/src/test/run-pass/borrowck-binding-mutbl.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct F { f: Vec } fn impure(_v: &[int]) { diff --git a/src/test/run-pass/borrowck-borrow-from-expr-block.rs b/src/test/run-pass/borrowck-borrow-from-expr-block.rs index 9fcd87418bee3..ff61036d2c3d6 100644 --- a/src/test/run-pass/borrowck-borrow-from-expr-block.rs +++ b/src/test/run-pass/borrowck-borrow-from-expr-block.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/borrowck-borrow-of-mut-base-ptr-safe.rs b/src/test/run-pass/borrowck-borrow-of-mut-base-ptr-safe.rs index 48129f2b6ddc3..eb61c747aea26 100644 --- a/src/test/run-pass/borrowck-borrow-of-mut-base-ptr-safe.rs +++ b/src/test/run-pass/borrowck-borrow-of-mut-base-ptr-safe.rs @@ -13,6 +13,8 @@ // // Example from src/librustc_borrowck/borrowck/README.md +// pretty-expanded FIXME #23616 + fn foo<'a>(mut t0: &'a mut int, mut t1: &'a mut int) { let p: &int = &*t0; // Freezes `*t0` diff --git a/src/test/run-pass/borrowck-closures-two-imm.rs b/src/test/run-pass/borrowck-closures-two-imm.rs index 75161d16bc064..6ccb2203bca8e 100644 --- a/src/test/run-pass/borrowck-closures-two-imm.rs +++ b/src/test/run-pass/borrowck-closures-two-imm.rs @@ -14,6 +14,8 @@ // that the main function can read the variable too while // the closures are in scope. Issue #6801. +// pretty-expanded FIXME #23616 + fn a() -> i32 { let mut x = 3; x += 1; diff --git a/src/test/run-pass/borrowck-field-sensitivity.rs b/src/test/run-pass/borrowck-field-sensitivity.rs index 533445052ae65..10e4ad3eb974b 100644 --- a/src/test/run-pass/borrowck-field-sensitivity.rs +++ b/src/test/run-pass/borrowck-field-sensitivity.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/borrowck-fixed-length-vecs.rs b/src/test/run-pass/borrowck-fixed-length-vecs.rs index ee561fdb0be52..3f38a8df04c57 100644 --- a/src/test/run-pass/borrowck-fixed-length-vecs.rs +++ b/src/test/run-pass/borrowck-fixed-length-vecs.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = [22]; let y = &x[0]; diff --git a/src/test/run-pass/borrowck-freeze-frozen-mut.rs b/src/test/run-pass/borrowck-freeze-frozen-mut.rs index 30a921c9bd24f..8e8e012fdbf49 100644 --- a/src/test/run-pass/borrowck-freeze-frozen-mut.rs +++ b/src/test/run-pass/borrowck-freeze-frozen-mut.rs @@ -10,6 +10,8 @@ // Test that a `&mut` inside of an `&` is freezable. +// pretty-expanded FIXME #23616 + struct MutSlice<'a, T:'a> { data: &'a mut [T] } diff --git a/src/test/run-pass/borrowck-lend-args.rs b/src/test/run-pass/borrowck-lend-args.rs index 9b8fa8f9f79b2..b0cf5d81aa965 100644 --- a/src/test/run-pass/borrowck-lend-args.rs +++ b/src/test/run-pass/borrowck-lend-args.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn borrow(_v: &int) {} fn borrow_from_arg_imm_ref(v: Box) { diff --git a/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs b/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs index ae5734a09b3cd..1170c5be9b5ce 100644 --- a/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs +++ b/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs @@ -11,6 +11,8 @@ // Check that we do not ICE when compiling this // macro, which reuses the expression `$id` +// pretty-expanded FIXME #23616 + #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/borrowck-move-by-capture-ok.rs b/src/test/run-pass/borrowck-move-by-capture-ok.rs index 4364391cf0c60..0ea18a6abe480 100644 --- a/src/test/run-pass/borrowck-move-by-capture-ok.rs +++ b/src/test/run-pass/borrowck-move-by-capture-ok.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(unboxed_closures)] diff --git a/src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs b/src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs index 092d7c1317029..313dab18a31cc 100644 --- a/src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs +++ b/src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn want_slice(v: &[int]) -> int { let mut sum = 0; for i in v { sum += *i; } diff --git a/src/test/run-pass/borrowck-pat-reassign-no-binding.rs b/src/test/run-pass/borrowck-pat-reassign-no-binding.rs index 4ccbf6b5b0fed..c3b69333dc555 100644 --- a/src/test/run-pass/borrowck-pat-reassign-no-binding.rs +++ b/src/test/run-pass/borrowck-pat-reassign-no-binding.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let mut x = None; match x { diff --git a/src/test/run-pass/borrowck-rvalues-mutable.rs b/src/test/run-pass/borrowck-rvalues-mutable.rs index d4de4ef34d397..e7ff379b433a6 100644 --- a/src/test/run-pass/borrowck-rvalues-mutable.rs +++ b/src/test/run-pass/borrowck-rvalues-mutable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Counter { value: uint } diff --git a/src/test/run-pass/borrowck-scope-of-deref-issue-4666.rs b/src/test/run-pass/borrowck-scope-of-deref-issue-4666.rs index 02c7dc38db00f..488c014eac776 100644 --- a/src/test/run-pass/borrowck-scope-of-deref-issue-4666.rs +++ b/src/test/run-pass/borrowck-scope-of-deref-issue-4666.rs @@ -12,6 +12,8 @@ // limited to the deref operation itself, and does not infect the // block as a whole. +// pretty-expanded FIXME #23616 + struct Box { x: uint } diff --git a/src/test/run-pass/borrowck-static-item-in-fn.rs b/src/test/run-pass/borrowck-static-item-in-fn.rs index 366752f46b003..d51d0b1d2e1fd 100644 --- a/src/test/run-pass/borrowck-static-item-in-fn.rs +++ b/src/test/run-pass/borrowck-static-item-in-fn.rs @@ -10,6 +10,8 @@ // Regression test for issue #7740 +// pretty-expanded FIXME #23616 + pub fn main() { static A: &'static char = &'A'; } diff --git a/src/test/run-pass/borrowck-trait-lifetime.rs b/src/test/run-pass/borrowck-trait-lifetime.rs index a2b0fa5663530..0bfa8f48650bb 100644 --- a/src/test/run-pass/borrowck-trait-lifetime.rs +++ b/src/test/run-pass/borrowck-trait-lifetime.rs @@ -11,6 +11,8 @@ // This test verifies that casting from the same lifetime on a value // to the same lifetime on a trait succeeds. See issue #10766. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] use std::marker; diff --git a/src/test/run-pass/borrowck-uniq-via-ref.rs b/src/test/run-pass/borrowck-uniq-via-ref.rs index 84bd70c78d487..c7199fccff6d6 100644 --- a/src/test/run-pass/borrowck-uniq-via-ref.rs +++ b/src/test/run-pass/borrowck-uniq-via-ref.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct Rec { f: Box, } diff --git a/src/test/run-pass/borrowck-univariant-enum.rs b/src/test/run-pass/borrowck-univariant-enum.rs index d95594119b6bc..0ce2709c02d6a 100644 --- a/src/test/run-pass/borrowck-univariant-enum.rs +++ b/src/test/run-pass/borrowck-univariant-enum.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + use std::cell::Cell; #[derive(Copy)] diff --git a/src/test/run-pass/borrowck-use-mut-borrow.rs b/src/test/run-pass/borrowck-use-mut-borrow.rs index 4b69e554cda66..b646c741e7d3c 100644 --- a/src/test/run-pass/borrowck-use-mut-borrow.rs +++ b/src/test/run-pass/borrowck-use-mut-borrow.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/borrowed-ptr-pattern-2.rs b/src/test/run-pass/borrowed-ptr-pattern-2.rs index efd932933db33..aaf962577ff24 100644 --- a/src/test/run-pass/borrowed-ptr-pattern-2.rs +++ b/src/test/run-pass/borrowed-ptr-pattern-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(s: &String) -> bool { match &**s { "kitty" => true, diff --git a/src/test/run-pass/borrowed-ptr-pattern-3.rs b/src/test/run-pass/borrowed-ptr-pattern-3.rs index 030e055c4ccb7..eaad5944e6801 100644 --- a/src/test/run-pass/borrowed-ptr-pattern-3.rs +++ b/src/test/run-pass/borrowed-ptr-pattern-3.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo<'r>(s: &'r uint) -> bool { match s { &3 => true, diff --git a/src/test/run-pass/borrowed-ptr-pattern-infallible.rs b/src/test/run-pass/borrowed-ptr-pattern-infallible.rs index e57c001ea05b4..69cb27dcf899e 100644 --- a/src/test/run-pass/borrowed-ptr-pattern-infallible.rs +++ b/src/test/run-pass/borrowed-ptr-pattern-infallible.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let (&x, &y) = (&3, &'a'); assert_eq!(x, 3); diff --git a/src/test/run-pass/borrowed-ptr-pattern-option.rs b/src/test/run-pass/borrowed-ptr-pattern-option.rs index 9f17b9d7f95b5..9588663aa18b9 100644 --- a/src/test/run-pass/borrowed-ptr-pattern-option.rs +++ b/src/test/run-pass/borrowed-ptr-pattern-option.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn select<'r>(x: &'r Option, y: &'r Option) -> &'r Option { match (x, y) { (&None, &None) => x, diff --git a/src/test/run-pass/borrowed-ptr-pattern.rs b/src/test/run-pass/borrowed-ptr-pattern.rs index 7ccb40c8e7b37..52322c41236b8 100644 --- a/src/test/run-pass/borrowed-ptr-pattern.rs +++ b/src/test/run-pass/borrowed-ptr-pattern.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(x: &T) -> T{ match x { &ref a => (*a).clone() diff --git a/src/test/run-pass/box-new.rs b/src/test/run-pass/box-new.rs index 168218e1b1e27..a2d76d33993ba 100644 --- a/src/test/run-pass/box-new.rs +++ b/src/test/run-pass/box-new.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let _a = Box::new(1); } diff --git a/src/test/run-pass/break-value.rs b/src/test/run-pass/break-value.rs index efc3ab32a1a81..4c4600590ee26 100644 --- a/src/test/run-pass/break-value.rs +++ b/src/test/run-pass/break-value.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn int_id(x: int) -> int { return x; } pub fn main() { loop { int_id(break); } } diff --git a/src/test/run-pass/break.rs b/src/test/run-pass/break.rs index 6498c4b461def..80934c48515dc 100644 --- a/src/test/run-pass/break.rs +++ b/src/test/run-pass/break.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let mut i = 0; while i < 20 { i += 1; if i == 10 { break; } } diff --git a/src/test/run-pass/bug-7183-generics.rs b/src/test/run-pass/bug-7183-generics.rs index a3bb02d1d0037..625cd98bdf80e 100644 --- a/src/test/run-pass/bug-7183-generics.rs +++ b/src/test/run-pass/bug-7183-generics.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Speak : Sized { fn say(&self, s:&str) -> String; fn hi(&self) -> String { hello(self) } diff --git a/src/test/run-pass/bug-7295.rs b/src/test/run-pass/bug-7295.rs index 143ebfdabface..89fd51bd5f1dc 100644 --- a/src/test/run-pass/bug-7295.rs +++ b/src/test/run-pass/bug-7295.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub trait Foo { fn func1(&self, t: U, w: T); diff --git a/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs b/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs index 379ac12a95424..eb6d1028331be 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities-transitive.rs @@ -14,6 +14,8 @@ // a Send. Basically this just makes sure rustc is using // each_bound_trait_and_supertraits in type_contents correctly. +// pretty-expanded FIXME #23616 + use std::sync::mpsc::{channel, Sender}; trait Bar : Send { } diff --git a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs index cd019c21a3d05..0ff8c0c6ba08f 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs @@ -14,6 +14,8 @@ // Tests "capabilities" granted by traits with super-builtin-kinds, // even when using them cross-crate. +// pretty-expanded FIXME #23616 + extern crate trait_superkinds_in_metadata; use std::sync::mpsc::{channel, Sender, Receiver}; diff --git a/src/test/run-pass/builtin-superkinds-capabilities.rs b/src/test/run-pass/builtin-superkinds-capabilities.rs index dc61508eec4fa..d016a92f465bd 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities.rs @@ -12,6 +12,8 @@ // builtin-kinds, e.g., if a trait requires Send to implement, then // at usage site of that trait, we know we have the Send capability. +// pretty-expanded FIXME #23616 + use std::sync::mpsc::{channel, Sender, Receiver}; trait Foo : Send { } diff --git a/src/test/run-pass/builtin-superkinds-in-metadata.rs b/src/test/run-pass/builtin-superkinds-in-metadata.rs index 7eaed910124d9..e38a7bac67a86 100644 --- a/src/test/run-pass/builtin-superkinds-in-metadata.rs +++ b/src/test/run-pass/builtin-superkinds-in-metadata.rs @@ -13,6 +13,8 @@ // Tests (correct) usage of trait super-builtin-kinds cross-crate. +// pretty-expanded FIXME #23616 + extern crate trait_superkinds_in_metadata; use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare}; use trait_superkinds_in_metadata::{RequiresCopy}; diff --git a/src/test/run-pass/builtin-superkinds-phantom-typaram.rs b/src/test/run-pass/builtin-superkinds-phantom-typaram.rs index 964c28dc94517..6bc81f4a36bcd 100644 --- a/src/test/run-pass/builtin-superkinds-phantom-typaram.rs +++ b/src/test/run-pass/builtin-superkinds-phantom-typaram.rs @@ -12,6 +12,8 @@ // super-builtin-kind of a trait, if the type parameter is never used, // the type can implement the trait anyway. +// pretty-expanded FIXME #23616 + use std::marker; trait Foo : Send { } diff --git a/src/test/run-pass/builtin-superkinds-self-type.rs b/src/test/run-pass/builtin-superkinds-self-type.rs index 1d05a7baa5352..924a8c023f8b6 100644 --- a/src/test/run-pass/builtin-superkinds-self-type.rs +++ b/src/test/run-pass/builtin-superkinds-self-type.rs @@ -11,6 +11,8 @@ // Tests the ability for the Self type in default methods to use // capabilities granted by builtin kinds as supertraits. +// pretty-expanded FIXME #23616 + use std::sync::mpsc::{Sender, channel}; trait Foo : Send + Sized + 'static { diff --git a/src/test/run-pass/builtin-superkinds-simple.rs b/src/test/run-pass/builtin-superkinds-simple.rs index 9643e2986d2e5..e8d59b267feb7 100644 --- a/src/test/run-pass/builtin-superkinds-simple.rs +++ b/src/test/run-pass/builtin-superkinds-simple.rs @@ -10,6 +10,8 @@ // Simple test case of implementing a trait with super-builtin-kinds. +// pretty-expanded FIXME #23616 + trait Foo : Send { } impl Foo for int { } diff --git a/src/test/run-pass/builtin-superkinds-typaram.rs b/src/test/run-pass/builtin-superkinds-typaram.rs index d96679c69fd1b..6d41774c05bf1 100644 --- a/src/test/run-pass/builtin-superkinds-typaram.rs +++ b/src/test/run-pass/builtin-superkinds-typaram.rs @@ -11,6 +11,8 @@ // Tests correct implementation of traits with super-builtin-kinds // using a bounded type parameter. +// pretty-expanded FIXME #23616 + trait Foo : Send { } impl Foo for T { } diff --git a/src/test/run-pass/by-value-self-in-mut-slot.rs b/src/test/run-pass/by-value-self-in-mut-slot.rs index aa88004cd1199..baca7dc13f1b9 100644 --- a/src/test/run-pass/by-value-self-in-mut-slot.rs +++ b/src/test/run-pass/by-value-self-in-mut-slot.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct X { a: int } diff --git a/src/test/run-pass/c-stack-as-value.rs b/src/test/run-pass/c-stack-as-value.rs index b81764e1de555..b678f149fa240 100644 --- a/src/test/run-pass/c-stack-as-value.rs +++ b/src/test/run-pass/c-stack-as-value.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] mod rustrt { diff --git a/src/test/run-pass/c-stack-returning-int64.rs b/src/test/run-pass/c-stack-returning-int64.rs index eceaa54b740a3..a9f80de86059c 100644 --- a/src/test/run-pass/c-stack-returning-int64.rs +++ b/src/test/run-pass/c-stack-returning-int64.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc, std_misc)] extern crate libc; diff --git a/src/test/run-pass/call-closure-from-overloaded-op.rs b/src/test/run-pass/call-closure-from-overloaded-op.rs index 29fcdf504de6e..cef48aadab50a 100644 --- a/src/test/run-pass/call-closure-from-overloaded-op.rs +++ b/src/test/run-pass/call-closure-from-overloaded-op.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo() -> int { 22 } pub fn main() { diff --git a/src/test/run-pass/can-copy-pod.rs b/src/test/run-pass/can-copy-pod.rs index 9c8bc5411ef91..31b279335225f 100644 --- a/src/test/run-pass/can-copy-pod.rs +++ b/src/test/run-pass/can-copy-pod.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs b/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs index 631133cc7ff8b..d2eb5c33eae80 100644 --- a/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs +++ b/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/capture-clauses-boxed-closures.rs b/src/test/run-pass/capture-clauses-boxed-closures.rs index 6518df11517e9..5bf6f5fb04891 100644 --- a/src/test/run-pass/capture-clauses-boxed-closures.rs +++ b/src/test/run-pass/capture-clauses-boxed-closures.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn each(x: &[T], mut f: F) where F: FnMut(&T) { for val in x { f(val) diff --git a/src/test/run-pass/capture-clauses-unboxed-closures.rs b/src/test/run-pass/capture-clauses-unboxed-closures.rs index 19316590c262d..c4f89bbcd328d 100644 --- a/src/test/run-pass/capture-clauses-unboxed-closures.rs +++ b/src/test/run-pass/capture-clauses-unboxed-closures.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn each<'a,T,F:FnMut(&'a T)>(x: &'a [T], mut f: F) { diff --git a/src/test/run-pass/capturing-logging.rs b/src/test/run-pass/capturing-logging.rs index 2a5ccb88aff5f..b20de7113ec5d 100644 --- a/src/test/run-pass/capturing-logging.rs +++ b/src/test/run-pass/capturing-logging.rs @@ -10,6 +10,8 @@ // exec-env:RUST_LOG=info +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, old_io, rustc_private, std_misc)] diff --git a/src/test/run-pass/cast-in-array-size.rs b/src/test/run-pass/cast-in-array-size.rs index 717ca3ff9fecc..e79bab1b7b050 100644 --- a/src/test/run-pass/cast-in-array-size.rs +++ b/src/test/run-pass/cast-in-array-size.rs @@ -10,6 +10,8 @@ // issues #10618 and #16382 +// pretty-expanded FIXME #23616 + const SIZE: int = 25; fn main() { diff --git a/src/test/run-pass/cast.rs b/src/test/run-pass/cast.rs index fc71e6c59fcaf..3eec130d5a91c 100644 --- a/src/test/run-pass/cast.rs +++ b/src/test/run-pass/cast.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let i: int = 'Q' as int; assert_eq!(i, 0x51); diff --git a/src/test/run-pass/cci_capture_clause.rs b/src/test/run-pass/cci_capture_clause.rs index 8b2947ba3eef0..80b75af6e441e 100644 --- a/src/test/run-pass/cci_capture_clause.rs +++ b/src/test/run-pass/cci_capture_clause.rs @@ -13,6 +13,8 @@ // This test makes sure we can do cross-crate inlining on functions // that use capture clauses. +// pretty-expanded FIXME #23616 + extern crate cci_capture_clause; pub fn main() { diff --git a/src/test/run-pass/cci_nested_exe.rs b/src/test/run-pass/cci_nested_exe.rs index 778e82a8fe599..665469883043c 100644 --- a/src/test/run-pass/cci_nested_exe.rs +++ b/src/test/run-pass/cci_nested_exe.rs @@ -10,6 +10,8 @@ // aux-build:cci_nested_lib.rs +// pretty-expanded FIXME #23616 + #![feature(globs)] extern crate cci_nested_lib; diff --git a/src/test/run-pass/cell-does-not-clone.rs b/src/test/run-pass/cell-does-not-clone.rs index ea1d0b625fcd7..d7a74adc02d5e 100644 --- a/src/test/run-pass/cell-does-not-clone.rs +++ b/src/test/run-pass/cell-does-not-clone.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::cell::Cell; #[derive(Copy)] diff --git a/src/test/run-pass/cfg-attr-cfg.rs b/src/test/run-pass/cfg-attr-cfg.rs index 09ab70194864f..74022d4c6c839 100644 --- a/src/test/run-pass/cfg-attr-cfg.rs +++ b/src/test/run-pass/cfg-attr-cfg.rs @@ -11,5 +11,7 @@ // main is conditionally compiled, but the conditional compilation // is conditional too! +// pretty-expanded FIXME #23616 + #[cfg_attr(foo, cfg(bar))] fn main() { } diff --git a/src/test/run-pass/cfg-attr-crate.rs b/src/test/run-pass/cfg-attr-crate.rs index e6bd8afad280b..25d689475fb4b 100644 --- a/src/test/run-pass/cfg-attr-crate.rs +++ b/src/test/run-pass/cfg-attr-crate.rs @@ -10,6 +10,8 @@ // https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044 +// pretty-expanded FIXME #23616 + #![cfg_attr(not_used, no_std)] fn main() { } diff --git a/src/test/run-pass/cfg-family.rs b/src/test/run-pass/cfg-family.rs index 24120b69c7f0c..415607aa72bfc 100644 --- a/src/test/run-pass/cfg-family.rs +++ b/src/test/run-pass/cfg-family.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[cfg(windows)] pub fn main() { } diff --git a/src/test/run-pass/cfg-macros-foo.rs b/src/test/run-pass/cfg-macros-foo.rs index aeb6fcbbc0f01..5fa1bc47f877a 100644 --- a/src/test/run-pass/cfg-macros-foo.rs +++ b/src/test/run-pass/cfg-macros-foo.rs @@ -13,6 +13,8 @@ // check that cfg correctly chooses between the macro impls (see also // cfg-macros-notfoo.rs) +// pretty-expanded FIXME #23616 + #[cfg(foo)] #[macro_use] mod foo { diff --git a/src/test/run-pass/cfg-macros-notfoo.rs b/src/test/run-pass/cfg-macros-notfoo.rs index adc27d556227e..7cddac160319f 100644 --- a/src/test/run-pass/cfg-macros-notfoo.rs +++ b/src/test/run-pass/cfg-macros-notfoo.rs @@ -13,6 +13,8 @@ // check that cfg correctly chooses between the macro impls (see also // cfg-macros-foo.rs) +// pretty-expanded FIXME #23616 + #[cfg(foo)] #[macro_use] mod foo { diff --git a/src/test/run-pass/cfg-match-arm.rs b/src/test/run-pass/cfg-match-arm.rs index 02f02862f6884..05dc7d52424b1 100644 --- a/src/test/run-pass/cfg-match-arm.rs +++ b/src/test/run-pass/cfg-match-arm.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { Bar, Baz, diff --git a/src/test/run-pass/cfg-target-family.rs b/src/test/run-pass/cfg-target-family.rs index 784c9326a0186..b6954f7c2eeaf 100644 --- a/src/test/run-pass/cfg-target-family.rs +++ b/src/test/run-pass/cfg-target-family.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[cfg(target_family = "windows")] pub fn main() { } diff --git a/src/test/run-pass/cfg_inner_static.rs b/src/test/run-pass/cfg_inner_static.rs index 04912fc20037a..b3d5ddc428308 100644 --- a/src/test/run-pass/cfg_inner_static.rs +++ b/src/test/run-pass/cfg_inner_static.rs @@ -10,6 +10,8 @@ // aux-build:cfg_inner_static.rs +// pretty-expanded FIXME #23616 + extern crate cfg_inner_static; pub fn main() { diff --git a/src/test/run-pass/cfgs-on-items.rs b/src/test/run-pass/cfgs-on-items.rs index b7cf3c4d22a3f..7d25321fae1bc 100644 --- a/src/test/run-pass/cfgs-on-items.rs +++ b/src/test/run-pass/cfgs-on-items.rs @@ -11,6 +11,8 @@ // compile-flags: --cfg fooA --cfg fooB // fooA AND !bar +// pretty-expanded FIXME #23616 + #[cfg(all(fooA, not(bar)))] fn foo1() -> int { 1 } diff --git a/src/test/run-pass/char.rs b/src/test/run-pass/char.rs index f982d3723b4c2..801b01918e103 100644 --- a/src/test/run-pass/char.rs +++ b/src/test/run-pass/char.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let c: char = 'x'; let d: char = 'x'; diff --git a/src/test/run-pass/check-static-mut-slices.rs b/src/test/run-pass/check-static-mut-slices.rs index af25c43005dd4..adf041b04d6fb 100644 --- a/src/test/run-pass/check-static-mut-slices.rs +++ b/src/test/run-pass/check-static-mut-slices.rs @@ -10,6 +10,8 @@ // Checks that mutable static items can have mutable slices +// pretty-expanded FIXME #23616 + static mut TEST: &'static mut [int] = &mut [1]; pub fn main() { diff --git a/src/test/run-pass/check-static-recursion-foreign.rs b/src/test/run-pass/check-static-recursion-foreign.rs index ebaa1b5595974..554853ade5be6 100644 --- a/src/test/run-pass/check-static-recursion-foreign.rs +++ b/src/test/run-pass/check-static-recursion-foreign.rs @@ -12,6 +12,8 @@ // aux-build:check_static_recursion_foreign_helper.rs +// pretty-expanded FIXME #23616 + #![feature(custom_attribute, libc)] extern crate check_static_recursion_foreign_helper; diff --git a/src/test/run-pass/check-static-slice.rs b/src/test/run-pass/check-static-slice.rs index 6e2cfedf9ec3e..260668e48e96b 100644 --- a/src/test/run-pass/check-static-slice.rs +++ b/src/test/run-pass/check-static-slice.rs @@ -11,6 +11,8 @@ // Check that the various ways of getting to a reference to a vec (both sized // and unsized) work properly. +// pretty-expanded FIXME #23616 + const aa: [int; 3] = [1, 2, 3]; const ab: &'static [int; 3] = &aa; const ac: &'static [int] = ab; diff --git a/src/test/run-pass/child-outlives-parent.rs b/src/test/run-pass/child-outlives-parent.rs index 7a8b4770f9563..64642e51c094b 100644 --- a/src/test/run-pass/child-outlives-parent.rs +++ b/src/test/run-pass/child-outlives-parent.rs @@ -10,6 +10,8 @@ // Reported as issue #126, child leaks the string. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::thread::Thread; diff --git a/src/test/run-pass/class-dtor.rs b/src/test/run-pass/class-dtor.rs index c98e53c8a95a9..6884ac8c07579 100644 --- a/src/test/run-pass/class-dtor.rs +++ b/src/test/run-pass/class-dtor.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { done : extern fn(uint), meows : uint, diff --git a/src/test/run-pass/class-exports.rs b/src/test/run-pass/class-exports.rs index a3f857ab4b069..05228b30c41d8 100644 --- a/src/test/run-pass/class-exports.rs +++ b/src/test/run-pass/class-exports.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* Test that exporting a class also exports its public fields and methods */ diff --git a/src/test/run-pass/class-method-cross-crate.rs b/src/test/run-pass/class-method-cross-crate.rs index 55acd2e040d9e..a5c60e3a7b53c 100644 --- a/src/test/run-pass/class-method-cross-crate.rs +++ b/src/test/run-pass/class-method-cross-crate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:cci_class_2.rs +// pretty-expanded FIXME #23616 + extern crate cci_class_2; use cci_class_2::kitties::cat; diff --git a/src/test/run-pass/class-methods-cross-crate.rs b/src/test/run-pass/class-methods-cross-crate.rs index 34c309780b1bc..73abaf7d34bb8 100644 --- a/src/test/run-pass/class-methods-cross-crate.rs +++ b/src/test/run-pass/class-methods-cross-crate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:cci_class_3.rs +// pretty-expanded FIXME #23616 + extern crate cci_class_3; use cci_class_3::kitties::cat; diff --git a/src/test/run-pass/class-methods.rs b/src/test/run-pass/class-methods.rs index 8fa7634228615..2959938e37368 100644 --- a/src/test/run-pass/class-methods.rs +++ b/src/test/run-pass/class-methods.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { meows : uint, diff --git a/src/test/run-pass/class-poly-methods-cross-crate.rs b/src/test/run-pass/class-poly-methods-cross-crate.rs index edbbc4f5b3421..6537a931fa615 100644 --- a/src/test/run-pass/class-poly-methods-cross-crate.rs +++ b/src/test/run-pass/class-poly-methods-cross-crate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:cci_class_6.rs +// pretty-expanded FIXME #23616 + extern crate cci_class_6; use cci_class_6::kitties::cat; diff --git a/src/test/run-pass/class-poly-methods.rs b/src/test/run-pass/class-poly-methods.rs index 557f9986238c7..9e74a1002042d 100644 --- a/src/test/run-pass/class-poly-methods.rs +++ b/src/test/run-pass/class-poly-methods.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { info : Vec , meows : uint, diff --git a/src/test/run-pass/class-str-field.rs b/src/test/run-pass/class-str-field.rs index 2fb8610092bf9..e3b9b56db0b5b 100644 --- a/src/test/run-pass/class-str-field.rs +++ b/src/test/run-pass/class-str-field.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { name : String, diff --git a/src/test/run-pass/class-typarams.rs b/src/test/run-pass/class-typarams.rs index c50a8cc83a503..6cd8f4c658cde 100644 --- a/src/test/run-pass/class-typarams.rs +++ b/src/test/run-pass/class-typarams.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::marker::PhantomData; struct cat { diff --git a/src/test/run-pass/classes-cross-crate.rs b/src/test/run-pass/classes-cross-crate.rs index aae17abcc5fc6..36d7bd6b3ca48 100644 --- a/src/test/run-pass/classes-cross-crate.rs +++ b/src/test/run-pass/classes-cross-crate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:cci_class_4.rs +// pretty-expanded FIXME #23616 + extern crate cci_class_4; use cci_class_4::kitties::cat; diff --git a/src/test/run-pass/classes-self-referential.rs b/src/test/run-pass/classes-self-referential.rs index a54a821a7b9b4..487d20729d4e7 100644 --- a/src/test/run-pass/classes-self-referential.rs +++ b/src/test/run-pass/classes-self-referential.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct kitten { cat: Option, } diff --git a/src/test/run-pass/classes-simple-cross-crate.rs b/src/test/run-pass/classes-simple-cross-crate.rs index 0966045464878..cfa13dbe622f7 100644 --- a/src/test/run-pass/classes-simple-cross-crate.rs +++ b/src/test/run-pass/classes-simple-cross-crate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:cci_class.rs +// pretty-expanded FIXME #23616 + extern crate cci_class; use cci_class::kitties::cat; diff --git a/src/test/run-pass/classes-simple-method.rs b/src/test/run-pass/classes-simple-method.rs index 502fa73ed93e5..8fc4f47dc0277 100644 --- a/src/test/run-pass/classes-simple-method.rs +++ b/src/test/run-pass/classes-simple-method.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { meows : uint, diff --git a/src/test/run-pass/classes-simple.rs b/src/test/run-pass/classes-simple.rs index 3cf529f2958bd..ff5ef145bcddf 100644 --- a/src/test/run-pass/classes-simple.rs +++ b/src/test/run-pass/classes-simple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { meows : uint, diff --git a/src/test/run-pass/cleanup-arm-conditional.rs b/src/test/run-pass/cleanup-arm-conditional.rs index 66204ec94941d..8dff34bdc1fcd 100644 --- a/src/test/run-pass/cleanup-arm-conditional.rs +++ b/src/test/run-pass/cleanup-arm-conditional.rs @@ -21,6 +21,8 @@ // Test that cleanup scope for temporaries created in a match // arm is confined to the match arm itself. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, os)] diff --git a/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs b/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs index 83f93cb81a1e6..7fd7ab90fc293 100644 --- a/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs +++ b/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs @@ -12,6 +12,8 @@ // This test verifies that temporaries created for `while`'s and `if` // conditions are dropped after the condition is evaluated. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs b/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs index ff883294fd394..24c95bbb6dea7 100644 --- a/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs +++ b/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs @@ -24,6 +24,8 @@ // It's unclear how likely such a bug is to recur, but it seems like a // scenario worth testing. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/cleanup-shortcircuit.rs b/src/test/run-pass/cleanup-shortcircuit.rs index 4466dda6c6927..d448934f781db 100644 --- a/src/test/run-pass/cleanup-shortcircuit.rs +++ b/src/test/run-pass/cleanup-shortcircuit.rs @@ -20,6 +20,8 @@ // Test that cleanups for the RHS of shortcircuiting operators work. +// pretty-expanded FIXME #23616 + use std::env; pub fn main() { diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs index 2c65dc7e2aca2..cfbcc52e602c4 100644 --- a/src/test/run-pass/clone-with-exterior.rs +++ b/src/test/run-pass/clone-with-exterior.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, std_misc)] diff --git a/src/test/run-pass/closure-bounds-can-capture-chan.rs b/src/test/run-pass/closure-bounds-can-capture-chan.rs index 816b28c3a9ae1..dbbac8a16333b 100644 --- a/src/test/run-pass/closure-bounds-can-capture-chan.rs +++ b/src/test/run-pass/closure-bounds-can-capture-chan.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] use std::sync::mpsc::channel; diff --git a/src/test/run-pass/closure-inference.rs b/src/test/run-pass/closure-inference.rs index 3bd0273216de3..06b6e1b5abedd 100644 --- a/src/test/run-pass/closure-inference.rs +++ b/src/test/run-pass/closure-inference.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(i: isize) -> isize { i + 1 } fn apply(f: F, v: A) -> A where F: FnOnce(A) -> A { f(v) } diff --git a/src/test/run-pass/closure-inference2.rs b/src/test/run-pass/closure-inference2.rs index fa16ea001452c..328a27b3f1e8a 100644 --- a/src/test/run-pass/closure-inference2.rs +++ b/src/test/run-pass/closure-inference2.rs @@ -10,6 +10,8 @@ // Test a rather underspecified example: +// pretty-expanded FIXME #23616 + pub fn main() { let f = {|i| i}; assert_eq!(f(2), 2); diff --git a/src/test/run-pass/cmp-default.rs b/src/test/run-pass/cmp-default.rs index fd040d109108f..fbe871a1bffce 100644 --- a/src/test/run-pass/cmp-default.rs +++ b/src/test/run-pass/cmp-default.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::cmp::Ordering; // Test default methods in PartialOrd and PartialEq diff --git a/src/test/run-pass/coerce-expect-unsized.rs b/src/test/run-pass/coerce-expect-unsized.rs index 8a9325aecb143..1b12cbd33df8a 100644 --- a/src/test/run-pass/coerce-expect-unsized.rs +++ b/src/test/run-pass/coerce-expect-unsized.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/coerce-match-calls.rs b/src/test/run-pass/coerce-match-calls.rs index 34c9875f1de73..b3eec9939c29e 100644 --- a/src/test/run-pass/coerce-match-calls.rs +++ b/src/test/run-pass/coerce-match-calls.rs @@ -10,6 +10,8 @@ // Check that coercions are propagated through match and if expressions. +// pretty-expanded FIXME #23616 + use std::boxed::Box; pub fn main() { diff --git a/src/test/run-pass/coerce-match.rs b/src/test/run-pass/coerce-match.rs index 2592957b73859..01627f1a83766 100644 --- a/src/test/run-pass/coerce-match.rs +++ b/src/test/run-pass/coerce-match.rs @@ -10,6 +10,8 @@ // Check that coercions are propagated through match and if expressions. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/coerce-overloaded-autoderef.rs b/src/test/run-pass/coerce-overloaded-autoderef.rs index ec8d58616dc0f..a053311a0403e 100644 --- a/src/test/run-pass/coerce-overloaded-autoderef.rs +++ b/src/test/run-pass/coerce-overloaded-autoderef.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::rc::Rc; // Examples from the "deref coercions" RFC, at rust-lang/rfcs#241. diff --git a/src/test/run-pass/coerce-reborrow-imm-ptr-arg.rs b/src/test/run-pass/coerce-reborrow-imm-ptr-arg.rs index 0bbabcb859993..7812f0088b146 100644 --- a/src/test/run-pass/coerce-reborrow-imm-ptr-arg.rs +++ b/src/test/run-pass/coerce-reborrow-imm-ptr-arg.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn negate(x: &int) -> int { -*x } diff --git a/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs b/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs index 419df84bdf55b..4638c51bbf702 100644 --- a/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs +++ b/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct SpeechMaker { speeches: uint } diff --git a/src/test/run-pass/coerce-reborrow-imm-vec-arg.rs b/src/test/run-pass/coerce-reborrow-imm-vec-arg.rs index b6b30e2fe9b21..edc8df64a2042 100644 --- a/src/test/run-pass/coerce-reborrow-imm-vec-arg.rs +++ b/src/test/run-pass/coerce-reborrow-imm-vec-arg.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn sum(x: &[int]) -> int { let mut sum = 0; for y in x { sum += *y; } diff --git a/src/test/run-pass/coerce-reborrow-imm-vec-rcvr.rs b/src/test/run-pass/coerce-reborrow-imm-vec-rcvr.rs index 32230c82a7253..dcef198320056 100644 --- a/src/test/run-pass/coerce-reborrow-imm-vec-rcvr.rs +++ b/src/test/run-pass/coerce-reborrow-imm-vec-rcvr.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn bar(v: &mut [uint]) -> Vec { v.to_vec() } diff --git a/src/test/run-pass/coerce-reborrow-mut-ptr-arg.rs b/src/test/run-pass/coerce-reborrow-mut-ptr-arg.rs index 4a680027b46e2..9f6444c43c737 100644 --- a/src/test/run-pass/coerce-reborrow-mut-ptr-arg.rs +++ b/src/test/run-pass/coerce-reborrow-mut-ptr-arg.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct SpeechMaker { speeches: uint } diff --git a/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs b/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs index 2f866955ff46c..1751979db8c97 100644 --- a/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs +++ b/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct SpeechMaker { speeches: uint } diff --git a/src/test/run-pass/coerce-reborrow-mut-vec-arg.rs b/src/test/run-pass/coerce-reborrow-mut-vec-arg.rs index 2473b4b674e57..ab8b6818f4373 100644 --- a/src/test/run-pass/coerce-reborrow-mut-vec-arg.rs +++ b/src/test/run-pass/coerce-reborrow-mut-vec-arg.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn reverse(v: &mut [uint]) { v.reverse(); } diff --git a/src/test/run-pass/coerce-reborrow-mut-vec-rcvr.rs b/src/test/run-pass/coerce-reborrow-mut-vec-rcvr.rs index ea09bb3904de6..06ff3824cd203 100644 --- a/src/test/run-pass/coerce-reborrow-mut-vec-rcvr.rs +++ b/src/test/run-pass/coerce-reborrow-mut-vec-rcvr.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn bar(v: &mut [uint]) { v.reverse(); v.reverse(); diff --git a/src/test/run-pass/coerce-unify-return.rs b/src/test/run-pass/coerce-unify-return.rs index eeba9042f7c3f..2299a03b2a423 100644 --- a/src/test/run-pass/coerce-unify-return.rs +++ b/src/test/run-pass/coerce-unify-return.rs @@ -11,6 +11,8 @@ // Check that coercions unify the expected return type of a polymorphic // function call, instead of leaving the type variables as they were. +// pretty-expanded FIXME #23616 + struct Foo; impl Foo { fn foo(self, x: T) -> Option { Some(x) } diff --git a/src/test/run-pass/coherence-bigint-int.rs b/src/test/run-pass/coherence-bigint-int.rs index baf2f57206d6a..cbfe30906a73f 100644 --- a/src/test/run-pass/coherence-bigint-int.rs +++ b/src/test/run-pass/coherence-bigint-int.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote1; diff --git a/src/test/run-pass/coherence-bigint-vecint.rs b/src/test/run-pass/coherence-bigint-vecint.rs index cdc5bc1171655..8537c1bb00289 100644 --- a/src/test/run-pass/coherence-bigint-vecint.rs +++ b/src/test/run-pass/coherence-bigint-vecint.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote1; diff --git a/src/test/run-pass/coherence-blanket.rs b/src/test/run-pass/coherence-blanket.rs index e02117d1ca261..2f2709698a040 100644 --- a/src/test/run-pass/coherence-blanket.rs +++ b/src/test/run-pass/coherence-blanket.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote1; diff --git a/src/test/run-pass/coherence-covered-type-parameter.rs b/src/test/run-pass/coherence-covered-type-parameter.rs index 27f1f2dafb003..7bb3a01ccf8f7 100644 --- a/src/test/run-pass/coherence-covered-type-parameter.rs +++ b/src/test/run-pass/coherence-covered-type-parameter.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote; diff --git a/src/test/run-pass/coherence-cow-1.rs b/src/test/run-pass/coherence-cow-1.rs index b380372b40125..4d76f482b4e5a 100644 --- a/src/test/run-pass/coherence-cow-1.rs +++ b/src/test/run-pass/coherence-cow-1.rs @@ -13,6 +13,8 @@ // Test that it's ok for T to appear first in the self-type, as long // as it's covered somewhere. +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::{Remote,Pair}; diff --git a/src/test/run-pass/coherence-cow-2.rs b/src/test/run-pass/coherence-cow-2.rs index 93e507c0d639d..685432ad1cff4 100644 --- a/src/test/run-pass/coherence-cow-2.rs +++ b/src/test/run-pass/coherence-cow-2.rs @@ -13,6 +13,8 @@ // Test that it's ok for T to appear second in the self-type, as long // as it's covered somewhere. +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::{Remote,Pair}; diff --git a/src/test/run-pass/coherence-impl-in-fn.rs b/src/test/run-pass/coherence-impl-in-fn.rs index 6edd7390f0f31..f91ccf6120a6e 100644 --- a/src/test/run-pass/coherence-impl-in-fn.rs +++ b/src/test/run-pass/coherence-impl-in-fn.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { #[derive(Copy)] enum x { foo } diff --git a/src/test/run-pass/coherence-iterator-vec-any-elem.rs b/src/test/run-pass/coherence-iterator-vec-any-elem.rs index 6dc2ff4588b67..e807b6ca3bc11 100644 --- a/src/test/run-pass/coherence-iterator-vec-any-elem.rs +++ b/src/test/run-pass/coherence-iterator-vec-any-elem.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote1; diff --git a/src/test/run-pass/coherence-iterator-vec.rs b/src/test/run-pass/coherence-iterator-vec.rs index 7077503f73ff9..3cb3efe8e7bf6 100644 --- a/src/test/run-pass/coherence-iterator-vec.rs +++ b/src/test/run-pass/coherence-iterator-vec.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote1; diff --git a/src/test/run-pass/coherence-local-1.rs b/src/test/run-pass/coherence-local-1.rs index a9bc3dc0e2f27..172066abb2b84 100644 --- a/src/test/run-pass/coherence-local-1.rs +++ b/src/test/run-pass/coherence-local-1.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote; diff --git a/src/test/run-pass/coherence-local-2.rs b/src/test/run-pass/coherence-local-2.rs index 07a830cb1ac2d..afdea4e6b7f13 100644 --- a/src/test/run-pass/coherence-local-2.rs +++ b/src/test/run-pass/coherence-local-2.rs @@ -10,6 +10,8 @@ // aux-build:coherence-lib.rs +// pretty-expanded FIXME #23616 + extern crate "coherence-lib" as lib; use lib::Remote; diff --git a/src/test/run-pass/coherence-multidispatch-tuple.rs b/src/test/run-pass/coherence-multidispatch-tuple.rs index b16b033c22fcc..8ca79f1d4f100 100644 --- a/src/test/run-pass/coherence-multidispatch-tuple.rs +++ b/src/test/run-pass/coherence-multidispatch-tuple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::fmt::Debug; use std::default::Default; diff --git a/src/test/run-pass/coherence-negative-impls-safe.rs b/src/test/run-pass/coherence-negative-impls-safe.rs index 7844ef3faca45..2f42ab4988ace 100644 --- a/src/test/run-pass/coherence-negative-impls-safe.rs +++ b/src/test/run-pass/coherence-negative-impls-safe.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(optin_builtin_traits)] use std::marker::Send; diff --git a/src/test/run-pass/colorful-write-macros.rs b/src/test/run-pass/colorful-write-macros.rs index 35fe447c5e657..21ff6d6938a3b 100644 --- a/src/test/run-pass/colorful-write-macros.rs +++ b/src/test/run-pass/colorful-write-macros.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// no-pretty-expanded - use std::io::Write; use std::fmt; diff --git a/src/test/run-pass/compare-generic-enums.rs b/src/test/run-pass/compare-generic-enums.rs index c6f4fecf8acc6..9b049ede859a6 100644 --- a/src/test/run-pass/compare-generic-enums.rs +++ b/src/test/run-pass/compare-generic-enums.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + type an_int = int; fn cmp(x: Option, y: Option) -> bool { diff --git a/src/test/run-pass/concat.rs b/src/test/run-pass/concat.rs index 2de881993f156..7441d1f21b0f9 100644 --- a/src/test/run-pass/concat.rs +++ b/src/test/run-pass/concat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert_eq!(format!(concat!("foo", "bar", "{}"), "baz"), "foobarbaz".to_string()); assert_eq!(format!(concat!()), "".to_string()); diff --git a/src/test/run-pass/conditional-compile-arch.rs b/src/test/run-pass/conditional-compile-arch.rs index 0e9447bd2497d..e51270fdc8d21 100644 --- a/src/test/run-pass/conditional-compile-arch.rs +++ b/src/test/run-pass/conditional-compile-arch.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[cfg(target_arch = "x86")] pub fn main() { } diff --git a/src/test/run-pass/conditional-compile.rs b/src/test/run-pass/conditional-compile.rs index f77be4d9c0631..590912f6e9197 100644 --- a/src/test/run-pass/conditional-compile.rs +++ b/src/test/run-pass/conditional-compile.rs @@ -9,6 +9,8 @@ // except according to those terms. // Crate use statements +// pretty-expanded FIXME #23616 + #[cfg(bogus)] use flippity; diff --git a/src/test/run-pass/conditional-debug-macro-off.rs b/src/test/run-pass/conditional-debug-macro-off.rs index 1d1475d60d964..192e647f5cb20 100644 --- a/src/test/run-pass/conditional-debug-macro-off.rs +++ b/src/test/run-pass/conditional-debug-macro-off.rs @@ -11,6 +11,8 @@ // compile-flags: -C debug-assertions=no // exec-env:RUST_LOG=conditional-debug-macro-off=4 +// pretty-expanded FIXME #23616 + #![feature(rustc_private)] #[macro_use] diff --git a/src/test/run-pass/const-autoderef.rs b/src/test/run-pass/const-autoderef.rs index 71312fb387845..1349b7f814bb0 100644 --- a/src/test/run-pass/const-autoderef.rs +++ b/src/test/run-pass/const-autoderef.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static A: [u8; 1] = ['h' as u8]; static B: u8 = (&A)[0]; static C: &'static &'static &'static &'static [u8; 1] = & & & &A; diff --git a/src/test/run-pass/const-big-enum.rs b/src/test/run-pass/const-big-enum.rs index ca1d79e83e92c..158c695c548d2 100644 --- a/src/test/run-pass/const-big-enum.rs +++ b/src/test/run-pass/const-big-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { Bar(u32), Baz, diff --git a/src/test/run-pass/const-binops.rs b/src/test/run-pass/const-binops.rs index 1268fc4e4350c..8b8fcfccc1c4d 100644 --- a/src/test/run-pass/const-binops.rs +++ b/src/test/run-pass/const-binops.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! assert_approx_eq { ($a:expr, $b:expr) => ({ use std::num::Float; diff --git a/src/test/run-pass/const-block-cross-crate-fn.rs b/src/test/run-pass/const-block-cross-crate-fn.rs index 16360ff08d059..853e8dc62bb70 100644 --- a/src/test/run-pass/const-block-cross-crate-fn.rs +++ b/src/test/run-pass/const-block-cross-crate-fn.rs @@ -10,6 +10,8 @@ // aux-build:cci_const_block.rs +// pretty-expanded FIXME #23616 + extern crate cci_const_block; pub fn main() { diff --git a/src/test/run-pass/const-block-item-macro-codegen.rs b/src/test/run-pass/const-block-item-macro-codegen.rs index 03afe798954d5..06fbccdec06f3 100644 --- a/src/test/run-pass/const-block-item-macro-codegen.rs +++ b/src/test/run-pass/const-block-item-macro-codegen.rs @@ -11,6 +11,8 @@ // General test that function items in static blocks // can be generated with a macro. +// pretty-expanded FIXME #23616 + struct MyType { desc: &'static str, data: uint, diff --git a/src/test/run-pass/const-block-item.rs b/src/test/run-pass/const-block-item.rs index d55b420db083e..1f7e942ea5a35 100644 --- a/src/test/run-pass/const-block-item.rs +++ b/src/test/run-pass/const-block-item.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod foo { pub trait Value { fn value(&self) -> uint; diff --git a/src/test/run-pass/const-block.rs b/src/test/run-pass/const-block.rs index bdde0cf02c958..1337a91fe05d6 100644 --- a/src/test/run-pass/const-block.rs +++ b/src/test/run-pass/const-block.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] #![allow(unused_unsafe)] diff --git a/src/test/run-pass/const-bound.rs b/src/test/run-pass/const-bound.rs index 9b0e7e4e75ebf..37101303ed916 100644 --- a/src/test/run-pass/const-bound.rs +++ b/src/test/run-pass/const-bound.rs @@ -11,6 +11,8 @@ // Make sure const bounds work on things, and test that a few types // are const. +// pretty-expanded FIXME #23616 + fn foo(x: T) -> T { x } struct F { field: int } diff --git a/src/test/run-pass/const-cast-ptr-int.rs b/src/test/run-pass/const-cast-ptr-int.rs index 50e460bd1798a..bbe3020ea1c65 100644 --- a/src/test/run-pass/const-cast-ptr-int.rs +++ b/src/test/run-pass/const-cast-ptr-int.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ptr; struct TestStruct { diff --git a/src/test/run-pass/const-cast.rs b/src/test/run-pass/const-cast.rs index 1da88a6b2c460..f660dc5fa450e 100644 --- a/src/test/run-pass/const-cast.rs +++ b/src/test/run-pass/const-cast.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/const-const.rs b/src/test/run-pass/const-const.rs index ba2947f736790..16d71f52d9871 100644 --- a/src/test/run-pass/const-const.rs +++ b/src/test/run-pass/const-const.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const a: int = 1; const b: int = a + 2; diff --git a/src/test/run-pass/const-contents.rs b/src/test/run-pass/const-contents.rs index 616826f9f9502..af6af776c3d80 100644 --- a/src/test/run-pass/const-contents.rs +++ b/src/test/run-pass/const-contents.rs @@ -10,6 +10,8 @@ // Issue #570 +// pretty-expanded FIXME #23616 + static lsl : int = 1 << 2; static add : int = 1 + 2; static addf : f64 = 1.0 + 2.0; diff --git a/src/test/run-pass/const-cross-crate-const.rs b/src/test/run-pass/const-cross-crate-const.rs index bcf58431d0dcd..a92c2aab31241 100644 --- a/src/test/run-pass/const-cross-crate-const.rs +++ b/src/test/run-pass/const-cross-crate-const.rs @@ -10,6 +10,8 @@ // aux-build:cci_const.rs +// pretty-expanded FIXME #23616 + extern crate cci_const; static foo: &'static str = cci_const::foopy; static a: uint = cci_const::uint_val; diff --git a/src/test/run-pass/const-cross-crate-extern.rs b/src/test/run-pass/const-cross-crate-extern.rs index a299c74aa5b06..98f42f91245cd 100644 --- a/src/test/run-pass/const-cross-crate-extern.rs +++ b/src/test/run-pass/const-cross-crate-extern.rs @@ -10,6 +10,8 @@ // aux-build:cci_const.rs +// pretty-expanded FIXME #23616 + extern crate cci_const; use cci_const::bar; static foo: extern "C" fn() = bar; diff --git a/src/test/run-pass/const-deref.rs b/src/test/run-pass/const-deref.rs index 480fb50a1ffe5..7b2bb0d31f9af 100644 --- a/src/test/run-pass/const-deref.rs +++ b/src/test/run-pass/const-deref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const C: &'static int = &1000; static D: int = *C; diff --git a/src/test/run-pass/const-enum-byref-self.rs b/src/test/run-pass/const-enum-byref-self.rs index 25145bf363840..8dcd67c05782c 100644 --- a/src/test/run-pass/const-enum-byref-self.rs +++ b/src/test/run-pass/const-enum-byref-self.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V, VV(int) } static C: E = E::V; diff --git a/src/test/run-pass/const-enum-byref.rs b/src/test/run-pass/const-enum-byref.rs index bc5daf41646b8..7cf2dcfa8900b 100644 --- a/src/test/run-pass/const-enum-byref.rs +++ b/src/test/run-pass/const-enum-byref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V, VV(int) } static C: E = E::V; diff --git a/src/test/run-pass/const-enum-cast.rs b/src/test/run-pass/const-enum-cast.rs index 966effab33e68..11e02338f41af 100644 --- a/src/test/run-pass/const-enum-cast.rs +++ b/src/test/run-pass/const-enum-cast.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum A { A1, A2 } enum B { B1=0, B2=2 } diff --git a/src/test/run-pass/const-enum-ptr.rs b/src/test/run-pass/const-enum-ptr.rs index 0953f35e4483e..d7503ff8d7d31 100644 --- a/src/test/run-pass/const-enum-ptr.rs +++ b/src/test/run-pass/const-enum-ptr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V0, V1(int) } static C: &'static E = &E::V0; diff --git a/src/test/run-pass/const-enum-struct.rs b/src/test/run-pass/const-enum-struct.rs index 0c3656e193cb7..71a9703ec311a 100644 --- a/src/test/run-pass/const-enum-struct.rs +++ b/src/test/run-pass/const-enum-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V16(u16), V32(u32) } struct S { a: E, b: u16, c: u16 } static C: S = S { a: E::V16(0xDEAD), b: 0x600D, c: 0xBAD }; diff --git a/src/test/run-pass/const-enum-struct2.rs b/src/test/run-pass/const-enum-struct2.rs index 6996da8bc37e2..ca56cb5b01a99 100644 --- a/src/test/run-pass/const-enum-struct2.rs +++ b/src/test/run-pass/const-enum-struct2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V0, V16(u16) } struct S { a: E, b: u16, c: u16 } static C: S = S { a: E::V0, b: 0x600D, c: 0xBAD }; diff --git a/src/test/run-pass/const-enum-structlike.rs b/src/test/run-pass/const-enum-structlike.rs index ac48752b0a944..57cf2b619257b 100644 --- a/src/test/run-pass/const-enum-structlike.rs +++ b/src/test/run-pass/const-enum-structlike.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { S0 { s: String }, S1 { u: uint } diff --git a/src/test/run-pass/const-enum-tuple.rs b/src/test/run-pass/const-enum-tuple.rs index 7ea5a3fed7655..2ab28f5fb2377 100644 --- a/src/test/run-pass/const-enum-tuple.rs +++ b/src/test/run-pass/const-enum-tuple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V16(u16), V32(u32) } static C: (E, u16, u16) = (E::V16(0xDEAD), 0x600D, 0xBAD); diff --git a/src/test/run-pass/const-enum-tuple2.rs b/src/test/run-pass/const-enum-tuple2.rs index 968c45a3298db..fe1b2e051c479 100644 --- a/src/test/run-pass/const-enum-tuple2.rs +++ b/src/test/run-pass/const-enum-tuple2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V0, V16(u16) } static C: (E, u16, u16) = (E::V0, 0x600D, 0xBAD); diff --git a/src/test/run-pass/const-enum-tuplestruct.rs b/src/test/run-pass/const-enum-tuplestruct.rs index 697321e0c77e4..7f9de49404d3a 100644 --- a/src/test/run-pass/const-enum-tuplestruct.rs +++ b/src/test/run-pass/const-enum-tuplestruct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V16(u16), V32(u32) } struct S(E, u16, u16); static C: S = S(E::V16(0xDEAD), 0x600D, 0xBAD); diff --git a/src/test/run-pass/const-enum-tuplestruct2.rs b/src/test/run-pass/const-enum-tuplestruct2.rs index 254580c4e69d1..3d7b6c9f49f78 100644 --- a/src/test/run-pass/const-enum-tuplestruct2.rs +++ b/src/test/run-pass/const-enum-tuplestruct2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V0, V16(u16) } struct S(E, u16, u16); static C: S = S(E::V0, 0x600D, 0xBAD); diff --git a/src/test/run-pass/const-enum-vec-index.rs b/src/test/run-pass/const-enum-vec-index.rs index 4c8124d28a241..98e236bfccb43 100644 --- a/src/test/run-pass/const-enum-vec-index.rs +++ b/src/test/run-pass/const-enum-vec-index.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V1(int), V0 } const C: &'static [E] = &[E::V0, E::V1(0xDEADBEE)]; static C0: E = C[0]; diff --git a/src/test/run-pass/const-enum-vec-ptr.rs b/src/test/run-pass/const-enum-vec-ptr.rs index d5c299fd86eec..8eb9a425b86be 100644 --- a/src/test/run-pass/const-enum-vec-ptr.rs +++ b/src/test/run-pass/const-enum-vec-ptr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V1(int), V0 } static C: &'static [E] = &[E::V0, E::V1(0xDEADBEE), E::V0]; diff --git a/src/test/run-pass/const-enum-vector.rs b/src/test/run-pass/const-enum-vector.rs index 6eb5c2dab38ba..6494001580278 100644 --- a/src/test/run-pass/const-enum-vector.rs +++ b/src/test/run-pass/const-enum-vector.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { V1(int), V0 } static C: [E; 3] = [E::V0, E::V1(0xDEADBEE), E::V0]; diff --git a/src/test/run-pass/const-expr-in-fixed-length-vec.rs b/src/test/run-pass/const-expr-in-fixed-length-vec.rs index 6317c2eec1801..82d9bb2b1e114 100644 --- a/src/test/run-pass/const-expr-in-fixed-length-vec.rs +++ b/src/test/run-pass/const-expr-in-fixed-length-vec.rs @@ -11,6 +11,8 @@ // Check that constant expressions can be used for declaring the // type of a fixed length vector. +// pretty-expanded FIXME #23616 + pub fn main() { const FOO: uint = 2; diff --git a/src/test/run-pass/const-expr-in-vec-repeat.rs b/src/test/run-pass/const-expr-in-vec-repeat.rs index 0b097c0b060ce..29eefd2050267 100644 --- a/src/test/run-pass/const-expr-in-vec-repeat.rs +++ b/src/test/run-pass/const-expr-in-vec-repeat.rs @@ -10,6 +10,8 @@ // Check that constant expressions can be used in vec repeat syntax. +// pretty-expanded FIXME #23616 + pub fn main() { const FOO: uint = 2; diff --git a/src/test/run-pass/const-extern-function.rs b/src/test/run-pass/const-extern-function.rs index 069ca6ecf49dd..ff829711a4c6c 100644 --- a/src/test/run-pass/const-extern-function.rs +++ b/src/test/run-pass/const-extern-function.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern fn foopy() {} static f: extern "C" fn() = foopy; diff --git a/src/test/run-pass/const-fn-val.rs b/src/test/run-pass/const-fn-val.rs index 8394c53cba5cb..972d4ca607b38 100644 --- a/src/test/run-pass/const-fn-val.rs +++ b/src/test/run-pass/const-fn-val.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo() -> int { return 0xca7f000d; } diff --git a/src/test/run-pass/const-negative.rs b/src/test/run-pass/const-negative.rs index 4e2be013c11e4..44222609e13fc 100644 --- a/src/test/run-pass/const-negative.rs +++ b/src/test/run-pass/const-negative.rs @@ -10,6 +10,8 @@ // Issue #358 +// pretty-expanded FIXME #23616 + static toplevel_mod: int = -1; pub fn main() { diff --git a/src/test/run-pass/const-nullary-enum.rs b/src/test/run-pass/const-nullary-enum.rs index 5397a29311a01..fcad89470d7c5 100644 --- a/src/test/run-pass/const-nullary-enum.rs +++ b/src/test/run-pass/const-nullary-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { Bar, Baz, diff --git a/src/test/run-pass/const-nullary-univariant-enum.rs b/src/test/run-pass/const-nullary-univariant-enum.rs index 86b194f2eb341..88be3c235881b 100644 --- a/src/test/run-pass/const-nullary-univariant-enum.rs +++ b/src/test/run-pass/const-nullary-univariant-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] enum Foo { Bar = 0xDEADBEE diff --git a/src/test/run-pass/const-region-ptrs-noncopy.rs b/src/test/run-pass/const-region-ptrs-noncopy.rs index e8081005d4a8f..8af169dfce989 100644 --- a/src/test/run-pass/const-region-ptrs-noncopy.rs +++ b/src/test/run-pass/const-region-ptrs-noncopy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + type Big = [u64; 8]; struct Pair<'a> { a: int, b: &'a Big } const x: &'static Big = &([13, 14, 10, 13, 11, 14, 14, 15]); diff --git a/src/test/run-pass/const-str-ptr.rs b/src/test/run-pass/const-str-ptr.rs index e846501be6ee5..c5ff134ff0e9b 100644 --- a/src/test/run-pass/const-str-ptr.rs +++ b/src/test/run-pass/const-str-ptr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::{str, string}; const A: [u8; 2] = ['h' as u8, 'i' as u8]; diff --git a/src/test/run-pass/const-struct-offsets.rs b/src/test/run-pass/const-struct-offsets.rs index 98dbf1eaa69a4..4f38a6431b8ea 100644 --- a/src/test/run-pass/const-struct-offsets.rs +++ b/src/test/run-pass/const-struct-offsets.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { IntVal(i32), Int64Val(i64) diff --git a/src/test/run-pass/const-tuple-struct.rs b/src/test/run-pass/const-tuple-struct.rs index 54116dd4082ed..55cbae6b1d2c2 100644 --- a/src/test/run-pass/const-tuple-struct.rs +++ b/src/test/run-pass/const-tuple-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Bar(int, int); static X: Bar = Bar(1, 2); diff --git a/src/test/run-pass/const-unit-struct.rs b/src/test/run-pass/const-unit-struct.rs index 7e6d9f0bee9b9..320f41006e569 100644 --- a/src/test/run-pass/const-unit-struct.rs +++ b/src/test/run-pass/const-unit-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo; static X: Foo = Foo; diff --git a/src/test/run-pass/const-vec-of-fns.rs b/src/test/run-pass/const-vec-of-fns.rs index 4b07b1d3b076e..f16fbac00797a 100644 --- a/src/test/run-pass/const-vec-of-fns.rs +++ b/src/test/run-pass/const-vec-of-fns.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /*! * Try to double-check that static fns have the right size (with or * without dummy env ptr, as appropriate) by iterating a size-2 array. diff --git a/src/test/run-pass/const-vec-syntax.rs b/src/test/run-pass/const-vec-syntax.rs index c0566277e4eb1..3485e23dd0dd5 100644 --- a/src/test/run-pass/const-vec-syntax.rs +++ b/src/test/run-pass/const-vec-syntax.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(_: &[int]) {} pub fn main() { diff --git a/src/test/run-pass/consts-in-patterns.rs b/src/test/run-pass/consts-in-patterns.rs index e8f4948a16533..c66030c6045f4 100644 --- a/src/test/run-pass/consts-in-patterns.rs +++ b/src/test/run-pass/consts-in-patterns.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const FOO: int = 10; const BAR: int = 3; diff --git a/src/test/run-pass/copy-out-of-array-1.rs b/src/test/run-pass/copy-out-of-array-1.rs index 2b57c1ea0da69..6dfcc3b2a165a 100644 --- a/src/test/run-pass/copy-out-of-array-1.rs +++ b/src/test/run-pass/copy-out-of-array-1.rs @@ -12,6 +12,8 @@ // // (Compare with compile-fail/move-out-of-array-1.rs) +// pretty-expanded FIXME #23616 + struct C { _x: u8 } impl Copy for C { } diff --git a/src/test/run-pass/crate-leading-sep.rs b/src/test/run-pass/crate-leading-sep.rs index d8b3371325b2f..ede78ff803d00 100644 --- a/src/test/run-pass/crate-leading-sep.rs +++ b/src/test/run-pass/crate-leading-sep.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { use ::std::mem; mem::drop(2_usize); diff --git a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs index 043bfe429add3..43507f0cb00bd 100644 --- a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs +++ b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/crate-name-attr-used.rs b/src/test/run-pass/crate-name-attr-used.rs index f04a760e5f651..c794e45c84522 100644 --- a/src/test/run-pass/crate-name-attr-used.rs +++ b/src/test/run-pass/crate-name-attr-used.rs @@ -10,6 +10,8 @@ // compile-flags:--crate-name crate-name-attr-used -F unused-attributes +// pretty-expanded FIXME #23616 + #![crate_name = "crate-name-attr-used"] fn main() {} diff --git a/src/test/run-pass/cross-crate-const-pat.rs b/src/test/run-pass/cross-crate-const-pat.rs index 14be5773e84db..a85541bb8ba5f 100644 --- a/src/test/run-pass/cross-crate-const-pat.rs +++ b/src/test/run-pass/cross-crate-const-pat.rs @@ -10,6 +10,8 @@ // aux-build:cci_const.rs +// pretty-expanded FIXME #23616 + extern crate cci_const; pub fn main() { diff --git a/src/test/run-pass/cross-crate-newtype-struct-pat.rs b/src/test/run-pass/cross-crate-newtype-struct-pat.rs index c2083c8e705ee..986108c5d8fa6 100644 --- a/src/test/run-pass/cross-crate-newtype-struct-pat.rs +++ b/src/test/run-pass/cross-crate-newtype-struct-pat.rs @@ -10,6 +10,8 @@ // aux-build:newtype_struct_xc.rs +// pretty-expanded FIXME #23616 + extern crate newtype_struct_xc; pub fn main() { diff --git a/src/test/run-pass/cycle-generic-bound.rs b/src/test/run-pass/cycle-generic-bound.rs index 2388a567f3043..94e4665bb86ab 100644 --- a/src/test/run-pass/cycle-generic-bound.rs +++ b/src/test/run-pass/cycle-generic-bound.rs @@ -10,6 +10,8 @@ // Regression test for #15477. This test just needs to compile. +// pretty-expanded FIXME #23616 + use std::marker::PhantomFn; trait Chromosome> : PhantomFn<(Self,X)> { diff --git a/src/test/run-pass/cycle-trait-type-trait.rs b/src/test/run-pass/cycle-trait-type-trait.rs index 6e16e68610603..50bc9e971fbe5 100644 --- a/src/test/run-pass/cycle-trait-type-trait.rs +++ b/src/test/run-pass/cycle-trait-type-trait.rs @@ -11,6 +11,8 @@ // Test a case where a supertrait references a type that references // the original trait. This poses no problem at the moment. +// pretty-expanded FIXME #23616 + trait Chromosome: Get> { } diff --git a/src/test/run-pass/dead-code-leading-underscore.rs b/src/test/run-pass/dead-code-leading-underscore.rs index b588ea9cfd025..801ca0e64f013 100644 --- a/src/test/run-pass/dead-code-leading-underscore.rs +++ b/src/test/run-pass/dead-code-leading-underscore.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![deny(dead_code)] static _X: uint = 0; diff --git a/src/test/run-pass/deep.rs b/src/test/run-pass/deep.rs index 2f82e729adf58..d691703f43793 100644 --- a/src/test/run-pass/deep.rs +++ b/src/test/run-pass/deep.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + fn f(x: int) -> int { if x == 1 { return 1; } else { let y: int = 1 + f(x - 1); return y; } } diff --git a/src/test/run-pass/default-method-parsing.rs b/src/test/run-pass/default-method-parsing.rs index 639ea59585efa..d19debce00fe1 100644 --- a/src/test/run-pass/default-method-parsing.rs +++ b/src/test/run-pass/default-method-parsing.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn m(&self, _:int) { } } diff --git a/src/test/run-pass/deprecated-no-split-stack.rs b/src/test/run-pass/deprecated-no-split-stack.rs index 31ba5dde8155d..ecbfcff812fc1 100644 --- a/src/test/run-pass/deprecated-no-split-stack.rs +++ b/src/test/run-pass/deprecated-no-split-stack.rs @@ -9,6 +9,8 @@ // except according to those terms. //~ WARNING no_split_stack is a deprecated synonym for no_stack_check +// pretty-expanded FIXME #23616 + #[no_split_stack] fn main() { } diff --git a/src/test/run-pass/deref-mut-on-ref.rs b/src/test/run-pass/deref-mut-on-ref.rs index f43be17786299..b3c13e165dbf2 100644 --- a/src/test/run-pass/deref-mut-on-ref.rs +++ b/src/test/run-pass/deref-mut-on-ref.rs @@ -10,6 +10,8 @@ // Test that `&mut T` implements `DerefMut` +// pretty-expanded FIXME #23616 + use std::ops::{Deref, DerefMut}; fn inc + DerefMut>(mut t: T) { diff --git a/src/test/run-pass/deref-on-ref.rs b/src/test/run-pass/deref-on-ref.rs index e95d942c8cf73..4519a8311b009 100644 --- a/src/test/run-pass/deref-on-ref.rs +++ b/src/test/run-pass/deref-on-ref.rs @@ -10,6 +10,8 @@ // Test that `&T` and `&mut T` implement `Deref` +// pretty-expanded FIXME #23616 + use std::ops::Deref; fn deref>(t: T) -> U { diff --git a/src/test/run-pass/deref-rc.rs b/src/test/run-pass/deref-rc.rs index fbb8a3a1720f9..761b29258f2af 100644 --- a/src/test/run-pass/deref-rc.rs +++ b/src/test/run-pass/deref-rc.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::rc::Rc; fn main() { diff --git a/src/test/run-pass/deref.rs b/src/test/run-pass/deref.rs index b4ee0246d8780..4249801b0bc6a 100644 --- a/src/test/run-pass/deref.rs +++ b/src/test/run-pass/deref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/deriving-bounds.rs b/src/test/run-pass/deriving-bounds.rs index 6869a60838c09..e0bbd0b2b041e 100644 --- a/src/test/run-pass/deriving-bounds.rs +++ b/src/test/run-pass/deriving-bounds.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] struct Test; diff --git a/src/test/run-pass/deriving-clone-enum.rs b/src/test/run-pass/deriving-clone-enum.rs index ce34852a917a6..22daffc48699a 100644 --- a/src/test/run-pass/deriving-clone-enum.rs +++ b/src/test/run-pass/deriving-clone-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] enum E { A, diff --git a/src/test/run-pass/deriving-clone-generic-enum.rs b/src/test/run-pass/deriving-clone-generic-enum.rs index e174ffae75de2..a4fd77f8993bb 100644 --- a/src/test/run-pass/deriving-clone-generic-enum.rs +++ b/src/test/run-pass/deriving-clone-generic-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] enum E { A(T), diff --git a/src/test/run-pass/deriving-clone-generic-struct.rs b/src/test/run-pass/deriving-clone-generic-struct.rs index 329c7dab3eb3a..d80f14c36945b 100644 --- a/src/test/run-pass/deriving-clone-generic-struct.rs +++ b/src/test/run-pass/deriving-clone-generic-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] struct S { foo: (), diff --git a/src/test/run-pass/deriving-clone-generic-tuple-struct.rs b/src/test/run-pass/deriving-clone-generic-tuple-struct.rs index bb07b08859fdb..f2f2ec3de7600 100644 --- a/src/test/run-pass/deriving-clone-generic-tuple-struct.rs +++ b/src/test/run-pass/deriving-clone-generic-tuple-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] struct S(T, ()); diff --git a/src/test/run-pass/deriving-clone-struct.rs b/src/test/run-pass/deriving-clone-struct.rs index 51e615b37021a..4e0eb37abc518 100644 --- a/src/test/run-pass/deriving-clone-struct.rs +++ b/src/test/run-pass/deriving-clone-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] struct S { _int: int, diff --git a/src/test/run-pass/deriving-clone-tuple-struct.rs b/src/test/run-pass/deriving-clone-tuple-struct.rs index e2784c26dbbae..8be029ba2accc 100644 --- a/src/test/run-pass/deriving-clone-tuple-struct.rs +++ b/src/test/run-pass/deriving-clone-tuple-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] struct S((), ()); diff --git a/src/test/run-pass/deriving-cmp-generic-enum.rs b/src/test/run-pass/deriving-cmp-generic-enum.rs index b3194d5820a4e..07ad8f706eb5c 100644 --- a/src/test/run-pass/deriving-cmp-generic-enum.rs +++ b/src/test/run-pass/deriving-cmp-generic-enum.rs @@ -10,6 +10,8 @@ // no-pretty-expanded FIXME #15189 +// pretty-expanded FIXME #23616 + #[derive(PartialEq, Eq, PartialOrd, Ord)] enum E { E0, diff --git a/src/test/run-pass/deriving-cmp-generic-struct-enum.rs b/src/test/run-pass/deriving-cmp-generic-struct-enum.rs index 8b54536f3abac..5f7d184f1949d 100644 --- a/src/test/run-pass/deriving-cmp-generic-struct-enum.rs +++ b/src/test/run-pass/deriving-cmp-generic-struct-enum.rs @@ -10,6 +10,8 @@ // no-pretty-expanded FIXME #15189 +// pretty-expanded FIXME #23616 + #[derive(PartialEq, Eq, PartialOrd, Ord)] enum ES { ES1 { x: T }, diff --git a/src/test/run-pass/deriving-cmp-generic-struct.rs b/src/test/run-pass/deriving-cmp-generic-struct.rs index 86887c3411f8f..ea0017380b275 100644 --- a/src/test/run-pass/deriving-cmp-generic-struct.rs +++ b/src/test/run-pass/deriving-cmp-generic-struct.rs @@ -10,6 +10,8 @@ // no-pretty-expanded FIXME #15189 +// pretty-expanded FIXME #23616 + #[derive(PartialEq, Eq, PartialOrd, Ord)] struct S { x: T, diff --git a/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs b/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs index c7d7f8ded83f4..702071676b90e 100644 --- a/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs +++ b/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs @@ -10,6 +10,8 @@ // no-pretty-expanded FIXME #15189 +// pretty-expanded FIXME #23616 + #[derive(PartialEq, Eq, PartialOrd, Ord)] struct TS(T,T); diff --git a/src/test/run-pass/deriving-cmp-shortcircuit.rs b/src/test/run-pass/deriving-cmp-shortcircuit.rs index bc55b9132c836..65bf040b387e6 100644 --- a/src/test/run-pass/deriving-cmp-shortcircuit.rs +++ b/src/test/run-pass/deriving-cmp-shortcircuit.rs @@ -12,6 +12,8 @@ // where possible, by having a type that panics when compared as the // second element, so this passes iff the instances shortcircuit. +// pretty-expanded FIXME #23616 + use std::cmp::Ordering; pub struct FailCmp; diff --git a/src/test/run-pass/deriving-default-box.rs b/src/test/run-pass/deriving-default-box.rs index 4d157f64fb9ed..574a620ef0290 100644 --- a/src/test/run-pass/deriving-default-box.rs +++ b/src/test/run-pass/deriving-default-box.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/deriving-encodable-decodable-box.rs b/src/test/run-pass/deriving-encodable-decodable-box.rs index aa03e23b95ff8..17f4d93e24c17 100644 --- a/src/test/run-pass/deriving-encodable-decodable-box.rs +++ b/src/test/run-pass/deriving-encodable-decodable-box.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(old_orphan_check, rustc_private)] diff --git a/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs b/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs index d4463207aa26a..2c8efc2577450 100644 --- a/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs +++ b/src/test/run-pass/deriving-encodable-decodable-cell-refcell.rs @@ -11,6 +11,8 @@ // This briefly tests the capability of `Cell` and `RefCell` to implement the // `Encodable` and `Decodable` traits via `#[derive(Encodable, Decodable)]` +// pretty-expanded FIXME #23616 + #![feature(old_orphan_check, rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/deriving-enum-single-variant.rs b/src/test/run-pass/deriving-enum-single-variant.rs index 7ce7c5fd41105..925a5875171ce 100644 --- a/src/test/run-pass/deriving-enum-single-variant.rs +++ b/src/test/run-pass/deriving-enum-single-variant.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub type task_id = int; #[derive(PartialEq)] diff --git a/src/test/run-pass/deriving-hash.rs b/src/test/run-pass/deriving-hash.rs index 03361fbfd9553..216a4c9cf0033 100644 --- a/src/test/run-pass/deriving-hash.rs +++ b/src/test/run-pass/deriving-hash.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(hash)] use std::hash::{Hash, SipHasher}; diff --git a/src/test/run-pass/deriving-in-macro.rs b/src/test/run-pass/deriving-in-macro.rs index c9b60d22ecb7b..b23075e6d0af4 100644 --- a/src/test/run-pass/deriving-in-macro.rs +++ b/src/test/run-pass/deriving-in-macro.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! define_vec { () => ( mod foo { diff --git a/src/test/run-pass/deriving-meta-multiple.rs b/src/test/run-pass/deriving-meta-multiple.rs index 3164021a72e64..87df9a12505da 100644 --- a/src/test/run-pass/deriving-meta-multiple.rs +++ b/src/test/run-pass/deriving-meta-multiple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::hash::{Hash, SipHasher}; // testing multiple separate deriving attributes diff --git a/src/test/run-pass/deriving-meta.rs b/src/test/run-pass/deriving-meta.rs index 16df6e7004fe4..2d25cdf71b0c1 100644 --- a/src/test/run-pass/deriving-meta.rs +++ b/src/test/run-pass/deriving-meta.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::hash::{Hash, SipHasher}; #[derive(PartialEq, Clone, Hash)] diff --git a/src/test/run-pass/deriving-rand.rs b/src/test/run-pass/deriving-rand.rs index 71cae400602d2..61f266f6d81ad 100644 --- a/src/test/run-pass/deriving-rand.rs +++ b/src/test/run-pass/deriving-rand.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(rand)] use std::rand; diff --git a/src/test/run-pass/deriving-via-extension-hash-enum.rs b/src/test/run-pass/deriving-via-extension-hash-enum.rs index 2d6997341fb5d..c0921070bc2ba 100644 --- a/src/test/run-pass/deriving-via-extension-hash-enum.rs +++ b/src/test/run-pass/deriving-via-extension-hash-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Hash)] enum Foo { Bar(int, char), diff --git a/src/test/run-pass/deriving-via-extension-hash-struct.rs b/src/test/run-pass/deriving-via-extension-hash-struct.rs index 448d5bfd4cb74..791d3dd954957 100644 --- a/src/test/run-pass/deriving-via-extension-hash-struct.rs +++ b/src/test/run-pass/deriving-via-extension-hash-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Hash)] struct Foo { x: int, diff --git a/src/test/run-pass/destructure-array-1.rs b/src/test/run-pass/destructure-array-1.rs index 43271162c1812..22853c5ad806e 100644 --- a/src/test/run-pass/destructure-array-1.rs +++ b/src/test/run-pass/destructure-array-1.rs @@ -11,6 +11,8 @@ // Ensure that we can do a destructuring bind of a fixed-size array, // even when the element type has a destructor. +// pretty-expanded FIXME #23616 + struct D { x: u8 } impl Drop for D { fn drop(&mut self) { } } diff --git a/src/test/run-pass/die-macro.rs b/src/test/run-pass/die-macro.rs index 565e33ce01e17..45b743383b110 100644 --- a/src/test/run-pass/die-macro.rs +++ b/src/test/run-pass/die-macro.rs @@ -10,6 +10,8 @@ // Just testing that panic!() type checks in statement or expr +// pretty-expanded FIXME #23616 + #![allow(unreachable_code)] fn f() { diff --git a/src/test/run-pass/div-mod.rs b/src/test/run-pass/div-mod.rs index 331cd36a69402..f838f3554d5a7 100644 --- a/src/test/run-pass/div-mod.rs +++ b/src/test/run-pass/div-mod.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let x: int = 15; let y: int = 5; diff --git a/src/test/run-pass/double-ref.rs b/src/test/run-pass/double-ref.rs index 0cb48670f23da..4ee08edb52deb 100644 --- a/src/test/run-pass/double-ref.rs +++ b/src/test/run-pass/double-ref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn check_expr() { let _: & uint = &1; let _: & & uint = &&1; diff --git a/src/test/run-pass/drop-on-empty-block-exit.rs b/src/test/run-pass/drop-on-empty-block-exit.rs index f875d0644a07d..a52dd133e0750 100644 --- a/src/test/run-pass/drop-on-empty-block-exit.rs +++ b/src/test/run-pass/drop-on-empty-block-exit.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/drop-on-ret.rs b/src/test/run-pass/drop-on-ret.rs index 0786974e11207..f0b5d78707a83 100644 --- a/src/test/run-pass/drop-on-ret.rs +++ b/src/test/run-pass/drop-on-ret.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + fn f() -> int { if true { let _s: String = "should not leak".to_string(); diff --git a/src/test/run-pass/drop-struct-as-object.rs b/src/test/run-pass/drop-struct-as-object.rs index 7a3b6df539f14..bb8119d527457 100644 --- a/src/test/run-pass/drop-struct-as-object.rs +++ b/src/test/run-pass/drop-struct-as-object.rs @@ -11,6 +11,8 @@ // Test that destructor on a struct runs successfully after the struct // is boxed and converted to an object. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/drop-uninhabited-enum.rs b/src/test/run-pass/drop-uninhabited-enum.rs index f8c54fbab8a4e..9fa085b6701dd 100644 --- a/src/test/run-pass/drop-uninhabited-enum.rs +++ b/src/test/run-pass/drop-uninhabited-enum.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { } impl Drop for Foo { diff --git a/src/test/run-pass/drop-with-type-ascription-1.rs b/src/test/run-pass/drop-with-type-ascription-1.rs index 645548761e4a1..ea9edff4945fe 100644 --- a/src/test/run-pass/drop-with-type-ascription-1.rs +++ b/src/test/run-pass/drop-with-type-ascription-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(str_words)] fn main() { diff --git a/src/test/run-pass/drop-with-type-ascription-2.rs b/src/test/run-pass/drop-with-type-ascription-2.rs index c2edfc261050e..ddfaf54493fb4 100644 --- a/src/test/run-pass/drop-with-type-ascription-2.rs +++ b/src/test/run-pass/drop-with-type-ascription-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] fn main() { diff --git a/src/test/run-pass/dropck_tarena_sound_drop.rs b/src/test/run-pass/dropck_tarena_sound_drop.rs index 17aa1f04e5f49..df29b8e10c7aa 100644 --- a/src/test/run-pass/dropck_tarena_sound_drop.rs +++ b/src/test/run-pass/dropck_tarena_sound_drop.rs @@ -16,6 +16,8 @@ // shows a similar setup, but restricts `f` so that the struct `C<'a>` // is force-fed a lifetime equal to that of the borrowed arena. +// pretty-expanded FIXME #23616 + #![allow(unstable)] #![feature(unsafe_destructor, rustc_private)] diff --git a/src/test/run-pass/dst-coercions.rs b/src/test/run-pass/dst-coercions.rs index 30ed0b8e40245..6b5bd6ad35e75 100644 --- a/src/test/run-pass/dst-coercions.rs +++ b/src/test/run-pass/dst-coercions.rs @@ -10,6 +10,8 @@ // Test coercions involving DST and/or raw pointers +// pretty-expanded FIXME #23616 + struct S; trait T { fn dummy(&self) { } } impl T for S {} diff --git a/src/test/run-pass/dst-deref-mut.rs b/src/test/run-pass/dst-deref-mut.rs index 33548d5e298cd..b0bc61e3f8b1c 100644 --- a/src/test/run-pass/dst-deref-mut.rs +++ b/src/test/run-pass/dst-deref-mut.rs @@ -10,6 +10,8 @@ // Test that a custom deref with a fat pointer return type does not ICE +// pretty-expanded FIXME #23616 + use std::ops::{Deref, DerefMut}; pub struct Arr { diff --git a/src/test/run-pass/dst-deref.rs b/src/test/run-pass/dst-deref.rs index 147a27afa80ed..838352b3a149d 100644 --- a/src/test/run-pass/dst-deref.rs +++ b/src/test/run-pass/dst-deref.rs @@ -10,6 +10,8 @@ // Test that a custom deref with a fat pointer return type does not ICE +// pretty-expanded FIXME #23616 + use std::ops::Deref; pub struct Arr { diff --git a/src/test/run-pass/dst-index.rs b/src/test/run-pass/dst-index.rs index 64083a063b2a6..1f821d2baf3fe 100644 --- a/src/test/run-pass/dst-index.rs +++ b/src/test/run-pass/dst-index.rs @@ -11,6 +11,8 @@ // Test that overloaded index expressions with DST result types // work and don't ICE. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::ops::Index; diff --git a/src/test/run-pass/dst-raw.rs b/src/test/run-pass/dst-raw.rs index 226025cd80e8c..6e8288d36e8f6 100644 --- a/src/test/run-pass/dst-raw.rs +++ b/src/test/run-pass/dst-raw.rs @@ -10,6 +10,8 @@ // Test DST raw pointers +// pretty-expanded FIXME #23616 + trait Trait { fn foo(&self) -> int; } diff --git a/src/test/run-pass/dst-struct-sole.rs b/src/test/run-pass/dst-struct-sole.rs index 74f4b9e923301..e3b6061cbdc97 100644 --- a/src/test/run-pass/dst-struct-sole.rs +++ b/src/test/run-pass/dst-struct-sole.rs @@ -10,6 +10,8 @@ // As dst-struct.rs, but the unsized field is the only field in the struct. +// pretty-expanded FIXME #23616 + struct Fat { ptr: T } diff --git a/src/test/run-pass/dst-struct.rs b/src/test/run-pass/dst-struct.rs index 15558414bf58e..50ba85ad71897 100644 --- a/src/test/run-pass/dst-struct.rs +++ b/src/test/run-pass/dst-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/dst-trait.rs b/src/test/run-pass/dst-trait.rs index 6590a8e1847dc..3fcbe71df6778 100644 --- a/src/test/run-pass/dst-trait.rs +++ b/src/test/run-pass/dst-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/dupe-first-attr.rc b/src/test/run-pass/dupe-first-attr.rc index eb66423f1c7a7..d95f1506a9b9e 100644 --- a/src/test/run-pass/dupe-first-attr.rc +++ b/src/test/run-pass/dupe-first-attr.rc @@ -11,6 +11,8 @@ // Regression test for a problem with the first mod attribute // being applied to every mod +// pretty-expanded FIXME #23616 + #[cfg(target_os = "linux")] mod hello; diff --git a/src/test/run-pass/duplicated-external-mods.rs b/src/test/run-pass/duplicated-external-mods.rs index f7b1cef83ea53..91c9887300935 100644 --- a/src/test/run-pass/duplicated-external-mods.rs +++ b/src/test/run-pass/duplicated-external-mods.rs @@ -10,6 +10,8 @@ // aux-build:anon-extern-mod-cross-crate-1.rs // aux-build:anon-extern-mod-cross-crate-1.rs +// pretty-expanded FIXME #23616 + extern crate anonexternmod; pub fn main() { } diff --git a/src/test/run-pass/early-ret-binop-add.rs b/src/test/run-pass/early-ret-binop-add.rs index 97e873e9aff95..a8c20dfb8c116 100644 --- a/src/test/run-pass/early-ret-binop-add.rs +++ b/src/test/run-pass/early-ret-binop-add.rs @@ -8,5 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn wsucc(n: int) -> int { 0 + { return n + 1 } } pub fn main() { } diff --git a/src/test/run-pass/early-vtbl-resolution.rs b/src/test/run-pass/early-vtbl-resolution.rs index 89fee7358a111..efe96b96a34c8 100644 --- a/src/test/run-pass/early-vtbl-resolution.rs +++ b/src/test/run-pass/early-vtbl-resolution.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait thing { fn foo(&self) -> Option; } diff --git a/src/test/run-pass/else-if.rs b/src/test/run-pass/else-if.rs index 476d3f42d6ee3..79c2f45067884 100644 --- a/src/test/run-pass/else-if.rs +++ b/src/test/run-pass/else-if.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { if 1 == 2 { assert!((false)); diff --git a/src/test/run-pass/empty-allocation-non-null.rs b/src/test/run-pass/empty-allocation-non-null.rs index 0459206c5b910..cec528fa0401c 100644 --- a/src/test/run-pass/empty-allocation-non-null.rs +++ b/src/test/run-pass/empty-allocation-non-null.rs @@ -10,6 +10,8 @@ // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. +// pretty-expanded FIXME #23616 + pub fn main() { assert!(Some(Box::new(())).is_some()); diff --git a/src/test/run-pass/empty-allocation-rvalue-non-null.rs b/src/test/run-pass/empty-allocation-rvalue-non-null.rs index f56d8843acd3f..f52a21a997d78 100644 --- a/src/test/run-pass/empty-allocation-rvalue-non-null.rs +++ b/src/test/run-pass/empty-allocation-rvalue-non-null.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = *Box::new(()); } diff --git a/src/test/run-pass/empty-mutable-vec.rs b/src/test/run-pass/empty-mutable-vec.rs index 42a1e563285c5..881103210e46a 100644 --- a/src/test/run-pass/empty-mutable-vec.rs +++ b/src/test/run-pass/empty-mutable-vec.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_mut)] diff --git a/src/test/run-pass/enum-alignment.rs b/src/test/run-pass/enum-alignment.rs index 27560986e0253..ecab52326446e 100644 --- a/src/test/run-pass/enum-alignment.rs +++ b/src/test/run-pass/enum-alignment.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; fn addr_of(ptr: &T) -> uint { diff --git a/src/test/run-pass/enum-clike-ffi-as-int.rs b/src/test/run-pass/enum-clike-ffi-as-int.rs index 1cbcaac379f09..2920fd4f734ac 100644 --- a/src/test/run-pass/enum-clike-ffi-as-int.rs +++ b/src/test/run-pass/enum-clike-ffi-as-int.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /*! * C-like enums have to be represented as LLVM ints, not wrapped in a * struct, because it's important for the FFI that they interoperate diff --git a/src/test/run-pass/enum-discr.rs b/src/test/run-pass/enum-discr.rs index 97997bec2616a..a1224b93418b5 100644 --- a/src/test/run-pass/enum-discr.rs +++ b/src/test/run-pass/enum-discr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Animal { Cat = 0, Dog = 1, diff --git a/src/test/run-pass/enum-discrim-autosizing.rs b/src/test/run-pass/enum-discrim-autosizing.rs index ef34115739dd4..239f9821b925b 100644 --- a/src/test/run-pass/enum-discrim-autosizing.rs +++ b/src/test/run-pass/enum-discrim-autosizing.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::size_of; enum Ei8 { diff --git a/src/test/run-pass/enum-discrim-manual-sizing.rs b/src/test/run-pass/enum-discrim-manual-sizing.rs index 16eaac082abac..323b349643d0e 100644 --- a/src/test/run-pass/enum-discrim-manual-sizing.rs +++ b/src/test/run-pass/enum-discrim-manual-sizing.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::size_of; #[repr(i8)] diff --git a/src/test/run-pass/enum-discrim-range-overflow.rs b/src/test/run-pass/enum-discrim-range-overflow.rs index b45040f6a1c53..f1306b3f08cff 100644 --- a/src/test/run-pass/enum-discrim-range-overflow.rs +++ b/src/test/run-pass/enum-discrim-range-overflow.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub enum E64 { H64 = 0x7FFF_FFFF_FFFF_FFFF, L64 = 0x8000_0000_0000_0000 diff --git a/src/test/run-pass/enum-disr-val-pretty.rs b/src/test/run-pass/enum-disr-val-pretty.rs index a4bd361f1828e..533d328628a7a 100644 --- a/src/test/run-pass/enum-disr-val-pretty.rs +++ b/src/test/run-pass/enum-disr-val-pretty.rs @@ -10,6 +10,8 @@ // pp-exact +// pretty-expanded FIXME #23616 + enum color { red = 1, green, blue, imaginary = -1, } pub fn main() { diff --git a/src/test/run-pass/enum-export-inheritance.rs b/src/test/run-pass/enum-export-inheritance.rs index 6330d6196a361..4cf8fff237645 100644 --- a/src/test/run-pass/enum-export-inheritance.rs +++ b/src/test/run-pass/enum-export-inheritance.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod a { pub enum Foo { Bar, diff --git a/src/test/run-pass/enum-null-pointer-opt.rs b/src/test/run-pass/enum-null-pointer-opt.rs index 635c34ef85a92..b8819ab61e899 100644 --- a/src/test/run-pass/enum-null-pointer-opt.rs +++ b/src/test/run-pass/enum-null-pointer-opt.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] extern crate core; diff --git a/src/test/run-pass/enum-nullable-const-null-with-fields.rs b/src/test/run-pass/enum-nullable-const-null-with-fields.rs index 4b839d740fc7a..2284c1427c046 100644 --- a/src/test/run-pass/enum-nullable-const-null-with-fields.rs +++ b/src/test/run-pass/enum-nullable-const-null-with-fields.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::result::Result; use std::result::Result::Ok; diff --git a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs index 468e5f5f4b315..99554aafb0427 100644 --- a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs +++ b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/enum-variants.rs b/src/test/run-pass/enum-variants.rs index 4a3a1156698aa..77e6141d5592d 100644 --- a/src/test/run-pass/enum-variants.rs +++ b/src/test/run-pass/enum-variants.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unused_variable)] diff --git a/src/test/run-pass/enum-vec-initializer.rs b/src/test/run-pass/enum-vec-initializer.rs index 86a998100b0e4..5be8ca6c6cb48 100644 --- a/src/test/run-pass/enum-vec-initializer.rs +++ b/src/test/run-pass/enum-vec-initializer.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Flopsy { Bunny = 2 } diff --git a/src/test/run-pass/env-home-dir.rs b/src/test/run-pass/env-home-dir.rs index c41486f660cf6..424b2e5608ada 100644 --- a/src/test/run-pass/env-home-dir.rs +++ b/src/test/run-pass/env-home-dir.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(path)] use std::env::*; diff --git a/src/test/run-pass/env-vars.rs b/src/test/run-pass/env-vars.rs index 659e5b3a8c2f8..33bc6c596dbd0 100644 --- a/src/test/run-pass/env-vars.rs +++ b/src/test/run-pass/env-vars.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::env::*; fn main() { diff --git a/src/test/run-pass/eq-multidispatch.rs b/src/test/run-pass/eq-multidispatch.rs index 2dcf6bf6d0907..3ca254021e5b9 100644 --- a/src/test/run-pass/eq-multidispatch.rs +++ b/src/test/run-pass/eq-multidispatch.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(PartialEq)] struct Bar; struct Baz; diff --git a/src/test/run-pass/estr-uniq.rs b/src/test/run-pass/estr-uniq.rs index b562558822cd1..0b24658a8f331 100644 --- a/src/test/run-pass/estr-uniq.rs +++ b/src/test/run-pass/estr-uniq.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] pub fn main() { diff --git a/src/test/run-pass/exec-env.rs b/src/test/run-pass/exec-env.rs index a71016fd88baa..a24930732474f 100644 --- a/src/test/run-pass/exec-env.rs +++ b/src/test/run-pass/exec-env.rs @@ -10,6 +10,8 @@ // exec-env:TEST_EXEC_ENV=22 +// pretty-expanded FIXME #23616 + use std::env; pub fn main() { diff --git a/src/test/run-pass/explicit-i-suffix.rs b/src/test/run-pass/explicit-i-suffix.rs index 96c58b106f341..6029b488f0867 100644 --- a/src/test/run-pass/explicit-i-suffix.rs +++ b/src/test/run-pass/explicit-i-suffix.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x: int = 8; let y = 9; diff --git a/src/test/run-pass/explicit-self-closures.rs b/src/test/run-pass/explicit-self-closures.rs index ef9dc377bc7f7..4fcac31c533a5 100644 --- a/src/test/run-pass/explicit-self-closures.rs +++ b/src/test/run-pass/explicit-self-closures.rs @@ -10,6 +10,8 @@ // Test to make sure that explicit self params work inside closures +// pretty-expanded FIXME #23616 + struct Box { x: uint } diff --git a/src/test/run-pass/explicit-self-generic.rs b/src/test/run-pass/explicit-self-generic.rs index 865fccbc3fa3a..c4b8099e8501c 100644 --- a/src/test/run-pass/explicit-self-generic.rs +++ b/src/test/run-pass/explicit-self-generic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/explicit-self-objects-uniq.rs b/src/test/run-pass/explicit-self-objects-uniq.rs index 501ba01b4ce1c..ce0cdf0d2496b 100644 --- a/src/test/run-pass/explicit-self-objects-uniq.rs +++ b/src/test/run-pass/explicit-self-objects-uniq.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/explicit-self.rs b/src/test/run-pass/explicit-self.rs index 3d06a5562034c..1d013c3abc81b 100644 --- a/src/test/run-pass/explicit-self.rs +++ b/src/test/run-pass/explicit-self.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/explicit_self_xcrate_exe.rs b/src/test/run-pass/explicit_self_xcrate_exe.rs index ee74fc0b0a326..eaaf92fbea9ce 100644 --- a/src/test/run-pass/explicit_self_xcrate_exe.rs +++ b/src/test/run-pass/explicit_self_xcrate_exe.rs @@ -10,6 +10,8 @@ // aux-build:explicit_self_xcrate.rs +// pretty-expanded FIXME #23616 + extern crate explicit_self_xcrate; use explicit_self_xcrate::{Foo, Bar}; diff --git a/src/test/run-pass/exponential-notation.rs b/src/test/run-pass/exponential-notation.rs index 3f451ee8d5159..7e947c0be4584 100644 --- a/src/test/run-pass/exponential-notation.rs +++ b/src/test/run-pass/exponential-notation.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::num::strconv::ExponentFormat::{ExpBin, ExpDec}; diff --git a/src/test/run-pass/export-abstract-tag.rs b/src/test/run-pass/export-abstract-tag.rs index 983ebbee9872f..7333d739f4b68 100644 --- a/src/test/run-pass/export-abstract-tag.rs +++ b/src/test/run-pass/export-abstract-tag.rs @@ -11,6 +11,8 @@ // We can export tags without exporting the variants to create a simple // sort of ADT. +// pretty-expanded FIXME #23616 + mod foo { pub enum t { t1, } diff --git a/src/test/run-pass/export-glob-imports-target.rs b/src/test/run-pass/export-glob-imports-target.rs index da0a3e9e107e6..debe9b0ddf18a 100644 --- a/src/test/run-pass/export-glob-imports-target.rs +++ b/src/test/run-pass/export-glob-imports-target.rs @@ -13,6 +13,8 @@ // Modified to not use export since it's going away. --pcw +// pretty-expanded FIXME #23616 + mod foo { use foo::bar::*; pub mod bar { diff --git a/src/test/run-pass/export-multi.rs b/src/test/run-pass/export-multi.rs index 09e816cff0bb5..e7c35fcd7562c 100644 --- a/src/test/run-pass/export-multi.rs +++ b/src/test/run-pass/export-multi.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use m::f; use m::g; diff --git a/src/test/run-pass/export-tag-variant.rs b/src/test/run-pass/export-tag-variant.rs index 01fcf02ec12f6..6257332a66566 100644 --- a/src/test/run-pass/export-tag-variant.rs +++ b/src/test/run-pass/export-tag-variant.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod foo { pub enum t { t1, } } diff --git a/src/test/run-pass/expr-block-fn.rs b/src/test/run-pass/expr-block-fn.rs index ed246e2cb7d7b..821dfbec0be62 100644 --- a/src/test/run-pass/expr-block-fn.rs +++ b/src/test/run-pass/expr-block-fn.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + fn test_fn() { fn ten() -> int { return 10; } let rs = ten; diff --git a/src/test/run-pass/expr-block-generic-unique2.rs b/src/test/run-pass/expr-block-generic-unique2.rs index e41ce37cc3a1d..81d4078a3e957 100644 --- a/src/test/run-pass/expr-block-generic-unique2.rs +++ b/src/test/run-pass/expr-block-generic-unique2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/expr-block-generic.rs b/src/test/run-pass/expr-block-generic.rs index 91b847d47cbcc..e4040238cd53b 100644 --- a/src/test/run-pass/expr-block-generic.rs +++ b/src/test/run-pass/expr-block-generic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn test_generic(expected: T, eq: F) where F: FnOnce(T, T) -> bool { let actual: T = { expected.clone() }; assert!(eq(expected, actual)); diff --git a/src/test/run-pass/expr-block-slot.rs b/src/test/run-pass/expr-block-slot.rs index cfb764e85f8d3..5f4515924e711 100644 --- a/src/test/run-pass/expr-block-slot.rs +++ b/src/test/run-pass/expr-block-slot.rs @@ -10,6 +10,8 @@ // Regression test for issue #377 +// pretty-expanded FIXME #23616 + struct A { a: int } struct V { v: int } diff --git a/src/test/run-pass/expr-block-unique.rs b/src/test/run-pass/expr-block-unique.rs index d7d5a39f452f3..496a575c6c8b5 100644 --- a/src/test/run-pass/expr-block-unique.rs +++ b/src/test/run-pass/expr-block-unique.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/expr-block.rs b/src/test/run-pass/expr-block.rs index ee1d955b0d361..dd4c4d0cd73dc 100644 --- a/src/test/run-pass/expr-block.rs +++ b/src/test/run-pass/expr-block.rs @@ -13,6 +13,8 @@ // Tests for standalone blocks as expressions +// pretty-expanded FIXME #23616 + fn test_basic() { let rs: bool = { true }; assert!((rs)); } struct RS { v1: int, v2: int } diff --git a/src/test/run-pass/expr-copy.rs b/src/test/run-pass/expr-copy.rs index 6c6c5085749bb..f236f6999383a 100644 --- a/src/test/run-pass/expr-copy.rs +++ b/src/test/run-pass/expr-copy.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(arg: &mut A) { arg.a = 100; } diff --git a/src/test/run-pass/expr-empty-ret.rs b/src/test/run-pass/expr-empty-ret.rs index afc7dfaf9b441..02ac2a0b67b14 100644 --- a/src/test/run-pass/expr-empty-ret.rs +++ b/src/test/run-pass/expr-empty-ret.rs @@ -10,6 +10,8 @@ // Issue #521 +// pretty-expanded FIXME #23616 + fn f() { let _x = match true { true => { 10 } diff --git a/src/test/run-pass/expr-fn.rs b/src/test/run-pass/expr-fn.rs index 0ea1f3fcdaffc..51ef5f00ab70b 100644 --- a/src/test/run-pass/expr-fn.rs +++ b/src/test/run-pass/expr-fn.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn test_int() { fn f() -> int { 10 } assert_eq!(f(), 10); diff --git a/src/test/run-pass/expr-if-generic.rs b/src/test/run-pass/expr-if-generic.rs index fb2a120e6f4a1..3f1c059ffee92 100644 --- a/src/test/run-pass/expr-if-generic.rs +++ b/src/test/run-pass/expr-if-generic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn test_generic(expected: T, not_expected: T, eq: F) where T: Clone, F: FnOnce(T, T) -> bool, diff --git a/src/test/run-pass/expr-if-panic-all.rs b/src/test/run-pass/expr-if-panic-all.rs index 52ccee05817a0..1e631c204798a 100644 --- a/src/test/run-pass/expr-if-panic-all.rs +++ b/src/test/run-pass/expr-if-panic-all.rs @@ -10,6 +10,8 @@ // When all branches of an if expression result in panic, the entire if // expression results in panic. +// pretty-expanded FIXME #23616 + pub fn main() { let _x = if true { 10 diff --git a/src/test/run-pass/expr-if-panic.rs b/src/test/run-pass/expr-if-panic.rs index 87c7954fa49aa..e8594db80393b 100644 --- a/src/test/run-pass/expr-if-panic.rs +++ b/src/test/run-pass/expr-if-panic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn test_if_panic() { let x = if false { panic!() } else { 10 }; assert!((x == 10)); diff --git a/src/test/run-pass/expr-if-unique.rs b/src/test/run-pass/expr-if-unique.rs index a581612779898..99c5053588b1c 100644 --- a/src/test/run-pass/expr-if-unique.rs +++ b/src/test/run-pass/expr-if-unique.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/expr-if.rs b/src/test/run-pass/expr-if.rs index 23446b3f650c5..345f17707c408 100644 --- a/src/test/run-pass/expr-if.rs +++ b/src/test/run-pass/expr-if.rs @@ -13,6 +13,8 @@ // Tests for if as expressions +// pretty-expanded FIXME #23616 + fn test_if() { let rs: bool = if true { true } else { false }; assert!((rs)); } fn test_else() { diff --git a/src/test/run-pass/expr-match-generic-unique1.rs b/src/test/run-pass/expr-match-generic-unique1.rs index 9de1379f480f1..7cd0f6a758999 100644 --- a/src/test/run-pass/expr-match-generic-unique1.rs +++ b/src/test/run-pass/expr-match-generic-unique1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/expr-match-generic-unique2.rs b/src/test/run-pass/expr-match-generic-unique2.rs index 489cd8437d21f..d8e3172ea47c1 100644 --- a/src/test/run-pass/expr-match-generic-unique2.rs +++ b/src/test/run-pass/expr-match-generic-unique2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/expr-match-generic.rs b/src/test/run-pass/expr-match-generic.rs index 8e66827e0198f..513197be8f315 100644 --- a/src/test/run-pass/expr-match-generic.rs +++ b/src/test/run-pass/expr-match-generic.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + type compare = extern "Rust" fn(T, T) -> bool; fn test_generic(expected: T, eq: compare) { diff --git a/src/test/run-pass/expr-match-panic-all.rs b/src/test/run-pass/expr-match-panic-all.rs index 3a8955917d649..664ead10aae09 100644 --- a/src/test/run-pass/expr-match-panic-all.rs +++ b/src/test/run-pass/expr-match-panic-all.rs @@ -13,6 +13,8 @@ // When all branches of a match expression result in panic, the entire // match expression results in panic. +// pretty-expanded FIXME #23616 + pub fn main() { let _x = match true { diff --git a/src/test/run-pass/expr-match-panic.rs b/src/test/run-pass/expr-match-panic.rs index da24d4c57cc79..40e7a6175cf86 100644 --- a/src/test/run-pass/expr-match-panic.rs +++ b/src/test/run-pass/expr-match-panic.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn test_simple() { let r = match true { true => { true } false => { panic!() } }; assert_eq!(r, true); diff --git a/src/test/run-pass/expr-match-unique.rs b/src/test/run-pass/expr-match-unique.rs index 9641cacddc0a6..51eda4c7663a8 100644 --- a/src/test/run-pass/expr-match-unique.rs +++ b/src/test/run-pass/expr-match-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/expr-match.rs b/src/test/run-pass/expr-match.rs index b8996de41999c..2282391ef6fb4 100644 --- a/src/test/run-pass/expr-match.rs +++ b/src/test/run-pass/expr-match.rs @@ -13,6 +13,8 @@ // Tests for using match as an expression +// pretty-expanded FIXME #23616 + fn test_basic() { let mut rs: bool = match true { true => { true } false => { false } }; assert!((rs)); diff --git a/src/test/run-pass/expr-scope.rs b/src/test/run-pass/expr-scope.rs index 324ff59dcb8f0..a1d86218846d6 100644 --- a/src/test/run-pass/expr-scope.rs +++ b/src/test/run-pass/expr-scope.rs @@ -10,5 +10,7 @@ // Regression test for issue #762 +// pretty-expanded FIXME #23616 + pub fn f() { } pub fn main() { return ::f(); } diff --git a/src/test/run-pass/ext-expand-inner-exprs.rs b/src/test/run-pass/ext-expand-inner-exprs.rs index d204f808e4471..46cd73e11527c 100644 --- a/src/test/run-pass/ext-expand-inner-exprs.rs +++ b/src/test/run-pass/ext-expand-inner-exprs.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static FOO : &'static str = concat!(concat!("hel", "lo"), "world"); pub fn main() { diff --git a/src/test/run-pass/exterior.rs b/src/test/run-pass/exterior.rs index bba8cbdb83dd6..8e050aa3f4db7 100644 --- a/src/test/run-pass/exterior.rs +++ b/src/test/run-pass/exterior.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + use std::cell::Cell; #[derive(Copy)] diff --git a/src/test/run-pass/extern-1.rs b/src/test/run-pass/extern-1.rs index e4b9b9dfa1686..67f6a3e8fc484 100644 --- a/src/test/run-pass/extern-1.rs +++ b/src/test/run-pass/extern-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern fn f() { } diff --git a/src/test/run-pass/extern-call-direct.rs b/src/test/run-pass/extern-call-direct.rs index 34d2b577f202c..bd05b3ce5a45c 100644 --- a/src/test/run-pass/extern-call-direct.rs +++ b/src/test/run-pass/extern-call-direct.rs @@ -10,6 +10,8 @@ // Test direct calls to extern fns. +// pretty-expanded FIXME #23616 + extern fn f(x: uint) -> uint { x * 2 } pub fn main() { diff --git a/src/test/run-pass/extern-calling-convention-test.rs b/src/test/run-pass/extern-calling-convention-test.rs index bdb1326aa15c0..12f9c22c91824 100644 --- a/src/test/run-pass/extern-calling-convention-test.rs +++ b/src/test/run-pass/extern-calling-convention-test.rs @@ -10,6 +10,8 @@ // aux-build:extern_calling_convention.rs +// pretty-expanded FIXME #23616 + extern crate extern_calling_convention; use extern_calling_convention::foo; diff --git a/src/test/run-pass/extern-compare-with-return-type.rs b/src/test/run-pass/extern-compare-with-return-type.rs index 612b6ee14e196..2d633b1de69f6 100644 --- a/src/test/run-pass/extern-compare-with-return-type.rs +++ b/src/test/run-pass/extern-compare-with-return-type.rs @@ -10,6 +10,8 @@ // Tests that we can compare various kinds of extern fn signatures. +// pretty-expanded FIXME #23616 + extern fn voidret1() {} extern fn voidret2() {} diff --git a/src/test/run-pass/extern-foreign-crate.rs b/src/test/run-pass/extern-foreign-crate.rs index 59ee9a14e2eac..50c070483f697 100644 --- a/src/test/run-pass/extern-foreign-crate.rs +++ b/src/test/run-pass/extern-foreign-crate.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern crate "std" as mystd; pub fn main() {} diff --git a/src/test/run-pass/extern-methods.rs b/src/test/run-pass/extern-methods.rs index aab409e77cf47..246f65931b70e 100644 --- a/src/test/run-pass/extern-methods.rs +++ b/src/test/run-pass/extern-methods.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/run-pass/extern-mod-abi.rs b/src/test/run-pass/extern-mod-abi.rs index 84fd1b40bf7a5..74f47f08703a2 100644 --- a/src/test/run-pass/extern-mod-abi.rs +++ b/src/test/run-pass/extern-mod-abi.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern "C" { fn pow(x: f64, y: f64) -> f64; } diff --git a/src/test/run-pass/extern-mod-ordering-exe.rs b/src/test/run-pass/extern-mod-ordering-exe.rs index d6c6389fdb63b..1c64716b822b5 100644 --- a/src/test/run-pass/extern-mod-ordering-exe.rs +++ b/src/test/run-pass/extern-mod-ordering-exe.rs @@ -10,6 +10,8 @@ // aux-build:extern_mod_ordering_lib.rs +// pretty-expanded FIXME #23616 + extern crate extern_mod_ordering_lib; use extern_mod_ordering_lib::extern_mod_ordering_lib as the_lib; diff --git a/src/test/run-pass/extern-pass-char.rs b/src/test/run-pass/extern-pass-char.rs index 2e86b3774c8dd..bbdf5cf64a127 100644 --- a/src/test/run-pass/extern-pass-char.rs +++ b/src/test/run-pass/extern-pass-char.rs @@ -10,6 +10,8 @@ // Test a function that takes/returns a u8. +// pretty-expanded FIXME #23616 + #[link(name = "rust_test_helpers")] extern { pub fn rust_dbg_extern_identity_u8(v: u8) -> u8; diff --git a/src/test/run-pass/extern-pass-double.rs b/src/test/run-pass/extern-pass-double.rs index c33c9ee3027f7..24c461f43adf8 100644 --- a/src/test/run-pass/extern-pass-double.rs +++ b/src/test/run-pass/extern-pass-double.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[link(name = "rust_test_helpers")] extern { pub fn rust_dbg_extern_identity_double(v: f64) -> f64; diff --git a/src/test/run-pass/extern-pass-empty.rs b/src/test/run-pass/extern-pass-empty.rs index 272dfc98148ca..17b0bb580fce2 100644 --- a/src/test/run-pass/extern-pass-empty.rs +++ b/src/test/run-pass/extern-pass-empty.rs @@ -10,6 +10,8 @@ // Test a foreign function that accepts empty struct. +// pretty-expanded FIXME #23616 + struct TwoU8s { one: u8, two: u8, diff --git a/src/test/run-pass/extern-pass-u32.rs b/src/test/run-pass/extern-pass-u32.rs index 2c01808440762..f93d7a3ff9614 100644 --- a/src/test/run-pass/extern-pass-u32.rs +++ b/src/test/run-pass/extern-pass-u32.rs @@ -10,6 +10,8 @@ // Test a function that takes/returns a u32. +// pretty-expanded FIXME #23616 + #[link(name = "rust_test_helpers")] extern { pub fn rust_dbg_extern_identity_u32(v: u32) -> u32; diff --git a/src/test/run-pass/extern-pass-u64.rs b/src/test/run-pass/extern-pass-u64.rs index e72e87d3d9363..961a3dce16813 100644 --- a/src/test/run-pass/extern-pass-u64.rs +++ b/src/test/run-pass/extern-pass-u64.rs @@ -10,6 +10,8 @@ // Test a call to a function that takes/returns a u64. +// pretty-expanded FIXME #23616 + #[link(name = "rust_test_helpers")] extern { pub fn rust_dbg_extern_identity_u64(v: u64) -> u64; diff --git a/src/test/run-pass/extern-pub.rs b/src/test/run-pass/extern-pub.rs index cefc266b5c764..29bcdef5dc9ec 100644 --- a/src/test/run-pass/extern-pub.rs +++ b/src/test/run-pass/extern-pub.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern { pub fn free(p: *const u8); } diff --git a/src/test/run-pass/extern-return-TwoU16s.rs b/src/test/run-pass/extern-return-TwoU16s.rs index ca9767307f42e..f149a1346229a 100644 --- a/src/test/run-pass/extern-return-TwoU16s.rs +++ b/src/test/run-pass/extern-return-TwoU16s.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct TwoU16s { one: u16, two: u16 } diff --git a/src/test/run-pass/extern-return-TwoU32s.rs b/src/test/run-pass/extern-return-TwoU32s.rs index 8d650459daa8d..4e9c44ef75eec 100644 --- a/src/test/run-pass/extern-return-TwoU32s.rs +++ b/src/test/run-pass/extern-return-TwoU32s.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct TwoU32s { one: u32, two: u32 } diff --git a/src/test/run-pass/extern-return-TwoU64s.rs b/src/test/run-pass/extern-return-TwoU64s.rs index 924aaf811f44a..fffd77fa89735 100644 --- a/src/test/run-pass/extern-return-TwoU64s.rs +++ b/src/test/run-pass/extern-return-TwoU64s.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct TwoU64s { one: u64, two: u64 } diff --git a/src/test/run-pass/extern-return-TwoU8s.rs b/src/test/run-pass/extern-return-TwoU8s.rs index 1dbce403cc8a1..fdf43d4332a9d 100644 --- a/src/test/run-pass/extern-return-TwoU8s.rs +++ b/src/test/run-pass/extern-return-TwoU8s.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct TwoU8s { one: u8, two: u8 } diff --git a/src/test/run-pass/extern-rust.rs b/src/test/run-pass/extern-rust.rs index 8ba39a24514cb..e7f707bc334d7 100644 --- a/src/test/run-pass/extern-rust.rs +++ b/src/test/run-pass/extern-rust.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[repr(C)] pub struct Foo(u32); diff --git a/src/test/run-pass/extern-take-value.rs b/src/test/run-pass/extern-take-value.rs index 1934ef8024fd4..c016e4e62f56f 100644 --- a/src/test/run-pass/extern-take-value.rs +++ b/src/test/run-pass/extern-take-value.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern fn f() { } diff --git a/src/test/run-pass/extoption_env-not-defined.rs b/src/test/run-pass/extoption_env-not-defined.rs index 891133c78d477..aaa8f6cf26f1d 100644 --- a/src/test/run-pass/extoption_env-not-defined.rs +++ b/src/test/run-pass/extoption_env-not-defined.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert!(option_env!("__HOPEFULLY_DOESNT_EXIST__").is_none()); } diff --git a/src/test/run-pass/field-destruction-order.rs b/src/test/run-pass/field-destruction-order.rs index 1d4c08f0bb5de..aab32a7e7bd37 100644 --- a/src/test/run-pass/field-destruction-order.rs +++ b/src/test/run-pass/field-destruction-order.rs @@ -21,6 +21,8 @@ // declarations, but we currently run them top-to-bottom. I don't think the // order really matters that much as long as we define what it is. +// pretty-expanded FIXME #23616 + struct A; struct B; struct C { diff --git a/src/test/run-pass/filter-block-view-items.rs b/src/test/run-pass/filter-block-view-items.rs index 37f7d84aaf1e4..fbdf817e9abb8 100644 --- a/src/test/run-pass/filter-block-view-items.rs +++ b/src/test/run-pass/filter-block-view-items.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { // Make sure that this view item is filtered out because otherwise it would // trigger a compilation error diff --git a/src/test/run-pass/fixed_length_copy.rs b/src/test/run-pass/fixed_length_copy.rs index bbd7b9130e7b9..019537a2ab8b0 100644 --- a/src/test/run-pass/fixed_length_copy.rs +++ b/src/test/run-pass/fixed_length_copy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let arr = [1,2,3]; let arr2 = arr; diff --git a/src/test/run-pass/fixup-deref-mut.rs b/src/test/run-pass/fixup-deref-mut.rs index a673a67089a3a..09683c43ece22 100644 --- a/src/test/run-pass/fixup-deref-mut.rs +++ b/src/test/run-pass/fixup-deref-mut.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ops::{Deref, DerefMut}; // Generic unique/owned smaht pointer. diff --git a/src/test/run-pass/float-nan.rs b/src/test/run-pass/float-nan.rs index b52f025fcbb51..b375f122082ef 100644 --- a/src/test/run-pass/float-nan.rs +++ b/src/test/run-pass/float-nan.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::num::Float; diff --git a/src/test/run-pass/float2.rs b/src/test/run-pass/float2.rs index 9c75979628f3c..f84cbe5235467 100644 --- a/src/test/run-pass/float2.rs +++ b/src/test/run-pass/float2.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let a = 1.5e6f64; let b = 1.5E6f64; diff --git a/src/test/run-pass/floatlits.rs b/src/test/run-pass/floatlits.rs index 09df423d2dadc..d45c689bfdaa7 100644 --- a/src/test/run-pass/floatlits.rs +++ b/src/test/run-pass/floatlits.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let f = 4.999999999999f64; assert!((f > 4.90f64)); diff --git a/src/test/run-pass/fn-abi.rs b/src/test/run-pass/fn-abi.rs index 0bbd5ecdc3f5c..521ed6db65be1 100644 --- a/src/test/run-pass/fn-abi.rs +++ b/src/test/run-pass/fn-abi.rs @@ -11,6 +11,8 @@ // Ensure that declarations and types which use `extern fn` both have the same // ABI (#9309). +// pretty-expanded FIXME #23616 + extern { fn printf(); } diff --git a/src/test/run-pass/fn-bare-assign.rs b/src/test/run-pass/fn-bare-assign.rs index fd8721e29e9b8..0fd0f6a110d56 100644 --- a/src/test/run-pass/fn-bare-assign.rs +++ b/src/test/run-pass/fn-bare-assign.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(i: int, called: &mut bool) { assert_eq!(i, 10); *called = true; diff --git a/src/test/run-pass/fn-bare-coerce-to-block.rs b/src/test/run-pass/fn-bare-coerce-to-block.rs index 09508b9b13629..4ec32d23467f7 100644 --- a/src/test/run-pass/fn-bare-coerce-to-block.rs +++ b/src/test/run-pass/fn-bare-coerce-to-block.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn bare() {} fn likes_block(f: F) where F: FnOnce() { f() } diff --git a/src/test/run-pass/fn-bare-size.rs b/src/test/run-pass/fn-bare-size.rs index cdde98331e2d0..b373294e243f2 100644 --- a/src/test/run-pass/fn-bare-size.rs +++ b/src/test/run-pass/fn-bare-size.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; pub fn main() { diff --git a/src/test/run-pass/fn-bare-spawn.rs b/src/test/run-pass/fn-bare-spawn.rs index 4fc2c69ceb34f..8a16724561025 100644 --- a/src/test/run-pass/fn-bare-spawn.rs +++ b/src/test/run-pass/fn-bare-spawn.rs @@ -10,6 +10,8 @@ // This is what the signature to spawn should look like with bare functions +// pretty-expanded FIXME #23616 + fn spawn(val: T, f: fn(T)) { f(val); } diff --git a/src/test/run-pass/fn-coerce-field.rs b/src/test/run-pass/fn-coerce-field.rs index bf6926050ba96..74d107d15ab0f 100644 --- a/src/test/run-pass/fn-coerce-field.rs +++ b/src/test/run-pass/fn-coerce-field.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct r where F: FnOnce() { field: F, } diff --git a/src/test/run-pass/fn-item-type-cast.rs b/src/test/run-pass/fn-item-type-cast.rs index bfd02f5e27b0c..7f9248f4d2ac2 100644 --- a/src/test/run-pass/fn-item-type-cast.rs +++ b/src/test/run-pass/fn-item-type-cast.rs @@ -10,6 +10,8 @@ // Test explicit coercions from a fn item type to a fn pointer type. +// pretty-expanded FIXME #23616 + fn foo(x: int) -> int { x * 2 } fn bar(x: int) -> int { x * 4 } type IntMap = fn(int) -> int; diff --git a/src/test/run-pass/fn-item-type-coerce.rs b/src/test/run-pass/fn-item-type-coerce.rs index 8427a0f444621..34489555dbc20 100644 --- a/src/test/run-pass/fn-item-type-coerce.rs +++ b/src/test/run-pass/fn-item-type-coerce.rs @@ -10,6 +10,8 @@ // Test implicit coercions from a fn item type to a fn pointer type. +// pretty-expanded FIXME #23616 + fn foo(x: int) -> int { x * 2 } fn bar(x: int) -> int { x * 4 } type IntMap = fn(int) -> int; diff --git a/src/test/run-pass/fn-lval.rs b/src/test/run-pass/fn-lval.rs index f21dbc6f987d2..efb58474118a6 100644 --- a/src/test/run-pass/fn-lval.rs +++ b/src/test/run-pass/fn-lval.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + fn foo(_f: fn(int) -> int) { } fn id(x: int) -> int { return x; } diff --git a/src/test/run-pass/fn-pattern-expected-type.rs b/src/test/run-pass/fn-pattern-expected-type.rs index 3e81ca5125ba4..2287df4b10552 100644 --- a/src/test/run-pass/fn-pattern-expected-type.rs +++ b/src/test/run-pass/fn-pattern-expected-type.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let f = |(x, y): (int, int)| { assert_eq!(x, 1); diff --git a/src/test/run-pass/fn-type-infer.rs b/src/test/run-pass/fn-type-infer.rs index 34417891197a4..3e1674a97e089 100644 --- a/src/test/run-pass/fn-type-infer.rs +++ b/src/test/run-pass/fn-type-infer.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_variable)] pub fn main() { diff --git a/src/test/run-pass/for-destruct.rs b/src/test/run-pass/for-destruct.rs index 7a9b8a45b2af1..2db01b1aa4067 100644 --- a/src/test/run-pass/for-destruct.rs +++ b/src/test/run-pass/for-destruct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Pair { x: int, y: int } pub fn main() { diff --git a/src/test/run-pass/for-loop-goofiness.rs b/src/test/run-pass/for-loop-goofiness.rs index 84218befcd83b..8784af1888648 100644 --- a/src/test/run-pass/for-loop-goofiness.rs +++ b/src/test/run-pass/for-loop-goofiness.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum BogusOption { None, Some(T), diff --git a/src/test/run-pass/for-loop-into-iterator.rs b/src/test/run-pass/for-loop-into-iterator.rs index 7564efbd9e56b..109ca26056fff 100644 --- a/src/test/run-pass/for-loop-into-iterator.rs +++ b/src/test/run-pass/for-loop-into-iterator.rs @@ -10,6 +10,8 @@ // Test that for loops can do what RFC #235 claims +// pretty-expanded FIXME #23616 + fn main() { let mut v = vec![1]; diff --git a/src/test/run-pass/for-loop-no-std.rs b/src/test/run-pass/for-loop-no-std.rs index 31ed49197781c..769d9116f5a81 100644 --- a/src/test/run-pass/for-loop-no-std.rs +++ b/src/test/run-pass/for-loop-no-std.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(lang_items, start, no_std, core, collections)] #![no_std] diff --git a/src/test/run-pass/for-loop-panic.rs b/src/test/run-pass/for-loop-panic.rs index d2de1ed8c7e6f..7664e74cd33ba 100644 --- a/src/test/run-pass/for-loop-panic.rs +++ b/src/test/run-pass/for-loop-panic.rs @@ -9,4 +9,6 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x: Vec = Vec::new(); for _ in &x { panic!("moop"); } } diff --git a/src/test/run-pass/foreach-external-iterators-break.rs b/src/test/run-pass/foreach-external-iterators-break.rs index 25d625e27f6dd..bc041259895f9 100644 --- a/src/test/run-pass/foreach-external-iterators-break.rs +++ b/src/test/run-pass/foreach-external-iterators-break.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = [1; 100]; let mut y = 0; diff --git a/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs b/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs index 1a60f22d1450a..cc02ee1459b5e 100644 --- a/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs +++ b/src/test/run-pass/foreach-external-iterators-hashmap-break-restart.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/foreach-external-iterators-hashmap.rs b/src/test/run-pass/foreach-external-iterators-hashmap.rs index 79d2d4000805c..065e4cfb7682b 100644 --- a/src/test/run-pass/foreach-external-iterators-hashmap.rs +++ b/src/test/run-pass/foreach-external-iterators-hashmap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/foreach-external-iterators-loop.rs b/src/test/run-pass/foreach-external-iterators-loop.rs index d9abed501237c..60cfc9be0787a 100644 --- a/src/test/run-pass/foreach-external-iterators-loop.rs +++ b/src/test/run-pass/foreach-external-iterators-loop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = [1; 100]; let mut y = 0; diff --git a/src/test/run-pass/foreach-external-iterators-nested.rs b/src/test/run-pass/foreach-external-iterators-nested.rs index 3817e1b0edace..a075c08b737e0 100644 --- a/src/test/run-pass/foreach-external-iterators-nested.rs +++ b/src/test/run-pass/foreach-external-iterators-nested.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = [1; 100]; let y = [2; 100]; diff --git a/src/test/run-pass/foreach-external-iterators.rs b/src/test/run-pass/foreach-external-iterators.rs index 8403a1669ffcf..2248132d828d1 100644 --- a/src/test/run-pass/foreach-external-iterators.rs +++ b/src/test/run-pass/foreach-external-iterators.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = [1; 100]; let mut y = 0; diff --git a/src/test/run-pass/foreach-nested.rs b/src/test/run-pass/foreach-nested.rs index f6466994955e7..45e57e8a7e8d3 100644 --- a/src/test/run-pass/foreach-nested.rs +++ b/src/test/run-pass/foreach-nested.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn two(mut it: F) where F: FnMut(int) { it(0); it(1); } pub fn main() { diff --git a/src/test/run-pass/foreign-dupe.rs b/src/test/run-pass/foreign-dupe.rs index fe42b2a0558a1..fd779d665071d 100644 --- a/src/test/run-pass/foreign-dupe.rs +++ b/src/test/run-pass/foreign-dupe.rs @@ -10,6 +10,8 @@ // calling pin_task and that's having weird side-effects. +// pretty-expanded FIXME #23616 + #![feature(libc)] mod rustrt1 { diff --git a/src/test/run-pass/foreign-fn-linkname.rs b/src/test/run-pass/foreign-fn-linkname.rs index a274a1914498f..b7fe3705e10a5 100644 --- a/src/test/run-pass/foreign-fn-linkname.rs +++ b/src/test/run-pass/foreign-fn-linkname.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc, libc)] extern crate libc; diff --git a/src/test/run-pass/foreign-fn-with-byval.rs b/src/test/run-pass/foreign-fn-with-byval.rs index 09317abce921d..4c0633d49c65f 100644 --- a/src/test/run-pass/foreign-fn-with-byval.rs +++ b/src/test/run-pass/foreign-fn-with-byval.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] pub struct S { x: u64, diff --git a/src/test/run-pass/foreign-mod-unused-const.rs b/src/test/run-pass/foreign-mod-unused-const.rs index abf9f504b7d82..70d4801ae3b3c 100644 --- a/src/test/run-pass/foreign-mod-unused-const.rs +++ b/src/test/run-pass/foreign-mod-unused-const.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/foreign-no-abi.rs b/src/test/run-pass/foreign-no-abi.rs index 9305945b918b8..a9b3f60566d4e 100644 --- a/src/test/run-pass/foreign-no-abi.rs +++ b/src/test/run-pass/foreign-no-abi.rs @@ -10,6 +10,8 @@ // ABI is cdecl by default +// pretty-expanded FIXME #23616 + #![feature(libc)] mod rustrt { diff --git a/src/test/run-pass/foreign-struct.rs b/src/test/run-pass/foreign-struct.rs index e242071fb26bc..8b48731ee0ba0 100644 --- a/src/test/run-pass/foreign-struct.rs +++ b/src/test/run-pass/foreign-struct.rs @@ -10,6 +10,8 @@ // Passing enums by value +// pretty-expanded FIXME #23616 + pub enum void { } mod bindgen { diff --git a/src/test/run-pass/foreign2.rs b/src/test/run-pass/foreign2.rs index 749a5875b7562..d83bd940d1978 100644 --- a/src/test/run-pass/foreign2.rs +++ b/src/test/run-pass/foreign2.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/format-nan.rs b/src/test/run-pass/format-nan.rs index 9670d2de3efca..bdbbeaa9511cd 100644 --- a/src/test/run-pass/format-nan.rs +++ b/src/test/run-pass/format-nan.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { use std::f64; let x = "NaN".to_string(); diff --git a/src/test/run-pass/format-no-std.rs b/src/test/run-pass/format-no-std.rs index 4df6ed843affa..71934b42c33f5 100644 --- a/src/test/run-pass/format-no-std.rs +++ b/src/test/run-pass/format-no-std.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(lang_items, start, no_std, core, collections)] #![no_std] diff --git a/src/test/run-pass/format-ref-cell.rs b/src/test/run-pass/format-ref-cell.rs index 2122759b3d3ee..ce26fbd4c00f9 100644 --- a/src/test/run-pass/format-ref-cell.rs +++ b/src/test/run-pass/format-ref-cell.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::cell::RefCell; pub fn main() { diff --git a/src/test/run-pass/fsu-moves-and-copies.rs b/src/test/run-pass/fsu-moves-and-copies.rs index cdf147aae1093..e04fa36d80b4c 100644 --- a/src/test/run-pass/fsu-moves-and-copies.rs +++ b/src/test/run-pass/fsu-moves-and-copies.rs @@ -11,6 +11,8 @@ // Issue 4691: Ensure that functional-struct-updates operates // correctly and moves rather than copy when appropriate. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, core)] diff --git a/src/test/run-pass/fun-call-variants.rs b/src/test/run-pass/fun-call-variants.rs index 3955bedb168ae..526787c8b9c9e 100644 --- a/src/test/run-pass/fun-call-variants.rs +++ b/src/test/run-pass/fun-call-variants.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn ho(f: F) -> int where F: FnOnce(int) -> int { let n: int = f(3); return n; } fn direct(x: int) -> int { return x + 1; } diff --git a/src/test/run-pass/fun-indirect-call.rs b/src/test/run-pass/fun-indirect-call.rs index 4bff06f2a0382..b04377d3616c4 100644 --- a/src/test/run-pass/fun-indirect-call.rs +++ b/src/test/run-pass/fun-indirect-call.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + fn f() -> int { return 42; } pub fn main() { diff --git a/src/test/run-pass/func-arg-incomplete-pattern.rs b/src/test/run-pass/func-arg-incomplete-pattern.rs index 581f71a737651..4476ce309c478 100644 --- a/src/test/run-pass/func-arg-incomplete-pattern.rs +++ b/src/test/run-pass/func-arg-incomplete-pattern.rs @@ -11,6 +11,8 @@ // Test that we do not leak when the arg pattern must drop part of the // argument (in this case, the `y` field). +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/func-arg-ref-pattern.rs b/src/test/run-pass/func-arg-ref-pattern.rs index 799b865bd2d7a..5893eec63f027 100644 --- a/src/test/run-pass/func-arg-ref-pattern.rs +++ b/src/test/run-pass/func-arg-ref-pattern.rs @@ -14,6 +14,8 @@ // boxes. Make sure that we don't free the box as we match the // pattern. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/func-arg-wild-pattern.rs b/src/test/run-pass/func-arg-wild-pattern.rs index 97ba561baea39..2eb6279455ea3 100644 --- a/src/test/run-pass/func-arg-wild-pattern.rs +++ b/src/test/run-pass/func-arg-wild-pattern.rs @@ -11,6 +11,8 @@ // Test that we can compile code that uses a `_` in function argument // patterns. +// pretty-expanded FIXME #23616 + fn foo((x, _): (int, int)) -> int { x } diff --git a/src/test/run-pass/generic-default-type-params-cross-crate.rs b/src/test/run-pass/generic-default-type-params-cross-crate.rs index bf02b82d1a075..c76d942575c42 100644 --- a/src/test/run-pass/generic-default-type-params-cross-crate.rs +++ b/src/test/run-pass/generic-default-type-params-cross-crate.rs @@ -10,6 +10,8 @@ // aux-build:default_type_params_xc.rs +// pretty-expanded FIXME #23616 + extern crate default_type_params_xc; struct Vec(Option<(T,A)>); diff --git a/src/test/run-pass/generic-exterior-unique.rs b/src/test/run-pass/generic-exterior-unique.rs index a2f7bdfd81709..7265b021adc46 100644 --- a/src/test/run-pass/generic-exterior-unique.rs +++ b/src/test/run-pass/generic-exterior-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/generic-extern-mangle.rs b/src/test/run-pass/generic-extern-mangle.rs index db5175f19cb4b..4ea05a375d111 100644 --- a/src/test/run-pass/generic-extern-mangle.rs +++ b/src/test/run-pass/generic-extern-mangle.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::num::Int; diff --git a/src/test/run-pass/generic-fn-infer.rs b/src/test/run-pass/generic-fn-infer.rs index 2f88a54e3f5e0..0eb17c41307d0 100644 --- a/src/test/run-pass/generic-fn-infer.rs +++ b/src/test/run-pass/generic-fn-infer.rs @@ -13,6 +13,8 @@ // Issue #45: infer type parameters in function applications +// pretty-expanded FIXME #23616 + fn id(x: T) -> T { return x; } pub fn main() { let x: int = 42; let y: int = id(x); assert!((x == y)); } diff --git a/src/test/run-pass/generic-fn-twice.rs b/src/test/run-pass/generic-fn-twice.rs index 6b503e711e9d3..04a8824abedcb 100644 --- a/src/test/run-pass/generic-fn-twice.rs +++ b/src/test/run-pass/generic-fn-twice.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + mod foomod { pub fn foo() { } } diff --git a/src/test/run-pass/generic-ivec-leak.rs b/src/test/run-pass/generic-ivec-leak.rs index eb0546063f715..b14a6101225e7 100644 --- a/src/test/run-pass/generic-ivec-leak.rs +++ b/src/test/run-pass/generic-ivec-leak.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum wrapper { wrapped(T), } pub fn main() { let _w = wrapper::wrapped(vec!(1, 2, 3, 4, 5)); } diff --git a/src/test/run-pass/generic-newtype-struct.rs b/src/test/run-pass/generic-newtype-struct.rs index 4e3c820405263..24b5172800078 100644 --- a/src/test/run-pass/generic-newtype-struct.rs +++ b/src/test/run-pass/generic-newtype-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct S(T); pub fn main() { diff --git a/src/test/run-pass/generic-object.rs b/src/test/run-pass/generic-object.rs index 986b35cbecf96..4934b9de36c6f 100644 --- a/src/test/run-pass/generic-object.rs +++ b/src/test/run-pass/generic-object.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/generic-static-methods.rs b/src/test/run-pass/generic-static-methods.rs index 010f54dd55934..49f8d6a3adb52 100644 --- a/src/test/run-pass/generic-static-methods.rs +++ b/src/test/run-pass/generic-static-methods.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait vec_utils { fn map_(x: &Self, f: F) -> Vec where F: FnMut(&T) -> U; } diff --git a/src/test/run-pass/generic-tag-corruption.rs b/src/test/run-pass/generic-tag-corruption.rs index e39957e2bf2ef..d61ae520ada89 100644 --- a/src/test/run-pass/generic-tag-corruption.rs +++ b/src/test/run-pass/generic-tag-corruption.rs @@ -12,6 +12,8 @@ // This used to cause memory corruption in stage 0. +// pretty-expanded FIXME #23616 + enum thing { some(K), } pub fn main() { let _x = thing::some("hi".to_string()); } diff --git a/src/test/run-pass/generic-tag-local.rs b/src/test/run-pass/generic-tag-local.rs index 24c31ab4ee66f..9518d590279fc 100644 --- a/src/test/run-pass/generic-tag-local.rs +++ b/src/test/run-pass/generic-tag-local.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + enum clam { a(T), } pub fn main() { let _c = clam::a(3); } diff --git a/src/test/run-pass/generic-tag.rs b/src/test/run-pass/generic-tag.rs index b0d4944ba540b..38f6707d9eff3 100644 --- a/src/test/run-pass/generic-tag.rs +++ b/src/test/run-pass/generic-tag.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unused_variable)] #![allow(unknown_features)] diff --git a/src/test/run-pass/generic-type-synonym.rs b/src/test/run-pass/generic-type-synonym.rs index a1cf581fe4a81..2b3bd5ead94a2 100644 --- a/src/test/run-pass/generic-type-synonym.rs +++ b/src/test/run-pass/generic-type-synonym.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + struct Foo { a: T } diff --git a/src/test/run-pass/generic-type.rs b/src/test/run-pass/generic-type.rs index 0ff7cedc6c5f1..6f93ae0d42bc2 100644 --- a/src/test/run-pass/generic-type.rs +++ b/src/test/run-pass/generic-type.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + struct Pair {x: T, y: T} pub fn main() { diff --git a/src/test/run-pass/generic-unique.rs b/src/test/run-pass/generic-unique.rs index 1d39c47417c10..4c5072b10c967 100644 --- a/src/test/run-pass/generic-unique.rs +++ b/src/test/run-pass/generic-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/getopts_ref.rs b/src/test/run-pass/getopts_ref.rs index 1ccd8a0640efe..52b06ab2928af 100644 --- a/src/test/run-pass/getopts_ref.rs +++ b/src/test/run-pass/getopts_ref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(rustc_private)] extern crate getopts; diff --git a/src/test/run-pass/global-scope.rs b/src/test/run-pass/global-scope.rs index 618916e856907..73c15382d9ea5 100644 --- a/src/test/run-pass/global-scope.rs +++ b/src/test/run-pass/global-scope.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn f() -> int { return 1; } pub mod foo { diff --git a/src/test/run-pass/guards-not-exhaustive.rs b/src/test/run-pass/guards-not-exhaustive.rs index addd6a63836f3..f038353ada27a 100644 --- a/src/test/run-pass/guards-not-exhaustive.rs +++ b/src/test/run-pass/guards-not-exhaustive.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] enum Q { R(Option) } diff --git a/src/test/run-pass/guards.rs b/src/test/run-pass/guards.rs index 188106ec10788..59e7c3782e111 100644 --- a/src/test/run-pass/guards.rs +++ b/src/test/run-pass/guards.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] struct Pair { x: int, y: int } diff --git a/src/test/run-pass/hrtb-binder-levels-in-object-types.rs b/src/test/run-pass/hrtb-binder-levels-in-object-types.rs index 5a793f7065a41..495c1ccf1f4fb 100644 --- a/src/test/run-pass/hrtb-binder-levels-in-object-types.rs +++ b/src/test/run-pass/hrtb-binder-levels-in-object-types.rs @@ -13,6 +13,8 @@ // `&Typer<'tcx>` was getting an incorrect binder level, yielding // weird compilation ICEs and so forth. +// pretty-expanded FIXME #23616 + trait Typer<'tcx> { fn method(&self, data: &'tcx int) -> &'tcx int { data } } diff --git a/src/test/run-pass/hrtb-debruijn-object-types-in-closures.rs b/src/test/run-pass/hrtb-debruijn-object-types-in-closures.rs index 9e857a33245d1..9cb588b101047 100644 --- a/src/test/run-pass/hrtb-debruijn-object-types-in-closures.rs +++ b/src/test/run-pass/hrtb-debruijn-object-types-in-closures.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Typer<'tcx> { fn method(&self, data: &'tcx int) -> &'tcx int { data } fn dummy(&self) { } diff --git a/src/test/run-pass/hrtb-fn-like-trait-object.rs b/src/test/run-pass/hrtb-fn-like-trait-object.rs index c8992afe36ac7..676c7b8245a64 100644 --- a/src/test/run-pass/hrtb-fn-like-trait-object.rs +++ b/src/test/run-pass/hrtb-fn-like-trait-object.rs @@ -10,6 +10,8 @@ // A basic test of using a higher-ranked trait bound. +// pretty-expanded FIXME #23616 + trait FnLike { fn call(&self, arg: A) -> R; } diff --git a/src/test/run-pass/hrtb-fn-like-trait.rs b/src/test/run-pass/hrtb-fn-like-trait.rs index 4067b922cfd6b..d837dafc759ba 100644 --- a/src/test/run-pass/hrtb-fn-like-trait.rs +++ b/src/test/run-pass/hrtb-fn-like-trait.rs @@ -10,6 +10,8 @@ // A basic test of using a higher-ranked trait bound. +// pretty-expanded FIXME #23616 + trait FnLike { fn call(&self, arg: A) -> R; } diff --git a/src/test/run-pass/hrtb-opt-in-copy.rs b/src/test/run-pass/hrtb-opt-in-copy.rs index 7b16bb867e79c..8ececb3875acb 100644 --- a/src/test/run-pass/hrtb-opt-in-copy.rs +++ b/src/test/run-pass/hrtb-opt-in-copy.rs @@ -16,6 +16,8 @@ // did not consider that a match (something I would like to revise in // a later PR). +// pretty-expanded FIXME #23616 + #![allow(dead_code)] use std::marker::PhantomData; diff --git a/src/test/run-pass/hrtb-parse.rs b/src/test/run-pass/hrtb-parse.rs index d5307c09103a1..ecd0bc681c313 100644 --- a/src/test/run-pass/hrtb-parse.rs +++ b/src/test/run-pass/hrtb-parse.rs @@ -11,6 +11,8 @@ // Test that we can parse all the various places that a `for` keyword // can appear representing universal quantification. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/run-pass/hrtb-precedence-of-plus-where-clause.rs b/src/test/run-pass/hrtb-precedence-of-plus-where-clause.rs index 88e6de6d3e6ff..f27fb29717611 100644 --- a/src/test/run-pass/hrtb-precedence-of-plus-where-clause.rs +++ b/src/test/run-pass/hrtb-precedence-of-plus-where-clause.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] // Test that `F : Fn(int) -> int + Send` is interpreted as two diff --git a/src/test/run-pass/hrtb-precedence-of-plus.rs b/src/test/run-pass/hrtb-precedence-of-plus.rs index f4daf9a4f6297..2c247c8099057 100644 --- a/src/test/run-pass/hrtb-precedence-of-plus.rs +++ b/src/test/run-pass/hrtb-precedence-of-plus.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(unboxed_closures)] diff --git a/src/test/run-pass/hrtb-resolve-lifetime.rs b/src/test/run-pass/hrtb-resolve-lifetime.rs index 9b37b8e49ef3c..bdebadd54112c 100644 --- a/src/test/run-pass/hrtb-resolve-lifetime.rs +++ b/src/test/run-pass/hrtb-resolve-lifetime.rs @@ -10,6 +10,8 @@ // A basic test of using a higher-ranked trait bound. +// pretty-expanded FIXME #23616 + trait FnLike { fn call(&self, arg: A) -> R; } diff --git a/src/test/run-pass/hrtb-trait-object-paren-notation.rs b/src/test/run-pass/hrtb-trait-object-paren-notation.rs index 1b62a8e809c89..7741f1904f6ab 100644 --- a/src/test/run-pass/hrtb-trait-object-paren-notation.rs +++ b/src/test/run-pass/hrtb-trait-object-paren-notation.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] // A basic test of using a higher-ranked trait bound. diff --git a/src/test/run-pass/hrtb-trait-object-passed-to-closure.rs b/src/test/run-pass/hrtb-trait-object-passed-to-closure.rs index c90c3643d4e54..1f63349b2d8da 100644 --- a/src/test/run-pass/hrtb-trait-object-passed-to-closure.rs +++ b/src/test/run-pass/hrtb-trait-object-passed-to-closure.rs @@ -12,6 +12,8 @@ // PrinterSupport<'b>`, gets properly expanded when it appears in a // closure type. This used to result in messed up De Bruijn indices. +// pretty-expanded FIXME #23616 + trait PrinterSupport<'ast> { fn ast_map(&self) -> Option<&'ast uint> { None } } diff --git a/src/test/run-pass/huge-largest-array.rs b/src/test/run-pass/huge-largest-array.rs index 5083bd2320730..2345bb01d8ae9 100644 --- a/src/test/run-pass/huge-largest-array.rs +++ b/src/test/run-pass/huge-largest-array.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::size_of; #[cfg(target_pointer_width = "32")] diff --git a/src/test/run-pass/hygiene-dodging-1.rs b/src/test/run-pass/hygiene-dodging-1.rs index 3969394a26b93..8421f47e94d8c 100644 --- a/src/test/run-pass/hygiene-dodging-1.rs +++ b/src/test/run-pass/hygiene-dodging-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod x { pub fn g() -> uint {14} } diff --git a/src/test/run-pass/hygienic-labels.rs b/src/test/run-pass/hygienic-labels.rs index 0d8da2a93482f..2d530275ea21f 100644 --- a/src/test/run-pass/hygienic-labels.rs +++ b/src/test/run-pass/hygienic-labels.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! loop_x { ($e: expr) => { // $e shouldn't be able to interact with this 'x diff --git a/src/test/run-pass/i32-sub.rs b/src/test/run-pass/i32-sub.rs index cebfd89d8aae6..2cc4e880bbf5e 100644 --- a/src/test/run-pass/i32-sub.rs +++ b/src/test/run-pass/i32-sub.rs @@ -11,4 +11,6 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let mut x: i32 = -400; x = 0 - x; assert!((x == 400)); } diff --git a/src/test/run-pass/i8-incr.rs b/src/test/run-pass/i8-incr.rs index c91e738b822dc..5dd53a268b135 100644 --- a/src/test/run-pass/i8-incr.rs +++ b/src/test/run-pass/i8-incr.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let mut x: i8 = -12; let y: i8 = -12; diff --git a/src/test/run-pass/if-let.rs b/src/test/run-pass/if-let.rs index 2d2f77b099151..1286b29309a29 100644 --- a/src/test/run-pass/if-let.rs +++ b/src/test/run-pass/if-let.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = Some(3); if let Some(y) = x { diff --git a/src/test/run-pass/if-ret.rs b/src/test/run-pass/if-ret.rs index b589c083a9789..8d475a99b8188 100644 --- a/src/test/run-pass/if-ret.rs +++ b/src/test/run-pass/if-ret.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo() { if (return) { } } pub fn main() { foo(); } diff --git a/src/test/run-pass/ignore-all-the-things.rs b/src/test/run-pass/ignore-all-the-things.rs index 65fc24ae74630..839ec6457e175 100644 --- a/src/test/run-pass/ignore-all-the-things.rs +++ b/src/test/run-pass/ignore-all-the-things.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(advanced_slice_patterns)] struct Foo(int, int, int, int); diff --git a/src/test/run-pass/impl-implicit-trait.rs b/src/test/run-pass/impl-implicit-trait.rs index a33fc4f2e7402..33a44b3bcd646 100644 --- a/src/test/run-pass/impl-implicit-trait.rs +++ b/src/test/run-pass/impl-implicit-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum option_ { none_, some_(T), diff --git a/src/test/run-pass/impl-inherent-non-conflict.rs b/src/test/run-pass/impl-inherent-non-conflict.rs index 663ed24d60e48..210bc34bcd1db 100644 --- a/src/test/run-pass/impl-inherent-non-conflict.rs +++ b/src/test/run-pass/impl-inherent-non-conflict.rs @@ -12,6 +12,8 @@ // with the same name, which can be called on values that have a // precise enough type to allow distinguishing between the methods. +// pretty-expanded FIXME #23616 + struct Foo(T); impl Foo { diff --git a/src/test/run-pass/impl-inherent-prefer-over-trait.rs b/src/test/run-pass/impl-inherent-prefer-over-trait.rs index 3031228b3ab44..26f12e9730b2a 100644 --- a/src/test/run-pass/impl-inherent-prefer-over-trait.rs +++ b/src/test/run-pass/impl-inherent-prefer-over-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo; trait Trait { diff --git a/src/test/run-pass/impl-not-adjacent-to-type.rs b/src/test/run-pass/impl-not-adjacent-to-type.rs index c1dc68b245655..2ba7375d67a64 100644 --- a/src/test/run-pass/impl-not-adjacent-to-type.rs +++ b/src/test/run-pass/impl-not-adjacent-to-type.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod foo { pub struct Point { pub x: i32, diff --git a/src/test/run-pass/impl-privacy-xc-1.rs b/src/test/run-pass/impl-privacy-xc-1.rs index d7e53f3c38ff7..97945f4c4dac3 100644 --- a/src/test/run-pass/impl-privacy-xc-1.rs +++ b/src/test/run-pass/impl-privacy-xc-1.rs @@ -10,6 +10,8 @@ // aux-build:impl_privacy_xc_1.rs +// pretty-expanded FIXME #23616 + extern crate impl_privacy_xc_1; pub fn main() { diff --git a/src/test/run-pass/import-crate-with-invalid-spans.rs b/src/test/run-pass/import-crate-with-invalid-spans.rs index a949f25f41e09..39c175f60da41 100644 --- a/src/test/run-pass/import-crate-with-invalid-spans.rs +++ b/src/test/run-pass/import-crate-with-invalid-spans.rs @@ -10,6 +10,8 @@ // aux-build:crate_with_invalid_spans.rs +// pretty-expanded FIXME #23616 + extern crate crate_with_invalid_spans; fn main() { diff --git a/src/test/run-pass/import-from.rs b/src/test/run-pass/import-from.rs index 38602bef229bc..9ac35fbb38756 100644 --- a/src/test/run-pass/import-from.rs +++ b/src/test/run-pass/import-from.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use spam::{ham, eggs}; mod spam { diff --git a/src/test/run-pass/import-glob-crate.rs b/src/test/run-pass/import-glob-crate.rs index f7874cc56fc77..eb9ec6fe985ac 100644 --- a/src/test/run-pass/import-glob-crate.rs +++ b/src/test/run-pass/import-glob-crate.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] use std::mem::*; diff --git a/src/test/run-pass/import-in-block.rs b/src/test/run-pass/import-in-block.rs index 4567651e892f5..532cdbbee3cd4 100644 --- a/src/test/run-pass/import-in-block.rs +++ b/src/test/run-pass/import-in-block.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { use std::mem::replace; let mut x = 5; diff --git a/src/test/run-pass/import-trailing-comma.rs b/src/test/run-pass/import-trailing-comma.rs index b46f81479bf04..c47448536223c 100644 --- a/src/test/run-pass/import-trailing-comma.rs +++ b/src/test/run-pass/import-trailing-comma.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use foo::bar::{baz, quux,}; mod foo { diff --git a/src/test/run-pass/inconsistent-lifetime-mismatch.rs b/src/test/run-pass/inconsistent-lifetime-mismatch.rs index d87b59537df8f..9a0d8e201c243 100644 --- a/src/test/run-pass/inconsistent-lifetime-mismatch.rs +++ b/src/test/run-pass/inconsistent-lifetime-mismatch.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(_: &[&str]) {} fn bad(a: &str, b: &str) { diff --git a/src/test/run-pass/infer-container-across-object-cast.rs b/src/test/run-pass/infer-container-across-object-cast.rs index 979e76b1ff994..7347ded99e7c4 100644 --- a/src/test/run-pass/infer-container-across-object-cast.rs +++ b/src/test/run-pass/infer-container-across-object-cast.rs @@ -11,6 +11,8 @@ // Given ` as Box`, we should be able to infer that a // `Box<_>` is the expected type. +// pretty-expanded FIXME #23616 + trait Foo { fn foo(&self) -> u32; } impl Foo for u32 { fn foo(&self) -> u32 { *self } } diff --git a/src/test/run-pass/infer-fn-tail-expr.rs b/src/test/run-pass/infer-fn-tail-expr.rs index f240a5e6de55f..c599f2249996a 100644 --- a/src/test/run-pass/infer-fn-tail-expr.rs +++ b/src/test/run-pass/infer-fn-tail-expr.rs @@ -11,6 +11,8 @@ // issue #680 +// pretty-expanded FIXME #23616 + fn f() -> Vec { Vec::new() } pub fn main() { } diff --git a/src/test/run-pass/inferred-suffix-in-pattern-range.rs b/src/test/run-pass/inferred-suffix-in-pattern-range.rs index be561dfffa6f9..fcbd4b332318e 100644 --- a/src/test/run-pass/inferred-suffix-in-pattern-range.rs +++ b/src/test/run-pass/inferred-suffix-in-pattern-range.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = 2; let x_message = match x { diff --git a/src/test/run-pass/inherent-trait-method-order.rs b/src/test/run-pass/inherent-trait-method-order.rs index 9674c86b379a5..042268435c7af 100644 --- a/src/test/run-pass/inherent-trait-method-order.rs +++ b/src/test/run-pass/inherent-trait-method-order.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo; impl Foo { diff --git a/src/test/run-pass/init-large-type.rs b/src/test/run-pass/init-large-type.rs index 76927858ea11a..ca4dba4198c03 100644 --- a/src/test/run-pass/init-large-type.rs +++ b/src/test/run-pass/init-large-type.rs @@ -12,6 +12,8 @@ // Doing it incorrectly causes massive slowdown in LLVM during // optimisation. +// pretty-expanded FIXME #23616 + #![feature(intrinsics, std_misc)] use std::thread::Thread; diff --git a/src/test/run-pass/init-res-into-things.rs b/src/test/run-pass/init-res-into-things.rs index 4ee06d44e6565..3d1fff7b5f0c3 100644 --- a/src/test/run-pass/init-res-into-things.rs +++ b/src/test/run-pass/init-res-into-things.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(unsafe_destructor)] diff --git a/src/test/run-pass/inner-attrs-on-impl.rs b/src/test/run-pass/inner-attrs-on-impl.rs index afb2b21b04ffa..a807e582ff464 100644 --- a/src/test/run-pass/inner-attrs-on-impl.rs +++ b/src/test/run-pass/inner-attrs-on-impl.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo; impl Foo { diff --git a/src/test/run-pass/inner-static.rs b/src/test/run-pass/inner-static.rs index e4026a8fd0118..48f2006ed59ba 100644 --- a/src/test/run-pass/inner-static.rs +++ b/src/test/run-pass/inner-static.rs @@ -10,6 +10,8 @@ // aux-build:inner_static.rs +// pretty-expanded FIXME #23616 + extern crate inner_static; pub fn main() { diff --git a/src/test/run-pass/instantiable.rs b/src/test/run-pass/instantiable.rs index 35897d5b823f1..e4a3f2c8d1d4b 100644 --- a/src/test/run-pass/instantiable.rs +++ b/src/test/run-pass/instantiable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ptr; // check that we do not report a type like this as uninstantiable, diff --git a/src/test/run-pass/int.rs b/src/test/run-pass/int.rs index 169be05428204..09d6501267d70 100644 --- a/src/test/run-pass/int.rs +++ b/src/test/run-pass/int.rs @@ -11,4 +11,6 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let _x: int = 10; } diff --git a/src/test/run-pass/integer-literal-radix.rs b/src/test/run-pass/integer-literal-radix.rs index ea8825d22dffd..b782925fa9357 100644 --- a/src/test/run-pass/integer-literal-radix.rs +++ b/src/test/run-pass/integer-literal-radix.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let a = 0xBEEF_isize; let b = 0o755_isize; diff --git a/src/test/run-pass/integer-literal-suffix-inference-2.rs b/src/test/run-pass/integer-literal-suffix-inference-2.rs index 77e7ee6264319..e953cf2fda1af 100644 --- a/src/test/run-pass/integer-literal-suffix-inference-2.rs +++ b/src/test/run-pass/integer-literal-suffix-inference-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(_: *const ()) {} fn main() { diff --git a/src/test/run-pass/integer-literal-suffix-inference.rs b/src/test/run-pass/integer-literal-suffix-inference.rs index 542efe334597f..35da4b8a9364b 100644 --- a/src/test/run-pass/integer-literal-suffix-inference.rs +++ b/src/test/run-pass/integer-literal-suffix-inference.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { fn id_i8(n: i8) -> i8 { n } fn id_i16(n: i16) -> i16 { n } diff --git a/src/test/run-pass/into-iterator-type-inference-shift.rs b/src/test/run-pass/into-iterator-type-inference-shift.rs index a9aa5955d3d12..5bf8a4bc8f707 100644 --- a/src/test/run-pass/into-iterator-type-inference-shift.rs +++ b/src/test/run-pass/into-iterator-type-inference-shift.rs @@ -13,6 +13,8 @@ // propagation yet, and so we just saw a type variable, yielding an // error. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::u8; diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs index d111462ed5a31..c970b17d2a1d4 100644 --- a/src/test/run-pass/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsic-alignment.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(intrinsics, main)] mod rusti { diff --git a/src/test/run-pass/intrinsic-assume.rs b/src/test/run-pass/intrinsic-assume.rs index 638b2e434a5ff..fc886d7e30165 100644 --- a/src/test/run-pass/intrinsic-assume.rs +++ b/src/test/run-pass/intrinsic-assume.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::intrinsics::assume; diff --git a/src/test/run-pass/intrinsic-atomics-cc.rs b/src/test/run-pass/intrinsic-atomics-cc.rs index e6a81dbe5d95f..c5fe02b9190d4 100644 --- a/src/test/run-pass/intrinsic-atomics-cc.rs +++ b/src/test/run-pass/intrinsic-atomics-cc.rs @@ -10,6 +10,8 @@ // aux-build:cci_intrinsic.rs +// pretty-expanded FIXME #23616 + extern crate cci_intrinsic; use cci_intrinsic::atomic_xchg; diff --git a/src/test/run-pass/intrinsic-atomics.rs b/src/test/run-pass/intrinsic-atomics.rs index 1d7a74b042fac..61a9f6109a3e8 100644 --- a/src/test/run-pass/intrinsic-atomics.rs +++ b/src/test/run-pass/intrinsic-atomics.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(intrinsics)] diff --git a/src/test/run-pass/intrinsic-move-val.rs b/src/test/run-pass/intrinsic-move-val.rs index 09dd5304ec5c2..89aea93e7b35a 100644 --- a/src/test/run-pass/intrinsic-move-val.rs +++ b/src/test/run-pass/intrinsic-move-val.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(intrinsics)] diff --git a/src/test/run-pass/intrinsic-return-address.rs b/src/test/run-pass/intrinsic-return-address.rs index 99578abed38e7..ff6346943dbcd 100644 --- a/src/test/run-pass/intrinsic-return-address.rs +++ b/src/test/run-pass/intrinsic-return-address.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(intrinsics)] use std::ptr; diff --git a/src/test/run-pass/intrinsic-uninit.rs b/src/test/run-pass/intrinsic-uninit.rs index 34fd8effd4912..834455d560e42 100644 --- a/src/test/run-pass/intrinsic-uninit.rs +++ b/src/test/run-pass/intrinsic-uninit.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(intrinsics)] mod rusti { diff --git a/src/test/run-pass/intrinsic-unreachable.rs b/src/test/run-pass/intrinsic-unreachable.rs index ea9648a3e699a..c095ad1a070df 100644 --- a/src/test/run-pass/intrinsic-unreachable.rs +++ b/src/test/run-pass/intrinsic-unreachable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::intrinsics; diff --git a/src/test/run-pass/intrinsics-integer.rs b/src/test/run-pass/intrinsics-integer.rs index e5724c1e0dc16..a4661410ad6c0 100644 --- a/src/test/run-pass/intrinsics-integer.rs +++ b/src/test/run-pass/intrinsics-integer.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(intrinsics)] mod rusti { diff --git a/src/test/run-pass/intrinsics-math.rs b/src/test/run-pass/intrinsics-math.rs index 4ca6b0258032d..841ff297a2ac7 100644 --- a/src/test/run-pass/intrinsics-math.rs +++ b/src/test/run-pass/intrinsics-math.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(intrinsics, core)] macro_rules! assert_approx_eq { diff --git a/src/test/run-pass/invoke-external-foreign.rs b/src/test/run-pass/invoke-external-foreign.rs index ef5ef2f215cc2..1aae8131d8008 100644 --- a/src/test/run-pass/invoke-external-foreign.rs +++ b/src/test/run-pass/invoke-external-foreign.rs @@ -14,6 +14,8 @@ // successfully (and safely) invoke external, cdecl // functions from outside the crate. +// pretty-expanded FIXME #23616 + extern crate foreign_lib; pub fn main() { diff --git a/src/test/run-pass/irrefutable-unit.rs b/src/test/run-pass/irrefutable-unit.rs index 51adeea394ca9..0c2fbb01f48f4 100644 --- a/src/test/run-pass/irrefutable-unit.rs +++ b/src/test/run-pass/irrefutable-unit.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let ((),()) = ((),()); } diff --git a/src/test/run-pass/issue-10025.rs b/src/test/run-pass/issue-10025.rs index 8f494ea81fcb3..1ca2476a1013b 100644 --- a/src/test/run-pass/issue-10025.rs +++ b/src/test/run-pass/issue-10025.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + unsafe extern fn foo() {} unsafe extern "C" fn bar() {} diff --git a/src/test/run-pass/issue-10028.rs b/src/test/run-pass/issue-10028.rs index 826c23a782bf1..fdaa71d1cfb4c 100644 --- a/src/test/run-pass/issue-10028.rs +++ b/src/test/run-pass/issue-10028.rs @@ -10,6 +10,8 @@ // aux-build:issue-10028.rs +// pretty-expanded FIXME #23616 + extern crate "issue-10028" as issue10028; use issue10028::ZeroLengthThingWithDestructor; diff --git a/src/test/run-pass/issue-10031.rs b/src/test/run-pass/issue-10031.rs index a94ed4ed5b90a..4dc1487b9af94 100644 --- a/src/test/run-pass/issue-10031.rs +++ b/src/test/run-pass/issue-10031.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:issue_10031_aux.rs +// pretty-expanded FIXME #23616 + extern crate issue_10031_aux; pub fn main() { diff --git a/src/test/run-pass/issue-10228.rs b/src/test/run-pass/issue-10228.rs index 52b6677428727..b5c97bd10edfe 100644 --- a/src/test/run-pass/issue-10228.rs +++ b/src/test/run-pass/issue-10228.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum StdioContainer { CreatePipe(bool) } diff --git a/src/test/run-pass/issue-10392.rs b/src/test/run-pass/issue-10392.rs index 1aa9c96de1a94..29c5a8208baec 100644 --- a/src/test/run-pass/issue-10392.rs +++ b/src/test/run-pass/issue-10392.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A { foo: int } struct B { a: int, b: int, c: int } diff --git a/src/test/run-pass/issue-10456.rs b/src/test/run-pass/issue-10456.rs index da73c4b27ac44..10b4162305432 100644 --- a/src/test/run-pass/issue-10456.rs +++ b/src/test/run-pass/issue-10456.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct Foo; pub trait Bar { diff --git a/src/test/run-pass/issue-10638.rs b/src/test/run-pass/issue-10638.rs index bc77b4c534311..379bdffbbb22f 100644 --- a/src/test/run-pass/issue-10638.rs +++ b/src/test/run-pass/issue-10638.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { //// I am not a doc comment! ////////////////// still not a doc comment diff --git a/src/test/run-pass/issue-10682.rs b/src/test/run-pass/issue-10682.rs index 883e52b61d081..ba003c0b1ba73 100644 --- a/src/test/run-pass/issue-10682.rs +++ b/src/test/run-pass/issue-10682.rs @@ -11,6 +11,8 @@ // Regression test for issue #10682 // Nested `proc` usage can't use outer owned data +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-10683.rs b/src/test/run-pass/issue-10683.rs index a01d2e6f1a9ed..eb2177202a22b 100644 --- a/src/test/run-pass/issue-10683.rs +++ b/src/test/run-pass/issue-10683.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ascii::AsciiExt; static NAME: &'static str = "hello world"; diff --git a/src/test/run-pass/issue-10714.rs b/src/test/run-pass/issue-10714.rs index 90e87f96f7899..795ad8fb35b82 100644 --- a/src/test/run-pass/issue-10714.rs +++ b/src/test/run-pass/issue-10714.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum v {} pub fn main() { let y: v = unsafe { ::std::mem::uninitialized() }; diff --git a/src/test/run-pass/issue-10718.rs b/src/test/run-pass/issue-10718.rs index c3ec3fc40e30a..0a6e454e181a4 100644 --- a/src/test/run-pass/issue-10718.rs +++ b/src/test/run-pass/issue-10718.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn f(p: F) { diff --git a/src/test/run-pass/issue-10734.rs b/src/test/run-pass/issue-10734.rs index a6af2327c9e80..27773a42abb4b 100644 --- a/src/test/run-pass/issue-10734.rs +++ b/src/test/run-pass/issue-10734.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_no_drop_flag)] static mut drop_count: uint = 0; diff --git a/src/test/run-pass/issue-10763.rs b/src/test/run-pass/issue-10763.rs index 92ea6026ff66c..3789b93ad76c9 100644 --- a/src/test/run-pass/issue-10763.rs +++ b/src/test/run-pass/issue-10763.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern "Rust" fn foo() {} fn main() {} diff --git a/src/test/run-pass/issue-10764.rs b/src/test/run-pass/issue-10764.rs index f824b5fd4dcd8..cfabf699fa278 100644 --- a/src/test/run-pass/issue-10764.rs +++ b/src/test/run-pass/issue-10764.rs @@ -8,4 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + extern "Rust" fn main() {} diff --git a/src/test/run-pass/issue-10767.rs b/src/test/run-pass/issue-10767.rs index c717053cffc74..9d680d1962f8f 100644 --- a/src/test/run-pass/issue-10767.rs +++ b/src/test/run-pass/issue-10767.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-10802.rs b/src/test/run-pass/issue-10802.rs index 48ea00e47d696..bb322635094e5 100644 --- a/src/test/run-pass/issue-10802.rs +++ b/src/test/run-pass/issue-10802.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-10806.rs b/src/test/run-pass/issue-10806.rs index 69a23e8099076..5b8828cf0b550 100644 --- a/src/test/run-pass/issue-10806.rs +++ b/src/test/run-pass/issue-10806.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn foo() -> int { 3 } diff --git a/src/test/run-pass/issue-10853.rs b/src/test/run-pass/issue-10853.rs index 1717075885d7a..2e6d278037902 100644 --- a/src/test/run-pass/issue-10853.rs +++ b/src/test/run-pass/issue-10853.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![deny(missing_docs)] #![doc="module"] diff --git a/src/test/run-pass/issue-10902.rs b/src/test/run-pass/issue-10902.rs index 7fab6662ee01c..9f0417a8be9ba 100644 --- a/src/test/run-pass/issue-10902.rs +++ b/src/test/run-pass/issue-10902.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub mod two_tuple { pub trait T { fn dummy(&self) { } } pub struct P<'a>(&'a (T + 'a), &'a (T + 'a)); diff --git a/src/test/run-pass/issue-11085.rs b/src/test/run-pass/issue-11085.rs index 9440e0c2874a0..4009d2a7d313f 100644 --- a/src/test/run-pass/issue-11085.rs +++ b/src/test/run-pass/issue-11085.rs @@ -10,6 +10,8 @@ // compile-flags: --cfg foo +// pretty-expanded FIXME #23616 + struct Foo { #[cfg(fail)] bar: baz, diff --git a/src/test/run-pass/issue-1112.rs b/src/test/run-pass/issue-1112.rs index 2ade0df7f6b68..b3187d889a1c4 100644 --- a/src/test/run-pass/issue-1112.rs +++ b/src/test/run-pass/issue-1112.rs @@ -11,6 +11,8 @@ // Issue #1112 // Alignment of interior pointers to dynamic-size types +// pretty-expanded FIXME #23616 + struct X { a: T, b: u8, diff --git a/src/test/run-pass/issue-11205.rs b/src/test/run-pass/issue-11205.rs index c67ce92ee0a9a..70bec062d17a5 100644 --- a/src/test/run-pass/issue-11205.rs +++ b/src/test/run-pass/issue-11205.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. diff --git a/src/test/run-pass/issue-11224.rs b/src/test/run-pass/issue-11224.rs index 02c82d9c9474b..f226e25eaa461 100644 --- a/src/test/run-pass/issue-11224.rs +++ b/src/test/run-pass/issue-11224.rs @@ -10,6 +10,8 @@ // aux-build:issue-11224.rs +// pretty-expanded FIXME #23616 + extern crate "issue-11224" as unused; pub fn main() {} diff --git a/src/test/run-pass/issue-11225-1.rs b/src/test/run-pass/issue-11225-1.rs index a45d129ade2f9..e960558e52c8c 100644 --- a/src/test/run-pass/issue-11225-1.rs +++ b/src/test/run-pass/issue-11225-1.rs @@ -10,6 +10,8 @@ // aux-build:issue-11225-1.rs +// pretty-expanded FIXME #23616 + extern crate "issue-11225-1" as foo; pub fn main() { diff --git a/src/test/run-pass/issue-11225-2.rs b/src/test/run-pass/issue-11225-2.rs index f07957b30ec9f..56144edb5c744 100644 --- a/src/test/run-pass/issue-11225-2.rs +++ b/src/test/run-pass/issue-11225-2.rs @@ -10,6 +10,8 @@ // aux-build:issue-11225-2.rs +// pretty-expanded FIXME #23616 + extern crate "issue-11225-2" as foo; pub fn main() { diff --git a/src/test/run-pass/issue-11384.rs b/src/test/run-pass/issue-11384.rs index 26634fabf5a15..5b4bd6c9f2bfc 100644 --- a/src/test/run-pass/issue-11384.rs +++ b/src/test/run-pass/issue-11384.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Common { fn dummy(&self) { } } impl<'t, T> Common for (T, &'t T) {} diff --git a/src/test/run-pass/issue-11529.rs b/src/test/run-pass/issue-11529.rs index 4a74e4be4ce57..535fc3669911a 100644 --- a/src/test/run-pass/issue-11529.rs +++ b/src/test/run-pass/issue-11529.rs @@ -10,6 +10,8 @@ // aux-build:issue-11529.rs +// pretty-expanded FIXME #23616 + extern crate "issue-11529" as a; fn main() { diff --git a/src/test/run-pass/issue-11552.rs b/src/test/run-pass/issue-11552.rs index b99a5b7ab37c5..bf5ad945b9f43 100644 --- a/src/test/run-pass/issue-11552.rs +++ b/src/test/run-pass/issue-11552.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-11577.rs b/src/test/run-pass/issue-11577.rs index 687de48474058..06d5b66b3e850 100644 --- a/src/test/run-pass/issue-11577.rs +++ b/src/test/run-pass/issue-11577.rs @@ -1,3 +1,5 @@ +// pretty-expanded FIXME #23616 + // Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. diff --git a/src/test/run-pass/issue-11612.rs b/src/test/run-pass/issue-11612.rs index 3c69377b375c6..de1b0525d8497 100644 --- a/src/test/run-pass/issue-11612.rs +++ b/src/test/run-pass/issue-11612.rs @@ -12,6 +12,8 @@ // We weren't updating the auto adjustments with all the resolved // type information after type check. +// pretty-expanded FIXME #23616 + trait A { fn dummy(&self) { } } struct B<'a, T:'a> { diff --git a/src/test/run-pass/issue-11677.rs b/src/test/run-pass/issue-11677.rs index 4b2b3e8702427..1edd1d137a929 100644 --- a/src/test/run-pass/issue-11677.rs +++ b/src/test/run-pass/issue-11677.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] // this code used to cause an ICE diff --git a/src/test/run-pass/issue-11736.rs b/src/test/run-pass/issue-11736.rs index 87d5bf8ed0a32..72cc8d470d054 100644 --- a/src/test/run-pass/issue-11736.rs +++ b/src/test/run-pass/issue-11736.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/issue-11820.rs b/src/test/run-pass/issue-11820.rs index f7aaf4953774a..6d2243db30070 100644 --- a/src/test/run-pass/issue-11820.rs +++ b/src/test/run-pass/issue-11820.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct NoClone; fn main() { diff --git a/src/test/run-pass/issue-11869.rs b/src/test/run-pass/issue-11869.rs index 12a6d9a82c7b0..8a9b3e4b1434e 100644 --- a/src/test/run-pass/issue-11869.rs +++ b/src/test/run-pass/issue-11869.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A { a: String } diff --git a/src/test/run-pass/issue-11881.rs b/src/test/run-pass/issue-11881.rs index 15c652591077e..4044468c3fe7c 100644 --- a/src/test/run-pass/issue-11881.rs +++ b/src/test/run-pass/issue-11881.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_orphan_check, rustc_private, old_io)] extern crate rbml; diff --git a/src/test/run-pass/issue-11940.rs b/src/test/run-pass/issue-11940.rs index 1540679b099b4..8732def0a1a11 100644 --- a/src/test/run-pass/issue-11940.rs +++ b/src/test/run-pass/issue-11940.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const TEST_STR: &'static str = "abcd"; fn main() { diff --git a/src/test/run-pass/issue-11958.rs b/src/test/run-pass/issue-11958.rs index f3c6da7cfe430..ed2009dab1baf 100644 --- a/src/test/run-pass/issue-11958.rs +++ b/src/test/run-pass/issue-11958.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![forbid(warnings)] #![feature(std_misc)] diff --git a/src/test/run-pass/issue-12133-1.rs b/src/test/run-pass/issue-12133-1.rs index bf5976e9217f2..7e5b0c2230141 100644 --- a/src/test/run-pass/issue-12133-1.rs +++ b/src/test/run-pass/issue-12133-1.rs @@ -11,6 +11,8 @@ // aux-build:issue-12133-rlib.rs // aux-build:issue-12133-dylib.rs +// pretty-expanded FIXME #23616 + extern crate "issue-12133-rlib" as a; extern crate "issue-12133-dylib" as b; diff --git a/src/test/run-pass/issue-12133-2.rs b/src/test/run-pass/issue-12133-2.rs index 50977a7e039e4..76bae09bd4942 100644 --- a/src/test/run-pass/issue-12133-2.rs +++ b/src/test/run-pass/issue-12133-2.rs @@ -12,6 +12,8 @@ // aux-build:issue-12133-dylib.rs // no-prefer-dynamic +// pretty-expanded FIXME #23616 + extern crate "issue-12133-rlib" as a; extern crate "issue-12133-dylib" as b; diff --git a/src/test/run-pass/issue-12133-3.rs b/src/test/run-pass/issue-12133-3.rs index ab990e55295aa..514cfeab6af1a 100644 --- a/src/test/run-pass/issue-12133-3.rs +++ b/src/test/run-pass/issue-12133-3.rs @@ -12,6 +12,8 @@ // aux-build:issue-12133-dylib.rs // aux-build:issue-12133-dylib2.rs +// pretty-expanded FIXME #23616 + extern crate "issue-12133-dylib2" as other; fn main() {} diff --git a/src/test/run-pass/issue-12285.rs b/src/test/run-pass/issue-12285.rs index 563771212aa3d..3a5b7e86920d7 100644 --- a/src/test/run-pass/issue-12285.rs +++ b/src/test/run-pass/issue-12285.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct S; fn main() { diff --git a/src/test/run-pass/issue-1251.rs b/src/test/run-pass/issue-1251.rs index d5f8200007f7a..ddd30ed3bb0c0 100644 --- a/src/test/run-pass/issue-1251.rs +++ b/src/test/run-pass/issue-1251.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] #![crate_id="rust_get_test_int"] diff --git a/src/test/run-pass/issue-1257.rs b/src/test/run-pass/issue-1257.rs index 7d5bd9d6a74db..44ebe362c729d 100644 --- a/src/test/run-pass/issue-1257.rs +++ b/src/test/run-pass/issue-1257.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main () { let mut line = "".to_string(); let mut i = 0; diff --git a/src/test/run-pass/issue-12612.rs b/src/test/run-pass/issue-12612.rs index 9ceb7366e403d..8a23e43d59ed0 100644 --- a/src/test/run-pass/issue-12612.rs +++ b/src/test/run-pass/issue-12612.rs @@ -11,6 +11,8 @@ // aux-build:issue-12612-1.rs // aux-build:issue-12612-2.rs +// pretty-expanded FIXME #23616 + extern crate "issue-12612-1" as foo; extern crate "issue-12612-2" as bar; diff --git a/src/test/run-pass/issue-12660.rs b/src/test/run-pass/issue-12660.rs index 6b3fa587bc55b..331f9d991d681 100644 --- a/src/test/run-pass/issue-12660.rs +++ b/src/test/run-pass/issue-12660.rs @@ -10,6 +10,8 @@ // aux-build:issue-12660-aux.rs +// pretty-expanded FIXME #23616 + extern crate issue12660aux; use issue12660aux::{my_fn, MyStruct}; diff --git a/src/test/run-pass/issue-12677.rs b/src/test/run-pass/issue-12677.rs index ef68daa8ce592..493bdb30e35bc 100644 --- a/src/test/run-pass/issue-12677.rs +++ b/src/test/run-pass/issue-12677.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let s = "Hello"; let first = s.bytes(); diff --git a/src/test/run-pass/issue-12684.rs b/src/test/run-pass/issue-12684.rs index 51268969d4221..2b89915516469 100644 --- a/src/test/run-pass/issue-12684.rs +++ b/src/test/run-pass/issue-12684.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io, std_misc)] use std::time::Duration; diff --git a/src/test/run-pass/issue-12699.rs b/src/test/run-pass/issue-12699.rs index 4ff17f297d7e6..ac5a9b728b992 100644 --- a/src/test/run-pass/issue-12699.rs +++ b/src/test/run-pass/issue-12699.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io, std_misc)] use std::old_io::timer; diff --git a/src/test/run-pass/issue-12729.rs b/src/test/run-pass/issue-12729.rs index 9bf4c94d7e397..1852ed212862f 100644 --- a/src/test/run-pass/issue-12729.rs +++ b/src/test/run-pass/issue-12729.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct Foo; mod bar { diff --git a/src/test/run-pass/issue-12860.rs b/src/test/run-pass/issue-12860.rs index 7f26d4d371334..6b66c640b6b5d 100644 --- a/src/test/run-pass/issue-12860.rs +++ b/src/test/run-pass/issue-12860.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/issue-12909.rs b/src/test/run-pass/issue-12909.rs index 11a2e52cf9767..dd541ff948c9d 100644 --- a/src/test/run-pass/issue-12909.rs +++ b/src/test/run-pass/issue-12909.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::collections::HashMap; fn copy(&x: &T) -> T { diff --git a/src/test/run-pass/issue-13105.rs b/src/test/run-pass/issue-13105.rs index 3886971a4696e..14de9e90306bc 100644 --- a/src/test/run-pass/issue-13105.rs +++ b/src/test/run-pass/issue-13105.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/run-pass/issue-13167.rs b/src/test/run-pass/issue-13167.rs index 21b54ba0e793b..304d029742464 100644 --- a/src/test/run-pass/issue-13167.rs +++ b/src/test/run-pass/issue-13167.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::slice; pub struct PhfMapEntries<'a, T: 'a> { diff --git a/src/test/run-pass/issue-13204.rs b/src/test/run-pass/issue-13204.rs index c29dc4319dc0c..904b8feb884b9 100644 --- a/src/test/run-pass/issue-13204.rs +++ b/src/test/run-pass/issue-13204.rs @@ -11,6 +11,8 @@ // Test that when instantiating trait default methods, typeck handles // lifetime parameters defined on the method bound correctly. +// pretty-expanded FIXME #23616 + pub trait Foo { fn bar<'a, I: Iterator>(&self, it: I) -> uint { let mut xs = it.filter(|_| true); diff --git a/src/test/run-pass/issue-13214.rs b/src/test/run-pass/issue-13214.rs index 191e9ce8b6feb..7a3d3f4ff485a 100644 --- a/src/test/run-pass/issue-13214.rs +++ b/src/test/run-pass/issue-13214.rs @@ -11,6 +11,8 @@ // defining static with struct that contains enum // with &'static str variant used to cause ICE +// pretty-expanded FIXME #23616 + pub enum Foo { Bar, Baz(&'static str), diff --git a/src/test/run-pass/issue-13259-windows-tcb-trash.rs b/src/test/run-pass/issue-13259-windows-tcb-trash.rs index 5c5282da06b8b..34960b264567d 100644 --- a/src/test/run-pass/issue-13259-windows-tcb-trash.rs +++ b/src/test/run-pass/issue-13259-windows-tcb-trash.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/issue-13264.rs b/src/test/run-pass/issue-13264.rs index 3c76a827fb295..07da2b286c27b 100644 --- a/src/test/run-pass/issue-13264.rs +++ b/src/test/run-pass/issue-13264.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ops::Deref; struct Root { diff --git a/src/test/run-pass/issue-13323.rs b/src/test/run-pass/issue-13323.rs index 44167ad2096de..90d16aaf145af 100644 --- a/src/test/run-pass/issue-13323.rs +++ b/src/test/run-pass/issue-13323.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-13352.rs b/src/test/run-pass/issue-13352.rs index aed0022d9fa44..af31fee048c6a 100644 --- a/src/test/run-pass/issue-13352.rs +++ b/src/test/run-pass/issue-13352.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc, libc)] extern crate libc; diff --git a/src/test/run-pass/issue-13405.rs b/src/test/run-pass/issue-13405.rs index 05943943d9533..d1a24e4a450d5 100644 --- a/src/test/run-pass/issue-13405.rs +++ b/src/test/run-pass/issue-13405.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo<'a> { i: &'a bool, j: Option<&'a int>, diff --git a/src/test/run-pass/issue-13494.rs b/src/test/run-pass/issue-13494.rs index 7692a31315be9..3fa9f66c9e3cc 100644 --- a/src/test/run-pass/issue-13494.rs +++ b/src/test/run-pass/issue-13494.rs @@ -11,6 +11,8 @@ // This test may not always fail, but it can be flaky if the race it used to // expose is still present. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::sync::mpsc::{channel, Sender, Receiver}; diff --git a/src/test/run-pass/issue-13507-2.rs b/src/test/run-pass/issue-13507-2.rs index 61ef98357524f..0b35ccf26f3f7 100644 --- a/src/test/run-pass/issue-13507-2.rs +++ b/src/test/run-pass/issue-13507-2.rs @@ -10,6 +10,8 @@ // aux-build:issue13507.rs +// pretty-expanded FIXME #23616 + #![feature(core)] extern crate issue13507; diff --git a/src/test/run-pass/issue-13620.rs b/src/test/run-pass/issue-13620.rs index c67dd4b93a048..8ed8426b8f5da 100644 --- a/src/test/run-pass/issue-13620.rs +++ b/src/test/run-pass/issue-13620.rs @@ -11,6 +11,8 @@ // aux-build:issue-13620-1.rs // aux-build:issue-13620-2.rs +// pretty-expanded FIXME #23616 + extern crate "issue-13620-2" as crate2; fn main() { diff --git a/src/test/run-pass/issue-13665.rs b/src/test/run-pass/issue-13665.rs index 5ccbe9a7980e8..f4902c8e0ac38 100644 --- a/src/test/run-pass/issue-13665.rs +++ b/src/test/run-pass/issue-13665.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo<'r>() { let maybe_value_ref: Option<&'r u8> = None; diff --git a/src/test/run-pass/issue-13703.rs b/src/test/run-pass/issue-13703.rs index c9c78f6408bac..fd482b370489f 100644 --- a/src/test/run-pass/issue-13703.rs +++ b/src/test/run-pass/issue-13703.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct Foo<'a, 'b: 'a> { foo: &'a &'b int } pub fn foo<'a, 'b>(x: Foo<'a, 'b>, _o: Option<& & ()>) { let _y = x.foo; } fn main() {} diff --git a/src/test/run-pass/issue-13763.rs b/src/test/run-pass/issue-13763.rs index 3f4ade08d9280..c8bf74c5d9b45 100644 --- a/src/test/run-pass/issue-13763.rs +++ b/src/test/run-pass/issue-13763.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::u8; diff --git a/src/test/run-pass/issue-13775.rs b/src/test/run-pass/issue-13775.rs index 8731662afa307..38ecab67372d0 100644 --- a/src/test/run-pass/issue-13775.rs +++ b/src/test/run-pass/issue-13775.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn bar(&self, int) {} } diff --git a/src/test/run-pass/issue-13808.rs b/src/test/run-pass/issue-13808.rs index 96e2a0dc48539..c85c0117581a5 100644 --- a/src/test/run-pass/issue-13808.rs +++ b/src/test/run-pass/issue-13808.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo<'a> { listener: Box, } diff --git a/src/test/run-pass/issue-13837.rs b/src/test/run-pass/issue-13837.rs index c6847ce55dec2..cd6711df7f335 100644 --- a/src/test/run-pass/issue-13837.rs +++ b/src/test/run-pass/issue-13837.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct TestStruct { x: *const [int; 2] } diff --git a/src/test/run-pass/issue-13867.rs b/src/test/run-pass/issue-13867.rs index 960884c4aa501..8a2e1585da683 100644 --- a/src/test/run-pass/issue-13867.rs +++ b/src/test/run-pass/issue-13867.rs @@ -11,6 +11,8 @@ // Test that codegen works correctly when there are multiple refutable // patterns in match expression. +// pretty-expanded FIXME #23616 + enum Foo { FooUint(uint), FooNullary, diff --git a/src/test/run-pass/issue-13872.rs b/src/test/run-pass/issue-13872.rs index a58477e647f3a..66cf37eb61fc5 100644 --- a/src/test/run-pass/issue-13872.rs +++ b/src/test/run-pass/issue-13872.rs @@ -12,6 +12,8 @@ // aux-build:issue-13872-2.rs // aux-build:issue-13872-3.rs +// pretty-expanded FIXME #23616 + extern crate "issue-13872-3" as other; fn main() { diff --git a/src/test/run-pass/issue-14082.rs b/src/test/run-pass/issue-14082.rs index dd9a7c97c9ab5..d159d55c77c56 100644 --- a/src/test/run-pass/issue-14082.rs +++ b/src/test/run-pass/issue-14082.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_imports, dead_code)] use foo::Foo; diff --git a/src/test/run-pass/issue-14254.rs b/src/test/run-pass/issue-14254.rs index ad4ed03e6e2c8..849d7e249a8df 100644 --- a/src/test/run-pass/issue-14254.rs +++ b/src/test/run-pass/issue-14254.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn bar(&self); fn baz(&self) { } diff --git a/src/test/run-pass/issue-14308.rs b/src/test/run-pass/issue-14308.rs index 0e4b4a2c9cf32..fd311a1e9b562 100644 --- a/src/test/run-pass/issue-14308.rs +++ b/src/test/run-pass/issue-14308.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A(int); struct B; diff --git a/src/test/run-pass/issue-14330.rs b/src/test/run-pass/issue-14330.rs index f983f233ee356..48c4aed50f4b1 100644 --- a/src/test/run-pass/issue-14330.rs +++ b/src/test/run-pass/issue-14330.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[macro_use] extern crate "std" as std2; fn main() {} diff --git a/src/test/run-pass/issue-14393.rs b/src/test/run-pass/issue-14393.rs index 6c9c7e2fd3f14..88af65074951d 100644 --- a/src/test/run-pass/issue-14393.rs +++ b/src/test/run-pass/issue-14393.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { match ("", 1_usize) { (_, 42_usize) => (), diff --git a/src/test/run-pass/issue-14399.rs b/src/test/run-pass/issue-14399.rs index d413e323a0999..aa91f125e48e2 100644 --- a/src/test/run-pass/issue-14399.rs +++ b/src/test/run-pass/issue-14399.rs @@ -13,6 +13,8 @@ // value was coerced to a trait object. (v.clone() returns Box // which is coerced to Box). +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-14421.rs b/src/test/run-pass/issue-14421.rs index 4bdf5a31c713b..e6425f7cb7a02 100644 --- a/src/test/run-pass/issue-14421.rs +++ b/src/test/run-pass/issue-14421.rs @@ -10,6 +10,8 @@ // aux-build:issue-14421.rs +// pretty-expanded FIXME #23616 + extern crate "issue-14421" as bug_lib; use bug_lib::B; diff --git a/src/test/run-pass/issue-14422.rs b/src/test/run-pass/issue-14422.rs index 439998c597d93..d3f1858c36324 100644 --- a/src/test/run-pass/issue-14422.rs +++ b/src/test/run-pass/issue-14422.rs @@ -10,6 +10,8 @@ // aux-build:issue-14422.rs +// pretty-expanded FIXME #23616 + extern crate "issue-14422" as bug_lib; use bug_lib::B; diff --git a/src/test/run-pass/issue-14456.rs b/src/test/run-pass/issue-14456.rs index ba769c2594a85..f897b00ceffef 100644 --- a/src/test/run-pass/issue-14456.rs +++ b/src/test/run-pass/issue-14456.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(io, process_capture)] use std::env; diff --git a/src/test/run-pass/issue-1451.rs b/src/test/run-pass/issue-1451.rs index 027826e99cb1f..1cbe986e88af0 100644 --- a/src/test/run-pass/issue-1451.rs +++ b/src/test/run-pass/issue-1451.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_variable)] struct T { f: extern "Rust" fn() } diff --git a/src/test/run-pass/issue-14589.rs b/src/test/run-pass/issue-14589.rs index 5924aa44d4d63..7392c7a75d153 100644 --- a/src/test/run-pass/issue-14589.rs +++ b/src/test/run-pass/issue-14589.rs @@ -13,6 +13,8 @@ // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. +// pretty-expanded FIXME #23616 + fn main() { send::>(Box::new(Output(0))); Test::>::foo(Box::new(Output(0))); diff --git a/src/test/run-pass/issue-1460.rs b/src/test/run-pass/issue-1460.rs index 44465fe5f80ee..6d2d02d2b8b63 100644 --- a/src/test/run-pass/issue-1460.rs +++ b/src/test/run-pass/issue-1460.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { {|i| if 1 == i { }}; } diff --git a/src/test/run-pass/issue-14837.rs b/src/test/run-pass/issue-14837.rs index 1155027d426da..92cb30068de67 100644 --- a/src/test/run-pass/issue-14837.rs +++ b/src/test/run-pass/issue-14837.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[deny(dead_code)] pub enum Foo { Bar { diff --git a/src/test/run-pass/issue-14865.rs b/src/test/run-pass/issue-14865.rs index c322346c2a605..5dca6e82ba2fc 100644 --- a/src/test/run-pass/issue-14865.rs +++ b/src/test/run-pass/issue-14865.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum X { Foo(uint), Bar(bool) diff --git a/src/test/run-pass/issue-14901.rs b/src/test/run-pass/issue-14901.rs index f8dd0cf1a8228..7e7886e3a6e76 100644 --- a/src/test/run-pass/issue-14901.rs +++ b/src/test/run-pass/issue-14901.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io)] use std::old_io::Reader; diff --git a/src/test/run-pass/issue-14919.rs b/src/test/run-pass/issue-14919.rs index fbf08ab564d35..9a85f83c03b95 100644 --- a/src/test/run-pass/issue-14919.rs +++ b/src/test/run-pass/issue-14919.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Matcher { fn next_match(&mut self) -> Option<(uint, uint)>; } diff --git a/src/test/run-pass/issue-14933.rs b/src/test/run-pass/issue-14933.rs index 549ed08aaf37a..0e03f13241853 100644 --- a/src/test/run-pass/issue-14933.rs +++ b/src/test/run-pass/issue-14933.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub type BigRat = T; fn main() {} diff --git a/src/test/run-pass/issue-14936.rs b/src/test/run-pass/issue-14936.rs index ace1f00b023b5..05e2fff8a4424 100644 --- a/src/test/run-pass/issue-14936.rs +++ b/src/test/run-pass/issue-14936.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(asm)] type History = Vec<&'static str>; diff --git a/src/test/run-pass/issue-14940.rs b/src/test/run-pass/issue-14940.rs index fa4d10df7ea92..a530384d368c0 100644 --- a/src/test/run-pass/issue-14940.rs +++ b/src/test/run-pass/issue-14940.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io, io)] use std::env; diff --git a/src/test/run-pass/issue-14958.rs b/src/test/run-pass/issue-14958.rs index 911d850b289af..be13d0bc80c4b 100644 --- a/src/test/run-pass/issue-14958.rs +++ b/src/test/run-pass/issue-14958.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] trait Foo { fn dummy(&self) { }} diff --git a/src/test/run-pass/issue-14959.rs b/src/test/run-pass/issue-14959.rs index 6fd22f2efb704..d6fdd9f230ad4 100644 --- a/src/test/run-pass/issue-14959.rs +++ b/src/test/run-pass/issue-14959.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::ops::Fn; diff --git a/src/test/run-pass/issue-15043.rs b/src/test/run-pass/issue-15043.rs index edca9cbaa30fe..fda7b90197978 100644 --- a/src/test/run-pass/issue-15043.rs +++ b/src/test/run-pass/issue-15043.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(warnings)] struct S(T); diff --git a/src/test/run-pass/issue-15080.rs b/src/test/run-pass/issue-15080.rs index 9752b01e52bc1..a6d4f5fde5df9 100644 --- a/src/test/run-pass/issue-15080.rs +++ b/src/test/run-pass/issue-15080.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let mut x: &[_] = &[1, 2, 3, 4]; diff --git a/src/test/run-pass/issue-15104.rs b/src/test/run-pass/issue-15104.rs index c6c9e8004558c..f56f3b6392754 100644 --- a/src/test/run-pass/issue-15104.rs +++ b/src/test/run-pass/issue-15104.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { assert_eq!(count_members(&[1, 2, 3, 4]), 4); } diff --git a/src/test/run-pass/issue-15108.rs b/src/test/run-pass/issue-15108.rs index 8ae3d072362ed..aaf1e5fc18320 100644 --- a/src/test/run-pass/issue-15108.rs +++ b/src/test/run-pass/issue-15108.rs @@ -8,4 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() {} diff --git a/src/test/run-pass/issue-15129.rs b/src/test/run-pass/issue-15129.rs index 6782310fa0aa5..9910c2e0d6007 100644 --- a/src/test/run-pass/issue-15129.rs +++ b/src/test/run-pass/issue-15129.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub enum T { T1(()), T2(()) diff --git a/src/test/run-pass/issue-15149.rs b/src/test/run-pass/issue-15149.rs index d995ecc492e34..0e194860251a8 100644 --- a/src/test/run-pass/issue-15149.rs +++ b/src/test/run-pass/issue-15149.rs @@ -10,6 +10,8 @@ // no-prefer-dynamic +// pretty-expanded FIXME #23616 + #![feature(fs, process, env, path, rand)] use std::env; diff --git a/src/test/run-pass/issue-15221.rs b/src/test/run-pass/issue-15221.rs index 6310ce39d99db..bb89fb2fa102f 100644 --- a/src/test/run-pass/issue-15221.rs +++ b/src/test/run-pass/issue-15221.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! inner { ($e:pat ) => ($e) } diff --git a/src/test/run-pass/issue-15261.rs b/src/test/run-pass/issue-15261.rs index fbbd40895b283..b1d74e471c19b 100644 --- a/src/test/run-pass/issue-15261.rs +++ b/src/test/run-pass/issue-15261.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static mut n_mut: uint = 0; static n: &'static uint = unsafe{ &n_mut }; diff --git a/src/test/run-pass/issue-15444.rs b/src/test/run-pass/issue-15444.rs index 0f4978d78dd86..6a11f15dc847c 100644 --- a/src/test/run-pass/issue-15444.rs +++ b/src/test/run-pass/issue-15444.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait MyTrait { fn foo(&self); } diff --git a/src/test/run-pass/issue-15562.rs b/src/test/run-pass/issue-15562.rs index 82f53ea7cd408..6556dba653435 100644 --- a/src/test/run-pass/issue-15562.rs +++ b/src/test/run-pass/issue-15562.rs @@ -10,6 +10,8 @@ // aux-build:issue-15562.rs +// pretty-expanded FIXME #23616 + extern crate "issue-15562" as i; pub fn main() { diff --git a/src/test/run-pass/issue-15673.rs b/src/test/run-pass/issue-15673.rs index 020513121e6de..6c76f1595dc0d 100644 --- a/src/test/run-pass/issue-15673.rs +++ b/src/test/run-pass/issue-15673.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::iter::AdditiveIterator; diff --git a/src/test/run-pass/issue-15689-1.rs b/src/test/run-pass/issue-15689-1.rs index 06e9e652ed25b..ddfb57f345b86 100644 --- a/src/test/run-pass/issue-15689-1.rs +++ b/src/test/run-pass/issue-15689-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(PartialEq)] enum Test<'a> { Slice(&'a int) diff --git a/src/test/run-pass/issue-15689-2.rs b/src/test/run-pass/issue-15689-2.rs index 8da82c498b0b7..71306a63e9060 100644 --- a/src/test/run-pass/issue-15689-2.rs +++ b/src/test/run-pass/issue-15689-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] enum Test<'a> { Slice(&'a int) diff --git a/src/test/run-pass/issue-15730.rs b/src/test/run-pass/issue-15730.rs index 72daa0cba4104..929580019ff64 100644 --- a/src/test/run-pass/issue-15730.rs +++ b/src/test/run-pass/issue-15730.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let mut array = [1, 2, 3]; let pie_slice = &array[1..2]; diff --git a/src/test/run-pass/issue-15734.rs b/src/test/run-pass/issue-15734.rs index 99c8d746b94f1..b65443e4e2d27 100644 --- a/src/test/run-pass/issue-15734.rs +++ b/src/test/run-pass/issue-15734.rs @@ -11,6 +11,8 @@ // If `Index` used an associated type for its output, this test would // work more smoothly. +// pretty-expanded FIXME #23616 + #![feature(old_orphan_check, core)] use std::ops::Index; diff --git a/src/test/run-pass/issue-15774.rs b/src/test/run-pass/issue-15774.rs index e2f42278cbcb1..eb3322e037058 100644 --- a/src/test/run-pass/issue-15774.rs +++ b/src/test/run-pass/issue-15774.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![deny(warnings)] #![allow(unused_imports)] diff --git a/src/test/run-pass/issue-15793.rs b/src/test/run-pass/issue-15793.rs index 933fa881eed54..b830234ded2b3 100644 --- a/src/test/run-pass/issue-15793.rs +++ b/src/test/run-pass/issue-15793.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum NestedEnum { First, Second, diff --git a/src/test/run-pass/issue-15858.rs b/src/test/run-pass/issue-15858.rs index 6a4f78442d149..9b300deaa497e 100644 --- a/src/test/run-pass/issue-15858.rs +++ b/src/test/run-pass/issue-15858.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] static mut DROP_RAN: bool = false; diff --git a/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs b/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs index 18e1918aea447..6b75e4e47978e 100644 --- a/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs +++ b/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs @@ -10,6 +10,8 @@ // // regression test for the model lexer handling the DOTDOTDOT syntax (#15877) +// pretty-expanded FIXME #23616 + pub fn main() { match 5_usize { 1_usize...5_usize => {} diff --git a/src/test/run-pass/issue-15924.rs b/src/test/run-pass/issue-15924.rs index d8ddec286e92a..6af07c422ef56 100644 --- a/src/test/run-pass/issue-15924.rs +++ b/src/test/run-pass/issue-15924.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor, rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/issue-16151.rs b/src/test/run-pass/issue-16151.rs index 60d5ea8c84cee..0f55ca707bdd3 100644 --- a/src/test/run-pass/issue-16151.rs +++ b/src/test/run-pass/issue-16151.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; static mut DROP_COUNT: uint = 0; diff --git a/src/test/run-pass/issue-16256.rs b/src/test/run-pass/issue-16256.rs index 48ea3a93296e3..b994fcb46b096 100644 --- a/src/test/run-pass/issue-16256.rs +++ b/src/test/run-pass/issue-16256.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let mut buf = Vec::new(); |c: u8| buf.push(c); diff --git a/src/test/run-pass/issue-16441.rs b/src/test/run-pass/issue-16441.rs index 62c36e1d88636..4624953dea3fa 100644 --- a/src/test/run-pass/issue-16441.rs +++ b/src/test/run-pass/issue-16441.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Empty; // This used to cause an ICE diff --git a/src/test/run-pass/issue-16452.rs b/src/test/run-pass/issue-16452.rs index f89dbfd2da939..d9c87da572373 100644 --- a/src/test/run-pass/issue-16452.rs +++ b/src/test/run-pass/issue-16452.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { if true { return } match () { diff --git a/src/test/run-pass/issue-16530.rs b/src/test/run-pass/issue-16530.rs index b34c760192d13..bf33221431ae0 100644 --- a/src/test/run-pass/issue-16530.rs +++ b/src/test/run-pass/issue-16530.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(hash)] use std::hash::{SipHasher, hash}; diff --git a/src/test/run-pass/issue-16560.rs b/src/test/run-pass/issue-16560.rs index 9448e605937f7..15a5080f5a242 100644 --- a/src/test/run-pass/issue-16560.rs +++ b/src/test/run-pass/issue-16560.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] use std::thread; diff --git a/src/test/run-pass/issue-16596.rs b/src/test/run-pass/issue-16596.rs index 1ba7b142e5e15..743dbbc9b9956 100644 --- a/src/test/run-pass/issue-16596.rs +++ b/src/test/run-pass/issue-16596.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait MatrixRow { fn dummy(&self) { }} struct Mat; diff --git a/src/test/run-pass/issue-1660.rs b/src/test/run-pass/issue-1660.rs index 5c8b4be0cee1a..cc64ffcab6f93 100644 --- a/src/test/run-pass/issue-1660.rs +++ b/src/test/run-pass/issue-1660.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { static _x: int = 1<<2; } diff --git a/src/test/run-pass/issue-16643.rs b/src/test/run-pass/issue-16643.rs index 4e57c55c5f755..a0d9eeb9e0bfd 100644 --- a/src/test/run-pass/issue-16643.rs +++ b/src/test/run-pass/issue-16643.rs @@ -10,6 +10,8 @@ // aux-build:issue-16643.rs +// pretty-expanded FIXME #23616 + extern crate "issue-16643" as i; pub fn main() { diff --git a/src/test/run-pass/issue-16648.rs b/src/test/run-pass/issue-16648.rs index 0b58df56b6f76..6b0d5d7c51313 100644 --- a/src/test/run-pass/issue-16648.rs +++ b/src/test/run-pass/issue-16648.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let x: (int, &[int]) = (2, &[1, 2]); assert_eq!(match x { diff --git a/src/test/run-pass/issue-16739.rs b/src/test/run-pass/issue-16739.rs index 16c1b14fd8775..5270ef9268c59 100644 --- a/src/test/run-pass/issue-16739.rs +++ b/src/test/run-pass/issue-16739.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(unboxed_closures, core)] diff --git a/src/test/run-pass/issue-16774.rs b/src/test/run-pass/issue-16774.rs index 26661302242bc..e7af88647c02a 100644 --- a/src/test/run-pass/issue-16774.rs +++ b/src/test/run-pass/issue-16774.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(box_patterns)] diff --git a/src/test/run-pass/issue-16783.rs b/src/test/run-pass/issue-16783.rs index c2bcbe045c0cc..33cdbca14e367 100644 --- a/src/test/run-pass/issue-16783.rs +++ b/src/test/run-pass/issue-16783.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = [1, 2, 3]; let y = x; diff --git a/src/test/run-pass/issue-16922.rs b/src/test/run-pass/issue-16922.rs index 25909bcbfe9a8..1fdc27eb12845 100644 --- a/src/test/run-pass/issue-16922.rs +++ b/src/test/run-pass/issue-16922.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::any::Any; fn foo(_: &u8) { diff --git a/src/test/run-pass/issue-1701.rs b/src/test/run-pass/issue-1701.rs index 9dc78ce0d4f1a..b8c51f2cd3112 100644 --- a/src/test/run-pass/issue-1701.rs +++ b/src/test/run-pass/issue-1701.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum pattern { tabby, tortoiseshell, calico } enum breed { beagle, rottweiler, pug } type name = String; diff --git a/src/test/run-pass/issue-17068.rs b/src/test/run-pass/issue-17068.rs index a0e6f2c9be96e..7db1b9b6f7968 100644 --- a/src/test/run-pass/issue-17068.rs +++ b/src/test/run-pass/issue-17068.rs @@ -10,6 +10,8 @@ // Test that regionck creates the right region links in the pattern // binding of a for loop +// pretty-expanded FIXME #23616 + fn foo<'a>(v: &'a [uint]) -> &'a uint { for &ref x in v { return x; } unreachable!() diff --git a/src/test/run-pass/issue-17074.rs b/src/test/run-pass/issue-17074.rs index d367e0e908e32..31f6a4209de4d 100644 --- a/src/test/run-pass/issue-17074.rs +++ b/src/test/run-pass/issue-17074.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static X2: u64 = -1 as u16 as u64; static Y2: u64 = -1 as u32 as u64; const X: u64 = -1 as u16 as u64; diff --git a/src/test/run-pass/issue-17121.rs b/src/test/run-pass/issue-17121.rs index 6d32ffd6c43ca..366ef7543fdbb 100644 --- a/src/test/run-pass/issue-17121.rs +++ b/src/test/run-pass/issue-17121.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::fs::File; use std::io::{self, BufReader, Read}; diff --git a/src/test/run-pass/issue-17216.rs b/src/test/run-pass/issue-17216.rs index aa53a7658e129..f17834e8d36dc 100644 --- a/src/test/run-pass/issue-17216.rs +++ b/src/test/run-pass/issue-17216.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] struct Leak<'a> { diff --git a/src/test/run-pass/issue-17233.rs b/src/test/run-pass/issue-17233.rs index 9623613b5555a..756822d4f45fa 100644 --- a/src/test/run-pass/issue-17233.rs +++ b/src/test/run-pass/issue-17233.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const X1: &'static [u8] = &[b'1']; const X2: &'static [u8] = b"1"; const X3: &'static [u8; 1] = &[b'1']; diff --git a/src/test/run-pass/issue-17302.rs b/src/test/run-pass/issue-17302.rs index b2abf2d2b1a9c..0c9debec3e037 100644 --- a/src/test/run-pass/issue-17302.rs +++ b/src/test/run-pass/issue-17302.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static mut DROPPED: [bool; 2] = [false, false]; struct A(uint); diff --git a/src/test/run-pass/issue-17322.rs b/src/test/run-pass/issue-17322.rs index 410d6795c2126..a9f5476d0f86c 100644 --- a/src/test/run-pass/issue-17322.rs +++ b/src/test/run-pass/issue-17322.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, io)] diff --git a/src/test/run-pass/issue-17351.rs b/src/test/run-pass/issue-17351.rs index 945e1f220c5f7..0dac3295c1bf6 100644 --- a/src/test/run-pass/issue-17351.rs +++ b/src/test/run-pass/issue-17351.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] fn main() { diff --git a/src/test/run-pass/issue-17361.rs b/src/test/run-pass/issue-17361.rs index 092bcf661a76a..354b0861758c5 100644 --- a/src/test/run-pass/issue-17361.rs +++ b/src/test/run-pass/issue-17361.rs @@ -10,6 +10,8 @@ // Test that astconv doesn't forget about mutability of &mut str +// pretty-expanded FIXME #23616 + fn main() { fn foo(_: &mut T) {} let _f: fn(&mut str) = foo; diff --git a/src/test/run-pass/issue-17662.rs b/src/test/run-pass/issue-17662.rs index dbfa91553e60c..ce1c077b23c57 100644 --- a/src/test/run-pass/issue-17662.rs +++ b/src/test/run-pass/issue-17662.rs @@ -10,6 +10,8 @@ // aux-build:issue-17662.rs +// pretty-expanded FIXME #23616 + extern crate "issue-17662" as i; use std::marker; diff --git a/src/test/run-pass/issue-17718-parse-const.rs b/src/test/run-pass/issue-17718-parse-const.rs index 3ca6f473a7900..34699cf81b447 100644 --- a/src/test/run-pass/issue-17718-parse-const.rs +++ b/src/test/run-pass/issue-17718-parse-const.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const FOO: uint = 3; fn main() { diff --git a/src/test/run-pass/issue-17718-static-unsafe-interior.rs b/src/test/run-pass/issue-17718-static-unsafe-interior.rs index 388408cbd4da1..3f6bfb84fbf3e 100644 --- a/src/test/run-pass/issue-17718-static-unsafe-interior.rs +++ b/src/test/run-pass/issue-17718-static-unsafe-interior.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker; diff --git a/src/test/run-pass/issue-17718.rs b/src/test/run-pass/issue-17718.rs index 8eee4c9f216b9..2827ab9293642 100644 --- a/src/test/run-pass/issue-17718.rs +++ b/src/test/run-pass/issue-17718.rs @@ -10,6 +10,8 @@ // aux-build:issue-17718.rs +// pretty-expanded FIXME #23616 + #![feature(core)] extern crate "issue-17718" as other; diff --git a/src/test/run-pass/issue-17732.rs b/src/test/run-pass/issue-17732.rs index de9611f259227..9a678f00157e6 100644 --- a/src/test/run-pass/issue-17732.rs +++ b/src/test/run-pass/issue-17732.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Person { type string; fn dummy(&self) { } diff --git a/src/test/run-pass/issue-17734.rs b/src/test/run-pass/issue-17734.rs index 497361969bfc3..3cf9c62b40d49 100644 --- a/src/test/run-pass/issue-17734.rs +++ b/src/test/run-pass/issue-17734.rs @@ -10,6 +10,8 @@ // Test that generating drop glue for Box doesn't ICE +// pretty-expanded FIXME #23616 + fn f(s: Box) -> Box { s } diff --git a/src/test/run-pass/issue-17771.rs b/src/test/run-pass/issue-17771.rs index 2f1b0342b8e04..fc821441330a5 100644 --- a/src/test/run-pass/issue-17771.rs +++ b/src/test/run-pass/issue-17771.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Aaa { fn dummy(&self) { } } impl<'a> Aaa for &'a mut (Aaa + 'a) {} diff --git a/src/test/run-pass/issue-17816.rs b/src/test/run-pass/issue-17816.rs index 8e3cb414566c7..65a0b51095c80 100644 --- a/src/test/run-pass/issue-17816.rs +++ b/src/test/run-pass/issue-17816.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] use std::marker::PhantomData; diff --git a/src/test/run-pass/issue-17877.rs b/src/test/run-pass/issue-17877.rs index a7d9e6a4be6d8..82f324a395abd 100644 --- a/src/test/run-pass/issue-17877.rs +++ b/src/test/run-pass/issue-17877.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { assert_eq!(match [0u8; 1024] { _ => 42_usize, diff --git a/src/test/run-pass/issue-17904.rs b/src/test/run-pass/issue-17904.rs index 58a0872a5719b..994001a82ce33 100644 --- a/src/test/run-pass/issue-17904.rs +++ b/src/test/run-pass/issue-17904.rs @@ -11,6 +11,8 @@ // Test that we can parse where clauses on various forms of tuple // structs. +// pretty-expanded FIXME #23616 + struct Bar(T) where T: Copy; struct Bleh(T, U) where T: Copy, U: Sized; struct Baz where T: Copy { diff --git a/src/test/run-pass/issue-18110.rs b/src/test/run-pass/issue-18110.rs index 3d6b23c8805fc..eecdea66cf6f7 100644 --- a/src/test/run-pass/issue-18110.rs +++ b/src/test/run-pass/issue-18110.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { ({return},); } diff --git a/src/test/run-pass/issue-18188.rs b/src/test/run-pass/issue-18188.rs index 270537591b75b..cd28d6425516d 100644 --- a/src/test/run-pass/issue-18188.rs +++ b/src/test/run-pass/issue-18188.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, std_misc)] use std::thunk::Thunk; diff --git a/src/test/run-pass/issue-1821.rs b/src/test/run-pass/issue-1821.rs index b7c4bb0fe0046..bdff5ba484dc8 100644 --- a/src/test/run-pass/issue-1821.rs +++ b/src/test/run-pass/issue-1821.rs @@ -11,6 +11,8 @@ // Issue #1821 - Don't recurse trying to typecheck this +// pretty-expanded FIXME #23616 + enum t { foo(Vec) } diff --git a/src/test/run-pass/issue-18232.rs b/src/test/run-pass/issue-18232.rs index 67b3239d35197..376d6523ccb98 100644 --- a/src/test/run-pass/issue-18232.rs +++ b/src/test/run-pass/issue-18232.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Cursor<'a>(::std::marker::PhantomData<&'a ()>); trait CursorNavigator { diff --git a/src/test/run-pass/issue-18352.rs b/src/test/run-pass/issue-18352.rs index e5532b4550baa..4e60a7d9b5fbb 100644 --- a/src/test/run-pass/issue-18352.rs +++ b/src/test/run-pass/issue-18352.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const X: &'static str = "12345"; fn test(s: String) -> bool { diff --git a/src/test/run-pass/issue-18353.rs b/src/test/run-pass/issue-18353.rs index c734c1a322245..1386c9d0daa5b 100644 --- a/src/test/run-pass/issue-18353.rs +++ b/src/test/run-pass/issue-18353.rs @@ -11,6 +11,8 @@ // Test that wrapping an unsized struct in an enum which gets optimised does // not ICE. +// pretty-expanded FIXME #23616 + struct Str { f: [u8] } diff --git a/src/test/run-pass/issue-18412.rs b/src/test/run-pass/issue-18412.rs index 63f57e0a2e85e..edf6f5e32c31f 100644 --- a/src/test/run-pass/issue-18412.rs +++ b/src/test/run-pass/issue-18412.rs @@ -11,6 +11,8 @@ // Test that non-static methods can be assigned to local variables as // function pointers. +// pretty-expanded FIXME #23616 + trait Foo { fn foo(&self) -> uint; } diff --git a/src/test/run-pass/issue-18425.rs b/src/test/run-pass/issue-18425.rs index 2011b87e73102..eb7e504ae1451 100644 --- a/src/test/run-pass/issue-18425.rs +++ b/src/test/run-pass/issue-18425.rs @@ -11,6 +11,8 @@ // Check that trans doesn't ICE when translating an array repeat // expression with a count of 1 and a non-Copy element type. +// pretty-expanded FIXME #23616 + fn main() { let _ = [Box::new(1_usize); 1]; } diff --git a/src/test/run-pass/issue-18501.rs b/src/test/run-pass/issue-18501.rs index ce026942948ca..de6a5be83de38 100644 --- a/src/test/run-pass/issue-18501.rs +++ b/src/test/run-pass/issue-18501.rs @@ -13,6 +13,8 @@ // translating the def ID of the trait during AST decoding. // aux-build:issue-18501.rs +// pretty-expanded FIXME #23616 + extern crate "issue-18501" as issue; fn main() { diff --git a/src/test/run-pass/issue-18514.rs b/src/test/run-pass/issue-18514.rs index c75abd62deba6..f284ac90b4e6b 100644 --- a/src/test/run-pass/issue-18514.rs +++ b/src/test/run-pass/issue-18514.rs @@ -15,6 +15,8 @@ // impl. // aux-build:issue-18514.rs +// pretty-expanded FIXME #23616 + extern crate "issue-18514" as ice; use ice::{Tr, St}; diff --git a/src/test/run-pass/issue-18539.rs b/src/test/run-pass/issue-18539.rs index b92cfa1f29b52..897a3d082ba9a 100644 --- a/src/test/run-pass/issue-18539.rs +++ b/src/test/run-pass/issue-18539.rs @@ -11,6 +11,8 @@ // Test that coercing bare fn's that return a zero sized type to // a closure doesn't cause an LLVM ERROR +// pretty-expanded FIXME #23616 + struct Foo; fn uint_to_foo(_: uint) -> Foo { diff --git a/src/test/run-pass/issue-18619.rs b/src/test/run-pass/issue-18619.rs index 6caa96530f64b..a256e61921686 100644 --- a/src/test/run-pass/issue-18619.rs +++ b/src/test/run-pass/issue-18619.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io)] use std::old_io::FileType; diff --git a/src/test/run-pass/issue-18652.rs b/src/test/run-pass/issue-18652.rs index 8f560258d9f47..a3affb7bf86f0 100644 --- a/src/test/run-pass/issue-18652.rs +++ b/src/test/run-pass/issue-18652.rs @@ -12,6 +12,8 @@ // once closure as an optimization by trans. This used to hit an // incorrect assert. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn main() { diff --git a/src/test/run-pass/issue-1866.rs b/src/test/run-pass/issue-1866.rs index 10ae2749a0902..a4e6e6181ee31 100644 --- a/src/test/run-pass/issue-1866.rs +++ b/src/test/run-pass/issue-1866.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod a { pub type rust_task = uint; pub mod rustrt { diff --git a/src/test/run-pass/issue-18661.rs b/src/test/run-pass/issue-18661.rs index bdc16533ea62c..302f5ddcc6c60 100644 --- a/src/test/run-pass/issue-18661.rs +++ b/src/test/run-pass/issue-18661.rs @@ -11,6 +11,8 @@ // Test that param substitutions from the correct environment are // used when translating unboxed closure calls. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] pub fn inside(c: F) { diff --git a/src/test/run-pass/issue-18685.rs b/src/test/run-pass/issue-18685.rs index 698b61e5759ad..e4537e158d123 100644 --- a/src/test/run-pass/issue-18685.rs +++ b/src/test/run-pass/issue-18685.rs @@ -11,6 +11,8 @@ // Test that the self param space is not used in a conflicting // manner by unboxed closures within a default method on a trait +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] trait Tr { diff --git a/src/test/run-pass/issue-18711.rs b/src/test/run-pass/issue-18711.rs index 0338a4eff2238..81c717f817487 100644 --- a/src/test/run-pass/issue-18711.rs +++ b/src/test/run-pass/issue-18711.rs @@ -11,6 +11,8 @@ // Test that we don't panic on a RefCell borrow conflict in certain // code paths involving unboxed closures. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] // aux-build:issue-18711.rs diff --git a/src/test/run-pass/issue-18738.rs b/src/test/run-pass/issue-18738.rs index 30ad827c69723..644a429750fbc 100644 --- a/src/test/run-pass/issue-18738.rs +++ b/src/test/run-pass/issue-18738.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Eq, PartialEq, PartialOrd, Ord)] enum Test<'a> { Int(&'a int), diff --git a/src/test/run-pass/issue-18767.rs b/src/test/run-pass/issue-18767.rs index 2f23b8028ecb9..8e51a900c0cae 100644 --- a/src/test/run-pass/issue-18767.rs +++ b/src/test/run-pass/issue-18767.rs @@ -11,6 +11,8 @@ // Test that regionck uses the right memcat for patterns in for loops // and doesn't ICE. +// pretty-expanded FIXME #23616 + fn main() { for &&x in Some(&0_usize).iter() { assert_eq!(x, 0) diff --git a/src/test/run-pass/issue-18859.rs b/src/test/run-pass/issue-18859.rs index 490f7eb6bea4b..f72e7fbe30a35 100644 --- a/src/test/run-pass/issue-18859.rs +++ b/src/test/run-pass/issue-18859.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod foo { pub mod bar { pub mod baz { diff --git a/src/test/run-pass/issue-18906.rs b/src/test/run-pass/issue-18906.rs index 16dd84315ed2c..7cc61dd253276 100644 --- a/src/test/run-pass/issue-18906.rs +++ b/src/test/run-pass/issue-18906.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub trait Borrow { fn borrow(&self) -> &Borrowed; } diff --git a/src/test/run-pass/issue-19037.rs b/src/test/run-pass/issue-19037.rs index ac181c8db7185..0735693a4bd46 100644 --- a/src/test/run-pass/issue-19037.rs +++ b/src/test/run-pass/issue-19037.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Str([u8]); #[derive(Clone)] diff --git a/src/test/run-pass/issue-19098.rs b/src/test/run-pass/issue-19098.rs index 05f3373dbd4d8..a0368063f2c1f 100644 --- a/src/test/run-pass/issue-19098.rs +++ b/src/test/run-pass/issue-19098.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] pub trait Handler { diff --git a/src/test/run-pass/issue-19121.rs b/src/test/run-pass/issue-19121.rs index 222f67af437ef..e02d001ee98ad 100644 --- a/src/test/run-pass/issue-19121.rs +++ b/src/test/run-pass/issue-19121.rs @@ -11,6 +11,8 @@ // Test that a partially specified trait object with unspecified associated // type does not ICE. +// pretty-expanded FIXME #23616 + trait Foo { type A; diff --git a/src/test/run-pass/issue-19127.rs b/src/test/run-pass/issue-19127.rs index bc43874bfb3c0..c5eb506932801 100644 --- a/src/test/run-pass/issue-19127.rs +++ b/src/test/run-pass/issue-19127.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn foo T>(f: F) {} diff --git a/src/test/run-pass/issue-19129-1.rs b/src/test/run-pass/issue-19129-1.rs index 3436871b4d1fe..f9b605c44e918 100644 --- a/src/test/run-pass/issue-19129-1.rs +++ b/src/test/run-pass/issue-19129-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Trait { type Output; diff --git a/src/test/run-pass/issue-19129-2.rs b/src/test/run-pass/issue-19129-2.rs index cf0f48e025a0e..47b8aaacdadb8 100644 --- a/src/test/run-pass/issue-19129-2.rs +++ b/src/test/run-pass/issue-19129-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Trait { type Output; diff --git a/src/test/run-pass/issue-19244.rs b/src/test/run-pass/issue-19244.rs index 35e053110dfc7..f25450a891827 100644 --- a/src/test/run-pass/issue-19244.rs +++ b/src/test/run-pass/issue-19244.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct MyStruct { field: usize } struct Nested { nested: MyStruct } struct Mix2 { nested: ((usize,),) } diff --git a/src/test/run-pass/issue-19293.rs b/src/test/run-pass/issue-19293.rs index 4a446a76de389..95ca3efb099c7 100644 --- a/src/test/run-pass/issue-19293.rs +++ b/src/test/run-pass/issue-19293.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:issue_19293.rs +// pretty-expanded FIXME #23616 + extern crate issue_19293; use issue_19293::{Foo, MyEnum}; diff --git a/src/test/run-pass/issue-19340-1.rs b/src/test/run-pass/issue-19340-1.rs index 2f466d4ca8c47..ba2aaee02894d 100644 --- a/src/test/run-pass/issue-19340-1.rs +++ b/src/test/run-pass/issue-19340-1.rs @@ -10,6 +10,8 @@ // aux-build:issue-19340-1.rs +// pretty-expanded FIXME #23616 + extern crate "issue-19340-1" as lib; use lib::Homura; diff --git a/src/test/run-pass/issue-19340-2.rs b/src/test/run-pass/issue-19340-2.rs index 8300220edeaff..d7747201cbe46 100644 --- a/src/test/run-pass/issue-19340-2.rs +++ b/src/test/run-pass/issue-19340-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Homura { Madoka { name: String, diff --git a/src/test/run-pass/issue-19398.rs b/src/test/run-pass/issue-19398.rs index e603167b26be0..2dc5a6e99799a 100644 --- a/src/test/run-pass/issue-19398.rs +++ b/src/test/run-pass/issue-19398.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait T { unsafe extern "Rust" fn foo(&self); } diff --git a/src/test/run-pass/issue-19479.rs b/src/test/run-pass/issue-19479.rs index 38a7af3a69597..7557c1b44e0dc 100644 --- a/src/test/run-pass/issue-19479.rs +++ b/src/test/run-pass/issue-19479.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Base { fn dummy(&self) { } } diff --git a/src/test/run-pass/issue-19499.rs b/src/test/run-pass/issue-19499.rs index 0578db8f854fc..069ceadf91627 100644 --- a/src/test/run-pass/issue-19499.rs +++ b/src/test/run-pass/issue-19499.rs @@ -14,6 +14,8 @@ // reasonable examples) let to ambiguity errors about not being able // to infer sufficient type information. +// pretty-expanded FIXME #23616 + fn main() { let n = 0; let it = Some(1_usize).into_iter().inspect(|_| {n;}); diff --git a/src/test/run-pass/issue-19631.rs b/src/test/run-pass/issue-19631.rs index 7bb0d055b844d..562d2e4169e66 100644 --- a/src/test/run-pass/issue-19631.rs +++ b/src/test/run-pass/issue-19631.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait PoolManager { type C; fn dummy(&self) { } diff --git a/src/test/run-pass/issue-19632.rs b/src/test/run-pass/issue-19632.rs index 4339339d74c88..1cb20011c2145 100644 --- a/src/test/run-pass/issue-19632.rs +++ b/src/test/run-pass/issue-19632.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait PoolManager { type C; fn dummy(&self) { } diff --git a/src/test/run-pass/issue-1974.rs b/src/test/run-pass/issue-1974.rs index 9d71aea01d01d..7b33b4e7a4f39 100644 --- a/src/test/run-pass/issue-1974.rs +++ b/src/test/run-pass/issue-1974.rs @@ -10,6 +10,8 @@ // Issue 1974 // Don't double free the condition allocation +// pretty-expanded FIXME #23616 + pub fn main() { let s = "hej".to_string(); while s != "".to_string() { diff --git a/src/test/run-pass/issue-19811-escape-unicode.rs b/src/test/run-pass/issue-19811-escape-unicode.rs index 9317f5ea6b132..5b415c63885e6 100644 --- a/src/test/run-pass/issue-19811-escape-unicode.rs +++ b/src/test/run-pass/issue-19811-escape-unicode.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] fn main() { diff --git a/src/test/run-pass/issue-19850.rs b/src/test/run-pass/issue-19850.rs index a9ce6c7a9eb48..4c1d30d9eed58 100644 --- a/src/test/run-pass/issue-19850.rs +++ b/src/test/run-pass/issue-19850.rs @@ -11,6 +11,8 @@ // Test that `::Output` and `Self::Output` are accepted as type annotations in let // bindings +// pretty-expanded FIXME #23616 + trait Int { fn one() -> Self; fn leading_zeros(self) -> uint; diff --git a/src/test/run-pass/issue-19982.rs b/src/test/run-pass/issue-19982.rs index 3082fc27a7dec..41d202c463503 100644 --- a/src/test/run-pass/issue-19982.rs +++ b/src/test/run-pass/issue-19982.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core,unboxed_closures)] #[allow(dead_code)] diff --git a/src/test/run-pass/issue-20009.rs b/src/test/run-pass/issue-20009.rs index 374460487d8f2..9d433eabe6297 100644 --- a/src/test/run-pass/issue-20009.rs +++ b/src/test/run-pass/issue-20009.rs @@ -10,6 +10,8 @@ // Check that associated types are `Sized` +// pretty-expanded FIXME #23616 + trait Trait { type Output; diff --git a/src/test/run-pass/issue-20313.rs b/src/test/run-pass/issue-20313.rs index 47791ceecb67d..0e5eaf857f35c 100644 --- a/src/test/run-pass/issue-20313.rs +++ b/src/test/run-pass/issue-20313.rs @@ -7,6 +7,8 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(link_llvm_intrinsics)] extern { diff --git a/src/test/run-pass/issue-20343.rs b/src/test/run-pass/issue-20343.rs index 2f9e8feed2482..70064f4e2670c 100644 --- a/src/test/run-pass/issue-20343.rs +++ b/src/test/run-pass/issue-20343.rs @@ -10,6 +10,8 @@ // Regression test for Issue #20343. +// pretty-expanded FIXME #23616 + #![deny(dead_code)] struct B { b: u32 } diff --git a/src/test/run-pass/issue-20389.rs b/src/test/run-pass/issue-20389.rs index 877cec48b5dc7..03c7e9f8db72b 100644 --- a/src/test/run-pass/issue-20389.rs +++ b/src/test/run-pass/issue-20389.rs @@ -10,6 +10,8 @@ // aux-build:issue_20389.rs +// pretty-expanded FIXME #23616 + extern crate issue_20389; struct Foo; diff --git a/src/test/run-pass/issue-20396.rs b/src/test/run-pass/issue-20396.rs index 63a88988162a4..f607ed373b344 100644 --- a/src/test/run-pass/issue-20396.rs +++ b/src/test/run-pass/issue-20396.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Foo { diff --git a/src/test/run-pass/issue-20414.rs b/src/test/run-pass/issue-20414.rs index 92865c419b662..8054117130765 100644 --- a/src/test/run-pass/issue-20414.rs +++ b/src/test/run-pass/issue-20414.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Trait { fn method(self) -> int; } diff --git a/src/test/run-pass/issue-20575.rs b/src/test/run-pass/issue-20575.rs index 9ebd96a685eaf..e73492e7a7ee5 100644 --- a/src/test/run-pass/issue-20575.rs +++ b/src/test/run-pass/issue-20575.rs @@ -10,6 +10,8 @@ // Test that overloaded calls work with zero arity closures +// pretty-expanded FIXME #23616 + fn main() { // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. let functions: [Box Option<()>>; 1] = [Box::new(|| None)]; diff --git a/src/test/run-pass/issue-20644.rs b/src/test/run-pass/issue-20644.rs index 476267d9329cb..72ccd82a21ec7 100644 --- a/src/test/run-pass/issue-20644.rs +++ b/src/test/run-pass/issue-20644.rs @@ -11,6 +11,8 @@ // A reduced version of the rustbook ice. The problem this encountered // had to do with trans ignoring binders. +// pretty-expanded FIXME #23616 + #![feature(os)] use std::iter; diff --git a/src/test/run-pass/issue-20676.rs b/src/test/run-pass/issue-20676.rs index 640774f9d24ce..df4c392385341 100644 --- a/src/test/run-pass/issue-20676.rs +++ b/src/test/run-pass/issue-20676.rs @@ -12,6 +12,8 @@ // UFCS-style calls to a method in `Trait` where `Self` was bound to a // trait object of type `Trait`. See also `ufcs-trait-object.rs`. +// pretty-expanded FIXME #23616 + use std::fmt; fn main() { diff --git a/src/test/run-pass/issue-2074.rs b/src/test/run-pass/issue-2074.rs index 5f2805ed35455..f5d34c39ee578 100644 --- a/src/test/run-pass/issue-2074.rs +++ b/src/test/run-pass/issue-2074.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(non_camel_case_types)] pub fn main() { diff --git a/src/test/run-pass/issue-20763-1.rs b/src/test/run-pass/issue-20763-1.rs index 97c06ac98265f..98270099df904 100644 --- a/src/test/run-pass/issue-20763-1.rs +++ b/src/test/run-pass/issue-20763-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait T0 { type O; fn dummy(&self) { } diff --git a/src/test/run-pass/issue-20763-2.rs b/src/test/run-pass/issue-20763-2.rs index d97017635718c..340670b412036 100644 --- a/src/test/run-pass/issue-20763-2.rs +++ b/src/test/run-pass/issue-20763-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait T0 { type O; fn dummy(&self) { } diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs index 2600c5f0afd3d..4dbe7c968a738 100644 --- a/src/test/run-pass/issue-20797.rs +++ b/src/test/run-pass/issue-20797.rs @@ -10,6 +10,8 @@ // Regression test for #20797. +// pretty-expanded FIXME #23616 + #![feature(old_io, old_path)] use std::default::Default; diff --git a/src/test/run-pass/issue-21033.rs b/src/test/run-pass/issue-21033.rs index 30c166cc67b9f..00e792c9a006c 100644 --- a/src/test/run-pass/issue-21033.rs +++ b/src/test/run-pass/issue-21033.rs @@ -7,6 +7,8 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-21058.rs b/src/test/run-pass/issue-21058.rs index 3da650469e886..d7a656be7afb0 100644 --- a/src/test/run-pass/issue-21058.rs +++ b/src/test/run-pass/issue-21058.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] struct NT(str); diff --git a/src/test/run-pass/issue-21245.rs b/src/test/run-pass/issue-21245.rs index 9205b247e1352..75d064a00fa89 100644 --- a/src/test/run-pass/issue-21245.rs +++ b/src/test/run-pass/issue-21245.rs @@ -13,6 +13,8 @@ // insufficient type propagation caused the type of the iterator to be // incorrectly unified with the `*const` type to which it is coerced. +// pretty-expanded FIXME #23616 + use std::ptr; trait IntoIterator { diff --git a/src/test/run-pass/issue-21296.rs b/src/test/run-pass/issue-21296.rs index f91fb064ae27f..2ce36b0dd44d7 100644 --- a/src/test/run-pass/issue-21296.rs +++ b/src/test/run-pass/issue-21296.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[forbid(raw_pointer_derive)] #[derive(Copy)] struct Test(*const i32); diff --git a/src/test/run-pass/issue-21306.rs b/src/test/run-pass/issue-21306.rs index 235dddefacb4d..cabda0b500bd5 100644 --- a/src/test/run-pass/issue-21306.rs +++ b/src/test/run-pass/issue-21306.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::Arc; fn main() { diff --git a/src/test/run-pass/issue-21350.rs b/src/test/run-pass/issue-21350.rs index feafee90372d6..ff205cd694c3a 100644 --- a/src/test/run-pass/issue-21350.rs +++ b/src/test/run-pass/issue-21350.rs @@ -10,6 +10,8 @@ // Make sure that "bare sequences" don't ICE in follow checking +// pretty-expanded FIXME #23616 + macro_rules! bare { $($id:expr),+ => ( $($id)+ ) } diff --git a/src/test/run-pass/issue-21361.rs b/src/test/run-pass/issue-21361.rs index bb20b3a321569..ef86634125ebd 100644 --- a/src/test/run-pass/issue-21361.rs +++ b/src/test/run-pass/issue-21361.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let v = vec![1, 2, 3]; let boxed: Box> = Box::new(v.into_iter()); diff --git a/src/test/run-pass/issue-21363.rs b/src/test/run-pass/issue-21363.rs index 71bb3d39fe1d6..608c60d03b3e7 100644 --- a/src/test/run-pass/issue-21363.rs +++ b/src/test/run-pass/issue-21363.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![no_implicit_prelude] trait Iterator { diff --git a/src/test/run-pass/issue-21384.rs b/src/test/run-pass/issue-21384.rs index 1d3984deac209..e9b9aeebdaf31 100644 --- a/src/test/run-pass/issue-21384.rs +++ b/src/test/run-pass/issue-21384.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use ::std::ops::RangeFull; fn test(arg: T) -> T { diff --git a/src/test/run-pass/issue-21402.rs b/src/test/run-pass/issue-21402.rs index 6be7cea29280d..7fd329da2b72a 100644 --- a/src/test/run-pass/issue-21402.rs +++ b/src/test/run-pass/issue-21402.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Hash)] struct Foo { a: Vec, diff --git a/src/test/run-pass/issue-21475.rs b/src/test/run-pass/issue-21475.rs index 29701bd668aaf..0666a1f133f2e 100644 --- a/src/test/run-pass/issue-21475.rs +++ b/src/test/run-pass/issue-21475.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use m::{START, END}; fn main() { diff --git a/src/test/run-pass/issue-21520.rs b/src/test/run-pass/issue-21520.rs index 6eed357415226..b512fd4919356 100644 --- a/src/test/run-pass/issue-21520.rs +++ b/src/test/run-pass/issue-21520.rs @@ -11,6 +11,8 @@ // Test that the requirement (in `Bar`) that `T::Bar : 'static` does // not wind up propagating to `T`. +// pretty-expanded FIXME #23616 + pub trait Foo { type Bar; diff --git a/src/test/run-pass/issue-21634.rs b/src/test/run-pass/issue-21634.rs index e5a2790917ff0..53297d0a8f3b9 100644 --- a/src/test/run-pass/issue-21634.rs +++ b/src/test/run-pass/issue-21634.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { if let Ok(x) = "3.1415".parse() { assert_eq!(false, x <= 0.0); diff --git a/src/test/run-pass/issue-21655.rs b/src/test/run-pass/issue-21655.rs index b9b1e5f3337cd..cb87770c565c0 100644 --- a/src/test/run-pass/issue-21655.rs +++ b/src/test/run-pass/issue-21655.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn test(it: &mut Iterator) { for x in it { assert_eq!(x, 1) diff --git a/src/test/run-pass/issue-21721.rs b/src/test/run-pass/issue-21721.rs index fee14061c566a..c34ab1b0ea7ce 100644 --- a/src/test/run-pass/issue-21721.rs +++ b/src/test/run-pass/issue-21721.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { static NONE: Option<((), &'static u8)> = None; let ptr = unsafe { diff --git a/src/test/run-pass/issue-21726.rs b/src/test/run-pass/issue-21726.rs index 09d1a3bca6901..e1d1b908e0117 100644 --- a/src/test/run-pass/issue-21726.rs +++ b/src/test/run-pass/issue-21726.rs @@ -12,6 +12,8 @@ // subtyping of projection types that resulted in an unconstrained // region, yielding region inference failures. +// pretty-expanded FIXME #23616 + fn main() { } fn foo<'a>(s: &'a str) { diff --git a/src/test/run-pass/issue-21891.rs b/src/test/run-pass/issue-21891.rs index d6e6f23191e24..37acd34fbf077 100644 --- a/src/test/run-pass/issue-21891.rs +++ b/src/test/run-pass/issue-21891.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static foo: [uint; 3] = [1, 2, 3]; static slice_1: &'static [uint] = &foo; diff --git a/src/test/run-pass/issue-2190-1.rs b/src/test/run-pass/issue-2190-1.rs index 00f501d85a578..41017134ba8a6 100644 --- a/src/test/run-pass/issue-2190-1.rs +++ b/src/test/run-pass/issue-2190-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::thread::Builder; diff --git a/src/test/run-pass/issue-21909.rs b/src/test/run-pass/issue-21909.rs index 55b61dd194556..6a5d76de8d3f8 100644 --- a/src/test/run-pass/issue-21909.rs +++ b/src/test/run-pass/issue-21909.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn dummy(&self, arg: X); } diff --git a/src/test/run-pass/issue-22036.rs b/src/test/run-pass/issue-22036.rs index 7bc6393ef8915..e02ce5441a7d4 100644 --- a/src/test/run-pass/issue-22036.rs +++ b/src/test/run-pass/issue-22036.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait DigitCollection: Sized { type Iter: Iterator; fn digit_iter(self) -> Self::Iter; diff --git a/src/test/run-pass/issue-2214.rs b/src/test/run-pass/issue-2214.rs index 202ea05b7f8b3..b5ea9c194a8a2 100644 --- a/src/test/run-pass/issue-2214.rs +++ b/src/test/run-pass/issue-2214.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/issue-22356.rs b/src/test/run-pass/issue-22356.rs index 7c0ab11bc4462..a54490386d0e7 100644 --- a/src/test/run-pass/issue-22356.rs +++ b/src/test/run-pass/issue-22356.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::marker::{PhantomData, PhantomFn}; pub struct Handle(T, I); diff --git a/src/test/run-pass/issue-22426.rs b/src/test/run-pass/issue-22426.rs index b1c8f9c23c5d0..ad6ade4c59f12 100644 --- a/src/test/run-pass/issue-22426.rs +++ b/src/test/run-pass/issue-22426.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { match 42 { x if x < 7 => (), diff --git a/src/test/run-pass/issue-22536-copy-mustnt-zero.rs b/src/test/run-pass/issue-22536-copy-mustnt-zero.rs index b3492180a5829..8b2e1c3e149f7 100644 --- a/src/test/run-pass/issue-22536-copy-mustnt-zero.rs +++ b/src/test/run-pass/issue-22536-copy-mustnt-zero.rs @@ -11,6 +11,8 @@ // Regression test for Issue #22536: If a type implements Copy, then // moving it must not zero the original memory. +// pretty-expanded FIXME #23616 + trait Resources { type Buffer: Copy; fn foo(&self) {} diff --git a/src/test/run-pass/issue-22577.rs b/src/test/run-pass/issue-22577.rs index f0b0b18e6bb5c..a47c844e1994a 100644 --- a/src/test/run-pass/issue-22577.rs +++ b/src/test/run-pass/issue-22577.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(fs, net, fs_walk)] use std::{fs, net}; diff --git a/src/test/run-pass/issue-22629.rs b/src/test/run-pass/issue-22629.rs index 7bbd85d817fb9..07ca79295bf5c 100644 --- a/src/test/run-pass/issue-22629.rs +++ b/src/test/run-pass/issue-22629.rs @@ -11,6 +11,8 @@ // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. +// pretty-expanded FIXME #23616 + use std::borrow::{ToOwned, Cow}; fn assert_send(_: T) {} diff --git a/src/test/run-pass/issue-22777.rs b/src/test/run-pass/issue-22777.rs index cab33beda405f..2dc4d775a9c45 100644 --- a/src/test/run-pass/issue-22777.rs +++ b/src/test/run-pass/issue-22777.rs @@ -12,6 +12,8 @@ // can successfully deal with a "deep" structure, which the drop-check // was hitting a recursion limit on at one point. +// pretty-expanded FIXME #23616 + #![allow(non_camel_case_types)] pub fn noop_fold_impl_item() -> SmallVector { diff --git a/src/test/run-pass/issue-22828.rs b/src/test/run-pass/issue-22828.rs index 8ad960b3f1b45..d6a4d7834dfce 100644 --- a/src/test/run-pass/issue-22828.rs +++ b/src/test/run-pass/issue-22828.rs @@ -11,6 +11,8 @@ // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. +// pretty-expanded FIXME #23616 + trait Foo { type A; fn foo(&self) {} diff --git a/src/test/run-pass/issue-2284.rs b/src/test/run-pass/issue-2284.rs index b8c9ada8b1e23..d606c52607ab0 100644 --- a/src/test/run-pass/issue-2284.rs +++ b/src/test/run-pass/issue-2284.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Send { fn f(&self); } diff --git a/src/test/run-pass/issue-2288.rs b/src/test/run-pass/issue-2288.rs index 18bb6fe55299d..d4c882655b17a 100644 --- a/src/test/run-pass/issue-2288.rs +++ b/src/test/run-pass/issue-2288.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-2311-2.rs b/src/test/run-pass/issue-2311-2.rs index 5529d51b408c0..c76bbaf968a65 100644 --- a/src/test/run-pass/issue-2311-2.rs +++ b/src/test/run-pass/issue-2311-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait clam { fn get(self) -> A; } diff --git a/src/test/run-pass/issue-2311.rs b/src/test/run-pass/issue-2311.rs index b6b3114e2a487..5a086fd6fc2dc 100644 --- a/src/test/run-pass/issue-2311.rs +++ b/src/test/run-pass/issue-2311.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait clam { fn get(self) -> A; } trait foo { fn bar>(&self, c: C) -> B; diff --git a/src/test/run-pass/issue-2312.rs b/src/test/run-pass/issue-2312.rs index 3f273b56efd6c..76bb216ed77eb 100644 --- a/src/test/run-pass/issue-2312.rs +++ b/src/test/run-pass/issue-2312.rs @@ -10,6 +10,8 @@ // Testing that the B's are resolved +// pretty-expanded FIXME #23616 + trait clam { fn get(self) -> A; } struct foo(int); diff --git a/src/test/run-pass/issue-2316-c.rs b/src/test/run-pass/issue-2316-c.rs index a6fac423bb677..158e4570f2c70 100644 --- a/src/test/run-pass/issue-2316-c.rs +++ b/src/test/run-pass/issue-2316-c.rs @@ -11,6 +11,8 @@ // aux-build:issue_2316_a.rs // aux-build:issue_2316_b.rs +// pretty-expanded FIXME #23616 + extern crate issue_2316_b; use issue_2316_b::cloth; diff --git a/src/test/run-pass/issue-23435.rs b/src/test/run-pass/issue-23435.rs index dad7d0675d627..9b727826e6dc7 100644 --- a/src/test/run-pass/issue-23435.rs +++ b/src/test/run-pass/issue-23435.rs @@ -15,6 +15,8 @@ // instantiates all the methods, even those that could not otherwise // be called. +// pretty-expanded FIXME #23616 + struct Foo { x: i32 } diff --git a/src/test/run-pass/issue-2380-b.rs b/src/test/run-pass/issue-2380-b.rs index 22976aac6e774..b704162424713 100644 --- a/src/test/run-pass/issue-2380-b.rs +++ b/src/test/run-pass/issue-2380-b.rs @@ -10,6 +10,8 @@ // aux-build:issue-2380.rs +// pretty-expanded FIXME #23616 + extern crate a; pub fn main() { diff --git a/src/test/run-pass/issue-2383.rs b/src/test/run-pass/issue-2383.rs index f017193bc762b..9c400aac1dcf1 100644 --- a/src/test/run-pass/issue-2383.rs +++ b/src/test/run-pass/issue-2383.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/issue-2414-c.rs b/src/test/run-pass/issue-2414-c.rs index 0b891fbddccf1..2e047ae0127c7 100644 --- a/src/test/run-pass/issue-2414-c.rs +++ b/src/test/run-pass/issue-2414-c.rs @@ -11,6 +11,8 @@ // aux-build:issue-2414-a.rs // aux-build:issue-2414-b.rs +// pretty-expanded FIXME #23616 + extern crate b; pub fn main() {} diff --git a/src/test/run-pass/issue-2428.rs b/src/test/run-pass/issue-2428.rs index 7ed26428be04e..df604fd8e667c 100644 --- a/src/test/run-pass/issue-2428.rs +++ b/src/test/run-pass/issue-2428.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let _foo = 100; const quux: int = 5; diff --git a/src/test/run-pass/issue-2445-b.rs b/src/test/run-pass/issue-2445-b.rs index 91f76fc5ae061..7c72b3aad9290 100644 --- a/src/test/run-pass/issue-2445-b.rs +++ b/src/test/run-pass/issue-2445-b.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct c1 { x: T, } diff --git a/src/test/run-pass/issue-2445.rs b/src/test/run-pass/issue-2445.rs index 6356c87bfc961..3c72aa24f9b1c 100644 --- a/src/test/run-pass/issue-2445.rs +++ b/src/test/run-pass/issue-2445.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct c1 { x: T, } diff --git a/src/test/run-pass/issue-2463.rs b/src/test/run-pass/issue-2463.rs index 051ebd1ec045f..2dc913a8f93e9 100644 --- a/src/test/run-pass/issue-2463.rs +++ b/src/test/run-pass/issue-2463.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Pair { f: int, g: int } pub fn main() { diff --git a/src/test/run-pass/issue-2472.rs b/src/test/run-pass/issue-2472.rs index 53b0042405b0b..0cbdbda63756a 100644 --- a/src/test/run-pass/issue-2472.rs +++ b/src/test/run-pass/issue-2472.rs @@ -10,6 +10,8 @@ // aux-build:issue_2472_b.rs +// pretty-expanded FIXME #23616 + extern crate issue_2472_b; use issue_2472_b::{S, T}; diff --git a/src/test/run-pass/issue-2487-a.rs b/src/test/run-pass/issue-2487-a.rs index aa61d52b2a32d..1c62d6a5f4a24 100644 --- a/src/test/run-pass/issue-2487-a.rs +++ b/src/test/run-pass/issue-2487-a.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct socket { sock: int, diff --git a/src/test/run-pass/issue-2502.rs b/src/test/run-pass/issue-2502.rs index a62e329f106f5..63179cd14acda 100644 --- a/src/test/run-pass/issue-2502.rs +++ b/src/test/run-pass/issue-2502.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct font<'a> { fontbuf: &'a Vec , } diff --git a/src/test/run-pass/issue-2526-a.rs b/src/test/run-pass/issue-2526-a.rs index 18c59dc9adc8e..0c68c47023194 100644 --- a/src/test/run-pass/issue-2526-a.rs +++ b/src/test/run-pass/issue-2526-a.rs @@ -10,6 +10,8 @@ // aux-build:issue-2526.rs +// pretty-expanded FIXME #23616 + #![allow(unused_imports)] extern crate issue_2526; diff --git a/src/test/run-pass/issue-2550.rs b/src/test/run-pass/issue-2550.rs index c55de959a9464..d1e97e6cddf97 100644 --- a/src/test/run-pass/issue-2550.rs +++ b/src/test/run-pass/issue-2550.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct C { x: uint, } diff --git a/src/test/run-pass/issue-2611-3.rs b/src/test/run-pass/issue-2611-3.rs index c005699ce30b4..17ace84b1e8a5 100644 --- a/src/test/run-pass/issue-2611-3.rs +++ b/src/test/run-pass/issue-2611-3.rs @@ -11,6 +11,8 @@ // Tests that impls are allowed to have looser, more permissive bounds // than the traits require. +// pretty-expanded FIXME #23616 + trait A { fn b(&self, x: C) -> C; } diff --git a/src/test/run-pass/issue-2631-b.rs b/src/test/run-pass/issue-2631-b.rs index 84f046499e439..b6d180da849c0 100644 --- a/src/test/run-pass/issue-2631-b.rs +++ b/src/test/run-pass/issue-2631-b.rs @@ -11,6 +11,8 @@ // aux-build:issue-2631-a.rs +// pretty-expanded FIXME #23616 + extern crate req; use req::request; diff --git a/src/test/run-pass/issue-2633-2.rs b/src/test/run-pass/issue-2633-2.rs index 0bef42b6202ed..3812ead42f998 100644 --- a/src/test/run-pass/issue-2633-2.rs +++ b/src/test/run-pass/issue-2633-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-2642.rs b/src/test/run-pass/issue-2642.rs index dc6015545421c..113fe620d30de 100644 --- a/src/test/run-pass/issue-2642.rs +++ b/src/test/run-pass/issue-2642.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f() { let _x: uint = loop { loop { break; } }; } diff --git a/src/test/run-pass/issue-2708.rs b/src/test/run-pass/issue-2708.rs index 6aeec228c0d3e..3f9dc46775a1b 100644 --- a/src/test/run-pass/issue-2708.rs +++ b/src/test/run-pass/issue-2708.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-2723-b.rs b/src/test/run-pass/issue-2723-b.rs index bab7b0d24db70..7fee2fc16cbed 100644 --- a/src/test/run-pass/issue-2723-b.rs +++ b/src/test/run-pass/issue-2723-b.rs @@ -10,6 +10,8 @@ // aux-build:issue_2723_a.rs +// pretty-expanded FIXME #23616 + extern crate issue_2723_a; use issue_2723_a::f; diff --git a/src/test/run-pass/issue-2734.rs b/src/test/run-pass/issue-2734.rs index a7b53db6b0553..18cd9a87e6b05 100644 --- a/src/test/run-pass/issue-2734.rs +++ b/src/test/run-pass/issue-2734.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-2735-2.rs b/src/test/run-pass/issue-2735-2.rs index 0d1cf1c339227..1506b2d6bf089 100644 --- a/src/test/run-pass/issue-2735-2.rs +++ b/src/test/run-pass/issue-2735-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] use std::cell::Cell; diff --git a/src/test/run-pass/issue-2735-3.rs b/src/test/run-pass/issue-2735-3.rs index 658183cf6ff54..2282334d66d10 100644 --- a/src/test/run-pass/issue-2735-3.rs +++ b/src/test/run-pass/issue-2735-3.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] use std::cell::Cell; diff --git a/src/test/run-pass/issue-2735.rs b/src/test/run-pass/issue-2735.rs index 1594b94879cee..cd6c6a59e2a6c 100644 --- a/src/test/run-pass/issue-2735.rs +++ b/src/test/run-pass/issue-2735.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-2748-a.rs b/src/test/run-pass/issue-2748-a.rs index 23e26ca5665c5..ac1e65ee77634 100644 --- a/src/test/run-pass/issue-2748-a.rs +++ b/src/test/run-pass/issue-2748-a.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct CMap<'a> { buf: &'a [u8], } diff --git a/src/test/run-pass/issue-2748-b.rs b/src/test/run-pass/issue-2748-b.rs index 3ca8d49eb864d..5590f3432d509 100644 --- a/src/test/run-pass/issue-2748-b.rs +++ b/src/test/run-pass/issue-2748-b.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn thing<'r>(x: &'r [int]) -> &'r [int] { x } pub fn main() { diff --git a/src/test/run-pass/issue-2895.rs b/src/test/run-pass/issue-2895.rs index 5f7a4d87b9ae2..af5cf97519e94 100644 --- a/src/test/run-pass/issue-2895.rs +++ b/src/test/run-pass/issue-2895.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; struct Cat { diff --git a/src/test/run-pass/issue-2936.rs b/src/test/run-pass/issue-2936.rs index 183eb6e079f05..fb72773f49082 100644 --- a/src/test/run-pass/issue-2936.rs +++ b/src/test/run-pass/issue-2936.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait bar { fn get_bar(&self) -> T; } diff --git a/src/test/run-pass/issue-3012-2.rs b/src/test/run-pass/issue-3012-2.rs index a679ff5f718b2..ecce5df0fc200 100644 --- a/src/test/run-pass/issue-3012-2.rs +++ b/src/test/run-pass/issue-3012-2.rs @@ -10,6 +10,8 @@ // aux-build:issue-3012-1.rs +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, libc)] diff --git a/src/test/run-pass/issue-3026.rs b/src/test/run-pass/issue-3026.rs index 1ce6d6d38d8ff..e7cd7926b2e82 100644 --- a/src/test/run-pass/issue-3026.rs +++ b/src/test/run-pass/issue-3026.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, collections)] diff --git a/src/test/run-pass/issue-3037.rs b/src/test/run-pass/issue-3037.rs index 1555098f2911b..83a522a69e3d1 100644 --- a/src/test/run-pass/issue-3037.rs +++ b/src/test/run-pass/issue-3037.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum what { } fn what_to_string(x: what) -> String diff --git a/src/test/run-pass/issue-3052.rs b/src/test/run-pass/issue-3052.rs index 0784c8be883c8..8f013ee4f3a0f 100644 --- a/src/test/run-pass/issue-3052.rs +++ b/src/test/run-pass/issue-3052.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + type Connection = Box) + 'static>; fn f() -> Option { diff --git a/src/test/run-pass/issue-3091.rs b/src/test/run-pass/issue-3091.rs index c4c2c2b7da878..8e59e46fc3c4c 100644 --- a/src/test/run-pass/issue-3091.rs +++ b/src/test/run-pass/issue-3091.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = 1; let y = 1; diff --git a/src/test/run-pass/issue-3121.rs b/src/test/run-pass/issue-3121.rs index b6ed85e9e4a49..5a1fedbdccc37 100644 --- a/src/test/run-pass/issue-3121.rs +++ b/src/test/run-pass/issue-3121.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-3149.rs b/src/test/run-pass/issue-3149.rs index ab64fb4fbfa1f..fa33bd8fce80b 100644 --- a/src/test/run-pass/issue-3149.rs +++ b/src/test/run-pass/issue-3149.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn Matrix4(m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, m31: T, m32: T, m33: T, m34: T, diff --git a/src/test/run-pass/issue-3220.rs b/src/test/run-pass/issue-3220.rs index 9c44a7cfcc307..ae4d05c76e321 100644 --- a/src/test/run-pass/issue-3220.rs +++ b/src/test/run-pass/issue-3220.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct thing { x: int, } impl Drop for thing { diff --git a/src/test/run-pass/issue-3290.rs b/src/test/run-pass/issue-3290.rs index 1c1b329e314c1..3fa5b72c348f3 100644 --- a/src/test/run-pass/issue-3290.rs +++ b/src/test/run-pass/issue-3290.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-333.rs b/src/test/run-pass/issue-333.rs index 1217f32826f6d..b611f11a0a124 100644 --- a/src/test/run-pass/issue-333.rs +++ b/src/test/run-pass/issue-333.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn quux(x: T) -> T { let f = id::; return f(x); } fn id(x: T) -> T { return x; } diff --git a/src/test/run-pass/issue-3429.rs b/src/test/run-pass/issue-3429.rs index e331a1a2d0c1d..325a3ec715124 100644 --- a/src/test/run-pass/issue-3429.rs +++ b/src/test/run-pass/issue-3429.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = 1_usize; let y = || x; diff --git a/src/test/run-pass/issue-3500.rs b/src/test/run-pass/issue-3500.rs index 99def5476f9a0..f1d9f888b0816 100644 --- a/src/test/run-pass/issue-3500.rs +++ b/src/test/run-pass/issue-3500.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = &Some(1); match x { diff --git a/src/test/run-pass/issue-3563-2.rs b/src/test/run-pass/issue-3563-2.rs index 2cf29296b8591..6443ba243e276 100644 --- a/src/test/run-pass/issue-3563-2.rs +++ b/src/test/run-pass/issue-3563-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Canvas { fn add_point(&self, point: &int); fn add_points(&self, shapes: &[int]) { diff --git a/src/test/run-pass/issue-3574.rs b/src/test/run-pass/issue-3574.rs index e31f2ade125eb..9a521ba376dc2 100644 --- a/src/test/run-pass/issue-3574.rs +++ b/src/test/run-pass/issue-3574.rs @@ -10,6 +10,8 @@ // rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs +// pretty-expanded FIXME #23616 + fn compare(x: &str, y: &str) -> bool { match x { "foo" => y == "foo", diff --git a/src/test/run-pass/issue-3656.rs b/src/test/run-pass/issue-3656.rs index 5be64522477b3..10930474799c5 100644 --- a/src/test/run-pass/issue-3656.rs +++ b/src/test/run-pass/issue-3656.rs @@ -12,6 +12,8 @@ // Incorrect struct size computation in the FFI, because of not taking // the alignment of elements into account. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/issue-3874.rs b/src/test/run-pass/issue-3874.rs index 9226bebd2dcea..0fe1e2af0c140 100644 --- a/src/test/run-pass/issue-3874.rs +++ b/src/test/run-pass/issue-3874.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum PureCounter { PureCounterVariant(uint) } fn each(thing: PureCounter, blk: F) where F: FnOnce(&uint) { diff --git a/src/test/run-pass/issue-3878.rs b/src/test/run-pass/issue-3878.rs index 1f53d9ce5422f..c98110b9054be 100644 --- a/src/test/run-pass/issue-3878.rs +++ b/src/test/run-pass/issue-3878.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(path_statement)] #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-3888-2.rs b/src/test/run-pass/issue-3888-2.rs index bf3d0b786af65..24c1a5d05c89f 100644 --- a/src/test/run-pass/issue-3888-2.rs +++ b/src/test/run-pass/issue-3888-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] { &v[1..5] } diff --git a/src/test/run-pass/issue-3895.rs b/src/test/run-pass/issue-3895.rs index b2254001320c4..ca6d9faf88f4a 100644 --- a/src/test/run-pass/issue-3895.rs +++ b/src/test/run-pass/issue-3895.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { enum State { BadChar, BadSyntax } diff --git a/src/test/run-pass/issue-3935.rs b/src/test/run-pass/issue-3935.rs index f534f744a2030..1e200e01628a5 100644 --- a/src/test/run-pass/issue-3935.rs +++ b/src/test/run-pass/issue-3935.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(PartialEq)] struct Bike { name: String, diff --git a/src/test/run-pass/issue-3979-2.rs b/src/test/run-pass/issue-3979-2.rs index 39e9f5dcd2d8d..4cd3c04bac3c2 100644 --- a/src/test/run-pass/issue-3979-2.rs +++ b/src/test/run-pass/issue-3979-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn a_method(&self); } diff --git a/src/test/run-pass/issue-3979-generics.rs b/src/test/run-pass/issue-3979-generics.rs index 180bd292f8433..14e1b635e9446 100644 --- a/src/test/run-pass/issue-3979-generics.rs +++ b/src/test/run-pass/issue-3979-generics.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ops::Add; trait Positioned { diff --git a/src/test/run-pass/issue-3979-xcrate.rs b/src/test/run-pass/issue-3979-xcrate.rs index a062b4c71752f..ddd005224523c 100644 --- a/src/test/run-pass/issue-3979-xcrate.rs +++ b/src/test/run-pass/issue-3979-xcrate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:issue_3979_traits.rs +// pretty-expanded FIXME #23616 + extern crate issue_3979_traits; use issue_3979_traits::{Positioned, Movable}; diff --git a/src/test/run-pass/issue-3979.rs b/src/test/run-pass/issue-3979.rs index 36939a2877ec0..06d1cfa0e0d3a 100644 --- a/src/test/run-pass/issue-3979.rs +++ b/src/test/run-pass/issue-3979.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Positioned { fn SetX(&mut self, int); fn X(&self) -> int; diff --git a/src/test/run-pass/issue-3991.rs b/src/test/run-pass/issue-3991.rs index 37144fb9cce77..77fb488488c24 100644 --- a/src/test/run-pass/issue-3991.rs +++ b/src/test/run-pass/issue-3991.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct HasNested { nest: Vec > , } diff --git a/src/test/run-pass/issue-4016.rs b/src/test/run-pass/issue-4016.rs index a761345e1d989..122de97c99c1c 100644 --- a/src/test/run-pass/issue-4016.rs +++ b/src/test/run-pass/issue-4016.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/issue-4036.rs b/src/test/run-pass/issue-4036.rs index 865f729a4d353..b4aaf4cc7e987 100644 --- a/src/test/run-pass/issue-4036.rs +++ b/src/test/run-pass/issue-4036.rs @@ -12,6 +12,8 @@ // Issue #4036: Test for an issue that arose around fixing up type inference // byproducts in vtable records. +// pretty-expanded FIXME #23616 + #![feature(rustc_private)] extern crate serialize; diff --git a/src/test/run-pass/issue-4107.rs b/src/test/run-pass/issue-4107.rs index d660f300ada99..0be76dd1b2243 100644 --- a/src/test/run-pass/issue-4107.rs +++ b/src/test/run-pass/issue-4107.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let _id: &Mat2 = &Matrix::identity(1.0); } diff --git a/src/test/run-pass/issue-4208.rs b/src/test/run-pass/issue-4208.rs index c186f1e57f9a1..52f5d53c046ab 100644 --- a/src/test/run-pass/issue-4208.rs +++ b/src/test/run-pass/issue-4208.rs @@ -10,6 +10,8 @@ // aux-build:issue-4208-cc.rs +// pretty-expanded FIXME #23616 + extern crate numeric; use numeric::{sin, Angle}; diff --git a/src/test/run-pass/issue-4228.rs b/src/test/run-pass/issue-4228.rs index 8cae8dd7915a0..3d283849b1f9c 100644 --- a/src/test/run-pass/issue-4228.rs +++ b/src/test/run-pass/issue-4228.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo; impl Foo { diff --git a/src/test/run-pass/issue-4333.rs b/src/test/run-pass/issue-4333.rs index f92bed87ba669..48753e15a705d 100644 --- a/src/test/run-pass/issue-4333.rs +++ b/src/test/run-pass/issue-4333.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(io)] use std::io; diff --git a/src/test/run-pass/issue-4387.rs b/src/test/run-pass/issue-4387.rs index 02601ba2f2a02..9c4ae04bf7b7f 100644 --- a/src/test/run-pass/issue-4387.rs +++ b/src/test/run-pass/issue-4387.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let _foo = [0; 2*4]; } diff --git a/src/test/run-pass/issue-4446.rs b/src/test/run-pass/issue-4446.rs index 8dd385b59c964..9f8d93461a263 100644 --- a/src/test/run-pass/issue-4446.rs +++ b/src/test/run-pass/issue-4446.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io)] use std::old_io::println; diff --git a/src/test/run-pass/issue-4448.rs b/src/test/run-pass/issue-4448.rs index ef30f9182ba69..d5d3122f6834b 100644 --- a/src/test/run-pass/issue-4448.rs +++ b/src/test/run-pass/issue-4448.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::mpsc::channel; use std::thread; diff --git a/src/test/run-pass/issue-4464.rs b/src/test/run-pass/issue-4464.rs index 33a5c7a167f99..753500cec99e9 100644 --- a/src/test/run-pass/issue-4464.rs +++ b/src/test/run-pass/issue-4464.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn broken(v: &[u8], i: uint, j: uint) -> &[u8] { &v[i..j] } pub fn main() {} diff --git a/src/test/run-pass/issue-4542.rs b/src/test/run-pass/issue-4542.rs index 521e1b40f992e..23e8f5b0bda04 100644 --- a/src/test/run-pass/issue-4542.rs +++ b/src/test/run-pass/issue-4542.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::env; pub fn main() { diff --git a/src/test/run-pass/issue-4545.rs b/src/test/run-pass/issue-4545.rs index bf03b4c45326e..a9d04167a41db 100644 --- a/src/test/run-pass/issue-4545.rs +++ b/src/test/run-pass/issue-4545.rs @@ -10,5 +10,7 @@ // aux-build:issue-4545.rs +// pretty-expanded FIXME #23616 + extern crate "issue-4545" as somelib; pub fn main() { somelib::mk::(); } diff --git a/src/test/run-pass/issue-4734.rs b/src/test/run-pass/issue-4734.rs index c08d3503fa4c1..30c8cb1bfa458 100644 --- a/src/test/run-pass/issue-4734.rs +++ b/src/test/run-pass/issue-4734.rs @@ -11,6 +11,8 @@ // Ensures that destructors are run for expressions of the form "e;" where // `e` is a type which requires a destructor. +// pretty-expanded FIXME #23616 + #![allow(path_statement)] struct A { n: int } diff --git a/src/test/run-pass/issue-4735.rs b/src/test/run-pass/issue-4735.rs index 568b8bc89a037..45db84ca93af0 100644 --- a/src/test/run-pass/issue-4735.rs +++ b/src/test/run-pass/issue-4735.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, libc)] diff --git a/src/test/run-pass/issue-4759-1.rs b/src/test/run-pass/issue-4759-1.rs index a565460c42e28..3532a395b7a2d 100644 --- a/src/test/run-pass/issue-4759-1.rs +++ b/src/test/run-pass/issue-4759-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait U { fn f(self); } impl U for isize { fn f(self) {} } pub fn main() { 4.f(); } diff --git a/src/test/run-pass/issue-4759.rs b/src/test/run-pass/issue-4759.rs index 142f088a68469..c2fc559ae81d3 100644 --- a/src/test/run-pass/issue-4759.rs +++ b/src/test/run-pass/issue-4759.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-4830.rs b/src/test/run-pass/issue-4830.rs index 7fc1c10895ef6..15d870b12a719 100644 --- a/src/test/run-pass/issue-4830.rs +++ b/src/test/run-pass/issue-4830.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct Scheduler { /// The event loop used to drive the scheduler and perform I/O event_loop: Box diff --git a/src/test/run-pass/issue-4875.rs b/src/test/run-pass/issue-4875.rs index 9c1e782ffce19..7ac96c21c621a 100644 --- a/src/test/run-pass/issue-4875.rs +++ b/src/test/run-pass/issue-4875.rs @@ -10,6 +10,8 @@ // regression test for issue 4875 +// pretty-expanded FIXME #23616 + pub struct Foo { data: T, } diff --git a/src/test/run-pass/issue-5192.rs b/src/test/run-pass/issue-5192.rs index a6f3771bf62b4..2a871522b447e 100644 --- a/src/test/run-pass/issue-5192.rs +++ b/src/test/run-pass/issue-5192.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-5239-2.rs b/src/test/run-pass/issue-5239-2.rs index dd9a6fb35439e..6720bb3f0f95d 100644 --- a/src/test/run-pass/issue-5239-2.rs +++ b/src/test/run-pass/issue-5239-2.rs @@ -10,6 +10,8 @@ // Regression test for issue #5239 +// pretty-expanded FIXME #23616 + pub fn main() { let _f = |ref x: int| { *x }; let foo = 10; diff --git a/src/test/run-pass/issue-5243.rs b/src/test/run-pass/issue-5243.rs index f5d2c38147293..31dc8208725c0 100644 --- a/src/test/run-pass/issue-5243.rs +++ b/src/test/run-pass/issue-5243.rs @@ -12,6 +12,8 @@ // enough for trans to consider this as non-monomorphic, // which led to various assertions and failures in turn. +// pretty-expanded FIXME #23616 + struct S<'a> { v: &'a int } diff --git a/src/test/run-pass/issue-5315.rs b/src/test/run-pass/issue-5315.rs index 1d2e7b79931f9..b8532c55c4cb6 100644 --- a/src/test/run-pass/issue-5315.rs +++ b/src/test/run-pass/issue-5315.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A(bool); pub fn main() { diff --git a/src/test/run-pass/issue-5353.rs b/src/test/run-pass/issue-5353.rs index 1f6493d961c5a..34ef63572ae1e 100644 --- a/src/test/run-pass/issue-5353.rs +++ b/src/test/run-pass/issue-5353.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const INVALID_ENUM : u32 = 0; const INVALID_VALUE : u32 = 1; diff --git a/src/test/run-pass/issue-5518.rs b/src/test/run-pass/issue-5518.rs index a28bc9f825d5d..e24b69bb0de1f 100644 --- a/src/test/run-pass/issue-5518.rs +++ b/src/test/run-pass/issue-5518.rs @@ -10,6 +10,8 @@ // aux-build:issue-5518.rs +// pretty-expanded FIXME #23616 + extern crate "issue-5518" as other; fn main() {} diff --git a/src/test/run-pass/issue-5521.rs b/src/test/run-pass/issue-5521.rs index fb0e8e599eb2a..c41f1ecd96a0c 100644 --- a/src/test/run-pass/issue-5521.rs +++ b/src/test/run-pass/issue-5521.rs @@ -11,6 +11,8 @@ // aux-build:issue-5521.rs +// pretty-expanded FIXME #23616 + extern crate "issue-5521" as foo; fn bar(a: foo::map) { diff --git a/src/test/run-pass/issue-5530.rs b/src/test/run-pass/issue-5530.rs index a9e1ffcb34510..7b3d226fe124e 100644 --- a/src/test/run-pass/issue-5530.rs +++ b/src/test/run-pass/issue-5530.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Enum { Foo { foo: uint }, Bar { bar: uint } diff --git a/src/test/run-pass/issue-5550.rs b/src/test/run-pass/issue-5550.rs index f87f1d8af7649..91741f938a5a0 100644 --- a/src/test/run-pass/issue-5550.rs +++ b/src/test/run-pass/issue-5550.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] pub fn main() { diff --git a/src/test/run-pass/issue-5554.rs b/src/test/run-pass/issue-5554.rs index 32fca7a182c1b..63dcae41d8384 100644 --- a/src/test/run-pass/issue-5554.rs +++ b/src/test/run-pass/issue-5554.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::default::Default; pub struct X { diff --git a/src/test/run-pass/issue-5572.rs b/src/test/run-pass/issue-5572.rs index 4e57ed94991cb..6ae9dc68a5c67 100644 --- a/src/test/run-pass/issue-5572.rs +++ b/src/test/run-pass/issue-5572.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(_t: T) { } pub fn main() { } diff --git a/src/test/run-pass/issue-5718.rs b/src/test/run-pass/issue-5718.rs index 7e773cd799476..8eea99cf56236 100644 --- a/src/test/run-pass/issue-5718.rs +++ b/src/test/run-pass/issue-5718.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-5741.rs b/src/test/run-pass/issue-5741.rs index 0aaa0c8624104..5190bd95adadc 100644 --- a/src/test/run-pass/issue-5741.rs +++ b/src/test/run-pass/issue-5741.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unreachable_code)] pub fn main() { diff --git a/src/test/run-pass/issue-5754.rs b/src/test/run-pass/issue-5754.rs index b2eeedfbdc922..e6bc516acc39f 100644 --- a/src/test/run-pass/issue-5754.rs +++ b/src/test/run-pass/issue-5754.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct TwoDoubles { r: f64, i: f64 diff --git a/src/test/run-pass/issue-5791.rs b/src/test/run-pass/issue-5791.rs index c6017d7d6508f..aad90bd4181d9 100644 --- a/src/test/run-pass/issue-5791.rs +++ b/src/test/run-pass/issue-5791.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/issue-5884.rs b/src/test/run-pass/issue-5884.rs index 6502c66d85821..d798560a232a1 100644 --- a/src/test/run-pass/issue-5884.rs +++ b/src/test/run-pass/issue-5884.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-5900.rs b/src/test/run-pass/issue-5900.rs index 4518b503c0dc5..65ece1f671154 100644 --- a/src/test/run-pass/issue-5900.rs +++ b/src/test/run-pass/issue-5900.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub mod foo { use super::Bar; diff --git a/src/test/run-pass/issue-5917.rs b/src/test/run-pass/issue-5917.rs index 5b6012673564d..56122700683b7 100644 --- a/src/test/run-pass/issue-5917.rs +++ b/src/test/run-pass/issue-5917.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct T (&'static [int]); static t : T = T (&[5, 4, 3]); pub fn main () { diff --git a/src/test/run-pass/issue-5950.rs b/src/test/run-pass/issue-5950.rs index 88bbba44bbe14..b0e01db14d85a 100644 --- a/src/test/run-pass/issue-5950.rs +++ b/src/test/run-pass/issue-5950.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub use local as local_alias; pub mod local { } diff --git a/src/test/run-pass/issue-5988.rs b/src/test/run-pass/issue-5988.rs index dae4bc35c2747..8ec88d55721d3 100644 --- a/src/test/run-pass/issue-5988.rs +++ b/src/test/run-pass/issue-5988.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io)] use std::old_io; diff --git a/src/test/run-pass/issue-5997.rs b/src/test/run-pass/issue-5997.rs index 0ce8823bc99aa..dd311c812e50f 100644 --- a/src/test/run-pass/issue-5997.rs +++ b/src/test/run-pass/issue-5997.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f() -> bool { enum E { V(T) } diff --git a/src/test/run-pass/issue-6117.rs b/src/test/run-pass/issue-6117.rs index 562e2b68af174..555272974021a 100644 --- a/src/test/run-pass/issue-6117.rs +++ b/src/test/run-pass/issue-6117.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Either { Left(T), Right(U) } pub fn main() { diff --git a/src/test/run-pass/issue-6128.rs b/src/test/run-pass/issue-6128.rs index e1e71be72eb0f..84baff9aae1d8 100644 --- a/src/test/run-pass/issue-6128.rs +++ b/src/test/run-pass/issue-6128.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, collections)] diff --git a/src/test/run-pass/issue-6130.rs b/src/test/run-pass/issue-6130.rs index 1a1f538a548b7..1f204ab896b9f 100644 --- a/src/test/run-pass/issue-6130.rs +++ b/src/test/run-pass/issue-6130.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![deny(type_limits)] pub fn main() { diff --git a/src/test/run-pass/issue-6153.rs b/src/test/run-pass/issue-6153.rs index b2b64e62c39a4..5df3478c84cda 100644 --- a/src/test/run-pass/issue-6153.rs +++ b/src/test/run-pass/issue-6153.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn swap(f: F) -> Vec where F: FnOnce(Vec) -> Vec { let x = vec!(1, 2, 3); f(x) diff --git a/src/test/run-pass/issue-6157.rs b/src/test/run-pass/issue-6157.rs index 39f387afaba04..756aaece681ab 100644 --- a/src/test/run-pass/issue-6157.rs +++ b/src/test/run-pass/issue-6157.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub trait OpInt { fn call(&mut self, int, int) -> int; } impl OpInt for F where F: FnMut(int, int) -> int { diff --git a/src/test/run-pass/issue-6318.rs b/src/test/run-pass/issue-6318.rs index 61bc70465e0f2..12b71f519b1e6 100644 --- a/src/test/run-pass/issue-6318.rs +++ b/src/test/run-pass/issue-6318.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-6334.rs b/src/test/run-pass/issue-6334.rs index 67440b6ec1c91..fa546a80bfbc3 100644 --- a/src/test/run-pass/issue-6334.rs +++ b/src/test/run-pass/issue-6334.rs @@ -11,6 +11,8 @@ // Tests that everything still compiles and runs fine even when // we reorder the bounds. +// pretty-expanded FIXME #23616 + trait A { fn a(&self) -> uint; } diff --git a/src/test/run-pass/issue-6341.rs b/src/test/run-pass/issue-6341.rs index 6e49c0435665d..8ca921f5a0595 100644 --- a/src/test/run-pass/issue-6341.rs +++ b/src/test/run-pass/issue-6341.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(PartialEq)] struct A { x: uint } diff --git a/src/test/run-pass/issue-6449.rs b/src/test/run-pass/issue-6449.rs index 9a5fc7763f63b..6d2b3ffc75beb 100644 --- a/src/test/run-pass/issue-6449.rs +++ b/src/test/run-pass/issue-6449.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { Bar(int), Baz, diff --git a/src/test/run-pass/issue-6470.rs b/src/test/run-pass/issue-6470.rs index ef164150804b9..05a5dcbc3f889 100644 --- a/src/test/run-pass/issue-6470.rs +++ b/src/test/run-pass/issue-6470.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub mod Bar { pub struct Foo { v: int, diff --git a/src/test/run-pass/issue-6557.rs b/src/test/run-pass/issue-6557.rs index b9f4f1cf3bd51..a618b3d2e7cd9 100644 --- a/src/test/run-pass/issue-6557.rs +++ b/src/test/run-pass/issue-6557.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/issue-6892.rs b/src/test/run-pass/issue-6892.rs index 6faca339651c0..43da077ab1f8f 100644 --- a/src/test/run-pass/issue-6892.rs +++ b/src/test/run-pass/issue-6892.rs @@ -11,6 +11,8 @@ // Ensures that destructors are run for expressions of the form "let _ = e;" // where `e` is a type which requires a destructor. +// pretty-expanded FIXME #23616 + struct Foo; struct Bar { x: int } struct Baz(int); diff --git a/src/test/run-pass/issue-6898.rs b/src/test/run-pass/issue-6898.rs index f40c37b77a32f..19e59ea2d7331 100644 --- a/src/test/run-pass/issue-6898.rs +++ b/src/test/run-pass/issue-6898.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::intrinsics; diff --git a/src/test/run-pass/issue-6919.rs b/src/test/run-pass/issue-6919.rs index 10dae96d88d94..3495c0eb1aed3 100644 --- a/src/test/run-pass/issue-6919.rs +++ b/src/test/run-pass/issue-6919.rs @@ -10,6 +10,8 @@ // aux-build:iss.rs +// pretty-expanded FIXME #23616 + #![crate_id="issue-6919"] extern crate issue6919_3; diff --git a/src/test/run-pass/issue-7178.rs b/src/test/run-pass/issue-7178.rs index 6ef740b2a5051..3180927f74d88 100644 --- a/src/test/run-pass/issue-7178.rs +++ b/src/test/run-pass/issue-7178.rs @@ -10,6 +10,8 @@ // aux-build:issue-7178.rs +// pretty-expanded FIXME #23616 + extern crate "issue-7178" as cross_crate_self; pub fn main() { diff --git a/src/test/run-pass/issue-7222.rs b/src/test/run-pass/issue-7222.rs index 0ca4e428bc403..1bf343e23f0c1 100644 --- a/src/test/run-pass/issue-7222.rs +++ b/src/test/run-pass/issue-7222.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { const FOO: f64 = 10.0; diff --git a/src/test/run-pass/issue-7268.rs b/src/test/run-pass/issue-7268.rs index 8aa9592731230..626adfe292bfa 100644 --- a/src/test/run-pass/issue-7268.rs +++ b/src/test/run-pass/issue-7268.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(_: T) {} fn bar(x: &'static T) { diff --git a/src/test/run-pass/issue-7344.rs b/src/test/run-pass/issue-7344.rs index 6e2ed27725c0f..fb348fb453804 100644 --- a/src/test/run-pass/issue-7344.rs +++ b/src/test/run-pass/issue-7344.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unreachable_code)] fn foo() -> bool { false } diff --git a/src/test/run-pass/issue-7519-match-unit-in-arg.rs b/src/test/run-pass/issue-7519-match-unit-in-arg.rs index 75123243f47d6..c5c59407ab231 100644 --- a/src/test/run-pass/issue-7519-match-unit-in-arg.rs +++ b/src/test/run-pass/issue-7519-match-unit-in-arg.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* #7519 ICE pattern matching unit in function argument */ diff --git a/src/test/run-pass/issue-7575.rs b/src/test/run-pass/issue-7575.rs index 77cfc7f0cf607..471caa551498f 100644 --- a/src/test/run-pass/issue-7575.rs +++ b/src/test/run-pass/issue-7575.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn new() -> bool { false } fn dummy(&self) { } diff --git a/src/test/run-pass/issue-7607-2.rs b/src/test/run-pass/issue-7607-2.rs index a0408a0359070..799513e6e4f21 100644 --- a/src/test/run-pass/issue-7607-2.rs +++ b/src/test/run-pass/issue-7607-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub mod a { pub struct Foo { a: usize } } diff --git a/src/test/run-pass/issue-7660.rs b/src/test/run-pass/issue-7660.rs index 27c5796ece904..e4d56bdd70087 100644 --- a/src/test/run-pass/issue-7660.rs +++ b/src/test/run-pass/issue-7660.rs @@ -11,6 +11,8 @@ // Regression test for issue 7660 // rvalue lifetime too short when equivalent `match` works +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/issue-7663.rs b/src/test/run-pass/issue-7663.rs index 0ff265e483efe..3b954ff19481a 100644 --- a/src/test/run-pass/issue-7663.rs +++ b/src/test/run-pass/issue-7663.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_imports, dead_code)] mod test1 { diff --git a/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs b/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs index 736860947f23c..43b5a997c19a5 100644 --- a/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs +++ b/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* #7673 Polymorphically creating traits barely works diff --git a/src/test/run-pass/issue-7784.rs b/src/test/run-pass/issue-7784.rs index a61ee8c2a0bd1..9dc2bd8118285 100644 --- a/src/test/run-pass/issue-7784.rs +++ b/src/test/run-pass/issue-7784.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(advanced_slice_patterns)] use std::ops::Add; diff --git a/src/test/run-pass/issue-7899.rs b/src/test/run-pass/issue-7899.rs index 4b3d46f483399..a830de42862df 100644 --- a/src/test/run-pass/issue-7899.rs +++ b/src/test/run-pass/issue-7899.rs @@ -10,6 +10,8 @@ // aux-build:issue-7899.rs +// pretty-expanded FIXME #23616 + extern crate "issue-7899" as testcrate; fn main() { diff --git a/src/test/run-pass/issue-8044.rs b/src/test/run-pass/issue-8044.rs index 504441e3ba96b..284b0ff034815 100644 --- a/src/test/run-pass/issue-8044.rs +++ b/src/test/run-pass/issue-8044.rs @@ -10,6 +10,8 @@ // aux-build:issue-8044.rs +// pretty-expanded FIXME #23616 + extern crate "issue-8044" as minimal; use minimal::{BTree, leaf}; diff --git a/src/test/run-pass/issue-8171-default-method-self-inherit-builtin-trait.rs b/src/test/run-pass/issue-8171-default-method-self-inherit-builtin-trait.rs index 3238c24163e17..92d1c7c5a1c3d 100644 --- a/src/test/run-pass/issue-8171-default-method-self-inherit-builtin-trait.rs +++ b/src/test/run-pass/issue-8171-default-method-self-inherit-builtin-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* #8171 Self is not recognised as implementing kinds in default method implementations diff --git a/src/test/run-pass/issue-8248.rs b/src/test/run-pass/issue-8248.rs index 3800564b867ba..b58be361f15d0 100644 --- a/src/test/run-pass/issue-8248.rs +++ b/src/test/run-pass/issue-8248.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn dummy(&self) { } } diff --git a/src/test/run-pass/issue-8249.rs b/src/test/run-pass/issue-8249.rs index 10d3ade648d0c..3e65bc000ff84 100644 --- a/src/test/run-pass/issue-8249.rs +++ b/src/test/run-pass/issue-8249.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn dummy(&self) { } } diff --git a/src/test/run-pass/issue-8259.rs b/src/test/run-pass/issue-8259.rs index fb893873bc4d3..34e5ee5621b15 100644 --- a/src/test/run-pass/issue-8259.rs +++ b/src/test/run-pass/issue-8259.rs @@ -10,6 +10,8 @@ // aux-build:issue-8259.rs +// pretty-expanded FIXME #23616 + extern crate "issue-8259" as other; static a: other::Foo<'static> = other::Foo::A; diff --git a/src/test/run-pass/issue-8351-1.rs b/src/test/run-pass/issue-8351-1.rs index b7e6facc58187..4e42f943d356c 100644 --- a/src/test/run-pass/issue-8351-1.rs +++ b/src/test/run-pass/issue-8351-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { Foo{f: int}, Bar, diff --git a/src/test/run-pass/issue-8351-2.rs b/src/test/run-pass/issue-8351-2.rs index 40e0b3a8eeccb..10dd803d050c7 100644 --- a/src/test/run-pass/issue-8351-2.rs +++ b/src/test/run-pass/issue-8351-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { Foo{f: int, b: bool}, Bar, diff --git a/src/test/run-pass/issue-8391.rs b/src/test/run-pass/issue-8391.rs index 86c9b8c696469..bd2e2871bdb49 100644 --- a/src/test/run-pass/issue-8391.rs +++ b/src/test/run-pass/issue-8391.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let x = match Some(1) { ref _y @ Some(_) => 1, diff --git a/src/test/run-pass/issue-8398.rs b/src/test/run-pass/issue-8398.rs index 80863c3d6f641..8eb10a199eaae 100644 --- a/src/test/run-pass/issue-8398.rs +++ b/src/test/run-pass/issue-8398.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io, io)] use std::old_io; diff --git a/src/test/run-pass/issue-8401.rs b/src/test/run-pass/issue-8401.rs index 1ca91366f362c..afdd572b129a3 100644 --- a/src/test/run-pass/issue-8401.rs +++ b/src/test/run-pass/issue-8401.rs @@ -10,6 +10,8 @@ // aux-build:issue_8401.rs +// pretty-expanded FIXME #23616 + extern crate issue_8401; pub fn main() {} diff --git a/src/test/run-pass/issue-8460.rs b/src/test/run-pass/issue-8460.rs index 929adbdab491c..0ef668794ec0d 100644 --- a/src/test/run-pass/issue-8460.rs +++ b/src/test/run-pass/issue-8460.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::num::Int; diff --git a/src/test/run-pass/issue-8498.rs b/src/test/run-pass/issue-8498.rs index d4d2603bfe244..825729b1e2a81 100644 --- a/src/test/run-pass/issue-8498.rs +++ b/src/test/run-pass/issue-8498.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { match &[(Box::new(5),Box::new(7))] { ps => { diff --git a/src/test/run-pass/issue-8506.rs b/src/test/run-pass/issue-8506.rs index 54dfe2b9dab51..24632a0d13a10 100644 --- a/src/test/run-pass/issue-8506.rs +++ b/src/test/run-pass/issue-8506.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] enum Either { diff --git a/src/test/run-pass/issue-8578.rs b/src/test/run-pass/issue-8578.rs index 275fe740db157..ce392f8d881d4 100644 --- a/src/test/run-pass/issue-8578.rs +++ b/src/test/run-pass/issue-8578.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub struct UninterpretedOption_NamePart { name_part: Option, } diff --git a/src/test/run-pass/issue-868.rs b/src/test/run-pass/issue-868.rs index e47999fc46860..64b463ddf5c68 100644 --- a/src/test/run-pass/issue-868.rs +++ b/src/test/run-pass/issue-868.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(g: F) -> T where F: FnOnce() -> T { g() } pub fn main() { diff --git a/src/test/run-pass/issue-8709.rs b/src/test/run-pass/issue-8709.rs index 865905bf50441..a75696fbe2930 100644 --- a/src/test/run-pass/issue-8709.rs +++ b/src/test/run-pass/issue-8709.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! sty { ($t:ty) => (stringify!($t)) } diff --git a/src/test/run-pass/issue-8783.rs b/src/test/run-pass/issue-8783.rs index 303dd191006ad..8097df4927adf 100644 --- a/src/test/run-pass/issue-8783.rs +++ b/src/test/run-pass/issue-8783.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::default::Default; struct X { pub x: uint } diff --git a/src/test/run-pass/issue-8851.rs b/src/test/run-pass/issue-8851.rs index b70711f9f39e2..48cb2a64bb7fc 100644 --- a/src/test/run-pass/issue-8851.rs +++ b/src/test/run-pass/issue-8851.rs @@ -13,6 +13,8 @@ // doesn't cause capture. Making this macro hygienic (as I've done) // could very well make this test case completely pointless.... +// pretty-expanded FIXME #23616 + enum T { A(int), B(uint) diff --git a/src/test/run-pass/issue-8860.rs b/src/test/run-pass/issue-8860.rs index 72e2a33b43eac..968f621037fa5 100644 --- a/src/test/run-pass/issue-8860.rs +++ b/src/test/run-pass/issue-8860.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static mut DROP: int = 0; static mut DROP_S: int = 0; static mut DROP_T: int = 0; diff --git a/src/test/run-pass/issue-8898.rs b/src/test/run-pass/issue-8898.rs index b1c443dd0c51b..a4cad1b263952 100644 --- a/src/test/run-pass/issue-8898.rs +++ b/src/test/run-pass/issue-8898.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn assert_repr_eq(obj : T, expected : String) { assert_eq!(expected, format!("{:?}", obj)); } diff --git a/src/test/run-pass/issue-9110.rs b/src/test/run-pass/issue-9110.rs index 09d0f20c96d6c..298ae5e6aaca8 100644 --- a/src/test/run-pass/issue-9110.rs +++ b/src/test/run-pass/issue-9110.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! silly_macro { () => ( pub mod Qux { diff --git a/src/test/run-pass/issue-9123.rs b/src/test/run-pass/issue-9123.rs index f66215aa43f8c..4da0c22a0b1bf 100644 --- a/src/test/run-pass/issue-9123.rs +++ b/src/test/run-pass/issue-9123.rs @@ -10,6 +10,8 @@ // aux-build:issue_9123.rs +// pretty-expanded FIXME #23616 + extern crate issue_9123; pub fn main() {} diff --git a/src/test/run-pass/issue-9188.rs b/src/test/run-pass/issue-9188.rs index 73d3b35593569..1600ce22dd4d6 100644 --- a/src/test/run-pass/issue-9188.rs +++ b/src/test/run-pass/issue-9188.rs @@ -10,6 +10,8 @@ // aux-build:issue_9188.rs +// pretty-expanded FIXME #23616 + extern crate issue_9188; pub fn main() { diff --git a/src/test/run-pass/issue-9249.rs b/src/test/run-pass/issue-9249.rs index 2795fd59c0c0d..e4d848dbd754c 100644 --- a/src/test/run-pass/issue-9249.rs +++ b/src/test/run-pass/issue-9249.rs @@ -8,5 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static DATA:&'static [&'static str] = &["my string"]; fn main() { } diff --git a/src/test/run-pass/issue-9259.rs b/src/test/run-pass/issue-9259.rs index da5338b8c3c61..209c6b139612f 100644 --- a/src/test/run-pass/issue-9259.rs +++ b/src/test/run-pass/issue-9259.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A<'a> { a: &'a [String], b: Option<&'a [String]>, diff --git a/src/test/run-pass/issue-9382.rs b/src/test/run-pass/issue-9382.rs index c501420fa617a..f9cc8cb293fd1 100644 --- a/src/test/run-pass/issue-9382.rs +++ b/src/test/run-pass/issue-9382.rs @@ -1,3 +1,5 @@ +// pretty-expanded FIXME #23616 + // Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. diff --git a/src/test/run-pass/issue-9394-inherited-trait-calls.rs b/src/test/run-pass/issue-9394-inherited-trait-calls.rs index 7273a45d89326..148d0760e5c02 100644 --- a/src/test/run-pass/issue-9394-inherited-trait-calls.rs +++ b/src/test/run-pass/issue-9394-inherited-trait-calls.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Base: Base2 + Base3{ fn foo(&self) -> String; fn foo1(&self) -> String; diff --git a/src/test/run-pass/issue-9396.rs b/src/test/run-pass/issue-9396.rs index 98fc79882c09d..aeba6889f49e8 100644 --- a/src/test/run-pass/issue-9396.rs +++ b/src/test/run-pass/issue-9396.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io, std_misc)] use std::sync::mpsc::{TryRecvError, channel}; diff --git a/src/test/run-pass/issue-9719.rs b/src/test/run-pass/issue-9719.rs index aa1e65efaa41e..669a5cdfe304a 100644 --- a/src/test/run-pass/issue-9719.rs +++ b/src/test/run-pass/issue-9719.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod a { pub enum Enum { A(T), diff --git a/src/test/run-pass/issue-979.rs b/src/test/run-pass/issue-979.rs index 919f0aae38e0a..81edac3cef265 100644 --- a/src/test/run-pass/issue-979.rs +++ b/src/test/run-pass/issue-979.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] use std::cell::Cell; diff --git a/src/test/run-pass/issue-9906.rs b/src/test/run-pass/issue-9906.rs index 921965b280b28..2730f567aa3ba 100644 --- a/src/test/run-pass/issue-9906.rs +++ b/src/test/run-pass/issue-9906.rs @@ -10,6 +10,8 @@ // aux-build:issue-9906.rs +// pretty-expanded FIXME #23616 + extern crate "issue-9906" as testmod; pub fn main() { diff --git a/src/test/run-pass/issue-9918.rs b/src/test/run-pass/issue-9918.rs index 240a134221d34..e81a07fa68325 100644 --- a/src/test/run-pass/issue-9918.rs +++ b/src/test/run-pass/issue-9918.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert_eq!((0 + 0u8) as char, '\0'); } diff --git a/src/test/run-pass/issue-9942.rs b/src/test/run-pass/issue-9942.rs index c7dea71998646..1c554250a1118 100644 --- a/src/test/run-pass/issue-9942.rs +++ b/src/test/run-pass/issue-9942.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { const S: uint = 23 as uint; [0; S]; () } diff --git a/src/test/run-pass/issue-9951.rs b/src/test/run-pass/issue-9951.rs index 210f647e5be2f..63807395fb0cc 100644 --- a/src/test/run-pass/issue-9951.rs +++ b/src/test/run-pass/issue-9951.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_variables)] trait Bar { diff --git a/src/test/run-pass/issue-9968.rs b/src/test/run-pass/issue-9968.rs index 2c9382be9b17c..5761c8d943848 100644 --- a/src/test/run-pass/issue-9968.rs +++ b/src/test/run-pass/issue-9968.rs @@ -10,6 +10,8 @@ // aux-build:issue-9968.rs +// pretty-expanded FIXME #23616 + extern crate "issue-9968" as lib; use lib::{Trait, Struct}; diff --git a/src/test/run-pass/issue2170exe.rs b/src/test/run-pass/issue2170exe.rs index 58424089c5e02..d126d1f6ce1d3 100644 --- a/src/test/run-pass/issue2170exe.rs +++ b/src/test/run-pass/issue2170exe.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:issue2170lib.rs +// pretty-expanded FIXME #23616 + extern crate issue2170lib; pub fn main() { diff --git a/src/test/run-pass/issue22346.rs b/src/test/run-pass/issue22346.rs index 1c58765ef650e..8538950a895c2 100644 --- a/src/test/run-pass/issue22346.rs +++ b/src/test/run-pass/issue22346.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] // This used to cause an ICE because the retslot for the "return" had the wrong type diff --git a/src/test/run-pass/issue_3136_b.rs b/src/test/run-pass/issue_3136_b.rs index a6fb993a96b00..cffe3f9572b29 100644 --- a/src/test/run-pass/issue_3136_b.rs +++ b/src/test/run-pass/issue_3136_b.rs @@ -10,5 +10,7 @@ // aux-build:issue_3136_a.rc +// pretty-expanded FIXME #23616 + extern crate issue_3136_a; pub fn main() {} diff --git a/src/test/run-pass/issue_9155.rs b/src/test/run-pass/issue_9155.rs index 951cde3264b2c..9db556bf9a22f 100644 --- a/src/test/run-pass/issue_9155.rs +++ b/src/test/run-pass/issue_9155.rs @@ -10,6 +10,8 @@ // aux-build:issue_9155.rs +// pretty-expanded FIXME #23616 + extern crate issue_9155; struct Baz; diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index a262d0323c5de..e1b980d713208 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -12,6 +12,8 @@ // for completeness since .rs files linked from .rc files support this // notation to specify their module's attributes +// pretty-expanded FIXME #23616 + #![feature(custom_attribute, libc)] #![allow(unused_attribute)] #![attr1 = "val"] diff --git a/src/test/run-pass/item-name-overload.rs b/src/test/run-pass/item-name-overload.rs index 9aefda4bc7116..2827a6df33737 100644 --- a/src/test/run-pass/item-name-overload.rs +++ b/src/test/run-pass/item-name-overload.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + mod foo { pub fn baz() { } } diff --git a/src/test/run-pass/iter-cloned-type-inference.rs b/src/test/run-pass/iter-cloned-type-inference.rs index 6ce226bbecac2..12f6a7caf6c39 100644 --- a/src/test/run-pass/iter-cloned-type-inference.rs +++ b/src/test/run-pass/iter-cloned-type-inference.rs @@ -11,6 +11,8 @@ // Test to see that the element type of .cloned() can be inferred // properly. Previously this would fail to deduce the type of `sum`. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::iter::AdditiveIterator; diff --git a/src/test/run-pass/ivec-pass-by-value.rs b/src/test/run-pass/ivec-pass-by-value.rs index 36f0d3c1c5207..246ba19a59bc7 100644 --- a/src/test/run-pass/ivec-pass-by-value.rs +++ b/src/test/run-pass/ivec-pass-by-value.rs @@ -9,5 +9,7 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(_a: Vec ) { } pub fn main() { f(vec!(1, 2, 3, 4, 5)); } diff --git a/src/test/run-pass/ivec-tag.rs b/src/test/run-pass/ivec-tag.rs index f2895d7d7d1de..d5138f6fdbc59 100644 --- a/src/test/run-pass/ivec-tag.rs +++ b/src/test/run-pass/ivec-tag.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::thread::Thread; diff --git a/src/test/run-pass/keyword-changes-2012-07-31.rs b/src/test/run-pass/keyword-changes-2012-07-31.rs index ff568b77f08ac..97025f209a2c2 100644 --- a/src/test/run-pass/keyword-changes-2012-07-31.rs +++ b/src/test/run-pass/keyword-changes-2012-07-31.rs @@ -12,6 +12,8 @@ // mod -> module // match -> match +// pretty-expanded FIXME #23616 + pub fn main() { } diff --git a/src/test/run-pass/kindck-owned-trait-contains-1.rs b/src/test/run-pass/kindck-owned-trait-contains-1.rs index f05ac11d41380..84156385ef438 100644 --- a/src/test/run-pass/kindck-owned-trait-contains-1.rs +++ b/src/test/run-pass/kindck-owned-trait-contains-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/kinds-in-metadata.rs b/src/test/run-pass/kinds-in-metadata.rs index bd75f547507c7..05c6cb7f5ac68 100644 --- a/src/test/run-pass/kinds-in-metadata.rs +++ b/src/test/run-pass/kinds-in-metadata.rs @@ -10,6 +10,8 @@ // aux-build:kinds_in_metadata.rs +// pretty-expanded FIXME #23616 + /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/src/test/run-pass/labeled-break.rs b/src/test/run-pass/labeled-break.rs index 30c2495d590fe..fe2f35c5119e0 100644 --- a/src/test/run-pass/labeled-break.rs +++ b/src/test/run-pass/labeled-break.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { 'foo: loop { loop { diff --git a/src/test/run-pass/large-records.rs b/src/test/run-pass/large-records.rs index 20ec058b9f4a1..6824d9a1ccebb 100644 --- a/src/test/run-pass/large-records.rs +++ b/src/test/run-pass/large-records.rs @@ -12,6 +12,8 @@ +// pretty-expanded FIXME #23616 + struct Large {a: int, b: int, c: int, diff --git a/src/test/run-pass/last-use-in-block.rs b/src/test/run-pass/last-use-in-block.rs index 8ef5df5d69697..28fe3bf0bd1fd 100644 --- a/src/test/run-pass/last-use-in-block.rs +++ b/src/test/run-pass/last-use-in-block.rs @@ -10,6 +10,8 @@ // Issue #1818 +// pretty-expanded FIXME #23616 + fn lp(s: String, mut f: F) -> T where F: FnMut(String) -> T { while false { let r = f(s); diff --git a/src/test/run-pass/last-use-in-cap-clause.rs b/src/test/run-pass/last-use-in-cap-clause.rs index 1dddec32e38b7..f9c8fe0f2d2d5 100644 --- a/src/test/run-pass/last-use-in-cap-clause.rs +++ b/src/test/run-pass/last-use-in-cap-clause.rs @@ -10,6 +10,8 @@ // Make sure #1399 stays fixed +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(unboxed_closures, core)] diff --git a/src/test/run-pass/leak-unique-as-tydesc.rs b/src/test/run-pass/leak-unique-as-tydesc.rs index 65808de3cf42b..fe89d52bcb317 100644 --- a/src/test/run-pass/leak-unique-as-tydesc.rs +++ b/src/test/run-pass/leak-unique-as-tydesc.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/let-destruct-ref.rs b/src/test/run-pass/let-destruct-ref.rs index c0f674d03714f..0b38d16941bae 100644 --- a/src/test/run-pass/let-destruct-ref.rs +++ b/src/test/run-pass/let-destruct-ref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = 3_usize; let ref y = x; diff --git a/src/test/run-pass/let-var-hygiene.rs b/src/test/run-pass/let-var-hygiene.rs index d6409267eb690..c1e80aaf2d7b0 100644 --- a/src/test/run-pass/let-var-hygiene.rs +++ b/src/test/run-pass/let-var-hygiene.rs @@ -9,6 +9,8 @@ // except according to those terms. // shouldn't affect evaluation of $ex: +// pretty-expanded FIXME #23616 + macro_rules! bad_macro { ($ex:expr) => ({let _x = 9; $ex}) } diff --git a/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs b/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs index f51312bc25771..37de5745bb48b 100644 --- a/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs +++ b/src/test/run-pass/lint-non-camel-case-with-trailing-underscores.rs @@ -10,6 +10,8 @@ // This is ok because we often use the trailing underscore to mean 'prime' +// pretty-expanded FIXME #23616 + #[forbid(non_camel_case_types)] type Foo_ = int; diff --git a/src/test/run-pass/lint-non-uppercase-statics-lowercase-mut-statics.rs b/src/test/run-pass/lint-non-uppercase-statics-lowercase-mut-statics.rs index ce3518618d0b4..b530a3facaf18 100644 --- a/src/test/run-pass/lint-non-uppercase-statics-lowercase-mut-statics.rs +++ b/src/test/run-pass/lint-non-uppercase-statics-lowercase-mut-statics.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![forbid(non_camel_case_types)] #![forbid(non_upper_case_globals)] diff --git a/src/test/run-pass/list.rs b/src/test/run-pass/list.rs index e55c1b36f3e24..dfd2d191d494b 100644 --- a/src/test/run-pass/list.rs +++ b/src/test/run-pass/list.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/liveness-assign-imm-local-after-loop.rs b/src/test/run-pass/liveness-assign-imm-local-after-loop.rs index 143972fe299fe..ce6f77633db56 100644 --- a/src/test/run-pass/liveness-assign-imm-local-after-loop.rs +++ b/src/test/run-pass/liveness-assign-imm-local-after-loop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unreachable_code)] #![allow(unused_variable)] diff --git a/src/test/run-pass/liveness-assign-imm-local-after-ret.rs b/src/test/run-pass/liveness-assign-imm-local-after-ret.rs index f13e2826c8532..f10d851a463ed 100644 --- a/src/test/run-pass/liveness-assign-imm-local-after-ret.rs +++ b/src/test/run-pass/liveness-assign-imm-local-after-ret.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unreachable_code)] fn test() { diff --git a/src/test/run-pass/liveness-move-in-loop.rs b/src/test/run-pass/liveness-move-in-loop.rs index 9120151051ea0..4f1b6f3b925a6 100644 --- a/src/test/run-pass/liveness-move-in-loop.rs +++ b/src/test/run-pass/liveness-move-in-loop.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn take(x: int) -> int {x} fn the_loop() { diff --git a/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs b/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs index 95a5f1003b6e3..4932831186760 100644 --- a/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs +++ b/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(trace_macros, log_syntax)] // make sure these macros can be used as in the various places that diff --git a/src/test/run-pass/logging-enabled-debug.rs b/src/test/run-pass/logging-enabled-debug.rs index d3b6c38da888a..59f5b0af35913 100644 --- a/src/test/run-pass/logging-enabled-debug.rs +++ b/src/test/run-pass/logging-enabled-debug.rs @@ -11,6 +11,8 @@ // compile-flags:-C debug-assertions=no // exec-env:RUST_LOG=logging-enabled-debug=debug +// pretty-expanded FIXME #23616 + #![feature(rustc_private)] #[macro_use] diff --git a/src/test/run-pass/logging-enabled.rs b/src/test/run-pass/logging-enabled.rs index 1dd9f72ab803b..24ef02956266b 100644 --- a/src/test/run-pass/logging-enabled.rs +++ b/src/test/run-pass/logging-enabled.rs @@ -10,6 +10,8 @@ // exec-env:RUST_LOG=logging-enabled=info +// pretty-expanded FIXME #23616 + #![feature(rustc_private)] #[macro_use] diff --git a/src/test/run-pass/logging-right-crate.rs b/src/test/run-pass/logging-right-crate.rs index ced1fdc445519..63993182a427d 100644 --- a/src/test/run-pass/logging-right-crate.rs +++ b/src/test/run-pass/logging-right-crate.rs @@ -21,6 +21,8 @@ // longer happens by enabling logging for *this* crate and then invoking a // function in an external crate which will panic when logging is enabled. +// pretty-expanded FIXME #23616 + extern crate logging_right_crate; pub fn main() { diff --git a/src/test/run-pass/logging_before_rt_started.rs b/src/test/run-pass/logging_before_rt_started.rs index 8a21d60e468b0..820285188ae4e 100644 --- a/src/test/run-pass/logging_before_rt_started.rs +++ b/src/test/run-pass/logging_before_rt_started.rs @@ -16,4 +16,6 @@ // this test will trigger "output during runtime initialization" to make sure // that the bug isn't re-introduced. +// pretty-expanded FIXME #23616 + pub fn main() {} diff --git a/src/test/run-pass/long-while.rs b/src/test/run-pass/long-while.rs index cbe26844708db..2c2c2be39a49c 100644 --- a/src/test/run-pass/long-while.rs +++ b/src/test/run-pass/long-while.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_variable)] pub fn main() { diff --git a/src/test/run-pass/loop-break-cont-1.rs b/src/test/run-pass/loop-break-cont-1.rs index d58d2a7139665..eaf69dbae00f9 100644 --- a/src/test/run-pass/loop-break-cont-1.rs +++ b/src/test/run-pass/loop-break-cont-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let _i = 0_usize; loop { diff --git a/src/test/run-pass/loop-diverges.rs b/src/test/run-pass/loop-diverges.rs index 9c46ba2cb9bbf..c2ad9a6ef73e1 100644 --- a/src/test/run-pass/loop-diverges.rs +++ b/src/test/run-pass/loop-diverges.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* Make sure a loop{} can be the tailexpr in the body of a diverging function */ diff --git a/src/test/run-pass/loop-label-shadowing.rs b/src/test/run-pass/loop-label-shadowing.rs index 090872e69eadb..399920a7e315c 100644 --- a/src/test/run-pass/loop-label-shadowing.rs +++ b/src/test/run-pass/loop-label-shadowing.rs @@ -10,6 +10,8 @@ // Issue #12512. +// pretty-expanded FIXME #23616 + fn main() { let mut foo = Vec::new(); 'foo: for i in &[1, 2, 3] { diff --git a/src/test/run-pass/loop-labeled-break-value.rs b/src/test/run-pass/loop-labeled-break-value.rs index f71dc6869bee9..4f03b45b116e7 100644 --- a/src/test/run-pass/loop-labeled-break-value.rs +++ b/src/test/run-pass/loop-labeled-break-value.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { 'outer: loop { let _: i32 = loop { break 'outer }; diff --git a/src/test/run-pass/loop-no-reinit-needed-post-bot.rs b/src/test/run-pass/loop-no-reinit-needed-post-bot.rs index 2582c2e61479c..689e17c170d90 100644 --- a/src/test/run-pass/loop-no-reinit-needed-post-bot.rs +++ b/src/test/run-pass/loop-no-reinit-needed-post-bot.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct S; // Ensure S is moved, not copied, on assignment. impl Drop for S { fn drop(&mut self) { } } diff --git a/src/test/run-pass/loop-scope.rs b/src/test/run-pass/loop-scope.rs index 88711a4605962..70f2830555a4b 100644 --- a/src/test/run-pass/loop-scope.rs +++ b/src/test/run-pass/loop-scope.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = vec!(10, 20, 30); let mut sum = 0; diff --git a/src/test/run-pass/macro-block-nonterminal.rs b/src/test/run-pass/macro-block-nonterminal.rs index 6c568d6d493ca..496534a5362f3 100644 --- a/src/test/run-pass/macro-block-nonterminal.rs +++ b/src/test/run-pass/macro-block-nonterminal.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! do_block{ ($val:block) => {$val} } diff --git a/src/test/run-pass/macro-crate-def-only.rs b/src/test/run-pass/macro-crate-def-only.rs index efee9ba963a1e..58b09fa492192 100644 --- a/src/test/run-pass/macro-crate-def-only.rs +++ b/src/test/run-pass/macro-crate-def-only.rs @@ -10,6 +10,8 @@ // aux-build:macro_crate_def_only.rs +// pretty-expanded FIXME #23616 + #[macro_use] #[no_link] extern crate macro_crate_def_only; diff --git a/src/test/run-pass/macro-crate-use.rs b/src/test/run-pass/macro-crate-use.rs index fbbe0105cf4fe..38f646b79a5ee 100644 --- a/src/test/run-pass/macro-crate-use.rs +++ b/src/test/run-pass/macro-crate-use.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn increment(x: uint) -> uint { x + 1 } diff --git a/src/test/run-pass/macro-deep_expansion.rs b/src/test/run-pass/macro-deep_expansion.rs index c4012e2cf3c7e..fd21ed0150ab0 100644 --- a/src/test/run-pass/macro-deep_expansion.rs +++ b/src/test/run-pass/macro-deep_expansion.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! foo2 { () => { "foo" diff --git a/src/test/run-pass/macro-delimiter-significance.rs b/src/test/run-pass/macro-delimiter-significance.rs index a2ae3fbf83b0f..6a3a495f2f199 100644 --- a/src/test/run-pass/macro-delimiter-significance.rs +++ b/src/test/run-pass/macro-delimiter-significance.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { vec![1_usize, 2, 3].len(); } diff --git a/src/test/run-pass/macro-interpolation.rs b/src/test/run-pass/macro-interpolation.rs index 1cbd4f6bc704c..9782ee146fc50 100644 --- a/src/test/run-pass/macro-interpolation.rs +++ b/src/test/run-pass/macro-interpolation.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! overly_complicated { ($fnname:ident, $arg:ident, $ty:ty, $body:block, $val:expr, $pat:pat, $res:path) => ({ diff --git a/src/test/run-pass/macro-invocation-in-count-expr-fixed-array-type.rs b/src/test/run-pass/macro-invocation-in-count-expr-fixed-array-type.rs index ce74896749838..9fafeb6531dca 100644 --- a/src/test/run-pass/macro-invocation-in-count-expr-fixed-array-type.rs +++ b/src/test/run-pass/macro-invocation-in-count-expr-fixed-array-type.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! four { () => (4) } diff --git a/src/test/run-pass/macro-method-issue-4621.rs b/src/test/run-pass/macro-method-issue-4621.rs index c58a03014246c..d20777aadc4a1 100644 --- a/src/test/run-pass/macro-method-issue-4621.rs +++ b/src/test/run-pass/macro-method-issue-4621.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A; macro_rules! make_thirteen_method {() => (fn thirteen(&self)->int {13})} diff --git a/src/test/run-pass/macro-nt-list.rs b/src/test/run-pass/macro-nt-list.rs index c6efc2f2bc83b..f3367ff2b410f 100644 --- a/src/test/run-pass/macro-nt-list.rs +++ b/src/test/run-pass/macro-nt-list.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! list { ( ($($id:ident),*) ) => (()); ( [$($id:ident),*] ) => (()); diff --git a/src/test/run-pass/macro-of-higher-order.rs b/src/test/run-pass/macro-of-higher-order.rs index 1a77eee824b6d..ebd58f772284a 100644 --- a/src/test/run-pass/macro-of-higher-order.rs +++ b/src/test/run-pass/macro-of-higher-order.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! higher_order { (subst $lhs:tt => $rhs:tt) => ({ macro_rules! anon { $lhs => $rhs } diff --git a/src/test/run-pass/macro-pat.rs b/src/test/run-pass/macro-pat.rs index 7a3e55322c8e1..15387f908b441 100644 --- a/src/test/run-pass/macro-pat.rs +++ b/src/test/run-pass/macro-pat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! mypat { () => ( Some('y') diff --git a/src/test/run-pass/macro-path.rs b/src/test/run-pass/macro-path.rs index 4aa1587943413..072bc84fb63a2 100644 --- a/src/test/run-pass/macro-path.rs +++ b/src/test/run-pass/macro-path.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod m { pub type t = int; } diff --git a/src/test/run-pass/macro-with-attrs1.rs b/src/test/run-pass/macro-with-attrs1.rs index f180922a052a2..0938c16c30492 100644 --- a/src/test/run-pass/macro-with-attrs1.rs +++ b/src/test/run-pass/macro-with-attrs1.rs @@ -10,6 +10,8 @@ // compile-flags: --cfg foo +// pretty-expanded FIXME #23616 + #[cfg(foo)] macro_rules! foo { () => (1) } diff --git a/src/test/run-pass/macro-with-attrs2.rs b/src/test/run-pass/macro-with-attrs2.rs index b56dff6b01fc5..cf48c325f1f24 100644 --- a/src/test/run-pass/macro-with-attrs2.rs +++ b/src/test/run-pass/macro-with-attrs2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[cfg(foo)] macro_rules! foo { () => (1) } diff --git a/src/test/run-pass/macro_with_super_2.rs b/src/test/run-pass/macro_with_super_2.rs index 5c681b8e6e765..9ecf186d5b11e 100644 --- a/src/test/run-pass/macro_with_super_2.rs +++ b/src/test/run-pass/macro_with_super_2.rs @@ -10,6 +10,8 @@ // aux-build:macro_with_super_1.rs +// pretty-expanded FIXME #23616 + #[macro_use] extern crate macro_with_super_1; diff --git a/src/test/run-pass/match-arm-statics.rs b/src/test/run-pass/match-arm-statics.rs index dfefe84518c40..b9b78012c3df0 100644 --- a/src/test/run-pass/match-arm-statics.rs +++ b/src/test/run-pass/match-arm-statics.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct NewBool(bool); enum Direction { diff --git a/src/test/run-pass/match-borrowed_str.rs b/src/test/run-pass/match-borrowed_str.rs index b359614fa9adb..574c4b9f00eab 100644 --- a/src/test/run-pass/match-borrowed_str.rs +++ b/src/test/run-pass/match-borrowed_str.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unnecessary_allocation)] fn f1(ref_string: &str) -> String { diff --git a/src/test/run-pass/match-bot-2.rs b/src/test/run-pass/match-bot-2.rs index 949fad11344de..00804634ea8ee 100644 --- a/src/test/run-pass/match-bot-2.rs +++ b/src/test/run-pass/match-bot-2.rs @@ -9,5 +9,7 @@ // except according to those terms. // n.b. This was only ever failing with optimization disabled. +// pretty-expanded FIXME #23616 + fn a() -> int { match return 1 { 2 => 3, _ => panic!() } } pub fn main() { a(); } diff --git a/src/test/run-pass/match-enum-struct-0.rs b/src/test/run-pass/match-enum-struct-0.rs index 5cc512abfe37c..5bd8db7b17b3d 100644 --- a/src/test/run-pass/match-enum-struct-0.rs +++ b/src/test/run-pass/match-enum-struct-0.rs @@ -10,6 +10,8 @@ // regression test for issue #5625 +// pretty-expanded FIXME #23616 + enum E { Foo{f : int}, Bar diff --git a/src/test/run-pass/match-enum-struct-1.rs b/src/test/run-pass/match-enum-struct-1.rs index fdfadf8eb444f..1224a5dd31403 100644 --- a/src/test/run-pass/match-enum-struct-1.rs +++ b/src/test/run-pass/match-enum-struct-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum E { Foo{f : int}, Bar diff --git a/src/test/run-pass/match-implicit-copy-unique.rs b/src/test/run-pass/match-implicit-copy-unique.rs index cd4802f4b397a..a49f7bcebcf7e 100644 --- a/src/test/run-pass/match-implicit-copy-unique.rs +++ b/src/test/run-pass/match-implicit-copy-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/match-in-macro.rs b/src/test/run-pass/match-in-macro.rs index e4886ddaa0ed3..374b1b54e0b32 100644 --- a/src/test/run-pass/match-in-macro.rs +++ b/src/test/run-pass/match-in-macro.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { B { b1: int, bb1: int}, } diff --git a/src/test/run-pass/match-naked-record-expr.rs b/src/test/run-pass/match-naked-record-expr.rs index 433cf23626bbf..0e6bb1e62a5b2 100644 --- a/src/test/run-pass/match-naked-record-expr.rs +++ b/src/test/run-pass/match-naked-record-expr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct X { x: int } pub fn main() { diff --git a/src/test/run-pass/match-naked-record.rs b/src/test/run-pass/match-naked-record.rs index fe12b7c158568..d8422ba691701 100644 --- a/src/test/run-pass/match-naked-record.rs +++ b/src/test/run-pass/match-naked-record.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct X { x: int } pub fn main() { diff --git a/src/test/run-pass/match-path.rs b/src/test/run-pass/match-path.rs index b3c7f3db512b1..1b3594a0a792e 100644 --- a/src/test/run-pass/match-path.rs +++ b/src/test/run-pass/match-path.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + mod m1 { pub enum foo { foo1, foo2, } } diff --git a/src/test/run-pass/match-pattern-bindings.rs b/src/test/run-pass/match-pattern-bindings.rs index abb78fc831077..d230f18f2bd84 100644 --- a/src/test/run-pass/match-pattern-bindings.rs +++ b/src/test/run-pass/match-pattern-bindings.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let value = Some(1); assert_eq!(match value { diff --git a/src/test/run-pass/match-pattern-simple.rs b/src/test/run-pass/match-pattern-simple.rs index 92a753902228d..f8a6e475a3bd6 100644 --- a/src/test/run-pass/match-pattern-simple.rs +++ b/src/test/run-pass/match-pattern-simple.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + fn altsimple(f: int) { match f { _x => () } } pub fn main() { } diff --git a/src/test/run-pass/match-phi.rs b/src/test/run-pass/match-phi.rs index 2a0a2b208875f..5e15c642b67f6 100644 --- a/src/test/run-pass/match-phi.rs +++ b/src/test/run-pass/match-phi.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unused_variable)] diff --git a/src/test/run-pass/match-pipe-binding.rs b/src/test/run-pass/match-pipe-binding.rs index bdf12d22edd0f..70d3639a785fa 100644 --- a/src/test/run-pass/match-pipe-binding.rs +++ b/src/test/run-pass/match-pipe-binding.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn test1() { // from issue 6338 match ((1, "a".to_string()), (2, "b".to_string())) { diff --git a/src/test/run-pass/match-range-static.rs b/src/test/run-pass/match-range-static.rs index 0feeea70221a4..56e6f4dce592b 100644 --- a/src/test/run-pass/match-range-static.rs +++ b/src/test/run-pass/match-range-static.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const s: int = 1; const e: int = 42; diff --git a/src/test/run-pass/match-ref-binding-in-guard-3256.rs b/src/test/run-pass/match-ref-binding-in-guard-3256.rs index a83bc73457e02..1e2ebf42a9911 100644 --- a/src/test/run-pass/match-ref-binding-in-guard-3256.rs +++ b/src/test/run-pass/match-ref-binding-in-guard-3256.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::Mutex; pub fn main() { diff --git a/src/test/run-pass/match-ref-binding-mut-option.rs b/src/test/run-pass/match-ref-binding-mut-option.rs index 8d1e483bcd848..41f00e58ff769 100644 --- a/src/test/run-pass/match-ref-binding-mut-option.rs +++ b/src/test/run-pass/match-ref-binding-mut-option.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let mut v = Some(22); match v { diff --git a/src/test/run-pass/match-ref-binding-mut.rs b/src/test/run-pass/match-ref-binding-mut.rs index 266f7cdde11af..9dfe079c8a828 100644 --- a/src/test/run-pass/match-ref-binding-mut.rs +++ b/src/test/run-pass/match-ref-binding-mut.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Rec { f: int } diff --git a/src/test/run-pass/match-ref-binding.rs b/src/test/run-pass/match-ref-binding.rs index 0b613df18ee83..03d5c6817e471 100644 --- a/src/test/run-pass/match-ref-binding.rs +++ b/src/test/run-pass/match-ref-binding.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn destructure(x: Option) -> int { match x { None => 0, diff --git a/src/test/run-pass/match-static-const-rename.rs b/src/test/run-pass/match-static-const-rename.rs index 164cc99e188ea..433ef8a63197c 100644 --- a/src/test/run-pass/match-static-const-rename.rs +++ b/src/test/run-pass/match-static-const-rename.rs @@ -16,6 +16,8 @@ // around this problem locally by renaming the constant in the `use` // form to an uppercase identifier that placates the lint. +// pretty-expanded FIXME #23616 + #![deny(non_upper_case_globals)] pub const A : int = 97; diff --git a/src/test/run-pass/match-str.rs b/src/test/run-pass/match-str.rs index 301d99a7e20b3..5d8958c6b9e87 100644 --- a/src/test/run-pass/match-str.rs +++ b/src/test/run-pass/match-str.rs @@ -10,6 +10,8 @@ // Issue #53 +// pretty-expanded FIXME #23616 + pub fn main() { match "test" { "not-test" => panic!(), "test" => (), _ => panic!() } diff --git a/src/test/run-pass/match-struct-0.rs b/src/test/run-pass/match-struct-0.rs index 6d5658aa13cbf..e550b354d40ee 100644 --- a/src/test/run-pass/match-struct-0.rs +++ b/src/test/run-pass/match-struct-0.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo{ f : int, } diff --git a/src/test/run-pass/match-tag.rs b/src/test/run-pass/match-tag.rs index cf940a630569d..4a04fd55df5b5 100644 --- a/src/test/run-pass/match-tag.rs +++ b/src/test/run-pass/match-tag.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + enum color { rgb(int, int, int), rgba(int, int, int, int), diff --git a/src/test/run-pass/match-value-binding-in-guard-3291.rs b/src/test/run-pass/match-value-binding-in-guard-3291.rs index beb125492b2c1..e008874e6d7be 100644 --- a/src/test/run-pass/match-value-binding-in-guard-3291.rs +++ b/src/test/run-pass/match-value-binding-in-guard-3291.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/match-vec-alternatives.rs b/src/test/run-pass/match-vec-alternatives.rs index eb6b2176e5140..520c2e8108d48 100644 --- a/src/test/run-pass/match-vec-alternatives.rs +++ b/src/test/run-pass/match-vec-alternatives.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(advanced_slice_patterns)] fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str { diff --git a/src/test/run-pass/match-vec-rvalue.rs b/src/test/run-pass/match-vec-rvalue.rs index 04a0204d206a2..e368aeb976934 100644 --- a/src/test/run-pass/match-vec-rvalue.rs +++ b/src/test/run-pass/match-vec-rvalue.rs @@ -11,6 +11,8 @@ // Tests that matching rvalues with drops does not crash. +// pretty-expanded FIXME #23616 + pub fn main() { match vec!(1, 2, 3) { x => { diff --git a/src/test/run-pass/method-attributes.rs b/src/test/run-pass/method-attributes.rs index 92af96e0d8f2c..ccf5efddebefa 100644 --- a/src/test/run-pass/method-attributes.rs +++ b/src/test/run-pass/method-attributes.rs @@ -9,6 +9,8 @@ // except according to those terms. // pp-exact - Make sure we print all the attributes +// pretty-expanded FIXME #23616 + #![allow(unused_attribute)] #![feature(custom_attribute)] diff --git a/src/test/run-pass/method-early-bound-lifetimes-on-self.rs b/src/test/run-pass/method-early-bound-lifetimes-on-self.rs index cec9753a2feca..3babb543bf2a1 100644 --- a/src/test/run-pass/method-early-bound-lifetimes-on-self.rs +++ b/src/test/run-pass/method-early-bound-lifetimes-on-self.rs @@ -11,6 +11,8 @@ // Check that we successfully handle methods where the `self` type has // an early-bound lifetime. Issue #18208. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] use std::marker; diff --git a/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs b/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs index 826561bfddd11..e013c5b0be794 100644 --- a/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs +++ b/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs @@ -12,6 +12,8 @@ // type is `&mut [u8]`, passes in a pointer to the lvalue and not a // temporary. Issue #19147. +// pretty-expanded FIXME #23616 + #![feature(core, old_io)] use std::mem; diff --git a/src/test/run-pass/method-normalize-bounds-issue-20604.rs b/src/test/run-pass/method-normalize-bounds-issue-20604.rs index 5ba5d7f8d7227..926a0c371e9de 100644 --- a/src/test/run-pass/method-normalize-bounds-issue-20604.rs +++ b/src/test/run-pass/method-normalize-bounds-issue-20604.rs @@ -14,6 +14,8 @@ // winnowing stage of method resolution failed to handle an associated // type projection. +// pretty-expanded FIXME #23616 + #![feature(associated_types)] trait Hasher { diff --git a/src/test/run-pass/method-projection.rs b/src/test/run-pass/method-projection.rs index 6f72a163981c9..496625213f7ea 100644 --- a/src/test/run-pass/method-projection.rs +++ b/src/test/run-pass/method-projection.rs @@ -13,6 +13,8 @@ /////////////////////////////////////////////////////////////////////////// +// pretty-expanded FIXME #23616 + trait MakeString { fn make_string(&self) -> String; } diff --git a/src/test/run-pass/method-recursive-blanket-impl.rs b/src/test/run-pass/method-recursive-blanket-impl.rs index 15eb2ae2e4b49..6877bf376a658 100644 --- a/src/test/run-pass/method-recursive-blanket-impl.rs +++ b/src/test/run-pass/method-recursive-blanket-impl.rs @@ -13,6 +13,8 @@ // know not to stop at the blanket, we have to recursively evaluate // the `T:Foo` bound. +// pretty-expanded FIXME #23616 + use std::marker::Sized; // Note: this must be generic for the problem to show up diff --git a/src/test/run-pass/method-self-arg-aux1.rs b/src/test/run-pass/method-self-arg-aux1.rs index 81212ee348f1f..768e7f94862ac 100644 --- a/src/test/run-pass/method-self-arg-aux1.rs +++ b/src/test/run-pass/method-self-arg-aux1.rs @@ -10,6 +10,8 @@ // Test method calls with self as an argument (cross-crate) +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/method-self-arg-aux2.rs b/src/test/run-pass/method-self-arg-aux2.rs index ca81860dd080c..b40333c67c6ac 100644 --- a/src/test/run-pass/method-self-arg-aux2.rs +++ b/src/test/run-pass/method-self-arg-aux2.rs @@ -10,6 +10,8 @@ // Test method calls with self as an argument (cross-crate) +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/method-self-arg-trait.rs b/src/test/run-pass/method-self-arg-trait.rs index 17fdd7b45c20c..8687014bfbb53 100644 --- a/src/test/run-pass/method-self-arg-trait.rs +++ b/src/test/run-pass/method-self-arg-trait.rs @@ -10,6 +10,8 @@ // Test method calls with self as an argument +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/method-self-arg.rs b/src/test/run-pass/method-self-arg.rs index 62b3d52860ba8..9784149c44057 100644 --- a/src/test/run-pass/method-self-arg.rs +++ b/src/test/run-pass/method-self-arg.rs @@ -10,6 +10,8 @@ // Test method calls with self as an argument +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/method-two-trait-defer-resolution-1.rs b/src/test/run-pass/method-two-trait-defer-resolution-1.rs index 414b08b4335c6..d0e0427f37808 100644 --- a/src/test/run-pass/method-two-trait-defer-resolution-1.rs +++ b/src/test/run-pass/method-two-trait-defer-resolution-1.rs @@ -11,6 +11,8 @@ // Test that we pick which version of `foo` to run based on the // type that is (ultimately) inferred for `x`. +// pretty-expanded FIXME #23616 + trait foo { fn foo(&self) -> i32; } diff --git a/src/test/run-pass/method-two-trait-defer-resolution-2.rs b/src/test/run-pass/method-two-trait-defer-resolution-2.rs index a49ce82617007..36f16f36cc0ab 100644 --- a/src/test/run-pass/method-two-trait-defer-resolution-2.rs +++ b/src/test/run-pass/method-two-trait-defer-resolution-2.rs @@ -16,6 +16,8 @@ // version will run (note that the `push` occurs after the call to // `foo()`). +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs b/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs index d595092119059..c8da4852ad35f 100644 --- a/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs +++ b/src/test/run-pass/method-two-traits-distinguished-via-where-clause.rs @@ -11,6 +11,8 @@ // Test that we select between traits A and B. To do that, we must // consider the `Sized` bound. +// pretty-expanded FIXME #23616 + #![feature(core)] trait A { diff --git a/src/test/run-pass/method-where-clause.rs b/src/test/run-pass/method-where-clause.rs index 6337538a3329d..f2ff0abfad8b8 100644 --- a/src/test/run-pass/method-where-clause.rs +++ b/src/test/run-pass/method-where-clause.rs @@ -11,6 +11,8 @@ // Test that we can use method notation to call methods based on a // where clause type, and not only type parameters. +// pretty-expanded FIXME #23616 + trait Foo { fn foo(&self) -> i32; } diff --git a/src/test/run-pass/mid-path-type-params.rs b/src/test/run-pass/mid-path-type-params.rs index 85c05d408e8ab..602ab95b048d3 100644 --- a/src/test/run-pass/mid-path-type-params.rs +++ b/src/test/run-pass/mid-path-type-params.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct S { contents: T, } diff --git a/src/test/run-pass/mod-inside-fn.rs b/src/test/run-pass/mod-inside-fn.rs index 388d2e4905fab..60e9a2b8acba7 100644 --- a/src/test/run-pass/mod-inside-fn.rs +++ b/src/test/run-pass/mod-inside-fn.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f() -> int { mod m { pub fn g() -> int { 720 } diff --git a/src/test/run-pass/mod-view-items.rs b/src/test/run-pass/mod-view-items.rs index 1513eb8883527..40069c32cd9b0 100644 --- a/src/test/run-pass/mod-view-items.rs +++ b/src/test/run-pass/mod-view-items.rs @@ -14,6 +14,8 @@ // pretty-print such view items. If that happens again, this should // begin failing. +// pretty-expanded FIXME #23616 + mod m { pub fn f() -> Vec { Vec::new() } } diff --git a/src/test/run-pass/module-qualified-struct-destructure.rs b/src/test/run-pass/module-qualified-struct-destructure.rs index b1c1b64ba4003..1b725d6ae214f 100644 --- a/src/test/run-pass/module-qualified-struct-destructure.rs +++ b/src/test/run-pass/module-qualified-struct-destructure.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod m { pub struct S { pub x: int, diff --git a/src/test/run-pass/monad.rs b/src/test/run-pass/monad.rs index 0d563f1a714c3..c9994e9b5156e 100644 --- a/src/test/run-pass/monad.rs +++ b/src/test/run-pass/monad.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + trait vec_monad { fn bind(&self, f: F ) -> Vec where F: FnMut(&A) -> Vec ; } diff --git a/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs b/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs index 11f53f0a9806d..b45805902dfd7 100644 --- a/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs +++ b/src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::marker::MarkerTrait; diff --git a/src/test/run-pass/move-1-unique.rs b/src/test/run-pass/move-1-unique.rs index ff06df079b05e..74f474b87525d 100644 --- a/src/test/run-pass/move-1-unique.rs +++ b/src/test/run-pass/move-1-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-2-unique.rs b/src/test/run-pass/move-2-unique.rs index 590caff3c2dc8..175c369e62842 100644 --- a/src/test/run-pass/move-2-unique.rs +++ b/src/test/run-pass/move-2-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-2.rs b/src/test/run-pass/move-2.rs index 0bff2c2292e74..faf45f8ae09b8 100644 --- a/src/test/run-pass/move-2.rs +++ b/src/test/run-pass/move-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-3-unique.rs b/src/test/run-pass/move-3-unique.rs index 8241424124e0e..171c455e8075c 100644 --- a/src/test/run-pass/move-3-unique.rs +++ b/src/test/run-pass/move-3-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-4-unique.rs b/src/test/run-pass/move-4-unique.rs index 9e5eeef75527c..94fa3dbca0e40 100644 --- a/src/test/run-pass/move-4-unique.rs +++ b/src/test/run-pass/move-4-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-4.rs b/src/test/run-pass/move-4.rs index c902677c64531..5c80e683ba42c 100644 --- a/src/test/run-pass/move-4.rs +++ b/src/test/run-pass/move-4.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-arg-2-unique.rs b/src/test/run-pass/move-arg-2-unique.rs index e496e9e210533..fd13db560e094 100644 --- a/src/test/run-pass/move-arg-2-unique.rs +++ b/src/test/run-pass/move-arg-2-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-arg-2.rs b/src/test/run-pass/move-arg-2.rs index fdb6799b90f79..fd8eddd0c1c1e 100644 --- a/src/test/run-pass/move-arg-2.rs +++ b/src/test/run-pass/move-arg-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/move-arg.rs b/src/test/run-pass/move-arg.rs index 87db5cbe2f13e..197f044ea782d 100644 --- a/src/test/run-pass/move-arg.rs +++ b/src/test/run-pass/move-arg.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn test(foo: int) { assert!((foo == 10)); } pub fn main() { let x = 10; test(x); } diff --git a/src/test/run-pass/move-guard-const.rs b/src/test/run-pass/move-guard-const.rs index d68a7c831f212..6e49538e98a3a 100644 --- a/src/test/run-pass/move-guard-const.rs +++ b/src/test/run-pass/move-guard-const.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(box_syntax)] fn main() { diff --git a/src/test/run-pass/move-nullary-fn.rs b/src/test/run-pass/move-nullary-fn.rs index b7cd3003e750c..cec1e43997206 100644 --- a/src/test/run-pass/move-nullary-fn.rs +++ b/src/test/run-pass/move-nullary-fn.rs @@ -9,6 +9,8 @@ // except according to those terms. // Issue #922 +// pretty-expanded FIXME #23616 + fn f2(_thing: F) where F: FnOnce() { } fn f(thing: F) where F: FnOnce() { diff --git a/src/test/run-pass/move-out-of-field.rs b/src/test/run-pass/move-out-of-field.rs index cb487a34f3388..a0eba4685b887 100644 --- a/src/test/run-pass/move-out-of-field.rs +++ b/src/test/run-pass/move-out-of-field.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::string::String; struct StringBuffer { diff --git a/src/test/run-pass/move-scalar.rs b/src/test/run-pass/move-scalar.rs index 845cb8ab6011e..a0ca9a43a5d4b 100644 --- a/src/test/run-pass/move-scalar.rs +++ b/src/test/run-pass/move-scalar.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let y: int = 42; diff --git a/src/test/run-pass/moves-based-on-type-cross-crate.rs b/src/test/run-pass/moves-based-on-type-cross-crate.rs index 16f15804e0e92..a313ec998f0a1 100644 --- a/src/test/run-pass/moves-based-on-type-cross-crate.rs +++ b/src/test/run-pass/moves-based-on-type-cross-crate.rs @@ -10,6 +10,8 @@ // aux-build:moves_based_on_type_lib.rs +// pretty-expanded FIXME #23616 + extern crate moves_based_on_type_lib; use moves_based_on_type_lib::f; diff --git a/src/test/run-pass/multi-let.rs b/src/test/run-pass/multi-let.rs index eb1444be37844..658b34e13f99b 100644 --- a/src/test/run-pass/multi-let.rs +++ b/src/test/run-pass/multi-let.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = 10; let y = x; diff --git a/src/test/run-pass/multidispatch1.rs b/src/test/run-pass/multidispatch1.rs index b9435afdc7a93..4243b28614cef 100644 --- a/src/test/run-pass/multidispatch1.rs +++ b/src/test/run-pass/multidispatch1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::fmt::Debug; trait MyTrait { diff --git a/src/test/run-pass/multidispatch2.rs b/src/test/run-pass/multidispatch2.rs index 6b52ea9dfa7a3..0655552c85bb4 100644 --- a/src/test/run-pass/multidispatch2.rs +++ b/src/test/run-pass/multidispatch2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::fmt::Debug; use std::default::Default; diff --git a/src/test/run-pass/multiline-comment.rs b/src/test/run-pass/multiline-comment.rs index 6203d47be5e6b..8c74326d1c34a 100644 --- a/src/test/run-pass/multiline-comment.rs +++ b/src/test/run-pass/multiline-comment.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + /* * This is a multi-line oldcomment. */ diff --git a/src/test/run-pass/multiple-trait-bounds.rs b/src/test/run-pass/multiple-trait-bounds.rs index 7ce1afb52a274..2746205b637dc 100644 --- a/src/test/run-pass/multiple-trait-bounds.rs +++ b/src/test/run-pass/multiple-trait-bounds.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(_: T) { } diff --git a/src/test/run-pass/mut-function-arguments.rs b/src/test/run-pass/mut-function-arguments.rs index b1f7da17c8f80..311eaf27da9f0 100644 --- a/src/test/run-pass/mut-function-arguments.rs +++ b/src/test/run-pass/mut-function-arguments.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/mut-in-ident-patterns.rs b/src/test/run-pass/mut-in-ident-patterns.rs index d3ae80861f231..f97dc9a5dd727 100644 --- a/src/test/run-pass/mut-in-ident-patterns.rs +++ b/src/test/run-pass/mut-in-ident-patterns.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn foo(&self, mut x: int) -> int { let val = x; diff --git a/src/test/run-pass/mut-vstore-expr.rs b/src/test/run-pass/mut-vstore-expr.rs index a276e902fbcfc..bc90a8cf0d77b 100644 --- a/src/test/run-pass/mut-vstore-expr.rs +++ b/src/test/run-pass/mut-vstore-expr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let _x: &mut [int] = &mut [ 1, 2, 3 ]; } diff --git a/src/test/run-pass/mutability-inherits-through-fixed-length-vec.rs b/src/test/run-pass/mutability-inherits-through-fixed-length-vec.rs index e074c3fb3d783..bed3b87def58b 100644 --- a/src/test/run-pass/mutability-inherits-through-fixed-length-vec.rs +++ b/src/test/run-pass/mutability-inherits-through-fixed-length-vec.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn test1() { let mut ints = [0; 32]; ints[0] += 1; diff --git a/src/test/run-pass/mutual-recursion-group.rs b/src/test/run-pass/mutual-recursion-group.rs index 8444a632fe889..cb2361dd5698e 100644 --- a/src/test/run-pass/mutual-recursion-group.rs +++ b/src/test/run-pass/mutual-recursion-group.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + enum colour { red, green, blue, } enum tree { children(Box), leaf(colour), } diff --git a/src/test/run-pass/namespaced-enum-emulate-flat-xc.rs b/src/test/run-pass/namespaced-enum-emulate-flat-xc.rs index ea7e05d24e2f3..f275e9b7425bd 100644 --- a/src/test/run-pass/namespaced-enum-emulate-flat-xc.rs +++ b/src/test/run-pass/namespaced-enum-emulate-flat-xc.rs @@ -10,6 +10,8 @@ // aux-build:namespaced_enum_emulate_flat.rs +// pretty-expanded FIXME #23616 + extern crate namespaced_enum_emulate_flat; use namespaced_enum_emulate_flat::{Foo, A, B, C}; diff --git a/src/test/run-pass/namespaced-enum-emulate-flat.rs b/src/test/run-pass/namespaced-enum-emulate-flat.rs index e4a8ec19eb8e8..c557d624586bb 100644 --- a/src/test/run-pass/namespaced-enum-emulate-flat.rs +++ b/src/test/run-pass/namespaced-enum-emulate-flat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub use Foo::*; use nest::{Bar, D, E, F}; diff --git a/src/test/run-pass/namespaced-enum-glob-import-xcrate.rs b/src/test/run-pass/namespaced-enum-glob-import-xcrate.rs index e5317c2f57302..7bfe90bad7f4f 100644 --- a/src/test/run-pass/namespaced-enum-glob-import-xcrate.rs +++ b/src/test/run-pass/namespaced-enum-glob-import-xcrate.rs @@ -10,6 +10,8 @@ // aux-build:namespaced_enums.rs +// pretty-expanded FIXME #23616 + extern crate namespaced_enums; fn _f(f: namespaced_enums::Foo) { diff --git a/src/test/run-pass/namespaced-enum-glob-import.rs b/src/test/run-pass/namespaced-enum-glob-import.rs index c48be3af248f0..8d58cd950a8db 100644 --- a/src/test/run-pass/namespaced-enum-glob-import.rs +++ b/src/test/run-pass/namespaced-enum-glob-import.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod m2 { pub enum Foo { A, diff --git a/src/test/run-pass/namespaced-enums-xcrate.rs b/src/test/run-pass/namespaced-enums-xcrate.rs index 3b56d6c59a162..0046d80e086d1 100644 --- a/src/test/run-pass/namespaced-enums-xcrate.rs +++ b/src/test/run-pass/namespaced-enums-xcrate.rs @@ -10,6 +10,8 @@ // aux-build:namespaced_enums.rs +// pretty-expanded FIXME #23616 + extern crate namespaced_enums; use namespaced_enums::Foo; diff --git a/src/test/run-pass/namespaced-enums.rs b/src/test/run-pass/namespaced-enums.rs index 13f70f6a740ae..a0b8109b93b2e 100644 --- a/src/test/run-pass/namespaced-enums.rs +++ b/src/test/run-pass/namespaced-enums.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { A, B(int), diff --git a/src/test/run-pass/negative.rs b/src/test/run-pass/negative.rs index 435382666f1a2..c5b6a6a035bba 100644 --- a/src/test/run-pass/negative.rs +++ b/src/test/run-pass/negative.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { match -5 { -5 => {} diff --git a/src/test/run-pass/nested-block-comment.rs b/src/test/run-pass/nested-block-comment.rs index a6d932935ade6..650e28548c17a 100644 --- a/src/test/run-pass/nested-block-comment.rs +++ b/src/test/run-pass/nested-block-comment.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* This test checks that nested comments are supported /* diff --git a/src/test/run-pass/nested-class.rs b/src/test/run-pass/nested-class.rs index 19eba0808c882..8b156ae364dd6 100644 --- a/src/test/run-pass/nested-class.rs +++ b/src/test/run-pass/nested-class.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { struct b { i: int, diff --git a/src/test/run-pass/nested-enum-same-names.rs b/src/test/run-pass/nested-enum-same-names.rs index 33c4ed6234eaa..c0baab66c597a 100644 --- a/src/test/run-pass/nested-enum-same-names.rs +++ b/src/test/run-pass/nested-enum-same-names.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* #7770 ICE with sibling methods containing same-name-enum containing diff --git a/src/test/run-pass/nested-exhaustive-match.rs b/src/test/run-pass/nested-exhaustive-match.rs index b2a47e0ccb88b..0b30cc2cde366 100644 --- a/src/test/run-pass/nested-exhaustive-match.rs +++ b/src/test/run-pass/nested-exhaustive-match.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo { foo: bool, bar: Option, baz: int } pub fn main() { diff --git a/src/test/run-pass/nested-function-names-issue-8587.rs b/src/test/run-pass/nested-function-names-issue-8587.rs index f697f0b59d65f..488a722f67411 100644 --- a/src/test/run-pass/nested-function-names-issue-8587.rs +++ b/src/test/run-pass/nested-function-names-issue-8587.rs @@ -13,6 +13,8 @@ // // Issue #8587 +// pretty-expanded FIXME #23616 + pub struct X; impl X { diff --git a/src/test/run-pass/nested_item_main.rs b/src/test/run-pass/nested_item_main.rs index d73fba561430a..3c0123f7519dd 100644 --- a/src/test/run-pass/nested_item_main.rs +++ b/src/test/run-pass/nested_item_main.rs @@ -10,6 +10,8 @@ // aux-build:nested_item.rs +// pretty-expanded FIXME #23616 + extern crate nested_item; pub fn main() { diff --git a/src/test/run-pass/new-box-syntax.rs b/src/test/run-pass/new-box-syntax.rs index 1595b677c8d43..8482dd84d876c 100644 --- a/src/test/run-pass/new-box-syntax.rs +++ b/src/test/run-pass/new-box-syntax.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/src/test/run-pass/new-unicode-escapes.rs b/src/test/run-pass/new-unicode-escapes.rs index 9e4654a13f03b..8c2d5e09adb47 100644 --- a/src/test/run-pass/new-unicode-escapes.rs +++ b/src/test/run-pass/new-unicode-escapes.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] pub fn main() { diff --git a/src/test/run-pass/new-unsafe-pointers.rs b/src/test/run-pass/new-unsafe-pointers.rs index 96ccb1a37a2a0..db387224c3879 100644 --- a/src/test/run-pass/new-unsafe-pointers.rs +++ b/src/test/run-pass/new-unsafe-pointers.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let _a: *const int = 3 as *const int; let _a: *mut int = 3 as *mut int; diff --git a/src/test/run-pass/newlambdas-ret-infer.rs b/src/test/run-pass/newlambdas-ret-infer.rs index 039e53cab8044..543dbb36b2850 100644 --- a/src/test/run-pass/newlambdas-ret-infer.rs +++ b/src/test/run-pass/newlambdas-ret-infer.rs @@ -12,6 +12,8 @@ // expression // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. +// pretty-expanded FIXME #23616 + fn unique() -> Box { return Box::new(|| ()); } pub fn main() { diff --git a/src/test/run-pass/newlambdas-ret-infer2.rs b/src/test/run-pass/newlambdas-ret-infer2.rs index b7216c87c30bb..e8297173a5834 100644 --- a/src/test/run-pass/newlambdas-ret-infer2.rs +++ b/src/test/run-pass/newlambdas-ret-infer2.rs @@ -12,6 +12,8 @@ // expression // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. +// pretty-expanded FIXME #23616 + fn unique() -> Box { Box::new(|| ()) } pub fn main() { diff --git a/src/test/run-pass/newlambdas.rs b/src/test/run-pass/newlambdas.rs index 01875288aef0e..0fe1227523f63 100644 --- a/src/test/run-pass/newlambdas.rs +++ b/src/test/run-pass/newlambdas.rs @@ -10,6 +10,8 @@ // Tests for the new |args| expr lambda syntax +// pretty-expanded FIXME #23616 + fn f(i: int, f: F) -> int where F: FnOnce(int) -> int { f(i) } fn g(_g: G) where G: FnOnce() { } diff --git a/src/test/run-pass/newtype-polymorphic.rs b/src/test/run-pass/newtype-polymorphic.rs index 4b7dbdc9e5b9e..424d518895cfb 100644 --- a/src/test/run-pass/newtype-polymorphic.rs +++ b/src/test/run-pass/newtype-polymorphic.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Clone)] struct myvec(Vec ); diff --git a/src/test/run-pass/newtype-struct-drop-run.rs b/src/test/run-pass/newtype-struct-drop-run.rs index 8c35abad7f1e6..ad878fe4b319d 100644 --- a/src/test/run-pass/newtype-struct-drop-run.rs +++ b/src/test/run-pass/newtype-struct-drop-run.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] // Make sure the destructor is run for newtype structs. diff --git a/src/test/run-pass/newtype-struct-with-dtor.rs b/src/test/run-pass/newtype-struct-with-dtor.rs index 916ec01257f16..d1ad5614e3f35 100644 --- a/src/test/run-pass/newtype-struct-with-dtor.rs +++ b/src/test/run-pass/newtype-struct-with-dtor.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/newtype-struct-xc-2.rs b/src/test/run-pass/newtype-struct-xc-2.rs index 0302a0588e4cf..ac03f65750df5 100644 --- a/src/test/run-pass/newtype-struct-xc-2.rs +++ b/src/test/run-pass/newtype-struct-xc-2.rs @@ -10,6 +10,8 @@ // aux-build:newtype_struct_xc.rs +// pretty-expanded FIXME #23616 + extern crate newtype_struct_xc; use newtype_struct_xc::Au; diff --git a/src/test/run-pass/newtype-struct-xc.rs b/src/test/run-pass/newtype-struct-xc.rs index 3e375c48316c8..0cac4530faf32 100644 --- a/src/test/run-pass/newtype-struct-xc.rs +++ b/src/test/run-pass/newtype-struct-xc.rs @@ -10,6 +10,8 @@ // aux-build:newtype_struct_xc.rs +// pretty-expanded FIXME #23616 + extern crate newtype_struct_xc; pub fn main() { diff --git a/src/test/run-pass/nil-decl-in-foreign.rs b/src/test/run-pass/nil-decl-in-foreign.rs index e23c970e29a58..97ee237771f3f 100644 --- a/src/test/run-pass/nil-decl-in-foreign.rs +++ b/src/test/run-pass/nil-decl-in-foreign.rs @@ -9,6 +9,8 @@ // except according to those terms. // Issue #901 +// pretty-expanded FIXME #23616 + mod libc { extern { pub fn printf(x: ()); diff --git a/src/test/run-pass/nil-pattern.rs b/src/test/run-pass/nil-pattern.rs index 329590b547db3..342644e038437 100644 --- a/src/test/run-pass/nil-pattern.rs +++ b/src/test/run-pass/nil-pattern.rs @@ -8,4 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = (); match x { () => { } } } diff --git a/src/test/run-pass/no-landing-pads.rs b/src/test/run-pass/no-landing-pads.rs index 5ce32e4fe2ccb..da57c81a66978 100644 --- a/src/test/run-pass/no-landing-pads.rs +++ b/src/test/run-pass/no-landing-pads.rs @@ -10,6 +10,8 @@ // compile-flags: -Z no-landing-pads +// pretty-expanded FIXME #23616 + use std::thread; static mut HIT: bool = false; diff --git a/src/test/run-pass/non-built-in-quote.rs b/src/test/run-pass/non-built-in-quote.rs index 8b41670734f95..6c0df5f4c14e7 100644 --- a/src/test/run-pass/non-built-in-quote.rs +++ b/src/test/run-pass/non-built-in-quote.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! quote_tokens { () => (()) } pub fn main() { diff --git a/src/test/run-pass/non-legacy-modes.rs b/src/test/run-pass/non-legacy-modes.rs index e422cb803215b..1eeea66238322 100644 --- a/src/test/run-pass/non-legacy-modes.rs +++ b/src/test/run-pass/non-legacy-modes.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct X { repr: int } diff --git a/src/test/run-pass/nondrop-cycle.rs b/src/test/run-pass/nondrop-cycle.rs index bbce9a8f4a6ad..a28f2b15b9285 100644 --- a/src/test/run-pass/nondrop-cycle.rs +++ b/src/test/run-pass/nondrop-cycle.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::cell::Cell; struct C<'a> { diff --git a/src/test/run-pass/nul-characters.rs b/src/test/run-pass/nul-characters.rs index 4a14969209f02..25c111daad597 100644 --- a/src/test/run-pass/nul-characters.rs +++ b/src/test/run-pass/nul-characters.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let all_nuls1 = "\0\x00\u{0}\u{0}"; diff --git a/src/test/run-pass/nullable-pointer-ffi-compat.rs b/src/test/run-pass/nullable-pointer-ffi-compat.rs index 32432c07dcf41..42cef21f88496 100644 --- a/src/test/run-pass/nullable-pointer-ffi-compat.rs +++ b/src/test/run-pass/nullable-pointer-ffi-compat.rs @@ -20,6 +20,8 @@ // then we simply express the enum as just a pointer and not wrap it // in a struct. +// pretty-expanded FIXME #23616 + use std::mem; #[inline(never)] diff --git a/src/test/run-pass/nullable-pointer-iotareduction.rs b/src/test/run-pass/nullable-pointer-iotareduction.rs index 03027e40d6c1e..b92ae3f23ec1a 100644 --- a/src/test/run-pass/nullable-pointer-iotareduction.rs +++ b/src/test/run-pass/nullable-pointer-iotareduction.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/nullable-pointer-size.rs b/src/test/run-pass/nullable-pointer-size.rs index 02fc0cf0291d4..2b908a6c5b775 100644 --- a/src/test/run-pass/nullable-pointer-size.rs +++ b/src/test/run-pass/nullable-pointer-size.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; enum E { Thing(int, T), Nothing((), ((), ()), [i8; 0]) } diff --git a/src/test/run-pass/nullary-or-pattern.rs b/src/test/run-pass/nullary-or-pattern.rs index 565ef278d5d7c..4369e4095fbe5 100644 --- a/src/test/run-pass/nullary-or-pattern.rs +++ b/src/test/run-pass/nullary-or-pattern.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum blah { a, b, } fn or_alt(q: blah) -> int { diff --git a/src/test/run-pass/numeric-method-autoexport.rs b/src/test/run-pass/numeric-method-autoexport.rs index 3e3391b034210..cb41949a722c2 100644 --- a/src/test/run-pass/numeric-method-autoexport.rs +++ b/src/test/run-pass/numeric-method-autoexport.rs @@ -15,6 +15,8 @@ // necessary. Testing the methods of the impls is done within the source // file for each numeric type. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::ops::Add; diff --git a/src/test/run-pass/object-lifetime-default-default-to-static.rs b/src/test/run-pass/object-lifetime-default-default-to-static.rs index c385a0195b6b2..1b631f171eb79 100644 --- a/src/test/run-pass/object-lifetime-default-default-to-static.rs +++ b/src/test/run-pass/object-lifetime-default-default-to-static.rs @@ -11,6 +11,8 @@ // Test that `Box` is equivalent to `Box`, both in // fields and fn arguments. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Test { diff --git a/src/test/run-pass/object-lifetime-default-from-ref-struct.rs b/src/test/run-pass/object-lifetime-default-from-ref-struct.rs index 24da960367906..910d933d46f08 100644 --- a/src/test/run-pass/object-lifetime-default-from-ref-struct.rs +++ b/src/test/run-pass/object-lifetime-default-from-ref-struct.rs @@ -11,6 +11,8 @@ // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Test { diff --git a/src/test/run-pass/object-lifetime-default-from-rptr-box.rs b/src/test/run-pass/object-lifetime-default-from-rptr-box.rs index 825800e1d4447..e2047ee3256d1 100644 --- a/src/test/run-pass/object-lifetime-default-from-rptr-box.rs +++ b/src/test/run-pass/object-lifetime-default-from-rptr-box.rs @@ -11,6 +11,8 @@ // Test that the lifetime from the enclosing `&` is "inherited" // through the `Box` struct. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Test { diff --git a/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs b/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs index 0f34d945c8fb9..edd0bdb32c2b1 100644 --- a/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs +++ b/src/test/run-pass/object-lifetime-default-from-rptr-mut.rs @@ -11,6 +11,8 @@ // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Test { diff --git a/src/test/run-pass/object-lifetime-default-from-rptr-struct.rs b/src/test/run-pass/object-lifetime-default-from-rptr-struct.rs index 9d5dac536f10a..3c2419e420d3d 100644 --- a/src/test/run-pass/object-lifetime-default-from-rptr-struct.rs +++ b/src/test/run-pass/object-lifetime-default-from-rptr-struct.rs @@ -11,6 +11,8 @@ // Test that the lifetime from the enclosing `&` is "inherited" // through the `MyBox` struct. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Test { diff --git a/src/test/run-pass/object-lifetime-default-from-rptr.rs b/src/test/run-pass/object-lifetime-default-from-rptr.rs index b7a28a5c52415..d9e0b22fbfa4b 100644 --- a/src/test/run-pass/object-lifetime-default-from-rptr.rs +++ b/src/test/run-pass/object-lifetime-default-from-rptr.rs @@ -11,6 +11,8 @@ // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Test { diff --git a/src/test/run-pass/object-method-numbering.rs b/src/test/run-pass/object-method-numbering.rs index 9c7a925b5bbc2..8b8c56aee8391 100644 --- a/src/test/run-pass/object-method-numbering.rs +++ b/src/test/run-pass/object-method-numbering.rs @@ -11,6 +11,8 @@ // Test for using an object with an associated type binding as the // instantiation for a generic type with a bound. +// pretty-expanded FIXME #23616 + trait SomeTrait { type SomeType; diff --git a/src/test/run-pass/object-safety-sized-self-by-value-self.rs b/src/test/run-pass/object-safety-sized-self-by-value-self.rs index ae092333134ea..b735743927c89 100644 --- a/src/test/run-pass/object-safety-sized-self-by-value-self.rs +++ b/src/test/run-pass/object-safety-sized-self-by-value-self.rs @@ -11,6 +11,8 @@ // Check that a trait is still object-safe (and usable) if it has // methods with by-value self so long as they require `Self : Sized`. +// pretty-expanded FIXME #23616 + trait Counter { fn tick(&mut self) -> u32; fn get(self) -> u32 where Self : Sized; diff --git a/src/test/run-pass/object-safety-sized-self-generic-method.rs b/src/test/run-pass/object-safety-sized-self-generic-method.rs index 1a42c4b6ef664..696c5a0970914 100644 --- a/src/test/run-pass/object-safety-sized-self-generic-method.rs +++ b/src/test/run-pass/object-safety-sized-self-generic-method.rs @@ -11,6 +11,8 @@ // Check that a trait is still object-safe (and usable) if it has // generic methods so long as they require `Self : Sized`. +// pretty-expanded FIXME #23616 + trait Counter { fn tick(&mut self) -> u32; fn with(&self, f: F) where Self : Sized; diff --git a/src/test/run-pass/object-safety-sized-self-return-Self.rs b/src/test/run-pass/object-safety-sized-self-return-Self.rs index 7f075bbb6c2f2..17c41f2194b69 100644 --- a/src/test/run-pass/object-safety-sized-self-return-Self.rs +++ b/src/test/run-pass/object-safety-sized-self-return-Self.rs @@ -11,6 +11,8 @@ // Check that a trait is still object-safe (and usable) if it has // methods that return `Self` so long as they require `Self : Sized`. +// pretty-expanded FIXME #23616 + trait Counter { fn new() -> Self where Self : Sized; fn tick(&mut self) -> u32; diff --git a/src/test/run-pass/objects-coerce-freeze-borrored.rs b/src/test/run-pass/objects-coerce-freeze-borrored.rs index d2523bc4f246f..efdd42c382c15 100644 --- a/src/test/run-pass/objects-coerce-freeze-borrored.rs +++ b/src/test/run-pass/objects-coerce-freeze-borrored.rs @@ -10,6 +10,8 @@ // Test that we can coerce an `@Object` to an `&Object` +// pretty-expanded FIXME #23616 + trait Foo { fn foo(&self) -> uint; fn bar(&mut self) -> uint; diff --git a/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs b/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs index 9cee266c4a7b9..15ed94e62bad9 100644 --- a/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs +++ b/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs @@ -12,6 +12,8 @@ // closed over do not contain managed values, and thus the boxes do // not have headers. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/objects-owned-object-owned-method.rs b/src/test/run-pass/objects-owned-object-owned-method.rs index d355999c50606..e72065885324e 100644 --- a/src/test/run-pass/objects-owned-object-owned-method.rs +++ b/src/test/run-pass/objects-owned-object-owned-method.rs @@ -12,6 +12,8 @@ // closed over contain managed values. This implies that the boxes // will have headers that must be skipped over. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/once-move-out-on-heap.rs b/src/test/run-pass/once-move-out-on-heap.rs index 8fe57a655aa53..7bf8b693d9bbf 100644 --- a/src/test/run-pass/once-move-out-on-heap.rs +++ b/src/test/run-pass/once-move-out-on-heap.rs @@ -11,6 +11,8 @@ // Testing guarantees provided by once functions. +// pretty-expanded FIXME #23616 + use std::sync::Arc; fn foo(blk: F) { diff --git a/src/test/run-pass/one-tuple.rs b/src/test/run-pass/one-tuple.rs index 8377a45a1d8a0..6520e42dbe3f8 100644 --- a/src/test/run-pass/one-tuple.rs +++ b/src/test/run-pass/one-tuple.rs @@ -10,6 +10,8 @@ // Why one-tuples? Because macros. +// pretty-expanded FIXME #23616 + pub fn main() { match ('c',) { (x,) => { diff --git a/src/test/run-pass/operator-associativity.rs b/src/test/run-pass/operator-associativity.rs index bee6d23a27d62..ccfdb83ab8aa1 100644 --- a/src/test/run-pass/operator-associativity.rs +++ b/src/test/run-pass/operator-associativity.rs @@ -12,4 +12,6 @@ // Testcase for issue #130, operator associativity. +// pretty-expanded FIXME #23616 + pub fn main() { assert!((3 * 5 / 2 == 7)); } diff --git a/src/test/run-pass/option-unwrap.rs b/src/test/run-pass/option-unwrap.rs index 71323016e835e..b0f5d8e53bd5d 100644 --- a/src/test/run-pass/option-unwrap.rs +++ b/src/test/run-pass/option-unwrap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] use std::cell::Cell; diff --git a/src/test/run-pass/or-pattern.rs b/src/test/run-pass/or-pattern.rs index ef399044abc99..1aaef7b817440 100644 --- a/src/test/run-pass/or-pattern.rs +++ b/src/test/run-pass/or-pattern.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum blah { a(int, int, uint), b(int, int), c, } fn or_alt(q: blah) -> int { diff --git a/src/test/run-pass/order-drop-with-match.rs b/src/test/run-pass/order-drop-with-match.rs index 3710f1b9d3052..a42720d3cb430 100644 --- a/src/test/run-pass/order-drop-with-match.rs +++ b/src/test/run-pass/order-drop-with-match.rs @@ -14,6 +14,8 @@ // in ORDER matching up to when it ran. // Correct order is: matched, inner, outer +// pretty-expanded FIXME #23616 + static mut ORDER: [uint; 3] = [0, 0, 0]; static mut INDEX: uint = 0; diff --git a/src/test/run-pass/osx-frameworks.rs b/src/test/run-pass/osx-frameworks.rs index 9ac67b4c7838d..41b34dc79bd95 100644 --- a/src/test/run-pass/osx-frameworks.rs +++ b/src/test/run-pass/osx-frameworks.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/out-pointer-aliasing.rs b/src/test/run-pass/out-pointer-aliasing.rs index eee9838da21ee..1a6c60426afa8 100644 --- a/src/test/run-pass/out-pointer-aliasing.rs +++ b/src/test/run-pass/out-pointer-aliasing.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] pub struct Foo { f1: int, diff --git a/src/test/run-pass/output-slot-variants.rs b/src/test/run-pass/output-slot-variants.rs index fb87cd5eb69cd..f80fbdeb1e376 100644 --- a/src/test/run-pass/output-slot-variants.rs +++ b/src/test/run-pass/output-slot-variants.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unused_variable)] #![allow(unknown_features)] diff --git a/src/test/run-pass/overloaded-autoderef-indexing.rs b/src/test/run-pass/overloaded-autoderef-indexing.rs index 4cb7ece4ab876..fdf42423b662b 100644 --- a/src/test/run-pass/overloaded-autoderef-indexing.rs +++ b/src/test/run-pass/overloaded-autoderef-indexing.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ops::Deref; struct DerefArray<'a, T:'a> { diff --git a/src/test/run-pass/overloaded-autoderef-order.rs b/src/test/run-pass/overloaded-autoderef-order.rs index d023a01f4b1dd..fdd7a5000b2ee 100644 --- a/src/test/run-pass/overloaded-autoderef-order.rs +++ b/src/test/run-pass/overloaded-autoderef-order.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::rc::Rc; use std::ops::Deref; diff --git a/src/test/run-pass/overloaded-autoderef-vtable.rs b/src/test/run-pass/overloaded-autoderef-vtable.rs index d50f2efe0e7b4..f949f6e4ef43a 100644 --- a/src/test/run-pass/overloaded-autoderef-vtable.rs +++ b/src/test/run-pass/overloaded-autoderef-vtable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ops::Deref; struct DerefWithHelper { diff --git a/src/test/run-pass/overloaded-autoderef-xcrate.rs b/src/test/run-pass/overloaded-autoderef-xcrate.rs index f8dd729ec67dc..b97fb49112484 100644 --- a/src/test/run-pass/overloaded-autoderef-xcrate.rs +++ b/src/test/run-pass/overloaded-autoderef-xcrate.rs @@ -10,6 +10,8 @@ // aux-build:overloaded_autoderef_xc.rs +// pretty-expanded FIXME #23616 + extern crate overloaded_autoderef_xc; fn main() { diff --git a/src/test/run-pass/overloaded-calls-object-one-arg.rs b/src/test/run-pass/overloaded-calls-object-one-arg.rs index 25b63cd14c435..7cb57a912535a 100644 --- a/src/test/run-pass/overloaded-calls-object-one-arg.rs +++ b/src/test/run-pass/overloaded-calls-object-one-arg.rs @@ -11,6 +11,8 @@ // Tests calls to closure arguments where the closure takes 1 argument. // This is a bit tricky due to rust-call ABI. +// pretty-expanded FIXME #23616 + fn foo(f: &mut FnMut(int) -> int) -> int { f(22) } diff --git a/src/test/run-pass/overloaded-calls-object-two-args.rs b/src/test/run-pass/overloaded-calls-object-two-args.rs index 026ebc308408f..65a63a33d1bb6 100644 --- a/src/test/run-pass/overloaded-calls-object-two-args.rs +++ b/src/test/run-pass/overloaded-calls-object-two-args.rs @@ -11,6 +11,8 @@ // Tests calls to closure arguments where the closure takes 2 arguments. // This is a bit tricky due to rust-call ABI. +// pretty-expanded FIXME #23616 + fn foo(f: &mut FnMut(int, int) -> int) -> int { f(1, 2) } diff --git a/src/test/run-pass/overloaded-calls-object-zero-args.rs b/src/test/run-pass/overloaded-calls-object-zero-args.rs index b38f8213b4ab8..46fa061908209 100644 --- a/src/test/run-pass/overloaded-calls-object-zero-args.rs +++ b/src/test/run-pass/overloaded-calls-object-zero-args.rs @@ -11,6 +11,8 @@ // Tests calls to closure arguments where the closure takes 0 arguments. // This is a bit tricky due to rust-call ABI. +// pretty-expanded FIXME #23616 + fn foo(f: &mut FnMut() -> int) -> int { f() } diff --git a/src/test/run-pass/overloaded-calls-param-vtables.rs b/src/test/run-pass/overloaded-calls-param-vtables.rs index 029a8eaad24bc..f5ccd87fd25df 100644 --- a/src/test/run-pass/overloaded-calls-param-vtables.rs +++ b/src/test/run-pass/overloaded-calls-param-vtables.rs @@ -10,6 +10,8 @@ // Tests that nested vtables work with overloaded calls. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::marker::PhantomData; diff --git a/src/test/run-pass/overloaded-calls-simple.rs b/src/test/run-pass/overloaded-calls-simple.rs index fc6540b6e3ef4..17990bb1bd156 100644 --- a/src/test/run-pass/overloaded-calls-simple.rs +++ b/src/test/run-pass/overloaded-calls-simple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(lang_items, unboxed_closures, core)] use std::ops::{Fn, FnMut, FnOnce}; diff --git a/src/test/run-pass/overloaded-calls-zero-args.rs b/src/test/run-pass/overloaded-calls-zero-args.rs index e75f217a2c606..ea78a75c0c751 100644 --- a/src/test/run-pass/overloaded-calls-zero-args.rs +++ b/src/test/run-pass/overloaded-calls-zero-args.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::ops::{FnMut}; diff --git a/src/test/run-pass/overloaded-deref-count.rs b/src/test/run-pass/overloaded-deref-count.rs index f3091b53e8bad..187b032b0f170 100644 --- a/src/test/run-pass/overloaded-deref-count.rs +++ b/src/test/run-pass/overloaded-deref-count.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::cell::Cell; use std::ops::{Deref, DerefMut}; use std::vec::Vec; diff --git a/src/test/run-pass/overloaded-index-assoc-list.rs b/src/test/run-pass/overloaded-index-assoc-list.rs index 7b059cb6a3327..12ed040bcb877 100644 --- a/src/test/run-pass/overloaded-index-assoc-list.rs +++ b/src/test/run-pass/overloaded-index-assoc-list.rs @@ -11,6 +11,8 @@ // Test overloading of the `[]` operator. In particular test that it // takes its argument *by reference*. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::ops::Index; diff --git a/src/test/run-pass/overloaded-index-autoderef.rs b/src/test/run-pass/overloaded-index-autoderef.rs index 214817b0a15b5..b8786475674d7 100644 --- a/src/test/run-pass/overloaded-index-autoderef.rs +++ b/src/test/run-pass/overloaded-index-autoderef.rs @@ -10,6 +10,8 @@ // Test overloaded indexing combined with autoderef. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, core)] diff --git a/src/test/run-pass/overloaded-index-in-field.rs b/src/test/run-pass/overloaded-index-in-field.rs index 66f8c5c4238fa..23af677246a98 100644 --- a/src/test/run-pass/overloaded-index-in-field.rs +++ b/src/test/run-pass/overloaded-index-in-field.rs @@ -11,6 +11,8 @@ // Test using overloaded indexing when the "map" is stored in a // field. This caused problems at some point. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::ops::Index; diff --git a/src/test/run-pass/overloaded-index.rs b/src/test/run-pass/overloaded-index.rs index 413cef86c5df8..17022a570a2bd 100644 --- a/src/test/run-pass/overloaded-index.rs +++ b/src/test/run-pass/overloaded-index.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::ops::{Index, IndexMut}; diff --git a/src/test/run-pass/owned-implies-static.rs b/src/test/run-pass/owned-implies-static.rs index 9be6b212a3caa..f698b660751ab 100644 --- a/src/test/run-pass/owned-implies-static.rs +++ b/src/test/run-pass/owned-implies-static.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(_x: T) {} pub fn main() { diff --git a/src/test/run-pass/packed-struct-borrow-element.rs b/src/test/run-pass/packed-struct-borrow-element.rs index c6c74fe3fda1d..e7a662c526092 100644 --- a/src/test/run-pass/packed-struct-borrow-element.rs +++ b/src/test/run-pass/packed-struct-borrow-element.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[repr(packed)] struct Foo { bar: u8, diff --git a/src/test/run-pass/packed-struct-generic-layout.rs b/src/test/run-pass/packed-struct-generic-layout.rs index 004a30220183e..5d518749d9aef 100644 --- a/src/test/run-pass/packed-struct-generic-layout.rs +++ b/src/test/run-pass/packed-struct-generic-layout.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/packed-struct-generic-size.rs b/src/test/run-pass/packed-struct-generic-size.rs index 45791332bbedf..6c24b71971e38 100644 --- a/src/test/run-pass/packed-struct-generic-size.rs +++ b/src/test/run-pass/packed-struct-generic-size.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/packed-struct-layout.rs b/src/test/run-pass/packed-struct-layout.rs index 9e94502a92a63..5d2454be2fbd5 100644 --- a/src/test/run-pass/packed-struct-layout.rs +++ b/src/test/run-pass/packed-struct-layout.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/packed-struct-match.rs b/src/test/run-pass/packed-struct-match.rs index 46ffed0cba968..6df761d1b21fe 100644 --- a/src/test/run-pass/packed-struct-match.rs +++ b/src/test/run-pass/packed-struct-match.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[repr(packed)] struct Foo { bar: u8, diff --git a/src/test/run-pass/packed-struct-size-xc.rs b/src/test/run-pass/packed-struct-size-xc.rs index c2968956785fa..b7ea720caf76d 100644 --- a/src/test/run-pass/packed-struct-size-xc.rs +++ b/src/test/run-pass/packed-struct-size-xc.rs @@ -10,6 +10,8 @@ // aux-build:packed.rs +// pretty-expanded FIXME #23616 + extern crate packed; use std::mem; diff --git a/src/test/run-pass/packed-struct-size.rs b/src/test/run-pass/packed-struct-size.rs index 846d51e2e7ecc..3d748c404228b 100644 --- a/src/test/run-pass/packed-struct-size.rs +++ b/src/test/run-pass/packed-struct-size.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/packed-tuple-struct-layout.rs b/src/test/run-pass/packed-tuple-struct-layout.rs index c41d678b0f5b7..9d96adc29dd36 100644 --- a/src/test/run-pass/packed-tuple-struct-layout.rs +++ b/src/test/run-pass/packed-tuple-struct-layout.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/packed-tuple-struct-size.rs b/src/test/run-pass/packed-tuple-struct-size.rs index a0b88ea53c5a4..7b7cd5929883d 100644 --- a/src/test/run-pass/packed-tuple-struct-size.rs +++ b/src/test/run-pass/packed-tuple-struct-size.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/panic-in-dtor-drops-fields.rs b/src/test/run-pass/panic-in-dtor-drops-fields.rs index 6da15b97acaae..c1ebd2a530451 100644 --- a/src/test/run-pass/panic-in-dtor-drops-fields.rs +++ b/src/test/run-pass/panic-in-dtor-drops-fields.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::thread; static mut dropped: bool = false; diff --git a/src/test/run-pass/parameterized-trait-with-bounds.rs b/src/test/run-pass/parameterized-trait-with-bounds.rs index 061c9168955a4..eb483009662bf 100644 --- a/src/test/run-pass/parameterized-trait-with-bounds.rs +++ b/src/test/run-pass/parameterized-trait-with-bounds.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] diff --git a/src/test/run-pass/parse-assoc-type-lt.rs b/src/test/run-pass/parse-assoc-type-lt.rs index 5649c4c784daf..c81677220539e 100644 --- a/src/test/run-pass/parse-assoc-type-lt.rs +++ b/src/test/run-pass/parse-assoc-type-lt.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { type T; fn foo() -> Box<::T>; diff --git a/src/test/run-pass/parse-complex-macro-invoc-op.rs b/src/test/run-pass/parse-complex-macro-invoc-op.rs index 0995910fd4cf6..e4c9fd9d8ef83 100644 --- a/src/test/run-pass/parse-complex-macro-invoc-op.rs +++ b/src/test/run-pass/parse-complex-macro-invoc-op.rs @@ -10,6 +10,8 @@ // Test parsing binary operators after macro invocations. +// pretty-expanded FIXME #23616 + #![feature(macro_rules)] macro_rules! id { diff --git a/src/test/run-pass/path.rs b/src/test/run-pass/path.rs index 08d00d4dc035b..b1a761d09fda0 100644 --- a/src/test/run-pass/path.rs +++ b/src/test/run-pass/path.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + mod foo { pub fn bar(_offset: uint) { } } diff --git a/src/test/run-pass/pattern-bound-var-in-for-each.rs b/src/test/run-pass/pattern-bound-var-in-for-each.rs index 7d9c3d324f070..ad12775a31df8 100644 --- a/src/test/run-pass/pattern-bound-var-in-for-each.rs +++ b/src/test/run-pass/pattern-bound-var-in-for-each.rs @@ -12,6 +12,8 @@ // pattern-bound var is an upvar (when translating // the for-each body) +// pretty-expanded FIXME #23616 + fn foo(src: uint) { match Some(src) { diff --git a/src/test/run-pass/pred-not-bool.rs b/src/test/run-pass/pred-not-bool.rs index 15bf05fc0cbec..d761f1610d4a8 100644 --- a/src/test/run-pass/pred-not-bool.rs +++ b/src/test/run-pass/pred-not-bool.rs @@ -11,6 +11,8 @@ // this checks that a pred with a non-bool return // type is rejected, even if the pred is never used +// pretty-expanded FIXME #23616 + fn bad(_a: int) -> int { return 37; } //~ ERROR Non-boolean return type pub fn main() { } diff --git a/src/test/run-pass/priv-impl-prim-ty.rs b/src/test/run-pass/priv-impl-prim-ty.rs index 679aa3d668f49..17fb5aad6d097 100644 --- a/src/test/run-pass/priv-impl-prim-ty.rs +++ b/src/test/run-pass/priv-impl-prim-ty.rs @@ -10,6 +10,8 @@ // aux-build:priv-impl-prim-ty.rs +// pretty-expanded FIXME #23616 + extern crate "priv-impl-prim-ty" as bar; pub fn main() { diff --git a/src/test/run-pass/privacy-ns.rs b/src/test/run-pass/privacy-ns.rs index e9b8e694d6060..8082816c43611 100644 --- a/src/test/run-pass/privacy-ns.rs +++ b/src/test/run-pass/privacy-ns.rs @@ -12,6 +12,8 @@ // Check we do the correct privacy checks when we import a name and there is an // item with that name in both the value and type namespaces. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] #![allow(unused_imports)] diff --git a/src/test/run-pass/privacy-reexport.rs b/src/test/run-pass/privacy-reexport.rs index b40aacdafc1fa..d9d107d900b6a 100644 --- a/src/test/run-pass/privacy-reexport.rs +++ b/src/test/run-pass/privacy-reexport.rs @@ -10,6 +10,8 @@ // aux-build:privacy_reexport.rs +// pretty-expanded FIXME #23616 + extern crate privacy_reexport; pub fn main() { diff --git a/src/test/run-pass/privacy1.rs b/src/test/run-pass/privacy1.rs index 7a07c97090223..329c4aaa873a9 100644 --- a/src/test/run-pass/privacy1.rs +++ b/src/test/run-pass/privacy1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub mod test2 { // This used to generate an ICE (make sure that default functions are // parented to their trait to find the first private thing as the trait). diff --git a/src/test/run-pass/private-class-field.rs b/src/test/run-pass/private-class-field.rs index b4d04ba18f98e..27b8d5965e980 100644 --- a/src/test/run-pass/private-class-field.rs +++ b/src/test/run-pass/private-class-field.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { meows : uint, diff --git a/src/test/run-pass/private-method.rs b/src/test/run-pass/private-method.rs index 498bd04e37cc2..a15c7b58ce119 100644 --- a/src/test/run-pass/private-method.rs +++ b/src/test/run-pass/private-method.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct cat { meows : uint, diff --git a/src/test/run-pass/process-remove-from-env.rs b/src/test/run-pass/process-remove-from-env.rs index 68597fe48e552..6429352f44918 100644 --- a/src/test/run-pass/process-remove-from-env.rs +++ b/src/test/run-pass/process-remove-from-env.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io)] use std::old_io::Command; diff --git a/src/test/run-pass/ptr-coercion.rs b/src/test/run-pass/ptr-coercion.rs index a6a8890101c5b..85897f171b6ce 100644 --- a/src/test/run-pass/ptr-coercion.rs +++ b/src/test/run-pass/ptr-coercion.rs @@ -10,6 +10,8 @@ // Test coercions between pointers which don't do anything fancy like unsizing. +// pretty-expanded FIXME #23616 + pub fn main() { // &mut -> & let x: &mut int = &mut 42; diff --git a/src/test/run-pass/pub-extern-privacy.rs b/src/test/run-pass/pub-extern-privacy.rs index 7428377b59fc4..b9a3f788f9794 100644 --- a/src/test/run-pass/pub-extern-privacy.rs +++ b/src/test/run-pass/pub-extern-privacy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::transmute; mod a { diff --git a/src/test/run-pass/pub-item-inside-macro.rs b/src/test/run-pass/pub-item-inside-macro.rs index 442eea13d6bac..d082ca624e098 100644 --- a/src/test/run-pass/pub-item-inside-macro.rs +++ b/src/test/run-pass/pub-item-inside-macro.rs @@ -10,6 +10,8 @@ // Issue #14660 +// pretty-expanded FIXME #23616 + mod bleh { macro_rules! foo { () => { diff --git a/src/test/run-pass/pub-method-inside-macro.rs b/src/test/run-pass/pub-method-inside-macro.rs index af2f217c1fbb2..2e2e261b6d021 100644 --- a/src/test/run-pass/pub-method-inside-macro.rs +++ b/src/test/run-pass/pub-method-inside-macro.rs @@ -10,6 +10,8 @@ // Issue #17436 +// pretty-expanded FIXME #23616 + mod bleh { macro_rules! foo { () => { diff --git a/src/test/run-pass/pub-use-xcrate.rs b/src/test/run-pass/pub-use-xcrate.rs index cdc184898fd68..3318c0380be74 100644 --- a/src/test/run-pass/pub-use-xcrate.rs +++ b/src/test/run-pass/pub-use-xcrate.rs @@ -11,6 +11,8 @@ // aux-build:pub_use_xcrate1.rs // aux-build:pub_use_xcrate2.rs +// pretty-expanded FIXME #23616 + extern crate pub_use_xcrate2; use pub_use_xcrate2::Foo; diff --git a/src/test/run-pass/pub_use_mods_xcrate_exe.rs b/src/test/run-pass/pub_use_mods_xcrate_exe.rs index ceba89523b5f9..9373b7945d55a 100644 --- a/src/test/run-pass/pub_use_mods_xcrate_exe.rs +++ b/src/test/run-pass/pub_use_mods_xcrate_exe.rs @@ -10,6 +10,8 @@ // aux-build:pub_use_mods_xcrate.rs +// pretty-expanded FIXME #23616 + #![allow(unused_imports)] extern crate pub_use_mods_xcrate; diff --git a/src/test/run-pass/pure-sum.rs b/src/test/run-pass/pure-sum.rs index f12cf82f939c7..2612a21bc01b5 100644 --- a/src/test/run-pass/pure-sum.rs +++ b/src/test/run-pass/pure-sum.rs @@ -10,6 +10,8 @@ // Check that functions can modify local state. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/range-type-infer.rs b/src/test/run-pass/range-type-infer.rs index 51945a4677d91..2d664c00ed527 100644 --- a/src/test/run-pass/range-type-infer.rs +++ b/src/test/run-pass/range-type-infer.rs @@ -12,6 +12,8 @@ // good as the old one. Check out issue #21672, #21595 and #21649 for // more details. +// pretty-expanded FIXME #23616 + fn main() { let xs = (0..8).map(|i| i == 1u64).collect::>(); assert_eq!(xs[1], true); diff --git a/src/test/run-pass/range.rs b/src/test/run-pass/range.rs index 50b90b1a5ee0b..f2aa17d4069a8 100644 --- a/src/test/run-pass/range.rs +++ b/src/test/run-pass/range.rs @@ -10,6 +10,8 @@ // Test range syntax. +// pretty-expanded FIXME #23616 + fn foo() -> int { 42 } // Test that range syntax works in return statements diff --git a/src/test/run-pass/ranges-precedence.rs b/src/test/run-pass/ranges-precedence.rs index 18afcdd7f3f79..bad3621cbf06a 100644 --- a/src/test/run-pass/ranges-precedence.rs +++ b/src/test/run-pass/ranges-precedence.rs @@ -11,6 +11,8 @@ // Test that the precedence of ranges is correct +// pretty-expanded FIXME #23616 + struct Foo { foo: uint, } diff --git a/src/test/run-pass/readalias.rs b/src/test/run-pass/readalias.rs index 51e955c476109..ff00dc0ab5336 100644 --- a/src/test/run-pass/readalias.rs +++ b/src/test/run-pass/readalias.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + struct Point {x: int, y: int, z: int} fn f(p: Point) { assert!((p.z == 12)); } diff --git a/src/test/run-pass/rec-extend.rs b/src/test/run-pass/rec-extend.rs index de2e937ee84c0..f511db8db5a71 100644 --- a/src/test/run-pass/rec-extend.rs +++ b/src/test/run-pass/rec-extend.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + struct Point {x: int, y: int} pub fn main() { diff --git a/src/test/run-pass/rec-tup.rs b/src/test/run-pass/rec-tup.rs index dab7d26cc8200..eb3fe430c4b10 100644 --- a/src/test/run-pass/rec-tup.rs +++ b/src/test/run-pass/rec-tup.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] struct Point {x: int, y: int} diff --git a/src/test/run-pass/rec.rs b/src/test/run-pass/rec.rs index f59538c51a078..9be1884267d09 100644 --- a/src/test/run-pass/rec.rs +++ b/src/test/run-pass/rec.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #[derive(Copy)] struct Rect {x: int, y: int, w: int, h: int} diff --git a/src/test/run-pass/record-pat.rs b/src/test/run-pass/record-pat.rs index b152470fbb640..79cc4e47f5eb6 100644 --- a/src/test/run-pass/record-pat.rs +++ b/src/test/run-pass/record-pat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum t1 { a(int), b(uint), } struct T2 {x: t1, y: int} enum t3 { c(T2, uint), } diff --git a/src/test/run-pass/reexport-should-still-link.rs b/src/test/run-pass/reexport-should-still-link.rs index ba74386f975fb..2c92965ee7a67 100644 --- a/src/test/run-pass/reexport-should-still-link.rs +++ b/src/test/run-pass/reexport-should-still-link.rs @@ -10,6 +10,8 @@ // aux-build:reexport-should-still-link.rs +// pretty-expanded FIXME #23616 + extern crate "reexport-should-still-link" as foo; pub fn main() { diff --git a/src/test/run-pass/reexport-star.rs b/src/test/run-pass/reexport-star.rs index 22ca737d42198..a8d052f407fcc 100644 --- a/src/test/run-pass/reexport-star.rs +++ b/src/test/run-pass/reexport-star.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + mod a { pub fn f() {} pub fn g() {} diff --git a/src/test/run-pass/reexported-static-methods-cross-crate.rs b/src/test/run-pass/reexported-static-methods-cross-crate.rs index 5399f3cfd3597..374d0d8d9b961 100644 --- a/src/test/run-pass/reexported-static-methods-cross-crate.rs +++ b/src/test/run-pass/reexported-static-methods-cross-crate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:reexported_static_methods.rs +// pretty-expanded FIXME #23616 + extern crate reexported_static_methods; use reexported_static_methods::Foo; diff --git a/src/test/run-pass/regions-addr-of-interior-of-unique-box.rs b/src/test/run-pass/regions-addr-of-interior-of-unique-box.rs index bb2885a217785..c211d8d704d09 100644 --- a/src/test/run-pass/regions-addr-of-interior-of-unique-box.rs +++ b/src/test/run-pass/regions-addr-of-interior-of-unique-box.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct Point { x: int, y: int diff --git a/src/test/run-pass/regions-assoc-type-region-bound.rs b/src/test/run-pass/regions-assoc-type-region-bound.rs index 77e1a21476454..b51d62f490f3c 100644 --- a/src/test/run-pass/regions-assoc-type-region-bound.rs +++ b/src/test/run-pass/regions-assoc-type-region-bound.rs @@ -11,6 +11,8 @@ // Test that the compiler considers the 'a bound declared in the // trait. Issue #20890. +// pretty-expanded FIXME #23616 + trait Foo<'a> { type Value: 'a; diff --git a/src/test/run-pass/regions-assoc-type-static-bound.rs b/src/test/run-pass/regions-assoc-type-static-bound.rs index 80ae371e5091e..344f707aefc01 100644 --- a/src/test/run-pass/regions-assoc-type-static-bound.rs +++ b/src/test/run-pass/regions-assoc-type-static-bound.rs @@ -11,6 +11,8 @@ // Test that the compiler considers the 'static bound declared in the // trait. Issue #20890. +// pretty-expanded FIXME #23616 + trait Foo { type Value: 'static; fn dummy(&self) { } diff --git a/src/test/run-pass/regions-borrow-evec-fixed.rs b/src/test/run-pass/regions-borrow-evec-fixed.rs index 0264e64f70d2a..1258dfe330664 100644 --- a/src/test/run-pass/regions-borrow-evec-fixed.rs +++ b/src/test/run-pass/regions-borrow-evec-fixed.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(x: &[int]) -> int { x[0] } diff --git a/src/test/run-pass/regions-borrow-evec-uniq.rs b/src/test/run-pass/regions-borrow-evec-uniq.rs index 16eeb99982e91..dd42eb2717a00 100644 --- a/src/test/run-pass/regions-borrow-evec-uniq.rs +++ b/src/test/run-pass/regions-borrow-evec-uniq.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo(x: &[int]) -> int { x[0] } diff --git a/src/test/run-pass/regions-borrow-uniq.rs b/src/test/run-pass/regions-borrow-uniq.rs index 0673179eef006..c0c985fa0d1db 100644 --- a/src/test/run-pass/regions-borrow-uniq.rs +++ b/src/test/run-pass/regions-borrow-uniq.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-bot.rs b/src/test/run-pass/regions-bot.rs index 75c52f63041a5..43cf6bd42ff8c 100644 --- a/src/test/run-pass/regions-bot.rs +++ b/src/test/run-pass/regions-bot.rs @@ -10,6 +10,8 @@ // A very limited test of the "bottom" region +// pretty-expanded FIXME #23616 + fn produce_static() -> &'static T { panic!(); } fn foo(_x: &T) -> &uint { produce_static() } diff --git a/src/test/run-pass/regions-close-over-type-parameter-successfully.rs b/src/test/run-pass/regions-close-over-type-parameter-successfully.rs index 3922cb1219c03..d0157788cc9a4 100644 --- a/src/test/run-pass/regions-close-over-type-parameter-successfully.rs +++ b/src/test/run-pass/regions-close-over-type-parameter-successfully.rs @@ -11,6 +11,8 @@ // A test where we (successfully) close over a reference into // an object. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-copy-closure.rs b/src/test/run-pass/regions-copy-closure.rs index ac7c76ac544db..9e3fe79197d5d 100644 --- a/src/test/run-pass/regions-copy-closure.rs +++ b/src/test/run-pass/regions-copy-closure.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(unboxed_closures, core)] diff --git a/src/test/run-pass/regions-creating-enums2.rs b/src/test/run-pass/regions-creating-enums2.rs index f23626643e7c7..8bd3bd4c0ddf5 100644 --- a/src/test/run-pass/regions-creating-enums2.rs +++ b/src/test/run-pass/regions-creating-enums2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum ast<'a> { num(uint), add(&'a ast<'a>, &'a ast<'a>) diff --git a/src/test/run-pass/regions-creating-enums5.rs b/src/test/run-pass/regions-creating-enums5.rs index c7d26e2d92b59..032ed068d5a29 100644 --- a/src/test/run-pass/regions-creating-enums5.rs +++ b/src/test/run-pass/regions-creating-enums5.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum ast<'a> { num(uint), add(&'a ast<'a>, &'a ast<'a>) diff --git a/src/test/run-pass/regions-debruijn-of-object.rs b/src/test/run-pass/regions-debruijn-of-object.rs index b9d3ed49c625f..9f2d27f024bb0 100644 --- a/src/test/run-pass/regions-debruijn-of-object.rs +++ b/src/test/run-pass/regions-debruijn-of-object.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct ctxt<'tcx> { x: &'tcx i32 } diff --git a/src/test/run-pass/regions-dependent-addr-of.rs b/src/test/run-pass/regions-dependent-addr-of.rs index b51be0f0f79f7..0439cb81c47ed 100644 --- a/src/test/run-pass/regions-dependent-addr-of.rs +++ b/src/test/run-pass/regions-dependent-addr-of.rs @@ -11,6 +11,8 @@ // Test lifetimes are linked properly when we create dependent region pointers. // Issue #3148. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-dependent-autofn.rs b/src/test/run-pass/regions-dependent-autofn.rs index e7dc5e99c2bb9..ef05fc595df14 100644 --- a/src/test/run-pass/regions-dependent-autofn.rs +++ b/src/test/run-pass/regions-dependent-autofn.rs @@ -11,6 +11,8 @@ // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. +// pretty-expanded FIXME #23616 + fn subslice(v: F) -> F where F: FnOnce() { v } fn both(v: F) -> F where F: FnOnce() { diff --git a/src/test/run-pass/regions-dependent-autoslice.rs b/src/test/run-pass/regions-dependent-autoslice.rs index bcf74729fdbfb..4652fed8a9dc7 100644 --- a/src/test/run-pass/regions-dependent-autoslice.rs +++ b/src/test/run-pass/regions-dependent-autoslice.rs @@ -12,6 +12,8 @@ // Issue #3148. +// pretty-expanded FIXME #23616 + fn subslice1<'r>(v: &'r [uint]) -> &'r [uint] { v } fn both<'r>(v: &'r [uint]) -> &'r [uint] { diff --git a/src/test/run-pass/regions-dependent-let-ref.rs b/src/test/run-pass/regions-dependent-let-ref.rs index 980fcfb2e9eb9..4d3fed5031fe4 100644 --- a/src/test/run-pass/regions-dependent-let-ref.rs +++ b/src/test/run-pass/regions-dependent-let-ref.rs @@ -11,6 +11,8 @@ // Test lifetimes are linked properly when we take reference // to interior. +// pretty-expanded FIXME #23616 + struct Foo(int); pub fn main() { // Here the lifetime of the `&` should be at least the diff --git a/src/test/run-pass/regions-early-bound-lifetime-in-assoc-fn.rs b/src/test/run-pass/regions-early-bound-lifetime-in-assoc-fn.rs index bdc0d41c94e82..2dc4071830779 100644 --- a/src/test/run-pass/regions-early-bound-lifetime-in-assoc-fn.rs +++ b/src/test/run-pass/regions-early-bound-lifetime-in-assoc-fn.rs @@ -14,6 +14,8 @@ // lifetime parameters must be early bound in the type of the // associated item. +// pretty-expanded FIXME #23616 + use std::marker; pub enum Value<'v> { diff --git a/src/test/run-pass/regions-early-bound-trait-param.rs b/src/test/run-pass/regions-early-bound-trait-param.rs index 3f434a4838d42..63fb18a8ba2c2 100644 --- a/src/test/run-pass/regions-early-bound-trait-param.rs +++ b/src/test/run-pass/regions-early-bound-trait-param.rs @@ -11,6 +11,8 @@ // Tests that you can use an early-bound lifetime parameter as // on of the generic parameters in a trait. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-early-bound-used-in-bound-method.rs b/src/test/run-pass/regions-early-bound-used-in-bound-method.rs index 410415e57a067..360457cf3f1d6 100644 --- a/src/test/run-pass/regions-early-bound-used-in-bound-method.rs +++ b/src/test/run-pass/regions-early-bound-used-in-bound-method.rs @@ -11,6 +11,8 @@ // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. +// pretty-expanded FIXME #23616 + trait GetRef<'a> { fn get(&self) -> &'a int; } diff --git a/src/test/run-pass/regions-early-bound-used-in-bound.rs b/src/test/run-pass/regions-early-bound-used-in-bound.rs index a3602c5fbec14..924f9b8f70b90 100644 --- a/src/test/run-pass/regions-early-bound-used-in-bound.rs +++ b/src/test/run-pass/regions-early-bound-used-in-bound.rs @@ -11,6 +11,8 @@ // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. +// pretty-expanded FIXME #23616 + trait GetRef<'a, T> { fn get(&self) -> &'a T; } diff --git a/src/test/run-pass/regions-early-bound-used-in-type-param.rs b/src/test/run-pass/regions-early-bound-used-in-type-param.rs index caef4e3fa9cbe..c31d4d45fb92f 100644 --- a/src/test/run-pass/regions-early-bound-used-in-type-param.rs +++ b/src/test/run-pass/regions-early-bound-used-in-type-param.rs @@ -11,6 +11,8 @@ // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. +// pretty-expanded FIXME #23616 + trait Get { fn get(&self) -> T; } diff --git a/src/test/run-pass/regions-escape-into-other-fn.rs b/src/test/run-pass/regions-escape-into-other-fn.rs index 3708d187d7161..cd32c426527e2 100644 --- a/src/test/run-pass/regions-escape-into-other-fn.rs +++ b/src/test/run-pass/regions-escape-into-other-fn.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-expl-self.rs b/src/test/run-pass/regions-expl-self.rs index 58c13885e036c..ee4bbcebb7800 100644 --- a/src/test/run-pass/regions-expl-self.rs +++ b/src/test/run-pass/regions-expl-self.rs @@ -10,6 +10,8 @@ // Test that you can insert an explicit lifetime in explicit self. +// pretty-expanded FIXME #23616 + struct Foo { f: uint } diff --git a/src/test/run-pass/regions-fn-subtyping-2.rs b/src/test/run-pass/regions-fn-subtyping-2.rs index 70c90ee05b357..b8b5f6fb05f2c 100644 --- a/src/test/run-pass/regions-fn-subtyping-2.rs +++ b/src/test/run-pass/regions-fn-subtyping-2.rs @@ -13,6 +13,8 @@ // Here, `f` is a function that takes a pointer `x` and a function // `g`, where `g` requires its argument `y` to be in the same region // that `x` is in. +// pretty-expanded FIXME #23616 + fn has_same_region(f: Box FnMut(&'a int, Box)>) { // `f` should be the type that `wants_same_region` wants, but // right now the compiler complains that it isn't. diff --git a/src/test/run-pass/regions-fn-subtyping.rs b/src/test/run-pass/regions-fn-subtyping.rs index 0057a51012dd0..d9079dfe3f599 100644 --- a/src/test/run-pass/regions-fn-subtyping.rs +++ b/src/test/run-pass/regions-fn-subtyping.rs @@ -10,6 +10,8 @@ // Issue #2263. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unused_variable)] #![allow(unknown_features)] diff --git a/src/test/run-pass/regions-infer-borrow-scope-addr-of.rs b/src/test/run-pass/regions-infer-borrow-scope-addr-of.rs index 9f1a383fd64b8..5d171811732a1 100644 --- a/src/test/run-pass/regions-infer-borrow-scope-addr-of.rs +++ b/src/test/run-pass/regions-infer-borrow-scope-addr-of.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::swap; pub fn main() { diff --git a/src/test/run-pass/regions-infer-borrow-scope-view.rs b/src/test/run-pass/regions-infer-borrow-scope-view.rs index 1fdf3a92a3fdb..9c200a370ad85 100644 --- a/src/test/run-pass/regions-infer-borrow-scope-view.rs +++ b/src/test/run-pass/regions-infer-borrow-scope-view.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn view(x: &[T]) -> &[T] {x} pub fn main() { diff --git a/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs b/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs index 86f4f2dd18e64..59221afcefffe 100644 --- a/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs +++ b/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-infer-borrow-scope.rs b/src/test/run-pass/regions-infer-borrow-scope.rs index ebbc5b70f6041..acbe091a6a456 100644 --- a/src/test/run-pass/regions-infer-borrow-scope.rs +++ b/src/test/run-pass/regions-infer-borrow-scope.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-infer-call-2.rs b/src/test/run-pass/regions-infer-call-2.rs index cfb6c8585634d..cc1bf05db5f59 100644 --- a/src/test/run-pass/regions-infer-call-2.rs +++ b/src/test/run-pass/regions-infer-call-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn takes_two(x: &int, y: &int) -> int { *x + *y } fn with(f: F) -> T where F: FnOnce(&int) -> T { diff --git a/src/test/run-pass/regions-infer-call.rs b/src/test/run-pass/regions-infer-call.rs index fdb7485efc35b..c1044b59af26f 100644 --- a/src/test/run-pass/regions-infer-call.rs +++ b/src/test/run-pass/regions-infer-call.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn takes_two(x: &int, y: &int) -> int { *x + *y } fn has_two<'a,'b>(x: &'a int, y: &'b int) -> int { diff --git a/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs b/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs index 7e328f3bb0354..11c3ab111cf5a 100644 --- a/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs +++ b/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct boxed_int<'a> { f: &'a int, } diff --git a/src/test/run-pass/regions-infer-reborrow-ref-mut-recurse.rs b/src/test/run-pass/regions-infer-reborrow-ref-mut-recurse.rs index efe3994dbb7b9..6b143908f0528 100644 --- a/src/test/run-pass/regions-infer-reborrow-ref-mut-recurse.rs +++ b/src/test/run-pass/regions-infer-reborrow-ref-mut-recurse.rs @@ -11,6 +11,8 @@ // Test an edge case in region inference: the lifetime of the borrow // of `*x` must be extended to at least 'a. +// pretty-expanded FIXME #23616 + fn foo<'a,'b>(x: &'a &'b mut int) -> &'a int { let y = &*x; // should be inferred to have type &'a &'b mut int... diff --git a/src/test/run-pass/regions-infer-region-in-fn-but-not-type.rs b/src/test/run-pass/regions-infer-region-in-fn-but-not-type.rs index 9174b53be86e6..586c9ab3a72ef 100644 --- a/src/test/run-pass/regions-infer-region-in-fn-but-not-type.rs +++ b/src/test/run-pass/regions-infer-region-in-fn-but-not-type.rs @@ -11,6 +11,8 @@ // check that the &int here does not cause us to think that `foo` // contains region pointers +// pretty-expanded FIXME #23616 + struct foo(Box); fn take_foo(x: T) {} diff --git a/src/test/run-pass/regions-infer-static-from-proc.rs b/src/test/run-pass/regions-infer-static-from-proc.rs index cb45b8e131d28..391501014b3ae 100644 --- a/src/test/run-pass/regions-infer-static-from-proc.rs +++ b/src/test/run-pass/regions-infer-static-from-proc.rs @@ -12,6 +12,8 @@ // region variables contained within (otherwise, region inference will // give `x` a very short lifetime). +// pretty-expanded FIXME #23616 + static i: uint = 3; fn foo(_: F) {} fn read(_: uint) { } diff --git a/src/test/run-pass/regions-issue-21422.rs b/src/test/run-pass/regions-issue-21422.rs index c59bf15afc3b0..ecc170a1462aa 100644 --- a/src/test/run-pass/regions-issue-21422.rs +++ b/src/test/run-pass/regions-issue-21422.rs @@ -12,6 +12,8 @@ // add inference constraints that the operands of a binary operator // should outlive the binary operation itself. +// pretty-expanded FIXME #23616 + pub struct P<'a> { _ptr: *const &'a u8, } diff --git a/src/test/run-pass/regions-issue-22246.rs b/src/test/run-pass/regions-issue-22246.rs index f5c34d6b34e9d..16236f9465594 100644 --- a/src/test/run-pass/regions-issue-22246.rs +++ b/src/test/run-pass/regions-issue-22246.rs @@ -11,6 +11,8 @@ // Regression test for issue #22246 -- we should be able to deduce // that `&'a B::Owned` implies that `B::Owned : 'a`. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] use std::ops::Deref; diff --git a/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs b/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs index a2b6d569ac9a7..99a4f5647bb44 100644 --- a/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs +++ b/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs @@ -22,6 +22,8 @@ // doing region-folding, when really all clients of the region-folding // case only want to see FREE lifetime variables, not bound ones. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-lifetime-static-items-enclosing-scopes.rs b/src/test/run-pass/regions-lifetime-static-items-enclosing-scopes.rs index b16b934d73cc6..077d4f5a25e3b 100644 --- a/src/test/run-pass/regions-lifetime-static-items-enclosing-scopes.rs +++ b/src/test/run-pass/regions-lifetime-static-items-enclosing-scopes.rs @@ -11,6 +11,8 @@ // This test verifies that temporary lifetime is correctly computed // for static objects in enclosing scopes. +// pretty-expanded FIXME #23616 + use std::cmp::PartialEq; fn f(o: &mut Option) { diff --git a/src/test/run-pass/regions-link-fn-args.rs b/src/test/run-pass/regions-link-fn-args.rs index 8822d3880397a..0b5ab35f7fe86 100644 --- a/src/test/run-pass/regions-link-fn-args.rs +++ b/src/test/run-pass/regions-link-fn-args.rs @@ -11,6 +11,8 @@ // Test that region inference correctly links up the regions when a // `ref` borrow occurs inside a fn argument. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] fn with<'a, F>(_: F) where F: FnOnce(&'a Vec) -> &'a Vec { } diff --git a/src/test/run-pass/regions-mock-trans.rs b/src/test/run-pass/regions-mock-trans.rs index b2584e2472bf5..b6ba7d979ac67 100644 --- a/src/test/run-pass/regions-mock-trans.rs +++ b/src/test/run-pass/regions-mock-trans.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs b/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs index 5964ac65d5f6e..6cc32301cc46e 100644 --- a/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs +++ b/src/test/run-pass/regions-no-bound-in-argument-cleanup.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] use std::marker; diff --git a/src/test/run-pass/regions-no-variance-from-fn-generics.rs b/src/test/run-pass/regions-no-variance-from-fn-generics.rs index 80c478afa644f..89bdbfaed9e0a 100644 --- a/src/test/run-pass/regions-no-variance-from-fn-generics.rs +++ b/src/test/run-pass/regions-no-variance-from-fn-generics.rs @@ -12,6 +12,8 @@ // should not upset the variance inference for actual occurrences of // that lifetime in type expressions. +// pretty-expanded FIXME #23616 + pub trait HasLife<'a> { fn dummy(&'a self) { } // just to induce a variance on 'a } diff --git a/src/test/run-pass/regions-nullary-variant.rs b/src/test/run-pass/regions-nullary-variant.rs index e1359725f9b9f..c2a8f7e66c654 100644 --- a/src/test/run-pass/regions-nullary-variant.rs +++ b/src/test/run-pass/regions-nullary-variant.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum roption<'a> { a, b(&'a uint) } diff --git a/src/test/run-pass/regions-params.rs b/src/test/run-pass/regions-params.rs index 181d962cfae50..c7ee3213f3741 100644 --- a/src/test/run-pass/regions-params.rs +++ b/src/test/run-pass/regions-params.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn region_identity(x: &uint) -> &uint { x } fn apply(t: T, f: F) -> T where F: FnOnce(T) -> T { f(t) } diff --git a/src/test/run-pass/regions-reassign-let-bound-pointer.rs b/src/test/run-pass/regions-reassign-let-bound-pointer.rs index ecf79de622222..89a9d3f1290a9 100644 --- a/src/test/run-pass/regions-reassign-let-bound-pointer.rs +++ b/src/test/run-pass/regions-reassign-let-bound-pointer.rs @@ -12,6 +12,8 @@ // started out with a longer lifetime and was reassigned to a shorter // one (it should infer to be the intersection). +// pretty-expanded FIXME #23616 + fn foo(x: &int) { let a = 1; let mut z = x; diff --git a/src/test/run-pass/regions-reassign-match-bound-pointer.rs b/src/test/run-pass/regions-reassign-match-bound-pointer.rs index 18312b17339ce..02c59dde1d6b3 100644 --- a/src/test/run-pass/regions-reassign-match-bound-pointer.rs +++ b/src/test/run-pass/regions-reassign-match-bound-pointer.rs @@ -12,6 +12,8 @@ // started out with a longer lifetime and was reassigned to a shorter // one (it should infer to be the intersection). +// pretty-expanded FIXME #23616 + fn foo(x: &int) { let a = 1; match x { diff --git a/src/test/run-pass/regions-refcell.rs b/src/test/run-pass/regions-refcell.rs index 30d8fc34d0074..febf5f92ef6ea 100644 --- a/src/test/run-pass/regions-refcell.rs +++ b/src/test/run-pass/regions-refcell.rs @@ -12,6 +12,8 @@ // attempting to bootstrap librustc with new destructor lifetime // semantics. +// pretty-expanded FIXME #23616 + use std::collections::HashMap; use std::cell::RefCell; diff --git a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs index 1ad96d4bc5593..310902d4d0a85 100644 --- a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs +++ b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs @@ -17,6 +17,8 @@ // changes were caught. However, those uses in the compiler could // easily get changed or refactored away in the future. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/regions-return-interior-of-option.rs b/src/test/run-pass/regions-return-interior-of-option.rs index ee1d66873077b..e6ab4a81426c2 100644 --- a/src/test/run-pass/regions-return-interior-of-option.rs +++ b/src/test/run-pass/regions-return-interior-of-option.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn get(opt: &Option) -> &T { match *opt { Some(ref v) => v, diff --git a/src/test/run-pass/regions-scope-chain-example.rs b/src/test/run-pass/regions-scope-chain-example.rs index e5ef88006c7df..185d5db1f5112 100644 --- a/src/test/run-pass/regions-scope-chain-example.rs +++ b/src/test/run-pass/regions-scope-chain-example.rs @@ -16,6 +16,8 @@ // wrong path. The new algorithm avoids this problem and hence this // example typechecks correctly. +// pretty-expanded FIXME #23616 + enum ScopeChain<'a> { Link(Scope<'a>), End diff --git a/src/test/run-pass/regions-trait-object-1.rs b/src/test/run-pass/regions-trait-object-1.rs index 807227d47db8f..d235298857939 100644 --- a/src/test/run-pass/regions-trait-object-1.rs +++ b/src/test/run-pass/regions-trait-object-1.rs @@ -12,6 +12,8 @@ // attempting to bootstrap libsyntax; it is adapted from // `syntax::ext::tt::generic_extension`. +// pretty-expanded FIXME #23616 + pub struct E<'a> { pub f: &'a u8, } diff --git a/src/test/run-pass/regions-variance-contravariant-use-contravariant.rs b/src/test/run-pass/regions-variance-contravariant-use-contravariant.rs index ffc2f07a1530e..1b174580b0e14 100644 --- a/src/test/run-pass/regions-variance-contravariant-use-contravariant.rs +++ b/src/test/run-pass/regions-variance-contravariant-use-contravariant.rs @@ -14,6 +14,8 @@ // Note: see compile-fail/variance-regions-*.rs for the tests that check that the // variance inference works in the first place. +// pretty-expanded FIXME #23616 + struct Contravariant<'a> { f: &'a int } diff --git a/src/test/run-pass/regions-variance-covariant-use-covariant.rs b/src/test/run-pass/regions-variance-covariant-use-covariant.rs index 7e0ca41501833..4021048232724 100644 --- a/src/test/run-pass/regions-variance-covariant-use-covariant.rs +++ b/src/test/run-pass/regions-variance-covariant-use-covariant.rs @@ -17,6 +17,8 @@ // This is covariant with respect to 'a, meaning that // Covariant<'foo> <: Covariant<'static> because // 'foo <= 'static +// pretty-expanded FIXME #23616 + struct Covariant<'a> { f: extern "Rust" fn(&'a int) } diff --git a/src/test/run-pass/rename-directory.rs b/src/test/run-pass/rename-directory.rs index 33a53e444255e..f149a70817a8a 100644 --- a/src/test/run-pass/rename-directory.rs +++ b/src/test/run-pass/rename-directory.rs @@ -11,6 +11,8 @@ // This test can't be a unit test in std, // because it needs TempDir, which is in extra +// pretty-expanded FIXME #23616 + #![feature(tempdir, path_ext)] use std::ffi::CString; diff --git a/src/test/run-pass/repeat-expr-in-static.rs b/src/test/run-pass/repeat-expr-in-static.rs index a53f1da4ce605..12cf0c0de45b4 100644 --- a/src/test/run-pass/repeat-expr-in-static.rs +++ b/src/test/run-pass/repeat-expr-in-static.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + static FOO: [int; 4] = [32; 4]; static BAR: [int; 4] = [32, 32, 32, 32]; diff --git a/src/test/run-pass/resolve-issue-2428.rs b/src/test/run-pass/resolve-issue-2428.rs index 016357b5df985..39b89bb3e4e94 100644 --- a/src/test/run-pass/resolve-issue-2428.rs +++ b/src/test/run-pass/resolve-issue-2428.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + const foo: int = 4 >> 1; enum bs { thing = foo } pub fn main() { assert!((bs::thing as int == foo)); } diff --git a/src/test/run-pass/resource-in-struct.rs b/src/test/run-pass/resource-in-struct.rs index 33ae0af250a53..a8426f90cc489 100644 --- a/src/test/run-pass/resource-in-struct.rs +++ b/src/test/run-pass/resource-in-struct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] // Ensures that class dtors run if the object is inside an enum diff --git a/src/test/run-pass/ret-none.rs b/src/test/run-pass/ret-none.rs index 8d7faffae7f33..ea0de67572ded 100644 --- a/src/test/run-pass/ret-none.rs +++ b/src/test/run-pass/ret-none.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + enum option { none, some(T), } fn f() -> option { return option::none; } diff --git a/src/test/run-pass/return-from-closure.rs b/src/test/run-pass/return-from-closure.rs index 60856ee60425b..0a87e76ef4e07 100644 --- a/src/test/run-pass/return-from-closure.rs +++ b/src/test/run-pass/return-from-closure.rs @@ -10,6 +10,8 @@ // just to make sure that `return` is only returning from the closure, // not the surrounding function. +// pretty-expanded FIXME #23616 + static mut calls: uint = 0; fn surrounding() { diff --git a/src/test/run-pass/return-nil.rs b/src/test/run-pass/return-nil.rs index b5a81268a2dcf..fe4244084cb19 100644 --- a/src/test/run-pass/return-nil.rs +++ b/src/test/run-pass/return-nil.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + fn f() { let x: () = (); return x; } pub fn main() { let _x = f(); } diff --git a/src/test/run-pass/rust-log-filter.rs b/src/test/run-pass/rust-log-filter.rs index 44d8db075e8a7..0f7fb31fbae1b 100644 --- a/src/test/run-pass/rust-log-filter.rs +++ b/src/test/run-pass/rust-log-filter.rs @@ -10,6 +10,8 @@ // exec-env:RUST_LOG=rust-log-filter/foo +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, std_misc, rustc_private)] diff --git a/src/test/run-pass/segfault-no-out-of-stack.rs b/src/test/run-pass/segfault-no-out-of-stack.rs index d2842a9948548..1b3020b8dbe9b 100644 --- a/src/test/run-pass/segfault-no-out-of-stack.rs +++ b/src/test/run-pass/segfault-no-out-of-stack.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(old_io)] use std::old_io::process::Command; diff --git a/src/test/run-pass/self-impl.rs b/src/test/run-pass/self-impl.rs index af2b2de8ab8ba..75a68677e5203 100644 --- a/src/test/run-pass/self-impl.rs +++ b/src/test/run-pass/self-impl.rs @@ -10,6 +10,8 @@ // Test that we can use `Self` types in impls in the expected way. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/self-in-mut-slot-default-method.rs b/src/test/run-pass/self-in-mut-slot-default-method.rs index 92582177989b6..64d49215f22a7 100644 --- a/src/test/run-pass/self-in-mut-slot-default-method.rs +++ b/src/test/run-pass/self-in-mut-slot-default-method.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/self-in-mut-slot-immediate-value.rs b/src/test/run-pass/self-in-mut-slot-immediate-value.rs index a4b5ea1d68282..69cad7ab3dd44 100644 --- a/src/test/run-pass/self-in-mut-slot-immediate-value.rs +++ b/src/test/run-pass/self-in-mut-slot-immediate-value.rs @@ -11,6 +11,8 @@ // Assert that `mut self` on an immediate value doesn't // allow mutating the original - issue #10615. +// pretty-expanded FIXME #23616 + #[derive(Copy)] struct Value { n: int diff --git a/src/test/run-pass/self-re-assign.rs b/src/test/run-pass/self-re-assign.rs index b71b907fcf043..b3c81cab3c1ce 100644 --- a/src/test/run-pass/self-re-assign.rs +++ b/src/test/run-pass/self-re-assign.rs @@ -11,6 +11,8 @@ // Ensure assigning an owned or managed variable to itself works. In particular, // that we do not glue_drop before we glue_take (#3290). +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/self-shadowing-import.rs b/src/test/run-pass/self-shadowing-import.rs index 47380287ab65e..6621de0d8beef 100644 --- a/src/test/run-pass/self-shadowing-import.rs +++ b/src/test/run-pass/self-shadowing-import.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod a { pub mod b { pub mod a { diff --git a/src/test/run-pass/self-type-param.rs b/src/test/run-pass/self-type-param.rs index 5c4e2f5ebd52b..ea2bec8c86126 100644 --- a/src/test/run-pass/self-type-param.rs +++ b/src/test/run-pass/self-type-param.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait MyTrait { fn f(&self) -> Self; } diff --git a/src/test/run-pass/send-is-not-static-par-for.rs b/src/test/run-pass/send-is-not-static-par-for.rs index c6b64d97fbdd5..5815eaa01ea82 100644 --- a/src/test/run-pass/send-is-not-static-par-for.rs +++ b/src/test/run-pass/send-is-not-static-par-for.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core, std_misc)] use std::thread::Thread; use std::sync::Mutex; diff --git a/src/test/run-pass/send-resource.rs b/src/test/run-pass/send-resource.rs index a1e28b2b261f1..47c3766797a10 100644 --- a/src/test/run-pass/send-resource.rs +++ b/src/test/run-pass/send-resource.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::thread::Thread; diff --git a/src/test/run-pass/send-type-inference.rs b/src/test/run-pass/send-type-inference.rs index 60093803f0b77..84d491d052404 100644 --- a/src/test/run-pass/send-type-inference.rs +++ b/src/test/run-pass/send-type-inference.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::mpsc::{channel, Sender}; // tests that ctrl's type gets inferred properly diff --git a/src/test/run-pass/send_str_hashmap.rs b/src/test/run-pass/send_str_hashmap.rs index 54214feee05d1..7bef36d065643 100644 --- a/src/test/run-pass/send_str_hashmap.rs +++ b/src/test/run-pass/send_str_hashmap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/send_str_treemap.rs b/src/test/run-pass/send_str_treemap.rs index 9741d468bd264..04a4a239b0f0b 100644 --- a/src/test/run-pass/send_str_treemap.rs +++ b/src/test/run-pass/send_str_treemap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] extern crate collections; diff --git a/src/test/run-pass/sendable-class.rs b/src/test/run-pass/sendable-class.rs index 8691d5e875bfc..993ae2a43fb69 100644 --- a/src/test/run-pass/sendable-class.rs +++ b/src/test/run-pass/sendable-class.rs @@ -10,6 +10,8 @@ // Test that a class with only sendable fields can be sent +// pretty-expanded FIXME #23616 + use std::sync::mpsc::channel; struct foo { diff --git a/src/test/run-pass/sendfn-is-a-block.rs b/src/test/run-pass/sendfn-is-a-block.rs index 51c20bcd09852..5f23b72edb7f8 100644 --- a/src/test/run-pass/sendfn-is-a-block.rs +++ b/src/test/run-pass/sendfn-is-a-block.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + fn test(f: F) -> uint where F: FnOnce(uint) -> uint { return f(22); } diff --git a/src/test/run-pass/sepcomp-cci.rs b/src/test/run-pass/sepcomp-cci.rs index 0178b5e786d65..07393d83e67b6 100644 --- a/src/test/run-pass/sepcomp-cci.rs +++ b/src/test/run-pass/sepcomp-cci.rs @@ -13,6 +13,8 @@ // Test accessing cross-crate inlined items from multiple compilation units. +// pretty-expanded FIXME #23616 + extern crate sepcomp_cci_lib; use sepcomp_cci_lib::{cci_fn, CCI_STATIC}; diff --git a/src/test/run-pass/sepcomp-extern.rs b/src/test/run-pass/sepcomp-extern.rs index a5506e3fc761d..fc85fc223a467 100644 --- a/src/test/run-pass/sepcomp-extern.rs +++ b/src/test/run-pass/sepcomp-extern.rs @@ -13,6 +13,8 @@ // Test accessing external items from multiple compilation units. +// pretty-expanded FIXME #23616 + #[link(name = "sepcomp-extern-lib")] extern { #[allow(ctypes)] diff --git a/src/test/run-pass/sepcomp-fns-backwards.rs b/src/test/run-pass/sepcomp-fns-backwards.rs index 35a8c9330bff3..7998841322925 100644 --- a/src/test/run-pass/sepcomp-fns-backwards.rs +++ b/src/test/run-pass/sepcomp-fns-backwards.rs @@ -15,6 +15,8 @@ // Generate some code in the first compilation unit before declaring any // modules. This ensures that the first module doesn't go into the same // compilation unit as the top-level module. +// pretty-expanded FIXME #23616 + fn pad() -> uint { 0 } mod b { diff --git a/src/test/run-pass/sepcomp-fns.rs b/src/test/run-pass/sepcomp-fns.rs index 09f2a4281be08..f3673dfdbf2c5 100644 --- a/src/test/run-pass/sepcomp-fns.rs +++ b/src/test/run-pass/sepcomp-fns.rs @@ -17,6 +17,8 @@ // Generate some code in the first compilation unit before declaring any // modules. This ensures that the first module doesn't go into the same // compilation unit as the top-level module. +// pretty-expanded FIXME #23616 + fn one() -> uint { 1 } mod a { diff --git a/src/test/run-pass/sepcomp-lib.rs b/src/test/run-pass/sepcomp-lib.rs index 28adb55399b44..00e83a570579d 100644 --- a/src/test/run-pass/sepcomp-lib.rs +++ b/src/test/run-pass/sepcomp-lib.rs @@ -12,6 +12,8 @@ // Test linking against a library built with -C codegen-units > 1 +// pretty-expanded FIXME #23616 + extern crate sepcomp_lib; use sepcomp_lib::a::one; use sepcomp_lib::b::two; diff --git a/src/test/run-pass/sepcomp-statics.rs b/src/test/run-pass/sepcomp-statics.rs index 0e8d33f74f806..43d03e2bb6b03 100644 --- a/src/test/run-pass/sepcomp-statics.rs +++ b/src/test/run-pass/sepcomp-statics.rs @@ -12,6 +12,8 @@ // Test references to static items across compilation units. +// pretty-expanded FIXME #23616 + fn pad() -> uint { 0 } const ONE: uint = 1; diff --git a/src/test/run-pass/sepcomp-unwind.rs b/src/test/run-pass/sepcomp-unwind.rs index 21c5a6fc83a12..6b39510c8c25a 100644 --- a/src/test/run-pass/sepcomp-unwind.rs +++ b/src/test/run-pass/sepcomp-unwind.rs @@ -19,6 +19,8 @@ // In any case, this test should let us know if enabling parallel codegen ever // breaks unwinding. +// pretty-expanded FIXME #23616 + use std::thread; fn pad() -> uint { 0 } diff --git a/src/test/run-pass/seq-compare.rs b/src/test/run-pass/seq-compare.rs index ef14e0ba931b5..743f54abcfa66 100644 --- a/src/test/run-pass/seq-compare.rs +++ b/src/test/run-pass/seq-compare.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert!(("hello".to_string() < "hellr".to_string())); assert!(("hello ".to_string() > "hello".to_string())); diff --git a/src/test/run-pass/shift-various-types.rs b/src/test/run-pass/shift-various-types.rs index 26dc6c5316b16..b0ab72c650d74 100644 --- a/src/test/run-pass/shift-various-types.rs +++ b/src/test/run-pass/shift-various-types.rs @@ -10,6 +10,8 @@ // Test that we can do shifts by any integral type. +// pretty-expanded FIXME #23616 + struct Panolpy { i8: i8, i16: i16, diff --git a/src/test/run-pass/shift.rs b/src/test/run-pass/shift.rs index 918da53509927..138a681ce2acb 100644 --- a/src/test/run-pass/shift.rs +++ b/src/test/run-pass/shift.rs @@ -11,6 +11,8 @@ // Testing shifts for various combinations of integers // Issue #1570 +// pretty-expanded FIXME #23616 + pub fn main() { test_misc(); test_expr(); diff --git a/src/test/run-pass/signed-shift-const-eval.rs b/src/test/run-pass/signed-shift-const-eval.rs index 2acb93f48f926..eab4a0dfb7fcc 100644 --- a/src/test/run-pass/signed-shift-const-eval.rs +++ b/src/test/run-pass/signed-shift-const-eval.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum test { thing = -5 >> 1_usize } pub fn main() { assert_eq!(test::thing as int, -3); diff --git a/src/test/run-pass/sigpipe-should-be-ignored.rs b/src/test/run-pass/sigpipe-should-be-ignored.rs index 665b582581cfb..b81d0f2407bf0 100644 --- a/src/test/run-pass/sigpipe-should-be-ignored.rs +++ b/src/test/run-pass/sigpipe-should-be-ignored.rs @@ -11,6 +11,8 @@ // Be sure that when a SIGPIPE would have been received that the entire process // doesn't die in a ball of fire, but rather it's gracefully handled. +// pretty-expanded FIXME #23616 + use std::env; use std::io::prelude::*; use std::io; diff --git a/src/test/run-pass/simd-binop.rs b/src/test/run-pass/simd-binop.rs index 45a91abe56c45..0d26b75c2ad7f 100644 --- a/src/test/run-pass/simd-binop.rs +++ b/src/test/run-pass/simd-binop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::simd::{i32x4, f32x4, u32x4}; diff --git a/src/test/run-pass/simd-generics.rs b/src/test/run-pass/simd-generics.rs index 1371c4cc5f4ad..201da8dbc9489 100644 --- a/src/test/run-pass/simd-generics.rs +++ b/src/test/run-pass/simd-generics.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(simd)] use std::ops; diff --git a/src/test/run-pass/simd-issue-10604.rs b/src/test/run-pass/simd-issue-10604.rs index bd3f8f35352f2..8dca78b28e802 100644 --- a/src/test/run-pass/simd-issue-10604.rs +++ b/src/test/run-pass/simd-issue-10604.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] #![feature(simd)] diff --git a/src/test/run-pass/simd-size-align.rs b/src/test/run-pass/simd-size-align.rs index 582810f0def33..8324efc641727 100644 --- a/src/test/run-pass/simd-size-align.rs +++ b/src/test/run-pass/simd-size-align.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(simd)] #![allow(non_camel_case_types)] diff --git a/src/test/run-pass/simd-type.rs b/src/test/run-pass/simd-type.rs index a1a7457811280..540666f41ae2b 100644 --- a/src/test/run-pass/simd-type.rs +++ b/src/test/run-pass/simd-type.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(simd)] #[simd] diff --git a/src/test/run-pass/simple-generic-match.rs b/src/test/run-pass/simple-generic-match.rs index 27d4f105f3740..3273b73b4e286 100644 --- a/src/test/run-pass/simple-generic-match.rs +++ b/src/test/run-pass/simple-generic-match.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + enum clam { a(T), } pub fn main() { let c = clam::a(2); match c { clam::a::(_) => { } } } diff --git a/src/test/run-pass/simple-generic-tag.rs b/src/test/run-pass/simple-generic-tag.rs index 8a36f9e17f383..2e8d8f61bc8a7 100644 --- a/src/test/run-pass/simple-generic-tag.rs +++ b/src/test/run-pass/simple-generic-tag.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + enum clam { a(T), } pub fn main() { } diff --git a/src/test/run-pass/single-derive-attr-with-gate.rs b/src/test/run-pass/single-derive-attr-with-gate.rs index cc5d8fc78911d..addc56e9c4210 100644 --- a/src/test/run-pass/single-derive-attr-with-gate.rs +++ b/src/test/run-pass/single-derive-attr-with-gate.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(custom_derive)] #[derive_Clone] diff --git a/src/test/run-pass/sized-borrowed-pointer.rs b/src/test/run-pass/sized-borrowed-pointer.rs index 348b7562f8460..76c06d560d754 100644 --- a/src/test/run-pass/sized-borrowed-pointer.rs +++ b/src/test/run-pass/sized-borrowed-pointer.rs @@ -10,6 +10,8 @@ // Possibly-dynamic size of typaram should be cleared at pointer boundary. +// pretty-expanded FIXME #23616 + fn bar() { } fn foo() { bar::<&T>() } pub fn main() { } diff --git a/src/test/run-pass/sized-owned-pointer.rs b/src/test/run-pass/sized-owned-pointer.rs index e64917a97a637..d3a6b104dba55 100644 --- a/src/test/run-pass/sized-owned-pointer.rs +++ b/src/test/run-pass/sized-owned-pointer.rs @@ -11,6 +11,8 @@ // Possibly-dynamic size of typaram should be cleared at pointer boundary. +// pretty-expanded FIXME #23616 + fn bar() { } fn foo() { bar::>() } pub fn main() { } diff --git a/src/test/run-pass/slice-2.rs b/src/test/run-pass/slice-2.rs index 6e256be69dac7..1d0d28d5f95b9 100644 --- a/src/test/run-pass/slice-2.rs +++ b/src/test/run-pass/slice-2.rs @@ -10,6 +10,8 @@ // Test slicing expressions on slices and Vecs. +// pretty-expanded FIXME #23616 + fn main() { let x: &[int] = &[1, 2, 3, 4, 5]; let cmp: &[int] = &[1, 2, 3, 4, 5]; diff --git a/src/test/run-pass/slice-panic-1.rs b/src/test/run-pass/slice-panic-1.rs index 639ffd56002ec..bb8db83ccdc05 100644 --- a/src/test/run-pass/slice-panic-1.rs +++ b/src/test/run-pass/slice-panic-1.rs @@ -10,6 +10,8 @@ // Test that if a slicing expr[..] fails, the correct cleanups happen. +// pretty-expanded FIXME #23616 + use std::thread; struct Foo; diff --git a/src/test/run-pass/slice-panic-2.rs b/src/test/run-pass/slice-panic-2.rs index 4a2038175d2e6..94ea026d87d1f 100644 --- a/src/test/run-pass/slice-panic-2.rs +++ b/src/test/run-pass/slice-panic-2.rs @@ -10,6 +10,8 @@ // Test that if a slicing expr[..] fails, the correct cleanups happen. +// pretty-expanded FIXME #23616 + use std::thread; struct Foo; diff --git a/src/test/run-pass/slice.rs b/src/test/run-pass/slice.rs index aaa4cb27f8d19..b028f74c48b25 100644 --- a/src/test/run-pass/slice.rs +++ b/src/test/run-pass/slice.rs @@ -10,6 +10,8 @@ // Test slicing sugar. +// pretty-expanded FIXME #23616 + #![feature(core)] extern crate core; diff --git a/src/test/run-pass/small-enum-range-edge.rs b/src/test/run-pass/small-enum-range-edge.rs index 35283e466c1c0..df204065d163e 100644 --- a/src/test/run-pass/small-enum-range-edge.rs +++ b/src/test/run-pass/small-enum-range-edge.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /*! * Tests the range assertion wraparound case in trans::middle::adt::load_discr. */ diff --git a/src/test/run-pass/smallest-hello-world.rs b/src/test/run-pass/smallest-hello-world.rs index c7db8068785fe..d7926ec8b29c7 100644 --- a/src/test/run-pass/smallest-hello-world.rs +++ b/src/test/run-pass/smallest-hello-world.rs @@ -10,6 +10,8 @@ // Smallest "hello world" with a libc runtime +// pretty-expanded FIXME #23616 + #![feature(intrinsics, lang_items, start, no_std, libc)] #![no_std] diff --git a/src/test/run-pass/snake-case-no-lowercase-equivalent.rs b/src/test/run-pass/snake-case-no-lowercase-equivalent.rs index 2220761a02666..90ea7537c6e60 100644 --- a/src/test/run-pass/snake-case-no-lowercase-equivalent.rs +++ b/src/test/run-pass/snake-case-no-lowercase-equivalent.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(non_ascii_idents)] #![deny(non_snake_case)] diff --git a/src/test/run-pass/spawn-types.rs b/src/test/run-pass/spawn-types.rs index bf2f03b3e6de9..baf7bb6308f71 100644 --- a/src/test/run-pass/spawn-types.rs +++ b/src/test/run-pass/spawn-types.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + /* Make sure we can spawn tasks that take different types of parameters. This is based on a test case for #520 provided by Rob diff --git a/src/test/run-pass/stable-addr-of.rs b/src/test/run-pass/stable-addr-of.rs index 515198f7a71eb..152fb5dc96107 100644 --- a/src/test/run-pass/stable-addr-of.rs +++ b/src/test/run-pass/stable-addr-of.rs @@ -10,6 +10,8 @@ // Issue #2040 +// pretty-expanded FIXME #23616 + pub fn main() { let foo = 1; assert_eq!(&foo as *const int, &foo as *const int); diff --git a/src/test/run-pass/stat.rs b/src/test/run-pass/stat.rs index 159081a0e9778..c453f9252efe6 100644 --- a/src/test/run-pass/stat.rs +++ b/src/test/run-pass/stat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(tempdir, path_ext)] use std::fs::{File, TempDir}; diff --git a/src/test/run-pass/static-assert.rs b/src/test/run-pass/static-assert.rs index f650e56bb6b77..e5583a3c697b6 100644 --- a/src/test/run-pass/static-assert.rs +++ b/src/test/run-pass/static-assert.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(static_assert)] #[static_assert] diff --git a/src/test/run-pass/static-fn-inline-xc.rs b/src/test/run-pass/static-fn-inline-xc.rs index efc374e25bbff..b2fbff67ac7c2 100644 --- a/src/test/run-pass/static-fn-inline-xc.rs +++ b/src/test/run-pass/static-fn-inline-xc.rs @@ -10,6 +10,8 @@ // aux-build:static_fn_inline_xc_aux.rs +// pretty-expanded FIXME #23616 + extern crate "static_fn_inline_xc_aux" as mycore; use mycore::num; diff --git a/src/test/run-pass/static-fn-trait-xc.rs b/src/test/run-pass/static-fn-trait-xc.rs index cb9f7c3da0248..7c9049ffacfc2 100644 --- a/src/test/run-pass/static-fn-trait-xc.rs +++ b/src/test/run-pass/static-fn-trait-xc.rs @@ -10,6 +10,8 @@ // aux-build:static_fn_trait_xc_aux.rs +// pretty-expanded FIXME #23616 + extern crate "static_fn_trait_xc_aux" as mycore; use mycore::num; diff --git a/src/test/run-pass/static-function-pointer-xc.rs b/src/test/run-pass/static-function-pointer-xc.rs index 6e12c5fa73de1..f4d6e89d170a7 100644 --- a/src/test/run-pass/static-function-pointer-xc.rs +++ b/src/test/run-pass/static-function-pointer-xc.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:static-function-pointer-aux.rs +// pretty-expanded FIXME #23616 + extern crate "static-function-pointer-aux" as aux; fn f(x: int) -> int { x } diff --git a/src/test/run-pass/static-function-pointer.rs b/src/test/run-pass/static-function-pointer.rs index ff1091e07ef16..a2b1572db6360 100644 --- a/src/test/run-pass/static-function-pointer.rs +++ b/src/test/run-pass/static-function-pointer.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(x: int) -> int { x } fn g(x: int) -> int { 2 * x } diff --git a/src/test/run-pass/static-impl.rs b/src/test/run-pass/static-impl.rs index b66999c8e6722..6af348b0e3ed3 100644 --- a/src/test/run-pass/static-impl.rs +++ b/src/test/run-pass/static-impl.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + pub trait plus { fn plus(&self) -> int; } diff --git a/src/test/run-pass/static-method-in-trait-with-tps-intracrate.rs b/src/test/run-pass/static-method-in-trait-with-tps-intracrate.rs index d1fcc4659b937..1eb20370f687c 100644 --- a/src/test/run-pass/static-method-in-trait-with-tps-intracrate.rs +++ b/src/test/run-pass/static-method-in-trait-with-tps-intracrate.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Deserializer { fn read_int(&self) -> int; } diff --git a/src/test/run-pass/static-method-xcrate.rs b/src/test/run-pass/static-method-xcrate.rs index 076c56bcc4d2a..ed9160e1d5850 100644 --- a/src/test/run-pass/static-method-xcrate.rs +++ b/src/test/run-pass/static-method-xcrate.rs @@ -10,6 +10,8 @@ // aux-build:static-methods-crate.rs +// pretty-expanded FIXME #23616 + extern crate static_methods_crate; use static_methods_crate::read; diff --git a/src/test/run-pass/static-methods-in-traits.rs b/src/test/run-pass/static-methods-in-traits.rs index 47f46041c224a..33c1ce4d2c3d5 100644 --- a/src/test/run-pass/static-methods-in-traits.rs +++ b/src/test/run-pass/static-methods-in-traits.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod a { pub trait Foo { fn foo() -> Self; diff --git a/src/test/run-pass/static-methods-in-traits2.rs b/src/test/run-pass/static-methods-in-traits2.rs index d0448de2c4970..cd8406983fbb3 100644 --- a/src/test/run-pass/static-methods-in-traits2.rs +++ b/src/test/run-pass/static-methods-in-traits2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub trait Number: NumConv { fn from(n: T) -> Self; } diff --git a/src/test/run-pass/static-mut-foreign.rs b/src/test/run-pass/static-mut-foreign.rs index 6d191ba1c5861..c6b919c9738d4 100644 --- a/src/test/run-pass/static-mut-foreign.rs +++ b/src/test/run-pass/static-mut-foreign.rs @@ -12,6 +12,8 @@ // statics cannot. This ensures that there's some form of error if this is // attempted. +// pretty-expanded FIXME #23616 + #![feature(libc)] extern crate libc; diff --git a/src/test/run-pass/static-mut-xc.rs b/src/test/run-pass/static-mut-xc.rs index 5aa28ad80fae8..a32bf7a7af275 100644 --- a/src/test/run-pass/static-mut-xc.rs +++ b/src/test/run-pass/static-mut-xc.rs @@ -14,6 +14,8 @@ // aux-build:static_mut_xc.rs +// pretty-expanded FIXME #23616 + extern crate static_mut_xc; unsafe fn static_bound(_: &'static int) {} diff --git a/src/test/run-pass/std-sync-right-kind-impls.rs b/src/test/run-pass/std-sync-right-kind-impls.rs index 46b70f91e71e7..058777bb05e5e 100644 --- a/src/test/run-pass/std-sync-right-kind-impls.rs +++ b/src/test/run-pass/std-sync-right-kind-impls.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc, alloc)] use std::sync; diff --git a/src/test/run-pass/str-multiline.rs b/src/test/run-pass/str-multiline.rs index 918715f81e85a..0d0d56fcafb0b 100644 --- a/src/test/run-pass/str-multiline.rs +++ b/src/test/run-pass/str-multiline.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let a: String = "this \ is a test".to_string(); diff --git a/src/test/run-pass/string-escapes.rs b/src/test/run-pass/string-escapes.rs index 7abe8276a9782..e0fc1c4ce46a7 100644 --- a/src/test/run-pass/string-escapes.rs +++ b/src/test/run-pass/string-escapes.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let x = "\\\\\ "; diff --git a/src/test/run-pass/struct-aliases-xcrate.rs b/src/test/run-pass/struct-aliases-xcrate.rs index 7d99a2d1dcf54..17cb8acea6fad 100644 --- a/src/test/run-pass/struct-aliases-xcrate.rs +++ b/src/test/run-pass/struct-aliases-xcrate.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:xcrate_struct_aliases.rs +// pretty-expanded FIXME #23616 + extern crate xcrate_struct_aliases; use xcrate_struct_aliases::{S, S2}; diff --git a/src/test/run-pass/struct-aliases.rs b/src/test/run-pass/struct-aliases.rs index 2e24bb64bedb7..c27e6e4576cbc 100644 --- a/src/test/run-pass/struct-aliases.rs +++ b/src/test/run-pass/struct-aliases.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct S { x: int, y: int, diff --git a/src/test/run-pass/struct-destructuring-cross-crate.rs b/src/test/run-pass/struct-destructuring-cross-crate.rs index 2de2bcc958471..5fed712bd663a 100644 --- a/src/test/run-pass/struct-destructuring-cross-crate.rs +++ b/src/test/run-pass/struct-destructuring-cross-crate.rs @@ -10,6 +10,8 @@ // aux-build:struct_destructuring_cross_crate.rs +// pretty-expanded FIXME #23616 + extern crate struct_destructuring_cross_crate; pub fn main() { diff --git a/src/test/run-pass/struct-like-variant-construct.rs b/src/test/run-pass/struct-like-variant-construct.rs index 364c6da980393..8ff17bf08f8ce 100644 --- a/src/test/run-pass/struct-like-variant-construct.rs +++ b/src/test/run-pass/struct-like-variant-construct.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { Bar { a: int, diff --git a/src/test/run-pass/struct-like-variant-match.rs b/src/test/run-pass/struct-like-variant-match.rs index 3afa44a3142b4..36b9a6d9e8dd4 100644 --- a/src/test/run-pass/struct-like-variant-match.rs +++ b/src/test/run-pass/struct-like-variant-match.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { Bar { x: int, diff --git a/src/test/run-pass/struct-new-as-field-name.rs b/src/test/run-pass/struct-new-as-field-name.rs index 21eb0ae99b4af..22a57cbf0430c 100644 --- a/src/test/run-pass/struct-new-as-field-name.rs +++ b/src/test/run-pass/struct-new-as-field-name.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo { new: int, } diff --git a/src/test/run-pass/struct-order-of-eval-1.rs b/src/test/run-pass/struct-order-of-eval-1.rs index a64477242c08f..1c7101402ab93 100644 --- a/src/test/run-pass/struct-order-of-eval-1.rs +++ b/src/test/run-pass/struct-order-of-eval-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct S { f0: String, f1: int } pub fn main() { diff --git a/src/test/run-pass/struct-order-of-eval-2.rs b/src/test/run-pass/struct-order-of-eval-2.rs index 359ecdab630ec..45755608ff56a 100644 --- a/src/test/run-pass/struct-order-of-eval-2.rs +++ b/src/test/run-pass/struct-order-of-eval-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct S { f0: String, f1: String, diff --git a/src/test/run-pass/struct-order-of-eval-3.rs b/src/test/run-pass/struct-order-of-eval-3.rs index 856ed7c105e8a..37b6de8e17ef1 100644 --- a/src/test/run-pass/struct-order-of-eval-3.rs +++ b/src/test/run-pass/struct-order-of-eval-3.rs @@ -11,6 +11,8 @@ // Checks that functional-record-update order-of-eval is as expected // even when no Drop-implementations are involved. +// pretty-expanded FIXME #23616 + use std::sync::atomic::{Ordering, AtomicUsize, ATOMIC_USIZE_INIT}; struct W { wrapped: u32 } diff --git a/src/test/run-pass/struct-order-of-eval-4.rs b/src/test/run-pass/struct-order-of-eval-4.rs index 25923beffdde4..1b53895f7d1a7 100644 --- a/src/test/run-pass/struct-order-of-eval-4.rs +++ b/src/test/run-pass/struct-order-of-eval-4.rs @@ -11,6 +11,8 @@ // Checks that struct-literal expression order-of-eval is as expected // even when no Drop-implementations are involved. +// pretty-expanded FIXME #23616 + use std::sync::atomic::{Ordering, AtomicUsize, ATOMIC_USIZE_INIT}; struct W { wrapped: u32 } diff --git a/src/test/run-pass/struct-variant-field-visibility.rs b/src/test/run-pass/struct-variant-field-visibility.rs index aad3ba01a487e..383292fe097ed 100644 --- a/src/test/run-pass/struct-variant-field-visibility.rs +++ b/src/test/run-pass/struct-variant-field-visibility.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod foo { pub enum Foo { Bar { a: int } diff --git a/src/test/run-pass/struct_variant_xc.rs b/src/test/run-pass/struct_variant_xc.rs index 923a1427869f5..602650e4e06a3 100644 --- a/src/test/run-pass/struct_variant_xc.rs +++ b/src/test/run-pass/struct_variant_xc.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:struct_variant_xc_aux.rs +// pretty-expanded FIXME #23616 + extern crate struct_variant_xc_aux; use struct_variant_xc_aux::Enum::StructVariant; diff --git a/src/test/run-pass/struct_variant_xc_match.rs b/src/test/run-pass/struct_variant_xc_match.rs index 41dcb7ddbc86b..f43dd2332a17a 100644 --- a/src/test/run-pass/struct_variant_xc_match.rs +++ b/src/test/run-pass/struct_variant_xc_match.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:struct_variant_xc_aux.rs +// pretty-expanded FIXME #23616 + extern crate struct_variant_xc_aux; use struct_variant_xc_aux::Enum::{StructVariant, Variant}; diff --git a/src/test/run-pass/super.rs b/src/test/run-pass/super.rs index 95aeff425e8a9..51520c77751b0 100644 --- a/src/test/run-pass/super.rs +++ b/src/test/run-pass/super.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub mod a { pub fn f() {} pub mod b { diff --git a/src/test/run-pass/supertrait-default-generics.rs b/src/test/run-pass/supertrait-default-generics.rs index e158ae672aa5e..351c4259b5ef3 100644 --- a/src/test/run-pass/supertrait-default-generics.rs +++ b/src/test/run-pass/supertrait-default-generics.rs @@ -10,6 +10,8 @@ // There is some other borrowck bug, so we make the stuff not mut. +// pretty-expanded FIXME #23616 + use std::ops::Add; trait Positioned { diff --git a/src/test/run-pass/svh-add-comment.rs b/src/test/run-pass/svh-add-comment.rs index 235c4e74d0857..4d7b61e08f519 100644 --- a/src/test/run-pass/svh-add-comment.rs +++ b/src/test/run-pass/svh-add-comment.rs @@ -13,6 +13,8 @@ // aux-build:svh-b.rs // aux-build:svh-a-comment.rs +// pretty-expanded FIXME #23616 + extern crate a; extern crate b; diff --git a/src/test/run-pass/svh-add-doc.rs b/src/test/run-pass/svh-add-doc.rs index 365960b96e4e9..ea07ebe364661 100644 --- a/src/test/run-pass/svh-add-doc.rs +++ b/src/test/run-pass/svh-add-doc.rs @@ -13,6 +13,8 @@ // aux-build:svh-b.rs // aux-build:svh-a-doc.rs +// pretty-expanded FIXME #23616 + extern crate a; extern crate b; diff --git a/src/test/run-pass/svh-add-macro.rs b/src/test/run-pass/svh-add-macro.rs index a0dbc96cdb02a..4e0192c40c230 100644 --- a/src/test/run-pass/svh-add-macro.rs +++ b/src/test/run-pass/svh-add-macro.rs @@ -13,6 +13,8 @@ // aux-build:svh-b.rs // aux-build:svh-a-macro.rs +// pretty-expanded FIXME #23616 + extern crate a; extern crate b; diff --git a/src/test/run-pass/svh-add-nothing.rs b/src/test/run-pass/svh-add-nothing.rs index 98b7663c58ebb..9aa56ed2a769d 100644 --- a/src/test/run-pass/svh-add-nothing.rs +++ b/src/test/run-pass/svh-add-nothing.rs @@ -13,6 +13,8 @@ // aux-build:svh-b.rs // aux-build:svh-a-no-change.rs +// pretty-expanded FIXME #23616 + extern crate a; extern crate b; diff --git a/src/test/run-pass/svh-add-redundant-cfg.rs b/src/test/run-pass/svh-add-redundant-cfg.rs index 650f76d729a54..2da3004aaf1e5 100644 --- a/src/test/run-pass/svh-add-redundant-cfg.rs +++ b/src/test/run-pass/svh-add-redundant-cfg.rs @@ -13,6 +13,8 @@ // aux-build:svh-b.rs // aux-build:svh-a-redundant-cfg.rs +// pretty-expanded FIXME #23616 + extern crate a; extern crate b; diff --git a/src/test/run-pass/svh-add-whitespace.rs b/src/test/run-pass/svh-add-whitespace.rs index 6612c93e90bc5..bfc676bde263a 100644 --- a/src/test/run-pass/svh-add-whitespace.rs +++ b/src/test/run-pass/svh-add-whitespace.rs @@ -13,6 +13,8 @@ // aux-build:svh-b.rs // aux-build:svh-a-whitespace.rs +// pretty-expanded FIXME #23616 + extern crate a; extern crate b; diff --git a/src/test/run-pass/swap-1.rs b/src/test/run-pass/swap-1.rs index 82a76512e08f7..e60c672f00f9b 100644 --- a/src/test/run-pass/swap-1.rs +++ b/src/test/run-pass/swap-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::swap; pub fn main() { diff --git a/src/test/run-pass/swap-2.rs b/src/test/run-pass/swap-2.rs index 1dbd29a781eff..45bcba61b1528 100644 --- a/src/test/run-pass/swap-2.rs +++ b/src/test/run-pass/swap-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::swap; pub fn main() { diff --git a/src/test/run-pass/swap-overlapping.rs b/src/test/run-pass/swap-overlapping.rs index b25b350aa4b72..96cab66ab661f 100644 --- a/src/test/run-pass/swap-overlapping.rs +++ b/src/test/run-pass/swap-overlapping.rs @@ -10,6 +10,8 @@ // Issue #5041 - avoid overlapping memcpy when src and dest of a swap are the same +// pretty-expanded FIXME #23616 + use std::ptr; pub fn main() { diff --git a/src/test/run-pass/sync-send-iterators-in-libcollections.rs b/src/test/run-pass/sync-send-iterators-in-libcollections.rs index 6d29d5f2b3e91..7103fa7c33e3b 100644 --- a/src/test/run-pass/sync-send-iterators-in-libcollections.rs +++ b/src/test/run-pass/sync-send-iterators-in-libcollections.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_mut)] #![feature(collections)] diff --git a/src/test/run-pass/syntax-extension-cfg.rs b/src/test/run-pass/syntax-extension-cfg.rs index 8c888ff03624f..8766cba5dbb45 100644 --- a/src/test/run-pass/syntax-extension-cfg.rs +++ b/src/test/run-pass/syntax-extension-cfg.rs @@ -10,6 +10,8 @@ // compile-flags: --cfg foo --cfg qux="foo" +// pretty-expanded FIXME #23616 + pub fn main() { // check if ! cfg!(foo) { panic!() } diff --git a/src/test/run-pass/syntax-trait-polarity.rs b/src/test/run-pass/syntax-trait-polarity.rs index 544234046eb07..ba8a3f77aacef 100644 --- a/src/test/run-pass/syntax-trait-polarity.rs +++ b/src/test/run-pass/syntax-trait-polarity.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(optin_builtin_traits, core)] use std::marker::{MarkerTrait, Send}; diff --git a/src/test/run-pass/tag-align-dyn-u64.rs b/src/test/run-pass/tag-align-dyn-u64.rs index 8d8d4caad2404..b0d4b4c4404c8 100644 --- a/src/test/run-pass/tag-align-dyn-u64.rs +++ b/src/test/run-pass/tag-align-dyn-u64.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; enum Tag { diff --git a/src/test/run-pass/tag-align-dyn-variants.rs b/src/test/run-pass/tag-align-dyn-variants.rs index 917f2c5b37468..672a63824aa36 100644 --- a/src/test/run-pass/tag-align-dyn-variants.rs +++ b/src/test/run-pass/tag-align-dyn-variants.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; enum Tag { diff --git a/src/test/run-pass/tag-align-u64.rs b/src/test/run-pass/tag-align-u64.rs index df99d77142c1b..ca0e3ee95f880 100644 --- a/src/test/run-pass/tag-align-u64.rs +++ b/src/test/run-pass/tag-align-u64.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem; enum Tag { diff --git a/src/test/run-pass/tag-exports.rs b/src/test/run-pass/tag-exports.rs index 2eff97d31b25d..d797fd2e54f46 100644 --- a/src/test/run-pass/tag-exports.rs +++ b/src/test/run-pass/tag-exports.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + use alder::*; mod alder { diff --git a/src/test/run-pass/tag-in-block.rs b/src/test/run-pass/tag-in-block.rs index 4cb189ee43ffe..f1a820c8d816e 100644 --- a/src/test/run-pass/tag-in-block.rs +++ b/src/test/run-pass/tag-in-block.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + fn foo() { fn zed(_z: bar) { } enum bar { nil, } diff --git a/src/test/run-pass/tag-variant-disr-type-mismatch.rs b/src/test/run-pass/tag-variant-disr-type-mismatch.rs index 7e4bd9ab2738c..d31eacc99769f 100644 --- a/src/test/run-pass/tag-variant-disr-type-mismatch.rs +++ b/src/test/run-pass/tag-variant-disr-type-mismatch.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum color { red = 1, blue = 2, diff --git a/src/test/run-pass/tag-variant-disr-val.rs b/src/test/run-pass/tag-variant-disr-val.rs index 915a0b5b7e3b7..95bfb78689918 100644 --- a/src/test/run-pass/tag-variant-disr-val.rs +++ b/src/test/run-pass/tag-variant-disr-val.rs @@ -7,6 +7,8 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use color::{red, green, blue, black, white, imaginary, purple, orange}; #[derive(Copy)] diff --git a/src/test/run-pass/tag.rs b/src/test/run-pass/tag.rs index 45b6871e401bd..d6d4cd2de78a2 100644 --- a/src/test/run-pass/tag.rs +++ b/src/test/run-pass/tag.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + enum colour { red(int, int), green, } impl PartialEq for colour { diff --git a/src/test/run-pass/tail-call-arg-leak.rs b/src/test/run-pass/tail-call-arg-leak.rs index a5447606d87c8..8842e1b85915b 100644 --- a/src/test/run-pass/tail-call-arg-leak.rs +++ b/src/test/run-pass/tail-call-arg-leak.rs @@ -12,6 +12,8 @@ // use of tail calls causes arg slot leaks, issue #160. +// pretty-expanded FIXME #23616 + fn inner(dummy: String, b: bool) { if b { return inner(dummy, false); } } pub fn main() { diff --git a/src/test/run-pass/tail-direct.rs b/src/test/run-pass/tail-direct.rs index fd03d28050326..640da0697ac2a 100644 --- a/src/test/run-pass/tail-direct.rs +++ b/src/test/run-pass/tail-direct.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { assert!((even(42))); assert!((odd(45))); } fn even(n: int) -> bool { if n == 0 { return true; } else { return odd(n - 1); } } diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs index c33872e30c41c..952adf1cd78a6 100644 --- a/src/test/run-pass/task-comm-11.rs +++ b/src/test/run-pass/task-comm-11.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/task-comm-15.rs b/src/test/run-pass/task-comm-15.rs index e9ae3d2a25ad4..4db4333c9647e 100644 --- a/src/test/run-pass/task-comm-15.rs +++ b/src/test/run-pass/task-comm-15.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/task-comm-17.rs b/src/test/run-pass/task-comm-17.rs index f5ca52ba4b6b6..6c27292d19d59 100644 --- a/src/test/run-pass/task-comm-17.rs +++ b/src/test/run-pass/task-comm-17.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] // Issue #922 diff --git a/src/test/run-pass/task-comm-5.rs b/src/test/run-pass/task-comm-5.rs index 039308d5cfed7..9bae0ad069cd3 100644 --- a/src/test/run-pass/task-comm-5.rs +++ b/src/test/run-pass/task-comm-5.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::mpsc::channel; pub fn main() { test00(); } diff --git a/src/test/run-pass/task-comm-6.rs b/src/test/run-pass/task-comm-6.rs index 7cdfddcdeb113..2657951ca4876 100644 --- a/src/test/run-pass/task-comm-6.rs +++ b/src/test/run-pass/task-comm-6.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] use std::sync::mpsc::channel; diff --git a/src/test/run-pass/task-comm-7.rs b/src/test/run-pass/task-comm-7.rs index 263ad0e4c0210..44e3bab20ef74 100644 --- a/src/test/run-pass/task-comm-7.rs +++ b/src/test/run-pass/task-comm-7.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] #![allow(dead_assignment)] diff --git a/src/test/run-pass/task-comm-chan-nil.rs b/src/test/run-pass/task-comm-chan-nil.rs index 78a42632001d0..77571504fea27 100644 --- a/src/test/run-pass/task-comm-chan-nil.rs +++ b/src/test/run-pass/task-comm-chan-nil.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::mpsc::channel; // rustboot can't transmit nils across channels because they don't have diff --git a/src/test/run-pass/task-life-0.rs b/src/test/run-pass/task-life-0.rs index 462b38f6598ff..7da7a1afb9af8 100644 --- a/src/test/run-pass/task-life-0.rs +++ b/src/test/run-pass/task-life-0.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(std_misc)] use std::thread::Thread; diff --git a/src/test/run-pass/task-spawn-move-and-copy.rs b/src/test/run-pass/task-spawn-move-and-copy.rs index eb6bec9a092a6..a6c6db1a1273e 100644 --- a/src/test/run-pass/task-spawn-move-and-copy.rs +++ b/src/test/run-pass/task-spawn-move-and-copy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, std_misc)] diff --git a/src/test/run-pass/task-stderr.rs b/src/test/run-pass/task-stderr.rs index 824d240568f19..7bcde7b83cd1b 100644 --- a/src/test/run-pass/task-stderr.rs +++ b/src/test/run-pass/task-stderr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, old_io, std_misc, io, set_panic, set_stdio)] diff --git a/src/test/run-pass/terminate-in-initializer.rs b/src/test/run-pass/terminate-in-initializer.rs index bef9efa9eb68d..b59d11d8674c7 100644 --- a/src/test/run-pass/terminate-in-initializer.rs +++ b/src/test/run-pass/terminate-in-initializer.rs @@ -12,6 +12,8 @@ // Issue #787 // Don't try to clean up uninitialized locals +// pretty-expanded FIXME #23616 + use std::thread; fn test_break() { loop { let _x: Box = break; } } diff --git a/src/test/run-pass/trailing-comma.rs b/src/test/run-pass/trailing-comma.rs index 76c62a83e758c..79e0df0133b44 100644 --- a/src/test/run-pass/trailing-comma.rs +++ b/src/test/run-pass/trailing-comma.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(advanced_slice_patterns,)] fn f(_: T,) {} diff --git a/src/test/run-pass/trait-bounds-basic.rs b/src/test/run-pass/trait-bounds-basic.rs index cc2347fb5f30d..50c9c43ba2b8b 100644 --- a/src/test/run-pass/trait-bounds-basic.rs +++ b/src/test/run-pass/trait-bounds-basic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] trait Foo : ::std::marker::MarkerTrait { diff --git a/src/test/run-pass/trait-bounds-impl-comparison-duplicates.rs b/src/test/run-pass/trait-bounds-impl-comparison-duplicates.rs index 5c913f7921d7d..7357c38751137 100644 --- a/src/test/run-pass/trait-bounds-impl-comparison-duplicates.rs +++ b/src/test/run-pass/trait-bounds-impl-comparison-duplicates.rs @@ -12,6 +12,8 @@ // trait exactly, as long as the implementation doesn't demand *more* bounds // than the trait. +// pretty-expanded FIXME #23616 + trait A { fn foo(&self); } diff --git a/src/test/run-pass/trait-bounds-on-structs-and-enums.rs b/src/test/run-pass/trait-bounds-on-structs-and-enums.rs index 6d080adbe63a5..60c1816b1632c 100644 --- a/src/test/run-pass/trait-bounds-on-structs-and-enums.rs +++ b/src/test/run-pass/trait-bounds-on-structs-and-enums.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] trait U : ::std::marker::MarkerTrait {} diff --git a/src/test/run-pass/trait-bounds-recursion.rs b/src/test/run-pass/trait-bounds-recursion.rs index d10e098f9d6fa..250390f70b448 100644 --- a/src/test/run-pass/trait-bounds-recursion.rs +++ b/src/test/run-pass/trait-bounds-recursion.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] trait I { fn i(&self) -> Self; } diff --git a/src/test/run-pass/trait-bounds.rs b/src/test/run-pass/trait-bounds.rs index 7ec6ffbd46458..0db77ec2f79d0 100644 --- a/src/test/run-pass/trait-bounds.rs +++ b/src/test/run-pass/trait-bounds.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait connection { fn read(&self) -> int; } diff --git a/src/test/run-pass/trait-cache-issue-18209.rs b/src/test/run-pass/trait-cache-issue-18209.rs index a5efb32079de8..9cc2b2fadc607 100644 --- a/src/test/run-pass/trait-cache-issue-18209.rs +++ b/src/test/run-pass/trait-cache-issue-18209.rs @@ -13,6 +13,8 @@ // // See issue #18209. +// pretty-expanded FIXME #23616 + pub trait Foo { fn load_from() -> Box; fn load() -> Box { diff --git a/src/test/run-pass/trait-composition-trivial.rs b/src/test/run-pass/trait-composition-trivial.rs index de130bf1b41fe..4138413c5b552 100644 --- a/src/test/run-pass/trait-composition-trivial.rs +++ b/src/test/run-pass/trait-composition-trivial.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn foo(&self); } diff --git a/src/test/run-pass/trait-default-method-bound-subst.rs b/src/test/run-pass/trait-default-method-bound-subst.rs index 5f0e149eb288d..e936989537e0f 100644 --- a/src/test/run-pass/trait-default-method-bound-subst.rs +++ b/src/test/run-pass/trait-default-method-bound-subst.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn g(&self, x: T, y: U) -> (T, U) { (x, y) } } diff --git a/src/test/run-pass/trait-default-method-bound-subst2.rs b/src/test/run-pass/trait-default-method-bound-subst2.rs index 1ea3879e7faf8..49ac66167cd8f 100644 --- a/src/test/run-pass/trait-default-method-bound-subst2.rs +++ b/src/test/run-pass/trait-default-method-bound-subst2.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn g(&self, x: T) -> T { x } } diff --git a/src/test/run-pass/trait-default-method-bound-subst3.rs b/src/test/run-pass/trait-default-method-bound-subst3.rs index aff20ffe962a2..abf135a668576 100644 --- a/src/test/run-pass/trait-default-method-bound-subst3.rs +++ b/src/test/run-pass/trait-default-method-bound-subst3.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn g(&self, x: T, y: T) -> (T, T) { (x, y) } } diff --git a/src/test/run-pass/trait-default-method-bound-subst4.rs b/src/test/run-pass/trait-default-method-bound-subst4.rs index acaa74373f01f..ba94fc4cd3601 100644 --- a/src/test/run-pass/trait-default-method-bound-subst4.rs +++ b/src/test/run-pass/trait-default-method-bound-subst4.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn g(&self, x: uint) -> uint { x } fn h(&self, x: T) { } diff --git a/src/test/run-pass/trait-default-method-bound.rs b/src/test/run-pass/trait-default-method-bound.rs index 8a2f1b1743b09..4f1127c0b0949 100644 --- a/src/test/run-pass/trait-default-method-bound.rs +++ b/src/test/run-pass/trait-default-method-bound.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn g(&self) -> int { 10 } } diff --git a/src/test/run-pass/trait-default-method-xc-2.rs b/src/test/run-pass/trait-default-method-xc-2.rs index b28e8bd24aa2b..b3e83f747a395 100644 --- a/src/test/run-pass/trait-default-method-xc-2.rs +++ b/src/test/run-pass/trait-default-method-xc-2.rs @@ -12,6 +12,8 @@ // aux-build:trait_default_method_xc_aux_2.rs +// pretty-expanded FIXME #23616 + extern crate "trait_default_method_xc_aux" as aux; extern crate "trait_default_method_xc_aux_2" as aux2; use aux::A; diff --git a/src/test/run-pass/trait-default-method-xc.rs b/src/test/run-pass/trait-default-method-xc.rs index 4745d057952ae..eb2a75f62fb81 100644 --- a/src/test/run-pass/trait-default-method-xc.rs +++ b/src/test/run-pass/trait-default-method-xc.rs @@ -10,6 +10,8 @@ // aux-build:trait_default_method_xc_aux.rs +// pretty-expanded FIXME #23616 + extern crate "trait_default_method_xc_aux" as aux; use aux::{A, TestEquality, Something}; use aux::B; diff --git a/src/test/run-pass/trait-false-ambiguity-where-clause-builtin-bound.rs b/src/test/run-pass/trait-false-ambiguity-where-clause-builtin-bound.rs index ca66a106c437e..b9ca8971d3893 100644 --- a/src/test/run-pass/trait-false-ambiguity-where-clause-builtin-bound.rs +++ b/src/test/run-pass/trait-false-ambiguity-where-clause-builtin-bound.rs @@ -12,6 +12,8 @@ // between the builtin rules for Sized and the where clause. Issue // #20959. +// pretty-expanded FIXME #23616 + fn foo(x: Option) where Option : Sized { diff --git a/src/test/run-pass/trait-generic.rs b/src/test/run-pass/trait-generic.rs index 0dedf621a4f28..2a5f9b80e9d82 100644 --- a/src/test/run-pass/trait-generic.rs +++ b/src/test/run-pass/trait-generic.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + trait to_str { fn to_string_(&self) -> String; } diff --git a/src/test/run-pass/trait-impl-2.rs b/src/test/run-pass/trait-impl-2.rs index abc35bcc29d41..c94b517f6a7d6 100644 --- a/src/test/run-pass/trait-impl-2.rs +++ b/src/test/run-pass/trait-impl-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub mod Foo { pub trait Trait { fn foo(&self); diff --git a/src/test/run-pass/trait-impl.rs b/src/test/run-pass/trait-impl.rs index 325fba8a0ee42..0caa4c2d2d2b3 100644 --- a/src/test/run-pass/trait-impl.rs +++ b/src/test/run-pass/trait-impl.rs @@ -11,6 +11,8 @@ // Test calling methods on an impl for a bare trait. // aux-build:traitimpl.rs +// pretty-expanded FIXME #23616 + extern crate traitimpl; use traitimpl::Bar; diff --git a/src/test/run-pass/trait-inheritance-auto-xc-2.rs b/src/test/run-pass/trait-inheritance-auto-xc-2.rs index d45d7ebe90adc..9db1af230d5f2 100644 --- a/src/test/run-pass/trait-inheritance-auto-xc-2.rs +++ b/src/test/run-pass/trait-inheritance-auto-xc-2.rs @@ -10,6 +10,8 @@ // aux-build:trait_inheritance_auto_xc_2_aux.rs +// pretty-expanded FIXME #23616 + extern crate "trait_inheritance_auto_xc_2_aux" as aux; // aux defines impls of Foo, Bar and Baz for A diff --git a/src/test/run-pass/trait-inheritance-auto-xc.rs b/src/test/run-pass/trait-inheritance-auto-xc.rs index f4e1908aaeed9..b58839931b0c5 100644 --- a/src/test/run-pass/trait-inheritance-auto-xc.rs +++ b/src/test/run-pass/trait-inheritance-auto-xc.rs @@ -10,6 +10,8 @@ // aux-build:trait_inheritance_auto_xc_aux.rs +// pretty-expanded FIXME #23616 + extern crate "trait_inheritance_auto_xc_aux" as aux; use aux::{Foo, Bar, Baz, Quux}; diff --git a/src/test/run-pass/trait-inheritance-auto.rs b/src/test/run-pass/trait-inheritance-auto.rs index c5a7720e3c341..dfd541c6932d4 100644 --- a/src/test/run-pass/trait-inheritance-auto.rs +++ b/src/test/run-pass/trait-inheritance-auto.rs @@ -10,6 +10,8 @@ // Testing that this impl turns A into a Quux, because // A is already a Foo Bar Baz +// pretty-expanded FIXME #23616 + impl Quux for T { } trait Foo { fn f(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-call-bound-inherited.rs b/src/test/run-pass/trait-inheritance-call-bound-inherited.rs index 46258902f9cae..c62941a517490 100644 --- a/src/test/run-pass/trait-inheritance-call-bound-inherited.rs +++ b/src/test/run-pass/trait-inheritance-call-bound-inherited.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn f(&self) -> int; } trait Bar : Foo { fn g(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-call-bound-inherited2.rs b/src/test/run-pass/trait-inheritance-call-bound-inherited2.rs index 7b79ad42ed2b3..2ee3a2ec124ec 100644 --- a/src/test/run-pass/trait-inheritance-call-bound-inherited2.rs +++ b/src/test/run-pass/trait-inheritance-call-bound-inherited2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn f(&self) -> int; } trait Bar : Foo { fn g(&self) -> int; } trait Baz : Bar { fn h(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-cast-without-call-to-supertrait.rs b/src/test/run-pass/trait-inheritance-cast-without-call-to-supertrait.rs index 68a31ba9dbe64..5afdc60b0e83a 100644 --- a/src/test/run-pass/trait-inheritance-cast-without-call-to-supertrait.rs +++ b/src/test/run-pass/trait-inheritance-cast-without-call-to-supertrait.rs @@ -11,6 +11,8 @@ // Testing that we can cast to a subtrait and call subtrait // methods. Not testing supertrait methods +// pretty-expanded FIXME #23616 + trait Foo { fn f(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-cast.rs b/src/test/run-pass/trait-inheritance-cast.rs index 51bc2751873fa..84ffb395588dd 100644 --- a/src/test/run-pass/trait-inheritance-cast.rs +++ b/src/test/run-pass/trait-inheritance-cast.rs @@ -10,6 +10,8 @@ // Testing that supertrait methods can be called on subtrait object types +// pretty-expanded FIXME #23616 + trait Foo { fn f(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs b/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs index 3ee046e8bfe6c..8de867eff9082 100644 --- a/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs +++ b/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs @@ -10,6 +10,8 @@ // aux-build:trait_inheritance_cross_trait_call_xc_aux.rs +// pretty-expanded FIXME #23616 + extern crate "trait_inheritance_cross_trait_call_xc_aux" as aux; use aux::Foo; diff --git a/src/test/run-pass/trait-inheritance-cross-trait-call.rs b/src/test/run-pass/trait-inheritance-cross-trait-call.rs index 7b047b5cc800a..88645a36b6ee8 100644 --- a/src/test/run-pass/trait-inheritance-cross-trait-call.rs +++ b/src/test/run-pass/trait-inheritance-cross-trait-call.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn f(&self) -> int; } trait Bar : Foo { fn g(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-diamond.rs b/src/test/run-pass/trait-inheritance-diamond.rs index 253c10ac6f1b0..69f97d8d6526d 100644 --- a/src/test/run-pass/trait-inheritance-diamond.rs +++ b/src/test/run-pass/trait-inheritance-diamond.rs @@ -10,6 +10,8 @@ // B and C both require A, so D does as well, twice, but that's just fine +// pretty-expanded FIXME #23616 + trait A { fn a(&self) -> int; } trait B: A { fn b(&self) -> int; } trait C: A { fn c(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-multiple-inheritors.rs b/src/test/run-pass/trait-inheritance-multiple-inheritors.rs index 6cd3d62473692..47c8726c3e7f8 100644 --- a/src/test/run-pass/trait-inheritance-multiple-inheritors.rs +++ b/src/test/run-pass/trait-inheritance-multiple-inheritors.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn a(&self) -> int; } trait B: A { fn b(&self) -> int; } trait C: A { fn c(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-multiple-params.rs b/src/test/run-pass/trait-inheritance-multiple-params.rs index b5524c6dda6cd..da57d9a4e97c0 100644 --- a/src/test/run-pass/trait-inheritance-multiple-params.rs +++ b/src/test/run-pass/trait-inheritance-multiple-params.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait A { fn a(&self) -> int; } trait B: A { fn b(&self) -> int; } trait C: A { fn c(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-num.rs b/src/test/run-pass/trait-inheritance-num.rs index 251223e30fbb1..4af049fc0c3af 100644 --- a/src/test/run-pass/trait-inheritance-num.rs +++ b/src/test/run-pass/trait-inheritance-num.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::cmp::{PartialEq, PartialOrd}; diff --git a/src/test/run-pass/trait-inheritance-num0.rs b/src/test/run-pass/trait-inheritance-num0.rs index 8de226b73453d..a4b0d5b88ca5a 100644 --- a/src/test/run-pass/trait-inheritance-num0.rs +++ b/src/test/run-pass/trait-inheritance-num0.rs @@ -10,6 +10,8 @@ // Extending Num and using inherited static methods +// pretty-expanded FIXME #23616 + #![feature(core)] use std::cmp::PartialOrd; diff --git a/src/test/run-pass/trait-inheritance-num1.rs b/src/test/run-pass/trait-inheritance-num1.rs index 33b31a98599a3..02ebf6bfa5375 100644 --- a/src/test/run-pass/trait-inheritance-num1.rs +++ b/src/test/run-pass/trait-inheritance-num1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::cmp::PartialOrd; diff --git a/src/test/run-pass/trait-inheritance-num5.rs b/src/test/run-pass/trait-inheritance-num5.rs index acd60cea61f88..cce9bd3c7146d 100644 --- a/src/test/run-pass/trait-inheritance-num5.rs +++ b/src/test/run-pass/trait-inheritance-num5.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::cmp::PartialEq; diff --git a/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs b/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs index 2a087e5e425ad..20d6817fcddf0 100644 --- a/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs +++ b/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs @@ -10,6 +10,8 @@ // aux-build:trait_inheritance_overloading_xc.rs +// pretty-expanded FIXME #23616 + extern crate trait_inheritance_overloading_xc; use trait_inheritance_overloading_xc::{MyNum, MyInt}; diff --git a/src/test/run-pass/trait-inheritance-self-in-supertype.rs b/src/test/run-pass/trait-inheritance-self-in-supertype.rs index 96f1c940dcf2c..87a36ba7b90cc 100644 --- a/src/test/run-pass/trait-inheritance-self-in-supertype.rs +++ b/src/test/run-pass/trait-inheritance-self-in-supertype.rs @@ -10,6 +10,8 @@ // Test for issue #4183: use of Self in supertraits. +// pretty-expanded FIXME #23616 + use std::num::Float as StdFloat; pub static FUZZY_EPSILON: f64 = 0.1; diff --git a/src/test/run-pass/trait-inheritance-simple.rs b/src/test/run-pass/trait-inheritance-simple.rs index 113efa663afaf..f06ae1104c08c 100644 --- a/src/test/run-pass/trait-inheritance-simple.rs +++ b/src/test/run-pass/trait-inheritance-simple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn f(&self) -> int; } trait Bar : Foo { fn g(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance-static.rs b/src/test/run-pass/trait-inheritance-static.rs index 611c3e006ec19..cd486754e7845 100644 --- a/src/test/run-pass/trait-inheritance-static.rs +++ b/src/test/run-pass/trait-inheritance-static.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub trait MyNum { fn from_int(int) -> Self; } diff --git a/src/test/run-pass/trait-inheritance-static2.rs b/src/test/run-pass/trait-inheritance-static2.rs index caedaf35737e3..86bfe0aa5c84c 100644 --- a/src/test/run-pass/trait-inheritance-static2.rs +++ b/src/test/run-pass/trait-inheritance-static2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] pub trait MyEq : ::std::marker::MarkerTrait { } diff --git a/src/test/run-pass/trait-inheritance-subst.rs b/src/test/run-pass/trait-inheritance-subst.rs index cd57e6a7dd059..d7cddbe62ca5c 100644 --- a/src/test/run-pass/trait-inheritance-subst.rs +++ b/src/test/run-pass/trait-inheritance-subst.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub trait Add { fn add(&self, rhs: &RHS) -> Result; } diff --git a/src/test/run-pass/trait-inheritance-subst2.rs b/src/test/run-pass/trait-inheritance-subst2.rs index ebddfafc3b438..5949308a7ebc1 100644 --- a/src/test/run-pass/trait-inheritance-subst2.rs +++ b/src/test/run-pass/trait-inheritance-subst2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Panda { fn chomp(&self, bamboo: &T) -> T; } diff --git a/src/test/run-pass/trait-inheritance-visibility.rs b/src/test/run-pass/trait-inheritance-visibility.rs index 3cdedd884a42c..225e0ee90eb4f 100644 --- a/src/test/run-pass/trait-inheritance-visibility.rs +++ b/src/test/run-pass/trait-inheritance-visibility.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + mod traits { pub trait Foo { fn f(&self) -> int; } diff --git a/src/test/run-pass/trait-inheritance2.rs b/src/test/run-pass/trait-inheritance2.rs index 7fa895ddf9888..2885afd7bd622 100644 --- a/src/test/run-pass/trait-inheritance2.rs +++ b/src/test/run-pass/trait-inheritance2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn f(&self) -> int; } trait Bar { fn g(&self) -> int; } trait Baz { fn h(&self) -> int; } diff --git a/src/test/run-pass/trait-object-generics.rs b/src/test/run-pass/trait-object-generics.rs index 18097b59b08e2..b528cbe271a47 100644 --- a/src/test/run-pass/trait-object-generics.rs +++ b/src/test/run-pass/trait-object-generics.rs @@ -10,6 +10,8 @@ // test for #8664 +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/trait-object-with-lifetime-bound.rs b/src/test/run-pass/trait-object-with-lifetime-bound.rs index 99910f1573887..30a05ee1c562e 100644 --- a/src/test/run-pass/trait-object-with-lifetime-bound.rs +++ b/src/test/run-pass/trait-object-with-lifetime-bound.rs @@ -11,6 +11,8 @@ // Uncovered during work on new scoping rules for safe destructors // as an important use case to support properly. +// pretty-expanded FIXME #23616 + pub struct E<'a> { pub f: &'a u8, } diff --git a/src/test/run-pass/trait-safety-ok-cc.rs b/src/test/run-pass/trait-safety-ok-cc.rs index 99203d3e24acc..11a58de45322a 100644 --- a/src/test/run-pass/trait-safety-ok-cc.rs +++ b/src/test/run-pass/trait-safety-ok-cc.rs @@ -12,6 +12,8 @@ // Simple smoke test that unsafe traits can be compiled across crates. +// pretty-expanded FIXME #23616 + extern crate "trait-safety-lib" as lib; use lib::Foo; diff --git a/src/test/run-pass/trait-safety-ok.rs b/src/test/run-pass/trait-safety-ok.rs index a24796a7d0c31..c5679627fc342 100644 --- a/src/test/run-pass/trait-safety-ok.rs +++ b/src/test/run-pass/trait-safety-ok.rs @@ -10,6 +10,8 @@ // Simple smoke test that unsafe traits can be compiled etc. +// pretty-expanded FIXME #23616 + unsafe trait Foo { fn foo(&self) -> int; } diff --git a/src/test/run-pass/trait-where-clause-vs-impl.rs b/src/test/run-pass/trait-where-clause-vs-impl.rs index 772310d47335f..f3dcb51f97a29 100644 --- a/src/test/run-pass/trait-where-clause-vs-impl.rs +++ b/src/test/run-pass/trait-where-clause-vs-impl.rs @@ -13,6 +13,8 @@ // // Issue #18453. +// pretty-expanded FIXME #23616 + use std::rc::Rc; pub trait Foo { diff --git a/src/test/run-pass/traits-assoc-type-in-supertrait.rs b/src/test/run-pass/traits-assoc-type-in-supertrait.rs index 6a4a6710131e3..751cd50441362 100644 --- a/src/test/run-pass/traits-assoc-type-in-supertrait.rs +++ b/src/test/run-pass/traits-assoc-type-in-supertrait.rs @@ -11,6 +11,8 @@ // Test case where an associated type is referenced from within the // supertrait definition. Issue #20220. +// pretty-expanded FIXME #23616 + use std::vec::IntoIter; pub trait Foo: Iterator::Key> { diff --git a/src/test/run-pass/traits-conditional-dispatch.rs b/src/test/run-pass/traits-conditional-dispatch.rs index 650688dd9088f..5edd3dfbc9ef5 100644 --- a/src/test/run-pass/traits-conditional-dispatch.rs +++ b/src/test/run-pass/traits-conditional-dispatch.rs @@ -12,6 +12,8 @@ // blanket impl for T:Copy coexists with an impl for Box, because // Box does not impl Copy. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/traits-conditional-model-fn.rs b/src/test/run-pass/traits-conditional-model-fn.rs index 92ba5aad05958..c9f003a022068 100644 --- a/src/test/run-pass/traits-conditional-model-fn.rs +++ b/src/test/run-pass/traits-conditional-model-fn.rs @@ -14,6 +14,8 @@ // aux-build:go_trait.rs +// pretty-expanded FIXME #23616 + extern crate go_trait; use go_trait::{Go, GoMut, GoOnce, go, go_mut, go_once}; diff --git a/src/test/run-pass/traits-default-method-macro.rs b/src/test/run-pass/traits-default-method-macro.rs index 245ae540ee895..1ec58eac58bbd 100644 --- a/src/test/run-pass/traits-default-method-macro.rs +++ b/src/test/run-pass/traits-default-method-macro.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn bar(&self) -> String { format!("test") diff --git a/src/test/run-pass/traits-default-method-mut.rs b/src/test/run-pass/traits-default-method-mut.rs index a3a1076ecba52..29b52ea5897c9 100644 --- a/src/test/run-pass/traits-default-method-mut.rs +++ b/src/test/run-pass/traits-default-method-mut.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unused_variable)] diff --git a/src/test/run-pass/traits-issue-22019.rs b/src/test/run-pass/traits-issue-22019.rs index 7e0f60d55a827..2f3e0c64f6c11 100644 --- a/src/test/run-pass/traits-issue-22019.rs +++ b/src/test/run-pass/traits-issue-22019.rs @@ -12,6 +12,8 @@ // distinct scopes to be compared (`'g` and `'h`). The only important // thing is that compilation succeeds here. +// pretty-expanded FIXME #23616 + #![allow(missing_copy_implementations)] #![allow(unused_variables)] diff --git a/src/test/run-pass/traits-issue-22110.rs b/src/test/run-pass/traits-issue-22110.rs index 9cdcf4945d8ba..3da8c25397834 100644 --- a/src/test/run-pass/traits-issue-22110.rs +++ b/src/test/run-pass/traits-issue-22110.rs @@ -12,6 +12,8 @@ // and the blanket impl. The only important thing is that compilation // succeeds here. Issue #22110. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] trait Foo { diff --git a/src/test/run-pass/traits-issue-22655.rs b/src/test/run-pass/traits-issue-22655.rs index 18c7cfb0850ce..ded17422c498d 100644 --- a/src/test/run-pass/traits-issue-22655.rs +++ b/src/test/run-pass/traits-issue-22655.rs @@ -11,6 +11,8 @@ // Regression test for issue #22655: This test should not lead to // infinite recursion. +// pretty-expanded FIXME #23616 + unsafe impl Send for Unique { } pub struct Unique { diff --git a/src/test/run-pass/traits-issue-23003.rs b/src/test/run-pass/traits-issue-23003.rs index 37b13d319aaf7..46cd22f22baa4 100644 --- a/src/test/run-pass/traits-issue-23003.rs +++ b/src/test/run-pass/traits-issue-23003.rs @@ -13,6 +13,8 @@ // Async>::Cancel` be WF. This normalizes to `Receipt` // again, leading to an infinite cycle. Issue #23003. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/run-pass/traits-multidispatch-infer-convert-target.rs b/src/test/run-pass/traits-multidispatch-infer-convert-target.rs index 532ef7cbec6f3..f81b753acbb9b 100644 --- a/src/test/run-pass/traits-multidispatch-infer-convert-target.rs +++ b/src/test/run-pass/traits-multidispatch-infer-convert-target.rs @@ -10,6 +10,8 @@ // Test that we can infer the Target based on the Self or vice versa. +// pretty-expanded FIXME #23616 + use std::mem; trait Convert { diff --git a/src/test/run-pass/traits-repeated-supertrait.rs b/src/test/run-pass/traits-repeated-supertrait.rs index fdaa8d6f4d6ef..509a6e36afdec 100644 --- a/src/test/run-pass/traits-repeated-supertrait.rs +++ b/src/test/run-pass/traits-repeated-supertrait.rs @@ -13,6 +13,8 @@ // various methods in various ways successfully. // See also `compile-fail/trait-repeated-supertrait-ambig.rs`. +// pretty-expanded FIXME #23616 + trait CompareTo { fn same_as(&self, t: T) -> bool; } diff --git a/src/test/run-pass/trans-tag-static-padding.rs b/src/test/run-pass/trans-tag-static-padding.rs index 6d0ae8f67cd4d..3e2297f008f02 100644 --- a/src/test/run-pass/trans-tag-static-padding.rs +++ b/src/test/run-pass/trans-tag-static-padding.rs @@ -21,6 +21,8 @@ // Last 7 bytes of Request struct are not occupied by any fields. +// pretty-expanded FIXME #23616 + enum TestOption { TestNone, TestSome(T), diff --git a/src/test/run-pass/transmute-non-immediate-to-immediate.rs b/src/test/run-pass/transmute-non-immediate-to-immediate.rs index 70a41f773a3e0..d8314005082c7 100644 --- a/src/test/run-pass/transmute-non-immediate-to-immediate.rs +++ b/src/test/run-pass/transmute-non-immediate-to-immediate.rs @@ -11,6 +11,8 @@ // Issue #7988 // Transmuting non-immediate type to immediate type +// pretty-expanded FIXME #23616 + pub fn main() { unsafe { ::std::mem::transmute::<[int; 1],int>([1]) diff --git a/src/test/run-pass/tup.rs b/src/test/run-pass/tup.rs index dd508d6e90ca0..396d6911cf235 100644 --- a/src/test/run-pass/tup.rs +++ b/src/test/run-pass/tup.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + type point = (int, int); fn f(p: point, x: int, y: int) { diff --git a/src/test/run-pass/tuple-index-fat-types.rs b/src/test/run-pass/tuple-index-fat-types.rs index 924b861a911c8..7d6f42c7ddcf5 100644 --- a/src/test/run-pass/tuple-index-fat-types.rs +++ b/src/test/run-pass/tuple-index-fat-types.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo<'a>(&'a [int]); fn main() { diff --git a/src/test/run-pass/tuple-index.rs b/src/test/run-pass/tuple-index.rs index abdf617277930..004e7e33d4e14 100644 --- a/src/test/run-pass/tuple-index.rs +++ b/src/test/run-pass/tuple-index.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Point(int, int); fn main() { diff --git a/src/test/run-pass/tuple-struct-trivial.rs b/src/test/run-pass/tuple-struct-trivial.rs index c22c812760c78..5b25dcbb347a7 100644 --- a/src/test/run-pass/tuple-struct-trivial.rs +++ b/src/test/run-pass/tuple-struct-trivial.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo(int, int, int); pub fn main() { diff --git a/src/test/run-pass/tydesc-name.rs b/src/test/run-pass/tydesc-name.rs index 2e8adfe508bb3..cc97959e41a3d 100644 --- a/src/test/run-pass/tydesc-name.rs +++ b/src/test/run-pass/tydesc-name.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core)] use std::intrinsics::type_name; diff --git a/src/test/run-pass/type-id-higher-rank.rs b/src/test/run-pass/type-id-higher-rank.rs index e4d7d29205669..5670c45b68ad0 100644 --- a/src/test/run-pass/type-id-higher-rank.rs +++ b/src/test/run-pass/type-id-higher-rank.rs @@ -11,6 +11,8 @@ // Test that type IDs correctly account for higher-rank lifetimes // Also acts as a regression test for an ICE (issue #19791) +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::any::TypeId; diff --git a/src/test/run-pass/type-in-nested-module.rs b/src/test/run-pass/type-in-nested-module.rs index f0b7ee072ea5e..02b7fa50a2da8 100644 --- a/src/test/run-pass/type-in-nested-module.rs +++ b/src/test/run-pass/type-in-nested-module.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + mod a { pub mod b { pub type t = int; diff --git a/src/test/run-pass/type-namespace.rs b/src/test/run-pass/type-namespace.rs index e9b0324456a2f..00b7b0c359b88 100644 --- a/src/test/run-pass/type-namespace.rs +++ b/src/test/run-pass/type-namespace.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A { a: int } fn a(a: A) -> int { return a.a; } diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs index 432dbd72a2948..5b8e78ba71ab6 100644 --- a/src/test/run-pass/type-param-constraints.rs +++ b/src/test/run-pass/type-param-constraints.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/type-param.rs b/src/test/run-pass/type-param.rs index 209dade8d0c8d..c59e40934fb4b 100644 --- a/src/test/run-pass/type-param.rs +++ b/src/test/run-pass/type-param.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + type lteq = extern fn(T) -> bool; pub fn main() { } diff --git a/src/test/run-pass/type-params-in-for-each.rs b/src/test/run-pass/type-params-in-for-each.rs index 5d80cec2a05fd..3bfc61ddcbea5 100644 --- a/src/test/run-pass/type-params-in-for-each.rs +++ b/src/test/run-pass/type-params-in-for-each.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct S { a: T, b: uint, diff --git a/src/test/run-pass/type-ptr.rs b/src/test/run-pass/type-ptr.rs index 410e3df9e2ac9..3b97cbbaa9050 100644 --- a/src/test/run-pass/type-ptr.rs +++ b/src/test/run-pass/type-ptr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(a: *const int) -> *const int { return a; } fn g(a: *const int) -> *const int { let b = f(a); return b; } diff --git a/src/test/run-pass/type-sizes.rs b/src/test/run-pass/type-sizes.rs index 961a4472bd4e7..286a12100c452 100644 --- a/src/test/run-pass/type-sizes.rs +++ b/src/test/run-pass/type-sizes.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::size_of; struct t {a: u8, b: i8} diff --git a/src/test/run-pass/type-use-i1-versus-i8.rs b/src/test/run-pass/type-use-i1-versus-i8.rs index 99c68ac8100c8..6cef9c3be172d 100644 --- a/src/test/run-pass/type-use-i1-versus-i8.rs +++ b/src/test/run-pass/type-use-i1-versus-i8.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::ptr; pub fn main() { diff --git a/src/test/run-pass/typeck-macro-interaction-issue-8852.rs b/src/test/run-pass/typeck-macro-interaction-issue-8852.rs index 673e852356266..6a684fe9d8c68 100644 --- a/src/test/run-pass/typeck-macro-interaction-issue-8852.rs +++ b/src/test/run-pass/typeck-macro-interaction-issue-8852.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum T { A(int), B(f64) diff --git a/src/test/run-pass/typeck_type_placeholder_1.rs b/src/test/run-pass/typeck_type_placeholder_1.rs index c850c01753bd8..f4c0992ae1a56 100644 --- a/src/test/run-pass/typeck_type_placeholder_1.rs +++ b/src/test/run-pass/typeck_type_placeholder_1.rs @@ -11,6 +11,8 @@ // This test checks that the `_` type placeholder works // correctly for enabling type inference. +// pretty-expanded FIXME #23616 + struct TestStruct { x: *const int } diff --git a/src/test/run-pass/typeid-intrinsic.rs b/src/test/run-pass/typeid-intrinsic.rs index fd42521410010..9dfd25b4fc4e1 100644 --- a/src/test/run-pass/typeid-intrinsic.rs +++ b/src/test/run-pass/typeid-intrinsic.rs @@ -11,6 +11,8 @@ // aux-build:typeid-intrinsic.rs // aux-build:typeid-intrinsic2.rs +// pretty-expanded FIXME #23616 + #![feature(hash, core)] extern crate "typeid-intrinsic" as other1; diff --git a/src/test/run-pass/typestate-cfg-nesting.rs b/src/test/run-pass/typestate-cfg-nesting.rs index 37d06bf4f8308..86184f6cf0f43 100644 --- a/src/test/run-pass/typestate-cfg-nesting.rs +++ b/src/test/run-pass/typestate-cfg-nesting.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unused_variable)] diff --git a/src/test/run-pass/typestate-multi-decl.rs b/src/test/run-pass/typestate-multi-decl.rs index 42910c4700581..c7762a8464d6b 100644 --- a/src/test/run-pass/typestate-multi-decl.rs +++ b/src/test/run-pass/typestate-multi-decl.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let (x, y) = (10, 20); let z = x + y; diff --git a/src/test/run-pass/u32-decr.rs b/src/test/run-pass/u32-decr.rs index 027bd7ca6806f..4955ac8a4be63 100644 --- a/src/test/run-pass/u32-decr.rs +++ b/src/test/run-pass/u32-decr.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let mut word: u32 = 200000; word = word - 1; diff --git a/src/test/run-pass/u8-incr-decr.rs b/src/test/run-pass/u8-incr-decr.rs index ff25d95d1fd21..7c67d304edb68 100644 --- a/src/test/run-pass/u8-incr-decr.rs +++ b/src/test/run-pass/u8-incr-decr.rs @@ -14,6 +14,8 @@ // These constants were chosen because they aren't used anywhere // in the rest of the generated code so they're easily grep-able. +// pretty-expanded FIXME #23616 + pub fn main() { let mut x: u8 = 19; // 0x13 diff --git a/src/test/run-pass/u8-incr.rs b/src/test/run-pass/u8-incr.rs index 7f69d0781345f..e15576c3fabce 100644 --- a/src/test/run-pass/u8-incr.rs +++ b/src/test/run-pass/u8-incr.rs @@ -11,6 +11,8 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let mut x: u8 = 12; let y: u8 = 12; diff --git a/src/test/run-pass/ufcs-polymorphic-paths.rs b/src/test/run-pass/ufcs-polymorphic-paths.rs index 1197e7c1414eb..e05a60dbc7f9f 100644 --- a/src/test/run-pass/ufcs-polymorphic-paths.rs +++ b/src/test/run-pass/ufcs-polymorphic-paths.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections, rand)] use std::borrow::{Cow, IntoCow}; diff --git a/src/test/run-pass/ufcs-trait-object.rs b/src/test/run-pass/ufcs-trait-object.rs index 34cf44bba2efb..b242018458dfc 100644 --- a/src/test/run-pass/ufcs-trait-object.rs +++ b/src/test/run-pass/ufcs-trait-object.rs @@ -11,6 +11,8 @@ // Test that when you use ufcs form to invoke a trait method (on a // trait object) everything works fine. +// pretty-expanded FIXME #23616 + trait Foo { fn test(&self) -> i32; } diff --git a/src/test/run-pass/ufcs-type-params.rs b/src/test/run-pass/ufcs-type-params.rs index ccd5a225222da..d72fde1a3332f 100644 --- a/src/test/run-pass/ufcs-type-params.rs +++ b/src/test/run-pass/ufcs-type-params.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn get(&self) -> T; } diff --git a/src/test/run-pass/uint.rs b/src/test/run-pass/uint.rs index 876e37c5351c1..79ca103a29449 100644 --- a/src/test/run-pass/uint.rs +++ b/src/test/run-pass/uint.rs @@ -11,4 +11,6 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let _x: uint = 10 as uint; } diff --git a/src/test/run-pass/unboxed-closures-all-traits.rs b/src/test/run-pass/unboxed-closures-all-traits.rs index b4b0d2b014852..b98f5549b012b 100644 --- a/src/test/run-pass/unboxed-closures-all-traits.rs +++ b/src/test/run-pass/unboxed-closures-all-traits.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(lang_items, unboxed_closures)] fn a int>(f: F) -> int { diff --git a/src/test/run-pass/unboxed-closures-by-ref.rs b/src/test/run-pass/unboxed-closures-by-ref.rs index 178865897e5a9..7855cf6ba0c2a 100644 --- a/src/test/run-pass/unboxed-closures-by-ref.rs +++ b/src/test/run-pass/unboxed-closures-by-ref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] // Test by-ref capture of environment in unboxed closure types diff --git a/src/test/run-pass/unboxed-closures-call-fn-autoderef.rs b/src/test/run-pass/unboxed-closures-call-fn-autoderef.rs index 0303954ce2a96..7eb5e988424fc 100644 --- a/src/test/run-pass/unboxed-closures-call-fn-autoderef.rs +++ b/src/test/run-pass/unboxed-closures-call-fn-autoderef.rs @@ -10,6 +10,8 @@ // Test that the call operator autoderefs when calling a bounded type parameter. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-call-sugar-autoderef.rs b/src/test/run-pass/unboxed-closures-call-sugar-autoderef.rs index 305f496e668a8..6e8253d49ea09 100644 --- a/src/test/run-pass/unboxed-closures-call-sugar-autoderef.rs +++ b/src/test/run-pass/unboxed-closures-call-sugar-autoderef.rs @@ -10,6 +10,8 @@ // Test that the call operator autoderefs when calling a bounded type parameter. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-counter-not-moved.rs b/src/test/run-pass/unboxed-closures-counter-not-moved.rs index 0b85916d22410..792d17227766e 100644 --- a/src/test/run-pass/unboxed-closures-counter-not-moved.rs +++ b/src/test/run-pass/unboxed-closures-counter-not-moved.rs @@ -10,6 +10,8 @@ // Test that we mutate a counter on the stack only when we expect to. +// pretty-expanded FIXME #23616 + fn call(f: F) where F : FnOnce() { f(); } diff --git a/src/test/run-pass/unboxed-closures-cross-crate.rs b/src/test/run-pass/unboxed-closures-cross-crate.rs index 96d75592627be..31a901756717e 100644 --- a/src/test/run-pass/unboxed-closures-cross-crate.rs +++ b/src/test/run-pass/unboxed-closures-cross-crate.rs @@ -12,6 +12,8 @@ // Acts as a regression test for #16790, #18378 and #18543 // aux-build:unboxed-closures-cross-crate.rs +// pretty-expanded FIXME #23616 + extern crate "unboxed-closures-cross-crate" as ubcc; fn main() { diff --git a/src/test/run-pass/unboxed-closures-direct-sugary-call.rs b/src/test/run-pass/unboxed-closures-direct-sugary-call.rs index 6b2dcfa69b4ef..c91aa6ed0d923 100644 --- a/src/test/run-pass/unboxed-closures-direct-sugary-call.rs +++ b/src/test/run-pass/unboxed-closures-direct-sugary-call.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn main() { diff --git a/src/test/run-pass/unboxed-closures-drop.rs b/src/test/run-pass/unboxed-closures-drop.rs index e61d454023f5a..156934f909d9d 100644 --- a/src/test/run-pass/unboxed-closures-drop.rs +++ b/src/test/run-pass/unboxed-closures-drop.rs @@ -11,6 +11,8 @@ // A battery of tests to ensure destructors of unboxed closure environments // run at the right times. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] static mut DROP_COUNT: uint = 0; diff --git a/src/test/run-pass/unboxed-closures-extern-fn-hr.rs b/src/test/run-pass/unboxed-closures-extern-fn-hr.rs index 774aed71ec8ca..83fe32f9ca3a5 100644 --- a/src/test/run-pass/unboxed-closures-extern-fn-hr.rs +++ b/src/test/run-pass/unboxed-closures-extern-fn-hr.rs @@ -10,6 +10,8 @@ // Checks that higher-ranked extern fn pointers implement the full range of Fn traits. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::ops::{Fn,FnMut,FnOnce}; diff --git a/src/test/run-pass/unboxed-closures-extern-fn.rs b/src/test/run-pass/unboxed-closures-extern-fn.rs index ed941ac0fdb99..570627374b747 100644 --- a/src/test/run-pass/unboxed-closures-extern-fn.rs +++ b/src/test/run-pass/unboxed-closures-extern-fn.rs @@ -10,6 +10,8 @@ // Checks that extern fn pointers implement the full range of Fn traits. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] #![feature(unboxed_closures)] diff --git a/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs b/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs index 9f211e6d60071..5ec280dabc98b 100644 --- a/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs +++ b/src/test/run-pass/unboxed-closures-fn-as-fnmut-and-fnonce.rs @@ -11,6 +11,8 @@ // Checks that the Fn trait hierarchy rules permit // any Fn trait to be used where Fn is implemented. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::ops::{Fn,FnMut,FnOnce}; diff --git a/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs b/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs index 33b1a2d5470be..79be7dae8d709 100644 --- a/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs +++ b/src/test/run-pass/unboxed-closures-fnmut-as-fnonce.rs @@ -11,6 +11,8 @@ // Checks that the Fn trait hierarchy rules permit // FnMut or FnOnce to be used where FnMut is implemented. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::ops::{FnMut,FnOnce}; diff --git a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs index 2b5b5f7f7076d..790272c257ccb 100644 --- a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs +++ b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-bound.rs @@ -11,6 +11,8 @@ // Test that we are able to infer that the type of `x` is `int` based // on the expected type from the object. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::num::ToPrimitive; diff --git a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs index 85b17d4b4d87e..8f4e4f353f341 100644 --- a/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs +++ b/src/test/run-pass/unboxed-closures-infer-argument-types-from-expected-object-type.rs @@ -11,6 +11,8 @@ // Test that we are able to infer that the type of `x` is `int` based // on the expected type from the object. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::num::ToPrimitive; diff --git a/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs b/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs index f962a435020c0..1b8c9af8d4e09 100644 --- a/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs +++ b/src/test/run-pass/unboxed-closures-infer-argument-types-with-bound-regions-from-expected-bound.rs @@ -11,6 +11,8 @@ // Test that we are able to infer that the type of `x` is `int` based // on the expected type from the object. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::num::ToPrimitive; diff --git a/src/test/run-pass/unboxed-closures-infer-fnmut-calling-fnmut.rs b/src/test/run-pass/unboxed-closures-infer-fnmut-calling-fnmut.rs index 17833033492d0..798959f69d687 100644 --- a/src/test/run-pass/unboxed-closures-infer-fnmut-calling-fnmut.rs +++ b/src/test/run-pass/unboxed-closures-infer-fnmut-calling-fnmut.rs @@ -11,6 +11,8 @@ // Test that we are able to infer a suitable kind for this closure // that is just called (`FnMut`). +// pretty-expanded FIXME #23616 + fn main() { let mut counter = 0; diff --git a/src/test/run-pass/unboxed-closures-infer-fnmut-move.rs b/src/test/run-pass/unboxed-closures-infer-fnmut-move.rs index 794527249bffa..5b1e35a3e5c72 100644 --- a/src/test/run-pass/unboxed-closures-infer-fnmut-move.rs +++ b/src/test/run-pass/unboxed-closures-infer-fnmut-move.rs @@ -11,6 +11,8 @@ // Test that we are able to infer a suitable kind for this `move` // closure that is just called (`FnMut`). +// pretty-expanded FIXME #23616 + fn main() { let mut counter = 0; diff --git a/src/test/run-pass/unboxed-closures-infer-fnmut.rs b/src/test/run-pass/unboxed-closures-infer-fnmut.rs index 67f36b9a9203c..cd7f26bba2676 100644 --- a/src/test/run-pass/unboxed-closures-infer-fnmut.rs +++ b/src/test/run-pass/unboxed-closures-infer-fnmut.rs @@ -11,6 +11,8 @@ // Test that we are able to infer a suitable kind for this closure // that is just called (`FnMut`). +// pretty-expanded FIXME #23616 + fn main() { let mut counter = 0; diff --git a/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs b/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs index 9f8fc80819bfd..dc106614b53dd 100644 --- a/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs +++ b/src/test/run-pass/unboxed-closures-infer-fnonce-move.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] // Test that we are able to infer a suitable kind for this `move` diff --git a/src/test/run-pass/unboxed-closures-infer-fnonce.rs b/src/test/run-pass/unboxed-closures-infer-fnonce.rs index f0f10139c5b86..036b32a44d255 100644 --- a/src/test/run-pass/unboxed-closures-infer-fnonce.rs +++ b/src/test/run-pass/unboxed-closures-infer-fnonce.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] // Test that we are able to infer a suitable kind for this closure diff --git a/src/test/run-pass/unboxed-closures-infer-kind.rs b/src/test/run-pass/unboxed-closures-infer-kind.rs index 36c8400be7879..edc01d91f58fc 100644 --- a/src/test/run-pass/unboxed-closures-infer-kind.rs +++ b/src/test/run-pass/unboxed-closures-infer-kind.rs @@ -11,6 +11,8 @@ // Test that we can infer the "kind" of an unboxed closure based on // the expected type. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] // Test by-ref capture of environment in unboxed closure types diff --git a/src/test/run-pass/unboxed-closures-infer-recursive-fn.rs b/src/test/run-pass/unboxed-closures-infer-recursive-fn.rs index 2d1ba7f39b27b..ece583e8d6397 100644 --- a/src/test/run-pass/unboxed-closures-infer-recursive-fn.rs +++ b/src/test/run-pass/unboxed-closures-infer-recursive-fn.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(core,unboxed_closures)] use std::marker::PhantomData; diff --git a/src/test/run-pass/unboxed-closures-infer-upvar.rs b/src/test/run-pass/unboxed-closures-infer-upvar.rs index 1401fe7470b0a..e29632b007b3f 100644 --- a/src/test/run-pass/unboxed-closures-infer-upvar.rs +++ b/src/test/run-pass/unboxed-closures-infer-upvar.rs @@ -11,6 +11,8 @@ // Test that the type variable in the type(`Vec<_>`) of a closed over // variable does not interfere with type inference. +// pretty-expanded FIXME #23616 + fn f(mut f: F) { f(); } diff --git a/src/test/run-pass/unboxed-closures-manual-impl.rs b/src/test/run-pass/unboxed-closures-manual-impl.rs index f2c278c298853..b505caf6dd8f7 100644 --- a/src/test/run-pass/unboxed-closures-manual-impl.rs +++ b/src/test/run-pass/unboxed-closures-manual-impl.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures, core)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-move-mutable.rs b/src/test/run-pass/unboxed-closures-move-mutable.rs index 069e93b86baaa..88baa16c9457f 100644 --- a/src/test/run-pass/unboxed-closures-move-mutable.rs +++ b/src/test/run-pass/unboxed-closures-move-mutable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] #![deny(unused_mut)] diff --git a/src/test/run-pass/unboxed-closures-move-some-upvars-in-by-ref-closure.rs b/src/test/run-pass/unboxed-closures-move-some-upvars-in-by-ref-closure.rs index 99663646254e7..b69153b73a369 100644 --- a/src/test/run-pass/unboxed-closures-move-some-upvars-in-by-ref-closure.rs +++ b/src/test/run-pass/unboxed-closures-move-some-upvars-in-by-ref-closure.rs @@ -11,6 +11,8 @@ // Test that in a by-ref once closure we move some variables even as // we capture others by mutable reference. +// pretty-expanded FIXME #23616 + fn call(f: F) where F : FnOnce() { f(); } diff --git a/src/test/run-pass/unboxed-closures-prelude.rs b/src/test/run-pass/unboxed-closures-prelude.rs index 61070abdcbe5b..e8c977b4ed1d7 100644 --- a/src/test/run-pass/unboxed-closures-prelude.rs +++ b/src/test/run-pass/unboxed-closures-prelude.rs @@ -10,6 +10,8 @@ // Tests that the reexports of `FnOnce` et al from the prelude work. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] #![feature(unboxed_closures, core)] diff --git a/src/test/run-pass/unboxed-closures-simple.rs b/src/test/run-pass/unboxed-closures-simple.rs index 9f29e75be7cca..9335bc936d942 100644 --- a/src/test/run-pass/unboxed-closures-simple.rs +++ b/src/test/run-pass/unboxed-closures-simple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-single-word-env.rs b/src/test/run-pass/unboxed-closures-single-word-env.rs index 84544d6d24b35..1517698fc82dc 100644 --- a/src/test/run-pass/unboxed-closures-single-word-env.rs +++ b/src/test/run-pass/unboxed-closures-single-word-env.rs @@ -11,6 +11,8 @@ // Ensures that single-word environments work right in unboxed closures. // These take a different path in codegen. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn a int>(f: F) -> int { diff --git a/src/test/run-pass/unboxed-closures-static-call-fn-once.rs b/src/test/run-pass/unboxed-closures-static-call-fn-once.rs index 1f5481ccde955..e90a3443610cb 100644 --- a/src/test/run-pass/unboxed-closures-static-call-fn-once.rs +++ b/src/test/run-pass/unboxed-closures-static-call-fn-once.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn main() { diff --git a/src/test/run-pass/unboxed-closures-sugar-object.rs b/src/test/run-pass/unboxed-closures-sugar-object.rs index fff841a2f052d..77beeb13fb029 100644 --- a/src/test/run-pass/unboxed-closures-sugar-object.rs +++ b/src/test/run-pass/unboxed-closures-sugar-object.rs @@ -10,6 +10,8 @@ // Test unboxed closure sugar used in object types. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] #![feature(unboxed_closures)] diff --git a/src/test/run-pass/unboxed-closures-unique-type-id.rs b/src/test/run-pass/unboxed-closures-unique-type-id.rs index ce05f077357f8..e827833bbb210 100644 --- a/src/test/run-pass/unboxed-closures-unique-type-id.rs +++ b/src/test/run-pass/unboxed-closures-unique-type-id.rs @@ -19,6 +19,8 @@ // // compile-flags: -g +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] use std::ptr; diff --git a/src/test/run-pass/unboxed-closures-zero-args.rs b/src/test/run-pass/unboxed-closures-zero-args.rs index c81b0515aec6b..cb3a18a18c13a 100644 --- a/src/test/run-pass/unboxed-closures-zero-args.rs +++ b/src/test/run-pass/unboxed-closures-zero-args.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] fn main() { diff --git a/src/test/run-pass/unfold-cross-crate.rs b/src/test/run-pass/unfold-cross-crate.rs index 4ad3f0e591b88..a0c2b6c0a2202 100644 --- a/src/test/run-pass/unfold-cross-crate.rs +++ b/src/test/run-pass/unfold-cross-crate.rs @@ -10,6 +10,8 @@ // no-pretty-expanded FIXME #15189 +// pretty-expanded FIXME #23616 + #![feature(core)] use std::iter::Unfold; diff --git a/src/test/run-pass/unify-return-ty.rs b/src/test/run-pass/unify-return-ty.rs index 1a65f685a5e82..b8184b62db1e3 100644 --- a/src/test/run-pass/unify-return-ty.rs +++ b/src/test/run-pass/unify-return-ty.rs @@ -12,6 +12,8 @@ // unified with the type *T, and so the type variable // in that type gets resolved. +// pretty-expanded FIXME #23616 + use std::mem; fn null() -> *const T { diff --git a/src/test/run-pass/uninit-empty-types.rs b/src/test/run-pass/uninit-empty-types.rs index a0cf984cbb901..8c69704b3bd19 100644 --- a/src/test/run-pass/uninit-empty-types.rs +++ b/src/test/run-pass/uninit-empty-types.rs @@ -10,6 +10,8 @@ // Test the uninit() construct returning various empty types. +// pretty-expanded FIXME #23616 + use std::mem; #[derive(Clone)] diff --git a/src/test/run-pass/uniq-self-in-mut-slot.rs b/src/test/run-pass/uniq-self-in-mut-slot.rs index d44a8cdcc2475..49f552edd8392 100644 --- a/src/test/run-pass/uniq-self-in-mut-slot.rs +++ b/src/test/run-pass/uniq-self-in-mut-slot.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-assign-copy.rs b/src/test/run-pass/unique-assign-copy.rs index 78578bdb3c3a1..32a0713ca9397 100644 --- a/src/test/run-pass/unique-assign-copy.rs +++ b/src/test/run-pass/unique-assign-copy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-assign-drop.rs b/src/test/run-pass/unique-assign-drop.rs index 9edd83d2c7cb9..715fa548a7d76 100644 --- a/src/test/run-pass/unique-assign-drop.rs +++ b/src/test/run-pass/unique-assign-drop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_assignment)] #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-assign-generic.rs b/src/test/run-pass/unique-assign-generic.rs index 64f8b998096ed..ca145479a381f 100644 --- a/src/test/run-pass/unique-assign-generic.rs +++ b/src/test/run-pass/unique-assign-generic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-assign.rs b/src/test/run-pass/unique-assign.rs index c9cbaf27c4f2f..e4e7b69671b82 100644 --- a/src/test/run-pass/unique-assign.rs +++ b/src/test/run-pass/unique-assign.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-autoderef-field.rs b/src/test/run-pass/unique-autoderef-field.rs index 3bab3a6b79a11..290adcfb0149d 100644 --- a/src/test/run-pass/unique-autoderef-field.rs +++ b/src/test/run-pass/unique-autoderef-field.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-autoderef-index.rs b/src/test/run-pass/unique-autoderef-index.rs index 1c94447392160..9dc98cf2e3c47 100644 --- a/src/test/run-pass/unique-autoderef-index.rs +++ b/src/test/run-pass/unique-autoderef-index.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-cmp.rs b/src/test/run-pass/unique-cmp.rs index 8fe86455b4525..be7e46c8699d7 100644 --- a/src/test/run-pass/unique-cmp.rs +++ b/src/test/run-pass/unique-cmp.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-containing-tag.rs b/src/test/run-pass/unique-containing-tag.rs index cb6e84ae1aa73..21433d6c39bfc 100644 --- a/src/test/run-pass/unique-containing-tag.rs +++ b/src/test/run-pass/unique-containing-tag.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-create.rs b/src/test/run-pass/unique-create.rs index 7264b9fee9524..8469ae702009a 100644 --- a/src/test/run-pass/unique-create.rs +++ b/src/test/run-pass/unique-create.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-decl-init-copy.rs b/src/test/run-pass/unique-decl-init-copy.rs index 14bb72f4412be..0840f1308cc1f 100644 --- a/src/test/run-pass/unique-decl-init-copy.rs +++ b/src/test/run-pass/unique-decl-init-copy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-decl-init.rs b/src/test/run-pass/unique-decl-init.rs index 803e7ba16ed40..1d5a44f45abba 100644 --- a/src/test/run-pass/unique-decl-init.rs +++ b/src/test/run-pass/unique-decl-init.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-decl-move.rs b/src/test/run-pass/unique-decl-move.rs index 360adaa638f96..203a30e76bc1a 100644 --- a/src/test/run-pass/unique-decl-move.rs +++ b/src/test/run-pass/unique-decl-move.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-decl.rs b/src/test/run-pass/unique-decl.rs index a902fef288f00..6c8177e6cd8b3 100644 --- a/src/test/run-pass/unique-decl.rs +++ b/src/test/run-pass/unique-decl.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let _: Box; } diff --git a/src/test/run-pass/unique-deref.rs b/src/test/run-pass/unique-deref.rs index 1c1228f924145..44681742a7041 100644 --- a/src/test/run-pass/unique-deref.rs +++ b/src/test/run-pass/unique-deref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-destructure.rs b/src/test/run-pass/unique-destructure.rs index 9e71e850b3d4f..92fa8d7af6656 100644 --- a/src/test/run-pass/unique-destructure.rs +++ b/src/test/run-pass/unique-destructure.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-drop-complex.rs b/src/test/run-pass/unique-drop-complex.rs index 745a55e06510f..056acd162082b 100644 --- a/src/test/run-pass/unique-drop-complex.rs +++ b/src/test/run-pass/unique-drop-complex.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-fn-arg-move.rs b/src/test/run-pass/unique-fn-arg-move.rs index 1b3f7e72a4d61..c79dc6a6cfdb3 100644 --- a/src/test/run-pass/unique-fn-arg-move.rs +++ b/src/test/run-pass/unique-fn-arg-move.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-fn-arg-mut.rs b/src/test/run-pass/unique-fn-arg-mut.rs index e1d148cc9a555..82d724831c335 100644 --- a/src/test/run-pass/unique-fn-arg-mut.rs +++ b/src/test/run-pass/unique-fn-arg-mut.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-fn-arg.rs b/src/test/run-pass/unique-fn-arg.rs index 301994a74a85a..a4687cae65360 100644 --- a/src/test/run-pass/unique-fn-arg.rs +++ b/src/test/run-pass/unique-fn-arg.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-fn-ret.rs b/src/test/run-pass/unique-fn-ret.rs index de2c265089bed..5e248ebeb3328 100644 --- a/src/test/run-pass/unique-fn-ret.rs +++ b/src/test/run-pass/unique-fn-ret.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-generic-assign.rs b/src/test/run-pass/unique-generic-assign.rs index 58470637a11e5..2da3b9f05f68e 100644 --- a/src/test/run-pass/unique-generic-assign.rs +++ b/src/test/run-pass/unique-generic-assign.rs @@ -11,6 +11,8 @@ // Issue #976 +// pretty-expanded FIXME #23616 + fn f(x: Box) { let _x2 = x; } diff --git a/src/test/run-pass/unique-in-vec-copy.rs b/src/test/run-pass/unique-in-vec-copy.rs index 20bf4bef1714d..129c0784cca5e 100644 --- a/src/test/run-pass/unique-in-vec-copy.rs +++ b/src/test/run-pass/unique-in-vec-copy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-in-vec.rs b/src/test/run-pass/unique-in-vec.rs index c24ec8fe44a3c..dc94fa6ca4fce 100644 --- a/src/test/run-pass/unique-in-vec.rs +++ b/src/test/run-pass/unique-in-vec.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-init.rs b/src/test/run-pass/unique-init.rs index 44e8703aaf2fe..bd7a64952604c 100644 --- a/src/test/run-pass/unique-init.rs +++ b/src/test/run-pass/unique-init.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-kinds.rs b/src/test/run-pass/unique-kinds.rs index 6bb1fdcf5627a..96d54193ac86d 100644 --- a/src/test/run-pass/unique-kinds.rs +++ b/src/test/run-pass/unique-kinds.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-match-discrim.rs b/src/test/run-pass/unique-match-discrim.rs index 93614e86c7303..1b0392341e72d 100644 --- a/src/test/run-pass/unique-match-discrim.rs +++ b/src/test/run-pass/unique-match-discrim.rs @@ -10,6 +10,8 @@ // Issue #961 +// pretty-expanded FIXME #23616 + fn altsimple() { match Box::new(true) { _ => { } diff --git a/src/test/run-pass/unique-move-drop.rs b/src/test/run-pass/unique-move-drop.rs index 126cc646833a1..e81095d548e07 100644 --- a/src/test/run-pass/unique-move-drop.rs +++ b/src/test/run-pass/unique-move-drop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_variable)] #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-move-temp.rs b/src/test/run-pass/unique-move-temp.rs index 9ac5e86f87b54..634a1569acffd 100644 --- a/src/test/run-pass/unique-move-temp.rs +++ b/src/test/run-pass/unique-move-temp.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-move.rs b/src/test/run-pass/unique-move.rs index a54b343f2fa3d..29bf113926572 100644 --- a/src/test/run-pass/unique-move.rs +++ b/src/test/run-pass/unique-move.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-mutable.rs b/src/test/run-pass/unique-mutable.rs index ca01c07ab8043..106481e3189ee 100644 --- a/src/test/run-pass/unique-mutable.rs +++ b/src/test/run-pass/unique-mutable.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-object-move.rs b/src/test/run-pass/unique-object-move.rs index f01a56142e073..0677e6a8df3ca 100644 --- a/src/test/run-pass/unique-object-move.rs +++ b/src/test/run-pass/unique-object-move.rs @@ -10,6 +10,8 @@ // Issue #5192 +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-pat-2.rs b/src/test/run-pass/unique-pat-2.rs index 8141e3bce3c24..9063f15e7e73e 100644 --- a/src/test/run-pass/unique-pat-2.rs +++ b/src/test/run-pass/unique-pat-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-pat.rs b/src/test/run-pass/unique-pat.rs index bff2d4e917fae..ae76179b5ec22 100644 --- a/src/test/run-pass/unique-pat.rs +++ b/src/test/run-pass/unique-pat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-rec.rs b/src/test/run-pass/unique-rec.rs index c20604406b94c..6770fa5fb16ec 100644 --- a/src/test/run-pass/unique-rec.rs +++ b/src/test/run-pass/unique-rec.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-send-2.rs b/src/test/run-pass/unique-send-2.rs index e0785779ab3c2..1fb39ee8ca702 100644 --- a/src/test/run-pass/unique-send-2.rs +++ b/src/test/run-pass/unique-send-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-send.rs b/src/test/run-pass/unique-send.rs index 72022afe5fd99..c9649ef60d303 100644 --- a/src/test/run-pass/unique-send.rs +++ b/src/test/run-pass/unique-send.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unique-swap.rs b/src/test/run-pass/unique-swap.rs index 1315e44381622..454011a9ec31e 100644 --- a/src/test/run-pass/unique-swap.rs +++ b/src/test/run-pass/unique-swap.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unit-like-struct-drop-run.rs b/src/test/run-pass/unit-like-struct-drop-run.rs index b035cb89c3649..9e1ced364024f 100644 --- a/src/test/run-pass/unit-like-struct-drop-run.rs +++ b/src/test/run-pass/unit-like-struct-drop-run.rs @@ -10,6 +10,8 @@ // Make sure the destructor is run for unit-like structs. +// pretty-expanded FIXME #23616 + #![feature(alloc)] use std::boxed::BoxAny; diff --git a/src/test/run-pass/unit.rs b/src/test/run-pass/unit.rs index 3b52dcce4bf61..2679c4c033121 100644 --- a/src/test/run-pass/unit.rs +++ b/src/test/run-pass/unit.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_variable)] #![allow(dead_assignment)] diff --git a/src/test/run-pass/unnamed_argument_mode.rs b/src/test/run-pass/unnamed_argument_mode.rs index d22a6652e16f3..64a6d40f2c8de 100644 --- a/src/test/run-pass/unnamed_argument_mode.rs +++ b/src/test/run-pass/unnamed_argument_mode.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn good(_a: &int) { } diff --git a/src/test/run-pass/unreachable-code-1.rs b/src/test/run-pass/unreachable-code-1.rs index d8a8913e58ad9..612beabb03586 100644 --- a/src/test/run-pass/unreachable-code-1.rs +++ b/src/test/run-pass/unreachable-code-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unreachable_code)] #![allow(unused_variable)] diff --git a/src/test/run-pass/unreachable-code.rs b/src/test/run-pass/unreachable-code.rs index a28dc2c1f1599..4f58df66256be 100644 --- a/src/test/run-pass/unreachable-code.rs +++ b/src/test/run-pass/unreachable-code.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(path_statement)] #![allow(unreachable_code)] #![allow(unused_variable)] diff --git a/src/test/run-pass/unsafe-coercion.rs b/src/test/run-pass/unsafe-coercion.rs index 06980e162c83b..d0c633e8278ea 100644 --- a/src/test/run-pass/unsafe-coercion.rs +++ b/src/test/run-pass/unsafe-coercion.rs @@ -10,6 +10,8 @@ // Check that safe fns are not a subtype of unsafe fns. +// pretty-expanded FIXME #23616 + fn foo(x: i32) -> i32 { x * 22 } diff --git a/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs b/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs index 4ce3f2c53b3e0..f3a2ad749a168 100644 --- a/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs +++ b/src/test/run-pass/unsafe-fn-called-from-unsafe-blk.rs @@ -11,6 +11,8 @@ // // See also: compile-fail/unsafe-fn-called-from-safe.rs +// pretty-expanded FIXME #23616 + unsafe fn f() { return; } fn g() { diff --git a/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs b/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs index e68b868a24694..37c72ba8ab065 100644 --- a/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs +++ b/src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs @@ -11,6 +11,8 @@ // // See also: compile-fail/unsafe-fn-called-from-safe.rs +// pretty-expanded FIXME #23616 + unsafe fn f() { return; } unsafe fn g() { diff --git a/src/test/run-pass/unsafe-pointer-assignability.rs b/src/test/run-pass/unsafe-pointer-assignability.rs index 7a624109a5507..171f4cb8a891a 100644 --- a/src/test/run-pass/unsafe-pointer-assignability.rs +++ b/src/test/run-pass/unsafe-pointer-assignability.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn f(x: *const int) { unsafe { assert_eq!(*x, 3); diff --git a/src/test/run-pass/unsized.rs b/src/test/run-pass/unsized.rs index 1a479d05d5093..8ff8169ef497c 100644 --- a/src/test/run-pass/unsized.rs +++ b/src/test/run-pass/unsized.rs @@ -10,6 +10,8 @@ // Test syntax checks for `?Sized` syntax. +// pretty-expanded FIXME #23616 + use std::marker::{PhantomData, PhantomFn}; trait T1 : PhantomFn { } diff --git a/src/test/run-pass/unsized2.rs b/src/test/run-pass/unsized2.rs index e0d37ff40de59..9eee782a630ca 100644 --- a/src/test/run-pass/unsized2.rs +++ b/src/test/run-pass/unsized2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unsized3.rs b/src/test/run-pass/unsized3.rs index de5e356f8cd5b..8db294bdcc1c0 100644 --- a/src/test/run-pass/unsized3.rs +++ b/src/test/run-pass/unsized3.rs @@ -10,6 +10,8 @@ // Test structs with always-unsized fields. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax, core)] diff --git a/src/test/run-pass/unused-move-capture.rs b/src/test/run-pass/unused-move-capture.rs index 9f20426aa218e..b155620e5196c 100644 --- a/src/test/run-pass/unused-move-capture.rs +++ b/src/test/run-pass/unused-move-capture.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unused-move.rs b/src/test/run-pass/unused-move.rs index 57534feec3121..015b6f80946f8 100644 --- a/src/test/run-pass/unused-move.rs +++ b/src/test/run-pass/unused-move.rs @@ -12,6 +12,8 @@ // Issue Name: Unused move causes a crash // Abstract: zero-fill to block after drop +// pretty-expanded FIXME #23616 + #![allow(path_statement)] #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs index b7229a00480cb..1d6ce626c28c5 100644 --- a/src/test/run-pass/unwind-unique.rs +++ b/src/test/run-pass/unwind-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/use-crate-name-alias.rs b/src/test/run-pass/use-crate-name-alias.rs index 4751b4666f1d5..2821de6f1e751 100644 --- a/src/test/run-pass/use-crate-name-alias.rs +++ b/src/test/run-pass/use-crate-name-alias.rs @@ -9,6 +9,8 @@ // except according to those terms. // Issue #1706 +// pretty-expanded FIXME #23616 + extern crate "std" as stdlib; pub fn main() {} diff --git a/src/test/run-pass/use-import-export.rs b/src/test/run-pass/use-import-export.rs index ec8033ff3b04e..2106da6d25f92 100644 --- a/src/test/run-pass/use-import-export.rs +++ b/src/test/run-pass/use-import-export.rs @@ -10,6 +10,8 @@ +// pretty-expanded FIXME #23616 + mod foo { pub fn x() -> int { return 1; } } diff --git a/src/test/run-pass/use-mod.rs b/src/test/run-pass/use-mod.rs index cca9c8f2df422..49ad171eaa2b6 100644 --- a/src/test/run-pass/use-mod.rs +++ b/src/test/run-pass/use-mod.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub use foo::bar::{self, First}; use self::bar::Second; diff --git a/src/test/run-pass/use-trait-before-def.rs b/src/test/run-pass/use-trait-before-def.rs index 0b59ced98c908..5f44b5723610d 100644 --- a/src/test/run-pass/use-trait-before-def.rs +++ b/src/test/run-pass/use-trait-before-def.rs @@ -10,6 +10,8 @@ // Issue #1761 +// pretty-expanded FIXME #23616 + impl foo for int { fn foo(&self) -> int { 10 } } trait foo { fn foo(&self) -> int; } pub fn main() {} diff --git a/src/test/run-pass/use.rs b/src/test/run-pass/use.rs index c25cd15b2cd4b..446bb4a148e9e 100644 --- a/src/test/run-pass/use.rs +++ b/src/test/run-pass/use.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unused_imports)] #![feature(start, no_std)] #![no_std] diff --git a/src/test/run-pass/use_inline_dtor.rs b/src/test/run-pass/use_inline_dtor.rs index 18cb478be38fd..0f55a357a00f4 100644 --- a/src/test/run-pass/use_inline_dtor.rs +++ b/src/test/run-pass/use_inline_dtor.rs @@ -10,6 +10,8 @@ // aux-build:inline_dtor.rs +// pretty-expanded FIXME #23616 + extern crate inline_dtor; pub fn main() { diff --git a/src/test/run-pass/variadic-ffi.rs b/src/test/run-pass/variadic-ffi.rs index badd8b898775a..1688482ca3760 100644 --- a/src/test/run-pass/variadic-ffi.rs +++ b/src/test/run-pass/variadic-ffi.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc, std_misc)] extern crate libc; diff --git a/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs b/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs index fe1deba7b0d01..e21ea025d8ff4 100644 --- a/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs +++ b/src/test/run-pass/variance-intersection-of-ref-and-opt-ref.rs @@ -13,6 +13,8 @@ // us from approximating the lifetimes of `field1` and `field2` to a // common intersection. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] #![feature(core)] diff --git a/src/test/run-pass/variance-trait-matching.rs b/src/test/run-pass/variance-trait-matching.rs index d46ffa801836f..5a179bfc7d47f 100644 --- a/src/test/run-pass/variance-trait-matching.rs +++ b/src/test/run-pass/variance-trait-matching.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] // Get is covariant in T diff --git a/src/test/run-pass/variance-vec-covariant.rs b/src/test/run-pass/variance-vec-covariant.rs index 9e98ca0be3b14..2f554c3c4f3f5 100644 --- a/src/test/run-pass/variance-vec-covariant.rs +++ b/src/test/run-pass/variance-vec-covariant.rs @@ -10,6 +10,8 @@ // Test that vec is now covariant in its argument type. +// pretty-expanded FIXME #23616 + #![allow(dead_code)] #![feature(core)] diff --git a/src/test/run-pass/variant-attributes.rs b/src/test/run-pass/variant-attributes.rs index 16dca2db396e7..18987d1e016b1 100644 --- a/src/test/run-pass/variant-attributes.rs +++ b/src/test/run-pass/variant-attributes.rs @@ -9,6 +9,8 @@ // except according to those terms. // pp-exact - Make sure we actually print the attributes +// pretty-expanded FIXME #23616 + #![feature(custom_attribute)] enum crew_of_enterprise_d { diff --git a/src/test/run-pass/variant-structs-trivial.rs b/src/test/run-pass/variant-structs-trivial.rs index e078fa1485d14..34c9fb5038a58 100644 --- a/src/test/run-pass/variant-structs-trivial.rs +++ b/src/test/run-pass/variant-structs-trivial.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + enum Foo { Bar { x: int }, Baz { y: int } diff --git a/src/test/run-pass/vec-dst.rs b/src/test/run-pass/vec-dst.rs index 40073c2b74219..23b1ff7417e40 100644 --- a/src/test/run-pass/vec-dst.rs +++ b/src/test/run-pass/vec-dst.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/vec-fixed-length.rs b/src/test/run-pass/vec-fixed-length.rs index a0b3564d84e17..bd196aa4e4e66 100644 --- a/src/test/run-pass/vec-fixed-length.rs +++ b/src/test/run-pass/vec-fixed-length.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::mem::size_of; pub fn main() { diff --git a/src/test/run-pass/vec-growth.rs b/src/test/run-pass/vec-growth.rs index b8626b9c8a9d6..d5e6a9c424515 100644 --- a/src/test/run-pass/vec-growth.rs +++ b/src/test/run-pass/vec-growth.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let mut v = vec!(1); v.push(2); diff --git a/src/test/run-pass/vec-macro-no-std.rs b/src/test/run-pass/vec-macro-no-std.rs index a0e789674d239..360cecb9e6a8a 100644 --- a/src/test/run-pass/vec-macro-no-std.rs +++ b/src/test/run-pass/vec-macro-no-std.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(lang_items, start, no_std, core, libc, collections)] #![no_std] diff --git a/src/test/run-pass/vec-macro-repeat.rs b/src/test/run-pass/vec-macro-repeat.rs index 76e7b92ea046b..2a83ccaba82e2 100644 --- a/src/test/run-pass/vec-macro-repeat.rs +++ b/src/test/run-pass/vec-macro-repeat.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert_eq!(vec![1; 3], vec![1, 1, 1]); assert_eq!(vec![1; 2], vec![1, 1]); diff --git a/src/test/run-pass/vec-macro-rvalue-scope.rs b/src/test/run-pass/vec-macro-rvalue-scope.rs index 68dedfc6a2e63..5869558eacaff 100644 --- a/src/test/run-pass/vec-macro-rvalue-scope.rs +++ b/src/test/run-pass/vec-macro-rvalue-scope.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn one() -> i32 { 1 } // Make sure the vec![...] macro doesn't introduce hidden rvalue diff --git a/src/test/run-pass/vec-macro-with-brackets.rs b/src/test/run-pass/vec-macro-with-brackets.rs index 5d1f43fb230ed..cccf807572a42 100644 --- a/src/test/run-pass/vec-macro-with-brackets.rs +++ b/src/test/run-pass/vec-macro-with-brackets.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + macro_rules! vec [ ($($e:expr),*) => ({ let mut _temp = ::std::vec::Vec::new(); diff --git a/src/test/run-pass/vec-macro-with-trailing-comma.rs b/src/test/run-pass/vec-macro-with-trailing-comma.rs index 07033d6049747..3018a746b4a9d 100644 --- a/src/test/run-pass/vec-macro-with-trailing-comma.rs +++ b/src/test/run-pass/vec-macro-with-trailing-comma.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert_eq!(vec!(1), vec!(1,)); assert_eq!(vec!(1, 2, 3), vec!(1, 2, 3,)); diff --git a/src/test/run-pass/vec-matching-autoslice.rs b/src/test/run-pass/vec-matching-autoslice.rs index 4ed73dc230181..8f38123fe2852 100644 --- a/src/test/run-pass/vec-matching-autoslice.rs +++ b/src/test/run-pass/vec-matching-autoslice.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let x = [1, 2, 3]; match x { diff --git a/src/test/run-pass/vec-matching-fixed.rs b/src/test/run-pass/vec-matching-fixed.rs index 6ef1dc4ea2634..b03a9a64b21be 100644 --- a/src/test/run-pass/vec-matching-fixed.rs +++ b/src/test/run-pass/vec-matching-fixed.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(advanced_slice_patterns)] fn a() { diff --git a/src/test/run-pass/vec-matching-fold.rs b/src/test/run-pass/vec-matching-fold.rs index e72170cb7303c..494a9d658a1d7 100644 --- a/src/test/run-pass/vec-matching-fold.rs +++ b/src/test/run-pass/vec-matching-fold.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(advanced_slice_patterns)] fn foldl(values: &[T], diff --git a/src/test/run-pass/vec-matching.rs b/src/test/run-pass/vec-matching.rs index 8dcf4612f47eb..306d200319dc2 100644 --- a/src/test/run-pass/vec-matching.rs +++ b/src/test/run-pass/vec-matching.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(advanced_slice_patterns)] fn a() { diff --git a/src/test/run-pass/vec-push.rs b/src/test/run-pass/vec-push.rs index 33f01c5bd41c8..b69bd53cb8c4d 100644 --- a/src/test/run-pass/vec-push.rs +++ b/src/test/run-pass/vec-push.rs @@ -8,4 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let mut v = vec!(1, 2, 3); v.push(1); } diff --git a/src/test/run-pass/vec-repeat-with-cast.rs b/src/test/run-pass/vec-repeat-with-cast.rs index 22ca6c37a8e6c..11a96ca533f3c 100644 --- a/src/test/run-pass/vec-repeat-with-cast.rs +++ b/src/test/run-pass/vec-repeat-with-cast.rs @@ -8,4 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let _a = [0; 1 as uint]; } diff --git a/src/test/run-pass/vec-slice-drop.rs b/src/test/run-pass/vec-slice-drop.rs index 498ec0e8fbaf1..25dc5db5a6071 100644 --- a/src/test/run-pass/vec-slice-drop.rs +++ b/src/test/run-pass/vec-slice-drop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_destructor)] use std::cell::Cell; diff --git a/src/test/run-pass/vec-slice.rs b/src/test/run-pass/vec-slice.rs index 5375e54e27f26..6baeb99df9e8c 100644 --- a/src/test/run-pass/vec-slice.rs +++ b/src/test/run-pass/vec-slice.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let v = vec![1,2,3,4,5]; let v2 = &v[1..3]; diff --git a/src/test/run-pass/vec-tail-matching.rs b/src/test/run-pass/vec-tail-matching.rs index 401d629c3821b..3ee0cf33e432c 100644 --- a/src/test/run-pass/vec-tail-matching.rs +++ b/src/test/run-pass/vec-tail-matching.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + struct Foo { string: String } diff --git a/src/test/run-pass/vec-to_str.rs b/src/test/run-pass/vec-to_str.rs index 5d132b2a7491f..d34c6bd4d0b59 100644 --- a/src/test/run-pass/vec-to_str.rs +++ b/src/test/run-pass/vec-to_str.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { assert_eq!(format!("{:?}", vec!(0, 1)), "[0, 1]".to_string()); diff --git a/src/test/run-pass/vec.rs b/src/test/run-pass/vec.rs index 5e19868de1ddd..ff4077b249de7 100644 --- a/src/test/run-pass/vec.rs +++ b/src/test/run-pass/vec.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let v: Vec = vec!(10, 20); assert_eq!(v[0], 10); diff --git a/src/test/run-pass/vector-no-ann-2.rs b/src/test/run-pass/vector-no-ann-2.rs index 6391893b9a484..eb5b75639d596 100644 --- a/src/test/run-pass/vector-no-ann-2.rs +++ b/src/test/run-pass/vector-no-ann-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![allow(unknown_features)] #![feature(box_syntax)] diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass/vector-sort-panic-safe.rs index c029aa234488f..09ecdf45b939e 100644 --- a/src/test/run-pass/vector-sort-panic-safe.rs +++ b/src/test/run-pass/vector-sort-panic-safe.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(rand, core)] use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; diff --git a/src/test/run-pass/visible-private-types-feature-gate.rs b/src/test/run-pass/visible-private-types-feature-gate.rs index 3060c12d39aa6..4aa0867ae478e 100644 --- a/src/test/run-pass/visible-private-types-feature-gate.rs +++ b/src/test/run-pass/visible-private-types-feature-gate.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(visible_private_types)] trait Foo { fn dummy(&self) { } } diff --git a/src/test/run-pass/wait-forked-but-failed-child.rs b/src/test/run-pass/wait-forked-but-failed-child.rs index 5637263e93592..079c97013abee 100644 --- a/src/test/run-pass/wait-forked-but-failed-child.rs +++ b/src/test/run-pass/wait-forked-but-failed-child.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(libc, old_io)] extern crate libc; diff --git a/src/test/run-pass/warn-ctypes-inhibit.rs b/src/test/run-pass/warn-ctypes-inhibit.rs index 73121918259a7..c22a584f6d455 100644 --- a/src/test/run-pass/warn-ctypes-inhibit.rs +++ b/src/test/run-pass/warn-ctypes-inhibit.rs @@ -10,6 +10,8 @@ // compile-flags:-D improper-ctypes +// pretty-expanded FIXME #23616 + #![allow(improper_ctypes)] mod libc { diff --git a/src/test/run-pass/weak-lang-item.rs b/src/test/run-pass/weak-lang-item.rs index 741e8be02f72c..ec346a248a99f 100644 --- a/src/test/run-pass/weak-lang-item.rs +++ b/src/test/run-pass/weak-lang-item.rs @@ -10,6 +10,8 @@ // aux-build:weak-lang-items.rs +// pretty-expanded FIXME #23616 + extern crate "weak-lang-items" as other; use std::thread; diff --git a/src/test/run-pass/wf-bound-region-in-object-type.rs b/src/test/run-pass/wf-bound-region-in-object-type.rs index 256b199d72920..47066232b870f 100644 --- a/src/test/run-pass/wf-bound-region-in-object-type.rs +++ b/src/test/run-pass/wf-bound-region-in-object-type.rs @@ -11,6 +11,8 @@ // Test that the `wf` checker properly handles bound regions in object // types. Compiling this code used to trigger an ICE. +// pretty-expanded FIXME #23616 + pub struct Context<'tcx> { vec: &'tcx Vec } diff --git a/src/test/run-pass/where-clause-bounds-inconsistency.rs b/src/test/run-pass/where-clause-bounds-inconsistency.rs index 3374f47ed5f80..d4823b8a33cc5 100644 --- a/src/test/run-pass/where-clause-bounds-inconsistency.rs +++ b/src/test/run-pass/where-clause-bounds-inconsistency.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Bound { fn dummy(&self) { } } diff --git a/src/test/run-pass/where-clause-early-bound-lifetimes.rs b/src/test/run-pass/where-clause-early-bound-lifetimes.rs index 4a149d4d3df44..c73e5a774eb42 100644 --- a/src/test/run-pass/where-clause-early-bound-lifetimes.rs +++ b/src/test/run-pass/where-clause-early-bound-lifetimes.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait TheTrait { fn dummy(&self) { } } impl TheTrait for &'static int { } diff --git a/src/test/run-pass/where-clause-method-substituion.rs b/src/test/run-pass/where-clause-method-substituion.rs index e2280f0b07b78..d7aaa0b2f9ca3 100644 --- a/src/test/run-pass/where-clause-method-substituion.rs +++ b/src/test/run-pass/where-clause-method-substituion.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + trait Foo { fn dummy(&self, arg: T) { } } trait Bar { diff --git a/src/test/run-pass/where-clause-region-outlives.rs b/src/test/run-pass/where-clause-region-outlives.rs index aa39325277e7c..1972b11d2cb64 100644 --- a/src/test/run-pass/where-clause-region-outlives.rs +++ b/src/test/run-pass/where-clause-region-outlives.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + struct A<'a, 'b> where 'a : 'b { x: &'a int, y: &'b int } fn main() { diff --git a/src/test/run-pass/where-clauses-lifetimes.rs b/src/test/run-pass/where-clauses-lifetimes.rs index e3ea7cd80e78d..2803890d9d1b2 100644 --- a/src/test/run-pass/where-clauses-lifetimes.rs +++ b/src/test/run-pass/where-clauses-lifetimes.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn foo<'a, I>(mut it: I) where I: Iterator {} fn main() { diff --git a/src/test/run-pass/where-clauses-unboxed-closures.rs b/src/test/run-pass/where-clauses-unboxed-closures.rs index dbff4b9599b78..c509cbe2a5e99 100644 --- a/src/test/run-pass/where-clauses-unboxed-closures.rs +++ b/src/test/run-pass/where-clauses-unboxed-closures.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unboxed_closures)] struct Bencher; diff --git a/src/test/run-pass/where-for-self.rs b/src/test/run-pass/where-for-self.rs index 4e841029a6b20..8535d76d4714c 100644 --- a/src/test/run-pass/where-for-self.rs +++ b/src/test/run-pass/where-for-self.rs @@ -11,6 +11,8 @@ // Test that we can quantify lifetimes outside a constraint (i.e., including // the self type) in a where clause. +// pretty-expanded FIXME #23616 + use std::marker::PhantomFn; static mut COUNT: u32 = 1; diff --git a/src/test/run-pass/while-flow-graph.rs b/src/test/run-pass/while-flow-graph.rs index 8239afb3594d6..3ea075d158693 100644 --- a/src/test/run-pass/while-flow-graph.rs +++ b/src/test/run-pass/while-flow-graph.rs @@ -10,4 +10,6 @@ +// pretty-expanded FIXME #23616 + pub fn main() { let x: int = 10; while x == 10 && x == 11 { let _y = 0xf00_usize; } } diff --git a/src/test/run-pass/while-label.rs b/src/test/run-pass/while-label.rs index 4a3cd115d2043..076ba8f428f06 100644 --- a/src/test/run-pass/while-label.rs +++ b/src/test/run-pass/while-label.rs @@ -9,6 +9,8 @@ // except according to those terms. +// pretty-expanded FIXME #23616 + pub fn main() { let mut i = 100; 'w: while 1 + 1 == 2 { diff --git a/src/test/run-pass/while-let.rs b/src/test/run-pass/while-let.rs index e2352002c033b..fa45d084060bf 100644 --- a/src/test/run-pass/while-let.rs +++ b/src/test/run-pass/while-let.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] use std::collections::BinaryHeap; diff --git a/src/test/run-pass/while-prelude-drop.rs b/src/test/run-pass/while-prelude-drop.rs index 84808fff0fa72..b8473abb06db0 100644 --- a/src/test/run-pass/while-prelude-drop.rs +++ b/src/test/run-pass/while-prelude-drop.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(collections)] use std::string::String; diff --git a/src/test/run-pass/writealias.rs b/src/test/run-pass/writealias.rs index dacfeb0081925..874360e6399d7 100644 --- a/src/test/run-pass/writealias.rs +++ b/src/test/run-pass/writealias.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + use std::sync::Mutex; struct Point {x: int, y: int, z: int} diff --git a/src/test/run-pass/x86stdcall.rs b/src/test/run-pass/x86stdcall.rs index b884adb7a6ec3..4a58c67d0ecc3 100644 --- a/src/test/run-pass/x86stdcall.rs +++ b/src/test/run-pass/x86stdcall.rs @@ -10,6 +10,8 @@ // GetLastError doesn't seem to work with stack switching +// pretty-expanded FIXME #23616 + #[cfg(windows)] mod kernel32 { extern "system" { diff --git a/src/test/run-pass/x86stdcall2.rs b/src/test/run-pass/x86stdcall2.rs index b5b9d95d87f8c..b359251a394cd 100644 --- a/src/test/run-pass/x86stdcall2.rs +++ b/src/test/run-pass/x86stdcall2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + pub type HANDLE = u32; pub type DWORD = u32; pub type SIZE_T = u32; diff --git a/src/test/run-pass/xcrate-address-insignificant.rs b/src/test/run-pass/xcrate-address-insignificant.rs index 236ff0838e590..f133396a72592 100644 --- a/src/test/run-pass/xcrate-address-insignificant.rs +++ b/src/test/run-pass/xcrate-address-insignificant.rs @@ -10,6 +10,8 @@ // aux-build:xcrate_address_insignificant.rs +// pretty-expanded FIXME #23616 + extern crate "xcrate_address_insignificant" as foo; pub fn main() { diff --git a/src/test/run-pass/xcrate-static-addresses.rs b/src/test/run-pass/xcrate-static-addresses.rs index 6afa02fce5514..43bae9c7ce072 100644 --- a/src/test/run-pass/xcrate-static-addresses.rs +++ b/src/test/run-pass/xcrate-static-addresses.rs @@ -10,6 +10,8 @@ // aux-build:xcrate_static_addresses.rs +// pretty-expanded FIXME #23616 + extern crate xcrate_static_addresses; use xcrate_static_addresses as other; diff --git a/src/test/run-pass/xcrate-trait-lifetime-param.rs b/src/test/run-pass/xcrate-trait-lifetime-param.rs index aa61237417e9e..016ebc777f1da 100644 --- a/src/test/run-pass/xcrate-trait-lifetime-param.rs +++ b/src/test/run-pass/xcrate-trait-lifetime-param.rs @@ -10,6 +10,8 @@ // aux-build:xcrate-trait-lifetime-param.rs +// pretty-expanded FIXME #23616 + extern crate "xcrate-trait-lifetime-param" as other; struct Reader<'a> { diff --git a/src/test/run-pass/xcrate-unit-struct.rs b/src/test/run-pass/xcrate-unit-struct.rs index 30b5f47b2ae2e..78e92053a1120 100644 --- a/src/test/run-pass/xcrate-unit-struct.rs +++ b/src/test/run-pass/xcrate-unit-struct.rs @@ -9,6 +9,8 @@ // except according to those terms. // aux-build:xcrate_unit_struct.rs +// pretty-expanded FIXME #23616 + extern crate xcrate_unit_struct; const s1: xcrate_unit_struct::Struct = xcrate_unit_struct::Struct; diff --git a/src/test/run-pass/zero-size-type-destructors.rs b/src/test/run-pass/zero-size-type-destructors.rs index f4d03a5cda400..76fe8150d3fca 100644 --- a/src/test/run-pass/zero-size-type-destructors.rs +++ b/src/test/run-pass/zero-size-type-destructors.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + #![feature(unsafe_no_drop_flag)] static mut destructions : int = 3; diff --git a/src/test/run-pass/zero_sized_subslice_match.rs b/src/test/run-pass/zero_sized_subslice_match.rs index 65882d39375c3..4cb7e40a4fbd1 100644 --- a/src/test/run-pass/zero_sized_subslice_match.rs +++ b/src/test/run-pass/zero_sized_subslice_match.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// pretty-expanded FIXME #23616 + fn main() { let x = [(), ()]; From 8389253df0431e58bfe0a8e0e3949d58ebe7400f Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Wed, 18 Mar 2015 09:14:54 -0700 Subject: [PATCH 59/69] Add generic conversion traits This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change] --- src/compiletest/compiletest.rs | 10 +- src/compiletest/header.rs | 4 +- src/compiletest/runtest.rs | 2 +- src/libcollections/borrow.rs | 11 +- src/libcollections/lib.rs | 1 + src/libcollections/slice.rs | 11 +- src/libcollections/str.rs | 28 ++-- src/libcollections/string.rs | 23 +++ src/libcollections/vec.rs | 52 ++++++- src/libcore/convert.rs | 113 +++++++++++++++ src/libcore/lib.rs | 1 + src/libcore/option.rs | 17 +++ src/libcore/prelude.rs | 1 + src/libcore/result.rs | 21 ++- src/libcore/slice.rs | 5 + src/libcore/str/mod.rs | 4 + src/libgraphviz/lib.rs | 1 + src/librustc/lib.rs | 2 + src/librustc/metadata/cstore.rs | 2 +- src/librustc/metadata/filesearch.rs | 6 +- src/librustc/metadata/loader.rs | 2 +- src/librustc/middle/traits/select.rs | 2 +- src/librustc/session/config.rs | 2 +- src/librustc/session/search_paths.rs | 2 +- src/librustc_back/archive.rs | 2 +- src/librustc_back/fs.rs | 2 +- src/librustc_back/lib.rs | 1 + src/librustc_back/rpath.rs | 2 +- src/librustc_back/target/mod.rs | 4 +- src/librustc_borrowck/lib.rs | 1 + src/librustc_driver/driver.rs | 6 +- src/librustc_driver/lib.rs | 13 +- src/librustc_lint/builtin.rs | 4 +- src/librustc_trans/back/link.rs | 8 +- src/librustc_trans/lib.rs | 1 + src/librustc_trans/save/mod.rs | 4 +- src/librustc_trans/trans/debuginfo.rs | 2 +- src/librustc_typeck/collect.rs | 8 +- src/librustdoc/clean/mod.rs | 2 +- src/librustdoc/externalfiles.rs | 2 +- src/librustdoc/html/render.rs | 6 +- src/librustdoc/lib.rs | 11 +- src/librustdoc/test.rs | 2 +- src/libserialize/lib.rs | 1 + src/libserialize/serialize.rs | 2 +- src/libstd/env.rs | 6 +- src/libstd/ffi/c_str.rs | 11 +- src/libstd/ffi/os_str.rs | 77 +++++++++- src/libstd/fs/mod.rs | 70 ++++----- src/libstd/fs/tempdir.rs | 7 +- src/libstd/lib.rs | 3 + src/libstd/net/ip.rs | 1 - src/libstd/os.rs | 5 +- src/libstd/path.rs | 200 ++++++++++++++++++++++---- src/libstd/prelude/v1.rs | 4 + src/libstd/process.rs | 6 +- src/libstd/sys/unix/fs2.rs | 3 +- src/libstd/sys/unix/os.rs | 8 +- src/libsyntax/codemap.rs | 3 +- src/libsyntax/ext/source_util.rs | 2 +- src/libsyntax/lib.rs | 2 + src/libsyntax/parse/parser.rs | 4 +- src/libterm/lib.rs | 1 + src/libterm/terminfo/searcher.rs | 12 +- src/libtest/lib.rs | 5 +- src/rustbook/book.rs | 8 +- src/rustbook/build.rs | 6 +- src/rustbook/main.rs | 1 + src/test/run-pass/env-home-dir.rs | 10 +- 69 files changed, 666 insertions(+), 196 deletions(-) create mode 100644 src/libcore/convert.rs diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 01c4e99b77c70..1ee5917ac9c91 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -20,6 +20,8 @@ #![feature(std_misc)] #![feature(test)] #![feature(path_ext)] +#![feature(convert)] +#![feature(str_char)] #![deny(warnings)] @@ -115,7 +117,7 @@ pub fn parse_config(args: Vec ) -> Config { fn opt_path(m: &getopts::Matches, nm: &str) -> PathBuf { match m.opt_str(nm) { - Some(s) => PathBuf::new(&s), + Some(s) => PathBuf::from(&s), None => panic!("no option (=path) found for {}", nm), } } @@ -130,10 +132,10 @@ pub fn parse_config(args: Vec ) -> Config { compile_lib_path: matches.opt_str("compile-lib-path").unwrap(), run_lib_path: matches.opt_str("run-lib-path").unwrap(), rustc_path: opt_path(matches, "rustc-path"), - clang_path: matches.opt_str("clang-path").map(|s| PathBuf::new(&s)), + clang_path: matches.opt_str("clang-path").map(|s| PathBuf::from(&s)), valgrind_path: matches.opt_str("valgrind-path"), force_valgrind: matches.opt_present("force-valgrind"), - llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::new(&s)), + llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::from(&s)), src_base: opt_path(matches, "src-base"), build_base: opt_path(matches, "build-base"), aux_base: opt_path(matches, "aux-base"), @@ -141,7 +143,7 @@ pub fn parse_config(args: Vec ) -> Config { mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"), run_ignored: matches.opt_present("ignored"), filter: filter, - logfile: matches.opt_str("logfile").map(|s| PathBuf::new(&s)), + logfile: matches.opt_str("logfile").map(|s| PathBuf::from(&s)), runtool: matches.opt_str("runtool"), host_rustcflags: matches.opt_str("host-rustcflags"), target_rustcflags: matches.opt_str("target-rustcflags"), diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 29123173f5bae..e1ad66c69e44a 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -328,10 +328,10 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> { fn parse_pp_exact(line: &str, testfile: &Path) -> Option { match parse_name_value_directive(line, "pp-exact") { - Some(s) => Some(PathBuf::new(&s)), + Some(s) => Some(PathBuf::from(&s)), None => { if parse_name_directive(line, "pp-exact") { - testfile.file_name().map(|s| PathBuf::new(s)) + testfile.file_name().map(|s| PathBuf::from(s)) } else { None } diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index a754bd950f7f6..319248cb8107d 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -1440,7 +1440,7 @@ fn aux_output_dir_name(config: &Config, testfile: &Path) -> PathBuf { } fn output_testname(testfile: &Path) -> PathBuf { - PathBuf::new(testfile.file_stem().unwrap()) + PathBuf::from(testfile.file_stem().unwrap()) } fn output_base_name(config: &Config, testfile: &Path) -> PathBuf { diff --git a/src/libcollections/borrow.rs b/src/libcollections/borrow.rs index 4bedbdeb36876..88d59f699d183 100644 --- a/src/libcollections/borrow.rs +++ b/src/libcollections/borrow.rs @@ -14,6 +14,7 @@ use core::clone::Clone; use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd}; +use core::convert::AsRef; use core::hash::{Hash, Hasher}; use core::marker::Sized; use core::ops::Deref; @@ -291,10 +292,9 @@ impl<'a, B: ?Sized> Hash for Cow<'a, B> where B: Hash + ToOwned } /// Trait for moving into a `Cow` -#[stable(feature = "rust1", since = "1.0.0")] +#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`")] pub trait IntoCow<'a, B: ?Sized> where B: ToOwned { /// Moves `self` into `Cow` - #[stable(feature = "rust1", since = "1.0.0")] fn into_cow(self) -> Cow<'a, B>; } @@ -304,3 +304,10 @@ impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned { self } } + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a, T: Clone> AsRef for Cow<'a, T> { + fn as_ref(&self) -> &T { + self + } +} diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index c4a0149676333..156c90f1e8401 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -36,6 +36,7 @@ #![feature(unsafe_no_drop_flag)] #![feature(step_by)] #![feature(str_char)] +#![feature(convert)] #![cfg_attr(test, feature(rand, rustc_private, test))] #![cfg_attr(test, allow(deprecated))] // rand diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 45864153dd799..0a0307aef322e 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -88,6 +88,7 @@ #![stable(feature = "rust1", since = "1.0.0")] use alloc::boxed::Box; +use core::convert::AsRef; use core::clone::Clone; use core::cmp::Ordering::{self, Greater, Less}; use core::cmp::{self, Ord, PartialEq}; @@ -1088,23 +1089,23 @@ pub trait SliceConcatExt { fn connect(&self, sep: &T) -> U; } -impl> SliceConcatExt> for [V] { +impl> SliceConcatExt> for [V] { fn concat(&self) -> Vec { - let size = self.iter().fold(0, |acc, v| acc + v.as_slice().len()); + let size = self.iter().fold(0, |acc, v| acc + v.as_ref().len()); let mut result = Vec::with_capacity(size); for v in self { - result.push_all(v.as_slice()) + result.push_all(v.as_ref()) } result } fn connect(&self, sep: &T) -> Vec { - let size = self.iter().fold(0, |acc, v| acc + v.as_slice().len()); + let size = self.iter().fold(0, |acc, v| acc + v.as_ref().len()); let mut result = Vec::with_capacity(size + self.len()); let mut first = true; for v in self { if first { first = false } else { result.push(sep.clone()) } - result.push_all(v.as_slice()) + result.push_all(v.as_ref()) } result } diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 3a289e4ef3738..c014ddc069da6 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -61,10 +61,10 @@ use core::iter::AdditiveIterator; use core::iter::{Iterator, IteratorExt, Extend}; use core::option::Option::{self, Some, None}; use core::result::Result; -use core::slice::AsSlice; use core::str as core_str; use unicode::str::{UnicodeStr, Utf16Encoder}; +use core::convert::AsRef; use vec_deque::VecDeque; use borrow::{Borrow, ToOwned}; use string::String; @@ -86,51 +86,47 @@ pub use core::str::{Searcher, ReverseSearcher, DoubleEndedSearcher, SearchStep}; Section: Creating a string */ -impl SliceConcatExt for [S] { +impl> SliceConcatExt for [S] { fn concat(&self) -> String { - let s = self.as_slice(); - - if s.is_empty() { + if self.is_empty() { return String::new(); } // `len` calculation may overflow but push_str will check boundaries - let len = s.iter().map(|s| s.as_slice().len()).sum(); + let len = self.iter().map(|s| s.as_ref().len()).sum(); let mut result = String::with_capacity(len); - for s in s { - result.push_str(s.as_slice()) + for s in self { + result.push_str(s.as_ref()) } result } fn connect(&self, sep: &str) -> String { - let s = self.as_slice(); - - if s.is_empty() { + if self.is_empty() { return String::new(); } // concat is faster if sep.is_empty() { - return s.concat(); + return self.concat(); } // this is wrong without the guarantee that `self` is non-empty // `len` calculation may overflow but push_str but will check boundaries - let len = sep.len() * (s.len() - 1) - + s.iter().map(|s| s.as_slice().len()).sum(); + let len = sep.len() * (self.len() - 1) + + self.iter().map(|s| s.as_ref().len()).sum(); let mut result = String::with_capacity(len); let mut first = true; - for s in s { + for s in self { if first { first = false; } else { result.push_str(sep); } - result.push_str(s.as_slice()); + result.push_str(s.as_ref()); } result } diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index cd6f27bf65f6e..6463949ac8aae 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -814,6 +814,7 @@ impl<'a, 'b> PartialEq> for &'b str { } #[unstable(feature = "collections", reason = "waiting on Str stabilization")] +#[allow(deprecated)] impl Str for String { #[inline] #[stable(feature = "rust1", since = "1.0.0")] @@ -973,6 +974,27 @@ impl ToString for T { } } +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for String { + fn as_ref(&self) -> &str { + self + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a str> for String { + fn from(s: &'a str) -> String { + s.to_string() + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl Into> for String { + fn into(self) -> Vec { + self.into_bytes() + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl IntoCow<'static, str> for String { #[inline] @@ -989,6 +1011,7 @@ impl<'a> IntoCow<'a, str> for &'a str { } } +#[allow(deprecated)] impl<'a> Str for Cow<'a, str> { #[inline] fn as_slice<'b>(&'b self) -> &'b str { diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index b0e8dc7d0b622..85833c34049fe 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1369,7 +1369,7 @@ impl ops::Index for Vec { type Output = [T]; #[inline] fn index(&self, _index: &ops::RangeFull) -> &[T] { - self.as_slice() + self } } @@ -1406,7 +1406,13 @@ impl ops::IndexMut for Vec { impl ops::Deref for Vec { type Target = [T]; - fn deref(&self) -> &[T] { self.as_slice() } + fn deref(&self) -> &[T] { + unsafe { + let p = *self.ptr; + assume(p != 0 as *mut T); + slice::from_raw_parts(p, self.len) + } + } } #[stable(feature = "rust1", since = "1.0.0")] @@ -1548,6 +1554,7 @@ impl Ord for Vec { } } +#[allow(deprecated)] impl AsSlice for Vec { /// Returns a slice into `self`. /// @@ -1562,11 +1569,7 @@ impl AsSlice for Vec { #[inline] #[stable(feature = "rust1", since = "1.0.0")] fn as_slice(&self) -> &[T] { - unsafe { - let p = *self.ptr; - assume(p != 0 as *mut T); - slice::from_raw_parts(p, self.len) - } + self } } @@ -1614,6 +1617,41 @@ impl fmt::Debug for Vec { } } +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef> for Vec { + fn as_ref(&self) -> &Vec { + self + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl Into> for Vec { + fn into(self) -> Vec { + self + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef<[T]> for Vec { + fn as_ref(&self) -> &[T] { + self + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a, T: Clone> From<&'a [T]> for Vec { + fn from(s: &'a [T]) -> Vec { + s.to_vec() + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a str> for Vec { + fn from(s: &'a str) -> Vec { + s.as_bytes().to_vec() + } +} + //////////////////////////////////////////////////////////////////////////////// // Clone-on-write //////////////////////////////////////////////////////////////////////////////// diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs new file mode 100644 index 0000000000000..65a226d37cbc0 --- /dev/null +++ b/src/libcore/convert.rs @@ -0,0 +1,113 @@ +// Copyright 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Traits for conversions between types. +//! +//! The traits in this module provide a general way to talk about +//! conversions from one type to another. They follow the standard +//! Rust conventions of `as`/`to`/`into`/`from`. + +#![unstable(feature = "convert", + reason = "recently added, experimental traits")] + +use marker::Sized; + +/// A cheap, reference-to-reference conversion. +pub trait AsRef { + /// Perform the conversion. + fn as_ref(&self) -> &T; +} + +/// A cheap, mutable reference-to-mutable reference conversion. +pub trait AsMut { + /// Perform the conversion. + fn as_mut(&mut self) -> &mut T; +} + +/// A conversion that consumes `self`, which may or may not be +/// expensive. +pub trait Into: Sized { + /// Perform the conversion. + fn into(self) -> T; +} + +/// Construct `Self` via a conversion. +pub trait From { + /// Perform the conversion. + fn from(T) -> Self; +} + +//////////////////////////////////////////////////////////////////////////////// +// GENERIC IMPLS +//////////////////////////////////////////////////////////////////////////////// + +// As implies Into +impl<'a, T: ?Sized, U: ?Sized> Into<&'a U> for &'a T where T: AsRef { + fn into(self) -> &'a U { + self.as_ref() + } +} + +// As lifts over & +impl<'a, T: ?Sized, U: ?Sized> AsRef for &'a T where T: AsRef { + fn as_ref(&self) -> &U { + >::as_ref(*self) + } +} + +// As lifts over &mut +impl<'a, T: ?Sized, U: ?Sized> AsRef for &'a mut T where T: AsRef { + fn as_ref(&self) -> &U { + >::as_ref(*self) + } +} + +// AsMut implies Into +impl<'a, T: ?Sized, U: ?Sized> Into<&'a mut U> for &'a mut T where T: AsMut { + fn into(self) -> &'a mut U { + (*self).as_mut() + } +} + +// AsMut lifts over &mut +impl<'a, T: ?Sized, U: ?Sized> AsMut for &'a mut T where T: AsMut { + fn as_mut(&mut self) -> &mut U { + (*self).as_mut() + } +} + +// From implies Into +impl Into for T where U: From { + fn into(self) -> U { + U::from(self) + } +} + +//////////////////////////////////////////////////////////////////////////////// +// CONCRETE IMPLS +//////////////////////////////////////////////////////////////////////////////// + +impl AsRef<[T]> for [T] { + fn as_ref(&self) -> &[T] { + self + } +} + +impl AsMut<[T]> for [T] { + fn as_mut(&mut self) -> &mut [T] { + self + } +} + +impl AsRef for str { + fn as_ref(&self) -> &str { + self + } +} diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 29cc11d5a60a1..e31542c183a69 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -125,6 +125,7 @@ pub mod ops; pub mod cmp; pub mod clone; pub mod default; +pub mod convert; /* Core types and methods on primitives */ diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 455c68d4319d6..4a1e24c1f406d 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -154,6 +154,7 @@ use mem; use ops::{Deref, FnOnce}; use result::Result::{Ok, Err}; use result::Result; +#[allow(deprecated)] use slice::AsSlice; use slice; @@ -701,6 +702,19 @@ impl Option { pub fn take(&mut self) -> Option { mem::replace(self, None) } + + /// Convert from `Option` to `&[T]` (without copying) + #[inline] + #[unstable(feature = "as_slice", since = "unsure of the utility here")] + pub fn as_slice<'a>(&'a self) -> &'a [T] { + match *self { + Some(ref x) => slice::ref_slice(x), + None => { + let result: &[_] = &[]; + result + } + } + } } impl<'a, T: Clone, D: Deref> Option { @@ -752,6 +766,9 @@ impl Option { #[unstable(feature = "core", reason = "waiting on the stability of the trait itself")] +#[deprecated(since = "1.0.0", + reason = "use the inherent method instead")] +#[allow(deprecated)] impl AsSlice for Option { /// Convert from `Option` to `&[T]` (without copying) #[inline] diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs index 4bf7f85284cfe..424829939b92e 100644 --- a/src/libcore/prelude.rs +++ b/src/libcore/prelude.rs @@ -36,6 +36,7 @@ pub use mem::drop; pub use char::CharExt; pub use clone::Clone; pub use cmp::{PartialEq, PartialOrd, Eq, Ord}; +pub use convert::{AsRef, AsMut, Into, From}; pub use iter::{Extend, IteratorExt}; pub use iter::{Iterator, DoubleEndedIterator}; pub use iter::{ExactSizeIterator}; diff --git a/src/libcore/result.rs b/src/libcore/result.rs index bc8d53e2a5765..4b3cda46c1df3 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -240,6 +240,7 @@ use iter::{Iterator, IteratorExt, DoubleEndedIterator, FromIterator, ExactSizeIterator, IntoIterator}; use ops::{FnMut, FnOnce}; use option::Option::{self, None, Some}; +#[allow(deprecated)] use slice::AsSlice; use slice; @@ -408,6 +409,20 @@ impl Result { } } + /// Convert from `Result` to `&[T]` (without copying) + #[inline] + #[unstable(feature = "as_slice", since = "unsure of the utility here")] + pub fn as_slice(&self) -> &[T] { + match *self { + Ok(ref x) => slice::ref_slice(x), + Err(_) => { + // work around lack of implicit coercion from fixed-size array to slice + let emp: &[_] = &[]; + emp + } + } + } + /// Convert from `Result` to `&mut [T]` (without copying) /// /// ``` @@ -788,10 +803,14 @@ impl Result { // Trait implementations ///////////////////////////////////////////////////////////////////////////// +#[unstable(feature = "core", + reason = "waiting on the stability of the trait itself")] +#[deprecated(since = "1.0.0", + reason = "use inherent method instead")] +#[allow(deprecated)] impl AsSlice for Result { /// Convert from `Result` to `&[T]` (without copying) #[inline] - #[stable(feature = "rust1", since = "1.0.0")] fn as_slice<'a>(&'a self) -> &'a [T] { match *self { Ok(ref x) => slice::ref_slice(x), diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 907b2eba80c5b..e7535ae1d17b6 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -596,24 +596,29 @@ impl ops::IndexMut for [T] { /// Data that is viewable as a slice. #[unstable(feature = "core", reason = "will be replaced by slice syntax")] +#[deprecated(since = "1.0.0", + reason = "use std::convert::AsRef<[T]> instead")] pub trait AsSlice { /// Work with `self` as a slice. fn as_slice<'a>(&'a self) -> &'a [T]; } #[unstable(feature = "core", reason = "trait is experimental")] +#[allow(deprecated)] impl AsSlice for [T] { #[inline(always)] fn as_slice<'a>(&'a self) -> &'a [T] { self } } #[unstable(feature = "core", reason = "trait is experimental")] +#[allow(deprecated)] impl<'a, T, U: ?Sized + AsSlice> AsSlice for &'a U { #[inline(always)] fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } } #[unstable(feature = "core", reason = "trait is experimental")] +#[allow(deprecated)] impl<'a, T, U: ?Sized + AsSlice> AsSlice for &'a mut U { #[inline(always)] fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index e8181395b5c1e..e31aebbd74ed2 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1275,16 +1275,20 @@ mod traits { reason = "Instead of taking this bound generically, this trait will be \ replaced with one of slicing syntax (&foo[..]), deref coercions, or \ a more generic conversion trait")] +#[deprecated(since = "1.0.0", + reason = "use std::convert::AsRef instead")] pub trait Str { /// Work with `self` as a slice. fn as_slice<'a>(&'a self) -> &'a str; } +#[allow(deprecated)] impl Str for str { #[inline] fn as_slice<'a>(&'a self) -> &'a str { self } } +#[allow(deprecated)] impl<'a, S: ?Sized> Str for &'a S where S: Str { #[inline] fn as_slice(&self) -> &str { Str::as_slice(*self) } diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 0e0804593443d..6d95d5e07247c 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -280,6 +280,7 @@ html_root_url = "http://doc.rust-lang.org/nightly/")] #![feature(int_uint)] #![feature(collections)] +#![feature(into_cow)] use self::LabelText::*; diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 97ed391fdfc78..793eff6a9da6f 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -43,6 +43,8 @@ #![feature(path_ext)] #![feature(str_words)] #![feature(str_char)] +#![feature(convert)] +#![feature(into_cow)] #![cfg_attr(test, feature(test))] extern crate arena; diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs index 47ec31c0f1ab7..dc9d1e11e8e9c 100644 --- a/src/librustc/metadata/cstore.rs +++ b/src/librustc/metadata/cstore.rs @@ -243,7 +243,7 @@ impl crate_metadata { impl MetadataBlob { pub fn as_slice<'a>(&'a self) -> &'a [u8] { let slice = match *self { - MetadataVec(ref vec) => vec.as_slice(), + MetadataVec(ref vec) => &vec[..], MetadataArchive(ref ar) => ar.as_slice(), }; if slice.len() < 4 { diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs index 22a4a6fc978dc..284e76b328a69 100644 --- a/src/librustc/metadata/filesearch.rs +++ b/src/librustc/metadata/filesearch.rs @@ -156,7 +156,7 @@ impl<'a> FileSearch<'a> { // Returns a list of directories where target-specific tool binaries are located. pub fn get_tools_search_paths(&self) -> Vec { - let mut p = PathBuf::new(self.sysroot); + let mut p = PathBuf::from(self.sysroot); p.push(&find_libdir(self.sysroot)); p.push(&rustlibdir()); p.push(&self.triple); @@ -166,7 +166,7 @@ impl<'a> FileSearch<'a> { } pub fn relative_target_lib_path(sysroot: &Path, target_triple: &str) -> PathBuf { - let mut p = PathBuf::new(&find_libdir(sysroot)); + let mut p = PathBuf::from(&find_libdir(sysroot)); assert!(p.is_relative()); p.push(&rustlibdir()); p.push(target_triple); @@ -224,7 +224,7 @@ pub fn rust_path() -> Vec { Some(env_path) => { let env_path_components = env_path.split(PATH_ENTRY_SEPARATOR); - env_path_components.map(|s| PathBuf::new(s)).collect() + env_path_components.map(|s| PathBuf::from(s)).collect() } None => Vec::new() }; diff --git a/src/librustc/metadata/loader.rs b/src/librustc/metadata/loader.rs index e466dc8a3a018..7854db8114665 100644 --- a/src/librustc/metadata/loader.rs +++ b/src/librustc/metadata/loader.rs @@ -628,7 +628,7 @@ impl<'a> Context<'a> { let mut rlibs = HashMap::new(); let mut dylibs = HashMap::new(); { - let locs = locs.iter().map(|l| PathBuf::new(&l[..])).filter(|loc| { + let locs = locs.iter().map(|l| PathBuf::from(l)).filter(|loc| { if !loc.exists() { sess.err(&format!("extern location for {} does not exist: {}", self.crate_name, loc.display())); diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 7dfbccea0dccd..882caecb3822e 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -1762,7 +1762,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { match obligations { Ok(mut obls) => { - obls.push_all(normalized.obligations.as_slice()); + obls.push_all(&normalized.obligations); obls }, Err(ErrorReported) => Vec::new() diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index e368a6691332c..a7c67a0863182 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -907,7 +907,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { let cg = build_codegen_options(matches); - let sysroot_opt = matches.opt_str("sysroot").map(|m| PathBuf::new(&m)); + let sysroot_opt = matches.opt_str("sysroot").map(|m| PathBuf::from(&m)); let target = matches.opt_str("target").unwrap_or( host_triple().to_string()); let opt_level = { diff --git a/src/librustc/session/search_paths.rs b/src/librustc/session/search_paths.rs index 3c5d97445058b..3dc31f9524eff 100644 --- a/src/librustc/session/search_paths.rs +++ b/src/librustc/session/search_paths.rs @@ -54,7 +54,7 @@ impl SearchPaths { if path.is_empty() { early_error("empty search path given via `-L`"); } - self.paths.push((kind, PathBuf::new(path))); + self.paths.push((kind, PathBuf::from(path))); } pub fn iter(&self, kind: PathKind) -> Iter { diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs index aec8ac38a5ad3..2cc51a723f237 100644 --- a/src/librustc_back/archive.rs +++ b/src/librustc_back/archive.rs @@ -319,7 +319,7 @@ impl<'a> ArchiveBuilder<'a> { }; let new_filename = self.work_dir.path().join(&filename[..]); try!(fs::rename(&file, &new_filename)); - self.members.push(PathBuf::new(&filename)); + self.members.push(PathBuf::from(filename)); } Ok(()) } diff --git a/src/librustc_back/fs.rs b/src/librustc_back/fs.rs index c29cbb352a321..6d8891dd4fe07 100644 --- a/src/librustc_back/fs.rs +++ b/src/librustc_back/fs.rs @@ -19,7 +19,7 @@ use std::path::{Path, PathBuf}; pub fn realpath(original: &Path) -> io::Result { let old = old_path::Path::new(original.to_str().unwrap()); match old_realpath(&old) { - Ok(p) => Ok(PathBuf::new(p.as_str().unwrap())), + Ok(p) => Ok(PathBuf::from(p.as_str().unwrap())), Err(e) => Err(io::Error::new(io::ErrorKind::Other, "realpath error", Some(e.to_string()))) diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index 99d24a6013078..086742f740cdb 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -49,6 +49,7 @@ #![feature(std_misc)] #![feature(path_relative_from)] #![feature(step_by)] +#![feature(convert)] extern crate syntax; extern crate serialize; diff --git a/src/librustc_back/rpath.rs b/src/librustc_back/rpath.rs index 4f9f1447d8a73..8dd65c5b893e6 100644 --- a/src/librustc_back/rpath.rs +++ b/src/librustc_back/rpath.rs @@ -106,7 +106,7 @@ fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path) -> String } fn relativize(path: &Path, rel: &Path) -> PathBuf { - let mut res = PathBuf::new(""); + let mut res = PathBuf::new(); let mut cur = rel; while !path.starts_with(cur) { res.push(".."); diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index 4663901a7b4c1..c464658f447ac 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -393,11 +393,11 @@ impl Target { let path = { let mut target = target.to_string(); target.push_str(".json"); - PathBuf::new(&target) + PathBuf::from(target) }; let target_path = env::var_os("RUST_TARGET_PATH") - .unwrap_or(OsString::from_str("")); + .unwrap_or(OsString::new()); // FIXME 16351: add a sane default search path? diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs index e09457970e12f..e927ea5b86cdd 100644 --- a/src/librustc_borrowck/lib.rs +++ b/src/librustc_borrowck/lib.rs @@ -28,6 +28,7 @@ #![feature(rustc_private)] #![feature(staged_api)] #![feature(unsafe_destructor)] +#![feature(into_cow)] #[macro_use] extern crate log; #[macro_use] extern crate syntax; diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index dc27a30110950..4c654cbf27de0 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -468,7 +468,7 @@ pub fn phase_2_configure_and_expand(sess: &Session, // dependent dlls. Note that this uses cfg!(windows) as opposed to // targ_cfg because syntax extensions are always loaded for the host // compiler, not for the target. - let mut _old_path = OsString::from_str(""); + let mut _old_path = OsString::new(); if cfg!(windows) { _old_path = env::var_os("PATH").unwrap_or(_old_path); let mut new_path = sess.host_filesearch(PathKind::All).get_dylib_search_paths(); @@ -752,7 +752,7 @@ pub fn phase_5_run_llvm_passes(sess: &Session, pub fn phase_6_link_output(sess: &Session, trans: &trans::CrateTranslation, outputs: &OutputFilenames) { - let old_path = env::var_os("PATH").unwrap_or(OsString::from_str("")); + let old_path = env::var_os("PATH").unwrap_or(OsString::new()); let mut new_path = sess.host_filesearch(PathKind::All).get_tools_search_paths(); new_path.extend(env::split_paths(&old_path)); env::set_var("PATH", &env::join_paths(new_path.iter()).unwrap()); @@ -927,7 +927,7 @@ pub fn build_output_filenames(input: &Input, // We want to toss everything after the final '.' let dirpath = match *odir { Some(ref d) => d.clone(), - None => PathBuf::new("") + None => PathBuf::new() }; // If a crate name is present, we use it as the link name diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 0071e4434efa4..5e6f2fb835bb2 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -39,6 +39,7 @@ #![feature(io)] #![feature(set_stdio)] #![feature(unicode)] +#![feature(convert)] extern crate arena; extern crate flate; @@ -163,8 +164,8 @@ pub fn run_compiler<'a>(args: &[String], // Extract output directory and file from matches. fn make_output(matches: &getopts::Matches) -> (Option, Option) { - let odir = matches.opt_str("out-dir").map(|o| PathBuf::new(&o)); - let ofile = matches.opt_str("o").map(|o| PathBuf::new(&o)); + let odir = matches.opt_str("out-dir").map(|o| PathBuf::from(&o)); + let ofile = matches.opt_str("o").map(|o| PathBuf::from(&o)); (odir, ofile) } @@ -177,7 +178,7 @@ fn make_input(free_matches: &[String]) -> Option<(Input, Option)> { io::stdin().read_to_string(&mut src).unwrap(); Some((Input::Str(src), None)) } else { - Some((Input::File(PathBuf::new(ifile)), Some(PathBuf::new(ifile)))) + Some((Input::File(PathBuf::from(ifile)), Some(PathBuf::from(ifile)))) } } else { None @@ -858,9 +859,9 @@ pub fn diagnostics_registry() -> diagnostics::registry::Registry { use syntax::diagnostics::registry::Registry; let all_errors = Vec::new() + - rustc::diagnostics::DIAGNOSTICS.as_slice() + - rustc_typeck::diagnostics::DIAGNOSTICS.as_slice() + - rustc_resolve::diagnostics::DIAGNOSTICS.as_slice(); + &rustc::diagnostics::DIAGNOSTICS[..] + + &rustc_typeck::diagnostics::DIAGNOSTICS[..] + + &rustc_resolve::diagnostics::DIAGNOSTICS[..]; Registry::new(&*all_errors) } diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index f6f82c65374bd..7958dabe74e42 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -2056,7 +2056,7 @@ impl LintPass for InvalidNoMangleItems { } }, ast::ItemStatic(..) => { - if attr::contains_name(it.attrs.as_slice(), "no_mangle") && + if attr::contains_name(&it.attrs, "no_mangle") && !cx.exported_items.contains(&it.id) { let msg = format!("static {} is marked #[no_mangle], but not exported", it.ident); @@ -2064,7 +2064,7 @@ impl LintPass for InvalidNoMangleItems { } }, ast::ItemConst(..) => { - if attr::contains_name(it.attrs.as_slice(), "no_mangle") { + if attr::contains_name(&it.attrs, "no_mangle") { // Const items do not refer to a particular location in memory, and therefore // don't have anything to attach a symbol to let msg = "const items should never be #[no_mangle], consider instead using \ diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 34a23f3efac42..c0a2e24d6f566 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -877,7 +877,7 @@ fn link_args(cmd: &mut Command, if t.options.is_like_osx { let morestack = lib_path.join("libmorestack.a"); - let mut v = OsString::from_str("-Wl,-force_load,"); + let mut v = OsString::from("-Wl,-force_load,"); v.push(&morestack); cmd.arg(&v); } else { @@ -1002,7 +1002,7 @@ fn link_args(cmd: &mut Command, cmd.args(&["-dynamiclib", "-Wl,-dylib"]); if sess.opts.cg.rpath { - let mut v = OsString::from_str("-Wl,-install_name,@rpath/"); + let mut v = OsString::from("-Wl,-install_name,@rpath/"); v.push(out_filename.file_name().unwrap()); cmd.arg(&v); } @@ -1020,7 +1020,7 @@ fn link_args(cmd: &mut Command, let mut get_install_prefix_lib_path = || { let install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX"); let tlib = filesearch::relative_target_lib_path(sysroot, target_triple); - let mut path = PathBuf::new(install_prefix); + let mut path = PathBuf::from(install_prefix); path.push(&tlib); path @@ -1102,7 +1102,7 @@ fn add_local_native_libraries(cmd: &mut Command, sess: &Session) { &sess.target.target.options.staticlib_suffix, &search_path[..], &sess.diagnostic().handler); - let mut v = OsString::from_str("-Wl,-force_load,"); + let mut v = OsString::from("-Wl,-force_load,"); v.push(&lib); cmd.arg(&v); } diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index efc81da560b6e..176e3805a311f 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -41,6 +41,7 @@ #![feature(path_ext)] #![feature(fs)] #![feature(hash)] +#![feature(convert)] #![feature(path_relative_from)] extern crate arena; diff --git a/src/librustc_trans/save/mod.rs b/src/librustc_trans/save/mod.rs index 83bb5efb425d2..765e93f5b8294 100644 --- a/src/librustc_trans/save/mod.rs +++ b/src/librustc_trans/save/mod.rs @@ -1509,10 +1509,10 @@ pub fn process_crate(sess: &Session, // find a path to dump our data to let mut root_path = match env::var_os("DXR_RUST_TEMP_FOLDER") { - Some(val) => PathBuf::new(&val), + Some(val) => PathBuf::from(val), None => match odir { Some(val) => val.join("dxr"), - None => PathBuf::new("dxr-temp"), + None => PathBuf::from("dxr-temp"), }, }; diff --git a/src/librustc_trans/trans/debuginfo.rs b/src/librustc_trans/trans/debuginfo.rs index 3e8cc46e25501..b9c59a0bc78d6 100644 --- a/src/librustc_trans/trans/debuginfo.rs +++ b/src/librustc_trans/trans/debuginfo.rs @@ -1695,7 +1695,7 @@ fn declare_local<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, }; let name = CString::new(name.as_bytes()).unwrap(); - match (variable_access, [].as_slice()) { + match (variable_access, &[][..]) { (DirectVariable { alloca }, address_operations) | (IndirectVariable {alloca, address_operations}, _) => { let metadata = unsafe { diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 97cc3ac7c48a7..f1352cacae487 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -690,7 +690,7 @@ fn convert_field<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, } } -fn convert_associated_type<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, +fn as_refsociated_type<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, container: ImplOrTraitItemContainer, ident: ast::Ident, id: ast::NodeId, @@ -835,7 +835,7 @@ fn convert_item(ccx: &CrateCtxt, it: &ast::Item) { "associated items are not allowed in inherent impls"); } - convert_associated_type(ccx, ImplContainer(local_def(it.id)), + as_refsociated_type(ccx, ImplContainer(local_def(it.id)), impl_item.ident, impl_item.id, impl_item.vis); let typ = ccx.icx(&ty_predicates).to_ty(&ExplicitRscope, ty); @@ -917,7 +917,7 @@ fn convert_item(ccx: &CrateCtxt, it: &ast::Item) { match trait_item.node { ast::MethodTraitItem(..) => {} ast::TypeTraitItem(..) => { - convert_associated_type(ccx, TraitContainer(local_def(it.id)), + as_refsociated_type(ccx, TraitContainer(local_def(it.id)), trait_item.ident, trait_item.id, ast::Public); } } @@ -1987,7 +1987,7 @@ fn conv_param_bounds<'a,'tcx>(astconv: &AstConv<'tcx>, builtin_bounds, trait_bounds, region_bounds - } = astconv::partition_bounds(tcx, span, ast_bounds.as_slice()); + } = astconv::partition_bounds(tcx, span, &ast_bounds); let mut projection_bounds = Vec::new(); diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 421549f8b7ecb..8e9408c9ebc48 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -188,7 +188,7 @@ impl<'a, 'tcx> Clean for visit_ast::RustdocVisitor<'a, 'tcx> { let src = match cx.input { Input::File(ref path) => path.clone(), - Input::Str(_) => PathBuf::new("") // FIXME: this is wrong + Input::Str(_) => PathBuf::new() // FIXME: this is wrong }; Crate { diff --git a/src/librustdoc/externalfiles.rs b/src/librustdoc/externalfiles.rs index c2b6c940caea2..57cb87e1b2d01 100644 --- a/src/librustdoc/externalfiles.rs +++ b/src/librustdoc/externalfiles.rs @@ -47,7 +47,7 @@ pub fn load_string(input: &Path) -> io::Result> { macro_rules! load_or_return { ($input: expr, $cant_read: expr, $not_utf8: expr) => { { - let input = PathBuf::new($input); + let input = PathBuf::from(&$input[..]); match ::externalfiles::load_string(&input) { Err(e) => { let _ = writeln!(&mut io::stderr(), diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 81daac7b90f0d..d9b40fb6ba6ef 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -300,7 +300,7 @@ pub fn run(mut krate: clean::Crate, passes: HashSet) -> io::Result<()> { let src_root = match krate.src.parent() { Some(p) => p.to_path_buf(), - None => PathBuf::new(""), + None => PathBuf::new(), }; let mut cx = Context { dst: dst, @@ -784,7 +784,7 @@ impl<'a> DocFolder for SourceCollector<'a> { impl<'a> SourceCollector<'a> { /// Renders the given filename into its corresponding HTML source file. fn emit_source(&mut self, filename: &str) -> io::Result<()> { - let p = PathBuf::new(filename); + let p = PathBuf::from(filename); // If we couldn't open this file, then just returns because it // probably means that it's some standard library macro thing and we @@ -819,7 +819,7 @@ impl<'a> SourceCollector<'a> { let mut fname = p.file_name().expect("source has no filename") .to_os_string(); fname.push(".html"); - cur.push(&fname); + cur.push(&fname[..]); let mut w = BufWriter::new(try!(File::create(&cur))); let title = format!("{} -- source", cur.file_name().unwrap() diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index d747ed3f119c2..12baa849cc94d 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -38,6 +38,7 @@ #![feature(file_path)] #![feature(path_ext)] #![feature(path_relative_from)] +#![feature(convert)] extern crate arena; extern crate getopts; @@ -251,7 +252,7 @@ pub fn main_args(args: &[String]) -> int { let should_test = matches.opt_present("test"); let markdown_input = input.ends_with(".md") || input.ends_with(".markdown"); - let output = matches.opt_str("o").map(|s| PathBuf::new(&s)); + let output = matches.opt_str("o").map(|s| PathBuf::from(&s)); let cfgs = matches.opt_strs("cfg"); let external_html = match ExternalHtml::load( @@ -271,7 +272,7 @@ pub fn main_args(args: &[String]) -> int { return test::run(input, cfgs, libs, externs, test_args, crate_name) } (false, true) => return markdown::render(input, - output.unwrap_or(PathBuf::new("doc")), + output.unwrap_or(PathBuf::from("doc")), &matches, &external_html, !matches.opt_present("markdown-no-toc")), (false, false) => {} @@ -289,7 +290,7 @@ pub fn main_args(args: &[String]) -> int { match matches.opt_str("w").as_ref().map(|s| &**s) { Some("html") | None => { match html::render::run(krate, &external_html, - output.unwrap_or(PathBuf::new("doc")), + output.unwrap_or(PathBuf::from("doc")), passes.into_iter().collect()) { Ok(()) => {} Err(e) => panic!("failed to generate documentation: {}", e), @@ -297,7 +298,7 @@ pub fn main_args(args: &[String]) -> int { } Some("json") => { match json_output(krate, json_plugins, - output.unwrap_or(PathBuf::new("doc.json"))) { + output.unwrap_or(PathBuf::from("doc.json"))) { Ok(()) => {} Err(e) => panic!("failed to write json: {}", e), } @@ -376,7 +377,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche let cfgs = matches.opt_strs("cfg"); let triple = matches.opt_str("target"); - let cr = PathBuf::new(cratefile); + let cr = PathBuf::from(cratefile); info!("starting to run rustc"); let (tx, rx) = channel(); diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index e2f8a6f82c644..0b79fa7970dfd 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -46,7 +46,7 @@ pub fn run(input: &str, mut test_args: Vec, crate_name: Option) -> int { - let input_path = PathBuf::new(input); + let input_path = PathBuf::from(input); let input = config::Input::File(input_path.clone()); let sessopts = config::Options { diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index 90cb88046e53d..f320f723c2ed6 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -37,6 +37,7 @@ Core encoding and decoding interfaces. #![feature(std_misc)] #![feature(unicode)] #![feature(str_char)] +#![feature(convert)] #![cfg_attr(test, feature(test))] // test harness access diff --git a/src/libserialize/serialize.rs b/src/libserialize/serialize.rs index 71f9e01706dab..5e9baa9b9e903 100644 --- a/src/libserialize/serialize.rs +++ b/src/libserialize/serialize.rs @@ -579,7 +579,7 @@ impl Encodable for path::PathBuf { impl Decodable for path::PathBuf { fn decode(d: &mut D) -> Result { let bytes: String = try!(Decodable::decode(d)); - Ok(path::PathBuf::new(&bytes)) + Ok(path::PathBuf::from(bytes)) } } diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 24882c7f7abfd..9d6933ce9c89c 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -23,7 +23,7 @@ use error::Error; use ffi::{OsString, AsOsStr}; use fmt; use io; -use path::{AsPath, PathBuf}; +use path::{self, Path, PathBuf}; use sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering}; use sync::{StaticMutex, MUTEX_INIT}; use sys::os as os_imp; @@ -67,8 +67,8 @@ pub fn current_dir() -> io::Result { /// println!("Successfully changed working directory to {}!", root.display()); /// ``` #[stable(feature = "env", since = "1.0.0")] -pub fn set_current_dir(p: &P) -> io::Result<()> { - os_imp::chdir(p.as_path()) +pub fn set_current_dir + ?Sized>(p: &P) -> io::Result<()> { + os_imp::chdir(p.as_ref()) } static ENV_LOCK: StaticMutex = MUTEX_INIT; diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index fc4f03ff3a54a..1760445a0fcd4 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -10,6 +10,7 @@ #![unstable(feature = "std_misc")] +use convert::Into; use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; use error::{Error, FromError}; use fmt; @@ -130,6 +131,8 @@ pub struct NulError(usize, Vec); /// A conversion trait used by the constructor of `CString` for types that can /// be converted to a vector of bytes. +#[deprecated(since = "1.0.0", reason = "use std::convert::Into> instead")] +#[unstable(feature = "std_misc")] pub trait IntoBytes { /// Consumes this container, returning a vector of bytes. fn into_bytes(self) -> Vec; @@ -163,8 +166,8 @@ impl CString { /// internal 0 byte. The error returned will contain the bytes as well as /// the position of the nul byte. #[stable(feature = "rust1", since = "1.0.0")] - pub fn new(t: T) -> Result { - let bytes = t.into_bytes(); + pub fn new>>(t: T) -> Result { + let bytes = t.into(); match bytes.iter().position(|x| *x == 0) { Some(i) => Err(NulError(i, bytes)), None => Ok(unsafe { CString::from_vec_unchecked(bytes) }), @@ -433,15 +436,19 @@ pub unsafe fn c_str_to_bytes_with_nul<'a>(raw: &'a *const libc::c_char) slice::from_raw_parts(*(raw as *const _ as *const *const u8), len as usize) } +#[allow(deprecated)] impl<'a> IntoBytes for &'a str { fn into_bytes(self) -> Vec { self.as_bytes().to_vec() } } +#[allow(deprecated)] impl<'a> IntoBytes for &'a [u8] { fn into_bytes(self) -> Vec { self.to_vec() } } +#[allow(deprecated)] impl IntoBytes for String { fn into_bytes(self) -> Vec { self.into_bytes() } } +#[allow(deprecated)] impl IntoBytes for Vec { fn into_bytes(self) -> Vec { self } } diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index feacbf1e98b81..4d4110466328f 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -63,16 +63,18 @@ pub struct OsStr { impl OsString { /// Constructs an `OsString` at no cost by consuming a `String`. #[stable(feature = "rust1", since = "1.0.0")] + #[deprecated(since = "1.0.0", reason = "use `from` instead")] pub fn from_string(s: String) -> OsString { - OsString { inner: Buf::from_string(s) } + OsString::from(s) } /// Constructs an `OsString` by copying from a `&str` slice. /// /// Equivalent to: `OsString::from_string(String::from_str(s))`. #[stable(feature = "rust1", since = "1.0.0")] + #[deprecated(since = "1.0.0", reason = "use `from` instead")] pub fn from_str(s: &str) -> OsString { - OsString { inner: Buf::from_str(s) } + OsString::from(s) } /// Constructs a new empty `OsString`. @@ -98,8 +100,36 @@ impl OsString { /// Extend the string with the given `&OsStr` slice. #[stable(feature = "rust1", since = "1.0.0")] - pub fn push(&mut self, s: &T) { - self.inner.push_slice(&s.as_os_str().inner) + pub fn push>(&mut self, s: T) { + self.inner.push_slice(&s.as_ref().inner) + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl From for OsString { + fn from(s: String) -> OsString { + OsString { inner: Buf::from_string(s) } + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a String> for OsString { + fn from(s: &'a String) -> OsString { + OsString { inner: Buf::from_str(s) } + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a str> for OsString { + fn from(s: &'a str) -> OsString { + OsString { inner: Buf::from_str(s) } + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a OsStr> for OsString { + fn from(s: &'a OsStr) -> OsString { + OsString { inner: s.inner.to_owned() } } } @@ -316,37 +346,76 @@ impl ToOwned for OsStr { } #[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl<'a, T: AsOsStr + ?Sized> AsOsStr for &'a T { fn as_os_str(&self) -> &OsStr { (*self).as_os_str() } } +#[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl AsOsStr for OsStr { fn as_os_str(&self) -> &OsStr { self } } +#[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl AsOsStr for OsString { fn as_os_str(&self) -> &OsStr { &self[..] } } +#[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl AsOsStr for str { fn as_os_str(&self) -> &OsStr { OsStr::from_str(self) } } +#[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl AsOsStr for String { fn as_os_str(&self) -> &OsStr { OsStr::from_str(&self[..]) } } +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for OsStr { + fn as_ref(&self) -> &OsStr { + self + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for OsString { + fn as_ref(&self) -> &OsStr { + self + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for str { + fn as_ref(&self) -> &OsStr { + OsStr::from_str(self) + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for String { + fn as_ref(&self) -> &OsStr { + OsStr::from_str(&self[..]) + } +} + #[allow(deprecated)] +#[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl AsOsStr for Path { #[cfg(unix)] fn as_os_str(&self) -> &OsStr { diff --git a/src/libstd/fs/mod.rs b/src/libstd/fs/mod.rs index 7df6d6887a258..ab65004f5d1f9 100644 --- a/src/libstd/fs/mod.rs +++ b/src/libstd/fs/mod.rs @@ -20,7 +20,7 @@ use core::prelude::*; use io::{self, Error, ErrorKind, SeekFrom, Seek, Read, Write}; -use path::{AsPath, Path, PathBuf}; +use path::{Path, PathBuf}; use sys::fs2 as fs_imp; use sys_common::{AsInnerMut, FromInner, AsInner}; use vec::Vec; @@ -129,7 +129,7 @@ impl File { /// This function will return an error if `path` does not already exist. /// Other errors may also be returned according to `OpenOptions::open`. #[stable(feature = "rust1", since = "1.0.0")] - pub fn open(path: P) -> io::Result { + pub fn open>(path: P) -> io::Result { OpenOptions::new().read(true).open(path) } @@ -140,7 +140,7 @@ impl File { /// /// See the `OpenOptions::open` function for more details. #[stable(feature = "rust1", since = "1.0.0")] - pub fn create(path: P) -> io::Result { + pub fn create>(path: P) -> io::Result { OpenOptions::new().write(true).create(true).truncate(true).open(path) } @@ -302,8 +302,8 @@ impl OpenOptions { /// permissions for /// * Filesystem-level errors (full disk, etc) #[stable(feature = "rust1", since = "1.0.0")] - pub fn open(&self, path: P) -> io::Result { - let path = path.as_path(); + pub fn open>(&self, path: P) -> io::Result { + let path = path.as_ref(); let inner = try!(fs_imp::File::open(path, &self.0)); Ok(File { path: path.to_path_buf(), inner: inner }) } @@ -415,8 +415,8 @@ impl DirEntry { /// user lacks permissions to remove the file, or if some other filesystem-level /// error occurs. #[stable(feature = "rust1", since = "1.0.0")] -pub fn remove_file(path: P) -> io::Result<()> { - fs_imp::unlink(path.as_path()) +pub fn remove_file>(path: P) -> io::Result<()> { + fs_imp::unlink(path.as_ref()) } /// Given a path, query the file system to get information about a file, @@ -443,8 +443,8 @@ pub fn remove_file(path: P) -> io::Result<()> { /// permissions to perform a `metadata` call on the given `path` or if there /// is no entry in the filesystem at the provided path. #[stable(feature = "rust1", since = "1.0.0")] -pub fn metadata(path: P) -> io::Result { - fs_imp::stat(path.as_path()).map(Metadata) +pub fn metadata>(path: P) -> io::Result { + fs_imp::stat(path.as_ref()).map(Metadata) } /// Rename a file or directory to a new name. @@ -464,8 +464,8 @@ pub fn metadata(path: P) -> io::Result { /// reside on separate filesystems, or if some other intermittent I/O error /// occurs. #[stable(feature = "rust1", since = "1.0.0")] -pub fn rename(from: P, to: Q) -> io::Result<()> { - fs_imp::rename(from.as_path(), to.as_path()) +pub fn rename, Q: AsRef>(from: P, to: Q) -> io::Result<()> { + fs_imp::rename(from.as_ref(), to.as_ref()) } /// Copies the contents of one file to another. This function will also @@ -494,9 +494,9 @@ pub fn rename(from: P, to: Q) -> io::Result<()> { /// * The current process does not have the permission rights to access /// `from` or write `to` #[stable(feature = "rust1", since = "1.0.0")] -pub fn copy(from: P, to: Q) -> io::Result { - let from = from.as_path(); - let to = to.as_path(); +pub fn copy, Q: AsRef>(from: P, to: Q) -> io::Result { + let from = from.as_ref(); + let to = to.as_ref(); if !from.is_file() { return Err(Error::new(ErrorKind::InvalidInput, "the source path is not an existing file", @@ -517,16 +517,16 @@ pub fn copy(from: P, to: Q) -> io::Result { /// The `dst` path will be a link pointing to the `src` path. Note that systems /// often require these two paths to both be located on the same filesystem. #[stable(feature = "rust1", since = "1.0.0")] -pub fn hard_link(src: P, dst: Q) -> io::Result<()> { - fs_imp::link(src.as_path(), dst.as_path()) +pub fn hard_link, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { + fs_imp::link(src.as_ref(), dst.as_ref()) } /// Creates a new soft link on the filesystem. /// /// The `dst` path will be a soft link pointing to the `src` path. #[stable(feature = "rust1", since = "1.0.0")] -pub fn soft_link(src: P, dst: Q) -> io::Result<()> { - fs_imp::symlink(src.as_path(), dst.as_path()) +pub fn soft_link, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { + fs_imp::symlink(src.as_ref(), dst.as_ref()) } /// Reads a soft link, returning the file that the link points to. @@ -537,8 +537,8 @@ pub fn soft_link(src: P, dst: Q) -> io::Result<()> { /// reading a file that does not exist or reading a file that is not a soft /// link. #[stable(feature = "rust1", since = "1.0.0")] -pub fn read_link(path: P) -> io::Result { - fs_imp::readlink(path.as_path()) +pub fn read_link>(path: P) -> io::Result { + fs_imp::readlink(path.as_ref()) } /// Create a new, empty directory at the provided path @@ -556,8 +556,8 @@ pub fn read_link(path: P) -> io::Result { /// This function will return an error if the user lacks permissions to make a /// new directory at the provided `path`, or if the directory already exists. #[stable(feature = "rust1", since = "1.0.0")] -pub fn create_dir(path: P) -> io::Result<()> { - fs_imp::mkdir(path.as_path()) +pub fn create_dir>(path: P) -> io::Result<()> { + fs_imp::mkdir(path.as_ref()) } /// Recursively create a directory and all of its parent components if they @@ -570,8 +570,8 @@ pub fn create_dir(path: P) -> io::Result<()> { /// error conditions for when a directory is being created (after it is /// determined to not exist) are outlined by `fs::create_dir`. #[stable(feature = "rust1", since = "1.0.0")] -pub fn create_dir_all(path: P) -> io::Result<()> { - let path = path.as_path(); +pub fn create_dir_all>(path: P) -> io::Result<()> { + let path = path.as_ref(); if path.is_dir() { return Ok(()) } if let Some(p) = path.parent() { try!(create_dir_all(p)) } create_dir(path) @@ -592,8 +592,8 @@ pub fn create_dir_all(path: P) -> io::Result<()> { /// This function will return an error if the user lacks permissions to remove /// the directory at the provided `path`, or if the directory isn't empty. #[stable(feature = "rust1", since = "1.0.0")] -pub fn remove_dir(path: P) -> io::Result<()> { - fs_imp::rmdir(path.as_path()) +pub fn remove_dir>(path: P) -> io::Result<()> { + fs_imp::rmdir(path.as_ref()) } /// Removes a directory at this path, after removing all its contents. Use @@ -606,8 +606,8 @@ pub fn remove_dir(path: P) -> io::Result<()> { /// /// See `file::remove_file` and `fs::remove_dir` #[stable(feature = "rust1", since = "1.0.0")] -pub fn remove_dir_all(path: P) -> io::Result<()> { - let path = path.as_path(); +pub fn remove_dir_all>(path: P) -> io::Result<()> { + let path = path.as_ref(); for child in try!(read_dir(path)) { let child = try!(child).path(); let stat = try!(lstat(&*child)); @@ -659,8 +659,8 @@ pub fn remove_dir_all(path: P) -> io::Result<()> { /// the process lacks permissions to view the contents or if the `path` points /// at a non-directory file #[stable(feature = "rust1", since = "1.0.0")] -pub fn read_dir(path: P) -> io::Result { - fs_imp::readdir(path.as_path()).map(ReadDir) +pub fn read_dir>(path: P) -> io::Result { + fs_imp::readdir(path.as_ref()).map(ReadDir) } /// Returns an iterator that will recursively walk the directory structure @@ -675,7 +675,7 @@ pub fn read_dir(path: P) -> io::Result { reason = "the precise semantics and defaults for a recursive walk \ may change and this may end up accounting for files such \ as symlinks differently")] -pub fn walk_dir(path: P) -> io::Result { +pub fn walk_dir>(path: P) -> io::Result { let start = try!(read_dir(path)); Ok(WalkDir { cur: Some(start), stack: Vec::new() }) } @@ -761,9 +761,9 @@ impl PathExt for Path { reason = "the argument type of u64 is not quite appropriate for \ this function and may change if the standard library \ gains a type to represent a moment in time")] -pub fn set_file_times(path: P, accessed: u64, +pub fn set_file_times>(path: P, accessed: u64, modified: u64) -> io::Result<()> { - fs_imp::utimes(path.as_path(), accessed, modified) + fs_imp::utimes(path.as_ref(), accessed, modified) } /// Changes the permissions found on a file or a directory. @@ -790,8 +790,8 @@ pub fn set_file_times(path: P, accessed: u64, reason = "a more granual ability to set specific permissions may \ be exposed on the Permissions structure itself and this \ method may not always exist")] -pub fn set_permissions(path: P, perm: Permissions) -> io::Result<()> { - fs_imp::set_perm(path.as_path(), perm.0) +pub fn set_permissions>(path: P, perm: Permissions) -> io::Result<()> { + fs_imp::set_perm(path.as_ref(), perm.0) } #[cfg(test)] diff --git a/src/libstd/fs/tempdir.rs b/src/libstd/fs/tempdir.rs index 8f32d7a586459..a9717e3632339 100644 --- a/src/libstd/fs/tempdir.rs +++ b/src/libstd/fs/tempdir.rs @@ -18,7 +18,7 @@ use prelude::v1::*; use env; use io::{self, Error, ErrorKind}; use fs; -use path::{self, PathBuf, AsPath}; +use path::{self, PathBuf}; use rand::{thread_rng, Rng}; /// A wrapper for a path to temporary directory implementing automatic @@ -43,10 +43,9 @@ impl TempDir { /// /// If no directory can be created, `Err` is returned. #[allow(deprecated)] // rand usage - pub fn new_in(tmpdir: &P, prefix: &str) - -> io::Result { + pub fn new_in>(tmpdir: P, prefix: &str) -> io::Result { let storage; - let mut tmpdir = tmpdir.as_path(); + let mut tmpdir = tmpdir.as_ref(); if !tmpdir.is_absolute() { let cur_dir = try!(env::current_dir()); storage = cur_dir.join(tmpdir); diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b055796ba547f..1488c7969f678 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -126,8 +126,10 @@ #![feature(hash)] #![feature(int_uint)] #![feature(unique)] +#![feature(convert)] #![feature(allow_internal_unstable)] #![feature(str_char)] +#![feature(into_cow)] #![cfg_attr(test, feature(test, rustc_private))] // Don't link to std. We are std. @@ -169,6 +171,7 @@ pub use core::any; pub use core::cell; pub use core::clone; #[cfg(not(test))] pub use core::cmp; +pub use core::convert; pub use core::default; #[allow(deprecated)] pub use core::finally; diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 73c2464a6b2cb..d737ad17ff8ec 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -374,7 +374,6 @@ impl fmt::Display for Ipv6Addr { .iter() .map(|&seg| format!("{:x}", seg)) .collect::>() - .as_slice() .connect(":") } diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 3870b8614ffdf..72f9338b45671 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -38,6 +38,7 @@ use self::MapError::*; use boxed::Box; use clone::Clone; +use convert::From; use env; use error::{FromError, Error}; use ffi::{OsString, OsStr}; @@ -79,12 +80,12 @@ fn err2old(new: ::io::Error) -> IoError { #[cfg(windows)] fn path2new(path: &Path) -> PathBuf { - PathBuf::new(path.as_str().unwrap()) + PathBuf::from(path.as_str().unwrap()) } #[cfg(unix)] fn path2new(path: &Path) -> PathBuf { use os::unix::prelude::*; - PathBuf::new(::from_bytes(path.as_vec())) + PathBuf::from(::from_bytes(path.as_vec())) } #[cfg(unix)] diff --git a/src/libstd/path.rs b/src/libstd/path.rs index ddceed14cc6ce..25372c1cb7c52 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -106,6 +106,7 @@ use cmp; use iter::{self, IntoIterator}; use mem; use ops::{self, Deref}; +use string::String; use vec::Vec; use fmt; @@ -527,6 +528,13 @@ impl<'a> Component<'a> { } } +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> AsRef for Component<'a> { + fn as_ref(&self) -> &OsStr { + self.as_os_str() + } +} + /// The core iterator giving the components of a path. /// /// See the module documentation for an in-depth explanation of components and @@ -601,6 +609,7 @@ impl<'a> Components<'a> { } /// Extract a slice corresponding to the portion of the path remaining for iteration. + #[stable(feature = "rust1", since = "1.0.0")] pub fn as_path(&self) -> &'a Path { let mut comps = self.clone(); if comps.front == State::Body { comps.trim_left(); } @@ -695,6 +704,20 @@ impl<'a> Components<'a> { } } +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> AsRef for Components<'a> { + fn as_ref(&self) -> &Path { + self.as_path() + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> AsRef for Components<'a> { + fn as_ref(&self) -> &OsStr { + self.as_path().as_os_str() + } +} + impl<'a> Iter<'a> { /// Extract a slice corresponding to the portion of the path remaining for iteration. #[stable(feature = "rust1", since = "1.0.0")] @@ -703,6 +726,20 @@ impl<'a> Iter<'a> { } } +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> AsRef for Iter<'a> { + fn as_ref(&self) -> &Path { + self.as_path() + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> AsRef for Iter<'a> { + fn as_ref(&self) -> &OsStr { + self.as_path().as_os_str() + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a> Iterator for Iter<'a> { type Item = &'a OsStr; @@ -873,11 +910,10 @@ impl PathBuf { unsafe { mem::transmute(self) } } - /// Allocate a `PathBuf` with initial contents given by the - /// argument. + /// Allocate an empty `PathBuf`. #[stable(feature = "rust1", since = "1.0.0")] - pub fn new(s: S) -> PathBuf { - PathBuf { inner: s.as_os_str().to_os_string() } + pub fn new() -> PathBuf { + PathBuf { inner: OsString::new() } } /// Extend `self` with `path`. @@ -890,8 +926,8 @@ impl PathBuf { /// replaces everything except for the prefix (if any) of `self`. /// * if `path` has a prefix but no root, it replaces `self. #[stable(feature = "rust1", since = "1.0.0")] - pub fn push(&mut self, path: P) { - let path = path.as_path(); + pub fn push>(&mut self, path: P) { + let path = path.as_ref(); // in general, a separator is needed if the rightmost byte is not a separator let mut need_sep = self.as_mut_vec().last().map(|c| !is_sep_byte(*c)).unwrap_or(false); @@ -958,12 +994,12 @@ impl PathBuf { /// assert!(buf == PathBuf::new("/baz.txt")); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn set_file_name(&mut self, file_name: S) { + pub fn set_file_name>(&mut self, file_name: S) { if self.file_name().is_some() { let popped = self.pop(); debug_assert!(popped); } - self.push(file_name.as_os_str()); + self.push(file_name.as_ref()); } /// Updates `self.extension()` to `extension`. @@ -973,15 +1009,15 @@ impl PathBuf { /// Otherwise, returns `true`; if `self.extension()` is `None`, the extension /// is added; otherwise it is replaced. #[stable(feature = "rust1", since = "1.0.0")] - pub fn set_extension(&mut self, extension: S) -> bool { + pub fn set_extension>(&mut self, extension: S) -> bool { if self.file_name().is_none() { return false; } let mut stem = match self.file_stem() { Some(stem) => stem.to_os_string(), - None => OsString::from_str(""), + None => OsString::new(), }; - let extension = extension.as_os_str(); + let extension = extension.as_ref(); if os_str_as_u8_slice(extension).len() > 0 { stem.push("."); stem.push(extension); @@ -999,16 +1035,65 @@ impl PathBuf { } #[stable(feature = "rust1", since = "1.0.0")] -impl iter::FromIterator

for PathBuf { +impl<'a> From<&'a Path> for PathBuf { + fn from(s: &'a Path) -> PathBuf { + s.to_path_buf() + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a str> for PathBuf { + fn from(s: &'a str) -> PathBuf { + PathBuf::from(OsString::from(s)) + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a String> for PathBuf { + fn from(s: &'a String) -> PathBuf { + PathBuf::from(OsString::from(s)) + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl From for PathBuf { + fn from(s: String) -> PathBuf { + PathBuf::from(OsString::from(s)) + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a OsStr> for PathBuf { + fn from(s: &'a OsStr) -> PathBuf { + PathBuf::from(OsString::from(s)) + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl<'a> From<&'a OsString> for PathBuf { + fn from(s: &'a OsString) -> PathBuf { + PathBuf::from(s.to_os_string()) + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl From for PathBuf { + fn from(s: OsString) -> PathBuf { + PathBuf { inner: s } + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl> iter::FromIterator

for PathBuf { fn from_iter>(iter: I) -> PathBuf { - let mut buf = PathBuf::new(""); + let mut buf = PathBuf::new(); buf.extend(iter); buf } } #[stable(feature = "rust1", since = "1.0.0")] -impl iter::Extend

for PathBuf { +impl> iter::Extend

for PathBuf { fn extend>(&mut self, iter: I) { for p in iter { self.push(p) @@ -1084,12 +1169,27 @@ impl cmp::Ord for PathBuf { } #[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for PathBuf { + fn as_ref(&self) -> &OsStr { + &self.inner[..] + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl AsOsStr for PathBuf { fn as_os_str(&self) -> &OsStr { &self.inner[..] } } +#[stable(feature = "rust1", since = "1.0.0")] +impl Into for PathBuf { + fn into(self) -> OsString { + self.inner + } +} + /// A slice of a path (akin to `str`). /// /// This type supports a number of operations for inspecting a path, including @@ -1133,8 +1233,14 @@ impl Path { /// /// This is a cost-free conversion. #[stable(feature = "rust1", since = "1.0.0")] - pub fn new(s: &S) -> &Path { - unsafe { mem::transmute(s.as_os_str()) } + pub fn new + ?Sized>(s: &S) -> &Path { + unsafe { mem::transmute(s.as_ref()) } + } + + /// Yield the underlying `OsStr` slice. + #[stable(feature = "rust1", since = "1.0.0")] + pub fn as_os_str(&self) -> &OsStr { + &self.inner } /// Yield a `&str` slice if the `Path` is valid unicode. @@ -1156,7 +1262,7 @@ impl Path { /// Convert a `Path` to an owned `PathBuf`. #[stable(feature = "rust1", since = "1.0.0")] pub fn to_path_buf(&self) -> PathBuf { - PathBuf::new(self) + PathBuf::from(self.inner.to_os_string()) } /// A path is *absolute* if it is independent of the current directory. @@ -1244,22 +1350,21 @@ impl Path { /// Returns a path that, when joined onto `base`, yields `self`. #[unstable(feature = "path_relative_from", reason = "see #23284")] - pub fn relative_from<'a, P: ?Sized>(&'a self, base: &'a P) -> Option<&Path> where - P: AsPath + pub fn relative_from<'a, P: ?Sized + AsRef>(&'a self, base: &'a P) -> Option<&Path> { - iter_after(self.components(), base.as_path().components()).map(|c| c.as_path()) + iter_after(self.components(), base.as_ref().components()).map(|c| c.as_path()) } /// Determines whether `base` is a prefix of `self`. #[stable(feature = "rust1", since = "1.0.0")] - pub fn starts_with(&self, base: P) -> bool { - iter_after(self.components(), base.as_path().components()).is_some() + pub fn starts_with>(&self, base: P) -> bool { + iter_after(self.components(), base.as_ref().components()).is_some() } /// Determines whether `child` is a suffix of `self`. #[stable(feature = "rust1", since = "1.0.0")] - pub fn ends_with(&self, child: P) -> bool { - iter_after(self.components().rev(), child.as_path().components().rev()).is_some() + pub fn ends_with>(&self, child: P) -> bool { + iter_after(self.components().rev(), child.as_ref().components().rev()).is_some() } /// Extract the stem (non-extension) portion of `self.file()`. @@ -1292,7 +1397,7 @@ impl Path { /// /// See `PathBuf::push` for more details on what it means to adjoin a path. #[stable(feature = "rust1", since = "1.0.0")] - pub fn join(&self, path: P) -> PathBuf { + pub fn join>(&self, path: P) -> PathBuf { let mut buf = self.to_path_buf(); buf.push(path); buf @@ -1302,7 +1407,7 @@ impl Path { /// /// See `PathBuf::set_file_name` for more details. #[stable(feature = "rust1", since = "1.0.0")] - pub fn with_file_name(&self, file_name: S) -> PathBuf { + pub fn with_file_name>(&self, file_name: S) -> PathBuf { let mut buf = self.to_path_buf(); buf.set_file_name(file_name); buf @@ -1312,7 +1417,7 @@ impl Path { /// /// See `PathBuf::set_extension` for more details. #[stable(feature = "rust1", since = "1.0.0")] - pub fn with_extension(&self, extension: S) -> PathBuf { + pub fn with_extension>(&self, extension: S) -> PathBuf { let mut buf = self.to_path_buf(); buf.set_extension(extension); buf @@ -1346,6 +1451,14 @@ impl Path { } #[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for Path { + fn as_ref(&self) -> &OsStr { + &self.inner + } +} + +#[stable(feature = "rust1", since = "1.0.0")] +#[deprecated(since = "1.0.0", reason = "trait is deprecated")] impl AsOsStr for Path { fn as_os_str(&self) -> &OsStr { &self.inner @@ -1405,6 +1518,7 @@ impl cmp::Ord for Path { /// Freely convertible to a `Path`. #[unstable(feature = "std_misc")] +#[deprecated(since = "1.0.0", reason = "use std::convert::AsRef instead")] pub trait AsPath { /// Convert to a `Path`. #[unstable(feature = "std_misc")] @@ -1412,10 +1526,42 @@ pub trait AsPath { } #[unstable(feature = "std_misc")] +#[deprecated(since = "1.0.0", reason = "use std::convert::AsRef instead")] +#[allow(deprecated)] impl AsPath for T { fn as_path(&self) -> &Path { Path::new(self.as_os_str()) } } +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for Path { + fn as_ref(&self) -> &Path { self } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for OsStr { + fn as_ref(&self) -> &Path { Path::new(self) } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for OsString { + fn as_ref(&self) -> &Path { Path::new(self) } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for str { + fn as_ref(&self) -> &Path { Path::new(self) } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for String { + fn as_ref(&self) -> &Path { Path::new(self) } +} + +#[stable(feature = "rust1", since = "1.0.0")] +impl AsRef for PathBuf { + fn as_ref(&self) -> &Path { self } +} + #[cfg(test)] mod tests { use super::*; diff --git a/src/libstd/prelude/v1.rs b/src/libstd/prelude/v1.rs index a0b4c80e9f3fa..6e12ac1a22659 100644 --- a/src/libstd/prelude/v1.rs +++ b/src/libstd/prelude/v1.rs @@ -29,6 +29,8 @@ #[doc(no_inline)] pub use clone::Clone; #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord}; +#[unstable(feature = "convert")] +#[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From}; #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] pub use iter::DoubleEndedIterator; #[stable(feature = "rust1", since = "1.0.0")] @@ -40,8 +42,10 @@ #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] pub use result::Result::{self, Ok, Err}; #[stable(feature = "rust1", since = "1.0.0")] +#[allow(deprecated)] #[doc(no_inline)] pub use slice::{SliceConcatExt, AsSlice}; #[stable(feature = "rust1", since = "1.0.0")] +#[allow(deprecated)] #[doc(no_inline)] pub use str::Str; #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] pub use string::{String, ToString}; diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 6b09636c1df1e..d11c3d221445f 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -19,8 +19,8 @@ use io::prelude::*; use ffi::AsOsStr; use fmt; use io::{self, Error, ErrorKind}; -use path::AsPath; use libc; +use path; use sync::mpsc::{channel, Receiver}; use sys::pipe2::{self, AnonPipe}; use sys::process2::Process as ProcessImp; @@ -198,8 +198,8 @@ impl Command { /// Set the working directory for the child process. #[stable(feature = "process", since = "1.0.0")] - pub fn current_dir(&mut self, dir: P) -> &mut Command { - self.inner.cwd(dir.as_path().as_os_str()); + pub fn current_dir>(&mut self, dir: P) -> &mut Command { + self.inner.cwd(dir.as_ref().as_os_str()); self } diff --git a/src/libstd/sys/unix/fs2.rs b/src/libstd/sys/unix/fs2.rs index ea74aab3331ae..202e5ddaec42b 100644 --- a/src/libstd/sys/unix/fs2.rs +++ b/src/libstd/sys/unix/fs2.rs @@ -338,8 +338,7 @@ pub fn readlink(p: &Path) -> io::Result { })); buf.set_len(n as usize); } - let s: OsString = OsStringExt::from_vec(buf); - Ok(PathBuf::new(&s)) + Ok(PathBuf::from(OsString::from_vec(buf))) } pub fn symlink(src: &Path, dst: &Path) -> io::Result<()> { diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index a5a2f71acb7e0..6c191689255bc 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -36,7 +36,7 @@ const BUF_BYTES: usize = 2048; const TMPBUF_SZ: usize = 128; fn bytes2path(b: &[u8]) -> PathBuf { - PathBuf::new(::from_bytes(b)) + PathBuf::from(::from_bytes(b)) } fn os2path(os: OsString) -> PathBuf { @@ -253,7 +253,7 @@ pub fn current_exe() -> io::Result { let err = _NSGetExecutablePath(v.as_mut_ptr() as *mut i8, &mut sz); if err != 0 { return Err(io::Error::last_os_error()); } v.set_len(sz as uint - 1); // chop off trailing NUL - Ok(PathBuf::new(OsString::from_vec(v))) + Ok(PathBuf::from(OsString::from_vec(v))) } } @@ -466,9 +466,9 @@ pub fn page_size() -> usize { pub fn temp_dir() -> PathBuf { getenv("TMPDIR".as_os_str()).map(os2path).unwrap_or_else(|| { if cfg!(target_os = "android") { - PathBuf::new("/data/local/tmp") + PathBuf::from("/data/local/tmp") } else { - PathBuf::new("/tmp") + PathBuf::from("/tmp") } }) } diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 70aab26092c44..1abe8d0a3c1b1 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -351,8 +351,7 @@ impl Encodable for FileMap { let max_line_length = if lines.len() == 1 { 0 } else { - lines.as_slice() - .windows(2) + lines.windows(2) .map(|w| w[1] - w[0]) .map(|bp| bp.to_usize()) .max() diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index c61aec0069db2..31d8b207bb9f0 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -194,7 +194,7 @@ pub fn expand_include_bytes(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) fn res_rel_file(cx: &mut ExtCtxt, sp: codemap::Span, arg: &Path) -> PathBuf { // NB: relative paths are resolved relative to the compilation unit if !arg.is_absolute() { - let mut cu = PathBuf::new(&cx.codemap().span_to_filename(sp)); + let mut cu = PathBuf::from(&cx.codemap().span_to_filename(sp)); cu.pop(); cu.push(arg); cu diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 9f217bba00ab6..9af7b9ab63311 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -39,6 +39,8 @@ #![feature(unicode)] #![feature(path_ext)] #![feature(str_char)] +#![feature(convert)] +#![feature(into_cow)] extern crate arena; extern crate fmt_macros; diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 667af642744b9..e77786c134707 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5064,8 +5064,8 @@ impl<'a> Parser<'a> { outer_attrs: &[ast::Attribute], id_sp: Span) -> (ast::Item_, Vec ) { - let mut prefix = PathBuf::new(&self.sess.span_diagnostic.cm - .span_to_filename(self.span)); + let mut prefix = PathBuf::from(&self.sess.span_diagnostic.cm + .span_to_filename(self.span)); prefix.pop(); let mut dir_path = prefix; for part in &self.mod_path_stack { diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index f517dca53cdd2..8e3c00bb805fe 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -62,6 +62,7 @@ #![feature(std_misc)] #![feature(str_char)] #![feature(path_ext)] +#![feature(convert)] #![cfg_attr(windows, feature(libc))] #[macro_use] extern crate log; diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs index f47921cbf5e6a..66ee2b1ba87cb 100644 --- a/src/libterm/terminfo/searcher.rs +++ b/src/libterm/terminfo/searcher.rs @@ -31,7 +31,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option> { // Find search directory match env::var_os("TERMINFO") { - Some(dir) => dirs_to_search.push(PathBuf::new(&dir)), + Some(dir) => dirs_to_search.push(PathBuf::from(dir)), None => { if homedir.is_some() { // ncurses compatibility; @@ -40,9 +40,9 @@ pub fn get_dbpath_for_term(term: &str) -> Option> { match env::var("TERMINFO_DIRS") { Ok(dirs) => for i in dirs.split(':') { if i == "" { - dirs_to_search.push(PathBuf::new("/usr/share/terminfo")); + dirs_to_search.push(PathBuf::from("/usr/share/terminfo")); } else { - dirs_to_search.push(PathBuf::new(i)); + dirs_to_search.push(PathBuf::from(i)); } }, // Found nothing in TERMINFO_DIRS, use the default paths: @@ -50,9 +50,9 @@ pub fn get_dbpath_for_term(term: &str) -> Option> { // ~/.terminfo, ncurses will search /etc/terminfo, then // /lib/terminfo, and eventually /usr/share/terminfo. Err(..) => { - dirs_to_search.push(PathBuf::new("/etc/terminfo")); - dirs_to_search.push(PathBuf::new("/lib/terminfo")); - dirs_to_search.push(PathBuf::new("/usr/share/terminfo")); + dirs_to_search.push(PathBuf::from("/etc/terminfo")); + dirs_to_search.push(PathBuf::from("/lib/terminfo")); + dirs_to_search.push(PathBuf::from("/usr/share/terminfo")); } } } diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 51decbab8587d..94944453eda07 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -45,6 +45,7 @@ #![feature(libc)] #![feature(set_stdio)] #![feature(os)] +#![feature(convert)] extern crate getopts; extern crate serialize; @@ -382,7 +383,7 @@ pub fn parse_opts(args: &[String]) -> Option { let run_ignored = matches.opt_present("ignored"); let logfile = matches.opt_str("logfile"); - let logfile = logfile.map(|s| PathBuf::new(&s)); + let logfile = logfile.map(|s| PathBuf::from(&s)); let run_benchmarks = matches.opt_present("bench"); let run_tests = ! run_benchmarks || @@ -696,7 +697,7 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec ) -> io::Res match tests.iter().max_by(|t|len_if_padded(*t)) { Some(t) => { let n = t.desc.name.as_slice(); - st.max_name_len = n.as_slice().len(); + st.max_name_len = n.len(); }, None => {} } diff --git a/src/rustbook/book.rs b/src/rustbook/book.rs index ac7f2f824cbbf..a08481f8be94e 100644 --- a/src/rustbook/book.rs +++ b/src/rustbook/book.rs @@ -102,8 +102,8 @@ pub fn parse_summary(input: &mut Read, src: &Path) -> Result> // always include the introduction top_items.push(BookItem { title: "Introduction".to_string(), - path: PathBuf::new("README.md"), - path_to_root: PathBuf::new("."), + path: PathBuf::from("README.md"), + path_to_root: PathBuf::from("."), children: vec!(), }); @@ -133,10 +133,10 @@ pub fn parse_summary(input: &mut Read, src: &Path) -> Result> errors.push(format!("paths in SUMMARY.md must be relative, \ but path '{}' for section '{}' is not.", given_path, title)); - PathBuf::new("") + PathBuf::new() } }; - let path_to_root = PathBuf::new(&iter::repeat("../") + let path_to_root = PathBuf::from(&iter::repeat("../") .take(path_from_root.components().count() - 1) .collect::()); let item = BookItem { diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs index 731773917e091..f06290b27cb28 100644 --- a/src/rustbook/build.rs +++ b/src/rustbook/build.rs @@ -87,7 +87,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> { if env::args().len() < 3 { src = env::current_dir().unwrap().clone(); } else { - src = PathBuf::new(&env::args().nth(2).unwrap()); + src = PathBuf::from(&env::args().nth(2).unwrap()); } // preprocess the markdown, rerouting markdown references to html references let mut markdown_data = String::new(); @@ -164,13 +164,13 @@ impl Subcommand for Build { if env::args().len() < 3 { src = cwd.clone(); } else { - src = PathBuf::new(&env::args().nth(2).unwrap()); + src = PathBuf::from(&env::args().nth(2).unwrap()); } if env::args().len() < 4 { tgt = cwd.join("_book"); } else { - tgt = PathBuf::new(&env::args().nth(3).unwrap()); + tgt = PathBuf::from(&env::args().nth(3).unwrap()); } try!(fs::create_dir(&tgt)); diff --git a/src/rustbook/main.rs b/src/rustbook/main.rs index 09fcd518c1e7e..4a652f846ed58 100644 --- a/src/rustbook/main.rs +++ b/src/rustbook/main.rs @@ -15,6 +15,7 @@ #![feature(rustdoc)] #![feature(rustc_private)] #![feature(path_relative_from)] +#![feature(convert)] extern crate rustdoc; extern crate rustc_back; diff --git a/src/test/run-pass/env-home-dir.rs b/src/test/run-pass/env-home-dir.rs index 5d68a25a14ada..cd61475045128 100644 --- a/src/test/run-pass/env-home-dir.rs +++ b/src/test/run-pass/env-home-dir.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(convert)] + use std::env::*; use std::path::PathBuf; @@ -16,7 +18,7 @@ fn main() { let oldhome = var("HOME"); set_var("HOME", "/home/MountainView"); - assert!(home_dir() == Some(PathBuf::new("/home/MountainView"))); + assert!(home_dir() == Some(PathBuf::from("/home/MountainView"))); remove_var("HOME"); if cfg!(target_os = "android") { @@ -37,14 +39,14 @@ fn main() { assert!(home_dir().is_some()); set_var("HOME", "/home/MountainView"); - assert!(home_dir() == Some(PathBuf::new("/home/MountainView"))); + assert!(home_dir() == Some(PathBuf::from("/home/MountainView"))); remove_var("HOME"); set_var("USERPROFILE", "/home/MountainView"); - assert!(home_dir() == Some(PathBuf::new("/home/MountainView"))); + assert!(home_dir() == Some(PathBuf::from("/home/MountainView"))); set_var("HOME", "/home/MountainView"); set_var("USERPROFILE", "/home/PaloAlto"); - assert!(home_dir() == Some(PathBuf::new("/home/MountainView"))); + assert!(home_dir() == Some(PathBuf::from("/home/MountainView"))); } From d97d53891dad8e723aed295af85029d5a741c1fd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 23 Mar 2015 15:03:07 -0700 Subject: [PATCH 60/69] std: Stabilize the `Hasher::finish` method This commit enables writing a stable implementation of the `Hasher` trait as well as actually calculating the hash of a vlaue in a stable fashion. The signature is stabilized as-is. --- src/libcore/hash/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index fdc0020dfcd61..71cafc3756ae8 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -90,7 +90,7 @@ pub trait Hash { #[stable(feature = "rust1", since = "1.0.0")] pub trait Hasher { /// Completes a round of hashing, producing the output hash generated. - #[unstable(feature = "hash", reason = "module was recently redesigned")] + #[stable(feature = "rust1", since = "1.0.0")] fn finish(&self) -> u64; /// Writes some data into this `Hasher` From 8bd8466e812e7c5acb99a50493e45aeb1bb81e93 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 20 Mar 2015 06:48:40 -0400 Subject: [PATCH 61/69] Refactor how we handle overflow so that it is a fatal error that aborts compilation: this removes all the ungainly code that special cases overflow so that we can ensure it propagates. --- src/librustc/middle/traits/error_reporting.rs | 54 ++++++++++++------- src/librustc/middle/traits/mod.rs | 36 +++---------- src/librustc/middle/traits/project.rs | 4 +- src/librustc/middle/traits/select.rs | 20 +++---- src/librustc/middle/traits/util.rs | 3 -- src/librustc_trans/trans/common.rs | 21 +++----- src/test/compile-fail/issue-18400.rs | 3 -- src/test/compile-fail/recursion_limit.rs | 9 +--- 8 files changed, 61 insertions(+), 89 deletions(-) diff --git a/src/librustc/middle/traits/error_reporting.rs b/src/librustc/middle/traits/error_reporting.rs index d2b5b460d1420..d10ff060418cc 100644 --- a/src/librustc/middle/traits/error_reporting.rs +++ b/src/librustc/middle/traits/error_reporting.rs @@ -12,6 +12,7 @@ use super::{ FulfillmentError, FulfillmentErrorCode, MismatchedProjectionTypes, + Obligation, ObligationCauseCode, OutputTypeParameterMismatch, PredicateObligation, @@ -21,6 +22,7 @@ use super::{ use fmt_macros::{Parser, Piece, Position}; use middle::infer::InferCtxt; use middle::ty::{self, AsPredicate, ReferencesError, ToPolyTraitRef, TraitRef}; +use middle::ty_fold::TypeFoldable; use std::collections::HashMap; use syntax::codemap::{DUMMY_SP, Span}; use syntax::attr::{AttributeMethods, AttrMetaMethods}; @@ -137,24 +139,36 @@ fn report_on_unimplemented<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, report } +/// Reports that an overflow has occurred and halts compilation. We +/// halt compilation unconditionally because it is important that +/// overflows never be masked -- they basically represent computations +/// whose result could not be truly determined and thus we can't say +/// if the program type checks or not -- and they are unusual +/// occurrences in any case. +pub fn report_overflow_error<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>, + obligation: &Obligation<'tcx, T>) + -> ! + where T: UserString<'tcx> + TypeFoldable<'tcx> +{ + let predicate = + infcx.resolve_type_vars_if_possible(&obligation.predicate); + span_err!(infcx.tcx.sess, obligation.cause.span, E0275, + "overflow evaluating the requirement `{}`", + predicate.user_string(infcx.tcx)); + + suggest_new_overflow_limit(infcx.tcx, obligation.cause.span); + + note_obligation_cause(infcx, obligation); + + infcx.tcx.sess.abort_if_errors(); + unreachable!(); +} + pub fn report_selection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, obligation: &PredicateObligation<'tcx>, error: &SelectionError<'tcx>) { match *error { - SelectionError::Overflow => { - // We could track the stack here more precisely if we wanted, I imagine. - let predicate = - infcx.resolve_type_vars_if_possible(&obligation.predicate); - span_err!(infcx.tcx.sess, obligation.cause.span, E0275, - "overflow evaluating the requirement `{}`", - predicate.user_string(infcx.tcx)); - - suggest_new_overflow_limit(infcx.tcx, obligation.cause.span); - - note_obligation_cause(infcx, obligation); - } - SelectionError::Unimplemented => { match &obligation.cause.code { &ObligationCauseCode::CompareImplMethodObligation => { @@ -309,8 +323,9 @@ pub fn maybe_report_ambiguity<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, } } -fn note_obligation_cause<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, - obligation: &PredicateObligation<'tcx>) +fn note_obligation_cause<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>, + obligation: &Obligation<'tcx, T>) + where T: UserString<'tcx> { note_obligation_cause_code(infcx, &obligation.predicate, @@ -318,10 +333,11 @@ fn note_obligation_cause<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, &obligation.cause.code); } -fn note_obligation_cause_code<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, - predicate: &ty::Predicate<'tcx>, - cause_span: Span, - cause_code: &ObligationCauseCode<'tcx>) +fn note_obligation_cause_code<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>, + predicate: &T, + cause_span: Span, + cause_code: &ObligationCauseCode<'tcx>) + where T: UserString<'tcx> { let tcx = infcx.tcx; match *cause_code { diff --git a/src/librustc/middle/traits/mod.rs b/src/librustc/middle/traits/mod.rs index f46cac308287b..24b201c960f16 100644 --- a/src/librustc/middle/traits/mod.rs +++ b/src/librustc/middle/traits/mod.rs @@ -23,9 +23,10 @@ use std::slice::Iter; use std::rc::Rc; use syntax::ast; use syntax::codemap::{Span, DUMMY_SP}; -use util::ppaux::{Repr, UserString}; +use util::ppaux::Repr; pub use self::error_reporting::report_fulfillment_errors; +pub use self::error_reporting::report_overflow_error; pub use self::error_reporting::suggest_new_overflow_limit; pub use self::coherence::orphan_check; pub use self::coherence::overlapping_impls; @@ -151,7 +152,6 @@ pub type Selection<'tcx> = Vtable<'tcx, PredicateObligation<'tcx>>; #[derive(Clone,Debug)] pub enum SelectionError<'tcx> { Unimplemented, - Overflow, OutputTypeParameterMismatch(ty::PolyTraitRef<'tcx>, ty::PolyTraitRef<'tcx>, ty::type_err<'tcx>), @@ -327,16 +327,9 @@ pub fn evaluate_builtin_bound<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>, let result = match fulfill_cx.select_all_or_error(infcx, typer) { Ok(()) => Ok(Some(())), // Success, we know it implements Copy. Err(errors) => { - // Check if overflow occurred anywhere and propagate that. - if errors.iter().any( - |err| match err.code { CodeSelectionError(Overflow) => true, _ => false }) - { - return Err(Overflow); - } - - // Otherwise, if there were any hard errors, propagate an - // arbitrary one of those. If no hard errors at all, - // report ambiguity. + // If there were any hard errors, propagate an arbitrary + // one of those. If no hard errors at all, report + // ambiguity. let sel_error = errors.iter() .filter_map(|err| { @@ -384,16 +377,8 @@ pub fn type_known_to_meet_builtin_bound<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>, // soldering on, so just treat this like not implemented false } - Err(Overflow) => { - span_err!(infcx.tcx.sess, span, E0285, - "overflow evaluating whether `{}` is `{}`", - ty.user_string(infcx.tcx), - bound.user_string(infcx.tcx)); - suggest_new_overflow_limit(infcx.tcx, span); - false - } Err(_) => { - // other errors: not implemented. + // errors: not implemented. false } } @@ -652,15 +637,6 @@ impl<'tcx> FulfillmentError<'tcx> { { FulfillmentError { obligation: obligation, code: code } } - - pub fn is_overflow(&self) -> bool { - match self.code { - CodeAmbiguity => false, - CodeSelectionError(Overflow) => true, - CodeSelectionError(_) => false, - CodeProjectionError(_) => false, - } - } } impl<'tcx> TraitObligation<'tcx> { diff --git a/src/librustc/middle/traits/project.rs b/src/librustc/middle/traits/project.rs index 6b66d7227d300..a67410998c727 100644 --- a/src/librustc/middle/traits/project.rs +++ b/src/librustc/middle/traits/project.rs @@ -11,9 +11,9 @@ //! Code for projecting associated types out of trait references. use super::elaborate_predicates; +use super::report_overflow_error; use super::Obligation; use super::ObligationCause; -use super::Overflow; use super::PredicateObligation; use super::SelectionContext; use super::SelectionError; @@ -442,7 +442,7 @@ fn project_type<'cx,'tcx>( let recursion_limit = selcx.tcx().sess.recursion_limit.get(); if obligation.recursion_depth >= recursion_limit { debug!("project: overflow!"); - return Err(ProjectionTyError::TraitSelectionError(Overflow)); + report_overflow_error(selcx.infcx(), &obligation); } let obligation_trait_ref = diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 7dfbccea0dccd..026ef7d4d0e44 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -21,8 +21,9 @@ use super::DerivedObligationCause; use super::project; use super::project::{normalize_with_depth, Normalized}; use super::{PredicateObligation, TraitObligation, ObligationCause}; +use super::{report_overflow_error}; use super::{ObligationCauseCode, BuiltinDerivedObligation, ImplDerivedObligation}; -use super::{SelectionError, Unimplemented, Overflow, OutputTypeParameterMismatch}; +use super::{SelectionError, Unimplemented, OutputTypeParameterMismatch}; use super::{Selection}; use super::{SelectionResult}; use super::{VtableBuiltin, VtableImpl, VtableParam, VtableClosure, @@ -561,10 +562,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { // not update) the cache. let recursion_limit = self.infcx.tcx.sess.recursion_limit.get(); if stack.obligation.recursion_depth >= recursion_limit { - debug!("{} --> overflow (limit={})", - stack.obligation.repr(self.tcx()), - recursion_limit); - return Err(Overflow) + report_overflow_error(self.infcx(), &stack.obligation); } // Check the cache. Note that we skolemize the trait-ref @@ -2582,11 +2580,13 @@ impl<'o, 'tcx> Repr<'tcx> for TraitObligationStack<'o, 'tcx> { impl<'tcx> EvaluationResult<'tcx> { fn may_apply(&self) -> bool { match *self { - EvaluatedToOk - | EvaluatedToAmbig - | EvaluatedToErr(Overflow) - | EvaluatedToErr(OutputTypeParameterMismatch(..)) => true, - EvaluatedToErr(Unimplemented) => false, + EvaluatedToOk | + EvaluatedToAmbig | + EvaluatedToErr(OutputTypeParameterMismatch(..)) => + true, + + EvaluatedToErr(Unimplemented) => + false, } } } diff --git a/src/librustc/middle/traits/util.rs b/src/librustc/middle/traits/util.rs index 88b721ce95862..965aaf12044ec 100644 --- a/src/librustc/middle/traits/util.rs +++ b/src/librustc/middle/traits/util.rs @@ -514,9 +514,6 @@ impl<'tcx> Repr<'tcx> for super::VtableObjectData<'tcx> { impl<'tcx> Repr<'tcx> for super::SelectionError<'tcx> { fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String { match *self { - super::Overflow => - format!("Overflow"), - super::Unimplemented => format!("Unimplemented"), diff --git a/src/librustc_trans/trans/common.rs b/src/librustc_trans/trans/common.rs index 8f5dbfe2ec000..69846d4f0e4e4 100644 --- a/src/librustc_trans/trans/common.rs +++ b/src/librustc_trans/trans/common.rs @@ -1025,8 +1025,9 @@ pub fn fulfill_obligation<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, // shallow result we are looking for -- that is, what specific impl. let typer = NormalizingClosureTyper::new(tcx); let mut selcx = traits::SelectionContext::new(&infcx, &typer); - let obligation = traits::Obligation::new(traits::ObligationCause::dummy(), - trait_ref.to_poly_trait_predicate()); + let obligation = + traits::Obligation::new(traits::ObligationCause::misc(span, ast::DUMMY_NODE_ID), + trait_ref.to_poly_trait_predicate()); let selection = match selcx.select(&obligation) { Ok(Some(selection)) => selection, Ok(None) => { @@ -1081,7 +1082,7 @@ pub fn predicates_hold<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, let obligation = traits::Obligation::new(traits::ObligationCause::dummy(), predicate); fulfill_cx.register_predicate_obligation(&infcx, obligation); } - drain_fulfillment_cx(DUMMY_SP, &infcx, &mut fulfill_cx, &()).is_ok() + drain_fulfillment_cx(&infcx, &mut fulfill_cx, &()).is_ok() } pub struct NormalizingClosureTyper<'a,'tcx:'a> { @@ -1138,7 +1139,7 @@ pub fn drain_fulfillment_cx_or_panic<'a,'tcx,T>(span: Span, -> T where T : TypeFoldable<'tcx> + Repr<'tcx> { - match drain_fulfillment_cx(span, infcx, fulfill_cx, result) { + match drain_fulfillment_cx(infcx, fulfill_cx, result) { Ok(v) => v, Err(errors) => { infcx.tcx.sess.span_bug( @@ -1156,8 +1157,7 @@ pub fn drain_fulfillment_cx_or_panic<'a,'tcx,T>(span: Span, /// inference variables that appear in `result` to be unified, and /// hence we need to process those obligations to get the complete /// picture of the type. -pub fn drain_fulfillment_cx<'a,'tcx,T>(span: Span, - infcx: &infer::InferCtxt<'a,'tcx>, +pub fn drain_fulfillment_cx<'a,'tcx,T>(infcx: &infer::InferCtxt<'a,'tcx>, fulfill_cx: &mut traits::FulfillmentContext<'tcx>, result: &T) -> StdResult>> @@ -1173,14 +1173,7 @@ pub fn drain_fulfillment_cx<'a,'tcx,T>(span: Span, match fulfill_cx.select_all_or_error(infcx, &typer) { Ok(()) => { } Err(errors) => { - // We always want to surface any overflow errors, no matter what. - if errors.iter().all(|e| e.is_overflow()) { - infcx.tcx.sess.span_fatal( - span, - "reached the recursion limit during monomorphization"); - } else { - return Err(errors); - } + return Err(errors); } } diff --git a/src/test/compile-fail/issue-18400.rs b/src/test/compile-fail/issue-18400.rs index 015f1fa603a20..f8d85f939374d 100644 --- a/src/test/compile-fail/issue-18400.rs +++ b/src/test/compile-fail/issue-18400.rs @@ -33,7 +33,4 @@ fn main() { 0.contains(bits); //~^ ERROR overflow - //~| ERROR overflow - //~| ERROR overflow - //~| ERROR mismatched types } diff --git a/src/test/compile-fail/recursion_limit.rs b/src/test/compile-fail/recursion_limit.rs index e8bc11317f2aa..368269999a296 100644 --- a/src/test/compile-fail/recursion_limit.rs +++ b/src/test/compile-fail/recursion_limit.rs @@ -42,12 +42,5 @@ fn is_send() { } fn main() { is_send::(); //~^ ERROR overflow evaluating - //~^^ NOTE consider adding a `#![recursion_limit="20"]` attribute to your crate - //~^^^ NOTE required by `is_send` - //~^^^^ ERROR overflow evaluating - //~^^^^^ NOTE consider adding a `#![recursion_limit="20"]` attribute to your crate - //~^^^^^^ NOTE required by `is_send` - //~^^^^^^^ ERROR overflow evaluating - //~^^^^^^^^ NOTE consider adding a `#![recursion_limit="20"]` attribute to your crate - //~^^^^^^^^^ NOTE required by `is_send` + //~| NOTE consider adding a `#![recursion_limit="20"]` attribute to your crate } From 76ead081088d7cc88a4686210b72b60ae12bd7a8 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 21 Mar 2015 06:02:56 -0400 Subject: [PATCH 62/69] Remove auto-deref'ing Pattern impl because it conflicts with other possible blanket impls and also triggers internal overflow. Add some special cases for common uses (&&str, &String) for now; bounds-targeting deref coercions are probably the right longer term answer. --- src/libcollections/string.rs | 20 ++++++++++++++++++++ src/libcore/str/pattern.rs | 20 +++++++------------- src/libcoretest/str.rs | 2 -- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index cd6f27bf65f6e..7eccd5fa3b605 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -25,6 +25,7 @@ use core::mem; use core::ops::{self, Deref, Add, Index}; use core::ptr; use core::slice; +use core::str::Pattern; use unicode::str as unicode_str; use unicode::str::Utf16Item; @@ -765,6 +766,25 @@ impl<'a> Extend<&'a str> for String { } } +/// A convenience impl that delegates to the impl for `&str` +impl<'a, 'b> Pattern<'a> for &'b String { + type Searcher = <&'b str as Pattern<'a>>::Searcher; + + fn into_searcher(self, haystack: &'a str) -> <&'b str as Pattern<'a>>::Searcher { + self[..].into_searcher(haystack) + } + + #[inline] + fn is_contained_in(self, haystack: &'a str) -> bool { + self[..].is_contained_in(haystack) + } + + #[inline] + fn is_prefix_of(self, haystack: &'a str) -> bool { + self[..].is_prefix_of(haystack) + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl PartialEq for String { #[inline] diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs index 7bf248917a5cd..98b6533980dd9 100644 --- a/src/libcore/str/pattern.rs +++ b/src/libcore/str/pattern.rs @@ -474,22 +474,16 @@ impl<'a, 'b> Pattern<'a> for &'b [char] { s, CharEqPattern(s)); } +/// A convenience impl that delegates to the impl for `&str` +impl<'a, 'b> Pattern<'a> for &'b &'b str { + type Searcher = <&'b str as Pattern<'a>>::Searcher; + associated_items!(<&'b str as Pattern<'a>>::Searcher, + s, (*s)); +} + /// Searches for chars that match the given predicate impl<'a, F> Pattern<'a> for F where F: FnMut(char) -> bool { type Searcher = as Pattern<'a>>::Searcher; associated_items!( as Pattern<'a>>::Searcher, s, CharEqPattern(s)); } - -// Deref-forward impl - -use ops::Deref; - -/// Delegates to the next deref coercion of `Self` that implements `Pattern` -impl<'a, 'b, P: 'b + ?Sized, T: Deref + ?Sized> Pattern<'a> for &'b T - where &'b P: Pattern<'a> -{ - type Searcher = <&'b P as Pattern<'a>>::Searcher; - associated_items!(<&'b P as Pattern<'a>>::Searcher, - s, (&**s)); -} diff --git a/src/libcoretest/str.rs b/src/libcoretest/str.rs index cac78363dd53b..38cab4f0e0942 100644 --- a/src/libcoretest/str.rs +++ b/src/libcoretest/str.rs @@ -13,9 +13,7 @@ fn test_pattern_deref_forward() { let data = "aabcdaa"; assert!(data.contains("bcd")); assert!(data.contains(&"bcd")); - assert!(data.contains(&&"bcd")); assert!(data.contains(&"bcd".to_string())); - assert!(data.contains(&&"bcd".to_string())); } #[test] From 04e667a6b15bb83f16f03a0dd3c4b8612ba5c8b7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 23 Mar 2015 15:18:40 -0700 Subject: [PATCH 63/69] Test fixes and rebase conflicts, round 1 --- src/librustc_back/rpath.rs | 2 +- src/libstd/env.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_back/rpath.rs b/src/librustc_back/rpath.rs index 68d21abb50ef5..10d17e266edfc 100644 --- a/src/librustc_back/rpath.rs +++ b/src/librustc_back/rpath.rs @@ -115,7 +115,7 @@ fn path_relative_from(path: &Path, base: &Path) -> Option { if path.is_absolute() != base.is_absolute() { if path.is_absolute() { - Some(PathBuf::new(path)) + Some(PathBuf::from(path)) } else { None } diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 9d6933ce9c89c..00ce6917835ff 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -23,7 +23,7 @@ use error::Error; use ffi::{OsString, AsOsStr}; use fmt; use io; -use path::{self, Path, PathBuf}; +use path::{Path, PathBuf}; use sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering}; use sync::{StaticMutex, MUTEX_INIT}; use sys::os as os_imp; From 248b2ecd18cc2dbed7b3393aa29c232c074db6b8 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Wed, 18 Mar 2015 23:36:19 -0700 Subject: [PATCH 64/69] Stabilize Entry types This commit marks as `#[stable]` the `Entry` types for the maps provided by `std`. The main reason these had been left unstable previously was uncertainty about an eventual trait design, but several plausible designs have been proposed that all work fine with the current type definitions. --- src/libcollections/btree/map.rs | 16 ++++++++-------- src/libcollections/vec_map.rs | 16 +++++++++------- src/librustc_lint/lib.rs | 1 - src/librustc_typeck/lib.rs | 1 - src/libstd/collections/hash/map.rs | 16 ++++++++-------- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index a9e1ce8d7ce50..0baf9ea046654 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -124,26 +124,26 @@ pub struct RangeMut<'a, K: 'a, V: 'a> { } /// A view into a single entry in a map, which may either be vacant or occupied. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub enum Entry<'a, K:'a, V:'a> { /// A vacant Entry + #[stable(feature = "rust1", since = "1.0.0")] Vacant(VacantEntry<'a, K, V>), + /// An occupied Entry + #[stable(feature = "rust1", since = "1.0.0")] Occupied(OccupiedEntry<'a, K, V>), } /// A vacant Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct VacantEntry<'a, K:'a, V:'a> { key: K, stack: stack::SearchStack<'a, K, V, node::handle::Edge, node::handle::Leaf>, } /// An occupied Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct OccupiedEntry<'a, K:'a, V:'a> { stack: stack::SearchStack<'a, K, V, node::handle::KV, node::handle::LeafOrInternal>, } @@ -1115,9 +1115,9 @@ impl<'a, K, V> DoubleEndedIterator for RangeMut<'a, K, V> { } impl<'a, K: Ord, V> Entry<'a, K, V> { - #[unstable(feature = "collections", - reason = "matches collection reform v2 specification, waiting for dust to settle")] /// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant + #[unstable(feature = "std_misc", + reason = "will soon be replaced by or_insert")] pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, K, V>> { match self { Occupied(entry) => Ok(entry.into_mut()), diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index 6e67d8763273d..056be4acaeb80 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -67,26 +67,28 @@ pub struct VecMap { } /// A view into a single entry in a map, which may either be vacant or occupied. -#[unstable(feature = "collections", - reason = "precise API still under development")] + +#[stable(feature = "rust1", since = "1.0.0")] pub enum Entry<'a, V:'a> { /// A vacant Entry + #[stable(feature = "rust1", since = "1.0.0")] Vacant(VacantEntry<'a, V>), + /// An occupied Entry + #[stable(feature = "rust1", since = "1.0.0")] Occupied(OccupiedEntry<'a, V>), } /// A vacant Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] + +#[stable(feature = "rust1", since = "1.0.0")] pub struct VacantEntry<'a, V:'a> { map: &'a mut VecMap, index: usize, } /// An occupied Entry. -#[unstable(feature = "collections", - reason = "precise API still under development")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct OccupiedEntry<'a, V:'a> { map: &'a mut VecMap, index: usize, @@ -651,7 +653,7 @@ impl VecMap { impl<'a, V> Entry<'a, V> { #[unstable(feature = "collections", - reason = "matches collection reform v2 specification, waiting for dust to settle")] + reason = "will soon be replaced by or_insert")] /// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, V>> { match self { diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 99b3393c003de..ef65acf8b13f4 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -40,7 +40,6 @@ #![feature(rustc_private)] #![feature(unsafe_destructor)] #![feature(staged_api)] -#![feature(std_misc)] #![feature(str_char)] #![cfg_attr(test, feature(test))] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 6bdfb17ec1c44..4e7e63a5d7779 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -80,7 +80,6 @@ This API is completely unstable and subject to change. #![feature(collections)] #![feature(core)] #![feature(int_uint)] -#![feature(std_misc)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_private)] diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 9139e182ce479..330891273e755 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1323,15 +1323,13 @@ pub struct Drain<'a, K: 'a, V: 'a> { } /// A view into a single occupied location in a HashMap. -#[unstable(feature = "std_misc", - reason = "precise API still being fleshed out")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct OccupiedEntry<'a, K: 'a, V: 'a> { elem: FullBucket>, } /// A view into a single empty location in a HashMap. -#[unstable(feature = "std_misc", - reason = "precise API still being fleshed out")] +#[stable(feature = "rust1", since = "1.0.0")] pub struct VacantEntry<'a, K: 'a, V: 'a> { hash: SafeHash, key: K, @@ -1339,12 +1337,14 @@ pub struct VacantEntry<'a, K: 'a, V: 'a> { } /// A view into a single location in a map, which may be vacant or occupied. -#[unstable(feature = "std_misc", - reason = "precise API still being fleshed out")] +#[stable(feature = "rust1", since = "1.0.0")] pub enum Entry<'a, K: 'a, V: 'a> { /// An occupied Entry. + #[stable(feature = "rust1", since = "1.0.0")] Occupied(OccupiedEntry<'a, K, V>), + /// A vacant Entry. + #[stable(feature = "rust1", since = "1.0.0")] Vacant(VacantEntry<'a, K, V>), } @@ -1465,10 +1465,10 @@ impl<'a, K, V> ExactSizeIterator for Drain<'a, K, V> { #[inline] fn len(&self) -> usize { self.inner.len() } } -#[unstable(feature = "std_misc", - reason = "matches collection reform v2 specification, waiting for dust to settle")] impl<'a, K, V> Entry<'a, K, V> { /// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant. + #[unstable(feature = "std_misc", + reason = "will soon be replaced by or_insert")] pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, K, V>> { match self { Occupied(entry) => Ok(entry.into_mut()), From 3f52d719dc705107de32991c8ab88baf586f7365 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Mon, 23 Mar 2015 11:11:12 -0700 Subject: [PATCH 65/69] Update docs for ptr module. PR #23104 moved `is_null` and `offset` to an inherent impl on the raw pointer type. --- src/libcore/ptr.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 1cbea057e8842..e8ac407804389 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -15,12 +15,9 @@ //! Working with unsafe pointers in Rust is uncommon, //! typically limited to a few patterns. //! -//! Use the [`null` function](fn.null.html) to create null pointers, -//! the [`is_null`](trait.PtrExt.html#tymethod.is_null) -//! methods of the [`PtrExt` trait](trait.PtrExt.html) to check for null. -//! The `PtrExt` trait is imported by the prelude, so `is_null` etc. -//! work everywhere. The `PtrExt` also defines the `offset` method, -//! for pointer math. +//! Use the [`null` function](fn.null.html) to create null pointers, and +//! the `is_null` method of the `*const T` type to check for null. +//! The `*const T` type also defines the `offset` method, for pointer math. //! //! # Common ways to create unsafe pointers //! From 3a0c15f3cf6361c57e1f3aa544031affb4a70aca Mon Sep 17 00:00:00 2001 From: Dave Huseby Date: Mon, 23 Mar 2015 15:58:44 -0700 Subject: [PATCH 66/69] adding lastest Bitrig snapshot by hand --- src/snapshots.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snapshots.txt b/src/snapshots.txt index 3bdf32b53fa87..141ddba7db620 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,5 +1,5 @@ S 2015-03-17 c64d671 - bitrig-x86_64 4b2f11a96b1b5b3782d74bda707aca33bc179880 + bitrig-x86_64 41de2c7a69a1ac648d3fa3b65e96a29bdc122163 freebsd-x86_64 14ced24e1339a4dd8baa9db69995daa52a948d54 linux-i386 200450ad3cc56bc715ca105b9acae35204bf7351 linux-x86_64 a54f50fee722ba6bc7281dec3e4d5121af7c15e3 From 29b54387b88bdf43c00849e3483c2297723f5a73 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 23 Mar 2015 15:54:39 -0700 Subject: [PATCH 67/69] Test fixes and rebase conflicts, round 2 --- src/doc/trpl/documentation.md | 3 +- src/liballoc/arc.rs | 76 +++++++++-------- src/liballoc/rc.rs | 90 ++++++++++++--------- src/libcollections/vec.rs | 32 +++++--- src/libcollectionstest/lib.rs | 1 + src/libgraphviz/lib.rs | 40 ++++----- src/librustc_back/lib.rs | 1 - src/librustc_back/rpath.rs | 4 +- src/librustc_lint/lib.rs | 1 - src/librustc_trans/trans/asm.rs | 2 +- src/librustc_typeck/lib.rs | 1 - src/libstd/env.rs | 5 +- src/libstd/path.rs | 23 +++--- src/libstd/process.rs | 2 +- src/libstd/sys/unix/thread.rs | 5 +- src/libstd/sys/windows/fs2.rs | 2 +- src/libstd/sys/windows/mod.rs | 4 +- src/libstd/sys/windows/os.rs | 5 +- src/libstd/thread/scoped.rs | 6 +- src/test/run-make/issue-19371/foo.rs | 6 +- src/test/run-pass/create-dir-all-bare.rs | 2 + src/test/run-pass/issue-20797.rs | 8 +- src/test/run-pass/send_str_hashmap.rs | 2 +- src/test/run-pass/send_str_treemap.rs | 2 +- src/test/run-pass/tcp-stress.rs | 3 + src/test/run-pass/ufcs-polymorphic-paths.rs | 2 +- 26 files changed, 179 insertions(+), 149 deletions(-) diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 7a459ad354d3c..54821e3ce304d 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -361,7 +361,8 @@ Here’s an example of documenting a macro: #[macro_export] macro_rules! panic_unless { ($condition:expr, $($rest:expr),+) => ({ if ! $condition { panic!($($rest),+); } }); -} +} +# fn main() {} ``` You’ll note three things: we need to add our own `extern crate` line, so that diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 97d3f78f67cbc..c9bbc0d74cddc 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -128,8 +128,8 @@ unsafe impl Sync for Arc { } /// A weak pointer to an `Arc`. /// -/// Weak pointers will not keep the data inside of the `Arc` alive, and can be used to break cycles -/// between `Arc` pointers. +/// Weak pointers will not keep the data inside of the `Arc` alive, and can be +/// used to break cycles between `Arc` pointers. #[unsafe_no_drop_flag] #[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] @@ -218,8 +218,8 @@ impl Arc { unsafe fn drop_slow(&mut self) { let ptr = *self._ptr; - // Destroy the data at this time, even though we may not free the box allocation itself - // (there may still be weak pointers lying around). + // Destroy the data at this time, even though we may not free the box + // allocation itself (there may still be weak pointers lying around). drop(ptr::read(&self.inner().data)); if self.inner().weak.fetch_sub(1, Release) == 1 { @@ -286,8 +286,8 @@ impl Deref for Arc { impl Arc { /// Make a mutable reference from the given `Arc`. /// - /// This is also referred to as a copy-on-write operation because the inner data is cloned if - /// the reference count is greater than one. + /// This is also referred to as a copy-on-write operation because the inner + /// data is cloned if the reference count is greater than one. /// /// # Examples /// @@ -302,16 +302,18 @@ impl Arc { #[inline] #[unstable(feature = "alloc")] pub fn make_unique(&mut self) -> &mut T { - // Note that we hold a strong reference, which also counts as a weak reference, so we only - // clone if there is an additional reference of either kind. + // Note that we hold a strong reference, which also counts as a weak + // reference, so we only clone if there is an additional reference of + // either kind. if self.inner().strong.load(SeqCst) != 1 || self.inner().weak.load(SeqCst) != 1 { *self = Arc::new((**self).clone()) } - // This unsafety is ok because we're guaranteed that the pointer returned is the *only* - // pointer that will ever be returned to T. Our reference count is guaranteed to be 1 at - // this point, and we required the Arc itself to be `mut`, so we're returning the only - // possible reference to the inner data. + // This unsafety is ok because we're guaranteed that the pointer + // returned is the *only* pointer that will ever be returned to T. Our + // reference count is guaranteed to be 1 at this point, and we required + // the Arc itself to be `mut`, so we're returning the only possible + // reference to the inner data. let inner = unsafe { &mut **self._ptr }; &mut inner.data } @@ -322,8 +324,9 @@ impl Arc { impl Drop for Arc { /// Drops the `Arc`. /// - /// This will decrement the strong reference count. If the strong reference count becomes zero - /// and the only other references are `Weak` ones, `drop`s the inner value. + /// This will decrement the strong reference count. If the strong reference + /// count becomes zero and the only other references are `Weak` ones, + /// `drop`s the inner value. /// /// # Examples /// @@ -347,29 +350,32 @@ impl Drop for Arc { /// ``` #[inline] fn drop(&mut self) { - // This structure has #[unsafe_no_drop_flag], so this drop glue may run more than once (but - // it is guaranteed to be zeroed after the first if it's run more than once) + // This structure has #[unsafe_no_drop_flag], so this drop glue may run + // more than once (but it is guaranteed to be zeroed after the first if + // it's run more than once) let ptr = *self._ptr; if ptr.is_null() { return } - // Because `fetch_sub` is already atomic, we do not need to synchronize with other threads - // unless we are going to delete the object. This same logic applies to the below - // `fetch_sub` to the `weak` count. + // Because `fetch_sub` is already atomic, we do not need to synchronize + // with other threads unless we are going to delete the object. This + // same logic applies to the below `fetch_sub` to the `weak` count. if self.inner().strong.fetch_sub(1, Release) != 1 { return } - // This fence is needed to prevent reordering of use of the data and deletion of the data. - // Because it is marked `Release`, the decreasing of the reference count synchronizes with - // this `Acquire` fence. This means that use of the data happens before decreasing the - // reference count, which happens before this fence, which happens before the deletion of - // the data. + // This fence is needed to prevent reordering of use of the data and + // deletion of the data. Because it is marked `Release`, the decreasing + // of the reference count synchronizes with this `Acquire` fence. This + // means that use of the data happens before decreasing the reference + // count, which happens before this fence, which happens before the + // deletion of the data. // // As explained in the [Boost documentation][1], // - // > It is important to enforce any possible access to the object in one thread (through an - // > existing reference) to *happen before* deleting the object in a different thread. This - // > is achieved by a "release" operation after dropping a reference (any access to the - // > object through this reference must obviously happened before), and an "acquire" - // > operation before deleting the object. + // > It is important to enforce any possible access to the object in one + // > thread (through an existing reference) to *happen before* deleting + // > the object in a different thread. This is achieved by a "release" + // > operation after dropping a reference (any access to the object + // > through this reference must obviously happened before), and an + // > "acquire" operation before deleting the object. // // [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html) atomic::fence(Acquire); @@ -387,7 +393,8 @@ impl Weak { /// /// Upgrades the `Weak` reference to an `Arc`, if possible. /// - /// Returns `None` if there were no strong references and the data was destroyed. + /// Returns `None` if there were no strong references and the data was + /// destroyed. /// /// # Examples /// @@ -402,8 +409,8 @@ impl Weak { /// let strong_five: Option> = weak_five.upgrade(); /// ``` pub fn upgrade(&self) -> Option> { - // We use a CAS loop to increment the strong count instead of a fetch_add because once the - // count hits 0 is must never be above 0. + // We use a CAS loop to increment the strong count instead of a + // fetch_add because once the count hits 0 is must never be above 0. let inner = self.inner(); loop { let n = inner.strong.load(SeqCst); @@ -480,8 +487,9 @@ impl Drop for Weak { // see comments above for why this check is here if ptr.is_null() { return } - // If we find out that we were the last weak pointer, then its time to deallocate the data - // entirely. See the discussion in Arc::drop() about the memory orderings + // If we find out that we were the last weak pointer, then its time to + // deallocate the data entirely. See the discussion in Arc::drop() about + // the memory orderings if self.inner().weak.fetch_sub(1, Release) == 1 { atomic::fence(Acquire); unsafe { deallocate(ptr as *mut u8, size_of::>(), diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index e4b09bba52989..eb3c5c167268b 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -59,12 +59,12 @@ //! //! drop(gadget_owner); //! -//! // Despite dropping gadget_owner, we're still able to print out the name of -//! // the Owner of the Gadgets. This is because we've only dropped the +//! // Despite dropping gadget_owner, we're still able to print out the name +//! // of the Owner of the Gadgets. This is because we've only dropped the //! // reference count object, not the Owner it wraps. As long as there are -//! // other `Rc` objects pointing at the same Owner, it will remain allocated. Notice -//! // that the `Rc` wrapper around Gadget.owner gets automatically dereferenced -//! // for us. +//! // other `Rc` objects pointing at the same Owner, it will remain +//! // allocated. Notice that the `Rc` wrapper around Gadget.owner gets +//! // automatically dereferenced for us. //! println!("Gadget {} owned by {}", gadget1.id, gadget1.owner.name); //! println!("Gadget {} owned by {}", gadget2.id, gadget2.owner.name); //! @@ -74,19 +74,22 @@ //! } //! ``` //! -//! If our requirements change, and we also need to be able to traverse from Owner → Gadget, we -//! will run into problems: an `Rc` pointer from Owner → Gadget introduces a cycle between the -//! objects. This means that their reference counts can never reach 0, and the objects will remain -//! allocated: a memory leak. In order to get around this, we can use `Weak` pointers. These -//! pointers don't contribute to the total count. +//! If our requirements change, and we also need to be able to traverse from +//! Owner → Gadget, we will run into problems: an `Rc` pointer from Owner +//! → Gadget introduces a cycle between the objects. This means that their +//! reference counts can never reach 0, and the objects will remain allocated: a +//! memory leak. In order to get around this, we can use `Weak` pointers. +//! These pointers don't contribute to the total count. //! -//! Rust actually makes it somewhat difficult to produce this loop in the first place: in order to -//! end up with two objects that point at each other, one of them needs to be mutable. This is -//! problematic because `Rc` enforces memory safety by only giving out shared references to the -//! object it wraps, and these don't allow direct mutation. We need to wrap the part of the object -//! we wish to mutate in a `RefCell`, which provides *interior mutability*: a method to achieve -//! mutability through a shared reference. `RefCell` enforces Rust's borrowing rules at runtime. -//! Read the `Cell` documentation for more details on interior mutability. +//! Rust actually makes it somewhat difficult to produce this loop in the first +//! place: in order to end up with two objects that point at each other, one of +//! them needs to be mutable. This is problematic because `Rc` enforces +//! memory safety by only giving out shared references to the object it wraps, +//! and these don't allow direct mutation. We need to wrap the part of the +//! object we wish to mutate in a `RefCell`, which provides *interior +//! mutability*: a method to achieve mutability through a shared reference. +//! `RefCell` enforces Rust's borrowing rules at runtime. Read the `Cell` +//! documentation for more details on interior mutability. //! //! ```rust //! # #![feature(alloc)] @@ -130,9 +133,10 @@ //! for gadget_opt in gadget_owner.gadgets.borrow().iter() { //! //! // gadget_opt is a Weak. Since weak pointers can't guarantee -//! // that their object is still allocated, we need to call upgrade() on them -//! // to turn them into a strong reference. This returns an Option, which -//! // contains a reference to our object if it still exists. +//! // that their object is still allocated, we need to call upgrade() +//! // on them to turn them into a strong reference. This returns an +//! // Option, which contains a reference to our object if it still +//! // exists. //! let gadget = gadget_opt.upgrade().unwrap(); //! println!("Gadget {} owned by {}", gadget.id, gadget.owner.name); //! } @@ -180,8 +184,8 @@ struct RcBox { #[unsafe_no_drop_flag] #[stable(feature = "rust1", since = "1.0.0")] pub struct Rc { - // FIXME #12808: strange names to try to avoid interfering with field accesses of the contained - // type via Deref + // FIXME #12808: strange names to try to avoid interfering with field + // accesses of the contained type via Deref _ptr: NonZero<*mut RcBox>, } @@ -203,9 +207,10 @@ impl Rc { pub fn new(value: T) -> Rc { unsafe { Rc { - // there is an implicit weak pointer owned by all the strong pointers, which - // ensures that the weak destructor never frees the allocation while the strong - // destructor is running, even if the weak pointer is stored inside the strong one. + // there is an implicit weak pointer owned by all the strong + // pointers, which ensures that the weak destructor never frees + // the allocation while the strong destructor is running, even + // if the weak pointer is stored inside the strong one. _ptr: NonZero::new(boxed::into_raw(box RcBox { value: value, strong: Cell::new(1), @@ -245,7 +250,8 @@ pub fn weak_count(this: &Rc) -> usize { this.weak() - 1 } #[unstable(feature = "alloc")] pub fn strong_count(this: &Rc) -> usize { this.strong() } -/// Returns true if there are no other `Rc` or `Weak` values that share the same inner value. +/// Returns true if there are no other `Rc` or `Weak` values that share the +/// same inner value. /// /// # Examples /// @@ -330,8 +336,8 @@ pub fn get_mut<'a, T>(rc: &'a mut Rc) -> Option<&'a mut T> { impl Rc { /// Make a mutable reference from the given `Rc`. /// - /// This is also referred to as a copy-on-write operation because the inner data is cloned if - /// the reference count is greater than one. + /// This is also referred to as a copy-on-write operation because the inner + /// data is cloned if the reference count is greater than one. /// /// # Examples /// @@ -349,10 +355,11 @@ impl Rc { if !is_unique(self) { *self = Rc::new((**self).clone()) } - // This unsafety is ok because we're guaranteed that the pointer returned is the *only* - // pointer that will ever be returned to T. Our reference count is guaranteed to be 1 at - // this point, and we required the `Rc` itself to be `mut`, so we're returning the only - // possible reference to the inner value. + // This unsafety is ok because we're guaranteed that the pointer + // returned is the *only* pointer that will ever be returned to T. Our + // reference count is guaranteed to be 1 at this point, and we required + // the `Rc` itself to be `mut`, so we're returning the only possible + // reference to the inner value. let inner = unsafe { &mut **self._ptr }; &mut inner.value } @@ -373,8 +380,9 @@ impl Deref for Rc { impl Drop for Rc { /// Drops the `Rc`. /// - /// This will decrement the strong reference count. If the strong reference count becomes zero - /// and the only other references are `Weak` ones, `drop`s the inner value. + /// This will decrement the strong reference count. If the strong reference + /// count becomes zero and the only other references are `Weak` ones, + /// `drop`s the inner value. /// /// # Examples /// @@ -404,8 +412,8 @@ impl Drop for Rc { if self.strong() == 0 { ptr::read(&**self); // destroy the contained object - // remove the implicit "strong weak" pointer now that we've destroyed the - // contents. + // remove the implicit "strong weak" pointer now that we've + // destroyed the contents. self.dec_weak(); if self.weak() == 0 { @@ -627,7 +635,8 @@ impl fmt::Debug for Rc { /// A weak version of `Rc`. /// -/// Weak references do not count when determining if the inner value should be dropped. +/// Weak references do not count when determining if the inner value should be +/// dropped. /// /// See the [module level documentation](./index.html) for more. #[unsafe_no_drop_flag] @@ -652,7 +661,8 @@ impl Weak { /// /// Upgrades the `Weak` reference to an `Rc`, if possible. /// - /// Returns `None` if there were no strong references and the data was destroyed. + /// Returns `None` if there were no strong references and the data was + /// destroyed. /// /// # Examples /// @@ -710,8 +720,8 @@ impl Drop for Weak { let ptr = *self._ptr; if !ptr.is_null() { self.dec_weak(); - // the weak count starts at 1, and will only go to zero if all the strong pointers - // have disappeared. + // the weak count starts at 1, and will only go to zero if all + // the strong pointers have disappeared. if self.weak() == 0 { deallocate(ptr as *mut u8, size_of::>(), min_align_of::>()) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index e360c0b840ba0..59819d01bc601 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! A growable list type with heap-allocated contents, written `Vec` but pronounced 'vector.' +//! A growable list type with heap-allocated contents, written `Vec` but +//! pronounced 'vector.' //! //! Vectors have `O(1)` indexing, push (to the end) and pop (from the end). //! @@ -124,17 +125,19 @@ use borrow::{Cow, IntoCow}; /// /// # Capacity and reallocation /// -/// The capacity of a vector is the amount of space allocated for any future elements that will be -/// added onto the vector. This is not to be confused with the *length* of a vector, which -/// specifies the number of actual elements within the vector. If a vector's length exceeds its -/// capacity, its capacity will automatically be increased, but its elements will have to be +/// The capacity of a vector is the amount of space allocated for any future +/// elements that will be added onto the vector. This is not to be confused with +/// the *length* of a vector, which specifies the number of actual elements +/// within the vector. If a vector's length exceeds its capacity, its capacity +/// will automatically be increased, but its elements will have to be /// reallocated. /// -/// For example, a vector with capacity 10 and length 0 would be an empty vector with space for 10 -/// more elements. Pushing 10 or fewer elements onto the vector will not change its capacity or -/// cause reallocation to occur. However, if the vector's length is increased to 11, it will have -/// to reallocate, which can be slow. For this reason, it is recommended to use -/// `Vec::with_capacity` whenever possible to specify how big the vector is expected to get. +/// For example, a vector with capacity 10 and length 0 would be an empty vector +/// with space for 10 more elements. Pushing 10 or fewer elements onto the +/// vector will not change its capacity or cause reallocation to occur. However, +/// if the vector's length is increased to 11, it will have to reallocate, which +/// can be slow. For this reason, it is recommended to use `Vec::with_capacity` +/// whenever possible to specify how big the vector is expected to get. #[unsafe_no_drop_flag] #[stable(feature = "rust1", since = "1.0.0")] pub struct Vec { @@ -1429,7 +1432,7 @@ impl ops::Index for Vec { #[cfg(not(stage0))] #[inline] fn index(&self, _index: ops::RangeFull) -> &[T] { - self.as_slice() + self } } @@ -1733,15 +1736,20 @@ impl AsRef<[T]> for Vec { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: Clone> From<&'a [T]> for Vec { + #[cfg(not(test))] fn from(s: &'a [T]) -> Vec { s.to_vec() } + #[cfg(test)] + fn from(s: &'a [T]) -> Vec { + ::slice::to_vec(s) + } } #[stable(feature = "rust1", since = "1.0.0")] impl<'a> From<&'a str> for Vec { fn from(s: &'a str) -> Vec { - s.as_bytes().to_vec() + From::from(s.as_bytes()) } } diff --git a/src/libcollectionstest/lib.rs b/src/libcollectionstest/lib.rs index 365ef637a4c40..f03a073e274e3 100644 --- a/src/libcollectionstest/lib.rs +++ b/src/libcollectionstest/lib.rs @@ -20,6 +20,7 @@ #![feature(unboxed_closures)] #![feature(unicode)] #![feature(unsafe_destructor)] +#![feature(into_cow)] #![cfg_attr(test, feature(str_char))] #[macro_use] extern crate log; diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 9a6e77af28e75..ccf4a3f48d9a1 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -47,13 +47,13 @@ //! which is cyclic. //! //! ```rust -//! # #![feature(rustc_private, core)] +//! # #![feature(rustc_private, core, into_cow)] //! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; //! -//! type Nd = int; -//! type Ed = (int,int); +//! type Nd = isize; +//! type Ed = (isize,isize); //! struct Edges(Vec); //! //! pub fn render_to(output: &mut W) { @@ -133,7 +133,7 @@ //! direct reference to the `(source,target)` pair stored in the graph's //! internal vector (rather than passing around a copy of the pair //! itself). Note that this implies that `fn edges(&'a self)` must -//! construct a fresh `Vec<&'a (uint,uint)>` from the `Vec<(uint,uint)>` +//! construct a fresh `Vec<&'a (usize,usize)>` from the `Vec<(usize,usize)>` //! edges stored in `self`. //! //! Since both the set of nodes and the set of edges are always @@ -149,14 +149,14 @@ //! entity `&sube`). //! //! ```rust -//! # #![feature(rustc_private, core)] +//! # #![feature(rustc_private, core, into_cow)] //! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; //! -//! type Nd = uint; -//! type Ed<'a> = &'a (uint, uint); -//! struct Graph { nodes: Vec<&'static str>, edges: Vec<(uint,uint)> } +//! type Nd = usize; +//! type Ed<'a> = &'a (usize, usize); +//! struct Graph { nodes: Vec<&'static str>, edges: Vec<(usize,usize)> } //! //! pub fn render_to(output: &mut W) { //! let nodes = vec!("{x,y}","{x}","{y}","{}"); @@ -207,14 +207,14 @@ //! Hasse-diagram for the subsets of the set `{x, y}`. //! //! ```rust -//! # #![feature(rustc_private, core)] +//! # #![feature(rustc_private, core, into_cow)] //! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; //! -//! type Nd<'a> = (uint, &'a str); +//! type Nd<'a> = (usize, &'a str); //! type Ed<'a> = (Nd<'a>, Nd<'a>); -//! struct Graph { nodes: Vec<&'static str>, edges: Vec<(uint,uint)> } +//! struct Graph { nodes: Vec<&'static str>, edges: Vec<(usize,usize)> } //! //! pub fn render_to(output: &mut W) { //! let nodes = vec!("{x,y}","{x}","{y}","{}"); @@ -231,7 +231,7 @@ //! } //! fn node_label<'b>(&'b self, n: &Nd<'b>) -> dot::LabelText<'b> { //! let &(i, _) = n; -//! dot::LabelText::LabelStr(self.nodes[i].as_slice().into_cow()) +//! dot::LabelText::LabelStr(self.nodes[i].into_cow()) //! } //! fn edge_label<'b>(&'b self, _: &Ed<'b>) -> dot::LabelText<'b> { //! dot::LabelText::LabelStr("⊆".into_cow()) @@ -240,12 +240,12 @@ //! //! impl<'a> dot::GraphWalk<'a, Nd<'a>, Ed<'a>> for Graph { //! fn nodes(&'a self) -> dot::Nodes<'a,Nd<'a>> { -//! self.nodes.iter().map(|s|s.as_slice()).enumerate().collect() +//! self.nodes.iter().map(|s| &s[..]).enumerate().collect() //! } //! fn edges(&'a self) -> dot::Edges<'a,Ed<'a>> { //! self.edges.iter() -//! .map(|&(i,j)|((i, self.nodes[i].as_slice()), -//! (j, self.nodes[j].as_slice()))) +//! .map(|&(i,j)|((i, &self.nodes[i][..]), +//! (j, &self.nodes[j][..]))) //! .collect() //! } //! fn source(&self, e: &Ed<'a>) -> Nd<'a> { let &(s,_) = e; s } @@ -385,7 +385,7 @@ impl<'a> Id<'a> { is_letter_or_underscore(c) || in_range('0', c, '9') } fn in_range(low: char, c: char, high: char) -> bool { - low as uint <= c as uint && c as uint <= high as uint + low as usize <= c as usize && c as usize <= high as usize } } @@ -602,12 +602,12 @@ mod tests { use std::iter::repeat; /// each node is an index in a vector in the graph. - type Node = uint; + type Node = usize; struct Edge { - from: uint, to: uint, label: &'static str + from: usize, to: usize, label: &'static str } - fn edge(from: uint, to: uint, label: &'static str) -> Edge { + fn edge(from: usize, to: usize, label: &'static str) -> Edge { Edge { from: from, to: to, label: label } } @@ -637,7 +637,7 @@ mod tests { enum NodeLabels { AllNodesLabelled(Vec), - UnlabelledNodes(uint), + UnlabelledNodes(usize), SomeNodesLabelled(Vec>), } diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index b2e12a91ec864..63727a573a3cb 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -47,7 +47,6 @@ #![feature(rand)] #![feature(path_ext)] #![feature(std_misc)] -#![feature(path_relative_from)] #![feature(step_by)] #![feature(convert)] #![cfg_attr(test, feature(test, rand))] diff --git a/src/librustc_back/rpath.rs b/src/librustc_back/rpath.rs index 10d17e266edfc..ff3f0b78f91b3 100644 --- a/src/librustc_back/rpath.rs +++ b/src/librustc_back/rpath.rs @@ -228,7 +228,7 @@ mod test { used_crates: Vec::new(), has_rpath: true, is_like_osx: true, - out_filename: PathBuf::new("bin/rustc"), + out_filename: PathBuf::from("bin/rustc"), get_install_prefix_lib_path: &mut || panic!(), realpath: &mut |p| Ok(p.to_path_buf()), }; @@ -238,7 +238,7 @@ mod test { } else { let config = &mut RPathConfig { used_crates: Vec::new(), - out_filename: PathBuf::new("bin/rustc"), + out_filename: PathBuf::from("bin/rustc"), get_install_prefix_lib_path: &mut || panic!(), has_rpath: true, is_like_osx: false, diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 99b3393c003de..ef65acf8b13f4 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -40,7 +40,6 @@ #![feature(rustc_private)] #![feature(unsafe_destructor)] #![feature(staged_api)] -#![feature(std_misc)] #![feature(str_char)] #![cfg_attr(test, feature(test))] diff --git a/src/librustc_trans/trans/asm.rs b/src/librustc_trans/trans/asm.rs index 33817bb952e98..d6c85e8b17345 100644 --- a/src/librustc_trans/trans/asm.rs +++ b/src/librustc_trans/trans/asm.rs @@ -81,7 +81,7 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm) // Default per-arch clobbers // Basically what clang does - let arch_clobbers = match bcx.sess().target.target.arch.as_slice() { + let arch_clobbers = match &bcx.sess().target.target.arch[..] { "x86" | "x86_64" => vec!("~{dirflag}", "~{fpsr}", "~{flags}"), _ => Vec::new() }; diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 6bdfb17ec1c44..4e7e63a5d7779 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -80,7 +80,6 @@ This API is completely unstable and subject to change. #![feature(collections)] #![feature(core)] #![feature(int_uint)] -#![feature(std_misc)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_private)] diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 00ce6917835ff..fd7532ea4a765 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -327,12 +327,13 @@ pub struct JoinPathsError { /// # Examples /// /// ``` +/// # #![feature(convert)] /// use std::env; /// use std::path::PathBuf; /// /// if let Some(path) = env::var_os("PATH") { /// let mut paths = env::split_paths(&path).collect::>(); -/// paths.push(PathBuf::new("/home/xyz/bin")); +/// paths.push(PathBuf::from("/home/xyz/bin")); /// let new_path = env::join_paths(paths.iter()).unwrap(); /// env::set_var("PATH", &new_path); /// } @@ -853,7 +854,7 @@ mod tests { fn split_paths_unix() { fn check_parse(unparsed: &str, parsed: &[&str]) -> bool { split_paths(unparsed).collect::>() == - parsed.iter().map(|s| PathBuf::new(*s)).collect::>() + parsed.iter().map(|s| PathBuf::from(*s)).collect::>() } assert!(check_parse("", &mut [""])); diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 8ee33e94fe727..50f79967f555e 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -35,9 +35,10 @@ //! To build or modify paths, use `PathBuf`: //! //! ```rust +//! # #![feature(convert)] //! use std::path::PathBuf; //! -//! let mut path = PathBuf::new("c:\\"); +//! let mut path = PathBuf::from("c:\\"); //! path.push("windows"); //! path.push("system32"); //! path.set_extension("dll"); @@ -892,9 +893,10 @@ impl<'a> cmp::Ord for Components<'a> { /// # Examples /// /// ``` +/// # #![feature(convert)] /// use std::path::PathBuf; /// -/// let mut path = PathBuf::new("c:\\"); +/// let mut path = PathBuf::from("c:\\"); /// path.push("windows"); /// path.push("system32"); /// path.set_extension("dll"); @@ -983,15 +985,16 @@ impl PathBuf { /// # Examples /// /// ``` + /// # #![feature(convert)] /// use std::path::PathBuf; /// - /// let mut buf = PathBuf::new("/"); + /// let mut buf = PathBuf::from("/"); /// assert!(buf.file_name() == None); /// buf.set_file_name("bar"); - /// assert!(buf == PathBuf::new("/bar")); + /// assert!(buf == PathBuf::from("/bar")); /// assert!(buf.file_name().is_some()); /// buf.set_file_name("baz.txt"); - /// assert!(buf == PathBuf::new("/baz.txt")); + /// assert!(buf == PathBuf::from("/baz.txt")); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn set_file_name>(&mut self, file_name: S) { @@ -1661,7 +1664,7 @@ mod tests { let static_path = Path::new("/home/foo"); let static_cow_path: Cow<'static, Path> = static_path.into_cow(); - let pathbuf = PathBuf::new("/home/foo"); + let pathbuf = PathBuf::from("/home/foo"); { let path: &Path = &pathbuf; @@ -2543,7 +2546,7 @@ mod tests { pub fn test_push() { macro_rules! tp( ($path:expr, $push:expr, $expected:expr) => ( { - let mut actual = PathBuf::new($path); + let mut actual = PathBuf::from($path); actual.push($push); assert!(actual.to_str() == Some($expected), "pushing {:?} onto {:?}: Expected {:?}, got {:?}", @@ -2631,7 +2634,7 @@ mod tests { pub fn test_pop() { macro_rules! tp( ($path:expr, $expected:expr, $output:expr) => ( { - let mut actual = PathBuf::new($path); + let mut actual = PathBuf::from($path); let output = actual.pop(); assert!(actual.to_str() == Some($expected) && output == $output, "popping from {:?}: Expected {:?}/{:?}, got {:?}/{:?}", @@ -2685,7 +2688,7 @@ mod tests { pub fn test_set_file_name() { macro_rules! tfn( ($path:expr, $file:expr, $expected:expr) => ( { - let mut p = PathBuf::new($path); + let mut p = PathBuf::from($path); p.set_file_name($file); assert!(p.to_str() == Some($expected), "setting file name of {:?} to {:?}: Expected {:?}, got {:?}", @@ -2719,7 +2722,7 @@ mod tests { pub fn test_set_extension() { macro_rules! tfe( ($path:expr, $ext:expr, $expected:expr, $output:expr) => ( { - let mut p = PathBuf::new($path); + let mut p = PathBuf::from($path); let output = p.set_extension($ext); assert!(p.to_str() == Some($expected) && output == $output, "setting extension of {:?} to {:?}: Expected {:?}/{:?}, got {:?}/{:?}", diff --git a/src/libstd/process.rs b/src/libstd/process.rs index d11c3d221445f..553412c83712f 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -770,7 +770,7 @@ mod tests { // test changing to the parent of os::getcwd() because we know // the path exists (and os::getcwd() is not expected to be root) let parent_dir = os::getcwd().unwrap().dir_path(); - let result = pwd_cmd().current_dir(&parent_dir).output().unwrap(); + let result = pwd_cmd().current_dir(parent_dir.as_str().unwrap()).output().unwrap(); let output = String::from_utf8(result.stdout).unwrap(); let child_dir = old_path::Path::new(output.trim()); diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index eb2a6dc08bf4f..eb61f21aacd5d 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -13,14 +13,12 @@ use core::prelude::*; use cmp; -use dynamic_lib::DynamicLibrary; use ffi::CString; use io; use libc::consts::os::posix01::PTHREAD_STACK_MIN; use libc; use mem; use ptr; -use sync::{Once, ONCE_INIT}; use sys::os; use thunk::Thunk; use time::Duration; @@ -322,6 +320,9 @@ pub fn sleep(dur: Duration) { // dependency on libc6 (#23628). #[cfg(target_os = "linux")] fn min_stack_size(attr: *const libc::pthread_attr_t) -> libc::size_t { + use dynamic_lib::DynamicLibrary; + use sync::{Once, ONCE_INIT}; + type F = unsafe extern "C" fn(*const libc::pthread_attr_t) -> libc::size_t; static INIT: Once = ONCE_INIT; static mut __pthread_get_minstack: Option = None; diff --git a/src/libstd/sys/windows/fs2.rs b/src/libstd/sys/windows/fs2.rs index 117f819eeeb3f..998352651117b 100644 --- a/src/libstd/sys/windows/fs2.rs +++ b/src/libstd/sys/windows/fs2.rs @@ -372,7 +372,7 @@ pub fn readlink(p: &Path) -> io::Result { sz - 1, libc::VOLUME_NAME_DOS) }, |s| OsStringExt::from_wide(s))); - Ok(PathBuf::new(&ret)) + Ok(PathBuf::from(&ret)) } pub fn symlink(src: &Path, dst: &Path) -> io::Result<()> { diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index eeaf4ced07239..b1ceac9b90256 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -304,9 +304,7 @@ fn fill_utf16_buf_new(f1: F1, f2: F2) -> io::Result } fn os2path(s: &[u16]) -> PathBuf { - let os = ::from_wide(s); - // FIXME(#22751) should consume `os` - PathBuf::new(&os) + PathBuf::from(OsString::from_wide(s)) } pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] { diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index 4f6c4c9aab366..83d0637173444 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -363,10 +363,7 @@ pub fn temp_dir() -> PathBuf { pub fn home_dir() -> Option { getenv("HOME".as_os_str()).or_else(|| { getenv("USERPROFILE".as_os_str()) - }).map(|os| { - // FIXME(#22751) should consume `os` - PathBuf::new(&os) - }).or_else(|| unsafe { + }).map(PathBuf::from).or_else(|| unsafe { let me = c::GetCurrentProcess(); let mut token = ptr::null_mut(); if c::OpenProcessToken(me, c::TOKEN_READ, &mut token) == 0 { diff --git a/src/libstd/thread/scoped.rs b/src/libstd/thread/scoped.rs index d57535391fd37..b384879d7a956 100644 --- a/src/libstd/thread/scoped.rs +++ b/src/libstd/thread/scoped.rs @@ -24,7 +24,7 @@ //! # Examples //! //! ``` -//! # #![feature(std_misc)] +//! # #![feature(scoped_tls)] //! scoped_thread_local!(static FOO: u32); //! //! // Initially each scoped slot is empty. @@ -147,7 +147,7 @@ impl ScopedKey { /// # Examples /// /// ``` - /// # #![feature(std_misc)] + /// # #![feature(scoped_tls)] /// scoped_thread_local!(static FOO: u32); /// /// FOO.set(&100, || { @@ -200,7 +200,7 @@ impl ScopedKey { /// # Examples /// /// ```no_run - /// # #![feature(std_misc)] + /// # #![feature(scoped_tls)] /// scoped_thread_local!(static FOO: u32); /// /// FOO.with(|slot| { diff --git a/src/test/run-make/issue-19371/foo.rs b/src/test/run-make/issue-19371/foo.rs index b089b9269a264..0d42e0be58d07 100644 --- a/src/test/run-make/issue-19371/foo.rs +++ b/src/test/run-make/issue-19371/foo.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_private, path)] +#![feature(rustc_private, path, convert)] extern crate rustc; extern crate rustc_driver; @@ -33,9 +33,9 @@ fn main() { panic!("expected rustc path"); } - let tmpdir = PathBuf::new(&args[1]); + let tmpdir = PathBuf::from(&args[1]); - let mut sysroot = PathBuf::new(&args[3]); + let mut sysroot = PathBuf::from(&args[3]); sysroot.pop(); sysroot.pop(); diff --git a/src/test/run-pass/create-dir-all-bare.rs b/src/test/run-pass/create-dir-all-bare.rs index 3a4286c292709..475df629f6376 100644 --- a/src/test/run-pass/create-dir-all-bare.rs +++ b/src/test/run-pass/create-dir-all-bare.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(tempdir)] + use std::env; use std::fs::{self, TempDir}; diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs index 4dbe7c968a738..d0720ec593fa4 100644 --- a/src/test/run-pass/issue-20797.rs +++ b/src/test/run-pass/issue-20797.rs @@ -12,12 +12,12 @@ // pretty-expanded FIXME #23616 -#![feature(old_io, old_path)] +#![feature(convert)] use std::default::Default; use std::io; use std::fs; -use std::path::{PathBuf, Path}; +use std::path::PathBuf; pub trait PathExtensions { fn is_dir(&self) -> bool { false } @@ -98,8 +98,8 @@ impl Iterator for Subpaths { } } -fn foo() { - let mut walker: Subpaths = Subpaths::walk(&PathBuf::new("/home")).unwrap(); +fn _foo() { + let _walker: Subpaths = Subpaths::walk(&PathBuf::from("/home")).unwrap(); } fn main() {} diff --git a/src/test/run-pass/send_str_hashmap.rs b/src/test/run-pass/send_str_hashmap.rs index 7bef36d065643..d109f7abde44a 100644 --- a/src/test/run-pass/send_str_hashmap.rs +++ b/src/test/run-pass/send_str_hashmap.rs @@ -10,7 +10,7 @@ // pretty-expanded FIXME #23616 -#![feature(collections)] +#![feature(collections, into_cow)] extern crate collections; diff --git a/src/test/run-pass/send_str_treemap.rs b/src/test/run-pass/send_str_treemap.rs index 04a4a239b0f0b..07dd54433480c 100644 --- a/src/test/run-pass/send_str_treemap.rs +++ b/src/test/run-pass/send_str_treemap.rs @@ -10,7 +10,7 @@ // pretty-expanded FIXME #23616 -#![feature(collections)] +#![feature(collections, into_cow)] extern crate collections; diff --git a/src/test/run-pass/tcp-stress.rs b/src/test/run-pass/tcp-stress.rs index e06e6883a75aa..489abf163c0b2 100644 --- a/src/test/run-pass/tcp-stress.rs +++ b/src/test/run-pass/tcp-stress.rs @@ -13,6 +13,9 @@ // ignore-openbsd system ulimit (Too many open files) // exec-env:RUST_LOG=debug +#![feature(rustc_private, libc, old_io, io, std_misc)] +#![allow(deprecated, unused_must_use)] + #[macro_use] extern crate log; extern crate libc; diff --git a/src/test/run-pass/ufcs-polymorphic-paths.rs b/src/test/run-pass/ufcs-polymorphic-paths.rs index e05a60dbc7f9f..a6ea0f76dc2f9 100644 --- a/src/test/run-pass/ufcs-polymorphic-paths.rs +++ b/src/test/run-pass/ufcs-polymorphic-paths.rs @@ -10,7 +10,7 @@ // pretty-expanded FIXME #23616 -#![feature(collections, rand)] +#![feature(collections, rand, into_cow)] use std::borrow::{Cow, IntoCow}; use std::collections::BitVec; From c5c3de0cf4efba1517009ee6ef2da66f03b490b9 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 23 Mar 2015 17:29:51 -0700 Subject: [PATCH 68/69] Test fixes and rebase conflicts, round 3 --- src/librustc_back/lib.rs | 1 - src/librustc_trans/lib.rs | 1 - src/libstd/env.rs | 2 +- src/libstd/lib.rs | 2 -- src/test/debuginfo/function-prologue-stepping-regular.rs | 1 + src/test/run-pass/out-of-stack-no-split.rs | 2 +- 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index 63727a573a3cb..f7ee76c0a4397 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -36,7 +36,6 @@ #![feature(collections)] #![feature(core)] #![feature(old_fs)] -#![feature(hash)] #![feature(int_uint)] #![feature(io)] #![feature(old_io)] diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index 176e3805a311f..b9ec22b86f076 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -40,7 +40,6 @@ #![feature(unicode)] #![feature(path_ext)] #![feature(fs)] -#![feature(hash)] #![feature(convert)] #![feature(path_relative_from)] diff --git a/src/libstd/env.rs b/src/libstd/env.rs index fd7532ea4a765..71f072302fb21 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -834,7 +834,7 @@ mod tests { fn split_paths_windows() { fn check_parse(unparsed: &str, parsed: &[&str]) -> bool { split_paths(unparsed).collect::>() == - parsed.iter().map(|s| PathBuf::new(*s)).collect::>() + parsed.iter().map(|s| PathBuf::from(*s)).collect::>() } assert!(check_parse("", &mut [""])); diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index f44256125cd30..90eca6168f266 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -111,7 +111,6 @@ #![feature(box_syntax)] #![feature(collections)] #![feature(core)] -#![feature(hash)] #![feature(lang_items)] #![feature(libc)] #![feature(linkage, thread_local, asm)] @@ -124,7 +123,6 @@ #![feature(unsafe_destructor)] #![feature(unsafe_no_drop_flag)] #![feature(macro_reexport)] -#![feature(hash)] #![feature(int_uint)] #![feature(unique)] #![feature(convert)] diff --git a/src/test/debuginfo/function-prologue-stepping-regular.rs b/src/test/debuginfo/function-prologue-stepping-regular.rs index 14433fbcd23b3..8312d16bcac18 100644 --- a/src/test/debuginfo/function-prologue-stepping-regular.rs +++ b/src/test/debuginfo/function-prologue-stepping-regular.rs @@ -126,6 +126,7 @@ // lldb-command:continue #![allow(unused_variables)] +#![feature(old_io)] #![omit_gdb_pretty_printer_section] fn immediate_args(a: int, b: bool, c: f64) { diff --git a/src/test/run-pass/out-of-stack-no-split.rs b/src/test/run-pass/out-of-stack-no-split.rs index e4c7f4ef09522..8887e1937c6f7 100644 --- a/src/test/run-pass/out-of-stack-no-split.rs +++ b/src/test/run-pass/out-of-stack-no-split.rs @@ -15,7 +15,7 @@ //ignore-dragonfly //ignore-bitrig -#![feature(asm)] +#![feature(asm, old_io)] use std::old_io::process::Command; use std::env; From d252d0ad5434bcf77076729ab766eeff98f20ead Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 24 Mar 2015 10:23:47 -0700 Subject: [PATCH 69/69] Test fixes and rebase conflicts, round 4 --- src/test/run-pass/x86stdcall.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/run-pass/x86stdcall.rs b/src/test/run-pass/x86stdcall.rs index 4a58c67d0ecc3..b884adb7a6ec3 100644 --- a/src/test/run-pass/x86stdcall.rs +++ b/src/test/run-pass/x86stdcall.rs @@ -10,8 +10,6 @@ // GetLastError doesn't seem to work with stack switching -// pretty-expanded FIXME #23616 - #[cfg(windows)] mod kernel32 { extern "system" {