about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-01-20Auto merge of #21364 - cmr:fix-ttseq-ice, r=alexcrichtonbors-10/+30
Closes #21350
2015-01-20Auto merge of #21304 - lifthrasiir:htmldocck, r=alexcrichtonbors-98/+387
The script is intended as a tool for doing every sort of verifications amenable to Rustdoc's HTML output. For example, link checkers would go to this script. It already parses HTML into a document tree form (with a slight caveat), so future tests can make use of it. As an example, relevant `rustdoc-*` run-make tests have been updated to use `htmldocck.py` and got their `verify.sh` removed. In the future they may go to a dedicated directory with htmldocck running by default. The detailed explanation of test scripts is provided as a docstring of htmldocck. cc #19723
2015-01-20Auto merge of #21287 - alexcrichton:issue-19872, r=huonwbors-5/+11
cc #19872, this may help give some insight
2015-01-20Auto merge of #21257 - alexcrichton:issue-20064, r=pnkfelixbors-13/+71
These two attributes are used to change the entry point into a Rust program, but for now they're being put behind feature gates until we have a chance to think about them a little more. The #[start] attribute specifically may have its signature changed. This is a breaking change to due the usage of these attributes generating errors by default now. If your crate is using these attributes, add this to your crate root: #![feature(start)] // if you're using the #[start] attribute #![feature(main)] // if you're using the #[main] attribute cc #20064
2015-01-19Auto merge of #21165 - alexcrichton:second-pass-type-id, r=aturonbors-108/+105
This commit aims to stabilize the `TypeId` abstraction by moving it out of the `intrinsics` module into the `any` module of the standard library. Specifically, * `TypeId` is now defined at `std::any::TypeId` * `TypeId::hash` has been removed in favor of an implementation of `Hash`. This commit also performs a final pass over the `any` module, confirming the following: * `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely never require this, and the `Any` trait does not need to be implemented for any other types. As a result, this implementation detail can remain unstable until associated statics are implemented. * `Any::downcast_ref` is now stable * `Any::downcast_mut` is now stable * `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today it does not allow downcasting of trait objects like `Box<Any + Send>` (those returned from `Thread::join`). This is covered by #18737. * `BoxAny::downcast` is now stable.
2015-01-19Auto merge of #19490 - oli-obk:json_non_string_key_maps, r=alexcrichtonbors-91/+201
importing object type string key maps is still supported writing them should be explicit, and can be done as follows ```rust let some_tree_map : TreeMap<String, Json> = ...; Json::Object(some_tree_map).to_writer(&mut writer); ``` related to #8335, #9028, #9142
2015-01-19Auto merge of #21278 - thchittenden:issue-21033-struct-var-pattern-fix, ↵bors-26/+87
r=alexcrichton Closes #21033. The new strategy for parsing a field pattern is to look 1 token ahead and if it's a colon, parse as "fieldname: pat", otherwise parse the shorthand form "(box) (ref) (mut) fieldname)". The previous strategy was to parse "(ref) (mut) fieldname" then if we encounter a colon, throw an error if either "ref" or "mut" were encountered.
2015-01-19Auto merge of #20082 - pczarn:btree-bounded-iter, r=Gankrobors-194/+605
Part of collections reform v1, #18424 Also, iteration is simplified: ``` before test btree::map::bench::iter_1000 ... bench: 17177 ns/iter (+/- 6302) test btree::map::bench::iter_100000 ... bench: 1735731 ns/iter (+/- 23908) test btree::map::bench::iter_20 ... bench: 386 ns/iter (+/- 148) after test btree::map::bench::iter_1000 ... bench: 15777 ns/iter (+/- 346) test btree::map::bench::iter_100000 ... bench: 1602604 ns/iter (+/- 73629) test btree::map::bench::iter_20 ... bench: 339 ns/iter (+/- 91) ``` cc @gereeter @cgaebel r? @Gankro
2015-01-19Fixes #21033 with accompanying test.Tom Chittenden-26/+87
2015-01-19Implement range and range_mut for BTreePiotr Czarnecki-194/+605
Simplify BTree's iterators, too.
2015-01-19Auto merge of #21269 - alexcrichton:issue-6936, r=pnkfelixbors-308/+341
This commit modifies resolve to prevent conflicts with typedef names in the same method that conflits are prevented with enum names. This is a breaking change due to the differing semantics in resolve, and any errors generated on behalf of this change require that a conflicting typedef, module, or structure to be renamed so they do not conflict. [breaking-change] Closes #6936
2015-01-19ugly hack to convert BadHashMapKey error to general fmt::ErrorOliver 'ker' Schneider-5/+20
2015-01-19add unit test for non string/numeric map keysOliver 'ker' Schneider-1/+20
2015-01-19lower FnMut to FnOnce since json-hack is no longer requiredOliver 'ker' Schneider-7/+7
Conflicts: src/libserialize/serialize.rs
2015-01-19json-encoder: report error when hash map key is not string or numericOliver 'ker' Schneider-78/+154
2015-01-19Auto merge of #21282 - Aatch:init-memzero, r=alexcrichtonbors-5/+29
LLVM gets overwhelmed when presented with a zeroinitializer for a large type. In unoptimised builds, it generates a long sequence of stores to memory. In optmised builds, it manages to generate a standard memset of zero values, but takes a long time doing so. Call out to the `llvm.memset` function to zero out the memory instead. Fixes #21264
2015-01-19Auto merge of #20874 - klutzy:windows-dynamic-lib, r=alexcrichtonbors-43/+105
This is a [breaking-change] since `std::dynamic_lib::dl` is now private. When `LoadLibraryW()` fails, original code called `errno()` to get error code. However, there was local allocation of `Vec` before `LoadLibraryW()`, and it drops before `errno()`, and the drop (deallocation) changed `errno`! Therefore `dynamic_lib::open()` thought it always succeeded. This commit fixes the issue. This commit also sets Windows error mode during `LoadLibrary()` to prevent "dll load failed" dialog.
2015-01-19Auto merge of #21099 - sanxiyn:opt-return-ty, r=alexcrichtonbors-85/+76
This avoids having ast::Ty nodes which have no counterpart in the source.
2015-01-18std: Stabilize TypeId and tweak BoxAnyAlex Crichton-108/+105
This commit aims to stabilize the `TypeId` abstraction by moving it out of the `intrinsics` module into the `any` module of the standard library. Specifically, * `TypeId` is now defined at `std::any::TypeId` * `TypeId::hash` has been removed in favor of an implementation of `Hash`. This commit also performs a final pass over the `any` module, confirming the following: * `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely never require this, and the `Any` trait does not need to be implemented for any other types. As a result, this implementation detail can remain unstable until associated statics are implemented. * `Any::downcast_ref` is now stable * `Any::downcast_mut` is now stable * `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today it does not allow downcasting of trait objects like `Box<Any + Send>` (those returned from `Thread::join`). This is covered by #18737. * `BoxAny::downcast` is now stable.
2015-01-18Fix typedef/module name conflicts in the compilerAlex Crichton-204/+180
2015-01-18rustc_resolve: Do not allow mods to shadow typesAlex Crichton-16/+73
This commit modifies resolve to prevent conflicts with typedef names in the same method that conflits are prevented with enum names. This is a breaking change due to the differing semantics in resolve, and any errors generated on behalf of this change require that a conflicting typedef, module, or structure to be renamed so they do not conflict. [breaking-change] Closes #6936
2015-01-18rustc_resolve: De-indent by breaking out of matchAlex Crichton-101/+101
Helps reduce some rightward drift
2015-01-19Auto merge of #21267 - danslapman:master, r=alexcrichtonbors-4/+4
This patch fixes IP_ADD_MEMBERSHIP problem described here: https://github.com/rust-lang/rust/issues/20381 I've tested on my ProbeR project, everything seems ok.
2015-01-19Reduce size of array in test case to 1MBJames Miller-1/+1
2015-01-19Add test to catch performance regressionsJames Miller-1/+26
2015-01-19Use `zero_mem` instead of a zerointializer for `init` intrinsicJames Miller-5/+4
LLVM gets overwhelmed when presented with a zeroinitializer for a large type. In unoptimised builds, it generates a long sequence of stores to memory. In optmised builds, it manages to generate a standard memset of zero values, but takes a long time doing so. Call out to the `llvm.memset` function to zero out the memory instead.
2015-01-18rustdoc: Improve diagnostics on lockfile failuresAlex Crichton-5/+11
cc #19872, this may help give some insight
2015-01-18syntax: allow bare sequences in lhs for follow checkingCorey Richardson-10/+30
Closes #21350
2015-01-19std::dynamic_lib: Fix Windows error handlingklutzy-43/+105
This is a [breaking-change] since `std::dynamic_lib::dl` is now private. When `LoadLibraryW()` fails, original code called `errno()` to get error code. However, there was local allocation of `Vec` before `LoadLibraryW()`, and it drops before `errno()`, and the drop (deallocation) changed `errno`! Therefore `dynamic_lib::open()` thought it always succeeded. This commit fixes the issue. This commit also sets Windows error mode during `LoadLibrary()` to prevent "dll load failed" dialog.
2015-01-18Make output type in ast::FnDecl optionalSeo Sanghyeon-85/+76
2015-01-18auto merge of #20901 : dgrunwald/rust/update-token-can-begin-expr, r=sanxiynbors-11/+8
* add `Token::AndAnd` (double borrow) * add `Token::DotDot` (range notation) * remove `Token::Pound` and `Token::At` This fixes a syntax error when parsing `fn f() -> RangeTo<i32> { return ..1; }`. Also, remove `fn_expr_lookahead`. It's from the `fn~` days and seems to no longer be necessary.
2015-01-18auto merge of #21276 : huonw/rust/trait-suggestion-nits, r=nikomatsakisbors-57/+50
Follow up to #21008. r? @nikomatsakis
2015-01-18auto merge of #21288 : brson/rust/snaps, r=alexcrichtonbors-476/+215
This fixes the issues mentioned in https://github.com/rust-lang/rust/pull/21236, as well as the one https://github.com/rust-lang/rust/issues/21230 where `CFG_BOOTSTRAP_KEY` was being set to simply 'N'. It changes the build such that `RUSTC_BOOTSTRAP_KEY` is only exported on -beta and -stable, so that the behavior of the -dev, -nightly, and snapshot compilers is the same everywhere. Haven't run it completely through 'make check' yet, but the I have verified that the aforementioned issues are fixed. r? @alexcrichton cc @eddyb
2015-01-18tests: Warn on the trailing backslash in the template.Kang Seonghoon-0/+3
2015-01-17Add allow(unstable) to librustc_privacyBrian Anderson-0/+1
2015-01-17Add allow(unstable) to more testsBrian Anderson-0/+3
2015-01-17Add allow(unstable) to driver.rsBrian Anderson-0/+2
2015-01-17Add allow(unstable) to tests that need itBrian Anderson-0/+11
2015-01-17Set allow(unstable) in crates that use unstable featuresBrian Anderson-0/+31
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-17Register new snapshots.Eduard Burtescu-476/+167
2015-01-17add append to vec with testsJeff Belgum-0/+46
2015-01-17Fix more rollup problemsSteve Klabnik-0/+1
2015-01-17fix rollupSteve Klabnik-0/+2
2015-01-18tests: Tidy and allows multi-line htmldocck commands.Kang Seonghoon-7/+43
2015-01-18tests: Add htmldocck.py script for the use of Rustdoc tests.Kang Seonghoon-98/+348
The script is intended as a tool for doing every sort of verifications amenable to Rustdoc's HTML output. For example, link checkers would go to this script. It already parses HTML into a document tree form (with a slight caveat), so future tests can make use of it. As an example, relevant `rustdoc-*` run-make tests have been updated to use `htmldocck.py` and got their `verify.sh` removed. In the future they may go to a dedicated directory with htmldocck running by default. The detailed explanation of test scripts is provided as a docstring of htmldocck. cc #19723
2015-01-17docs: grammar fixAlfie John-1/+1
2015-01-17doc: Remove extra whitespace in the middle of lines to provide alignmentNick Howell-70/+70
"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment." http://aturon.github.io/style/whitespace.html I realize the linked page still needs an RFC, but the docs should be written in accordance with the guidelines nevertheless.
2015-01-17std: Move the bitflags! macro to a gated crateAlex Crichton-6/+19
In accordance with [collections reform part 2][rfc] this macro has been moved to an external [bitflags crate][crate] which is [available though crates.io][cratesio]. Inside the standard distribution the macro has been moved to a crate called `rustc_bitflags` for current users to continue using. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md [crate]: https://github.com/rust-lang/bitflags [cratesio]: http://crates.io/crates/bitflags The major user of `bitflags!` in terms of a public-facing possibly-stable API today is the `FilePermissions` structure inside of `std::io`. This user, however, will likely no longer use `bitflags!` after I/O reform has landed. To prevent breaking APIs today, this structure remains as-is. Current users of the `bitflags!` macro should add this to their `Cargo.toml`: bitflags = "0.1" and this to their crate root: #[macro_use] extern crate bitflags; Due to the removal of a public macro, this is a: [breaking-change]
2015-01-17Beef up Copy documentationSteve Klabnik-0/+98
Fixes #21249 Fixes #11540
2015-01-17Add C -> Rust example to FFI chapter of the book.Steve Klabnik-28/+46
Fixes #10489.