]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #34875 - frewsxcv:std-slice-struct, r=GuillaumeGomez
Seo Sanghyeon [Mon, 18 Jul 2016 13:44:56 +0000 (22:44 +0900)]
Rollup merge of #34875 - frewsxcv:std-slice-struct, r=GuillaumeGomez

Indicate where `std::slice` structs originate from.

None

7 years agoRollup merge of #34853 - frewsxcv:vec-truncate, r=GuillaumeGomez
Seo Sanghyeon [Mon, 18 Jul 2016 13:44:56 +0000 (22:44 +0900)]
Rollup merge of #34853 - frewsxcv:vec-truncate, r=GuillaumeGomez

Partial rewrite/expansion of `Vec::truncate` documentation.

None

7 years agoRollup merge of #34807 - sanxiyn:dump-mir, r=nagisa
Seo Sanghyeon [Mon, 18 Jul 2016 13:44:56 +0000 (22:44 +0900)]
Rollup merge of #34807 - sanxiyn:dump-mir, r=nagisa

Remove extra newlines in MIR dump

7 years agoAuto merge of #34860 - jseyfried:encapsulate_hygiene, r=nrc
bors [Mon, 18 Jul 2016 05:12:59 +0000 (22:12 -0700)]
Auto merge of #34860 - jseyfried:encapsulate_hygiene, r=nrc

Clean up and encapsulate `syntax::ext::mtwt`, rename `mtwt` to `hygiene`

r? @nrc

7 years agoAuto merge of #34876 - frewsxcv:vec-as-mut-slice, r=alexcrichton
bors [Sun, 17 Jul 2016 19:04:51 +0000 (12:04 -0700)]
Auto merge of #34876 - frewsxcv:vec-as-mut-slice, r=alexcrichton

Remove unnecessary indexing and deref in `Vec::as_mut_slice`.

None

7 years agoRemove some unit tests and that are redundant with `run-pass/hygiene.rs`
Jeffrey Seyfried [Sat, 16 Jul 2016 19:26:16 +0000 (19:26 +0000)]
Remove some unit tests and that are redundant with `run-pass/hygiene.rs`
and that would be painful to rewrite.

7 years agoRename `mtwt` to `hygiene`
Jeffrey Seyfried [Sat, 16 Jul 2016 19:11:28 +0000 (19:11 +0000)]
Rename `mtwt` to `hygiene`

7 years agoClean up and encapsulate `syntax::ext::mtwt`
Jeffrey Seyfried [Wed, 22 Jun 2016 08:03:42 +0000 (08:03 +0000)]
Clean up and encapsulate `syntax::ext::mtwt`

7 years agoAuto merge of #34871 - petrochenkov:inherent, r=jseyfried
bors [Sun, 17 Jul 2016 16:07:50 +0000 (09:07 -0700)]
Auto merge of #34871 - petrochenkov:inherent, r=jseyfried

Do not resolve inherent static methods from other crates prematurely

Under some specific circumstances paths like `Type::method` can be resolved early in rustc_resolve instead of type checker. `Type` must be defined in another crate, it should be an enum or a trait object (i.e. a type that acts as a "module" in resolve), and `method` should be an inherent static method.
As a result, such paths don't go through `resolve_ufcs`, may be resolved incorrectly and break some invariants in type checker. This patch removes special treatment of such methods.

The removed code was introduced in https://github.com/rust-lang/rust/commit/2bd46e767c0fe5b6188df61cb9daf8f2e65a3ed0 to fix a problem that no longer exists.

r? @jseyfried

7 years agoIndicate where `std::slice` structs originate from.
Corey Farwell [Sun, 17 Jul 2016 01:42:11 +0000 (21:42 -0400)]
Indicate where `std::slice` structs originate from.

7 years agoAuto merge of #34829 - cgswords:tstream, r=nrc
bors [Sun, 17 Jul 2016 10:05:08 +0000 (03:05 -0700)]
Auto merge of #34829 - cgswords:tstream, r=nrc

Added tokenstream parser procedure

A tiny PR that simply adds a procedure for parsing `TokenStream`s to the parser in `src/libsyntax`. This is to ease using `TokenStream`s with the current (old) procedural macro system.

7 years agoAuto merge of #34789 - jonathandturner:simplify_liberror, r=alexcrichton
bors [Sun, 17 Jul 2016 07:06:29 +0000 (00:06 -0700)]
Auto merge of #34789 - jonathandturner:simplify_liberror, r=alexcrichton

Simplify librustc_errors

This is part 2 of the error crate refactor, starting with #34403.

In this refactor, I focused on slimming down the error crate to fewer moving parts.  As such, I've removed quite a few parts and replaced the with simpler, straight-line code.  Specifically, this PR:

* Removes BasicEmitter
* Remove emit from emitter, leaving emit_struct
* Renames emit_struct to emit
* Removes CoreEmitter and focuses on a single Emitter
* Implements the latest changes to error format RFC (#1644)
* Removes (now-unused) code in emitter.rs and snippet.rs
* Moves more tests to the UI tester, removing some duplicate tests in the process

There is probably more that could be done with some additional refactoring, but this felt like it was getting to a good state.

r? @alexcrichton   cc: @Manishearth (as there may be breaking changes in stuff I removed/changed)

7 years agoAuto merge of #34606 - mathstuf:llvm-with-ninja, r=alexcrichton
bors [Sun, 17 Jul 2016 04:09:15 +0000 (21:09 -0700)]
Auto merge of #34606 - mathstuf:llvm-with-ninja, r=alexcrichton

llvm, rt: build using the Ninja generator if available

The Ninja generator generally builds much faster than make. It may also
be used on Windows to have a vast speed improvement over the Visual
Studio generators.

Currently hidden behind an `--enable-ninja` flag because it does not
obey the top-level `-j` or `-l` flags given to `make`.

7 years agoRemove unnecessary indexing and deref in `Vec::as_mut_slice`.
Corey Farwell [Sun, 17 Jul 2016 02:09:55 +0000 (22:09 -0400)]
Remove unnecessary indexing and deref in `Vec::as_mut_slice`.

7 years agoAuto merge of #34852 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sun, 17 Jul 2016 00:40:28 +0000 (17:40 -0700)]
Auto merge of #34852 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 7 pull requests

- Successful merges: #33362, #34768, #34837, #34838, #34847, #34848, #34849
- Failed merges: #33951, #34850

7 years agoDo not resolve inherent static methods from other crates prematurely
Vadim Petrochenkov [Sat, 16 Jul 2016 21:15:15 +0000 (00:15 +0300)]
Do not resolve inherent static methods from other crates prematurely

7 years agoAuto merge of #34846 - jonas-schievink:issue34839, r=eddyb
bors [Sat, 16 Jul 2016 20:38:51 +0000 (13:38 -0700)]
Auto merge of #34846 - jonas-schievink:issue34839, r=eddyb

Variant Size Differences: Erase regions before computing type layout

Fixes #34839

7 years agoMerge pull request #34862 from TimNN/revert-34836-panic-counter
Alex Crichton [Sat, 16 Jul 2016 20:38:06 +0000 (13:38 -0700)]
Merge pull request #34862 from TimNN/revert-34836-panic-counter

Revert #34836 "Refactored code to access TLS only in case of panic"

7 years agoRevert "Refactored code to access TLS only in case of panic"
Tim Neumann [Sat, 16 Jul 2016 20:19:43 +0000 (22:19 +0200)]
Revert "Refactored code to access TLS only in case of panic"

7 years agoMerge pull request #34836 from cynicaldevil/panic-counter
Alex Crichton [Sat, 16 Jul 2016 17:10:17 +0000 (10:10 -0700)]
Merge pull request #34836 from cynicaldevil/panic-counter

Refactored code to access TLS only in case of panic

7 years agoPartial rewrite/expansion of `Vec::truncate` documentation.
Corey Farwell [Sat, 16 Jul 2016 15:20:17 +0000 (11:20 -0400)]
Partial rewrite/expansion of `Vec::truncate` documentation.

7 years agoRollup merge of #34849 - tshepang:patch-2, r=apasel422
Guillaume Gomez [Sat, 16 Jul 2016 14:55:59 +0000 (16:55 +0200)]
Rollup merge of #34849 - tshepang:patch-2, r=apasel422

doc: remove extraneous word

7 years agoRollup merge of #34848 - tshepang:patch-1, r=apasel422
Guillaume Gomez [Sat, 16 Jul 2016 14:55:59 +0000 (16:55 +0200)]
Rollup merge of #34848 - tshepang:patch-1, r=apasel422

doc: remove stray comma

7 years agoRollup merge of #34847 - baskerville:unwanted-tag, r=apasel422
Guillaume Gomez [Sat, 16 Jul 2016 14:55:59 +0000 (16:55 +0200)]
Rollup merge of #34847 - baskerville:unwanted-tag, r=apasel422

Add missing inline code delimiters around Vec<T>

r? @steveklabnik

7 years agoRollup merge of #34838 - steveklabnik:gh33677, r=alexcrichton
Guillaume Gomez [Sat, 16 Jul 2016 14:55:59 +0000 (16:55 +0200)]
Rollup merge of #34838 - steveklabnik:gh33677, r=alexcrichton

Fix up documentation around no_std

1. Fix the sections in the book to have the correct signatures. I've
   also marked them as `ignore`; there's no way to set the `no_std`
   feature for libc, so it pulls in the stdlib, so this wasn't even
   testing the actual thing it was testing. Better to just ignore.
2. Correcting libcore's docs for factual inaccuracy, and add a note
   about language items.

Fixes #33677

r? @alexcrichton

7 years agoRollup merge of #34837 - GuillaumeGomez:better_example, r=nagisa
Guillaume Gomez [Sat, 16 Jul 2016 14:55:59 +0000 (16:55 +0200)]
Rollup merge of #34837 - GuillaumeGomez:better_example, r=nagisa

Improve float number example

r? @nagisa

7 years agoRollup merge of #34768 - alexcrichton:issue-audit, r=aturon
Guillaume Gomez [Sat, 16 Jul 2016 14:55:58 +0000 (16:55 +0200)]
Rollup merge of #34768 - alexcrichton:issue-audit, r=aturon

std: Correct tracking issue for SipHash{13,24}

The referenced tracking issue was closed and was actually about changing the
algorithm.

cc #34767

7 years agoRollup merge of #33362 - andradei:master, r=Manishearth
Guillaume Gomez [Sat, 16 Jul 2016 14:55:57 +0000 (16:55 +0200)]
Rollup merge of #33362 - andradei:master, r=Manishearth

Add mention to RFC 940 in the Rust Reference.

This PR adds a mention to hyphens in Cargo package names being replaced by underscores when used as a crate, as per [RFC 940](https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md)

It also formats the RFCs consistently as RFC XXX instead of RFCXXX.

7 years agoAuto merge of #34816 - jseyfried:fix_include_path, r=nrc
bors [Sat, 16 Jul 2016 13:34:01 +0000 (06:34 -0700)]
Auto merge of #34816 - jseyfried:fix_include_path, r=nrc

Fix `include!()`s inside `asm!()` invocations

Fixes #34812, a regression caused by #33749 that was not fixed in #34450.
r? @nrc

7 years agodoc: remove extraneous word
Tshepang Lekhonkhobe [Sat, 16 Jul 2016 09:13:29 +0000 (11:13 +0200)]
doc: remove extraneous word

7 years agodoc: remove stray comma
Tshepang Lekhonkhobe [Sat, 16 Jul 2016 09:10:05 +0000 (11:10 +0200)]
doc: remove stray comma

7 years agoAdd missing inline code delimiters around Vec<T>
Bastien Dejean [Sat, 16 Jul 2016 08:50:19 +0000 (10:50 +0200)]
Add missing inline code delimiters around Vec<T>

7 years agoErase regions before computing type layout
Jonas Schievink [Sat, 16 Jul 2016 08:45:13 +0000 (10:45 +0200)]
Erase regions before computing type layout

Fixes #34839

7 years agoAuto merge of #34779 - infinity0:master, r=alexcrichton
bors [Sat, 16 Jul 2016 08:19:16 +0000 (01:19 -0700)]
Auto merge of #34779 - infinity0:master, r=alexcrichton

If local-rust is the same as the current version, then force a local-rebuild

In Debian, we would like the option to build/rebuild the current release from
*either* the current or previous stable release. So we use enable-local-rust
instead of enable-local-rebuild, and read the bootstrap key dynamically from
whatever is installed locally.

In general, it does not make much sense to allow enable-local-rust without also
setting the bootstrap key, since the build would fail otherwise.

(The way I detect "the bootstrap key of [the local] rustc installation" is a bit hacky, suggestions welcome.)

7 years agoAuto merge of #34676 - aravind-pg:inner-attr, r=brson
bors [Sat, 16 Jul 2016 05:21:40 +0000 (22:21 -0700)]
Auto merge of #34676 - aravind-pg:inner-attr, r=brson

Better error message for inner attribute following doc comment

Before it was always just "an inner attribute is not permitted in this context", whereas now we add a special case for when an inner attr follows an outer attr. If the outer attr is a doc comment, then the error is "an inner attr is not permitted following a doc comment", and otherwise it's "an inner attr is not permitted following an outer attribute". In all other cases it's still  "an inner attribute is not permitted in this context".

Note that the public API and behaviour of `parse_attribute` is unchanged. Also, all new names are very open to bikeshedding -- they're arguably clunky.

Fixes #34516. cc @brson

7 years agosyntax: Better error message for inner attr following doc comment
Aravind Gollakota [Wed, 6 Jul 2016 04:35:12 +0000 (21:35 -0700)]
syntax: Better error message for inner attr following doc comment

7 years agoAuto merge of #34841 - alexcrichton:no-mips-soft-float, r=brson
bors [Sat, 16 Jul 2016 00:36:22 +0000 (17:36 -0700)]
Auto merge of #34841 - alexcrichton:no-mips-soft-float, r=brson

mk: Don't pass -msoft-float on mips-gnu

Soon the LLVM upgrade (#34743) will require an updated CMake installation, and
the easiest way to do this was to upgrade the Ubuntu version of the bots to
16.04. This in turn brings in a new MIPS compiler on the linux-cross builder,
which is now from the "official" ubuntu repositories. Unfortunately these
new compilers don't support compiling with the `-msoft-float` flag like we're
currently passing, causing compiles to fail.

This commit removes these flags as it's not clear *why* they're being passed, as
the mipsel targets also don't have it. At least if it's not supported by a
debian default compiler, perhaps it's not too relevant to support?

7 years agoAdded tokenstream parser procedure
cgswords [Thu, 14 Jul 2016 16:52:43 +0000 (09:52 -0700)]
Added tokenstream parser procedure

7 years agomk: Don't pass -msoft-float on mips-gnu
Alex Crichton [Fri, 15 Jul 2016 04:48:41 +0000 (21:48 -0700)]
mk: Don't pass -msoft-float on mips-gnu

Soon the LLVM upgrade (#34743) will require an updated CMake installation, and
the easiest way to do this was to upgrade the Ubuntu version of the bots to
16.04. This in turn brings in a new MIPS compiler on the linux-cross builder,
which is now from the "official" ubuntu repositories. Unfortunately these
new compilers don't support compiling with the `-msoft-float` flag like we're
currently passing, causing compiles to fail.

This commit removes these flags as it's not clear *why* they're being passed, as
the mipsel targets also don't have it. At least if it's not supported by a
debian default compiler, perhaps it's not too relevant to support?

7 years agoFix up documentation around no_std
Steve Klabnik [Fri, 15 Jul 2016 17:17:35 +0000 (13:17 -0400)]
Fix up documentation around no_std

1. Fix the sections in the book to have the correct signatures. I've
   also marked them as `ignore`; there's no way to set the `no_std`
   feature for libc, so it pulls in the stdlib, so this wasn't even
   testing the actual thing it was testing. Better to just ignore.
2. Correcting libcore's docs for factual inaccuracy, and add a note
   about language items.

Fixes #33677

7 years agoRefactored code to access TLS only in case of panic
Nikhil Shagrithaya [Fri, 15 Jul 2016 15:17:45 +0000 (20:47 +0530)]
Refactored code to access TLS only in case of panic

7 years agorustbuild: If local-rust is the same as the current version, then force a local-rebuild
Ximin Luo [Thu, 14 Jul 2016 17:39:55 +0000 (19:39 +0200)]
rustbuild: If local-rust is the same as the current version, then force a local-rebuild

7 years agomk: If local-rust is the same as the current version, then force a local-rebuild
Ximin Luo [Thu, 14 Jul 2016 17:32:53 +0000 (19:32 +0200)]
mk: If local-rust is the same as the current version, then force a local-rebuild

7 years agoImprove float number example
Guillaume Gomez [Fri, 15 Jul 2016 15:51:27 +0000 (17:51 +0200)]
Improve float number example

7 years agoAuto merge of #34570 - jseyfried:no_rename, r=nrc
bors [Fri, 15 Jul 2016 15:48:41 +0000 (08:48 -0700)]
Auto merge of #34570 - jseyfried:no_rename, r=nrc

Simplify the macro hygiene algorithm

This PR removes renaming from the hygiene algorithm and treats differently marked identifiers as unequal.

This change makes the scope of identifiers in `macro_rules!` items empty. That is, identifiers in `macro_rules!` definitions do not inherit any semantics from the `macro_rules!`'s scope.

Since `macro_rules!` macros are items, the scope of their identifiers "should" be the same as that of other items; in particular, the scope should contain only items. Since all items are unhygienic today, this would mean the scope should be empty.

However, the scope of an identifier in a `macro_rules!` statement today is the scope that the identifier would have if it replaced the `macro_rules!` (excluding anything unhygienic, i.e. locals only).

To continue to support this, this PR tracks the scope of each `macro_rules!` and uses it in `resolve` to ensure that an identifier expanded from a `macro_rules!` gets a chance to resolve to the locals in the `macro_rules!`'s scope.

This PR is a pure refactoring. After this PR,
 - `syntax::ext::expand` is much simpler.
 - We can expand macros in any order without causing problems for hygiene (needed for macro modularization).
 - We can deprecate or remove today's `macro_rules!` scope easily.
 - Expansion performance improves by 25%, post-expansion memory usage decreases by ~5%.
 - Expanding a block is no longer quadratic in the number of `let` statements (fixes #10607).

r? @nrc

7 years agoRemove unused import
Jonathan Turner [Fri, 15 Jul 2016 12:47:12 +0000 (08:47 -0400)]
Remove unused import

7 years agoNudge travis by commenting a little
Jonathan Turner [Fri, 15 Jul 2016 10:52:19 +0000 (06:52 -0400)]
Nudge travis by commenting a little

7 years agoAuto merge of #34819 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Fri, 15 Jul 2016 10:06:58 +0000 (03:06 -0700)]
Auto merge of #34819 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 7 pull requests

- Successful merges: #34456, #34733, #34777, #34794, #34799, #34804, #34818
- Failed merges: #33951

7 years agoRollup merge of #34818 - frewsxcv:vecdoc, r=GuillaumeGomez
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34818 - frewsxcv:vecdoc, r=GuillaumeGomez

Mention where `std::vec` structs originate from.

None

7 years agoRollup merge of #34804 - GuillaumeGomez:fix_ret, r=steveklabnik
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34804 - GuillaumeGomez:fix_ret, r=steveklabnik

Add examples for FpCategory

Fixes #29364.

r? @steveklabnik

7 years agoRollup merge of #34799 - wuranbo:patch-3, r=steveklabnik
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34799 - wuranbo:patch-3, r=steveklabnik

doc: ffi referenced rust-snappy can not compile

r? @steveklabnik

The referenced code https://github.com/thestinger/rust-snappy can not work. Maybe it's the old rust version? I do not know.
So I try to rewrite these test cases. If it is not what you originally meaning, just ignored it.

7 years agoRollup merge of #34794 - frewsxcv:exitstatus-success, r=GuillaumeGomez
Guillaume Gomez [Fri, 15 Jul 2016 08:56:43 +0000 (10:56 +0200)]
Rollup merge of #34794 - frewsxcv:exitstatus-success, r=GuillaumeGomez

Add doc example for `std::process::ExitStatus::success`.

None

7 years agoRollup merge of #34777 - glandium:issue34697, r=GuillaumeGomez
Guillaume Gomez [Fri, 15 Jul 2016 08:56:42 +0000 (10:56 +0200)]
Rollup merge of #34777 - glandium:issue34697, r=GuillaumeGomez

doc: Mention that writeln! and println! always use LF

Fixes #34697

I'm not really satisfied with the wording, but I didn't have a better idea. Suggestions welcome.

7 years agoRollup merge of #34733 - izgzhen:alloc-arc-doc-improve, r=steveklabnik
Guillaume Gomez [Fri, 15 Jul 2016 08:56:42 +0000 (10:56 +0200)]
Rollup merge of #34733 - izgzhen:alloc-arc-doc-improve, r=steveklabnik

Improve arc doc, fixing #32905

As issue #32905 detailed, I moved part of the module doc to the struct doc, and fixed some small places in the `alloc::arc`.

7 years agoRollup merge of #34456 - tbu-:pr_ptr_null, r=aturon
Guillaume Gomez [Fri, 15 Jul 2016 08:56:42 +0000 (10:56 +0200)]
Rollup merge of #34456 - tbu-:pr_ptr_null, r=aturon

Use `ptr::{null, null_mut}` instead of `0 as *{const, mut}`

7 years agoAdd labels hygiene test
Jeffrey Seyfried [Fri, 15 Jul 2016 05:23:55 +0000 (05:23 +0000)]
Add labels hygiene test

7 years agoInclude the `MacroDefinition` rib in the label ribs.
Jeffrey Seyfried [Fri, 15 Jul 2016 05:14:48 +0000 (05:14 +0000)]
Include the `MacroDefinition` rib in the label ribs.

7 years agoAuto merge of #34801 - TimNN:rustbuild-doc-fixes, r=alexcrichton
bors [Fri, 15 Jul 2016 03:29:54 +0000 (20:29 -0700)]
Auto merge of #34801 - TimNN:rustbuild-doc-fixes, r=alexcrichton

rustbuild: doc fixes

This fixes two issues rustbuild currently has when building documentation:

1. It fixes standalone builds of `doc-test` and `doc-rustc`.
2. It actually builds the compiler docs if requested in the config.

Closes #34275.

7 years agoMention where `std::vec` structs originate from.
Corey Farwell [Thu, 14 Jul 2016 13:34:43 +0000 (09:34 -0400)]
Mention where `std::vec` structs originate from.

7 years agoAuto merge of #34599 - cuviper:unicode-9.0, r=alexcrichton
bors [Fri, 15 Jul 2016 00:29:16 +0000 (17:29 -0700)]
Auto merge of #34599 - cuviper:unicode-9.0, r=alexcrichton

Update Unicode tables to 9.0

I just updated `unicode.py`'s generated copyright year, then ran it.

7 years agoAuto merge of #34797 - doomrobo:fix-import-trait-method, r=jseyfried
bors [Thu, 14 Jul 2016 21:33:17 +0000 (14:33 -0700)]
Auto merge of #34797 - doomrobo:fix-import-trait-method, r=jseyfried

Fixed issue where importing a trait method directly and then calling the method causes a compiler panic

The code below triggers the panic, and is included in a new regression test.

```rust
trait Foo {
    fn foo();
}

use Foo::foo;

fn main() {
    foo();
}
```
The bug is caused by `librustc_resolve` allowing the illegal binding to be imported even after displaying the error message above.

The fix amounts to importing a dummy binding (`rustc::hir::def::Def::Err`) instead of the actual trait method.

7 years agoFix up more tests that I missed
Jonathan Turner [Thu, 14 Jul 2016 19:43:53 +0000 (15:43 -0400)]
Fix up more tests that I missed

7 years agoAuto merge of #34824 - alexcrichton:fix-nightlies, r=brson
bors [Thu, 14 Jul 2016 18:40:14 +0000 (11:40 -0700)]
Auto merge of #34824 - alexcrichton:fix-nightlies, r=brson

test: Remove NOTE assertions from trace_macros-gate

If no NOTE assertions are present I believe they aren't asserted at all, and it
looks like the number of NOTEs differs on distcheck vs `make check`, so let's
just remove them all.

Closes #18154

7 years agotest: Remove NOTE assertions from trace_macros-gate
Alex Crichton [Thu, 14 Jul 2016 17:27:56 +0000 (10:27 -0700)]
test: Remove NOTE assertions from trace_macros-gate

If no NOTE assertions are present I believe they aren't asserted at all, and it
looks like the number of NOTEs differs on distcheck vs `make check`, so let's
just remove them all.

Closes #18154

7 years agoRemove more unused imports
Jonathan Turner [Thu, 14 Jul 2016 17:25:06 +0000 (13:25 -0400)]
Remove more unused imports

7 years agomk: Move some definitions after their dependencies, to be visually less confusing
Ximin Luo [Thu, 14 Jul 2016 15:13:13 +0000 (17:13 +0200)]
mk: Move some definitions after their dependencies, to be visually less confusing

7 years agoAdd unicode test to ui tests
Jonathan Turner [Thu, 14 Jul 2016 14:55:09 +0000 (10:55 -0400)]
Add unicode test to ui tests

7 years agoRemove unused imports
Jonathan Turner [Thu, 14 Jul 2016 14:36:23 +0000 (10:36 -0400)]
Remove unused imports

7 years agoAuto merge of #34783 - Dridi:cdylib_usage, r=alexcrichton
bors [Thu, 14 Jul 2016 13:37:30 +0000 (06:37 -0700)]
Auto merge of #34783 - Dridi:cdylib_usage, r=alexcrichton

Mention the crate type cdylib in rustc's usage

Hello,

I just tried to build a `cdylib` with the latest stable release, I've been passively waiting for this for quite some time now. Tested successfully on my machine, although it doesn't appear in `rustc`'s usage it seems to work like a charm so far. :grinning:

Thanks!

7 years agoAdd back in import needed for codemap tests
Jonathan Turner [Thu, 14 Jul 2016 13:02:48 +0000 (09:02 -0400)]
Add back in import needed for codemap tests

7 years agoTeach EmitterWriter about the dangers of quasi-quoting
Jonathan Turner [Thu, 14 Jul 2016 10:50:50 +0000 (06:50 -0400)]
Teach EmitterWriter about the dangers of quasi-quoting

7 years agoAdd fix for tabs. Move error unit tests->ui tests
Jonathan Turner [Wed, 13 Jul 2016 21:53:42 +0000 (17:53 -0400)]
Add fix for tabs. Move error unit tests->ui tests

7 years agoAdd in styled_buffer.rs and remove some unused code
Jonathan Turner [Wed, 13 Jul 2016 09:44:29 +0000 (05:44 -0400)]
Add in styled_buffer.rs and remove some unused code

7 years agoFix up some tidy-unfriendly spacing
Jonathan Turner [Tue, 12 Jul 2016 20:10:01 +0000 (16:10 -0400)]
Fix up some tidy-unfriendly spacing

7 years agoDCE and fixing some internal tests
Jonathan Turner [Tue, 12 Jul 2016 19:18:16 +0000 (15:18 -0400)]
DCE and fixing some internal tests

7 years agoFix a couple UI test failures
Jonathan Turner [Tue, 12 Jul 2016 16:37:57 +0000 (12:37 -0400)]
Fix a couple UI test failures

7 years agoAdd back in old school mode
Jonathan Turner [Tue, 12 Jul 2016 14:41:26 +0000 (10:41 -0400)]
Add back in old school mode

7 years agoImplement latest rfc style using simpler rendering
Jonathan Turner [Mon, 11 Jul 2016 20:02:03 +0000 (16:02 -0400)]
Implement latest rfc style using simpler rendering

7 years agoRemove CoreEmitter and focus on Emitter
Jonathan Turner [Thu, 7 Jul 2016 18:57:09 +0000 (14:57 -0400)]
Remove CoreEmitter and focus on Emitter

7 years agoRename emit_struct->emit
Jonathan Turner [Thu, 7 Jul 2016 11:50:49 +0000 (07:50 -0400)]
Rename emit_struct->emit

7 years agoRemove emit from emitter, leaving emit_struct
Jonathan Turner [Wed, 6 Jul 2016 16:08:16 +0000 (12:08 -0400)]
Remove emit from emitter, leaving emit_struct

7 years agoRemove BasicEmitter
Jonathan Turner [Tue, 5 Jul 2016 19:24:23 +0000 (15:24 -0400)]
Remove BasicEmitter

7 years agoAdd regression test
Jeffrey Seyfried [Thu, 14 Jul 2016 08:59:25 +0000 (08:59 +0000)]
Add regression test

7 years agoMake `ext::base::expr_to_string` work correctly with `include!` macro invocations
Jeffrey Seyfried [Thu, 14 Jul 2016 08:55:48 +0000 (08:55 +0000)]
Make `ext::base::expr_to_string` work correctly with `include!` macro invocations

7 years agoAuto merge of #33907 - strake:decode_utf8, r=alexcrichton
bors [Thu, 14 Jul 2016 09:45:29 +0000 (02:45 -0700)]
Auto merge of #33907 - strake:decode_utf8, r=alexcrichton

add core::char::DecodeUtf8

See [issue](https://github.com/rust-lang/rust/issues/33906)

8 years agoAuto merge of #34805 - michaelwoerister:stable-bounds-encoding, r=eddyb
bors [Thu, 14 Jul 2016 06:09:02 +0000 (23:09 -0700)]
Auto merge of #34805 - michaelwoerister:stable-bounds-encoding, r=eddyb

tyencode: Make sure that projection bounds are handled in stable order.

Fixes #34796.

r? @alexcrichton

8 years agoAuto merge of #34776 - cuviper:solaris-readdir, r=alexcrichton
bors [Thu, 14 Jul 2016 02:32:17 +0000 (19:32 -0700)]
Auto merge of #34776 - cuviper:solaris-readdir, r=alexcrichton

std: fix `readdir` errors for solaris

A `NULL` from `readdir` could be the end of stream or an error.  The only
way to know is to check `errno`, so it must be set to a known value first,
like a 0 that POSIX will never use.

This currently only matters for solaris targets, as the other unix platforms
are using `readdir_r` with a direct error return indication.  However, this is
getting deprecated (#34668) so they should all eventually switch to `readdir`.

This PR adds `set_errno`, uses it to clear the value before calling `readdir`,
then checks it again after to see the reason for a `NULL`.  A few other small
fixes are included just to get solaris compiling at all.

I couldn't get cross-compilation completely going, so I don't have a good way
to test this beyond a smoke-test cargo build of std.  I'd appreciate input from
someone more familiar with solaris -- cc @nbaksalyar?

8 years agoadd core::char::DecodeUtf8
M Farkas-Dyck [Fri, 27 May 2016 16:16:27 +0000 (08:16 -0800)]
add core::char::DecodeUtf8

8 years agoRemove irrelevant tests
Jeffrey Seyfried [Sun, 26 Jun 2016 04:12:31 +0000 (04:12 +0000)]
Remove irrelevant tests

8 years agoImplement `macro_rules!` placeholders and the macro scope map
Jeffrey Seyfried [Sun, 26 Jun 2016 03:32:45 +0000 (03:32 +0000)]
Implement `macro_rules!` placeholders and the macro scope map

8 years agoInstead of renaming, treat differently marked identifiers as unequal
Jeffrey Seyfried [Wed, 22 Jun 2016 02:50:05 +0000 (02:50 +0000)]
Instead of renaming, treat differently marked identifiers as unequal

8 years agoRemove `IllegalCtxt`
Jeffrey Seyfried [Wed, 22 Jun 2016 02:49:31 +0000 (02:49 +0000)]
Remove `IllegalCtxt`

8 years agoMove node id assigning into `resolve`
Jeffrey Seyfried [Wed, 22 Jun 2016 01:56:39 +0000 (01:56 +0000)]
Move node id assigning into `resolve`

8 years agoAuto merge of #34684 - oli-obk:eval_rustdoc_array_len, r=alexcrichton
bors [Wed, 13 Jul 2016 23:27:30 +0000 (16:27 -0700)]
Auto merge of #34684 - oli-obk:eval_rustdoc_array_len, r=alexcrichton

evaluate the array length of fixed size array types in rustdoc

mitgates #34579

to fix it we'd need an expression simplifier.

r? @steveklabnik

cc @Osspial

8 years agoRemove extra newlines in MIR dump
Seo Sanghyeon [Wed, 13 Jul 2016 20:29:50 +0000 (05:29 +0900)]
Remove extra newlines in MIR dump

8 years agoAuto merge of #33642 - xen0n:ergonomic-format-macro, r=alexcrichton
bors [Wed, 13 Jul 2016 20:26:57 +0000 (13:26 -0700)]
Auto merge of #33642 - xen0n:ergonomic-format-macro, r=alexcrichton

Ergonomic format_args!

Fixes #9456 (at last).

Not a ground-up rewrite of the existing machinery, but more like an added intermediary layer between macro arguments and format placeholders. This is now implementing Rust RFC 1618!

8 years agosyntax_ext: format: better code documentation
Wang Xuerui [Thu, 2 Jun 2016 13:47:34 +0000 (21:47 +0800)]
syntax_ext: format: better code documentation

8 years agoformat: add tests for ergonomic format_args!
Wang Xuerui [Sat, 21 May 2016 15:08:30 +0000 (23:08 +0800)]
format: add tests for ergonomic format_args!

format: workaround pretty-printer to pass tests

8 years agosyntax_ext: format: de-duplicate argument objects
Wang Xuerui [Thu, 2 Jun 2016 10:16:24 +0000 (18:16 +0800)]
syntax_ext: format: de-duplicate argument objects

8 years agosyntax_ext: format: process counts uniquely and separately
Wang Xuerui [Sat, 21 May 2016 08:00:01 +0000 (16:00 +0800)]
syntax_ext: format: process counts uniquely and separately