Skip to content

Rollup of 9 pull requests - #35649

Closed
Manishearth wants to merge 20 commits into
rust-lang:masterfrom
Manishearth:rollup
Closed

Rollup of 9 pull requests#35649
Manishearth wants to merge 20 commits into
rust-lang:masterfrom
Manishearth:rollup

Conversation

frewsxcvand others added 20 commits August 8, 2016 18:33
The previous implementation of this function was overly conservative with
liberal usage of `Option` and `.unwrap()` which in theory never triggers. This
commit essentially removes the `Option`s in favor of unsafe implementations,
improving the code generation of the fast path for LLVM to see through what's
happening more clearly.
cc rust-lang#34727
Similar to the `as_slice` method on `core::slice::Iter` struct.
… r=brson
std: Optimize panic::catch_unwind slightly
The previous implementation of this function was overly conservative with
liberal usage of `Option` and `.unwrap()` which in theory never triggers. This
commit essentially removes the `Option`s in favor of unsafe implementations,
improving the code generation of the fast path for LLVM to see through what's
happening more clearly.
cc rust-lang#34727
…alexcrichton
Introduce `as_slice`/`as_mut_slice` methods on `std::vec::IntoIter` struct.
Similar to the `as_slice` method on `core::slice::Iter` struct.
…atsakis
[MIR] track Location in MirVisitor, combine Location
All the users of MirVisitor::visit_statement implement their own statement index tracking. This PR move the tracking into MirVisitor itself.
Also, there were 2 separate implementations of Location that were identical. This PR eliminates one of them.
…atsakis
Improve &-ptr printing
This PR replaces printing `&-ptr` with a more readable description. To do so it uses a few heuristics.
If the name of the type is unknown, too long (longer than just saying "reference"), or too complex (a type with explicit lifetime annotations), it will instead opt to print either "reference" or "mutable reference", depending on the mutability of the type.
Before:
```
error[E0308]: mismatched types
--> src/test/compile-fail/issue-7061.rs:14:46
|
14 | fn foo(&'a mut self) -> Box<BarStruct> { self }
| ^^^^ expected box, found &-ptr
|
= note: expected type `Box<BarStruct>`
= note: found type `&'a mut BarStruct`
error: aborting due to previous error
```
After:
```
error[E0308]: mismatched types
--> src/test/compile-fail/issue-7061.rs:14:46
|
14 | fn foo(&'a mut self) -> Box<BarStruct> { self }
| ^^^^ expected box, found mutable reference
|
= note: expected type `Box<BarStruct>`
= note: found type `&'a mut BarStruct`
error: aborting due to previous error
```
… r=eddyb
Fix incorrect unused import warnings on `cfg_attr`ed `path` attributes
Fixesrust-lang#35584.
r? @eddyb
@Manishearth

Copy link
Copy Markdown
MemberAuthor

@bors r+ p=10

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@bors

bors commented Aug 13, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 570c79d has been approved by Manishearth

@sophiajt

Copy link
Copy Markdown
Contributor

@bors r-

This fails travis

src/librustc/mir/visit.rs:348:30: 348:42 error: this function takes 3 parameters but 2 parameters were supplied [E0061]
src/librustc/mir/visit.rs:348 self.visit_lvalue(lvalue, LvalueContext::Store);
^~~~~~~~~~~~
src/librustc/mir/visit.rs:767:1: 767:29 note: in this expansion of make_mir_visitor! (defined in src/librustc/mir/visit.rs)
src/librustc/mir/visit.rs:348:30: 348:42 help: run `rustc --explain E0061` to see a detailed explanation
src/librustc/mir/visit.rs:348:30: 348:42 note: the following parameter types were expected: &mir::repr::Lvalue<'tcx>, mir::visit::LvalueContext, mir::repr::Location
src/librustc/mir/visit.rs:348:30: 348:42 error: this function takes 3 parameters but 2 parameters were supplied [E0061]
src/librustc/mir/visit.rs:348 self.visit_lvalue(lvalue, LvalueContext::Store);
^~~~~~~~~~~~
src/librustc/mir/visit.rs:768:1: 768:35 note: in this expansion of make_mir_visitor! (defined in src/librustc/mir/visit.rs)
src/librustc/mir/visit.rs:348:30: 348:42 help: run `rustc --explain E0061` to see a detailed explanation
src/librustc/mir/visit.rs:348:30: 348:42 note: the following parameter types were expected: &mut mir::repr::Lvalue<'tcx>, mir::visit::LvalueContext, mir::repr::Location
cp: x86_64-unknown-linux-gnu/stage1/lib/libsyntax_ext

@eddyb

Copy link
Copy Markdown
Contributor

Looks like #35542 has problems after merging.

@eddybeddyb closed this Aug 14, 2016
@CentrilCentril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

13 participants

@Manishearth@rust-highfive@bors@sophiajt@eddyb@nikomatsakis@Centril@frewsxcv@alexcrichton@scottcarr@jseyfried@sanxiyn@ahmedcharles