Skip to content

Another rollup #21730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jan 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8f38eae
wrmdir -> RemoveDirectoryW
retep998 Jan 26, 2015
d553ed6
shell 'case' statement don't need 'break'
semarie Jan 26, 2015
fff5600
Make Unix and Windows impls consistent
flaper87 Jan 25, 2015
fde4472
Make Unix and Windows impls consistent
flaper87 Jan 25, 2015
f7f80ce
Add "-webkit-overflow-scrolling: touch" to book CSS for the page wrap…
nelsonjchen Jan 26, 2015
e0dc9bd
Add same "-webkit-overflow-scrolling: touch" to the table of contents…
nelsonjchen Jan 26, 2015
85b80aa
don't ignore errors in encode and allow hashmaps with enum keys
Jan 23, 2015
82b0b0f
fallout
Jan 26, 2015
cbcb191
Remove comment about `UnsafeCell`s and `static`
tbu- Jan 26, 2015
ea50bf8
Unconditionally disable LLVM's FastISel on AArch64
akosthekiss Jan 26, 2015
9440407
discuss.rust-lang.org -> internals.rust-lang.org
brson Jan 27, 2015
1c502f1
README.md - Fix source tarball link
thepowersgang Jan 28, 2015
57dd4ea
fix #[cfg(test)] warnings
Jan 27, 2015
d0a9a39
Rename found_ast to FoundAst and qualify uses.
Ms2ger Jan 24, 2015
f88c94d
Simplify the implementation of segments_name_eq.
Ms2ger Jan 24, 2015
4ad677e
Remove a custom variant of iter::Cloned.
Ms2ger Jan 24, 2015
7aa2735
Remove unnecessary to_string() call.
Ms2ger Jan 24, 2015
9a379d4
Correct Orpheus Lummis's email and name
orpheuslummis Jan 28, 2015
be13211
Rollup merge of #21626 - Ms2ger:various-cleanup, r=eddyb
Manishearth Jan 28, 2015
0d1a4ac
Rollup merge of #21640 - retep998:rmdir, r=alexcrichton
Manishearth Jan 28, 2015
0508d8f
Rollup merge of 21722 - orpheuslummis:patch-1, r=Gankro
Manishearth Jan 28, 2015
1669f89
Rollup merge of 21711 - thepowersgang:patch-1, r=alexcrichton
Manishearth Jan 28, 2015
7abbc96
Rollup merge of 21708 - brson:internals, r=huonw
Manishearth Jan 28, 2015
f553f58
Rollup merge of 21681 - japaric:no-warn, r=alexcrichton
Manishearth Jan 28, 2015
0752c4a
Rollup merge of 21671 - akiss77:pr-aarch64-fastisel0, r=alexcrichton
Manishearth Jan 28, 2015
518ce53
Rollup merge of 21663 - tbu-:pr_doc_cell_static_safety, r=alexcrichton
Manishearth Jan 28, 2015
62b24c3
Rollup merge of 21662 - oli-obk:hashmap_enum_json, r=alexcrichton
Manishearth Jan 28, 2015
2403176
Rollup merge of 21654 - FlaPer87:unify-impls, r=alexcrichton
Manishearth Jan 28, 2015
d37d216
Rollup merge of 21651 - nelsonjchen:add--webkit-overflow-scrolling-to…
Manishearth Jan 28, 2015
092330c
Rollup merge of 21643 - semarie:break-local_stage0, r=brson
Manishearth Jan 28, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ Olivier Saut <[email protected]>
Olle Jonsson <[email protected]>
Or Brostovski <[email protected]>
Oren Hazi <[email protected]>
Orphée Lafond-Lummis <o@orftz.com>
Orpheus Lummis <o@orpheuslummis.com>
P1start <[email protected]>
Pablo Brasero <[email protected]>
Palmer Cox <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ example, if it's 2014, and you change a Rust file that was created in
# Coordination and communication

Get feedback from other developers on
[discuss.rust-lang.org][discuss], and
[internals.rust-lang.org][internals], and
[#rust-internals][pound-rust-internals].

[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
[discuss]: http://discuss.rust-lang.org
[internals]: http://internals.rust-lang.org

For more details, please refer to
[Note-development-policy](https://github.com/rust-lang/rust/wiki/Note-development-policy).
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ documentation.

To build from the [tarball] do:

$ curl -O https://static.rust-lang.org/dist/rust-nightly.tar.gz
$ tar -xzf rust-nightly.tar.gz
$ cd rust-nightly
$ curl -O https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
$ tar -xzf rustc-nightly-src.tar.gz
$ cd rustc-nightly

Or to build from the [repo] do:

Expand Down Expand Up @@ -80,7 +80,7 @@ $ pacman -S base-devel
$ make && make install

[repo]: https://github.com/rust-lang/rust
[tarball]: https://static.rust-lang.org/dist/rust-nightly.tar.gz
[tarball]: https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
[trpl]: http://doc.rust-lang.org/book/index.html

## Notes
Expand Down Expand Up @@ -112,11 +112,11 @@ The Rust community congregates in a few places:

* [StackOverflow] - Get help here.
* [/r/rust] - General discussion.
* [discuss.rust-lang.org] - For development of the Rust language itself.
* [internals.rust-lang.org] - For development of the Rust language itself.

[StackOverflow]: http://stackoverflow.com/questions/tagged/rust
[/r/rust]: http://reddit.com/r/rust
[discuss.rust-lang.org]: http://discuss.rust-lang.org/
[internals.rust-lang.org]: http://internals.rust-lang.org/

## License

Expand Down
2 changes: 1 addition & 1 deletion src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ problem might reveal someone who has asked it before!
There is an active [subreddit](http://reddit.com/r/rust) with lots of
discussion about Rust.

There is also a [developer forum](http://discuss.rust-lang.org/), where the
There is also a [developer forum](http://internals.rust-lang.org/), where the
development of Rust itself is discussed.

# Specification
Expand Down
3 changes: 0 additions & 3 deletions src/etc/local_stage0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ case $OS in
("Linux"|"FreeBSD"|"DragonFly")
BIN_SUF=
LIB_SUF=.so
break
;;
("Darwin")
BIN_SUF=
LIB_SUF=.dylib
break
;;
(*)
BIN_SUF=.exe
LIB_SUF=.dll
LIB_DIR=bin
LIB_PREFIX=
break
;;
esac

Expand Down
1 change: 1 addition & 0 deletions src/liballoc/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[cfg(not(test))]
use core::ptr::PtrExt;

// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`
Expand Down
6 changes: 0 additions & 6 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,6 @@ impl<'b, T> DerefMut for RefMut<'b, T> {
/// The `UnsafeCell<T>` type is the only legal way to obtain aliasable data that is considered
/// mutable. In general, transmuting an `&T` type into an `&mut T` is considered undefined behavior.
///
/// Although it is possible to put an `UnsafeCell<T>` into static item, it is not permitted to take
/// the address of the static item if the item is not declared as mutable. This rule exists because
/// immutable static items are stored in read-only memory, and thus any attempt to mutate their
/// interior can cause segfaults. Immutable static items containing `UnsafeCell<T>` instances are
/// still useful as read-only initializers, however, so we do not forbid them altogether.
///
/// Types like `Cell<T>` and `RefCell<T>` use this type to wrap their internal data.
///
/// `UnsafeCell<T>` doesn't opt-out from any marker traits, instead, types with an `UnsafeCell<T>`
Expand Down
2 changes: 1 addition & 1 deletion src/libfmt_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ mod tests {
use super::*;

fn same(fmt: &'static str, p: &[Piece<'static>]) {
let mut parser = Parser::new(fmt);
let parser = Parser::new(fmt);
assert!(p == parser.collect::<Vec<Piece<'static>>>());
}

Expand Down
1 change: 1 addition & 0 deletions src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ pub use funcs::bsd43::{shutdown};
#[cfg(windows)] pub use funcs::extra::kernel32::{GetOverlappedResult, ConnectNamedPipe};
#[cfg(windows)] pub use funcs::extra::kernel32::{DisconnectNamedPipe, OpenProcess};
#[cfg(windows)] pub use funcs::extra::kernel32::{MoveFileExW, VirtualProtect};
#[cfg(windows)] pub use funcs::extra::kernel32::{RemoveDirectoryW};
#[cfg(windows)] pub use funcs::extra::msvcrt::{get_osfhandle, open_osfhandle};
#[cfg(windows)] pub use funcs::extra::winsock::{ioctlsocket};

Expand Down
14 changes: 5 additions & 9 deletions src/librustc/metadata/csearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

// Searching for information from the cstore

#![allow(non_camel_case_types)]

pub use self::found_ast::*;

use metadata::common::*;
use metadata::cstore;
use metadata::decoder;
Expand Down Expand Up @@ -101,18 +97,18 @@ pub fn get_item_path(tcx: &ty::ctxt, def: ast::DefId) -> Vec<ast_map::PathElem>
r
}

pub enum found_ast<'ast> {
found(&'ast ast::InlinedItem),
found_parent(ast::DefId, &'ast ast::InlinedItem),
not_found,
pub enum FoundAst<'ast> {
Found(&'ast ast::InlinedItem),
FoundParent(ast::DefId, &'ast ast::InlinedItem),
NotFound,
}

// Finds the AST for this item in the crate metadata, if any. If the item was
// not marked for inlining, then the AST will not be present and hence none
// will be returned.
pub fn maybe_get_item_ast<'tcx>(tcx: &ty::ctxt<'tcx>, def: ast::DefId,
decode_inlined_item: decoder::DecodeInlinedItem)
-> found_ast<'tcx> {
-> FoundAst<'tcx> {
let cstore = &tcx.sess.cstore;
let cdata = cstore.get_crate_data(def.krate);
decoder::maybe_get_item_ast(&*cdata, tcx, def.node, decode_inlined_item)
Expand Down
10 changes: 5 additions & 5 deletions src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,23 +693,23 @@ pub type DecodeInlinedItem<'a> =

pub fn maybe_get_item_ast<'tcx>(cdata: Cmd, tcx: &ty::ctxt<'tcx>, id: ast::NodeId,
mut decode_inlined_item: DecodeInlinedItem)
-> csearch::found_ast<'tcx> {
-> csearch::FoundAst<'tcx> {
debug!("Looking up item: {}", id);
let item_doc = lookup_item(id, cdata.data());
let path = item_path(item_doc).init().to_vec();
match decode_inlined_item(cdata, tcx, path, item_doc) {
Ok(ii) => csearch::found(ii),
Ok(ii) => csearch::FoundAst::Found(ii),
Err(path) => {
match item_parent_item(item_doc) {
Some(did) => {
let did = translate_def_id(cdata, did);
let parent_item = lookup_item(did.node, cdata.data());
match decode_inlined_item(cdata, tcx, path, parent_item) {
Ok(ii) => csearch::found_parent(did, ii),
Err(_) => csearch::not_found
Ok(ii) => csearch::FoundAst::FoundParent(did, ii),
Err(_) => csearch::FoundAst::NotFound
}
}
None => csearch::not_found
None => csearch::FoundAst::NotFound
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ fn encode_info_for_items(ecx: &EncodeContext,
&krate.module,
&[],
ast::CRATE_NODE_ID,
ast_map::Values([].iter()).chain(None),
[].iter().cloned().chain(None),
syntax::parse::token::special_idents::invalid,
ast::Public);

Expand Down Expand Up @@ -1949,7 +1949,7 @@ fn encode_misc_info(ecx: &EncodeContext,
}

// Encode reexports for the root module.
encode_reexports(ecx, rbml_w, 0, ast_map::Values([].iter()).chain(None));
encode_reexports(ecx, rbml_w, 0, [].iter().cloned().chain(None));

rbml_w.end_tag();
rbml_w.end_tag();
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/astencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub fn decode_inlined_item<'tcx>(cdata: &cstore::crate_metadata,
debug!("> Decoding inlined fn: {:?}::?",
{
// Do an Option dance to use the path after it is moved below.
let s = ast_map::path_to_string(ast_map::Values(path.iter()));
let s = ast_map::path_to_string(path.iter().cloned());
path_as_str = Some(s);
path_as_str.as_ref().map(|x| &x[])
});
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/const_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn lookup_variant_by_id<'a>(tcx: &'a ty::ctxt,
}
let expr_id = match csearch::maybe_get_item_ast(tcx, enum_def,
box |a, b, c, d| astencode::decode_inlined_item(a, b, c, d)) {
csearch::found(&ast::IIItem(ref item)) => match item.node {
csearch::FoundAst::Found(&ast::IIItem(ref item)) => match item.node {
ast::ItemEnum(ast::EnumDef { ref variants }, _) => {
// NOTE this doesn't do the right thing, it compares inlined
// NodeId's to the original variant_def's NodeId, but they
Expand Down Expand Up @@ -173,7 +173,7 @@ pub fn lookup_const_by_id<'a>(tcx: &'a ty::ctxt, def_id: ast::DefId)
}
let expr_id = match csearch::maybe_get_item_ast(tcx, def_id,
box |a, b, c, d| astencode::decode_inlined_item(a, b, c, d)) {
csearch::found(&ast::IIItem(ref item)) => match item.node {
csearch::FoundAst::Found(&ast::IIItem(ref item)) => match item.node {
ast::ItemConst(_, ref const_expr) => Some(const_expr.id),
_ => None
},
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5264,7 +5264,7 @@ pub fn with_path<T, F>(cx: &ctxt, id: ast::DefId, f: F) -> T where
if id.krate == ast::LOCAL_CRATE {
cx.map.with_path(id.node, f)
} else {
f(ast_map::Values(csearch::get_item_path(cx, id).iter()).chain(None))
f(csearch::get_item_path(cx, id).iter().cloned().chain(None))
}
}

Expand Down
1 change: 0 additions & 1 deletion src/librustc_back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ fn minimize_rpaths(rpaths: &[String]) -> Vec<String> {
mod test {
use super::{RPathConfig};
use super::{minimize_rpaths, rpaths_to_flags, get_rpath_relative_to_output};
use syntax::abi;

#[test]
fn test_rpaths_to_flags() {
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_trans/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use flate;
use serialize::hex::ToHex;
use syntax::ast;
use syntax::ast_map::{PathElem, PathElems, PathName};
use syntax::ast_map;
use syntax::attr::AttrMetaMethods;
use syntax::codemap::Span;
use syntax::parse::token;
Expand Down Expand Up @@ -339,7 +338,7 @@ pub fn mangle_internal_name_by_type_and_seq<'a, 'tcx>(ccx: &CrateContext<'a, 'tc
let path = [PathName(token::intern(&s[])),
gensym_name(name)];
let hash = get_symbol_hash(ccx, t);
mangle(ast_map::Values(path.iter()), Some(&hash[]))
mangle(path.iter().cloned(), Some(&hash[]))
}

pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> String {
Expand Down
3 changes: 3 additions & 0 deletions src/librustc_trans/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,9 @@ unsafe fn configure_llvm(sess: &Session) {
if sess.time_llvm_passes() { add("-time-passes"); }
if sess.print_llvm_passes() { add("-debug-pass=Structure"); }

// FIXME #21627 disable faulty FastISel on AArch64 (even for -O0)
if sess.target.target.arch.as_slice() == "aarch64" { add("-fast-isel=0"); }

for arg in sess.opts.cg.llvm_args.iter() {
add(&(*arg)[]);
}
Expand Down
16 changes: 8 additions & 8 deletions src/librustc_trans/trans/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ fn instantiate_inline(ccx: &CrateContext, fn_id: ast::DefId)
box |a,b,c,d| astencode::decode_inlined_item(a, b, c, d));

let inline_def = match csearch_result {
csearch::not_found => {
csearch::FoundAst::NotFound => {
ccx.external().borrow_mut().insert(fn_id, None);
return None;
}
csearch::found(&ast::IIItem(ref item)) => {
csearch::FoundAst::Found(&ast::IIItem(ref item)) => {
ccx.external().borrow_mut().insert(fn_id, Some(item.id));
ccx.external_srcs().borrow_mut().insert(item.id, fn_id);

Expand Down Expand Up @@ -90,12 +90,12 @@ fn instantiate_inline(ccx: &CrateContext, fn_id: ast::DefId)

local_def(item.id)
}
csearch::found(&ast::IIForeign(ref item)) => {
csearch::FoundAst::Found(&ast::IIForeign(ref item)) => {
ccx.external().borrow_mut().insert(fn_id, Some(item.id));
ccx.external_srcs().borrow_mut().insert(item.id, fn_id);
local_def(item.id)
}
csearch::found_parent(parent_id, &ast::IIItem(ref item)) => {
csearch::FoundAst::FoundParent(parent_id, &ast::IIItem(ref item)) => {
ccx.external().borrow_mut().insert(parent_id, Some(item.id));
ccx.external_srcs().borrow_mut().insert(item.id, parent_id);

Expand Down Expand Up @@ -124,11 +124,11 @@ fn instantiate_inline(ccx: &CrateContext, fn_id: ast::DefId)
trans_item(ccx, &**item);
local_def(my_id)
}
csearch::found_parent(_, _) => {
ccx.sess().bug("maybe_get_item_ast returned a found_parent \
csearch::FoundAst::FoundParent(_, _) => {
ccx.sess().bug("maybe_get_item_ast returned a FoundParent \
with a non-item parent");
}
csearch::found(&ast::IITraitItem(_, ref trait_item)) => {
csearch::FoundAst::Found(&ast::IITraitItem(_, ref trait_item)) => {
match *trait_item {
ast::RequiredMethod(_) => ccx.sess().bug("found RequiredMethod IITraitItem"),
ast::ProvidedMethod(ref mth) => {
Expand All @@ -147,7 +147,7 @@ fn instantiate_inline(ccx: &CrateContext, fn_id: ast::DefId)
}
}
}
csearch::found(&ast::IIImplItem(impl_did, ref impl_item)) => {
csearch::FoundAst::Found(&ast::IIImplItem(impl_did, ref impl_item)) => {
match *impl_item {
ast::MethodImplItem(ref mth) => {
ccx.external().borrow_mut().insert(fn_id, Some(mth.id));
Expand Down
Loading