Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #35649

Closed
wants to merge 20 commits into from
Closed

Conversation

frewsxcv and 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.
…matsakis

Correct span for pub_restricted field

Fix rust-lang#35435.
…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

Fixes rust-lang#35584.
r? @eddyb
@Manishearth
Copy link
Member Author

@bors r+ p=10

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@bors
Copy link
Contributor

bors commented Aug 13, 2016

📌 Commit 570c79d has been approved by Manishearth

@sophiajt
Copy link
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
Member

eddyb commented Aug 14, 2016

Looks like #35542 has problems after merging.

@eddyb eddyb closed this Aug 14, 2016
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.