Commit Graph

56828 Commits

Author SHA1 Message Date
Nick Cameron
68d29cba95 save-analysis: add docs data 2016-09-07 11:23:49 +12:00
David Tolnay
3784067edc Point macros 1.1 errors to the input item
Before:

```rust
error[E0106]: missing lifetime specifier
  --> src/main.rs:10:10
   |
10 | #[derive(Serialize, Deserialize)]
   |          ^ expected lifetime parameter

error[E0038]: the trait `T` cannot be made into an object
  --> src/main.rs:15:15
   |
15 | #[derive(Serialize, Deserialize)]
   |          ^^^^^^^^^^ the trait `T` cannot be made into an object
```

After:

```rust
error[E0106]: missing lifetime specifier
  --> src/main.rs:11:1
   |
11 | struct A {
   | ^ expected lifetime parameter

error[E0038]: the trait `T` cannot be made into an object
  --> src/main.rs:16:1
   |
16 | struct B<'a> {
   | ^ the trait `T` cannot be made into an object
```
2016-09-06 14:11:19 -07:00
bors
923bac4596 Auto merge of #36025 - michaelwoerister:incr-comp-hash-spans, r=nikomatsakis
incr. comp.: Take spans into account for ICH

This PR makes the ICH (incr. comp. hash) take spans into account when debuginfo is enabled.

A side-effect of this is that the SVH (which is based on the ICHs of all items in the crate) becomes sensitive to the tiniest change in a code base if debuginfo is enabled. Since we are not trying to model ABI compatibility via the SVH anymore (this is done via the crate disambiguator now), this should be not be a problem.

Fixes #33888.
Fixes #32753.
2016-09-06 13:22:35 -07:00
Tim Neumann
d8c58d40ef re-add accidentally removed line 2016-09-06 18:53:43 +02:00
Jonathan Turner
20cce247e1 Rollup merge of #36298 - GuillaumeGomez:hashmap_doc, r=steveklabnik
Add missing urls

r? @steveklabnik
2016-09-06 09:38:04 -07:00
Jonathan Turner
8156761e65 Rollup merge of #36273 - apasel422:unsafe_no_drop_flag, r=steveklabnik
Remove mention of `unsafe_no_drop_flag` from Reference and Nomicon
2016-09-06 09:38:03 -07:00
Jonathan Turner
c0e5a777d4 Rollup merge of #36267 - Cobrand:E0559, r=jonathandturner
Updated E0559 to new format

Refactored a method that printed one suggested field name,
into a method that returns an `Option` of a suggestion

(Updated test cases accordingly)

r? @jonathandturner

Closes #36197
2016-09-06 09:38:03 -07:00
Jonathan Turner
2d26603219 Rollup merge of #36263 - apasel422:scoped, r=steveklabnik
Clean up thread-local storage docs

`std` no longer contains an implementation of scoped TLS.

r? @steveklabnik
2016-09-06 09:38:02 -07:00
Jonathan Turner
b5f5f8b865 Rollup merge of #36243 - GuillaumeGomez:hash_map_links, r=steveklabnik
Add missing urls

r? @steveklabnik
2016-09-06 09:38:02 -07:00
Jonathan Turner
c8140bde4a Rollup merge of #36241 - Cobrand:contributing-md, r=steveklabnik
doc: Contributing.md: Added mention of `make tidy`

r? @steveklabnik
2016-09-06 09:38:02 -07:00
Jonathan Turner
4f74f837b6 Rollup merge of #36128 - gavinb:error_msgs_p2, r=jonathandturner
Update Error format for E0516, E0517, E0518

- E0518 Update error format #36111
- E0517 Update error format #36109
- E0516 Update error format #36108
- Part of #35233

r? @jonathandturner
2016-09-06 09:38:02 -07:00
Jonathan Turner
613f35051f Rollup merge of #36121 - Cobrand:master, r=jonathandturner
Updated E0527 to new error format

* Closes #36113
2016-09-06 09:38:01 -07:00
Michael Woerister
3057b7b974 ICH: Make CachingCodemapView robustly handle invalid spans. 2016-09-06 12:14:43 -04:00
Niko Matsakis
c2ffa2f938 pacify the mercilous tidy
add licenses to shadow.rs
2016-09-06 11:18:10 -04:00
Niko Matsakis
dadce2521e always print def-path in Debug impl for DefId
I also added an `opt_def_path` so that we can deal with DefIds that are
missing a `DefPath` entry.
2016-09-06 11:18:10 -04:00
Niko Matsakis
2446e258fc kill extra use 2016-09-06 11:18:10 -04:00
Niko Matsakis
07df8125e6 kill the forbidden code
supplanted by RUST_FORBID_DEP_GRAPH_EDGE
2016-09-06 11:18:10 -04:00
Niko Matsakis
fe6557eb62 expanding a def-id is not a read
Across crates only, converting a def-id into its def-key or def-path was
considered a read. This caused spurious reads when computing the symbol
name for some item.
2016-09-06 11:18:10 -04:00
Niko Matsakis
2f91ba05fd implement a debugging "shadow graph"
The shadow graph supercedes the existing code that checked for
reads/writes without an active task and now adds the ability
to filter for specific edges.
2016-09-06 11:18:10 -04:00
Niko Matsakis
4c2f3ff442 remove the "misc-items" from meta-data
It was duplicating information available elsewhere.
2016-09-06 11:18:10 -04:00
Niko Matsakis
2a84449169 allow testing DepNode::Krate edges directly 2016-09-06 11:18:09 -04:00
Niko Matsakis
753590f0c5 add a debugging mechanism to forbid edges
It is useful to track down an errant edge that is being added.  This is
not a perfect mechanism, since it doesn't consider (e.g.) if we are
in an ignored task, but it's helpful enough for now.
2016-09-06 11:17:03 -04:00
Niko Matsakis
c6363b8013 ignore dep-graph when loading inlined HIR
We touch the krate to adjust the maps, but we don't expose that data
widely.
2016-09-06 11:17:03 -04:00
Niko Matsakis
5415b34ca6 write to inherent_impls during the visitor
The goal here is to avoid writing to the `inherent_impls` map from
within the general `Coherence` task, and instead write to it as we
visit. Writing to it from the Coherence task is actually an information
leak; it happened to be safe because Coherence read from
`DepNode::Krate`, but that was very coarse.

I removed the `Rc` here because, upon manual inspection, nobody clones
the data in this table, and it meant that we can accumulate the data in
place. That said, the pattern that is used for the inherent impls map
is *generally* an anti-pattern (that is, holding the borrow lock for the
duration of using the contents), so it'd probably be better to
clone (and I doubt that would be expensive -- how many inherent impls
does a typical type have?).
2016-09-06 11:17:03 -04:00
bors
13c4e32e7a Auto merge of #36288 - nrc:save-var-value, r=eddyb
save-analysis: some refinement to the value string for variables
2016-09-06 07:46:06 -07:00
Jake Goldsborough
79644ac3c4 adding a check to sanity to look for the nodejs command 2016-09-06 07:41:20 -07:00
ggomez
dc0e9c0b12 Add missing urls 2016-09-06 16:31:18 +02:00
Simonas Kazlauskas
0520698be3 Count and report time taken by MIR passes 2016-09-06 17:19:36 +03:00
bors
5114f8a29b Auto merge of #36276 - jseyfried:fix_unused, r=nrc
resolve: Fix unused import false positive with `item_like_imports`

Fixes #36249.
r? @nrc
2016-09-06 01:44:13 -07:00
Jorge Aparicio
8df4a768a7 rustbuild: per target musl-root
config.toml now accepts a target.$TARGET.musl-root key that lets you
override the "build" musl-root value, which is set via the --musl-root
flag or via the build.musl-root key.

With this change, it's now possible to compile std for several musl
targets at once. Here's are the sample commands to do such thing:

```
$ configure \
    --enable-rustbuild \
    --target=x86_64-unknown-linux-musl,arm-unknown-linux-musleabi \
    --musl-root=/musl/x86_64-unknown-linux-musl/

$ edit config.toml && tail config.toml
[target.arm-unknown-linux-musleabi]
musl-root = "/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr"

$ make
```
2016-09-06 01:04:41 -05:00
bors
1d04201565 Auto merge of #36078 - ollie27:rustdoc_search_assocconst, r=alexcrichton
rustdoc: Fix associated consts in search results

Associated consts can appear in none trait impls so need to be treated
like methods when generating the search index.

Fixes #36031
2016-09-05 22:32:36 -07:00
Jeffrey Seyfried
ff3a644951 Add struct AmbiguityError. 2016-09-06 03:52:36 +00:00
Jeffrey Seyfried
888a968139 Add field used: Cell<bool> to variant NameBindingKind::Import. 2016-09-06 03:43:46 +00:00
Jeffrey Seyfried
07f8cb28dc Add regression test. 2016-09-06 03:43:21 +00:00
Jeffrey Seyfried
32674b3f1a Avoid false positive unused import warnings. 2016-09-06 03:43:20 +00:00
Andy Russell
288e7caf19 show self suggestion when items are in the block 2016-09-05 23:08:21 -04:00
Andy Russell
41ee2e9124 resolve: Suggest use self when import resolves
Improves errors messages by replacing "Maybe a missing `extern crate`" messages
with "Did you mean `self::...`" when the `self` import would succeed.
2016-09-05 21:48:02 -04:00
Nick Cameron
92a1848d77 save-analysis: some refinement to the value string for variables 2016-09-06 13:07:59 +12:00
bors
e1d0de82cc Auto merge of #36274 - Manishearth:rollup, r=Manishearth
Rollup of 6 pull requests

- Successful merges: #35845, #35983, #36065, #36102, #36242, #36245
- Failed merges:
2016-09-05 17:55:45 -07:00
bors
cbe4de78e2 Auto merge of #35845 - frewsxcv:result-into-iter, r=GuillaumeGomez
Indicate where `core::result::IntoIter` is created.

None
2016-09-05 14:41:16 -07:00
bors
38824d1061 Auto merge of #36281 - pnkfelix:fix-issue-36036, r=eddyb
Fix issue #36036.

Fix #36036.

We were treating an associated type as unsized even when the concrete instantiation was actually sized. Fix is to normalize before checking if it is sized.
2016-09-05 11:28:36 -07:00
Piotr Jawniak
915bbdac58 rustdoc: Filter more incorrect methods inherited through Deref
Old code filtered out only static methods. This code also excludes
&mut self methods if there is no DerefMut implementation
2016-09-05 20:24:55 +02:00
Cobrand
e8c5dc4806 Updated E0527 to new error format
* Closes #36113
2016-09-05 19:28:52 +02:00
Josh Triplett
046c7f2368 Add test for unused field in union 2016-09-05 10:19:00 -07:00
bors
3f50b6342d Auto merge of #36200 - mattico:fix-llvm-linkage, r=arielb1
Fix incorrect LLVM Linkage enum

Followup of #33994 to actually work.

The `Linkage` enum in librustc_llvm got out of sync with the version in LLVM and it caused two variants of the `#[linkage=""]` attribute to break.

This adds the functions `LLVMRustGetLinkage` and `LLVMRustSetLinkage` which convert between the Rust Linkage enum and the LLVM one, which should stop this from breaking every time LLVM changes it.

Possible remaining concerns:

1. There could be a codegen test to make sure that the attributes are applied correctly (I don't know how to do this).
2. ~~The test does not exercise the `appending` linkage. I can't figure out how to make a global static raw pointer to an array. This might not even be possible? If not we should probably remove appending linkage as its unusable in rust.~~ Appending linkage is not 'emittable' anyway.
3. The test only runs on Linux.

Fixes #33992

r? @alexcrichton
2016-09-05 08:13:32 -07:00
Gavin Baker
cd56d47da3 E0518 Update error format #36111
- Fixes #36111
- Part of #35233
2016-09-06 00:21:04 +10:00
Gavin Baker
8bcd6a33be E0517 Update error format #36109
- Fixes #36109
- Part of #35233
2016-09-06 00:20:56 +10:00
Gavin Baker
d53ea97bfc E0516 Update error format #36108
- fixes #36108
- part of #35233
2016-09-05 23:07:50 +10:00
bors
58dc448f8c Auto merge of #35787 - canndrew:bang_type_refactor_check, r=eddyb
Typecheck refactor for `!`

Ping @nikomatsakis @eddyb. This is the PR for the typeck refactor for `!`. Is this what you guys had in mind? Is there anything else that needs doing on it?
2016-09-05 04:29:47 -07:00
Felix S. Klock II
09e6a98380 Fix issue #36036.
We were treating an associated type as unsized even when the concrete
instantiation was actually sized. Fix is to normalize before checking
if it is sized.
2016-09-05 12:57:00 +02:00