about summary refs log tree commit diff
path: root/src/libcore/ptr.rs
AgeCommit message (Collapse)AuthorLines
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-2/+2
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-13Remove re-exports from libcore/core.rcAlex Crichton-1/+1
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude.
2013-05-08auto merge of #6327 : z0w0/rust/rm-notest, r=brsonbors-5/+5
Makes it more consistent, imo.
2013-05-08libcore: Remove mutable fields from os and ptrPatrick Walton-1/+4
2013-05-08Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)]Zack Corr-5/+5
2013-05-01correct incorrect handling of overloaded operators, exposing various other ↵Niko Matsakis-8/+8
bits of rot
2013-04-29librustc: Rename `reinterpret_cast` to `transmute_copy` and remove the intrinsicPatrick Walton-4/+4
2013-04-29librustc: Remove `ptr::addr_of`.Patrick Walton-11/+0
2013-04-20Replaced many instances of reinterpret_cast with transmuteMatthijs Hofstra-17/+17
2013-04-16libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no ↵Huon Wilson-102/+100
pub mod or pub fn).
2013-04-14core: remove unnecessary unsafe blocks/functionsAlex Crichton-6/+2
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-1/+1
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-26/+26
2013-03-28Removing unused importsAlex Crichton-1/+2
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-3/+3
2013-03-22libcore: Remove `pure` from libcore. rs=depurePatrick Walton-34/+34
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-6/+6
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-9/+9
notation. rs=delifetiming
2013-03-11Remove uses of logBrian Anderson-12/+10
2013-03-11core: Convert obsolete fn syntaxBrian Anderson-2/+2
2013-03-11core: convert asserts to fail_unless!Jeff Olson-4/+4
2013-03-11rt/core: port os::list_dir to rust ref #4812Jeff Olson-2/+4
2013-03-11core: rt/core: impl os::env() in rust ref #4812Jeff Olson-0/+132
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-1/+1
2013-03-07test: Fix tests.Patrick Walton-5/+10
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-22/+22
2013-03-07libcore: Remove `extern mod { ... }` from libcore. rs=deexterningPatrick Walton-17/+24
2013-03-06Add manual &self/ and &static/ and /&self declarations thatNiko Matsakis-2/+2
are currently inferred. New rules are coming that will require them to be explicit. All add some explicit self declarations.
2013-03-05auto merge of #5233 : bstrie/rust/deimpselfcore, r=graydonbors-9/+9
2013-03-04De-implicit-self libcoreBen Striegel-9/+9
2013-03-04Adding missing imports for tests, and gate off othersAlex Crichton-9/+12
2013-03-04Remove unused imports throughout src/Alex Crichton-3/+0
2013-03-02auto merge of #5137 : yjh0502/rust/empty_struct, r=nikomatsakisbors-3/+3
The fix is straight-forward, but there are several changes while fixing the issue. 1) disallow `mut` keyword when making a new struct In code base, there are following code, ```rust struct Foo { mut a: int }; let a = Foo { mut a: 1 }; ``` This is because of structural record, which is deprecated corrently (see issue #3089) In structural record, `mut` keyword should be allowd to control mutability. But without structural record, we don't need to allow `mut` keyword while constructing struct. 2) disallow structural records in parser level This is related to 1). With structural records, there is an ambiguity between empty block and empty struct To solve the problem, I change parser to stop parsing structural records. I think this is not a problem, because structural records are not compiled already. Misc. issues There is an ambiguity between empty struct vs. empty match stmt. with following code, ```rust match x{} {} ``` Two interpretation is possible, which is listed blow ```rust match (x{}) {} // matching with newly-constructed empty struct (match x{}) {} // matching with empty enum(or struct) x // and then empty block ``` It seems that there is no such code in rust code base, but there is one test which uses empty match statement: https://github.com/mozilla/rust/blob/incoming/src/test/run-pass/issue-3037.rs All other cases could be distinguished with look-ahead, but this can't be. One possible solution is wrapping with parentheses when matching with an uninhabited type. ```rust enum what { } fn match_with_empty(x: what) -> ~str { match (x) { //use parentheses to remove the ambiguity } } ```
2013-03-02Remove REC, change related tests/docsJihyun Yu-3/+3
2013-03-01Rename core::private to core::unstable. #4743Brian Anderson-1/+1
2013-02-20Created libcore/private/intrinsics.rs, which aims to contain everyMatthijs 'Thiez' Hofstra-6/+1
rustc intrinsic. Several files in libcore have been changed to use these intrinsics. As of yet, none of the intrinsics are documented.
2013-02-14libcore: Remove ptr::mut_addr_of since &mut is coerced to *mutLuqman Aden-10/+2
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-6/+6
rs=implflipping
2013-02-07core: Remove transitional codeTim Chevalier-11/+0
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-3/+0
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-01-30librustc: Change `self` as a type to `Self` everywhere. r=brsonPatrick Walton-1/+1
2013-01-29librustc: Speed up byte copy operations. r=nmatsakisPatrick Walton-1/+25
2013-01-23libsyntax: Remove `fn() unsafe { ... }`. r=graydonPatrick Walton-22/+34
2013-01-18Rename copy_overlapping_memory() to copy_memory()Chris Peterson-21/+1
2013-01-13Long linesTim Chevalier-1/+2
2013-01-13Merge pull request #4411 from wting/4203_rename_memcpyTim Chevalier-6/+6
Rename memcpy, memmove, memset
2013-01-14Inlining methods/functions in core.gifnksm-0/+14
Also inlining some functions which take functions as arguments.
2013-01-10librustc: Make all external functions unsafe. r=tjcPatrick Walton-6/+12
2013-01-10Rename memcpy, memmove, memset to prevent any confusion with the C equivalents.William Ting-6/+6
Closes #4203.
2012-12-27librustc: Fix the test runner, the condition system, and core test. rs=bustagePatrick Walton-0/+3