summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2015-04-08Allow plugins to register LLVM passesKeegan McAllister-1/+79
2015-04-08configure: Add --enable-debuginfoBrian Anderson-0/+6
2015-04-08configure: Clarify --enable-debug-assertions status messageBrian Anderson-1/+1
2015-04-08configure: Disable LLVM asserts by defaultBrian Anderson-2/+2
2015-04-08configure: Clarify help message for --enable-debug-assertionsBrian Anderson-1/+1
2015-04-08configure: Disable debug assertions by defaultBrian Anderson-4/+4
2015-04-08configure: Rename --enable-debug to --enable-debug-assertionsBrian Anderson-4/+4
2015-04-08configure: Remove obsolete --disable-verify optionBrian Anderson-9/+2
rust-installer never verifies.
2015-04-08configure: Remove obsolete --nightly flagBrian Anderson-11/+2
2015-04-08Auto merge of #24029 - nagisa:print-locking, r=alexcrichtonbors-34/+446
write_fmt calls write for each formatted field. The default implementation of write_fmt is used, which will call write on not-yet-locked stdout (and write locking after), therefore making print! in multithreaded environment still interleave contents of two separate prints. I’m not sure whether we want to do this change, though, because it has the same deadlock hazard which we tried to avoid by not locking inside write_fmt itself (see [this comment](https://github.com/rust-lang/rust/blob/80def6c2447d23a624e611417f24cf0ab2a5a676/src/libstd/io/stdio.rs#L267)). Spotted on [reddit]. cc @alexcrichton [reddit]: http://www.reddit.com/r/rust/comments/31comh/println_with_multiple_threads/
2015-04-08std: Fix fs::read_link behavior on WindowsAlex Crichton-14/+63
The current implementation of using GetFinalPathNameByHandle actually reads all intermediate links instead of just looking at the current link. This commit alters the behavior of the function to use a different API which correctly reads only one level of the soft link. [breaking-change]
2015-04-08Implement reentrant mutexes and make stdio use themSimonas Kazlauskas-34/+446
write_fmt calls write for each formatted field. The default implementation of write_fmt is used, which will call write on not-yet-locked stdout (and write locking after), therefore making print! in multithreaded environment still interleave contents of two separate prints. This patch implements reentrant mutexes, changes stdio handles to use these mutexes and overrides write_fmt to lock the stdio handle for the whole duration of the call.
2015-04-08Auto merge of #24195 - steveklabnik:rollup, r=steveklabnikbors-2032/+970
- Successful merges: #24143, #24149, #24167, #24178 - Failed merges:
2015-04-08Rollup merge of #24178 - steveklabnik:new_toc, r=nikomatsakisSteve Klabnik-1942/+845
Basically, the overall structure is this: * Getting Started - getting an environment up and running * Learn Rust - project-based learning the basics * Effective Rust - higher level concepts that lead to writing good rust * Syntax and Semantics - chunks of exactly what it sounds like * Nightly Rust - unstable stuff, a staging area for documenting features * Glossary - self-explanatory There's a number of weaknesses with the current TOC, but I'll just focus on the strengths of the new one: We start off with getting our environment set up. That's "getting started". Then, we basically present you with two choices: do you want to start small, with bits of syntax? Or do you want to dive in with projects? I'm guessing more people will choose the second, so that's the next part: "Learn Rust." I don't have any chapters here, but this would have an updated guessing game, a tutorial on building a little `wc` clone, and something else I haven't decided yet. Lots of options. But the idea is to just dive in and get your hands dirty. I'll heavily link to the 'syntax and semantics' sections that are relevant. Then, a section I'm calling 'Effective Rust'. it feels greedy to steal that title, so I'm hoping to give it another name. These are higher-level things than syntax that Rust programmers should know: error handling is a great example. Most of these are sort of 'how do I use the standard library together' kinds of things. This also contains informations about systems programming that those new to it might not know: the stack vs the heap, for example. Then, "Syntax and Semantics." This has one section for each bit of Rust. Small, focused, but explains _everything_. These are positioned to be almost entirely in-order, but heavily cross-link, so you can go out of order if you want to, but you can also use it as a reference. Next, "Nightly Rust," where documenting unstable things goes. If we want to get good feedback on new features, they'll need to be documented, but we don't want to taint the main docs, so that's what this is for. Finally, the glossary. Straightforward enough. -------------------------------- This is going to be a terrible PR to review, so I just did the TOC re-organization, with basically no editing. So it'll be a bit jumbled at first. But next steps are to go through and edit / revise / tweak / add stuff to get it in tip-top shape for 1.0!
2015-04-08Rollup merge of #24167 - hauleth:remove-incorrect-example-from-mpsc, ↵Steve Klabnik-52/+0
r=steveklabnik As beta is now released and is "suggested" version of `rustc` then there should be no code (in documentation) that will not compile with it. This one does not. So according to [this great talk](http://delete-your-code.herokuapp.com/), I am doing what should be done.
2015-04-08Rollup merge of #24149 - bombless:update-faq, r=steveklabnikSteve Klabnik-6/+10
I think "let is used to introduce variables" is incorrent. You can use ```rust match (42, true) { (x, y) => { /* ... */ } } ``` to replace ```rust let x = 42; let y = true; ``` so it's nothing special for `let`.
2015-04-08Rollup merge of #24143 - michaelsproul:extended-errors, r=pnkfelixSteve Klabnik-32/+115
I've taken another look at extended errors - fixing up the printing and adding a few more for match expressions. With regards to printing, the previous behaviour was to just print the error message string directly, despite it containing indentation which caused it to overflow the standard terminal width of 80 columns (try `rustc --explain E0004`). The first approach I considered was to strip the leading whitespace from each line and lay out the text dynamically, inserting spaces in between. This approach became quite messy when taking multi-paragraph errors into account (and seemed overkill). The approach I settled on removes the indentation in the string itself and begins each message with a newline that is stripped before printing. I feel like complete extended errors would be nice to have for 1.0.0 and I'm happy to spearhead an effort to get them written. Brian got me onto writing them at an SF meetup and I think it shouldn't be too hard to get the remaining 80 or so written with the help of people who don't really work on compiler innards.
2015-04-08Modify the ExprUseVisitor to walk each part of an AutoRef, and inNiko Matsakis-74/+226
particular to treat an AutoUnsize as as kind of "instantaneous" borrow of the value being unsized. This prevents us from feeding uninitialized data. This caused a problem for the eager reborrow of comparison traits, because that wound up introducing a "double AutoRef", which was not being thoroughly checked before but turned out not to type check. Fortunately, we can just remove that "eager reborrow" as it is no longer needed now that `PartialEq` doesn't force both LHS and RHS to have the same type (and even if we did have this problem, the better way would be to lean on introducing a common supertype).
2015-04-08Add tests for #22289, #22370 and #22384Luke Gallagher-0/+49
Closes #22289 Closes #22370 Closes #22384
2015-04-08Auto merge of #24021 - pnkfelix:fn-params-outlive-body, r=nikomatsakisbors-8/+301
Encode more precise scoping rules for function params Function params outlive everything in the body (incl temporaries). Thus if we assign them their own `CodeExtent`, the region inference can properly show that it is sound to have temporaries with destructors that reference the parameters (because such temporaries will be dropped before the parameters are dropped). Fix #23338
2015-04-08Add Homogenous Aggregates for AArch64 codegenJohn Gallagher-0/+84
Closes #24154
2015-04-08Address review nit by making `map_id` take an `FnMut`.Felix S. Klock II-2/+2
2015-04-08Auto merge of #23998 - nrc:impl-self, r=nikomatsakisbors-253/+399
Closes #23909 r? @nikomatsakis (or anyone else, really)
2015-04-08Auto merge of #24120 - aturon:range-perf, r=alexcrichtonbors-24/+24
A recent change to the implementation of range iterators meant that, even when stepping by 1, the iterators *always* involved checked arithmetic. This commit reverts to the earlier behavior (while retaining the refactoring into traits). Fixes #24095 Closes #24119 cc #24014 r? @alexcrichton
2015-04-08Address review commentsSeo Sanghyeon-11/+13
2015-04-07alloc: impl fmt::Pointer for Rc, Arc and BoxRicho Healey-0/+67
Closes #24091
2015-04-08Auto merge of #24078 - whipsch:extra-token-msg, r=huonwbors-3/+20
Addresses issue #22425. See `src/test/compile-fail/macro-incomplete-parse.rs` for a relevant test: macro-incomplete-parse.rs:15:9: 15:10 error: macro expansion ignores token `,` and any following macro-incomplete-parse.rs:15 , //~ ERROR macro expansion ignores token `,` ^ macro-incomplete-parse.rs:27:1: 27:17 note: caused by the macro expansion here; the usage of `ignored_item` is likely invalid in this context macro-incomplete-parse.rs:27 ignored_item!(); ^~~~~~~~~~~~~~~~ macro-incomplete-parse.rs:20:14: 20:15 error: macro expansion ignores token `,` and any following macro-incomplete-parse.rs:20 () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` ^ macro-incomplete-parse.rs:30:5: 30:21 note: caused by the macro expansion here; the usage of `ignored_expr` is likely invalid in this context macro-incomplete-parse.rs:30 ignored_expr!(); ^~~~~~~~~~~~~~~~ macro-incomplete-parse.rs:24:14: 24:15 error: macro expansion ignores token `,` and any following macro-incomplete-parse.rs:24 () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` ^ macro-incomplete-parse.rs:32:9: 32:23 note: caused by the macro expansion here; the usage of `ignored_pat` is likely invalid in this context macro-incomplete-parse.rs:32 ignored_pat!() => (), ^~~~~~~~~~~~~~ This does not address the case of improper expansion inside of an impl { } as seen in issue #21607. I'm not sure if the note text is ideal, but it can be refined if needed.
2015-04-08Update "`let` is used to introduce variables" paragraphYork Xiang-6/+10
2015-04-07Import real content.Steve Klabnik-3/+9377
2015-04-07rustdoc: Add a test for should_fail in doctestsAlex Crichton-0/+22
Closes #23744
2015-04-07rustdoc: Index inherent methods on primitivesAlex Crichton-42/+56
The set of types which can have an inherent impl changed slightly and rustdoc just needed to catch up to understand what it means to see a `impl str`! Closes #23511
2015-04-07std: Hide facade extension traits in docsAlex Crichton-0/+4
These traits are currently all just unstable parts of the facade which are implementation details for primitives further up the facade. This may make it more difficult to find what set of methods you get if only linking to libcore, but for now that's also unstable behavior. Closes #22025
2015-04-07std: Reorganize thread::local a bitAlex Crichton-28/+26
Make the structure more amenable to what rustdoc is expecting to ensure that everything renders all nice and pretty in the output. Closes #23705 Closes #23910
2015-04-07rustdoc: Handle duplicate reexports listedAlex Crichton-2/+55
This ends up causing duplicate output in rustdoc. The source of these duplicates is that the item is defined in both resolve namespaces, so it's listed twice. Closes #23207
2015-04-07rustdoc: Handle tests with bare `#` marksAlex Crichton-1/+20
Strip them from output like other `# `-starting lines. Closes #23106
2015-04-07book: Fix a hyperlink to CONFIGS.mdAlex Crichton-2/+5
Right now rustdoc replaces the string ".md)" with ".html)" to fix links between markdown files, so use a different syntax that doesn't get caught in the crossfire. Closes #22900
2015-04-07mk: Stop documenating non-facade cratesAlex Crichton-37/+12
This commit ceases documentation-by-default of crates such as `term`, `serialize`, and `alloc`. Crates like `term` and `rand` have duplicates on `crates.io` and the search index entries generated in the local tree end up only leading to confusion. Crates like the entire compiler infrastructure, `flate`, or `rbml` don't need to be documented in such a prominent location. This change also means that doc tests will no longer be run for crates beyond the facade (e.g. `serialize` or `term`), but there were very few doc tests in there to begin with. Closes #22168
2015-04-07rustdoc: Encode ABI in all methodsAlex Crichton-8/+97
This commit ensures that the ABI of functions is propagated all the way through to the documentation. Closes #22038
2015-04-07rustdoc: Simplify predicates with paren notationAlex Crichton-12/+91
This change is aimed at improving cross-crate (inlined) notation of generic closures. The change modifies `simplify::where_predicates` to handle parenthesized notation as well as starting to handle supertrait bounds as well. This was necessary because all output constraints of closures are bound to `FnOnce` but most trait bounds are that of `FnMut`. Close #21801
2015-04-07rustdoc: Detect provided methods on inlined traitsAlex Crichton-9/+64
Closes #23864
2015-04-07book: Emit links to play.rust-lang.org to run examplesAlex Crichton-1/+12
Had to fix a bug in `--markdown-playground-url` for markdown files in rustdoc as well as adding some necessary JS to the rustbook output as well. Closes #21553
2015-04-07rustdoc: Don't duplicate inlined impl blocksAlex Crichton-2/+35
Closes #21474
2015-04-07rustdoc: Add a test for #21092Alex Crichton-0/+37
Close #21092
2015-04-07rustdoc: Improve handling inlined associated typesAlex Crichton-69/+382
* All bounds are now discovered through the trait to be inlined. * The `?Sized` bound now renders correctly for inlined associated types. * All `QPath`s (`<A as B>::C`) instances are rendered as `A::C` where `C` is a hyperlink to the trait `B`. This should improve at least how the docs look at least. * Supertrait bounds are now separated and display as the source lists them. Closes #20727 Closes #21145
2015-04-07rustdoc: Simplify cross-crate where clausesAlex Crichton-10/+199
Add a custom module to rustdoc which simplifies the output of `middle::ty` into a more readable form which tends to be written down anyway! Closes #20646
2015-04-07rustdoc: Show impls for references to typesAlex Crichton-1/+26
It's somewhat common to impl traits for `&T` and `&mut T` so show these on the pages for `T` to ensure they're listed somewhere at least. Closes #20175
2015-04-07rustdoc: Render methods/impls for bare traitsAlex Crichton-32/+65
This renders a "Methods" and "Trait Implementations" section for each item implemented for a bare trait itself. Closes #19055
2015-04-07std: Deny most warnings in doctestsAlex Crichton-225/+212
Allow a few specific ones but otherwise this helps ensure that our examples are squeaky clean! Closes #18199
2015-04-07rustdoc: Allowing specifying attrs for doctestsAlex Crichton-44/+78
This adds support in rustdoc to blanket apply crate attributes to all doc tests for a crate at once. The syntax for doing this is: #![doc(test(attr(...)))] Each meta item in `...` will be applied to each doctest as a crate attribute. cc #18199
2015-04-07rustdoc: Link "Trait Implementations" to sourcesAlex Crichton-105/+143
All methods listed in "Trait Implementations" now hyperlink to the source trait instead of themselves, allowing easy browsing of the documentation of a trait method. Closes #17476