Jorge Aparicio
9462a207ff
Make orphan check diagnostics clearer
...
closes #22388
2015-02-16 14:42:20 -05:00
Manish Goregaokar
1fffdafe41
fix linkage tests
2015-02-17 00:49:42 +05:30
GuillaumeGomez
318f262d68
Remove warning instead of implementing Copy trait
2015-02-16 20:03:44 +01:00
Keegan McAllister
6cef0e5dae
Rewrite the macros chapter
...
This is a more introductory document, suitable for Part II. The arcane details
move to an "Advanced macros" chapter in Part III.
2015-02-16 10:59:40 -08:00
GuillaumeGomez
441e09bc70
Add missing Copy trait for enums
2015-02-16 19:56:58 +01:00
Manish Goregaokar
0112f3b098
move other attribute check to visit_attribute
2015-02-17 00:25:56 +05:30
Manish Goregaokar
5ffb7db423
Add Gated
attribute type
2015-02-17 00:25:34 +05:30
Steve Klabnik
5ebf4c4bd5
remove 'crate files' sentence
...
Fixes #22386
2015-02-16 13:36:18 -05:00
Aaron Turon
411593130d
Update std::os deprecation warnings
...
They now point to the correct locations in std::env
2015-02-16 10:10:35 -08:00
Henrik Schopmans
ad827af11c
Fixed typo and removed unfitting 'can'
2015-02-16 17:58:17 +00:00
Niko Matsakis
be7b20e16d
Stop advertisting the old_impl_check
feature. We can't ENTIRELY
...
remove it yet, but we don't have to add new uses.
2015-02-16 12:50:42 -05:00
Steve Klabnik
eeee0e8f4c
Remove hax
...
Fixes #19321
2015-02-16 12:45:41 -05:00
Niko Matsakis
503e15b7c9
Address nits by @pnkfelix
2015-02-16 11:58:47 -05:00
bors
e4e7aa2856
Auto merge of #21744 - eddyb:rvalue-promotion, r=nikomatsakis
...
This includes everything necessary for promoting borrows of constant rvalues to `'static`.
That is, `&expr` will have the type `&'static T` if `const T: &'static T = &expr;` is valid.
There is a small exception, dereferences of raw pointers, as they misbehave.
They still "work" in constants as I didn't want to break legitimate uses (are there any?).
The qualification done here can be expanded to allow simple CTFE via `const fn`.
2015-02-16 16:38:51 +00:00
Florian Hahn
ef1308c407
Handle RUST_TEST_NOCAPTURE in compiletest and set add if to run env
...
closes #17829
2015-02-16 17:11:42 +01:00
Niko Matsakis
d0ef1664ca
Clarify and improve comment, removing a TODO.
2015-02-16 10:55:37 -05:00
Niko Matsakis
f58a1bfa98
Fix fallout in libsyntax from RFC 599. Clarity and efficiency seems to be mostly improved, to my eye.
...
Nonetheless, as this commit demonstrates, the previous commits was a [breaking-change].
In practice, breakage is focused on functions of this form:
```rust
fn foo(..., object: Box<FnMut()>)
````
where `FnMut()` could be any trait object type. The older scheme defaulted objects in argument
position so that they were bounded by a fresh lifetime:
```rust
fn foo<'a>(..., object: Box<FnMut()+'a>)
```
This meant that the object could contain borrowed data. The newer
scheme defaults to a lifetime bound of `'static`:
```rust
fn foo(..., object: Box<FnMut()+'static>)
```
This means that the object cannot contain borrowed data. In some cases, the best fix
is to stop using `Box`:
```rust
fn foo(..., object: &mut FnMut())
```
but another option is to write an explicit annotation for the `'a`
lifetime that used to be implicit. Both fixes are demonstrated in
this commit.
2015-02-16 10:55:37 -05:00
Niko Matsakis
369adaf515
Implement the rules for RFC 599, and add various tests.
...
Fixes #22211 .
2015-02-16 10:55:37 -05:00
Niko Matsakis
ab579883f2
Factor out the "region substs" creation to occur earlier, so that the
...
complete set of regions are available when converting types.
2015-02-16 10:55:37 -05:00
Niko Matsakis
80d1f14e7d
Implement the basic rules of RFC 599, but do not yet support custom types.
2015-02-16 10:55:37 -05:00
Niko Matsakis
f5c6a23c9e
Various simplifications and renamings based on the fact that old-school closures are gone and type parameters can now have multiple region bounds (and hence use a different path). Should have no effect on the external behavior of the compiler.
2015-02-16 10:55:37 -05:00
Niko Matsakis
931a3c4f9d
Detect and store object-lifetime-defaults.
2015-02-16 10:55:36 -05:00
Eduard Burtescu
b49f5281c2
tests: debuginfo: use static mut
to avoid constant folding globals.
2015-02-16 17:13:48 +02:00
Eduard Burtescu
d13d74d6d8
tests: work around #21721 some more by replacing some unit types with [u8; 0].
2015-02-16 17:13:48 +02:00
Eduard Burtescu
36fcfb02e2
rustc_trans: use internal linkage instead of private to work around linker bugs.
2015-02-16 17:13:48 +02:00
Eduard Burtescu
2dfd0acc92
tests: make run-make/issue-7349 more specific to avoid false positives.
2015-02-16 17:13:47 +02:00
Eduard Burtescu
48662d7cba
rustc_trans: correctly round up the largest variant to the enum's alignment.
2015-02-16 17:13:47 +02:00
Eduard Burtescu
f4473a4664
rustc_trans: promote constant rvalues in functions as an optimization.
2015-02-16 17:13:47 +02:00
Eduard Burtescu
df3cc0c55f
rustc: categorize rvalue borrows based on their const-qualification.
2015-02-16 17:13:47 +02:00
Eduard Burtescu
08967c7a7f
tests: fix fallout from changed error messages.
2015-02-16 17:13:47 +02:00
Eduard Burtescu
03295a715f
rustc: qualify expressions in check_const for potential promotion.
2015-02-16 17:13:42 +02:00
mdinger
1a133f3e2c
Document std::num::Float with examples
2015-02-16 09:32:07 -05:00
Eduard Burtescu
7be460ff37
rustc: use FromPrimitive for decoding astencode_tag.
2015-02-16 16:29:22 +02:00
Eduard Burtescu
5918d33fef
rust_typeck: remove unnecessary typing of &[]
as &'static [T; 0]
.
2015-02-16 16:29:22 +02:00
Eduard Burtescu
bd9c67e181
rustc: check for signed division/remainder overflow.
2015-02-16 16:29:22 +02:00
Eduard Burtescu
cb3c9a1e88
rustc: teach const_eval more about types.
2015-02-16 16:29:22 +02:00
Eduard Burtescu
4d8f995c3a
rustc: merge check_static into check_const.
2015-02-16 16:29:21 +02:00
Eduard Burtescu
8dd1f6a0dc
rustc: remove the vestigial "const marking" pass.
2015-02-16 16:29:21 +02:00
Simonas Kazlauskas
7d941fa61f
Replace some uses of deprecated os functions
...
This commit mostly replaces some of the uses of os::args with env::args.
2015-02-16 16:19:24 +02:00
Felix S. Klock II
480ea5ac55
Update core::cell
for isize/usize
transition.
2015-02-16 14:44:17 +01:00
Felix S. Klock II
a97588c34b
Update core::nonzero
for isize/usize
migration.
2015-02-16 14:39:35 +01:00
Felix S. Klock II
79318b7c3b
Update core::mem
for isize/usize
migration.
2015-02-16 14:38:50 +01:00
Sébastien Marie
5a6ea7a071
change the signal used to test signal_reported_right
...
The test "signal_reported_right" send a signal `1` to `/bin/sh`, and check
the status code to check if the signal is reported right.
Under OpenBSD, the signal `1` (`SIGHUP`) is catched by `/bin/sh`,
resulting the test failed.
Use the uncatchable signal `9` (`SIGKILL`) for test.
2015-02-16 13:53:46 +01:00
Simonas Kazlauskas
839311c76b
Implement ExactSizeIterator for Args and ArgsOs
...
Fixes #22343
2015-02-16 14:28:42 +02:00
Björn Steinbrink
543e148b0f
Update LLVM to release_36@229036
...
Fixes the crash blocking #21886 .
2015-02-16 12:08:37 +01:00
Steve Klabnik
faf0f5b196
Document where clauses.
...
Closes #21859 .
2015-02-16 05:31:26 -05:00
Steve Klabnik
817f3a4d37
Remove use of range() in iterator docs.
...
Fixes #21577 .
2015-02-16 04:53:21 -05:00
Steve Klabnik
f645cad3a1
CONTRIBUTING.md redux
...
This redux of CONTRIBUTING.md adds in more information, including
subsuming both compliment-bugreport.md and Note-development-policy
in the wiki.
I only glanced at the broad TOC of Note-development-policy, and did
not use the text as the basis for the re-write. This will then address
the last outstanding part of #5831 .
2015-02-16 04:46:40 -05:00
Eunji Jeong
194d96e5c3
Lower the default dwarf version for android
2015-02-16 17:48:50 +09:00
Manish Goregaokar
d5c3194c59
Add cfail test for custom attribute gate
2015-02-16 11:49:09 +05:30