summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-3/+3
2014-06-26librustc: Ensure that proc upvars have static lifetime.Patrick Walton-2/+8
Since procs do not have lifetime bounds, we must do this to maintain safety. This can break code that incorrectly captured references in procedure types. Change such code to not do this, perhaps with a trait object instead. A better solution would be to add higher-rank lifetime support to procs. However, this would be a lot of work for a feature we want to remove in favor of unboxed closures. The corresponding "real fix" is #15067. Closes #14036. [breaking-change]
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-28/+18
This commit removes superfluous to_string calls from various places
2014-06-25auto merge of #15171 : pcwalton/rust/remove-cross-borrowing, r=brsonbors-2/+7
This will break code like: fn f(x: &mut int) {} let mut a = box 1i; f(a); Change it to: fn f(x: &mut int) {} let mut a = box 1i; f(&mut *a); RFC 33; issue #10504. [breaking-change] r? @brson
2014-06-24librustc: Don't try to perform the magicalPatrick Walton-129/+160
vector-reference-to-unsafe-pointer-to-element cast if the type to be casted to is not fully specified. This is a conservative change to fix the user-visible symptoms of the issue. A more flexible treatment would delay cast checks to after function typechecking. This can break code that did: let x: *u8 = &([0, 0]) as *_; Change this code to: let x: *u8 = &([0, 0]) as *u8; Closes #14893. [breaking-change]
2014-06-24librustc: Remove cross borrowing from mutable `Box`es to `&mut`.Patrick Walton-2/+7
This will break code like: fn f(x: &mut int) {} let mut a = box 1i; f(a); Change it to: fn f(x: &mut int) {} let mut a = box 1i; f(&mut *a); RFC 33; issue #10504. [breaking-change]
2014-06-25auto merge of #15160 : alexcrichton/rust/remove-f128, r=brsonbors-26/+1
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24Stabilize version output for rustc and rustdocRobert Buonpastore-10/+23
2014-06-24rustc: Don't register syntax crates twiceAlex Crichton-1/+1
We only need to register them once, and once they're registered twice warnings will start being spewed or worse may happen! Closes #14330
2014-06-24librustc: Check function argument patterns for legality of by-movePatrick Walton-0/+1
bindings. This will break code that incorrectly did things like: fn f(a @ box b: Box<String>) {} Fix such code to not rely on undefined behavior. Closes #12534. [breaking-change]
2014-06-24Avoid unnecessary temporary on assignmentsBjörn Steinbrink-2/+2
We only need the temporary when the type needs to be dropped, for other types, we can use trans_into to directly place the value into the destination.
2014-06-24Fix #15129Jakub Wieczorek-6/+15
Add support for unit literals to const_eval.
2014-06-24rustc: Always include the morestack libraryAlex Crichton-14/+27
It was previously assumed that the object file generated by LLVM would always require the __morestack function, but that assumption appears to be incorrect, as outlined in #15108. This commit forcibly tells the linker to include the entire archive, regardless of whether it's currently necessary or not. Closes #15108
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-266/+410
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-24Remove the quad_precision_float feature gateAlex Crichton-26/+1
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24More upstream lint changesKeegan McAllister-27/+7
2014-06-24Implement lint pluginsKeegan McAllister-10/+39
2014-06-24Incorporate upstream changes to old lint codeKeegan McAllister-46/+18
2014-06-24List builtin lints one per line for better diffsKeegan McAllister-13/+37
2014-06-24Reindent function call continuations, and other style fixesKeegan McAllister-103/+104
2014-06-24Drop the ExportedItems argument from LintPass::check_crateKeegan McAllister-5/+3
None of the builtin lints use this, and it's now available through the Context.
2014-06-24Make the crate and its exported items available in the lint contextKeegan McAllister-13/+15
2014-06-24Rework lint attr parsing and use it in middle::deadKeegan McAllister-53/+59
2014-06-24Convert builtin lints to uppercase names for style consistencyKeegan McAllister-125/+125
2014-06-24Use names in Lint structs in an ASCII-case-insensitive wayKeegan McAllister-13/+27
In preparation for the next commit.
2014-06-24Run lint passes using the Option dance instead of RefCellsKeegan McAllister-8/+14
2014-06-24Stop using Default for initializing builtin lintsKeegan McAllister-43/+27
It wasn't a very appropriate use of the trait. Instead, just enumerate unit structs and those with a `fn new()` separately.
2014-06-24Clean up and document the public lint APIKeegan McAllister-681/+767
Also change some code formatting. lint::builtin becomes a sibling of lint::context in order to ensure that lints implemented there use the same public API as lint plugins.
2014-06-24Store the registered lints in the SessionKeegan McAllister-125/+202
2014-06-24Replace enum LintId with an extensible alternativeKeegan McAllister-765/+741
2014-06-24Convert lints to a trait-based infrastructureKeegan McAllister-1001/+1306
The immediate benefits are * moving the state specific to a single lint out of Context, and * replacing the soup of function calls in the Visitor impl with more structured control flow But this is also a step towards loadable lints.
2014-06-24Rename lint::Lint to lint::LintIdKeegan McAllister-14/+14
2014-06-24Move lint infrastructure and individual lints into separate filesKeegan McAllister-1070/+1134
2014-06-24Move lint.rs out of middleKeegan McAllister-13/+15
We're going to have more modules under lint, and the paths get unwieldy. We also plan to have lints run at multiple points in the compilation pipeline.
2014-06-24auto merge of #15071 : tomjakubowski/rust/fix-15052, r=alexcrichtonbors-3/+6
Fix #15052
2014-06-24auto merge of #14963 : w3ln4/rust/master, r=alexcrichtonbors-11/+91
The aim of these changes is not working out a generic bi-endianness architectures support but to allow people develop for little endian MIPS machines (issue #7190).
2014-06-24librustc: Remove outdated reference to `~` and `@`Tom Jakubowski-3/+6
Fix #15052
2014-06-24Added Mipsel architecture supportPawel Olzacki-11/+91
2014-06-24auto merge of #15066 : pcwalton/rust/lang-and-intrinsic-feature-gate, ↵bors-9/+40
r=alexcrichton If you define lang items in your crate, add `#[feature(lang_items)]`. If you define intrinsics (`extern "rust-intrinsic"`), add `#[feature(intrinsics)]`. Closes #12858. [breaking-change] r? @brson
2014-06-23librustc: Feature gate lang items and intrinsics.Patrick Walton-9/+40
If you define lang items in your crate, add `#[feature(lang_items)]`. If you define intrinsics (`extern "rust-intrinsic"`), add `#[feature(intrinsics)]`. Closes #12858. [breaking-change]
2014-06-24auto merge of #15079 : nikomatsakis/rust/issue-5527-unify-refactor, r=pnkfelixbors-997/+1353
This is just a cleanup of the code. Doesn't really change anything deep about the way we operate. This is a prelude to implementing a good solution for one-way matching for #5527. r? @pnkfelix (we were just crawling about this code, after all)
2014-06-24auto merge of #15105 : alexcrichton/rust/snapshots, r=luqmanabors-1/+0
2014-06-23rustc: catch `impl X for Y` where X is not a trait in resolve.Kevin Butler-2/+25
2014-06-23rustc: catch non-trait methods before typeck.Kevin Butler-1/+20
Closes #3973.
2014-06-23auto merge of #15086 : jakub-/rust/xc-struct-variants-match, r=alexcrichtonbors-12/+14
Turns out field names of struct variants are not encoded in crate metadata.
2014-06-23auto merge of #15083 : edwardw/rust/destructure-trait-ref, r=pcwaltonbors-10/+26
Closes #15031.
2014-06-23auto merge of #15061 : pnkfelix/rust/fsk-fix-issue-10846, r=nikomatsakisbors-5/+51
In other words, Late-bound regions that occur non-free should be skipped. Fix #10846 (specifically the ICE, not the weakness in the current type inference).
2014-06-22Register new snapshotsAlex Crichton-1/+0
2014-06-23auto merge of #15097 : tomjakubowski/rust/fix-feature-gate-docs, r=sfacklerbors-1/+1
See http://static.rust-lang.org/doc/master/rustc/front/feature_gate/index.html for the problem this fixes.
2014-06-22auto merge of #15081 : jakub-/rust/issue-15080, r=alexcrichtonbors-10/+16
Fixes #15080.