about summary refs log tree commit diff
path: root/src/test/run-pass/const-str-ptr.rs
AgeCommit message (Collapse)AuthorLines
2018-09-06Migrated slew of run-pass tests to various subdirectories of `ui/run-pass/`.Felix S. Klock II-25/+0
2016-05-07test: adjust for the move to MIR-based const checking.Eduard Burtescu-5/+0
2016-03-17Add #[rustc_no_mir] to make tests pass with -Z orbit.Eduard Burtescu-0/+4
2015-11-18allow indexing into constant arraysOliver Schneider-0/+1
2015-06-13Use `assert_eq!` instead of `assert!` in testspetrochenkov-2/+2
2015-04-08Remove pretty-expanded from failing testsAlex Crichton-1/+0
This commit removes pretty-expanded from all tests that wind up calling panic! one way or another now that its internals are unstable.
2015-03-23rustdoc: Replace no-pretty-expanded with pretty-expandedBrian Anderson-0/+2
Now that features must be declared expanded source often does not compile. This adds 'pretty-expanded' to a bunch of test cases that still work.
2015-01-05More test fixes!Alex Crichton-2/+0
2015-01-05std: Redesign c_str and c_vecAlex Crichton-4/+0
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-03Remove deprecated functionalityAlex Crichton-4/+4
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2015-01-02std: Stabilize the prelude moduleAlex Crichton-0/+1
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2014-12-20Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.Nick Cameron-2/+2
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
2014-11-17Fix fallout from coercion removalNick Cameron-2/+2
2014-10-09test: Convert statics to constantsAlex Crichton-3/+3
Additionally, add lots of tests for new functionality around statics and `static mut`.
2014-07-24Deprecated `str::raw::from_buf_len`Adolfo Ochagavía-3/+3
Replaced by `string::raw::from_buf_len` [breaking-change]
2014-07-24Deprecated `str::raw::from_c_str`Adolfo Ochagavía-1/+1
Use `string::raw::from_buf` instead [breaking-change]
2014-06-29c_str: replace .with_ref with .as_ptr throughout the codebase.Huon Wilson-1/+1
2014-06-28Rename all raw pointers as necessaryAlex Crichton-3/+3
2014-05-27std: Remove String's to_ownedRicho Healey-3/+3
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-3/+3
2013-12-04std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter.Huon Wilson-2/+2
2013-12-04std::str: remove from_utf8.Huon Wilson-2/+2
This function had type &[u8] -> ~str, i.e. it allocates a string internally, even though the non-allocating version that take &[u8] -> &str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-2/+2
2013-08-04std: merge str::raw::from_buf and str::raw::from_c_strErick Tryzelaar-9/+14
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+2
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-3/+3
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-5/+5
2013-03-27testsuite: more `pub fn main`Tim Chevalier-1/+1
2013-03-26librustc: Remove all uses of the old `[T * N]` fixed-length vector syntaxPatrick Walton-2/+2
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-3/+3
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-1/+1
notation. rs=delifetiming
2013-03-07test: Fix tests.Patrick Walton-6/+6
2013-03-07Permit casting region pointers to unsafe ones.Josh Matthews-0/+22