Commit Graph

48300 Commits

Author SHA1 Message Date
Steve Klabnik
acda78a663 Rollup merge of #30019 - alex:patch-1, r=steveklabnik
looks like a case of mixed tabs and spaces
2015-11-24 09:43:46 -05:00
Steve Klabnik
731ff93a76 Rollup merge of #30004 - michaelwoerister:primitive-ty-to-str, r=alexcrichton
Good candidate for a rollup, this one.
2015-11-24 09:43:46 -05:00
Steve Klabnik
ff8859880b Rollup merge of #29933 - tbu-:pr_dont_opt_in_copy, r=nikomatsakis
It was introduced with the change that made copy opt-in. The
implementation gives a warning, because the struct contains a raw
pointer.
2015-11-24 09:43:46 -05:00
Steve Klabnik
d0ca581016 Rollup merge of #29397 - dylanmckay:llvmdeps-deps, r=brson
Previously the file was not regenrated upon modification of `src/rustllvm` or others.

Now it will be rebuilt if `src/llvm` or `src/rustllvm` is touched.

Also added *.rs rule to 'clean' rule so that it is removed upon 'make
clean'.

Fixes #28614.
2015-11-24 09:43:46 -05:00
bors
9cf0e3c752 Auto merge of #30012 - jonas-schievink:log-level-trace, r=alexcrichton
The `log` crate on crates.io already knows `TRACE`, but the internal liblog doesn't, which causes it to spew errors when a `TRACE` level is defined. I made `TRACE` behave like `DEBUG`.
2015-11-24 11:10:22 +00:00
bors
561d0884e5 Auto merge of #30000 - Manishearth:unreachable-call, r=nrc
Fixes #1889
2015-11-24 06:58:25 +00:00
Alex Gaynor
563adbbea5 fixed inconsistent indentation in book example
looks like a case of mixed tabs and spaces
2015-11-24 01:24:27 -05:00
Manish Goregaokar
7fbcb51589 Fix unreachable code in libsyntax 2015-11-24 10:05:51 +05:30
bors
92f96b2445 Auto merge of #30006 - ntrepid8:skip-check-for-DYLD-libs-in-child-proc, r=alexcrichton
It seems that OS X El Capitan does not pass DYLD_* environment variables to child processes anymore.  See this link: https://forums.developer.apple.com/thread/9233

The causes a test in `src/libstd/process.rs' to fail when those environment variables are not found in the child process.  This PR skips those variables similar to how the Windows envars that start with `=` are skipped.
2015-11-24 04:26:47 +00:00
bors
77c995b96a Auto merge of #30001 - Detegr:master, r=Manishearth
r? @Manishearth
2015-11-24 01:42:31 +00:00
bors
a9d15a6e92 Auto merge of #29955 - bltavares:makefile-29554, r=brson
Reference #29554
2015-11-23 22:53:14 +00:00
Jonas Schievink
3f36ce8238 Add TRACE to the known log levels
The `log` crate on crates.io already knows TRACE, but the internal
liblog doesn't, which causes it to spew errors when a TRACE level is
defined.
2015-11-23 22:09:40 +01:00
Manish Goregaokar
2eca64de71 Make unreachable_code lint warn on diverging call arguments as well
Fixes #1889
2015-11-24 01:45:21 +05:30
bors
040a77f772 Auto merge of #29952 - petrochenkov:depr, r=brson
Part of https://github.com/rust-lang/rust/issues/29935

The deprecation lint is still called "deprecated", so people can continue using `#[allow(deprecated)]` and similar things.
2015-11-23 20:08:49 +00:00
Josh Austin
c2f0442a2a skip check for DYLD envars in child proc 2015-11-23 14:08:52 -05:00
Antti Keränen
210c435752 Add compile-fail test for issue #10969 2015-11-23 21:06:08 +02:00
bors
8e9a97529d Auto merge of #29530 - jseyfried:resolve, r=nikomatsakis
Replace `TypeNsDef` and `ValueNsDef` with a more general type `NsDef`.

Define a newtype `NameBinding` for `Rc<RefCell<Option<NsDef>>>` and refactor `NameBindings` to be a `NameBinding` for each namespace.

Replace uses of `NameBindings` with `NameBinding` where only one binding is being used (in `NamespaceResult`, `Target,` etc).

Refactor away `resolve_definition_of_name_in_module` and `NameDefinition`, fixing issue #4952.
2015-11-23 17:31:19 +00:00
Michael Woerister
3be1d8ca7d Avoid some code duplication around getting names of numeric types. 2015-11-23 15:59:36 +01:00
Antti Keränen
428e790d8c Add a note when trying to call a non-function
The note added tells the definition location of the non-function
that is being called. Fixes #10969
2015-11-23 16:57:09 +02:00
bors
69b8e74c31 Auto merge of #29998 - fiveop:patch-1, r=steveklabnik 2015-11-23 14:37:35 +00:00
Philipp Matthias Schäfer
e4e03bc74a wording: results don't fail 2015-11-23 09:39:58 +01:00
bors
4891c00634 Auto merge of #29984 - Manishearth:slice-assert, r=alexcrichton
I'd like to have the message print out the index and length values like it does elsewhere, but I'm not sure how to do that without affecting perf here. Will `assert!(cond, "index out of bounds got {} but len is ", idx, len)` make things slower? It calls `panic_fmt` which is marked as cold but also calls `format_args!`, and I don't know if that allocates or does any heavy lifting.

cc @alexcrichton @Gankro
2015-11-23 06:27:49 +00:00
Manish Goregaokar
5c873be9c3 Improve slice indexing assertion 2015-11-23 09:39:46 +05:30
Manish Goregaokar
c0f9a39e5c Mark slice_error_fail as a cold path 2015-11-23 09:34:58 +05:30
bors
2ba44607fe Auto merge of #28907 - SingingTree:rustfmt_libterm, r=nrc
Hey hey,

This is the result of running rustfmt over the libterm module. The first commit reflects the unaltered changes from rustfmt, and the commit message contains some notes on areas where I thought rustfmt had behaved strangely. The second commit attempts to fix the strange areas from the first commit.

Clarification edit: there are still some areas where I think rustfmt has made changes which may merit discussion (one is noted in the comments below). My second commit only undoes the changes that I figured would not warrant discussion (based on my opinion of the style, which is of course subjective).

r? @nrc
2015-11-22 23:01:56 +00:00
bors
a2847a9999 Auto merge of #29964 - alexcrichton:update-libc, r=brson
Includes rust-lang-nursery/libc#66 which should:

Closes #29818
Closes #29956
2015-11-22 21:17:57 +00:00
Alex Crichton
911cdbc519 libc: Update to master
Includes rust-lang-nursery/libc#66 which should:

Closes #29956
2015-11-22 11:29:12 -08:00
bors
d125ddd52f Auto merge of #29983 - tbu-:pr_env_windows_hidden_variables, r=alexcrichton
Fixes #29972.
2015-11-22 18:34:13 +00:00
Tobias Bucher
dd162d77d4 test_inherit_env: Don't look for hidden environment variables on Windows
Fixes #29972.
2015-11-22 11:12:49 +00:00
bors
e24fffef8a Auto merge of #29716 - Manishearth:repr-error, r=Gankro
r? @Gankro
2015-11-22 08:43:22 +00:00
bors
f04653250b Auto merge of #29980 - Manishearth:missing-diag, r=eddyb
None
2015-11-22 06:42:56 +00:00
Manish Goregaokar
bef93557e5 Improve transmute diagnostics with a note about destructors
fixes #29922
2015-11-22 10:26:50 +05:30
Manish Goregaokar
352853c18b Register diagnostics for rustc_privacy and rustc_trans properly
fixes #29665
2015-11-22 10:26:22 +05:30
bors
ced9ad3064 Auto merge of #29968 - Manishearth:bang-macro-diag, r=eddyb
r? @eddyb

fixes #5780
2015-11-22 04:13:49 +00:00
Manish Goregaokar
99925fb562 Look up macro names as well when suggesting replacements for function resolve errors
fixes #5780
2015-11-22 06:48:46 +05:30
Bryce Van Dyk
7d54c32c94 Rustfmt libterm, skip long static in compiled.rs 2015-11-22 13:24:56 +13:00
bors
eb19d024a9 Auto merge of #29963 - dotdash:fat_copy, r=eddyb
Since fat pointers do not qualify as structural types, they got copied
using load_ty and store_ty, which means that we load an FCA and use
extractvalue to get the components of the fat pointer. This breaks
certain optimizations in LLVM.

Found via apasel422/ref_count#13
2015-11-21 22:08:26 +00:00
bors
685e098561 Auto merge of #29966 - MatthiasKauer:master, r=steveklabnik
This commit changes the location of the rust docs.
024aa9a345
Clicking the contribution link on the front page therefore becomes a 'not found' error.
2015-11-21 06:06:16 +00:00
bors
ef5ee7d895 Auto merge of #29948 - devonhollowood:fromstr-parse, r=steveklabnik
Implement #29919
2015-11-21 04:22:15 +00:00
bors
d1c7a93eff Auto merge of #29913 - tbu-:pr_windows_path_error_on_nul, r=alexcrichton
On Windows: Previously these paths were silently truncated at these NUL
characters, now they fail with `ErrorKind::InvalidInput`.
2015-11-21 02:38:18 +00:00
Tobias Bucher
71dccf8706 Also check for NULs in environment variables
This check is necessary, because the underlying API only reads strings
until the first NUL.
2015-11-21 01:11:15 +00:00
bors
79b7a9efa9 Auto merge of #29916 - Manishearth:diag-401, r=steveklabnik
None
2015-11-21 00:54:16 +00:00
Matthias Kauer
e37cd6d5fd change link on book front page trpl -> book 2015-11-21 07:49:38 +08:00
bors
731c0ce4c9 Auto merge of #29961 - alexcrichton:order-dependent, r=brson
This commit fixes a bug where a crate could fail to compile depending on the
order of `extern crate` directives at the top of the crate. Specifically, if the
same crate is found at two locations, then if it's loaded first via `--extern`
it will not emit a duplicate warning, but if it's first loaded transitively
via a dep and *then* via `--extern` an error will be emitted.

The loader was tweaked to catch this scenario and coalesce the loading of these
two crates to prevent errors from being emitted.
2015-11-20 22:08:19 +00:00
Björn Steinbrink
6741f3315a Avoid FCA loads and extractvalue when copying fat pointers
Since fat pointers do not qualify as structural types, they got copied
using load_ty and store_ty, which means that we load an FCA and use
extractvalue to get the components of the fat pointer. This breaks
certain optimizations in LLVM.

Found via apasel422/ref_count#13
2015-11-20 21:42:13 +01:00
bors
20cbba71d4 Auto merge of #29945 - nrc:save-crate-name, r=alexcrichton
r? @alexcrichton

This prevents outputting csv files with the same name and thus overwriting each other when indexing Cargo projects with a bin crate (and some other cases).
2015-11-20 20:03:16 +00:00
Alex Crichton
24311d0762 rustc: Fix extern crate being order dependent
This commit fixes a bug where a crate could fail to compile depending on the
order of `extern crate` directives at the top of the crate. Specifically, if the
same crate is found at two locations, then if it's loaded first via `--extern`
it will not emit a duplicate warning, but if it's first loaded transitively
via a dep and *then* via `--extern` an error will be emitted.

The loader was tweaked to catch this scenario and coalesce the loading of these
two crates to prevent errors from being emitted.
2015-11-20 10:58:38 -08:00
bors
6a6b97cf02 Auto merge of #29822 - petrochenkov:pubexport, r=alexcrichton
This patch implements the plan described in https://internals.rust-lang.org/t/privacy-and-its-interaction-with-docs-lints-and-stability/2880 with one deviation.

It turns out, that rustdoc needs the "directly public" set for its docs inlining logic, so the privacy pass have to produce three sets and not two. Three is arguably too many, so I merged them in one map:
`public_items/exported_items/reachable_items: NodeSet => access_levels: NodeMap<AccessLevel>`

r? @alexcrichton
2015-11-20 18:13:10 +00:00
Manish Goregaokar
92df8a9a99 Add E0517, E0518 for repr() errors 2015-11-20 21:23:58 +05:30
bors
68276619b5 Auto merge of #29951 - fhahn:fix-plugin-compiler-example, r=steveklabnik
PR for #29930. Adds missing #![feature(slice_patterns)] to make compiler plugin example compile again.
2015-11-20 15:26:35 +00:00