about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-04-17Auto merge of #24420 - pnkfelix:oflo-api, r=alexcrichtonbors-1/+392
Fill in missing parts of Integer overflow API See todo list at #22020
2015-04-17Fix test for 32-bit targets.Felix S. Klock II-2/+2
(The cast from the 64-bit value to isize was using the lower 32-bits, which led to it being treated as a large positive value rather than a smallish negative one. The fix was to use the same bits for the upper- and lower- 32 bits.)
2015-04-16Auto merge of #24396 - alexcrichton:rustdoc2, r=aturonbors-527/+510
A few final improvements to rustdoc for 1.0: * Improve how rustdoc handles stability * Fix cross-crate macro source links * Improve experience of types inheriting methods through `Deref` Some more details can be found in the commits. [Preview](http://people.mozilla.org/~acrichton/doc/std/)
2015-04-16rustdoc: Inline methods inhereted through DerefAlex Crichton-66/+333
Whenever a type implements Deref, rustdoc will now add a section to the "methods available" sections for "Methods from Deref<Target=Foo>", listing all the inherent methods of the type `Foo`. Closes #19190
2015-04-16rustdoc: Fix cross-crate macro source linksAlex Crichton-20/+51
The source filename for cross crate macros isn't quite right so the normal generated links are invalid. Closes #21311
2015-04-16rustdoc: Overhaul stability displaysAlex Crichton-447/+132
This commit is an overhaul to how rustdoc deals with stability of the standard library. The handling has all been revisited with respect to Rust's current approach to stability in terms of implementation as well as the state of the standard library today. The high level changes made were: * Stable items now have no marker by default * Color-based small stability markers have been removed * Module listings now fade out unstable/deprecated items slightly * Trait methods have a separate background color based on stability and also list the reason that they are unstable. * `impl` blocks with stability no longer render at all. This may be re-added once the compiler recognizes stability on `impl` blocks. * `impl` blocks no longer have stability of the methods implemente indicated * The stability summary has been removed Closes #15468 Closes #21674 Closes #24201
2015-04-16Auto merge of #24181 - jgallagher:aarch64-hfa, r=pnkfelixbors-0/+84
I doubt this PR is ready to merge as-is, for a couple reasons: * There are no tests for this change. I'm not sure how to add tests for this change, as it modifies the C ABI for a cross-compilation target. Anecdotally, I have an iOS library I've been working on, and before this change, it crashes running on an arm64 device due to bad calling conventions (a simplified example is in #24154), and after this change, it runs correctly. * This is my first foray into LLVM. I did my best to reimplement what Clang does for AArch64 codegen (https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/TargetInfo.cpp), particularly in `ABIInfo::isHomogeneousAggregate`, `AArch64ABIInfo::isHomogeneousAggregateBaseType`, and `AArch64ABIInfo::isHomogeneousAggregateSmallEnough`, but I'm not confident I got a complete translation, particularly because Clang includes a lot of checks that I don't believe are necessary for rustc. Fixes #24154.
2015-04-16Auto merge of #24448 - alexcrichton:issue-24445, r=huonwbors-1/+54
One of the parameters to the magical "register a thread-local destructor" function is called `__dso_handle` and largely just passed along (this seems to be what other implementations do). Currently we pass the *value* of this symbol, but apparently the correct piece of information to pass is the *address* of the symbol. In a PIE binary the symbol actually contains an address to itself which is why we've gotten away with what we're doing as long as we have. In a non-PIE binary the symbol contains the address `NULL`, causing a segfault in the runtime library if it keeps going. Closes #24445
2015-04-16Auto merge of #24437 - fhahn:issue-24434, r=alexcrichtonbors-2/+19
closes #24434 This PR changes executes `syntax::config::strip_unconfigured_items` before `syntax::feature_gate::check_crate_macros(sess.codemap()`. As far as I know, `strip_unconfigured_items` should be independent of `check_crate_macros`.
2015-04-16Auto merge of #24423 - tbelaire:include_bytes, r=alexcrichtonbors-0/+45
This is a little bit tricky, since with include_str!, we know that we are including utf-8 content, so it's safe to store the source as a String in a FileMap. We don't know that for include_bytes!, but I don't think we actually need to track the contents anyways, so I'm passing "". new_filemap does check for the zero length content, and it should be reasonable, howeven I'm not sure if it would be better to pass None instead of Some(Rc::new("")) as the src component of a FileMap. Fixes bug #24348
2015-04-16Auto merge of #24306 - l0kod:libc-noctty, r=alexcrichtonbors-0/+5
cf. open(2): If the open file refers to a terminal device it will not become the process's controlling terminal even if the process does not have one.
2015-04-16Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichtonbors-259/+262
r? @alexcrichton
2015-04-16Auto merge of #24485 - brson:is, r=alexcrichtonbors-12/+24
It was an oversight that this was not done in the great int upheaval. [breaking-change]
2015-04-15Forbid is/us suffixes. Fixes #22496Brian Anderson-12/+24
It was an oversight that this was not done in the great int upheaval. [breaking-change]
2015-04-15Auto merge of #24481 - steveklabnik:rollup, r=steveklabnikbors-283/+327
- Successful merges: #24425, #24435, #24438, #24440, #24449, #24457, #24460, #24465, #24467, #24468, #24471, #24476, #24480 - Failed merges:
2015-04-15Rollup merge of #24480 - achanda:move_test, r=alexcrichtonSteve Klabnik-259/+270
- Also move common functions to test.rs - Leaves out Socket address related tests in addr.rs
2015-04-15Rollup merge of #24476 - brettcannon:patch-3, r=steveklabnikSteve Klabnik-1/+1
"as an library" -> "as a library"
2015-04-15Rollup merge of #24471 - andrewseidl:master, r=alexcrichtonSteve Klabnik-1/+1
Use external instead of relative link for rustbyexample.com in generated `src/doc/index.md`. (http://doc.rust-lang.org/nightly/index.html) Previous: http://doc.rust-lang.org/nightly/rustbyexample.com Desired: http://rustbyexample.com/
2015-04-15Rollup merge of #24468 - brettcannon:patch-2, r=alexcrichtonSteve Klabnik-4/+4
Link spanned a line and was missing the actual link target.
2015-04-15Rollup merge of #24467 - brettcannon:patch-1, r=alexcrichtonSteve Klabnik-2/+2
Had a newline in middle of a link, causing the link text to be shown with `[]`.
2015-04-15Rollup merge of #24465 - steveklabnik:intoiteratordocfix, r=alexcrichtonSteve Klabnik-1/+1
2015-04-15Rollup merge of #24460 - bytewiseand:master, r=alexcrichtonSteve Klabnik-0/+32
Closes #24197 Closes #24375 These ICEs are fixed on nightly.
2015-04-15Rollup merge of #24457 - Ms2ger:more-typos, r=alexcrichtonSteve Klabnik-7/+7
2015-04-15Rollup merge of #24449 - richo:typo, r=alexcrichtonSteve Klabnik-1/+1
Spotted a typo, opened a tiny PR.
2015-04-15Rollup merge of #24440 - nham:improve_enumerate_doc, r=alexcrichtonSteve Klabnik-2/+3
I found that the current description of `enumerate()` doesn't actually tell you what, specifically, the method does, and you have to look at the example to figure it out. Here's a description that I think is better.
2015-04-15Rollup merge of #24438 - nrc:tuple-span, r=sfacklerSteve Klabnik-1/+1
2015-04-15Rollup merge of #24435 - killercup:patch-9, r=steveklabnikSteve Klabnik-3/+3
The link works on the `std/ptr/index.html` docs page, but not the `std/primitive.pointer.html` page. Instead of leaving it half-broken, it is removed. I tried fixing this in #24432, but @alexcrichton mentioned that this doc string was used in two places (with different base paths unfortunately). r? @alexcrichton
2015-04-15Rollup merge of #24425 - dhuseby:bitrig_fixing_tests_3, r=alexcrichtonSteve Klabnik-1/+1
the code block in the no-stdlib.md file caused test failure on bitrig and openbsd. Closes #24108
2015-04-15Auto merge of #24330 - pnkfelix:issue-24267, r=nikomatsakisbors-23/+108
Extend rustc::middle::dataflow to allow filtering kills from flow-exits. Fix borrowck analysis so that it will not treat a break that pops through an assignment ```rust x = { ... break; ... } ``` as a kill of the "moved-out" bit for `x`. Fix #24267. [breaking-change], but really, its only breaking code that was already buggy.
2015-04-15Move IP related tests to ip.rsAbhishek Chanda-259/+270
- Also move common functions to test.rs - Leaves out Socket address related tests in addr.rs
2015-04-15Grammar fixBrett Cannon-1/+1
"as an library" -> "as a library"
2015-04-15Describe the Iterator enumerate() method more clearly.Nick Hamann-2/+3
2015-04-15doc: Fix link to rustbyexample.comAndrew Seidl-1/+1
2015-04-15Fix link to stack/heap pageBrett Cannon-4/+4
Link spanned a line and was mising the actual link target.
2015-04-15Fix link formatting errorBrett Cannon-2/+2
Had a newline in middle of a link, causing the link text to be shown with `[]`.
2015-04-15Auto merge of #24436 - fhahn:fix-small-typo, r=steveklabnikbors-1/+1
2015-04-15Regression test.Felix S. Klock II-0/+29
2015-04-15Dataflow changes and associated borrowck fix.Felix S. Klock II-23/+79
Revise rustc::middle::dataflow: one must select kill-kind when calling add_kill. The current kill-kinds are (1.) kills associated with ends-of-scopes and (2.) kills associated with the actual action of the expression/pattern. Then, use this to fix borrowck analysis so that it will not treat a break that pops through an assignment `x = { ... break; ... }` as a kill of the "moved-out" bit for `x`. Fix #24267. (incorporated review feedback.)
2015-04-15std: Fix thread_local! in non-PIE binariesAlex Crichton-1/+54
One of the parameters to the magical "register a thread-local destructor" function is called `__dso_handle` and largely just passed along (this seems to be what other implementations do). Currently we pass the *value* of this symbol, but apparently the correct piece of information to pass is the *address* of the symbol. In a PIE binary the symbol actually contains an address to itself which is why we've gotten away with what we're doing as long as we have. In a non-PIE binary the symbol contains the address `NULL`, causing a segfault in the runtime library if it keeps going. Closes #24445
2015-04-15Fix link in intoiterator docsSteve Klabnik-1/+1
2015-04-15Added a test for include_bytes! dep infoTheo Belaire-0/+40
This tests that both include_str! and include_bytes! mark their input file as a dependancy, and it's correctly outputted when you run `rustc --emit dep-info`.
2015-04-15Add tests for "ident only path should have been covered"-ICEAndreas Martens-0/+32
2015-04-15Fix some typos.Ms2ger-7/+7
2015-04-15Auto merge of #24426 - alexcrichton:windows-pipes, r=aturonbors-82/+46
This commit removes the last remnants of file descriptors from the Windows implementation of `std::sys` by using `CreatePipe` to create anonymous pipes instead of the `pipe` shim provided in msvcrt.
2015-04-15rustc: fix a typo in letter to rustcRicho Healey-1/+1
2015-04-15Auto merge of #24211 - alexcrichton:windows-wsa-flag-overlapped, r=aturonbors-2/+10
This commit modifies the socket creation functions on windows to always specify the `WSA_FLAG_OVERLAPPED` and `WSA_FLAG_NO_HANDLE_INHERIT` flags by default. The overlapped flag enables IOCP APIs on Windows to be used with the socket at no cost, enabling better interoperation with external libraries. The no handle inherit flag mirrors the upcoming change to Unix to set CLOEXEC by default for all handles. Closes #24206
2015-04-15Auto merge of #24431 - ruud-v-a:explain, r=alexcrichtonbors-5/+94
This resolves part of #24407.
2015-04-14Fill in missing implementationTamir Duberstein-0/+3
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-142/+142
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-117/+117
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`