Commit Graph

39337 Commits

Author SHA1 Message Date
awlnx
951ef9d1f1 fix for new attributes failing. issue #22964 2015-03-05 11:53:51 -05:00
bors
b4c965ee80 Auto merge of #22882 - alexcrichton:stabilize-process, r=aturon
This commits blanket marks the API of the `std::process` module as `#[stable]`.
The module's API is very similar to the old `std::old_io::process` API and has
generally had quite a bit of time to bake both before and after the new module
landed.
2015-03-02 23:18:36 +00:00
bors
2ca6eaedae Auto merge of #22963 - Manishearth:rollup, r=Manishearth 2015-03-02 20:26:39 +00:00
Manish Goregaokar
c4b1500fec Rollup merge of #22966 - nikomatsakis:closure-region-hierarchy, r=pnkfelix
Remove the synthetic \"region bound\" from closures and instead update how
type-outlives works for closure types so that it ensures that all upvars
outlive the region in question. This gives the same guarantees but
without introducing artificial regions (and gives better error messages
to boot). This is refactoring towards #3696.

r? @pnkfelix
2015-03-03 01:48:58 +05:30
Manish Goregaokar
f608afe470 Rollup merge of #22961 - dotdash:branch_drop, r=eddyb 2015-03-03 01:48:58 +05:30
Manish Goregaokar
8567f290b8 Add cfg_attr to known attributes 2015-03-03 01:48:58 +05:30
Manish Goregaokar
c9d5494640 Rollup merge of #22961 - dotdash:branch_drop, r=eddyb 2015-03-03 01:46:29 +05:30
Manish Goregaokar
718b591f33 Rollup merge of #22925 - leonardinius:issue-22646-fmt, r=steveklabnik
Addresses rust-lang/rust#22646

Removes deprecated `{:08d}` format from the module documentation.
`{:08}` should be used instead now.
2015-03-03 01:46:29 +05:30
Manish Goregaokar
16efd0ecbf Rollup merge of #22911 - djmally:master, r=steveklabnik
... example that actually does use an Option
2015-03-03 01:46:28 +05:30
Manish Goregaokar
973272e959 Rollup merge of #22906 - alexandercampbell:readme_typo_fix, r=steveklabnik
Typo fix for the \"30 Minute Intro\".

CONTRIBUTING guide says I should do this:

r? @steveklabnik
2015-03-03 01:46:28 +05:30
Manish Goregaokar
524327ace2 Rollup merge of #22689 - tshepang:thread-doc-improvements, r=steveklabnik 2015-03-03 01:46:27 +05:30
Björn Steinbrink
fe91974dd6 Properly propagate block changes while translating drop glue 2015-03-02 21:35:40 +05:30
bors
1cc8b6ec66 Auto merge of #22510 - GuillaumeGomez:audit-integer-libstd-thread, r=alexcrichton
Part of #22240.
2015-03-02 11:21:26 +00:00
Björn Steinbrink
31ad998bfd Properly propagate block changes while translating drop glue 2015-03-02 12:13:28 +01:00
Niko Matsakis
00fcf79448 Remove the synthetic "region bound" from closures and instead update how
type-outlives works for closure types so that it ensures that all upvars
outlive the region in question. This gives the same guarantees but
without introducing artificial regions (and gives better error messages
to boot).
2015-03-02 05:45:41 -05:00
bors
c5142056f7 Auto merge of #22797 - alexcrichton:io-stdio, r=aturon
This is an implementation of RFC 899 and adds stdio functionality to the new
`std::io` module. Details of the API can be found on the RFC, but from a high
level:

* `io::{stdin, stdout, stderr}` constructors are now available. There are also
  `*_raw` variants for unbuffered and unlocked access.
* All handles are globally shared (excluding raw variants).
* The stderr handle is no longer buffered.
* All handles can be explicitly locked (excluding the raw variants).

The `print!` and `println!` machinery has not yet been hooked up to these
streams just yet. The `std::fmt::output` module has also not yet been
implemented as part of this commit.
2015-03-02 07:10:14 +00:00
Alex Crichton
93613a543f std: Stabilize the process module
This commits blanket marks the API of the `std::process` module as `#[stable]`.
The module's API is very similar to the old `std::old_io::process` API and has
generally had quite a bit of time to bake both before and after the new module
landed.

The one modification made to the API is that `Stdio::capture` is now named
`stdio::piped`.

[breaking-change]
2015-03-01 20:41:37 -08:00
bors
4b3b02f8f4 Auto merge of #22940 - Manishearth:rollup, r=Manishearth 2015-03-02 00:37:24 +00:00
Manish Goregaokar
69881574f7 Rollup merge of #22944 - Manishearth:patch-1, r=sfackler
Been breaking tests lately. Somehow nondeterministic?
2015-03-02 06:04:39 +05:30
Manish Goregaokar
e955f4323b Fix unknown attribute in test 2015-03-02 05:31:34 +05:30
Manish Goregaokar
c84e3a1f19 Rollup merge of #22941 - sfackler:re-disable, r=sfackler
Seems to be blocking forever
2015-03-02 04:43:32 +05:30
Steven Fackler
1f1c5d54bf Ignore issue #16671 test on android (again)
Seems to be blocking forever
2015-03-01 15:11:09 -08:00
GuillaumeGomez
6d74279234 Replace int/uint by isize/usize 2015-03-01 23:26:23 +01:00
Manish Goregaokar
b79a788f8f Rollup merge of #22935 - dotdash:method_attr, r=eddyb
... objects

For method calls through trait objects, we currently generate the llvm
function argument attributes using the non-opaque method signature that
still has the trait object fat pointer for the self pointer. This leads
to attributes that are plain wrong, e.g. noalias. As we don't know
anything about the concrete type of the underlying object, we must
replace the self argument with an opaque i8 pointer before applying the
attributes.
2015-03-02 03:54:33 +05:30
Manish Goregaokar
7398071a8a Rollup merge of #22931 - semarie:dragonfly-ino_t, r=alexcrichton
this is the same problem as openbsd (#22792).
without the patch, liblibc don't build.

@mneumann please comment.
I have encountered this problem while building some rust libs with `target=x86_64-unknown-dragonfly` (while working on #22794)
2015-03-02 03:54:27 +05:30
Manish Goregaokar
d9b352fdc1 Rollup merge of #22923 - dotdash:trans_arg, r=eddyb
The logic for the argument translation was duplicated here.
2015-03-02 03:54:14 +05:30
Manish Goregaokar
644b931437 Rollup merge of #22922 - dotdash:closure_env_attr, r=eddyb 2015-03-02 03:54:07 +05:30
Manish Goregaokar
fb28214dcc Rollup merge of #22893 - Ms2ger:lints, r=huonw 2015-03-02 03:54:00 +05:30
Manish Goregaokar
ef8b20a564 Rollup merge of #22821 - ipetkov:lint-method-rename, r=eddyb
Traits can have associated types and not just methods. This
clarification reflects the the type of the input the method accepts.

[breaking-change]
2015-03-02 03:53:54 +05:30
Manish Goregaokar
85bdb31306 Rollup merge of #22777 - pnkfelix:issue-22443, r=nikomatsakis
Check for unbounded recursion during dropck.

Such recursion can be introduced by the erroneous use of non-regular types (aka types employing polymorphic recursion), which Rust does not support.

Fix #22443
2015-03-02 03:53:48 +05:30
Manish Goregaokar
fb19cd7fb7 Rollup merge of #22504 - GuillaumeGomez:audit-integer-libcore, r=Manishearth
Part of #22240.
2015-03-02 03:53:41 +05:30
Björn Steinbrink
8b6b3c159c Emit proper attributes for the self pointer in method call through trait objects
For method calls through trait objects, we currently generate the llvm
function argument attributes using the non-opaque method signature that
still has the trait object fat pointer for the self pointer. This leads
to attributes that are plain wrong, e.g. noalias. As we don't know
anything about the concrete type of the underlying object, we must
replace the self argument with an opaque i8 pointer before applying the
attributes.
2015-03-01 19:45:35 +01:00
Sébastien Marie
a71da374df unbreak dragonfly build after nacl integration
this is the same problem as openbsd (#22792).

without the patch, liblibc don't build.
2015-03-01 16:08:24 +01:00
bors
1576142495 Auto merge of #22880 - alexcrichton:deprecate-io-extensions, r=huonw
The `u64_from_be_bytes` and `u64_to_be_bytes` functions are being deprecated
with no replacement for now.

[breaking-change]
2015-03-01 14:22:58 +00:00
Leonids Maslovs
c04c9632f6 Addresses rust-lang/rust#22646
Removes deprecated `{:08d}` format from the module documentation.
`{:08}` should be used instead now.
2015-03-01 14:11:12 +02:00
Guillaume Gomez
df126589b9 Remove int/uint from libstd/lib.rs 2015-03-01 13:03:44 +01:00
Björn Steinbrink
708c3858e3 Use trans_arg_datum in trans_args_under_call_abi
The logic for the argument translation was duplicated here.
2015-03-01 12:54:30 +01:00
Björn Steinbrink
549be5f867 Emit proper function argument attributes for closure environments 2015-03-01 12:30:11 +01:00
Felix S. Klock II
180ef47af2 Add regression tests for issue 22443.
Fix #22443.
2015-03-01 11:16:11 +01:00
Felix S. Klock II
5ef6182102 Add check for unbounded due to non-regular types in dropck.
Count recursion across phantom data separately from all recursion,
and treat `Box<T>` just as if it were carrying `PhantomData<T>`.

(Regression tests are in followup commit.)

The practical effect of this is just to increment the `xref_depth`
counter, the same way that `Vec` and other types carrying
`PhantomData` do.
2015-03-01 11:15:32 +01:00
bors
0eb0ba38d0 Auto merge of #22087 - GuillaumeGomez:int-pow, r=alexcrichton
Fixes issue #22016
2015-03-01 08:59:29 +00:00
Alex Crichton
94d71f8836 std: Implement stdio for std::io
This is an implementation of RFC 899 and adds stdio functionality to the new
`std::io` module. Details of the API can be found on the RFC, but from a high
level:

* `io::{stdin, stdout, stderr}` constructors are now available. There are also
  `*_raw` variants for unbuffered and unlocked access.
* All handles are globally shared (excluding raw variants).
* The stderr handle is no longer buffered.
* All handles can be explicitly locked (excluding the raw variants).

The `print!` and `println!` machinery has not yet been hooked up to these
streams just yet. The `std::fmt::output` module has also not yet been
implemented as part of this commit.
2015-02-28 23:13:02 -08:00
bors
0905c8a5ec Auto merge of #22909 - Manishearth:rollup, r=Manishearth
r? @Manishearth
2015-03-01 06:32:54 +00:00
Manish Goregaokar
60f7732ccd Rollup merge of #22910 - dotdash:time_llvm_passes, r=cmr
The timing code break when using multiple codegen units, but that
shouldn't stop us from using it with a single codegen unit.
2015-03-01 09:50:30 +05:30
Manish Goregaokar
4e34daf2c4 Rollup merge of #22908 - mdinger:fix_link, r=Gankro
The markdown listing the link in [StrExt::width](http://doc.rust-lang.org/std/str/trait.StrExt.html#tymethod.width) isn't being parsed properly. I'm expecting it's because the `[ ]` is across 2 lines so this changes that. This is untested though.
2015-03-01 09:50:18 +05:30
Manish Goregaokar
4495bdb52c Add import of usize (fixup #22901) 2015-03-01 09:49:50 +05:30
Manish Goregaokar
d9fb9765a1 Rollup merge of #22907 - dotdash:static_assert_bool, r=eddyb
static_assert is documented as working on static with type `bool`, but
we currently accept it on any const static and crash when the const has
an non-integral type.

This is a breaking-change for anyone who used static_assert on types
likes i32, which happened to work but seems like an unintended
consequence of the missing error checking.

[breaking-change]

Fixes #22056
2015-03-01 09:49:48 +05:30
Manish Goregaokar
9dc9fcc767 Rollup merge of #22904 - dotdash:drop_old_clang, r=alexcrichton
Fixes #20467
2015-03-01 09:49:47 +05:30
Manish Goregaokar
337a0a981e Rollup merge of #22903 - semarie:openbsd-stack, r=alexcrichton
some commits in OpenBSD OS have corrected a problem of stack position.
Now, we can adjust more accurately the page guard in rust.

@dhuseby I am not sure that bitrig have already integrated these changes (the `$OpenBSD$` header in sys/kern/kern_exec.c is too old). But when they do, you may want this patch too.
2015-03-01 09:49:46 +05:30
Manish Goregaokar
87391ed52a Rollup merge of #22901 - thepowersgang:patch-1, r=eddyb
A misplaced uint->u32 instead of usize in fmt::Pointer. Added a basic test.
2015-03-01 09:49:43 +05:30