Commit Graph

47030 Commits

Author SHA1 Message Date
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
Björn Steinbrink
bda083fa70 Avoid unnecessary temporaries when ref'ing a DST value
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 15:24:23 +02:00
Ariel Ben-Yehuda
0706ac0fae use the *adjusted* callee type in effect checking
Fixes #28776
2015-10-01 16:06:50 +03:00
bors
24202c6431 Auto merge of #28131 - arielb1:static-upvars, r=pnkfelix
Fixes #23057 
Fixes #27890
Fixes #28099
Fixes #28113

r? @pnkfelix
2015-10-01 13:06:48 +00:00
Robin Kruppe
4df35ba454 Stop probing for pandoc and xelatex, they are not used any more. 2015-10-01 14:34:31 +02:00
Ariel Ben-Yehuda
c01e0502e7 check upvars in closures that are in statics
Fixes #27890
Fixes #28099
Fixes #28113
2015-10-01 15:22:57 +03:00
bors
8719f504ee Auto merge of #28780 - steveklabnik:doc_from_str, r=alexcrichton
@marchelzo pointed out on IRC that this doesn't have docs, so, let's
change that.
2015-10-01 11:18:48 +00:00
Cristian Kubis
566dc9cf93 doc: fixed swapped docs for from_ptr and from_raw 2015-10-01 12:43:00 +02:00
Florian Hahn
d76010f3d9 Add link to Florian Wilkens's Bachelor's Thesis 2015-10-01 11:36:26 +02:00
bors
78edd4f3a0 Auto merge of #28778 - arielb1:no-source, r=eddyb
this simplifies the code while reducing the size of libcore.rlib by
3.3 MiB (~1M of which is bloat a separate patch of mine removes
too), while reducing rustc memory usage on small crates by 18MiB.

This also simplifies the code considerably.

I have measured a small, but possibly insignificant, bootstrap performance improvement, and the memory savings grow to about 30M for larger crates (but that is still less as a percentage).

r? @eddyb
2015-10-01 09:30:54 +00:00
bors
e5ba127734 Auto merge of #28741 - alexcrichton:fix-msvc-32, r=vadimcn
Turns out the symbol names are slightly different on 32-bit than on 64, so the
prefix needs to be tweaked just a bit!
2015-10-01 06:18:59 +00:00
bors
587be42d0b Auto merge of #28605 - alexcrichton:link-native-first, r=brson
This commit swaps the order of linking local native libraries and upstream
native libraries on the linker command line. Detail of bugs this can cause can
be found in #28595, and this change also invalidates the test case that was
added for #12446 which is now considered a bug because the downstream dependency
would need to declare that it depends on the native library somehow.

Closes #28595
[breaking-change]
2015-10-01 04:29:04 +00:00
Alex Crichton
9502df5798 rustc: Swap link order of native libs/rust deps
This commit swaps the order of linking local native libraries and upstream
native libraries on the linker command line. Detail of bugs this can cause can
be found in #28595, and this change also invalidates the test case that was
added for #12446 which is now considered a bug because the downstream dependency
would need to declare that it depends on the native library somehow.

Closes #28595
2015-09-30 20:17:54 -07:00
bors
031dd9c381 Auto merge of #28577 - jethrogb:topic/ast-stmt-debug, r=pcwalton
This enables the Debug trait to work on syntax::ast::Stmt.
2015-10-01 02:38:25 +00:00
bors
f5a0158927 Auto merge of #28732 - Eljay:fix-unused-attr, r=alexcrichton
Closes #28709.
2015-10-01 00:47:06 +00:00
bors
d14dba1227 Auto merge of #28782 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #28753, #28760, #28764, #28770, #28771, #28772
- Failed merges:
2015-09-30 22:27:53 +00:00
Steve Klabnik
f8c8c8c07d Rollup merge of #28772 - tshepang:improve-paragraph, r=steveklabnik 2015-09-30 18:20:04 -04:00
Steve Klabnik
0f6cea9a86 Rollup merge of #28771 - tshepang:upper-case, r=steveklabnik 2015-09-30 18:20:04 -04:00
Steve Klabnik
bc41536bb4 Rollup merge of #28770 - tshepang:awkward, r=steveklabnik 2015-09-30 18:20:03 -04:00
Steve Klabnik
4ab1ac5bc1 Rollup merge of #28764 - steveklabnik:gh28706, r=alexcrichton
Fixes #28706 

I am pretty sure that this is accurate, bout would love a double check.
2015-09-30 18:20:03 -04:00
Steve Klabnik
8382bc915c Rollup merge of #28760 - steveklabnik:gh28166, r=alexcrichton
Fixes #28166
2015-09-30 18:20:03 -04:00
Steve Klabnik
b6449eba51 Rollup merge of #28753 - steveklabnik:gh28572, r=alexcrichton
This is part of #28572, but doesn't complete it. Amongst other things,
this patch:

* Increases consistency in the way feature flags are used with other
  docs.
* Removes the ignores, which is nice: we actually had some syntax errors
  in the examples 😭.
* Mentions #![no_core]

Realistically, this document used to be in the order of least to most:
nothing, then adding core. But with the changes in RFC 1184, this is
backwards: it now shows stuff that uses core from the beginning. In the
future, I'd like to revamp this to go from 'most to least', but I'd like
to see the discussion in https://github.com/rust-lang/rust/issues/27701
goes before I write more.
2015-09-30 18:20:03 -04:00
Eli Friedman
1763fcb36d Don't crash on non-existent path in constant.
The behavior here isn't really ideal, but we can't really do much better
given the current state of constant evaluation.

Fixes #28670, and probably a bunch of duplicates.
2015-09-30 15:04:21 -07:00
Steve Klabnik
80130005da Add some docs for FromString::from_str
@marchelzo pointed out on IRC that this doesn't have docs, so, let's
change that.
2015-09-30 17:42:41 -04:00
Alex Crichton
bd6758a2b5 rustc: Don't lint about isize/usize in FFI
This lint warning was originally intended to help against misuse of the old Rust
`int` and `uint` types in FFI bindings where the Rust `int` was not equal to the
C `int`. This confusion no longer exists (as Rust's types are now `isize` and
`usize`), and as a result the need for this lint has become much less over time.

Additionally, starting with [the RFC for libc][rfc] it's likely that `isize` and
`usize` will be quite common in FFI bindings (e.g. they're the definition of
`size_t` and `ssize_t` on many platforms).

[rfc]: https://github.com/rust-lang/rfcs/pull/1291

This commit disables these lints to instead consider `isize` and `usize` valid
types to have in FFI signatures.
2015-09-30 14:31:01 -07:00
Ariel Ben-Yehuda
709ce9f96d kill the fake provided method stubs
this simplifies the code while reducing the size of libcore.rlib by
3.3 MiB (~1M of which is bloat a separate patch of mine removes
too), while reducing rustc memory usage on small crates by 18MiB.

This also simplifies the code considerably.
2015-10-01 00:14:56 +03:00
Alex Crichton
25354de928 trans: Fix __imp_ creation for i686 MSVC
Turns out the symbol names are slightly different on 32-bit than on 64, so the
prefix needs to be tweaked just a bit!
2015-09-30 13:02:57 -07:00
bors
1c788d0a9a Auto merge of #28769 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #28743, #28744, #28745, #28749, #28754, #28755, #28757, #28759, #28761, #28762, #28763, #28765
- Failed merges:
2015-09-30 19:04:02 +00:00
Steve Klabnik
2a787a23d1 Improve identifier defintion in the reference
Fixes #28706
2015-09-30 14:59:05 -04:00
Steve Klabnik
15ee0e908c Rollup merge of #28765 - steveklabnik:gh28693, r=nikomatsakis
Fixes #28693
2015-09-30 14:51:55 -04:00
Steve Klabnik
a8ed0bfcaa Rollup merge of #28763 - steveklabnik:gh27917, r=alexcrichton
Fixes #27917
2015-09-30 14:51:55 -04:00
Steve Klabnik
66d07d0d3f Rollup merge of #28762 - steveklabnik:gh28073, r=nikomatsakis
Fixes #28073
2015-09-30 14:51:55 -04:00
Steve Klabnik
64796d150c Rollup merge of #28761 - steveklabnik:gh28082, r=brson
We don't completely cover documentation tests in the testing chapter,
since we cover them in the documentation chapter. So make sure people
know that.

Fixes #28082
2015-09-30 14:51:55 -04:00
Steve Klabnik
d1137d634b Rollup merge of #28759 - steveklabnik:gh28359, r=nikomatsakis
Fixes #28359

I'm not doing more here because it's unclear that `as_slice()` is even going to stick around, see https://github.com/rust-lang/rust/issues/27729
2015-09-30 14:51:54 -04:00
Steve Klabnik
a88586b10f Rollup merge of #28757 - steveklabnik:gh28384, r=alexcrichton
Fixes #28384
2015-09-30 14:51:54 -04:00
Steve Klabnik
37d291e6ff Rollup merge of #28755 - steveklabnik:gh28418, r=alexcrichton
The original blog post referred to examples by their file names, and now
that it's in guide form, there is no file name. So edit the text so that
it makes a bit more sense.

Fixes #28428
2015-09-30 14:51:54 -04:00
Steve Klabnik
27254bc4aa Rollup merge of #28754 - luser:fix-rustdoc-module-links, r=Manishearth
The links in the rustdoc for several places in fmt were trying to link to
the std::fmt module but actually linking to std, which was confusing.
While trying to figure out why I noticed that the documentation chapter of
the Rust book has examples that show this same bug (although it doesn't seem
widespread in practice).

r? @steveklabnik
2015-09-30 14:51:54 -04:00
Steve Klabnik
c03be232cc Rollup merge of #28749 - tshepang:patch-6, r=bluss 2015-09-30 14:51:53 -04:00
Steve Klabnik
7d433d6418 Rollup merge of #28745 - tshepang:typo, r=bluss 2015-09-30 14:51:53 -04:00
Steve Klabnik
45510041f7 Rollup merge of #28744 - dato:usize-typo, r=Aatch 2015-09-30 14:51:53 -04:00