Commit Graph

54979 Commits

Author SHA1 Message Date
Jonas Schievink
d1486108bc Erase regions before computing type layout
Fixes #34839
2016-07-16 10:45:13 +02:00
bors
dc8212ff20 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.)
2016-07-16 01:19:16 -07:00
bors
c4788c26ad 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
2016-07-15 22:21:40 -07:00
Aravind Gollakota
ff95ba3a8c syntax: Better error message for inner attr following doc comment 2016-07-15 21:02:53 -07:00
bors
145f0ec88c 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?
2016-07-15 17:36:22 -07:00
cgswords
fecf3b6a2c Added tokenstream parser procedure 2016-07-15 15:20:43 -07:00
Alex Crichton
5f43817142 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?
2016-07-15 13:46:09 -07:00
Steve Klabnik
fcecdac96d 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
2016-07-15 15:41:31 -04:00
Nikhil Shagrithaya
b28e9dcae8 Refactored code to access TLS only in case of panic 2016-07-16 00:34:50 +05:30
Ximin Luo
bbff3367fe rustbuild: If local-rust is the same as the current version, then force a local-rebuild 2016-07-15 19:37:22 +02:00
Ximin Luo
c850470f73 mk: If local-rust is the same as the current version, then force a local-rebuild 2016-07-15 19:37:15 +02:00
Guillaume Gomez
b10ac8a450 Improve float number example 2016-07-15 17:51:27 +02:00
bors
4db1874f4c 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
2016-07-15 08:48:41 -07:00
Jonathan Turner
c7158a143a Remove unused import 2016-07-15 08:47:12 -04:00
Jonathan Turner
dae8d073d4 Nudge travis by commenting a little 2016-07-15 06:52:19 -04:00
bors
3cc3ad11e6 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
2016-07-15 03:06:58 -07:00
Guillaume Gomez
8959374154 Rollup merge of #34818 - frewsxcv:vecdoc, r=GuillaumeGomez
Mention where `std::vec` structs originate from.

None
2016-07-15 10:56:43 +02:00
Guillaume Gomez
1544ebee28 Rollup merge of #34804 - GuillaumeGomez:fix_ret, r=steveklabnik
Add examples for FpCategory

Fixes #29364.

r? @steveklabnik
2016-07-15 10:56:43 +02:00
Guillaume Gomez
ca67437ec9 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.
2016-07-15 10:56:43 +02:00
Guillaume Gomez
367f942ce4 Rollup merge of #34794 - frewsxcv:exitstatus-success, r=GuillaumeGomez
Add doc example for `std::process::ExitStatus::success`.

None
2016-07-15 10:56:43 +02:00
Guillaume Gomez
d607e284c8 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.
2016-07-15 10:56:42 +02:00
Guillaume Gomez
257b351ad1 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`.
2016-07-15 10:56:42 +02:00
Guillaume Gomez
6f07b6ca4b Rollup merge of #34456 - tbu-:pr_ptr_null, r=aturon
Use `ptr::{null, null_mut}` instead of `0 as *{const, mut}`
2016-07-15 10:56:42 +02:00
Jeffrey Seyfried
c1a6ff2d6b Add labels hygiene test 2016-07-15 05:23:55 +00:00
Jeffrey Seyfried
c83e31e7c9 Include the MacroDefinition rib in the label ribs. 2016-07-15 05:16:21 +00:00
bors
b6c1ef3745 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.
2016-07-14 20:29:54 -07:00
Corey Farwell
cf21a7b52d Mention where std::vec structs originate from. 2016-07-14 20:32:09 -04:00
bors
3e15fcc55e 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.
2016-07-14 17:29:16 -07:00
Tobias Bucher
f2e73d9d48 Fix compile-fail test for ExactSizeIterator::is_empty 2016-07-14 23:42:13 +02:00
bors
e08a6c2068 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.
2016-07-14 14:33:17 -07:00
Jonathan Turner
bf66a4840b Fix up more tests that I missed 2016-07-14 15:43:53 -04:00
bors
78d49bfac2 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
2016-07-14 11:40:14 -07:00
Alex Crichton
b2d1f7ebae 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
2016-07-14 10:27:56 -07:00
Jonathan Turner
01c87d7763 Remove more unused imports 2016-07-14 13:25:06 -04:00
Ximin Luo
65fb7be728 mk: Move some definitions after their dependencies, to be visually less confusing 2016-07-14 17:13:13 +02:00
Jonathan Turner
0b727f0801 Add unicode test to ui tests 2016-07-14 10:55:09 -04:00
Jonathan Turner
c38d5df4a2 Remove unused imports 2016-07-14 10:36:23 -04:00
bors
fe5c439f69 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. 😀

Thanks!
2016-07-14 06:37:30 -07:00
Jonathan Turner
a9dfac8725 Add back in import needed for codemap tests 2016-07-14 09:02:48 -04:00
Jonathan Turner
d162b97c4b Teach EmitterWriter about the dangers of quasi-quoting 2016-07-14 07:57:46 -04:00
Jonathan Turner
1fd014a965 Add fix for tabs. Move error unit tests->ui tests 2016-07-14 07:57:46 -04:00
Jonathan Turner
2e8e73cb95 Add in styled_buffer.rs and remove some unused code 2016-07-14 07:57:46 -04:00
Jonathan Turner
012ff15c94 Fix up some tidy-unfriendly spacing 2016-07-14 07:57:46 -04:00
Jonathan Turner
2f2c3e1783 DCE and fixing some internal tests 2016-07-14 07:57:46 -04:00
Jonathan Turner
f481879d2a Fix a couple UI test failures 2016-07-14 07:57:46 -04:00
Jonathan Turner
8612838dd0 Add back in old school mode 2016-07-14 07:57:46 -04:00
Jonathan Turner
71ec2867e3 Implement latest rfc style using simpler rendering 2016-07-14 07:57:46 -04:00
Jonathan Turner
a019c2c6ba Remove CoreEmitter and focus on Emitter 2016-07-14 07:57:46 -04:00
Jonathan Turner
a6e7239e7b Rename emit_struct->emit 2016-07-14 07:57:46 -04:00
Jonathan Turner
55f06883b8 Remove emit from emitter, leaving emit_struct 2016-07-14 07:57:46 -04:00