]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAnd suddenly a german word :O
kellerkindt [Tue, 27 Dec 2016 01:26:30 +0000 (02:26 +0100)]
And suddenly a german word :O

"verboten" is german for "forbidden"

7 years agoAuto merge of #38314 - japaric:do-not-delete-enable-llvm-backend, r=alexcrichton
bors [Mon, 26 Dec 2016 20:48:43 +0000 (20:48 +0000)]
Auto merge of #38314 - japaric:do-not-delete-enable-llvm-backend, r=alexcrichton

initial SPARC support

### UPDATE

Can now compile `no_std` executables with:

```
$ cargo new --bin app && cd $_

$ edit Cargo.toml && tail -n2 $_
[dependencies]
core = { path = "/path/to/rust/src/libcore" }

$ edit src/main.rs && cat $_
#![feature(lang_items)]
#![no_std]
#![no_main]

#[no_mangle]
pub fn _start() -> ! {
    loop {}
}

#[lang = "panic_fmt"]
fn panic_fmt() -> ! {
    loop {}
}

$ edit sparc-none-elf.json && cat $_
{
  "arch": "sparc",
  "data-layout": "E-m:e-p:32:32-i64:64-f128:64-n32-S64",
  "executables": true,
  "llvm-target": "sparc",
  "os": "none",
  "panic-strategy": "abort",
  "target-endian": "big",
  "target-pointer-width": "32"
}

$ cargo rustc --target sparc-none-elf -- -C linker=sparc-unknown-elf-gcc -C link-args=-nostartfiles

$ file target/sparc-none-elf/debug/app
app: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), statically linked, not stripped

$ sparc-unknown-elf-readelf -h target/sparc-none-elf/debug/app
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Sparc
  Version:                           0x1
  Entry point address:               0x10074
  Start of program headers:          52 (bytes into file)
  Start of section headers:          1188 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         2
  Size of section headers:           40 (bytes)
  Number of section headers:         14
  Section header string table index: 11

$ sparc-unknown-elf-objdump -Cd target/sparc-none-elf/debug/app

target/sparc-none-elf/debug/app:     file format elf32-sparc

Disassembly of section .text:

00010074 <_start>:
   10074:       9d e3 bf 98     save  %sp, -104, %sp
   10078:       10 80 00 02     b  10080 <_start+0xc>
   1007c:       01 00 00 00     nop
   10080:       10 80 00 02     b  10088 <_start+0x14>
   10084:       01 00 00 00     nop
   10088:       10 80 00 00     b  10088 <_start+0x14>
   1008c:       01 00 00 00     nop
```

---

Someone wants to attempt launching some Rust [into space](https://www.reddit.com/r/rust/comments/5h76oa/c_interop/) but their platform is based on the SPARCv8 architecture. Let's not block them by enabling LLVM's SPARC backend.

Something very important that they'll also need is the "cabi" stuff as they'll be embedding some Rust code into a bigger C application (i.e. heavy use of `extern "C"`). The question there is what name(s) should we use for "target_arch" as the "cabi" implementation [varies according to that parameter](https://github.com/rust-lang/rust/blob/1.13.0/src/librustc_trans/abi.rs#L498-L523).

AFAICT, SPARCv8 is a 32-bit architecture and SPARCv9 is a 64-bit architecture. And, LLVM uses `sparc`, `sparcv9` and `sparcel` for [the architecture triple](https://github.com/rust-lang/llvm/blob/ac1c94226e9fa17005ce7e2dd52dd6d1875f3137/include/llvm/ADT/Triple.h#L67-L69) so perhaps we should use `target_arch = "sparc"` (32-bit) and `target_arch = "sparcv9"` (64-bit) as well.

r? @alexcrichton This PR only enables this LLVM backend when rustbuild is used. Do I also need to implement this for the old Makefile-based build system? Or are all our nightlies now being generated using rustbuild?

cc @brson

7 years agoAuto merge of #38542 - YaLTeR:fastcall-fix, r=pnkfelix
bors [Mon, 26 Dec 2016 17:23:42 +0000 (17:23 +0000)]
Auto merge of #38542 - YaLTeR:fastcall-fix, r=pnkfelix

Fix fastcall not applying inreg attributes to arguments

Fixes https://github.com/rust-lang/rust/issues/18086

7 years agoAuto merge of #38154 - petrochenkov:altname, r=jseyfried
bors [Mon, 26 Dec 2016 13:32:13 +0000 (13:32 +0000)]
Auto merge of #38154 - petrochenkov:altname, r=jseyfried

More systematic error reporting in path resolution

Path resolution for types, expressions and patterns used various heuristics to give more helpful messages on unresolved or incorrectly resolved paths.
This PR combines these heuristics and applies them to all non-import paths.

First a path is resolved in all namespaces, starting from its primary namespace (to give messages like "expected function, found macro, you probably forgot `!`").
If this resolution doesn't give a desired result we create a base error - either "path is not resolved" or "path is resolved, but the resolution is not acceptable in this context".
Other helps and notes are applied to this base error using heuristics.

Here's the list of heuristics for a path with a last segment `name` in order.
First we issue special messages for unresolved `Self` and `self`.
Second we try to find free items named `name` in other modules and suggest to import them.
Then we try to find fields and associated items named `name` and suggest `self.name` or `Self::name`.
After that we try several deterministic context dependent heuristics like "expected value, found struct, you probably forgot `{}`".
If nothing of the above works we try to find candidates with other names using Levenshtein distance.

---

Some alternatives/notes/unresolved questions:
- ~~I had a strong desire to migrate all affected tests to `test/ui`, diagnostics comparison becomes much more meaningful, but I did this only for few tests so far.~~ (Done)
- ~~Labels for "unresolved path" errors are mostly useless now, it may make sense to move some help/notes to these labels, help becomes closer to the error this way.~~ (Done)
- ~~Currently only the first successful heuristic results in additional message shown to the user, it may make sense to print them all, they are rarely compatible, so the diagnostics bloat is unlikely.~~ (Done)
- Now when https://github.com/rust-lang/rust/pull/38014 landed `resolve_path` can potentially be replaced with `smart_resolve_path` in couple more places - e.g. ~~visibilities~~ (done), ~~import prefixes~~ (done), HIR paths.

---

Some additional fixes:
- Associated suggestions and typo suggestions are filtered with a context specific predicate to avoid inapplicable suggestions.
- `adjust_local_def` works properly in speculative resolution.
- I also fixed a recently introduced ICE in partially resolved UFCS paths (see test `ufcs-partially-resolved.rs`).     Minimal reproduction:
    ```
    enum E {}
    fn main() {
        <u8 as E>::A;
    }
    ```
    Fixes https://github.com/rust-lang/rust/issues/38409, fixes https://github.com/rust-lang/rust/issues/38504 (duplicates).
- Some bugs in resolution of visibilities are fixed - `pub(Enum)`, `pub(Trait)`, `pub(non::local::path)`.
- Fixes https://github.com/rust-lang/rust/issues/38012.
---

r? @jseyfried for technical details + @jonathandturner  for diagnostics changes
How to read the patch: `smart_resolve_path(_fragment)/resolve_qpath_anywhere` are written anew and replace `resolve_trait_reference`/`resolve_type`/`resolve_pattern_path`/`resolve_struct_path`/`resolve_expr` for `ExprKind::Path`, everything else can be read as a diff.

7 years agoMore systematic error reporting in path resolution
Vadim Petrochenkov [Wed, 30 Nov 2016 22:35:25 +0000 (01:35 +0300)]
More systematic error reporting in path resolution

7 years agoAuto merge of #38536 - retep998:flauschige-kaninchen, r=petrochenkov
bors [Mon, 26 Dec 2016 10:52:56 +0000 (10:52 +0000)]
Auto merge of #38536 - retep998:flauschige-kaninchen, r=petrochenkov

Fix fs tests on Windows systems with non-english locales.

Fixes https://github.com/rust-lang/rust/issues/34628

r? @alexcrichton

7 years agoMove some compile-fail tests into UI directory
Vadim Petrochenkov [Wed, 30 Nov 2016 22:35:25 +0000 (01:35 +0300)]
Move some compile-fail tests into UI directory

7 years agoAuto merge of #38598 - brson:em, r=alexcrichton
bors [Mon, 26 Dec 2016 00:47:50 +0000 (00:47 +0000)]
Auto merge of #38598 - brson:em, r=alexcrichton

Emscripten targets are Unix targets

I suspect this will fix the errors compiling libc https://buildbot.rust-lang.org/builders/auto-linux-rustbuild-cross-opt/builds/689/steps/compile/logs/stdio that are occurring on every PR.

Emscripten is basically a posix emulation layer for the web and I consider it a Unix.

cc @alexcrichton

7 years agoMove target_family to TargetOptions, not Target
Alex Crichton [Sun, 25 Dec 2016 22:03:44 +0000 (14:03 -0800)]
Move target_family to TargetOptions, not Target

Just fixing a compile error

7 years agoAuto merge of #38490 - jseyfried:def_id_vis, r=nrc
bors [Sun, 25 Dec 2016 21:32:37 +0000 (21:32 +0000)]
Auto merge of #38490 - jseyfried:def_id_vis, r=nrc

Use `DefId`s instead of `NodeId`s for `pub(restricted)` visibilities

This is groundwork for hygiene 2.0, specifically privacy checking hygienic intercrate name resolutions.
r? @nrc

7 years agoAuto merge of #38539 - jseyfried:fix_resolve_hang, r=eddyb
bors [Sun, 25 Dec 2016 18:13:54 +0000 (18:13 +0000)]
Auto merge of #38539 - jseyfried:fix_resolve_hang, r=eddyb

resolve: fix non-termination

Fixes #34324.
r? @eddyb

7 years agoAuto merge of #38566 - jseyfried:fix_import_resolution_bug, r=eddyb
bors [Sun, 25 Dec 2016 13:14:12 +0000 (13:14 +0000)]
Auto merge of #38566 - jseyfried:fix_import_resolution_bug, r=eddyb

Fix bug in import resolution

Fixes #38535 and fixes #38556.
r? @nrc

7 years agoEmscripten targets are Unix targets
Brian Anderson [Sun, 25 Dec 2016 02:09:10 +0000 (02:09 +0000)]
Emscripten targets are Unix targets

7 years agoAuto merge of #38594 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 24 Dec 2016 21:14:17 +0000 (21:14 +0000)]
Auto merge of #38594 - steveklabnik:rollup, r=steveklabnik

Rollup of 14 pull requests

- Successful merges: #37956, #38013, #38297, #38480, #38497, #38502, #38505, #38513, #38521, #38549, #38554, #38557, #38568, #38572
- Failed merges:

7 years agoRollup merge of #38572 - GuillaumeGomez:join_handle_docs, r=frewsxcv
Steve Klabnik [Sat, 24 Dec 2016 19:29:34 +0000 (14:29 -0500)]
Rollup merge of #38572 - GuillaumeGomez:join_handle_docs, r=frewsxcv

Add JoinHandle missing examples

r? @frewsxcv

7 years agoRollup merge of #38568 - chris-morgan:fix-markdown-lists, r=frewsxcv
Steve Klabnik [Sat, 24 Dec 2016 19:29:33 +0000 (14:29 -0500)]
Rollup merge of #38568 - chris-morgan:fix-markdown-lists, r=frewsxcv

Fix Markdown list formatting.

The Markdown engine used by the book can cope with a single leading space on the list marker:

    Like this:

     * List item

    Rather than like this:

    * List item

… but it’s not the typical convention employed in the book, and moreover the Markdown engine used for producing the error index *can’t* cope with it (its behaviour looks like a bug, as it appears to lose one of the two line breaks as well, but that’s immaterial here).

So, we shift to a single convention which doesn’t trigger bugs in the Markdown renderer.

----

See https://doc.rust-lang.org/error-index.html#E0458 and https://doc.rust-lang.org/error-index.html#E0101 for the bad current rendering in the error index.

7 years agoRollup merge of #38557 - michaelwoerister:inline-asm-ich, r=nikomatsakis
Steve Klabnik [Sat, 24 Dec 2016 19:29:32 +0000 (14:29 -0500)]
Rollup merge of #38557 - michaelwoerister:inline-asm-ich, r=nikomatsakis

incr. comp.: Improve InlineAsm hashing and add test case

r? @nikomatsakis

7 years agoRollup merge of #38554 - DirkyJerky:master, r=frewsxcv
Steve Klabnik [Sat, 24 Dec 2016 19:29:31 +0000 (14:29 -0500)]
Rollup merge of #38554 - DirkyJerky:master, r=frewsxcv

Create hyperlink to correct documentation

In librustc_trans's readme

7 years agoRollup merge of #38549 - aidanhs:aphs-incremental-readme-note, r=nikomatsakis
Steve Klabnik [Sat, 24 Dec 2016 19:29:30 +0000 (14:29 -0500)]
Rollup merge of #38549 - aidanhs:aphs-incremental-readme-note, r=nikomatsakis

Correct path of incremental artifacts

Per https://github.com/rust-lang/rust/pull/38072#issuecomment-263670621

r? @nikomatsakis

7 years agoRollup merge of #38521 - jxson:remove-magenta-warnings, r=sfackler
Steve Klabnik [Sat, 24 Dec 2016 19:29:29 +0000 (14:29 -0500)]
Rollup merge of #38521 - jxson:remove-magenta-warnings, r=sfackler

Removes magenta build warning.

Small bug fix to remove an unused type in the magenta process code that causes build failures for magenta's rustc.

r? @alexcrichton

@tedsta @raphlinus

7 years agoRollup merge of #38513 - GuillaumeGomez:thread_fn_docs, r=frewsxcv
Steve Klabnik [Sat, 24 Dec 2016 19:29:28 +0000 (14:29 -0500)]
Rollup merge of #38513 - GuillaumeGomez:thread_fn_docs, r=frewsxcv

Add missing examples in some thread functions

r? @frewsxcv

7 years agoRollup merge of #38505 - estebank:why-lines, r=frewsxcv
Steve Klabnik [Sat, 24 Dec 2016 19:29:26 +0000 (14:29 -0500)]
Rollup merge of #38505 - estebank:why-lines, r=frewsxcv

Docs: Explain why/when `.lines()` returns an error

Fix #37744.

7 years agoRollup merge of #38502 - michaelwoerister:ich-test-inherent-impls, r=nikomatsakis
Steve Klabnik [Sat, 24 Dec 2016 19:29:25 +0000 (14:29 -0500)]
Rollup merge of #38502 - michaelwoerister:ich-test-inherent-impls, r=nikomatsakis

ICH: Add test cases for inherent impls.

r? @nikomatsakis

7 years agoRollup merge of #38497 - QuietMisdreavus:rustdoc-where-again, r=steveklabnik
Steve Klabnik [Sat, 24 Dec 2016 19:29:23 +0000 (14:29 -0500)]
Rollup merge of #38497 - QuietMisdreavus:rustdoc-where-again, r=steveklabnik

rustdoc: properly calculate line length for where clauses

Apparently, while I was cleaning up #37190, I regressed the formatting for long where clauses, where it wouldn't take the "prefix" length into account when deciding whether to break the line up. This patch fixes that.

7 years agoRollup merge of #38480 - clarcharr:import_css, r=steveklabnik
Steve Klabnik [Sat, 24 Dec 2016 19:29:22 +0000 (14:29 -0500)]
Rollup merge of #38480 - clarcharr:import_css, r=steveklabnik

Don't @import normalize.css.

This lets the browser load both files in parallel instead of waiting for `rustdoc.css` to load first.

7 years agoRollup merge of #38297 - matklad:linked-lists-are-not-cool, r=GuillaumeGomez
Steve Klabnik [Sat, 24 Dec 2016 19:29:21 +0000 (14:29 -0500)]
Rollup merge of #38297 - matklad:linked-lists-are-not-cool, r=GuillaumeGomez

Advertise Vec in LinkedList docs

r? @steveklabnik

Hi! We already [advise](https://doc.rust-lang.org/std/collections/#use-a-linkedlist-when) to use `Vec` instead of `LinkedList` in the top-level collections documentation. But I think it may be missed by someone who just directly finds `LinkedList`.

What do you feel about advertising `Vec` directly in `LinkedList` docs as well?

7 years agoRollup merge of #38013 - wezm:simplify-test-notes, r=steveklabnik
Steve Klabnik [Sat, 24 Dec 2016 19:29:20 +0000 (14:29 -0500)]
Rollup merge of #38013 - wezm:simplify-test-notes, r=steveklabnik

Simplify notes on testing and concurrency

The start of the notes on tests running concurrently, added in https://github.com/rust-lang/rust/pull/37766 read a little awkwardly. This PR fixes that and simplifies the wording a bit.

r? @steveklabnik

7 years agoRollup merge of #37956 - tshepang:patch-2, r=steveklabnik
Steve Klabnik [Sat, 24 Dec 2016 19:29:19 +0000 (14:29 -0500)]
Rollup merge of #37956 - tshepang:patch-2, r=steveklabnik

book: replace example I do not understand

7 years agoAuto merge of #38443 - frewsxcv:file-docs, r=brson
bors [Sat, 24 Dec 2016 18:00:45 +0000 (18:00 +0000)]
Auto merge of #38443 - frewsxcv:file-docs, r=brson

Improve the API examples for `std::fs::File`.

Fixes https://github.com/rust-lang/rust/issues/35875.

7 years agoAuto merge of #38062 - alexcrichton:fix-line-writer, r=brson
bors [Sat, 24 Dec 2016 13:28:37 +0000 (13:28 +0000)]
Auto merge of #38062 - alexcrichton:fix-line-writer, r=brson

std: Fix partial writes in LineWriter

Previously the `LineWriter` could successfully write some bytes but then fail to
report that it has done so. Additionally, an erroneous flush after a successful
write was permanently ignored. This commit fixes these two issues by (a)
maintaining a `need_flush` flag to indicate whether a flush should be the first
operation in `LineWriter::write` and (b) avoiding returning an error once some
bytes have been successfully written.

Closes #37807

7 years agoAdd JoinHandle missing examples
Guillaume Gomez [Fri, 23 Dec 2016 10:25:11 +0000 (11:25 +0100)]
Add JoinHandle missing examples

7 years agoUse `DefId`s instead of `NodeId`s for `pub(restricted)` visibilities.
Jeffrey Seyfried [Tue, 20 Dec 2016 08:32:15 +0000 (08:32 +0000)]
Use `DefId`s instead of `NodeId`s for `pub(restricted)` visibilities.

7 years agoAuto merge of #38268 - withoutboats:parse_where_higher_rank_hack, r=eddyb
bors [Sat, 24 Dec 2016 00:22:00 +0000 (00:22 +0000)]
Auto merge of #38268 - withoutboats:parse_where_higher_rank_hack, r=eddyb

Prevent where < ident > from parsing.

In order to be forward compatible with `where<'a>` syntax for higher
rank parameters, prevent potential conflicts with UFCS from parsing
correctly for the near term.

7 years agoAuto merge of #38523 - camlorn:disable_field_reordering, r=nikomatsakis
bors [Fri, 23 Dec 2016 21:36:59 +0000 (21:36 +0000)]
Auto merge of #38523 - camlorn:disable_field_reordering, r=nikomatsakis

Disable field reordering

This was decided via IRC and needs a backport to beta.  Basically, #37429 broke servo, and probably needs an announcement and opt-in flag.  I didn't run all tests locally but think I've already reverted all the ones that need to be reverted.

r? @nikomatsakis

7 years agobook: replace example I do not understand
Tshepang Lekhonkhobe [Fri, 23 Dec 2016 20:32:27 +0000 (22:32 +0200)]
book: replace example I do not understand

7 years agoAuto merge of #38533 - jseyfried:legacy_custom_derive_deprecation, r=nrc
bors [Fri, 23 Dec 2016 18:43:12 +0000 (18:43 +0000)]
Auto merge of #38533 - jseyfried:legacy_custom_derive_deprecation, r=nrc

Allow legacy custom derive authors to disable warnings in downstream crates

This PR allows legacy custom derive authors to use a pre-deprecated method `registry.register_custom_derive()` instead of `registry.register_syntax_extension()` to avoid downstream deprecation warnings.

r? @nrc

7 years agoAuto merge of #38529 - nrc:save-sig, r=nikomatsakis
bors [Fri, 23 Dec 2016 15:59:07 +0000 (15:59 +0000)]
Auto merge of #38529 - nrc:save-sig, r=nikomatsakis

save-analysis: add signature info

These 'signatures' for definitions contain enough info for the RLS to create Rustdoc-style info on the fly.

7 years agoAuto merge of #38511 - Mark-Simulacrum:drop-glue, r=eddyb
bors [Fri, 23 Dec 2016 11:56:50 +0000 (11:56 +0000)]
Auto merge of #38511 - Mark-Simulacrum:drop-glue, r=eddyb

Make drop glue for unsized value pass two arguments instead of *(data, meta)

Fixes #36457

r? @eddyb

7 years agoAuto merge of #38401 - redox-os:redox_cross, r=brson
bors [Fri, 23 Dec 2016 09:09:26 +0000 (09:09 +0000)]
Auto merge of #38401 - redox-os:redox_cross, r=brson

Redox Cross Compilation

I will admit - there are things here that I wish I did not have to do. This completes the ability to create a cross compiler from the rust repository for `x86_64-unknown-redox`. I will document this PR with inline comments explaining some things.

[View this gist to see how a cross compiler is built](https://gist.github.com/jackpot51/6680ad973986e84d69c79854249f2b7e)

Prior discussion of a smaller change is here: https://github.com/rust-lang/rust/pull/38366

7 years agoAuto merge of #38232 - jseyfried:refactor_global_paths, r=nrc
bors [Fri, 23 Dec 2016 06:22:45 +0000 (06:22 +0000)]
Auto merge of #38232 - jseyfried:refactor_global_paths, r=nrc

Refactor global paths

This PR removes the field `global: bool` from `ast::Path` and `hir::Path`, instead representing a global path `::foo::bar` as `{{root}}::foo::bar`, where `{{root}}` is a virtual keyword `keywords::CrateRoot`.

Also, fixes #38016.

r? @nrc

7 years agoAllow legacy custom derive authors to disable warnings in downstream crates.
Jeffrey Seyfried [Thu, 22 Dec 2016 06:03:19 +0000 (06:03 +0000)]
Allow legacy custom derive authors to disable warnings in downstream crates.

7 years agoConvert fam to Symbol
Jeremy Soller [Fri, 23 Dec 2016 05:29:33 +0000 (22:29 -0700)]
Convert fam to Symbol

7 years agoCorrect target_family mess
Jeremy Soller [Fri, 23 Dec 2016 05:20:47 +0000 (22:20 -0700)]
Correct target_family mess

7 years agoDo not build emutls on Redox
Jeremy Soller [Fri, 23 Dec 2016 05:01:15 +0000 (22:01 -0700)]
Do not build emutls on Redox

7 years agoAuto merge of #38562 - brson:rm-llvm-lock, r=brson
bors [Fri, 23 Dec 2016 02:35:45 +0000 (02:35 +0000)]
Auto merge of #38562 - brson:rm-llvm-lock, r=brson

Delete the llvm submodule lockfile when configuring on the bots

This should fix the periodic error that .git/modules/src/llvm/index.lock
exists on the mac slaves.

7 years agoFix import resolution bug and fold all idents in the AST.
Jeffrey Seyfried [Fri, 23 Dec 2016 02:16:31 +0000 (02:16 +0000)]
Fix import resolution bug and fold all idents in the AST.

7 years agoRevert rt.rs
Jeremy Soller [Thu, 22 Dec 2016 23:19:05 +0000 (16:19 -0700)]
Revert rt.rs

7 years agoRemove start functions, use newlib instead of openlibm + ralloc
Jeremy Soller [Thu, 22 Dec 2016 23:13:14 +0000 (16:13 -0700)]
Remove start functions, use newlib instead of openlibm + ralloc

7 years agoDelete the llvm submodule lockfile when configuring on the bots
Brian Anderson [Thu, 22 Dec 2016 22:00:21 +0000 (22:00 +0000)]
Delete the llvm submodule lockfile when configuring on the bots

This should fix the periodic error that .git/modules/src/llvm/index.lock
exists on the mac slaves.

7 years agoAuto merge of #38330 - ollie27:rustdoc_short_summaries, r=steveklabnik
bors [Thu, 22 Dec 2016 22:28:41 +0000 (22:28 +0000)]
Auto merge of #38330 - ollie27:rustdoc_short_summaries, r=steveklabnik

rustdoc: Fix short summaries in search results

They should be run through a Markdown renderer in rustdoc to remove
links.

This also fixes the mouse over text for the Crates list on the sidebar.

[before](https://doc.rust-lang.org/nightly/std/index.html?search=ord) [after](https://ollie27.github.io/rust_doc_test/std/index.html?search=ord)

7 years agoICH: Add test case for InlineAsm hashes.
Michael Woerister [Thu, 22 Dec 2016 19:27:53 +0000 (14:27 -0500)]
ICH: Add test case for InlineAsm hashes.

7 years agoRename README.txt to README.md
Geoff Yoerger [Thu, 22 Dec 2016 18:52:22 +0000 (12:52 -0600)]
Rename README.txt to README.md

7 years agoAdd relative hyperlink
Geoff Yoerger [Thu, 22 Dec 2016 18:51:31 +0000 (12:51 -0600)]
Add relative hyperlink

7 years agoICH: Make InlineAsm hashes stable.
Michael Woerister [Thu, 22 Dec 2016 17:01:59 +0000 (12:01 -0500)]
ICH: Make InlineAsm hashes stable.

7 years agoCorrect path of incremental artifacts
Aidan Hobson Sayers [Thu, 22 Dec 2016 15:58:08 +0000 (15:58 +0000)]
Correct path of incremental artifacts

7 years agoFix Markdown list formatting.
Chris Morgan [Thu, 22 Dec 2016 12:05:53 +0000 (17:35 +0530)]
Fix Markdown list formatting.

The Markdown engine used by the book can cope with a single leading space
on the list marker:

    Like this:

     * List item

    Rather than like this:

    * List item

… but it’s not the typical convention employed in the book, and moreover
the Markdown engine used for producing the error index *can’t* cope with
it (its behaviour looks like a bug, as it appears to lose one of the two
line breaks as well, but that’s immaterial here).

So, we shift to a single convention which doesn’t trigger bugs in the
Markdown renderer.

7 years agoCleaned up the code and added tests.
Ivan Molodetskikh [Thu, 22 Dec 2016 08:47:26 +0000 (11:47 +0300)]
Cleaned up the code and added tests.

7 years agoFix fs tests on Windows systems with non-english locales.
Peter Atashian [Thu, 22 Dec 2016 07:47:09 +0000 (02:47 -0500)]
Fix fs tests on Windows systems with non-english locales.

7 years agoAuto merge of #38538 - estebank:outdated-fixme-3300, r=petrochenkov
bors [Thu, 22 Dec 2016 10:36:00 +0000 (10:36 +0000)]
Auto merge of #38538 - estebank:outdated-fixme-3300, r=petrochenkov

Remove outdated FIXME comment

Removed outdated FIXME comment referencing #3300 to allow anonymous items.

7 years agoFix non-termination in `resolve`.
Jeffrey Seyfried [Thu, 22 Dec 2016 08:27:26 +0000 (08:27 +0000)]
Fix non-termination in `resolve`.

7 years agoRemove outdated FIXME comment
Esteban Küber [Thu, 22 Dec 2016 08:38:10 +0000 (00:38 -0800)]
Remove outdated FIXME comment

Removed FIXME comment referencing #3300.

7 years agoPretty-print `$crate::foo::bar` as `::foo::bar`.
Jeffrey Seyfried [Wed, 21 Dec 2016 05:31:07 +0000 (05:31 +0000)]
Pretty-print `$crate::foo::bar` as `::foo::bar`.

7 years agoRefactor how global paths are represented (for both ast and hir).
Jeffrey Seyfried [Mon, 5 Dec 2016 03:51:11 +0000 (03:51 +0000)]
Refactor how global paths are represented (for both ast and hir).

7 years agoIn order to successfully build, go back to ralloc
Jeremy Soller [Thu, 22 Dec 2016 04:57:43 +0000 (21:57 -0700)]
In order to successfully build, go back to ralloc

7 years agorebasing fix
Nick Cameron [Thu, 22 Dec 2016 04:01:45 +0000 (17:01 +1300)]
rebasing fix

7 years agoAdd RawFd traits for net
Jeremy Soller [Thu, 22 Dec 2016 03:19:19 +0000 (20:19 -0700)]
Add RawFd traits for net

7 years agosave-analysis signature stuff for json-api flavour.
Nick Cameron [Sun, 18 Dec 2016 00:37:40 +0000 (14:37 -1000)]
save-analysis signature stuff for json-api flavour.

7 years agosignature info for other items (mods, fns, methods, etc.)
Nick Cameron [Tue, 29 Nov 2016 22:50:08 +0000 (11:50 +1300)]
signature info for other items (mods, fns, methods, etc.)

7 years agofurther lowering of signature data
Nick Cameron [Mon, 21 Nov 2016 21:05:25 +0000 (10:05 +1300)]
further lowering of signature data

7 years agofield signatures
Nick Cameron [Mon, 21 Nov 2016 19:12:02 +0000 (08:12 +1300)]
field signatures

7 years agosave-analysis: fix ICE on partially resolved path
Nick Cameron [Mon, 21 Nov 2016 05:11:36 +0000 (18:11 +1300)]
save-analysis: fix ICE on partially resolved path

Occurs when we produce save-analysis before type checking is complete (due to errors).

7 years agosave-analysis: add `Signature` info to structs
Nick Cameron [Sun, 20 Nov 2016 18:07:40 +0000 (07:07 +1300)]
save-analysis: add `Signature` info to structs

7 years agoDisable field reordering
Austin Hicks [Wed, 21 Dec 2016 22:59:30 +0000 (17:59 -0500)]
Disable field reordering

7 years agoRemoves magenta build warning.
Jason Campbell [Wed, 21 Dec 2016 21:28:08 +0000 (13:28 -0800)]
Removes magenta build warning.

Small bug fix to remove an unused type in the magenta process code that causes build failures for magenta's rustc.

7 years agoAuto merge of #38427 - brson:relnotes, r=alexcrichton
bors [Wed, 21 Dec 2016 19:46:27 +0000 (19:46 +0000)]
Auto merge of #38427 - brson:relnotes, r=alexcrichton

1.14 release notes

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md).

Is there anything I'm missing? Were there any library stabilizations?

The most interesting thing this time seems to be rustup, then compile time opts, `..` matches, cargo exposing `cfg` values to build scripts. This release also has wasm support, but it's pretty rough. Might be worth hyping up all the same. ARM MUSL targets.

There are a large number of compatibility notes. Might be worth talking about that.

Relevant prlo links: goo.gl/PGz2Ds, goo.gl/KV23Qv, goo.gl/g7ku6D.

7 years agoMake drop glue for unsized value pass two arguments instead of *(data, meta)
Mark Simulacrum [Tue, 20 Dec 2016 17:46:44 +0000 (10:46 -0700)]
Make drop glue for unsized value pass two arguments instead of *(data, meta)

7 years agoFixed fastcall not applying inreg attributes to arguments like the C/C++ fastcall.
Ivan Molodetskikh [Wed, 21 Dec 2016 18:42:10 +0000 (21:42 +0300)]
Fixed fastcall not applying inreg attributes to arguments like the C/C++ fastcall.

7 years agoMerge branch 'redox_cross' of https://github.com/redox-os/rust into redox_cross
Jeremy Soller [Wed, 21 Dec 2016 18:38:13 +0000 (11:38 -0700)]
Merge branch 'redox_cross' of https://github.com/redox-os/rust into redox_cross

7 years agoUpdate liblibc, go back to lazy linking openlibm
Jeremy Soller [Wed, 21 Dec 2016 18:38:04 +0000 (11:38 -0700)]
Update liblibc, go back to lazy linking openlibm

7 years agoAdd missing examples in some thread functions
Guillaume Gomez [Wed, 21 Dec 2016 17:05:11 +0000 (18:05 +0100)]
Add missing examples in some thread functions

7 years agoAuto merge of #38488 - srinivasreddy:rf_collections, r=aturon
bors [Wed, 21 Dec 2016 15:30:20 +0000 (15:30 +0000)]
Auto merge of #38488 - srinivasreddy:rf_collections, r=aturon

run rustfmt on libcollections folder

7 years agoAuto merge of #38302 - Mark-Simulacrum:trans-cleanup, r=eddyb
bors [Wed, 21 Dec 2016 10:38:22 +0000 (10:38 +0000)]
Auto merge of #38302 - Mark-Simulacrum:trans-cleanup, r=eddyb

Cleanup old trans

This is a cleanup of old trans, with the following main points:
 - Remove the `build.rs` API (prefer using `Builder` directly, which is now passed where needed through `BlockAndBuilder`).
 - Remove `Block` (inlining it into `BlockAndBuilder`)
 - Remove `Callee::call`, primarily through inlining and simplification of code.
 - Thinned `FunctionContext`:
   - `mir`, `debug_scopes`, `scopes`, and `fn_ty` are moved to `MirContext`.
   - `param_env` is moved to `SharedCrateContext` and renamed to `empty_param_env`.
   - `llretslotptr` is removed, replaced with more careful management of the return values in calls.
   - `landingpad_alloca` is inlined into cleanup.
   - `param_substs` are moved to `MirContext`.
   - `span` is removed, it was never set to anything but `None`.
   - `block_arena` and `lpad_arena` are removed, since neither was necessary (landing pads and block are quite small, and neither needs arena allocation).
 - Fixed `drop_in_place` not running other destructors in the same function.

Fixes #35566 (thanks to @est31 for confirming).

7 years agoAuto merge of #38099 - GuillaumeGomez:cast_suggestions, r=nikomatsakis
bors [Wed, 21 Dec 2016 07:28:16 +0000 (07:28 +0000)]
Auto merge of #38099 - GuillaumeGomez:cast_suggestions, r=nikomatsakis

Cast suggestions

r? @nikomatsakis

7 years agoFix tidy
Jeremy Soller [Wed, 21 Dec 2016 04:29:42 +0000 (21:29 -0700)]
Fix tidy

7 years agoFix rebase errors.
Mark Simulacrum [Wed, 21 Dec 2016 03:37:19 +0000 (20:37 -0700)]
Fix rebase errors.

7 years agoAuto merge of #38506 - alexcrichton:fix-makefiles, r=brson
bors [Wed, 21 Dec 2016 03:09:14 +0000 (03:09 +0000)]
Auto merge of #38506 - alexcrichton:fix-makefiles, r=brson

mk: Fix compile with makefiles

A tweak was made to dependencies in #38451 but the makefiles weren't updated to
accompany this. Instead of trying to integerate the `build_helper` crate into
the makefiles (which currently isn't present) this commit takes the approach of
just duplicating the required logic, which should be small enough for now.

7 years agoReuse cleanup pad declared at start of block.
Mark Simulacrum [Tue, 20 Dec 2016 21:14:30 +0000 (14:14 -0700)]
Reuse cleanup pad declared at start of block.

7 years agoImprove cache quality for eh_personality.
Mark Simulacrum [Tue, 20 Dec 2016 04:41:03 +0000 (21:41 -0700)]
Improve cache quality for eh_personality.

7 years agoMove eh_unwind_resume into CrateContext
Mark Simulacrum [Tue, 20 Dec 2016 04:26:49 +0000 (21:26 -0700)]
Move eh_unwind_resume into CrateContext

Also improves cache quality.

7 years agoSimplify get_landing_pad by inlining UnwindKind.
Mark Simulacrum [Tue, 20 Dec 2016 04:16:58 +0000 (21:16 -0700)]
Simplify get_landing_pad by inlining UnwindKind.

7 years agoAdd unreachable() after calls to eh_unwind_resume.
Mark Simulacrum [Tue, 20 Dec 2016 03:09:51 +0000 (20:09 -0700)]
Add unreachable() after calls to eh_unwind_resume.

7 years agoSimplify callee by removing is_indirect branch.
Mark Simulacrum [Tue, 20 Dec 2016 02:57:39 +0000 (19:57 -0700)]
Simplify callee by removing is_indirect branch.

7 years agoMove eh_personality() onto CrateContext
Mark Simulacrum [Tue, 20 Dec 2016 02:32:50 +0000 (19:32 -0700)]
Move eh_personality() onto CrateContext

7 years agoRemove outdated comment
Mark Simulacrum [Tue, 20 Dec 2016 02:17:03 +0000 (19:17 -0700)]
Remove outdated comment

7 years agoRemove fn_ty from FunctionContext
Mark Simulacrum [Tue, 20 Dec 2016 02:16:36 +0000 (19:16 -0700)]
Remove fn_ty from FunctionContext

7 years agoslice_for_each gives a reference already
Mark Simulacrum [Tue, 20 Dec 2016 01:51:10 +0000 (18:51 -0700)]
slice_for_each gives a reference already

7 years agoReduce coerce_unsized_into to one call
Mark Simulacrum [Tue, 20 Dec 2016 01:47:30 +0000 (18:47 -0700)]
Reduce coerce_unsized_into to one call

We cannot inline due to it being recursive.

7 years agoRemove outdated comment
Mark Simulacrum [Tue, 20 Dec 2016 01:34:42 +0000 (18:34 -0700)]
Remove outdated comment

7 years agoInline make_drop_glue
Mark Simulacrum [Tue, 20 Dec 2016 01:34:07 +0000 (18:34 -0700)]
Inline make_drop_glue

7 years agoRemove needless check
Mark Simulacrum [Tue, 20 Dec 2016 01:25:56 +0000 (18:25 -0700)]
Remove needless check