about summary refs log tree commit diff
path: root/src/libterm/lib.rs
AgeCommit message (Collapse)AuthorLines
2014-11-26Fix odd example where bounds were permitted and then ignoredNiko Matsakis-1/+1
2014-11-17Switch to purely namespaced enumsSteven Fackler-1/+3
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-10-30rollup merge of #18398 : aturon/lint-conventions-2Alex Crichton-1/+1
Conflicts: src/libcollections/slice.rs src/libcore/failure.rs src/libsyntax/parse/token.rs src/test/debuginfo/basic-types-mut-globals.rs src/test/debuginfo/simple-struct.rs src/test/debuginfo/trait-pointers.rs
2014-10-30Changes for Windows terminalNick Cameron-20/+14
2014-10-30changes to libsNick Cameron-17/+12
2014-10-28Update code with new lint namesAaron Turon-1/+1
2014-10-10auto merge of #17853 : alexcrichton/rust/issue-17718, r=pcwaltonbors-17/+17
This change is an implementation of [RFC 69][rfc] which adds a third kind of global to the language, `const`. This global is most similar to what the old `static` was, and if you're unsure about what to use then you should use a `const`. The semantics of these three kinds of globals are: * A `const` does not represent a memory location, but only a value. Constants are translated as rvalues, which means that their values are directly inlined at usage location (similar to a #define in C/C++). Constant values are, well, constant, and can not be modified. Any "modification" is actually a modification to a local value on the stack rather than the actual constant itself. Almost all values are allowed inside constants, whether they have interior mutability or not. There are a few minor restrictions listed in the RFC, but they should in general not come up too often. * A `static` now always represents a memory location (unconditionally). Any references to the same `static` are actually a reference to the same memory location. Only values whose types ascribe to `Sync` are allowed in a `static`. This restriction is in place because many threads may access a `static` concurrently. Lifting this restriction (and allowing unsafe access) is a future extension not implemented at this time. * A `static mut` continues to always represent a memory location. All references to a `static mut` continue to be `unsafe`. This is a large breaking change, and many programs will need to be updated accordingly. A summary of the breaking changes is: * Statics may no longer be used in patterns. Statics now always represent a memory location, which can sometimes be modified. To fix code, repurpose the matched-on-`static` to a `const`. static FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } change this code to: const FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } * Statics may no longer refer to other statics by value. Due to statics being able to change at runtime, allowing them to reference one another could possibly lead to confusing semantics. If you are in this situation, use a constant initializer instead. Note, however, that statics may reference other statics by address, however. * Statics may no longer be used in constant expressions, such as array lengths. This is due to the same restrictions as listed above. Use a `const` instead. [breaking-change] Closes #17718 [rfc]: https://github.com/rust-lang/rfcs/pull/246
2014-10-09Use the same html_root_url for all docsBrian Anderson-1/+1
2014-10-09Revert "Update html_root_url for 0.12.0 release"Brian Anderson-1/+1
This reverts commit 2288f332301b9e22db2890df256322650a7f3445.
2014-10-09term: Convert statics to constantsAlex Crichton-17/+17
2014-10-07Update html_root_url for 0.12.0 releaseBrian Anderson-1/+1
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-2/+1
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-07-11Update doc URLs for version bumpBrian Anderson-1/+1
2014-07-09Register new snapshotsAlex Crichton-2/+0
Closes #15544
2014-07-05Add #[crate_name] attributes as necessaryAlex Crichton-1/+3
2014-07-02Merge remote-tracking branch 'origin/master' into 0.11.0-releaseAlex Crichton-22/+52
Conflicts: src/libstd/lib.rs
2014-06-28librustc: Match trait self types exactly.Patrick Walton-22/+52
This can break code that looked like: impl Foo for Box<Any> { fn f(&self) { ... } } let x: Box<Any + Send> = ...; x.f(); Change such code to: impl Foo for Box<Any> { fn f(&self) { ... } } let x: Box<Any> = ...; x.f(); That is, upcast before calling methods. This is a conservative solution to #5781. A more proper treatment (see the xfail'd `trait-contravariant-self.rs`) would take variance into account. This change fixes the soundness hole. Some library changes had to be made to make this work. In particular, `Box<Any>` is no longer showable, and only `Box<Any+Send>` is showable. Eventually, this restriction can be lifted; for now, it does not prove too onerous, because `Any` is only used for propagating the result of task failure. This patch also adds a test for the variance inference work in #12828, which accidentally landed as part of DST. Closes #5781. [breaking-change]
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-06-17Mark all crates except std as experimentalBrian Anderson-0/+1
2014-06-15Register new snapshotsAlex Crichton-22/+22
2014-06-14Register new snapshotsAlex Crichton-2/+1
2014-06-09Use phase(plugin) in bootstrap cratesKeegan McAllister-1/+2
Do this to avoid warnings on post-stage0 builds.
2014-06-06rustdoc: Submit examples to play.rust-lang.orgAlex Crichton-1/+2
This grows a new option inside of rustdoc to add the ability to submit examples to an external website. If the `--markdown-playground-url` command line option or crate doc attribute `html_playground_url` is present, then examples will have a button on hover to submit the code to the playground specified. This commit enables submission of example code to play.rust-lang.org. The code submitted is that which is tested by rustdoc, not necessarily the exact code shown in the example. Closes #14654
2014-06-05Fallout from the libcollections movementAlex Crichton-1/+0
2014-05-22auto merge of #14357 : huonw/rust/spelling, r=pnkfelixbors-1/+1
The span on a inner doc-comment would point to the next token, e.g. the span for the `a` line points to the `b` line, and the span of `b` points to the `fn`. ```rust //! a //! b fn bar() {} ```
2014-05-22Spelling/doc formatting fixes.Huon Wilson-1/+1
2014-05-21Change static.rust-lang.org to doc.rust-lang.orgAlex Crichton-1/+1
The new documentation site has shorter urls, gzip'd content, and index.html redirecting functionality.
2014-05-17term: update example to be right (thanks @SiegeLord)Corey Richardson-2/+5
2014-05-16term: Don't run the code example, just compile itAlex Crichton-1/+1
This is blocking a snapshot because apparently the test fails on the bots.
2014-05-16Fix exampleCorey Richardson-4/+4
2014-05-16Add a bangCorey Richardson-1/+1
2014-05-16Update for BoxCorey Richardson-22/+22
2014-05-16term: add docs and windows supportCorey Richardson-179/+107
Closes #2807
2014-05-14libterm: Remove all uses of `~str` from `libterm`Patrick Walton-3/+6
2014-05-12Add the patch number to version strings. Closes #13289Brian Anderson-1/+1
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-1/+1
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-2/+2
2014-04-13Make Result::{unwrap, unwrap_err} require ShowSteven Fackler-12/+13
`foo.ok().unwrap()` and `foo.err().unwrap()` are the fallbacks for types that aren't `Show`. Closes #13379
2014-04-04Register new snapshotsAlex Crichton-3/+1
2014-04-03Bump version to 0.11-preBrian Anderson-1/+1
This also changes some of the download links in the documentation to 'nightly'.
2014-04-03auto merge of #13286 : alexcrichton/rust/release, r=brsonbors-1/+1
Merging the 0.10 release into the master branch.
2014-03-31term: Switch field privacy as necessaryAlex Crichton-4/+7
2014-03-31Bump version to 0.10Alex Crichton-1/+1
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-10/+10
Closes #2569
2014-03-24Documentation sprint: TerminfoOlle Jonsson-6/+25
2014-03-23Register new snapshotsFlavio Percoco-1/+0
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-9/+19
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20Register new snapshotsAlex Crichton-2/+1