45826 Commits

Author SHA1 Message Date
William Throwe
15d6837a16 Mark main-like functions allow(dead_code) in tests
Fixes #12327.
2015-08-24 20:28:24 -04:00
William Throwe
45de9de1e9 Move entry point identification logic to libsyntax
Identifying entry points will be useful in --test mode, which is
handled in libsyntax.
2015-08-24 20:27:42 -04:00
bors
4c996499a1 Auto merge of #27239 - apasel422:issue-19102, r=huonw
closes #19102
2015-08-24 18:43:41 +00:00
bors
b74ec4c847 Auto merge of #27976 - sfackler:addrparseerror-error, r=alexcrichton
Closes #27973
2015-08-24 16:00:42 +00:00
Steven Fackler
f266f12f30 Add stability markers for new impls 2015-08-24 08:59:45 -07:00
bors
797d0ba59c Auto merge of #27857 - Manishearth:improve-fnkind, r=pnkfelix
Since enums are namespaced now, should we also remove the `Fk` prefixes from `FnKind` and remove the reexport? (The reexport must be removed because otherwise it clashes with glob imports containing `ItemFn`). IMO writing `FnKind::Method` is much clearer than `FkMethod`.
2015-08-24 12:47:57 +00:00
bors
db67cbe43d Auto merge of #27856 - nikomatsakis:move-def-id-to-rustc, r=eddyb
It doesn't really make sense for DefId to be in libsyntax -- it is concerned with a single crate only. It is the compiler that understands the idea of many crates. (At some point, there might be a useful intermediate point here.) This is a refactoring in support of incr. compilation, which will be adjusting the notion of a DefId to make it more durable across compilations.

This will probably be a [breaking-change] for every plugin ever. You need to adjust things as follows:

    use rustc::middle::def_id::{DefId, LOCAL_CRATE}; // two most common definitions
    ast_util::is_local(def_id) => def_id.is_local()
    ast_util::local_def(node_id) => DefId::local(node_id)
2015-08-24 10:03:48 +00:00
Niko Matsakis
19948751bd purge DEF_ID_DEBUG TLS variable, and just always print a path, since I
think it can no longer panic
2015-08-24 05:35:34 -04:00
Niko Matsakis
c0de23de81 convert to use is_local instead of == LOCAL_CRATE 2015-08-24 05:35:34 -04:00
Niko Matsakis
e91bef2e05 fallout from moving def-id 2015-08-24 05:35:34 -04:00
Niko Matsakis
afba69461a move def-id to rustc crate 2015-08-24 05:34:58 -04:00
Steven Fackler
b61fddebb0 Implement Error for AddrParseError
Closes #27973
2015-08-23 23:00:18 -07:00
bors
63ba780fd7 Auto merge of #27962 - dotdash:overflow, r=alexcrichton
We're currently possibly introducing an unneeded temporary, make use of
InsertValue which is said to kick us off of FastISel and we generate
loads/stores of first class aggregates, which is bad as well. Let's not
do all these things.
2015-08-23 21:45:29 +00:00
bors
0e71bda242 Auto merge of #27586 - GuillaumeGomez:patch-2, r=Manishearth
Part of #24407.

This PR doesn't have code example since I didn't find how to raise it. If someone finds a code which does, please say it !

cc @pnkfelix
cc @eddyb
r? @Manishearth
2015-08-23 20:02:35 +00:00
bors
9f227ca2c2 Auto merge of #27960 - dotdash:zerosize_lifetime, r=alexcrichton
These aren't super common, but happen for e.g. closures that have an
empty environment, and for for-loops that return ().
2015-08-23 17:23:23 +00:00
bors
c69c29bb53 Auto merge of #27948 - wthrowe:f64-sqrt, r=alexcrichton
This fixes a reappearance of bug #9987 introduced in
1ddee8070d3cb83609b1f71c29e3deda3d30fd51, which caused
f64::tests::test_sqrt_domain to fail (at least on some systems).
2015-08-23 15:41:34 +00:00
bors
568b13e26c Auto merge of #27961 - Manishearth:fix-rustcdatastructures-docs, r=eddyb
None
2015-08-23 13:58:54 +00:00
Björn Steinbrink
274dae9a4c Improve codegen for the various "with overflow" intrinsics
We're currently possibly introducing an unneeded temporary, make use of
InsertValue which is said to kick us off of FastISel and we generate
loads/stores of first class aggregates, which is bad as well. Let's not
do all these things.
2015-08-23 15:35:45 +02:00
Manish Goregaokar
fd2663648f Fix panic in docs for librustc_data_structures 2015-08-23 18:17:27 +05:30
Björn Steinbrink
64fcf3b1a6 Omit lifetime intrinsics for zero-sized types
These aren't super common, but happen for e.g. closures that have an
empty environment, and for for-loops that return ().
2015-08-23 14:38:42 +02:00
bors
c97acc30c4 Auto merge of #27944 - dotdash:zst_memcpy, r=eddyb
r? @eddyb
2015-08-23 12:16:24 +00:00
bors
2375743037 Auto merge of #27931 - tbu-:pr_liblibc_void, r=alexcrichton 2015-08-23 09:32:47 +00:00
bors
54b2eced63 Auto merge of #27927 - DiamondLovesYou:no-asm, r=alexcrichton 2015-08-23 07:50:06 +00:00
bors
d530379df6 Auto merge of #27922 - tshepang:dst-definition, r=alexcrichton
I am not sure this would work... I didn't test.
2015-08-23 06:06:52 +00:00
bors
e617a17369 Auto merge of #27919 - Eljay:doc-varargs, r=alexcrichton
Fixes #27876.
2015-08-23 04:24:35 +00:00
bors
054b7b766c Auto merge of #27912 - DiamondLovesYou:backtrace-refactor, r=alexcrichton 2015-08-23 02:41:01 +00:00
bors
10d69db0a8 Auto merge of #27947 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #27903, #27904, #27920, #27921, #27924, #27926, #27934, #27935
- Failed merges:
2015-08-23 00:57:39 +00:00
William Throwe
5e9008dfb7 Fix undefined behavior in f64::sqrt
This fixes a reappearance of bug #9987 introduced in
1ddee8070d3cb83609b1f71c29e3deda3d30fd51, which caused
f64::tests::test_sqrt_domain to fail (at least on some systems).
2015-08-22 20:08:53 -04:00
Steve Klabnik
17c1d0ce04 Rollup merge of #27935 - mbrubeck:cfg-test, r=steveklabnik
r? @steveklabnik
2015-08-22 19:15:44 -04:00
Steve Klabnik
1b130326b0 Rollup merge of #27934 - MatejLach:spacing_fix, r=steveklabnik
r @steveklabnik ?
2015-08-22 19:15:44 -04:00
Steve Klabnik
fb58dcdbd2 Rollup merge of #27926 - durka:emphasize-no-bin-doctest, r=steveklabnik
It came up twice in quick succession on IRC that rustdoc doesn't run tests in bin crates, and doesn't give any explanation/warning either as to why. I thought it couldn't hurt to emphasize that in the Book.
2015-08-22 19:15:43 -04:00
Steve Klabnik
3677a1feca Rollup merge of #27924 - pornel:bookthreadjoin, r=steveklabnik
The chapter on concurrency has two examples that both start with:

     let something = thread::spawn(…

but the returned values have different types, because the second example has `.join()` at the end of the expression.

I haven't noticed that join at first, and was wondering how is that possible that the result can have `.is_err()` and `.join()` methods.

I've changed the second example to have the same structure as the first, so they're easy to compare.
2015-08-22 19:15:43 -04:00
Steve Klabnik
b3e9615ed4 Rollup merge of #27921 - tshepang:missing-words, r=steveklabnik 2015-08-22 19:15:43 -04:00
Steve Klabnik
16b5f40f92 Rollup merge of #27920 - tshepang:ancient-syntax, r=steveklabnik 2015-08-22 19:15:43 -04:00
Steve Klabnik
de7a3d32ac Rollup merge of #27904 - tshepang:nit, r=nikomatsakis 2015-08-22 19:15:42 -04:00
Steve Klabnik
fb06272ed3 Rollup merge of #27903 - tshepang:improve-example, r=steveklabnik 2015-08-22 19:15:42 -04:00
bors
50ebf76f22 Auto merge of #27915 - SimonSapin:dotted_i, r=alexcrichton
I was wrong about Unicode not having such language-independent mapping.
2015-08-22 23:15:32 +00:00
Manish Goregaokar
0642d99e81 add help for E0390 2015-08-23 01:11:07 +02:00
Guillaume Gomez
a37af48ff1 Remove E0103 long error explanation until we don't know what's going on 2015-08-23 01:05:49 +02:00
Guillaume Gomez
962b61f4f5 Improve error explanation and example in E0390 2015-08-23 00:56:44 +02:00
Guillaume Gomez
633fe44639 Add tip for E0369 2015-08-23 00:52:23 +02:00
Guillaume Gomez
565070948f Add example for E0390 2015-08-23 00:50:19 +02:00
Guillaume Gomez
73b369d7ab Improve E0323 error explanation 2015-08-23 00:38:57 +02:00
Richard Diamond
deff8781f1 Fix the Mac build, again. 2015-08-22 16:50:18 -05:00
bors
357ae03cc3 Auto merge of #27914 - pnkfelix:fix-fcnr-for-valgrind, r=alexcrichton
Fix (and extend) src/test/run-pass/foreign-call-no-runtime.rs

While going over various problems signaled by valgrind when running `make check` on a build configured with `--enable-valgrind`, I discovered a bug in this test case.

Namely, the test case was previously creating an `i32` (originally an `int` aka `isize` but then we changed the name and the fallback rules), and then reading from a `*const isize`. Valgrind rightly complains about this, since we are reading an 8 byte value on 64-bit systems, but in principle only 4 bytes have been initialized.

(I wish this was the only valgrind unclean test, but unfortunately there are a bunch more. This was just the easiest/first one that I dissected.)
2015-08-22 21:33:35 +00:00
bors
8278342a87 Auto merge of #27896 - alexcrichton:into-raw-os-prelude, r=brson
These traits were mistakenly left out of the OS-specific prelude modules when
they were added.
2015-08-22 19:38:25 +00:00
bors
4a1fda807e Auto merge of #27565 - TimNN:dead-visit-type-in-path, r=nrc
Fixes #23808, passes `make check-stage1` `run-pass` and `run-fail` locally.
2015-08-22 17:56:26 +00:00
Björn Steinbrink
e75abd3438 Don't emit memcpy's for zero-sized types 2015-08-22 19:24:00 +02:00
Richard Diamond
6cbef957f6 Add missing imports to dladdr.rs for Mac. 2015-08-22 11:52:31 -05:00
bors
258f3030ab Auto merge of #27913 - birkenfeld:remove_suffix_len, r=alexcrichton
The methods gave wrong results for TyIs and TyUs, whose suffix len
should be 5 nowadays.  But since they were only used for parsing,
and unneeded for that since 606a309d, remove them rather than fixing.

I hope this is ok to do, since all of rustc is considered unstable...
2015-08-22 16:14:25 +00:00