- 20 9月, 2016 1 次提交
-
-
由 bors 提交于
Rustc metadata diagnostics r? @jonathandturner
-
- 19 9月, 2016 6 次提交
-
-
由 bors 提交于
Remove unused Token::to_binop function Just some dead code removal.
-
由 bors 提交于
Remove stray println! when invoking error E0316 Removed a wild println! statement that has been here for over a year and a half. Closes #36543
-
由 bors 提交于
Add links between format_args! macro and std::fmt::Arguments struct r? @GuillaumeGomez
-
由 bors 提交于
save-analysis: better 'parent' info In particular, this fixes some bugs displaying doc URLs for method calls.
-
由 Nick Cameron 提交于
In particular, this fixes some bugs displaying doc URLs for method calls.
-
由 bors 提交于
Add basic doc examples for `std::panic::{set_hook, take_hook}`. None
-
- 18 9月, 2016 8 次提交
-
-
由 Corey Farwell 提交于
-
由 bors 提交于
Visit and fold macro invocations in the same order Fixes #36540. r? @nrc
-
由 bors 提交于
Optimize the parser's last token handling. The parser currently makes a heap copy of the last token in four cases: identifiers, paths, doc comments, and commas. The identifier and interpolation cases are unused, and for doc comments and commas we only need to record their presence, not their value. This commit consolidates the last token handling and avoids the unnecessary copies by replacing `last_token`, `last_token_eof`, and `last_token_interpolated` with a new field `last_token_kind`. This simplifies the parser slightly and speeds up parsing on some files by 3--4%.
-
由 bors 提交于
correctly cancel some errors Fixes #36499. I also (proactively) changed all other calls in `parser.rs` to use `Handler::cancel`.
-
由 Jeffrey Seyfried 提交于
-
由 Jeffrey Seyfried 提交于
-
由 bors 提交于
Up the LLVM Fixes #36474 The relevant patch to rust-llvm is at https://github.com/rust-lang/llvm/pull/51 r? @alexcrichton
-
- 17 9月, 2016 18 次提交
-
-
由 Simonas Kazlauskas 提交于
Fixes #36474
-
由 bors 提交于
Remove data structure specialization for .zip() iterator Go back on half the specialization, the part that changed the Zip struct's fields themselves depending on the types of the iterators. Previous PR: #33090 This means that the Zip iterator will always carry two usize fields, which are sometimes unused. If a whole for loop using a .zip() iterator is inlined, these are simply removed and have no effect. The same improvement for Zip of for example slice iterators remain, and they still optimize well. However, like when the specialization of zip was merged, the compiler is still very sensistive to the exact context. For example this code only autovectorizes if the function is used, not if the code in zip_sum_i32 is inserted inline where it was called: ```rust fn zip_sum_i32(xs: &[i32], ys: &[i32]) -> i32 { let mut s = 0; for (&x, &y) in xs.iter().zip(ys) { s += x * y; } s } fn zipdot_i32_default_zip(b: &mut test::Bencher) { let xs = vec![1; 1024]; let ys = vec![1; 1024]; b.iter(|| { zip_sum_i32(&xs, &ys) }) } ``` Include a test that checks that `Zip<T, U>` is covariant w.r.t. T and U. Fixes #35727
-
由 bors 提交于
Overhaul char_lit() This commit does the following. - Removes parsing support for '\X12', '\u123456' and '\U12345678' char literals. These are no longer valid Rust and rejected by the lexer. (This strange-sounding situation occurs because the parser rescans char literals to compute their value.) - Rearranges the function so that all the escaped values are handled in a single `match`. The error-handling strategy is based on the one used by byte_lit().
-
由 bors 提交于
Avoid loading and parsing unconfigured non-inline modules. For example, `#[cfg(any())] mod foo;` will always compile after this PR, even if `foo.rs` and `foo/mod.rs` do not exist or do not contain valid Rust. Fixes #36478 and fixes #27873. r? @nrc
-
由 bors 提交于
trans: Let the collector find drop-glue for all vtables, not just VTableImpl. This fixes #36260. So far, the collector has only recorded drop-glue for insertion into a vtable if the vtable was for an impl. But there's actually no reason why it shouldn't do just the same for closure vtables, afaict. r? @EddyB cc @rust-lang/compiler
-
由 Cobrand 提交于
-
由 Mark-Simulacrum 提交于
-
由 bors 提交于
Remove variant `MacroRulesTT` of `SyntaxExtension` r? @nrc
-
由 bors 提交于
Rollup of 8 pull requests - Successful merges: #36383, #36424, #36480, #36484, #36505, #36509, #36519, #36521 - Failed merges:
-
由 Patrick Walton 提交于
This introduces a new `InstCombine` pass for us to place such peephole optimizations.
-
由 Jonathan Turner 提交于
Fix language in documentation comment.
-
由 Jonathan Turner 提交于
Add example in AsMut trait documentation Let me know of any changes I should make. r? @GuillaumeGomez
-
由 Jonathan Turner 提交于
Try to support py3 with rustbuild better Annoying to have it fail when you run with `python` only to have to rerun later with `python2`. r? @alexcrichton
-
由 Jonathan Turner 提交于
Default RUST_MIN_STACK to 16MiB for now Temporary(?) workaround to https://github.com/rust-lang/rust/issues/35408. cc @nikomatsakis if you want to veto the idea. r? @EddyB
-
由 Jonathan Turner 提交于
Don't ignore a doc code-block we can compile.
-
由 Jonathan Turner 提交于
doc: make that sound better
-
由 Jonathan Turner 提交于
Tweak std::marker docs Fixes #29361. r? @GuillaumeGomez
-
由 Jonathan Turner 提交于
Update E0049 to new error format Fixes #35210. Part of #35233. r? @jonathandturner
-
- 16 9月, 2016 7 次提交
-
-
由 bors 提交于
a few move-checker improvements This fixes moves out of unions and prohibits moves out of slices (see the individual commits). r? @pnkfelix
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
Moving out of a union is now treated like moving out of its parent type. Fixes #36246
-
由 Ariel Ben-Yehuda 提交于
The wording of RFC #495 enables moves out of slices. Unfortuantely, non-zeroing moves out of slices introduce a very annoying complication: as slices can vary in their length, indexes from the start and end may or may not overlap depending on the slice's exact length, which prevents assigning a particular drop flag for each individual element. For example, in the code ```Rust fn foo<T>(a: Box<[Box<[T]>]>, c: bool) -> T { match (a, c) { (box [box [t, ..], ..], true) => t, (box [.., box [.., t]], false) => t, _ => panic!() } } ``` If the condition is false, we have to drop the first element of `a`, unless `a` has size 1 in which case we drop all the elements of it but the last. If someone comes with a nice way of handling it, we can always re-allow moves out of slices. This is a [breaking-change], but it is behind the `slice_patterns` feature gate and was not allowed until recently.
-
由 Ariel Ben-Yehuda 提交于
-
由 bors 提交于
rustbuild: Fix cross-compiles to MinGW on Linux Closes #36290 Closes #36291
-
由 bors 提交于
Be more specific when type parameter shadows primitive type When a type parameter shadows a primitive type, the error message was non obvious. For example, given the file `file.rs`: ```rust trait Parser<T> { fn parse(text: &str) -> Option<T>; } impl<bool> Parser<bool> for bool { fn parse(text: &str) -> Option<bool> { Some(true) } } fn main() { println!("{}", bool::parse("ok").unwrap_or(false)); } ``` The output was: ```bash % rustc file.rs error[E0308]: mismatched types --> file.rs:7:14 | 7 | Some(true) | ^^^^ expected type parameter, found bool a | = note: expected type `bool` = note: found type `bool` error: aborting due to previous error ``` We now show extra information about the type: ```bash % rustc file.rs error[E0308]: mismatched types --> file.rs:7:14 | 7 | Some(true) | ^^^^ expected type parameter, found bool a | = note: expected type `bool` (type parameter) = note: found type `bool` (bool) error: aborting due to previous error ``` Fixes #35030
-