<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libcore/ptr.rs, branch 1.0.0-beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.0.0-beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.0.0-beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2015-03-31T22:49:57+00:00</updated>
<entry>
<title>std: Clean out #[deprecated] APIs</title>
<updated>2015-03-31T22:49:57+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-03-30T18:00:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d4a2c941809f303b97d153e06ba07e95cd245f88'/>
<id>urn:sha1:d4a2c941809f303b97d153e06ba07e95cd245f88</id>
<content type='text'>
This commit cleans out a large amount of deprecated APIs from the standard
library and some of the facade crates as well, updating all users in the
compiler and in tests as it goes along.
</content>
</entry>
<entry>
<title>std: Standardize (input, output) param orderings</title>
<updated>2015-03-30T21:08:40+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-03-27T18:12:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=acd48a2b3e7fcc0372f7718a2fac1cf80e03db95'/>
<id>urn:sha1:acd48a2b3e7fcc0372f7718a2fac1cf80e03db95</id>
<content type='text'>
This functions swaps the order of arguments to a few functions that previously
took (output, input) parameters, but now take (input, output) parameters (in
that order).

The affected functions are:

* ptr::copy
* ptr::copy_nonoverlapping
* slice::bytes::copy_memory
* intrinsics::copy
* intrinsics::copy_nonoverlapping

Closes #22890
[breaking-change]
</content>
</entry>
<entry>
<title>Added instability markers to `POST_DROP_*` consts, and related opt-in's.</title>
<updated>2015-03-26T13:08:55+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2015-03-25T15:36:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=601eca3b53a1a66a53a296f78428c1342b5f7758'/>
<id>urn:sha1:601eca3b53a1a66a53a296f78428c1342b5f7758</id>
<content type='text'>
(Reviewed rest of code; did not see other `pub` items that needed such
treatment.)

Driveby: fix typo in comment in ptr.rs.
</content>
</entry>
<entry>
<title>Switch drop-flag to `u8` to allow special tags to instrument state.</title>
<updated>2015-03-26T13:08:54+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2015-02-10T09:04:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3902190ac4d64962b2c1ac9a6ae88777b7112f82'/>
<id>urn:sha1:3902190ac4d64962b2c1ac9a6ae88777b7112f82</id>
<content type='text'>
Refactored code so that the drop-flag values for initialized
(`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names.

Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the
same as `mem::zeroed`, but the point is that it abstracts away from
the particular choice of value for `DTOR_DONE`).

Filling-drop needs to use something other than `ptr::read_and_zero`,
so I added such a function: `ptr::read_and_drop`.  But, libraries
should not use it if they can otherwise avoid it.

Fixes to tests to accommodate filling-drop.
</content>
</entry>
<entry>
<title>Add trivial cast lints.</title>
<updated>2015-03-24T21:03:57+00:00</updated>
<author>
<name>Nick Cameron</name>
<email>ncameron@mozilla.com</email>
</author>
<published>2015-03-20T04:15:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=95602a759d9190cad92279aa5929d30166f2255c'/>
<id>urn:sha1:95602a759d9190cad92279aa5929d30166f2255c</id>
<content type='text'>
This permits all coercions to be performed in casts, but adds lints to warn in those cases.

Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference.

[breaking change]

* Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed.
* The unused casts lint has gone.
* Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are:
- You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_`
- Casts do not influence inference of integer types. E.g., the following used to type check:

```
let x = 42;
let y = &amp;x as *const u32;
```

Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information:

```
let x: u32 = 42;
let y = &amp;x as *const u32;
```
</content>
</entry>
<entry>
<title>rollup merge of #23644: mbrubeck/doc-edit</title>
<updated>2015-03-24T00:13:37+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-03-24T00:13:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a44f24b9e05c67cf2d0e62234e8395e283e21d0'/>
<id>urn:sha1:6a44f24b9e05c67cf2d0e62234e8395e283e21d0</id>
<content type='text'>
PR #23104 moved `is_null` and `offset` to an inherent impl on the raw pointer type.

I'm not sure whether or how it's possible to link to docs for that impl.

r? @steveklabnik
</content>
</entry>
<entry>
<title>Update docs for ptr module.</title>
<updated>2015-03-23T22:57:20+00:00</updated>
<author>
<name>Matt Brubeck</name>
<email>mbrubeck@limpet.net</email>
</author>
<published>2015-03-23T18:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3f52d719dc705107de32991c8ab88baf586f7365'/>
<id>urn:sha1:3f52d719dc705107de32991c8ab88baf586f7365</id>
<content type='text'>
PR #23104 moved `is_null` and `offset` to an inherent impl on the raw pointer
type.
</content>
</entry>
<entry>
<title>rollup merge of #23503: alexcrichton/fix-ptr-docs</title>
<updated>2015-03-23T22:26:24+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-03-23T22:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aea822626fef66b6607bc50114b1fb6f8dcd148a'/>
<id>urn:sha1:aea822626fef66b6607bc50114b1fb6f8dcd148a</id>
<content type='text'>
The method with which backwards compatibility was retained ended up leading to
documentation that rustdoc didn't handle well and largely ended up confusing.
</content>
</entry>
<entry>
<title>Add #![feature] attributes to doctests</title>
<updated>2015-03-23T21:40:26+00:00</updated>
<author>
<name>Brian Anderson</name>
<email>banderson@mozilla.com</email>
</author>
<published>2015-03-13T22:28:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e9019101a82dd7f61dcdcd52bcc0123d5ed25d22'/>
<id>urn:sha1:e9019101a82dd7f61dcdcd52bcc0123d5ed25d22</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: Remove deprecated ptr functions</title>
<updated>2015-03-21T17:16:01+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-03-19T02:51:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e24fe5b8cfabb65a763a67403e7b0c91aaa848a9'/>
<id>urn:sha1:e24fe5b8cfabb65a763a67403e7b0c91aaa848a9</id>
<content type='text'>
The method with which backwards compatibility was retained ended up leading to
documentation that rustdoc didn't handle well and largely ended up confusing.
</content>
</entry>
</feed>
