Commit Graph

46915 Commits

Author SHA1 Message Date
J. Ryan Stinnett
ed97bcd44a Complex import example needs blank lines 2015-10-06 00:11:18 -05:00
bors
bfb26033af Auto merge of #28662 - semmaz:fmt-debug, r=alexcrichton
fixes #26920
2015-10-02 22:49:37 +00:00
bors
669fc7f7d1 Auto merge of #28626 - arielb1:closure-needs-infer, r=nikomatsakis
Fixes #28550
2015-10-02 21:02:49 +00:00
bors
ef07d7dd40 Auto merge of #28650 - sanxiyn:attr-usage, r=nrc
This is technically a [breaking-change].

Fix #2809.
Fix #22746.
2015-10-02 19:16:39 +00:00
bors
e650491f20 Auto merge of #28768 - alexcrichton:dep-info++, r=brson
This PR closes out #28716 and #28735 by making two changes to the compiler:

1. The `--emit` flag to the compiler now supports the ability to specify the output file name of a partuclar emit type. For example `--emit dep-info=bar.d,asm=foo.s,link` is now accepted.
2. The dep-info emission now emits a dummy target for all input file names to protect against deleted files.
2015-10-02 16:33:26 +00:00
Alex Crichton
1741962271 rustc: Emit phony targets for inputs in dep-info
This helps protect against files being deleted to ensure that `make` won't emit
errors.

Closes #28735
2015-10-02 09:33:06 -07:00
Seo Sanghyeon
61f5b2b0ca Check attribute usage 2015-10-03 00:01:49 +09:00
Seo Sanghyeon
20cccfa67f Change tests per RFC 246 (const vs static) 2015-10-03 00:01:49 +09:00
bors
17a2cb443a Auto merge of #28808 - AndiDog:patch-1, r=steveklabnik 2015-10-02 13:24:57 +00:00
Andreas Sommer
aa9666e5c1 Fix typo, add link to Google-search in documentation 2015-10-02 14:38:31 +02:00
bors
5180a7ccc5 Auto merge of #28795 - marti1125:28696, r=alexcrichton
-Add a validation when input search is empty on top of 'startSearch()'
2015-10-02 11:04:13 +00:00
bors
70076ec8b2 Auto merge of #28807 - Manishearth:rollup, r=Manishearth
- Successful merges: #28554, #28686, #28786, #28788, #28791, #28797
- Failed merges:
2015-10-02 09:11:34 +00:00
Manish Goregaokar
e4797fa221 Rollup merge of #28797 - steveklabnik:rebase_for_gankro, r=alexcrichton
This is a rebase of https://github.com/rust-lang/rust/pull/27902/, since @Gankro  is busy ❤️
2015-10-02 13:07:23 +05:30
Manish Goregaokar
ee0157fd52 Rollup merge of #28791 - apasel422:issue-25439, r=alexcrichton
Closes #25439.
2015-10-02 13:07:23 +05:30
Manish Goregaokar
66ab1b01c1 Rollup merge of #28788 - tsurai:master, r=bluss
Please correct me if I confused something but the documentation for ```into_ptr``` and ```into_raw``` of ```CString``` seem to be swapped as the docs for ```into_ptr``` mentions ```into_raw``` and vice versa.

Update: I actually meant ```into_ptr``` and ```into_raw``` NOT ```from_*```
2015-10-02 13:07:22 +05:30
Manish Goregaokar
3234ec1455 Rollup merge of #28786 - fhahn:ba-link, r=alexcrichton
This tiny PR just adds a link to  Florian Wilkens's Bachelor's Thesis.
2015-10-02 13:07:22 +05:30
Manish Goregaokar
9155edf6a2 Rollup merge of #28686 - eefriedman:unresolved-path-error, r=nikomatsakis
The behavior here isn't really ideal, but we can't really do much better
given the current state of constant evaluation.

The changes to ExprUseVisitor are to avoid a compile error; apparently
that bit of code is extremely sensitive to changes in other areas of the
compiler.

Fixes #28670, and probably a bunch of duplicates.
2015-10-02 13:07:22 +05:30
Manish Goregaokar
b1d2a49b87 Rollup merge of #28554 - christopherdumas:E0422, r=arielb1 2015-10-02 13:07:22 +05:30
bors
a004ff5caf Auto merge of #28793 - Ms2ger:AttrStyle, r=alexcrichton 2015-10-02 07:10:43 +00:00
bors
7643c4ca75 Auto merge of #28792 - dotdash:cmp_indirection, r=alexcrichton
Using the comparison operators already refs the operands, so doing it
ourselves as well just adds an unnecessary level of indirection.
2015-10-02 05:19:50 +00:00
bors
0ffc682975 Auto merge of #28790 - arielb1:unsafe-coerce, r=eddyb
Fixes #28776

r? @eddyb
2015-10-02 03:28:57 +00:00
bors
48a5004ead Auto merge of #28789 - rkruppe:rm-unused-probes, r=alexcrichton
The code using them was removed in #27789.
2015-10-02 01:40:29 +00:00
bors
168a23ebe1 Auto merge of #28787 - dotdash:no_more___fat_ptr, r=eddyb
A DST value and a fat pointer to it have the same representation, all we
have to do is to adjust the type of the datum holding the pointer.
2015-10-01 20:06:35 +00:00
Alexis Beingessner
c7527a1999 fixup wording 2015-10-01 15:54:40 -04:00
Alexis Beingessner
9ef2651dff flesh out what Vec actually guarantees 2015-10-01 15:53:01 -04:00
Willy Aguirre
777518d844 fixes #28696 Return to the default content when .search-input is empty -Add a validation when input search is empty on top of 'startSearch()' 2015-10-01 13:30:35 -05:00
bors
d9d9ca1a02 Auto merge of #28746 - aidanhs:aphs-musl-linking-no-cxxabi, r=alexcrichton
On reading https://github.com/alexcrichton/port-of-rust/blob/master/musl/Dockerfile I was surprised to see no libcxxabi. I experimented, and it does seem to be unnecessary.

I guess it's a remnant from the 3.6 build.

r? @alexcrichton
2015-10-01 18:16:08 +00:00
Simon Mazur
0294098d8f Implement size_hint for EscapeUnicode 2015-10-01 20:33:43 +03:00
bors
e82faeb655 Auto merge of #28742 - nikomatsakis:def-id-encapsulate, r=eddyb
As described in https://github.com/rust-lang/rfcs/pull/1298, the idea here is to make DefIds independent of changes to the content of other items. They are also *mostly* independent from ordering, so e.g. reordering two functions will change the defids, but it will not change the paths that they expand into (but this is not the case for some things, such as impls).

This is a major refactoring, so I did it in slices. The final commit is in some sense The Big One where most of the work is done. The earlier commits just pave the way by gradually refactoring accesses to the `node` field.

This is a [breaking-change] for plugin authors. The things you need to do to migrate your code are as follows:

1. For local def-ids, rather than do `def_id.node`, call `tcx.map.as_local_node_id(def_id)`.
2. To construct a local def-id, call `tcx.map.local_def_id(node_id)`.
3. Note that you cannot make def-ids for any node, but only for "definitions" -- which include all items, as well as a number of other things, but not e.g. arbitrary expressions.
4. You can get the path to a def-id by calling `tcx.def_path(def_id)`.

One thing that is NOT part of this PR, but which I plan do in a follow-up, is converting uses of the existing `with_path` API to use `def_path`, which is basically the same.

r? @eddyb (or @nrc)
2015-10-01 16:26:28 +00:00
Björn Steinbrink
8a959ad447 Remove one level of indirection for slice-based PartialEq impls
Using the comparison operators already refs the operands, so doing it
ourselves as well just adds an unnecessary level of indirection.
2015-10-01 18:17:49 +02:00
Ms2ger
b093060c2a Stop re-exporting AttrStyle's variants and rename them. 2015-10-01 18:03:34 +02:00
Andrew Paseltiner
a81dfca190 Add test for #25439
Closes #25439.
2015-10-01 11:30:22 -04:00
Niko Matsakis
f0dc7bd1fd remove support method for synthetic default method ids 2015-10-01 11:10:30 -04:00
Niko Matsakis
6bfdf37250 remove code for re-exports of static methods 2015-10-01 10:43:07 -04:00
Niko Matsakis
52a02832b8 convert the creepy case to just return None -- in practice, it would
have always been returning None anyway, since it was comparing node-ids
across crates incorrectly -- and remove the now unused map
`extern_const_variants`
2015-10-01 10:43:07 -04:00
Niko Matsakis
01f32ace03 Convert DefId to use DefIndex, which is an index into a list of
paths, and construct paths for all definitions. Also, stop rewriting
DefIds for closures, and instead just load the closure data from
the original def-id, which may be in another crate.
2015-10-01 10:43:07 -04:00
Niko Matsakis
a6fee06741 rename ast_map to hir_map 2015-10-01 10:42:37 -04:00
Niko Matsakis
34a25db45f stop updating parent_node_id when there is no corresponding map entry 2015-10-01 10:42:37 -04:00
Niko Matsakis
d7b0eb0f39 build up a set of node-ids that we can construct def-ids from 2015-10-01 10:42:37 -04:00
Niko Matsakis
a0dc2d9a29 Introduce semi-duplicate DefIds into DefLocal/DefUpvar to remove use
of xxx_local.
2015-10-01 10:37:19 -04:00
Niko Matsakis
3b1399df2d Make calling def_id on a DefSelfTy an error; the previous defids that
were returned, either the trait or the *self type itself*, were not
particularly representative of what the Def is (a type parameter).
Rewrite paths to handle this case specially, just as they handle the
primitive case specifically. This entire `def_id` codepath is kind of a
mess.
2015-10-01 10:37:19 -04:00
Niko Matsakis
95ce1ebe7c Move DefLabel out from the def_id() results 2015-10-01 10:37:19 -04:00
Niko Matsakis
cb784b70ba Remove DefRegion, which is not used 2015-10-01 10:37:19 -04:00
Niko Matsakis
1dd5ffa405 Rename node_id to var_id and limit to the cases that are actually used 2015-10-01 10:37:19 -04:00
Niko Matsakis
5600c6282e move direct accesses of node to go through as_local_node_id, unless
they are being used as an opaque "position identifier"
2015-10-01 10:37:19 -04:00
Niko Matsakis
aa40a1cad0 change creepy case to call span_bug instead of doing something clearly wrong 2015-10-01 10:28:28 -04:00
Niko Matsakis
9ff4f57cd0 move job of creating local-def-ids to ast-map (with a few stragglers) 2015-10-01 10:28:28 -04:00
Cristian Kubis
25c21342c6 replaced *_ptr with *_raw methods in docs 2015-10-01 16:02:35 +02:00
Niko Matsakis
2dd139f5fd add some XXX markers 2015-10-01 09:44:28 -04:00
Niko Matsakis
dc4a4ada58 move LOCAL_CRATE to cstore 2015-10-01 09:44:28 -04:00