about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-05-31add a series of tests for changes to structsNiko Matsakis-0/+326
These tests reveal that the edges are in some cases too strict.
2016-05-30Auto merge of #33960 - tbu-:pr_ref_clone_overflow, r=Aatchbors-1/+3
Prevent the borrow counter from overflowing in `Ref::clone` Fixes #33880.
2016-05-30Auto merge of #33968 - srinivasreddy:slice.rs, r=Manishearthbors-2/+1
Correct grammar; and remove redundant comment
2016-05-30Auto merge of #33909 - michaelwoerister:frame-pointer-fix, r=nikomatsakisbors-13/+27
Emit "no-frame-pointer-elim" attribute for closures, shims, and glue. This will hopefully let `perf` give better backtraces. r? @nikomatsakis
2016-05-30Correct grammar; and remove redundant commentSrinivas Reddy Thatiparthy-2/+1
2016-05-30Rollup merge of #33964 - Ms2ger:refcell-resolutions, r=ManishearthManish Goregaokar-7/+8
Move driver::Resolutions::def_map out of its RefCell.
2016-05-30Rollup merge of #33958 - kennytm:patch-1, r=GuillaumeGomezManish Goregaokar-2/+2
Use Path::is_dir() in fs::read_dir()'s example. Basically reverts #25508. The `is_dir()` function has been stable since 1.5.0.
2016-05-30Rollup merge of #33942 - srinivasreddy:rustfmt_llvm_folder, r=nrcManish Goregaokar-56/+83
run rustfmt on librustc_llvm folder
2016-05-30Rollup merge of #33926 - jseyfried:fix_derive_span, r=nrcManish Goregaokar-60/+38
Fix the span of generated `#[derive_*]` attributes Fixes #33571. r? @nrc
2016-05-30Rollup merge of #33867 - oli-obk:rustdoc_variant_types, r=GuillaumeGomezManish Goregaokar-40/+65
print enum variant fields in docs Right now we are repeating enum variants at the top, because the fields aren't shown with the actual docs. It's very annoying to have to scroll up and down to have both docs and field info. For struct variants we already list the fields. enum docs look like this after this PR: ![screenshot from 2016-05-25 14-02-42](https://cloud.githubusercontent.com/assets/332036/15539231/84b018cc-2281-11e6-9666-1063655931f4.png) There are degenerate cases for enum tuple variants with lots of fields: ![screenshot from 2016-05-25 14-01-00](https://cloud.githubusercontent.com/assets/332036/15539260/91e537ca-2281-11e6-8bf1-a3d6b2e78f65.png) I was thinking that we could move the docs below the variant (slightly indented) or list the variant fields vertically instead of horizontally r? @steveklabnik
2016-05-30print enum variant fields in docsOliver Schneider-40/+65
2016-05-30Move driver::Resolutions::def_map out of its RefCell.Ms2ger-7/+8
2016-05-30Rollup merge of #33938 - srinivasreddy:rustfmt_libunwind, r=ManishearthManish Goregaokar-28/+20
run rustfmt on libunwind
2016-05-30Rollup merge of #33937 - srinivasreddy:rustfmt_librand, r=GuillaumeGomezManish Goregaokar-37/+44
run rustfmt on librand folder
2016-05-30Rollup merge of #33917 - srinivasreddy:rustfmt_liballoc, r=GuillaumeGomezManish Goregaokar-17/+22
rustfmt liballoc folder
2016-05-30Rollup merge of #33914 - GuillaumeGomez:improve_err_expl, r=GuillaumeGomezManish Goregaokar-3/+82
Improve err expl r? @steveklabnik
2016-05-30Rollup merge of #33913 - GuillaumeGomez:improve_e0133, r=GuillaumeGomezManish Goregaokar-1/+13
Improve E0133 error explanation r? @steveklabnik
2016-05-30Rollup merge of #33912 - GuillaumeGomez:improve_E0132, r=steveklabnikManish Goregaokar-1/+24
Improve E0132 error explanation r? @steveklabnik
2016-05-30Rollup merge of #33893 - Ophirr33:docs_string_split_fix, r=GuillaumeGomezManish Goregaokar-2/+28
Added examples/docs to split in str.rs Added documentation clarifying the behavior of split when used with the empty string and contiguous separators. Addresses issue [33882](https://github.com/rust-lang/rust/issues/33882). This is my first time contributing to rust, so forgive me if I'm skipping any of the contribution steps. Fixes #33882
2016-05-30Rollup merge of #33793 - GuillaumeGomez:compile_fail, r=GuillaumeGomezManish Goregaokar-15/+28
Fix compile_fail tag Fixes #33780 r? @steveklabnik
2016-05-30Use Path::is_dir() in fs::read_dir()'s example.kennytm-2/+2
Basically reverts #25508. The `is_dir()` function has been stable since 1.5.0.
2016-05-30Prevent the borrow counter from overflowing in `Ref::clone`Tobias Bucher-1/+3
Fixes #33880.
2016-05-29Auto merge of #33929 - petrochenkov:pathir, r=eddybbors-548/+390
Separate bindings from other patterns in HIR Now when name resolution is done on AST, we can avoid dumping everything that looks like an identifier into `PatKind::Ident` in HIR. `hir::PatKind::Ident` is removed, fresh bindings are now called `hir::PatKind::Binding`, everything else goes to `hir::PatKind::Path`. I intend to do something with `PatKind::Path`/`PatKind::QPath` as well using resolution results, but it requires some audit and maybe some deeper refactoring of relevant resolution/type checking code to do it properly. I'm submitting this part of the patch earlier to notify interested parties that I'm working on this. cc @jseyfried r? @eddyb
2016-05-29Auto merge of #33860 - doomrobo:fix-grammar-verification, r=nagisabors-106/+108
antlr grammar verification script now compiles under latest nightly This is kind of a moving target, since none of libsyntax is stable, but at least this compiles for the time being.
2016-05-29Improve E0161 error explanationGuillaume Gomez-3/+27
2016-05-29Auto merge of #33859 - nrc:save-field-sub, r=pnkfelixbors-3/+9
save-analysis: be a bit more defensive with field sub-expressions Prevents an ice with `(...).f` since the sub-expression is in the AST but not the HIR. We could actually do better in this specific case, but it doesn't seem worth it.
2016-05-29Auto merge of #33934 - Byron:libsyntex-ring-buffer-size, r=pnkfelixbors-2/+2
Prevent overflows by increasing ring buffer size Please note that this change is just done to prevent issues as currently seen by syntex_syntax in future. See https://github.com/serde-rs/syntex/pull/47 for details. As shown in https://github.com/serde-rs/syntex/issues/33, complex code can easily overflow the ring-buffer and cause an assertion error.
2016-05-29run rustfmt on librustc_llvm folderSrinivas Reddy Thatiparthy-56/+83
2016-05-29run rustfmt on libunwindSrinivas Reddy Thatiparthy-28/+20
2016-05-29run rustfmt on librand folderSrinivas Reddy Thatiparthy-37/+44
2016-05-28Auto merge of #33848 - alexcrichton:android-gdb-sysroot, r=michaelwoeristerbors-5/+6
test: Use `set sysroot` for more NDK compatibility Recent versions of the Android NDK no longer ship debuggers like `arm-linux-androideabi-gdb`, but instead one prebuilt binary `gdb`. We can symlink this into place at least to get our detection still working, but it now needs to be told what the sysroot is so it can correctly do... something. Long story short, tests didn't pass with this change and after this change they pass.
2016-05-28Auto merge of #33824 - alexcrichton:rustbuild-fix-local-rust, r=nikomatsakisbors-4/+8
rustbuild: Add support for --enable-local-rust This commit adds support for the `--enable-local-rust` `./configure` switch which uses the locally installed `rustc` to bootstrap the compiler.
2016-05-28Prevent overflows by increasing ring buffer sizeSebastian Thiel-2/+2
Please note that this change is just done to prevent issues as currently seen by syntex_syntax in future. See https://github.com/serde-rs/syntex/pull/47 for details. As shown in https://github.com/serde-rs/syntex/issues/33, complex code can easily overflow the ring-buffer and cause an assertion error.
2016-05-28Auto merge of #33821 - sanxiyn:cfg-test, r=nikomatsakisbors-12/+25
Do not inject test harness for --cfg test Fix #33670.
2016-05-28Address review commentsVadim Petrochenkov-10/+9
2016-05-28Refactor away some functions from hir::pat_utilVadim Petrochenkov-255/+168
2016-05-28Rollup merge of #33856 - GuillaumeGomez:fmt_error, r=alexcrichtonManish Goregaokar-0/+7
Implement Error trait for fmt::Error type Fixes #33827. r? @alexcrichton Just one last thing: I added a feature name, but don't hesitate to ask me to change it if you think it doesn't fit well.
2016-05-28Rollup merge of #33854 - petrochenkov:prefvis, r=eddybManish Goregaokar-26/+8
Apply visit_path to import prefixes by default Overriding `visit_path` is not enough to visit all paths, some import prefixes are not visited and `visit_path_list_item` need to be overridden as well. This PR removes this catch, it should be less error prone this way. Also, the prefix is visited once now, not repeatedly for each path list item. r? @eddyb
2016-05-28Rollup merge of #33852 - arielb1:autoderef-iterator, r=eddybManish Goregaokar-472/+515
refactor autoderef to avoid prematurely registering obligations Refactor `FnCtxt::autoderef` to use an external iterator and to not register any obligation from the main autoderef loop, but rather to register them after (and if) the loop successfully completes. Fixes #24819 Fixes #25801 Fixes #27631 Fixes #31258 Fixes #31964 Fixes #32320 Fixes #33515 Fixes #33755 r? @eddyb
2016-05-28Rollup merge of #33849 - ranma42:escape-iters-count, r=alexcrichtonManish Goregaokar-28/+56
Implement `count` for `EscapeUnicode` and cleanup the code for `count` for `EscapeDefault` (instead of repeating the `match` for `size_hint` and `count`). This PR marks EscapeUnicode and EscapeDefault as ExactSizeIterator. The constraints for the trait implementations held even before this PR, but I am not sure if this is something we want to guarantee/expose (I would love feedback on this, especially on what would be the appropriate way to handle stabilisation, if needed). Part of #24214, split from #31049. The test for `count` was added in #33103.
2016-05-28Rollup merge of #33832 - alexcrichton:android-memalign, r=luqmanaManish Goregaokar-7/+34
std: Use memalign, not posix_memalign, on Android We've gotten requests to move our Android support as far back as API level 9 where unfortunately the `posix_memalign` API wasn't implemented yet. Thankfully, however, the `memalign` API was and it appears to be usable with `free` on the Android platform (see comments included in commit). This should help fix some of the last few test failures when compiling against API level 9.
2016-05-28Rollup merge of #33831 - diwic:patch-1, r=aturonManish Goregaokar-35/+35
panic.rs: fix docs (recover -> catch_unwind) The current docs are a bit inconsistent. First, change all references of "recover" to "catch_unwind" because the function was renamed. Second, consistently use the term "unwind safe" instead of "panic safe", "exception safe" and "recover safe" (all these terms were used previously).
2016-05-28Rollup merge of #33822 - soltanmm:dot-vec-div-mag-square, r=nikomatsakisManish Goregaokar-12/+15
Propagate obligations through projection Up next: generating region obligations in inference. r? @nikomatsakis
2016-05-28Rollup merge of #33820 - jonathandturner:format_readability_updates, ↵Manish Goregaokar-32/+117
r=nikomatsakis Increase spacing in error format for readability. Two small tweaks that seem to help readability quite a bit: * Add spacing header<->snippet, but use the |> on the side for visual consistency * Fix #33819 * Fix #33763 * Move format-sensitive test (issue-26480 in cfail) to ui test r? @nikomatsakis
2016-05-28Use the span of `#[derive_Eq]` for `#[structural_match]`Jeffrey Seyfried-42/+14
2016-05-28Add testJeffrey Seyfried-0/+14
2016-05-28Refactor away `set_expn_info`Jeffrey Seyfried-9/+2
2016-05-28Fix spans of generated `#[derive_*]` attributesJeffrey Seyfried-45/+44
2016-05-27Auto merge of #33800 - nrc:save-fn-name, r=eddybbors-3/+2
save-analysis: use a function's short name
2016-05-27Auto merge of #33706 - jseyfried:refactor_cfg, r=nrcbors-613/+355
Perform `cfg` attribute processing during macro expansion and fix bugs This PR refactors `cfg` attribute processing and fixes bugs. More specifically: - It merges gated feature checking for stmt/expr attributes, `cfg_attr` processing, and `cfg` processing into a single fold. - This allows feature gated `cfg` variables to be used in `cfg_attr` on unconfigured items. All other feature gated attributes can already be used on unconfigured items. - It performs `cfg` attribute processing during macro expansion instead of after expansion so that macro-expanded items are configured the same as ordinary items. In particular, to match their non-expanded counterparts, - macro-expanded unconfigured macro invocations are no longer expanded, - macro-expanded unconfigured macro definitions are no longer usable, and - feature gated `cfg` variables on macro-expanded macro definitions/invocations are now errors. This is a [breaking-change]. For example, the following would break: ```rust macro_rules! m { () => { #[cfg(attr)] macro_rules! foo { () => {} } foo!(); // This will be an error macro_rules! bar { () => { fn f() {} } } #[cfg(attr)] bar!(); // This will no longer be expanded ... fn g() { f(); } // ... so that `f` will be unresolved. #[cfg(target_thread_local)] // This will be a gated feature error macro_rules! baz { () => {} } } } m!(); ``` r? @nrc