Commit Graph

54531 Commits

Author SHA1 Message Date
Guillaume Gomez
dcc8fa5270 Rollup merge of #34518 - frewsxcv:io-repeat, r=GuillaumeGomez
Add doc example for `std::io::repeat`.

None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
f47fcc738b Rollup merge of #34517 - frewsxcv:empty, r=GuillaumeGomez
Minor rewrite of `std::io::empty` doc example.

None
2016-06-28 16:05:16 +02:00
Guillaume Gomez
890e3a7a1a Rollup merge of #34479 - ollie27:rustdoc_renamed_reexport_list, r=GuillaumeGomez
rustdoc: Fix inlined renamed reexports in import lists

Fixes #34473
2016-06-28 16:05:15 +02:00
Guillaume Gomez
f8453a1d17 Rollup merge of #34475 - frewsxcv:path-component, r=GuillaumeGomez
Expand `std::path::Component` documentation.

Indicate how it gets created and add an example.
2016-06-28 16:05:15 +02:00
Guillaume Gomez
b34f6e7245 Rollup merge of #34471 - GuillaumeGomez:fix_expl, r=steveklabnik
Fix E0269 error explanation

r? @steveklabnik
2016-06-28 16:05:15 +02:00
Guillaume Gomez
b765edf440 Rollup merge of #34462 - dns2utf8:leading_zeros, r=GuillaumeGomez
Add example with leading zeros

I was searching for this format very long. So I added an example to the prominent section.

I was thinking of putting the keyword leading in the corresponding section as well, what do you think?

r? @steveklabnik
2016-06-28 16:05:15 +02:00
Guillaume Gomez
86e4a034af Rollup merge of #34442 - tatsuya6502:doc-book-ownership, r=steveklabnik
[doc] Fix links in Ownership section of the book

- Add a missing link definition for `[i32]`.
- Like `[stack]` link is pointing to `...#the-stack`, append `#the-heap` to `[heap]` link.
2016-06-28 16:05:14 +02:00
Guillaume Gomez
adc70bdc90 Rollup merge of #34415 - ollie27:docs_float, r=steveklabnik
Use the correct types in float examples

r? @steveklabnik
2016-06-28 16:05:14 +02:00
Guillaume Gomez
5d6b41f3bc Rollup merge of #34406 - frewsxcv:sleep-ex, r=alexcrichton
Add example for `std:🧵:sleep`.

None
2016-06-28 16:05:14 +02:00
Guillaume Gomez
47ef866f43 Rollup merge of #34328 - wuranbo:patch-1, r=steveklabnik
Traits where syntax's extra usage example more clearly

r? @steveklabnik
2016-06-28 16:05:13 +02:00
Guillaume Gomez
be1c2b9c8c Rollup merge of #34287 - durka:patch-26, r=steveklabnik
update reference for #29734
2016-06-28 16:05:13 +02:00
Guillaume Gomez
cea2438834 Rollup merge of #34080 - royalstream:royalstream-book-june4, r=steveklabnik
Syntax coloring and more compact diagram

Two cosmetic improvements:
- New content was added a few days ago to the **Closures** chapter but it was missing rust's syntax coloring.
- Also, in the **Crates and Modules** chapter, a diagram was improved to be more symmetric and to take less space.
2016-06-28 16:05:12 +02:00
Corey Farwell
325e09e952 Add doc example for std::io::sink. 2016-06-28 08:22:44 -04:00
Jeffrey Seyfried
e58963d3e4 groundwork: create the Resolver earlier in phase 2 2016-06-28 05:28:27 +00:00
Jeffrey Seyfried
ec0c150152 groundwork: refactor the interface that resolve exposes to driver 2016-06-28 05:28:26 +00:00
Jeffrey Seyfried
36a4eb9940 cleanup: refactor away ast::NodeIdAssigner 2016-06-28 05:28:25 +00:00
Jeffrey Seyfried
4a13bcb4fb groundwork: use resolve_identifier instead of resolve_path to classify ident patterns 2016-06-28 05:28:23 +00:00
Jeffrey Seyfried
2dc15f2b96 cleanup: use DummyResult to implement MacroGenerable::dummy 2016-06-28 05:28:22 +00:00
Jeffrey Seyfried
b968ee3656 cleanup: don't count attributes on an item in a statement position as on the statement 2016-06-28 05:28:20 +00:00
Corey Farwell
a350ca62cd Minor rewrite of std::io::empty doc example.
Remove unnecessary hidden `foo` function.
Demonstrate this emptiness of the resulting string.
Combine imports.
2016-06-27 22:28:28 -04:00
Alex Crichton
3fd411e017 mk: Make some LLVM building support more robust
* Implement the clean-llvm target for those cases where makefiles are being used
* Have all cross-compiled LLVMs depend on the **host** LLVM as they'll require
  the llvm-tablegen executable from there
2016-06-27 18:59:55 -07:00
Alex Crichton
ea1818f1ca rustbuild: Update how compiler-rt is called
Looks like compiler-rt has been tweaked slightly during the last update,
propagate these changes to rustbuild as well.
2016-06-27 18:53:17 -07:00
Corey Farwell
18b094bdbd Add doc example for std::io::repeat. 2016-06-27 21:23:53 -04:00
Alex Crichton
cb74a5874f configure: Check for valid Python on MinGW as well
The LLVM build system is somewhat picky about which Python is used to build it
as it's known to be incompatible with the default `python2` package that ships
with MinGW. This was previously detected for MSVC builds but the logic was left
out for MinGW by accident (now that we've switched to cmake builds for LLVM
everywhere).

This corrects the `./configure` check and also updates the `README.md`
accordingly. Additionally, a number of instructions were updated to work with
the most recent copy of MSYS2.

Closes #34489
2016-06-27 18:14:54 -07:00
bors
ea0dc92972 Auto merge of #34424 - jseyfried:breaking_batch, r=Manishearth
Batch up libsyntax breaking changes

Batch of the following syntax-[breaking-change] changes:
 - #34213: Add a variant `Macro` to `TraitItemKind`
 - #34368: Merge the variant `QPath` of `PatKind` into the variant `PatKind::Path`
 - #34385: Move `syntax::ast::TokenTree` into a new module `syntax::tokenstream`
 - #33943:
  - Remove the type parameter from `visit::Visitor`
  - Remove `attr::WithAttrs` -- use `attr::HasAttrs` instead.
  - Change `fold_tt`/`fold_tts` to take token trees by value and avoid wrapping token trees in `Rc`.
  - Remove the field `ctxt` of `ast::Mac_`
  - Remove inherent method `attrs()` of types -- use the method `attrs` of `HasAttrs` instead.
 - #34316:
  - Remove `ast::Decl`/`ast::DeclKind` and add variants `Local` and `Item` to `StmtKind`.
  - Move the node id for statements from the `StmtKind` variants to a field of `Stmt` (making `Stmt` a struct instead of an alias for `Spanned<StmtKind>`)
  - Rename `ast::ExprKind::Again` to `Continue`.
 - #34339: Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`
  - Use `.into()` in convert between `Vec<Attribute>` and `ThinVec<Attribute>`
  - Use autoderef instead of `.as_attr_slice()`
 - #34436: Remove the optional expression from `ast::Block` and instead use a `StmtKind::Expr` at the end of the statement list.
 - #34403: Move errors into a separate crate (unlikely to cause breakage)
2016-06-27 16:42:03 -07:00
Jeffrey Seyfried
360dcae419 Update src/rustc/Cargo.lock 2016-06-27 23:40:04 +00:00
Jonathan Price
15a0299299 many small grammatical and stylistic changes
grammatical: "Here's" should be "Here are", "rules" is plural.
stylistic: "rules for" is more idiomatic than "rules about".
grammatical: No verb in "One or the other"; changed to "It's one or the other".
code: added implied `fn main() { ... }` because it is referenced in "note: previous borrow ends here"
semantic: "But" seems like the wrong word here, there is now, contrast, only further explanation. "so", "thus" or "therefor" is clearer.
grammatical: Another misuse of "Here's", should be "Here are" (or possibly "Here're").
grammatical: "use" should be capitalized. All other subheadings capitalize the first word.
2016-06-27 18:06:40 -05:00
Oliver Middleton
beebaf1366 rustdoc: Fix a few stripping issues
We need to recurse into stripped modules to strip things like impl methods
but when doing so we must not add any items to the `retained` set.
2016-06-27 23:26:29 +01:00
Jonathan Price
9dd5540540 "also ... as well" is redundant
Also "to access" is cleaner than "for accessing"
2016-06-27 16:52:39 -05:00
Jonathan Price
4a327e0e14 "errors with" is idiomatic in English 2016-06-27 16:49:58 -05:00
CensoredUsername
37f0f67682 Support CMake installations in paths containing spaces 2016-06-27 23:39:51 +02:00
Jonathan Price
cae02fff6a fixed backquotes and awkward borrowing clause 2016-06-27 16:34:35 -05:00
Michael Woerister
f41de0ff3a Disable debuginfo tests for a given blacklist of LLDB versions 2016-06-27 14:38:41 -04:00
Jeffrey Seyfried
542ba8c5f7 Fix Cargo.tomls 2016-06-27 18:30:46 +00:00
bors
a0f572e98b Auto merge of #34169 - scottcarr:dominator-cache, r=nikomatsakis
[MIR] Add Dominators to MIR and Add Graph Algorithms

~~This PR assumes PR #34149 lands.~~

Add generic graph algorithms to rustc_data_structures.

Add dominators and successors to the ~~cache (that currently only holds predecessors).~~ `Mir`.
2016-06-27 11:12:25 -07:00
Corey Farwell
a7b9e5441b Add example for std:🧵:sleep. 2016-06-27 13:06:20 -04:00
bors
126af085be Auto merge of #34477 - ollie27:patch-1, r=GuillaumeGomez
rustdoc: Fix search result layout for enum variants and struct fields

This was broken in #34234.

For example:
[before](https://doc.rust-lang.org/nightly/std/?search=cow%3A%3Aborrowed) [after](https://ollie27.github.io/rust_doc_test/std/?search=cow%3A%3Aborrowed)
[before](https://doc.rust-lang.org/nightly/std/?search=range%3A%3Astart) [after](https://ollie27.github.io/rust_doc_test/std/?search=range%3A%3Astart)

cc @GuillaumeGomez
2016-06-27 06:43:49 -07:00
Oliver Schneider
b8f9c88c2d
Revert "skip double negation in const eval"
This reverts commit 735c018974.
2016-06-27 11:44:10 +02:00
bors
f019e381fe Auto merge of #34453 - frewsxcv:regress, r=sanxiyn
Add regression test for #24424.

Fixes https://github.com/rust-lang/rust/issues/24424.
2016-06-27 01:10:49 -07:00
bors
b42884fc64 Auto merge of #34419 - eddyb:virtually-inexistent, r=Aatch
Don't translate vtable methods with Self: Sized bounds.

Fixes #34416.
2016-06-26 22:24:03 -07:00
Jeffrey Seyfried
b4611b1ff2 Add regression test 2016-06-27 03:17:55 +00:00
Jeffrey Seyfried
e01a2ba274 Forbid type parameters and global paths in macro invocations 2016-06-27 03:17:46 +00:00
bors
af2fe634bf Auto merge of #34491 - eddyb:return-in-peace, r=nagisa
Remove the return_address intrinsic.

This intrinsic to get the return pointer was introduced in #16248 / #16081 by @pcwalton for Servo.
However, as explained in #34227, it's impossible to ensure it's used correctly, and it broke with `-Zorbit`.

Servo's usage is being replaced in servo/servo#11872, and I expect nobody else to have abused it.
But I've also started a crater run, just in case this is a `[breaking-change]` for anyone else.
2016-06-26 19:02:12 -07:00
Corey Farwell
f1d600c6f8 Expand std::path::Component documentation.
Indicate how it gets created and add an example.
2016-06-26 20:22:12 -04:00
Eduard Burtescu
b30134dbc3 Remove the return_address intrinsic. 2016-06-27 01:47:28 +03:00
bors
3059bb9e38 Auto merge of #34450 - jseyfried:fix_include_path, r=nrc
Revert a change to the relative path for macro-expanded `include!`s

Fixes #34431 (c.f. discussion in that issue).
r? @nrc
2016-06-26 14:50:27 -07:00
Eduard Burtescu
fe7207f6af Disallow constants and statics from having unsized types. 2016-06-26 18:28:17 +03:00
bors
15e8a67c47 Auto merge of #34469 - frewsxcv:path-components, r=GuillaumeGomez
Indicate how the `std::path::Components` struct is created.

None
2016-06-25 22:06:35 -07:00
bors
c12eb1d7a2 Auto merge of #34468 - frewsxcv:doc-links, r=GuillaumeGomez
Add hyperlinks to `std::fs` functions from `std::path`.

None
2016-06-25 19:24:29 -07:00
Jeffrey Seyfried
9bb3ea0feb Rollup merge of #34436 - jseyfried:no_block_expr, r=eddyb
To allow these braced macro invocation, this PR removes the optional expression from `ast::Block` and instead uses a `StmtKind::Expr` at the end of the statement list.

Currently, braced macro invocations in blocks can expand into statements (and items) except when they are last in a block, in which case they can only expand into expressions.

For example,
```rust
macro_rules! make_stmt {
    () => { let x = 0; }
}

fn f() {
    make_stmt! {} //< This is OK...
    let x = 0; //< ... unless this line is commented out.
}
```

Fixes #34418.
2016-06-26 02:20:14 +00:00